@octane-xplat/ui 0.7.1 → 0.7.3

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 (63) hide show
  1. package/dist/native/CommandPalette.tsrx.js +7 -1
  2. package/dist/native/Grid.tsrx.js +31 -2
  3. package/dist/native/Hoverable.mobile.tsrx.js +39 -0
  4. package/dist/native/Pagination.tsrx.js +15 -12
  5. package/dist/native/Popover.tsrx.js +18 -7
  6. package/dist/native/Screen.tsrx.js +1 -1
  7. package/dist/native/Sheet.tsrx.js +1 -1
  8. package/dist/native/Slider.tsrx.js +23 -14
  9. package/dist/native/Text.tsrx.js +16 -0
  10. package/dist/native/Tooltip.mobile.tsrx.js +39 -0
  11. package/dist/native/WebView.tsrx.js +17 -2
  12. package/dist/native/_virtual/_@oxc-project_runtime@0.150.0/helpers/esm/decorate.js +9 -0
  13. package/dist/native/escape-props.js +2 -0
  14. package/dist/native/grid-auto-placement.js +83 -0
  15. package/dist/native/grid-placement.js +20 -0
  16. package/dist/native/index.shared.js +2 -2
  17. package/dist/native/octane-client-build.json +1 -1
  18. package/dist/native/shared.js +2 -2
  19. package/dist/native/sheet-service.js +1 -1
  20. package/dist/native/{tap-to-blur.mobile.js → tap-to-blur.ios.js} +20 -32
  21. package/dist/native/ui.js +2 -2
  22. package/dist/native/useMeasure.tsrx.js +17 -18
  23. package/dist/web/index.shared.js +92 -0
  24. package/dist/web/octane-client-build.json +1 -1
  25. package/dist/web/ui.js +1 -0
  26. package/package.json +1 -1
  27. package/src/CommandPalette.tsrx +7 -1
  28. package/src/Grid.tsrx +30 -1
  29. package/src/Pagination.tsrx +6 -4
  30. package/src/Popover.tsrx +20 -6
  31. package/src/Screen.tsrx +1 -1
  32. package/src/Sheet.tsrx +1 -1
  33. package/src/Slider.tsrx +13 -11
  34. package/src/Text.tsrx +34 -0
  35. package/src/WebView.tsrx +19 -10
  36. package/src/escape-props.ts +11 -1
  37. package/src/grid-auto-placement.ts +121 -0
  38. package/src/grid-placement.ts +29 -0
  39. package/src/index.shared.ts +84 -84
  40. package/src/index.web.ts +1 -261
  41. package/src/sheet-service.ts +1 -1
  42. package/src/tap-to-blur.ios.ts +90 -0
  43. package/src/tap-to-blur.mobile.ts +12 -94
  44. package/src/theme/tokens.css +24 -8
  45. package/src/useMeasure.tsrx +20 -21
  46. package/types/generated/.tsrx-typegen-manifest.json +10 -1
  47. package/types/generated/Grid.d.ts +0 -1
  48. package/types/generated/Hoverable.mobile.d.ts +8 -0
  49. package/types/generated/Tooltip.mobile.d.ts +7 -0
  50. package/types/generated/camera-permission.web.d.ts +2 -0
  51. package/types/generated/escape-props.d.ts +4 -0
  52. package/types/generated/escape-props.web.d.ts +5 -0
  53. package/types/generated/grid-auto-placement.d.ts +13 -0
  54. package/types/generated/grid-placement.d.ts +5 -0
  55. package/types/generated/index.web.d.ts +1 -111
  56. package/types/generated/tap-to-blur.ios.d.ts +13 -0
  57. package/types/generated/tap-to-blur.mobile.d.ts +1 -15
  58. package/types/generated/text-write.web.d.ts +4 -0
  59. package/types/generated/toast.d.ts +3 -0
  60. package/types/generated/toast.web.d.ts +3 -0
  61. package/dist/native/Hoverable.tsrx.js +0 -139
  62. package/dist/native/Tooltip.tsrx.js +0 -131
  63. package/types/generated/theme/colorScheme.web.d.ts +0 -5
@@ -0,0 +1,90 @@
1
+ /** Tap-outside-to-blur: iOS keeps a focused UITextField/UITextView as first
2
+ * responder until something else takes it, so a tap on blank chrome never
3
+ * dismisses the keyboard on its own.
4
+ *
5
+ * iOS: a single window-level UITapGestureRecognizer (ref-counted across
6
+ * attach calls) sees every touch in the app window — popups/sheets included —
7
+ * where a recognizer on an intermediate container proved unreliable. On each
8
+ * tap we hit-test and resign first responder unless the hit view is an
9
+ * editable text view (otherwise the field would focus-then-blur in the same
10
+ * tap — recognizers fire on touch-up, after the field's touch-down focus).
11
+ * Keyboard taps live in a separate UIWindow, so they never reach it.
12
+ * `cancelsTouchesInView` stays false so taps still reach buttons. */
13
+ export function attachTapToBlur(view: any): () => void {
14
+ const marker = '__xplatTapToBlur';
15
+ if (!view || view[marker]) {return () => {};}
16
+ view[marker] = true;
17
+
18
+ iosAttach();
19
+ return () => {
20
+ view[marker] = false;
21
+ iosDetach();
22
+ };
23
+ }
24
+
25
+ let iosCount = 0;
26
+ let iosTarget: any = null;
27
+ let iosRecognizer: any = null;
28
+ let iosWindow: any = null;
29
+
30
+ function iosAttach() {
31
+ iosCount++;
32
+ if (iosRecognizer) {return;}
33
+ const appWin = appWindow();
34
+ if (!appWin) {return;}
35
+ iosWindow = appWin;
36
+ // Resolve Objective-C bridge globals only when the iOS view is attached.
37
+ @NativeClass
38
+ class TapToBlurRecognizerTarget extends NSObject implements UIGestureRecognizerDelegate {
39
+ static ObjCProtocols = [UIGestureRecognizerDelegate]
40
+ static ObjCExposedMethods = {
41
+ tap: { returns: interop.types.void, params: [UITapGestureRecognizer] },
42
+ };
43
+
44
+ gestureRecognizerShouldReceiveTouch(_recognizer: any, touch: any) {
45
+ let hit = touch.view
46
+ while (hit) {
47
+ const textField = hit.isKindOfClass(UITextField.class())
48
+ const textView = hit.isKindOfClass(UITextView.class())
49
+ if (textField || textView) {
50
+ return false
51
+ }
52
+ hit = hit.superview
53
+ }
54
+ return true
55
+ }
56
+
57
+ tap(_recognizer: any) {
58
+ iosWindow.endEditing(true);
59
+ }
60
+ }
61
+
62
+ iosTarget = TapToBlurRecognizerTarget.new();
63
+ iosRecognizer = UITapGestureRecognizer.alloc().initWithTargetAction(iosTarget, 'tap');
64
+ iosRecognizer.delegate = iosTarget;
65
+ iosRecognizer.cancelsTouchesInView = false;
66
+ appWin.addGestureRecognizer(iosRecognizer);
67
+ }
68
+
69
+ function iosDetach() {
70
+ iosCount--;
71
+ if (iosCount > 0 || !iosRecognizer) {return;}
72
+ iosWindow?.removeGestureRecognizer(iosRecognizer);
73
+ iosRecognizer = null;
74
+ iosTarget = null;
75
+ iosWindow = null;
76
+ }
77
+
78
+ function appWindow() {
79
+ const scenes = UIApplication.sharedApplication.connectedScenes;
80
+ // connectedScenes is an NSSet — `allObjects` marshals to a JS array.
81
+ for (const scene of (scenes as any).allObjects ?? []) {
82
+ if (scene instanceof UIWindowScene) {
83
+ for (const w of (scene.windows as any)?.allObjects ?? scene.windows ?? []) {
84
+ if (w.isKeyWindow) {return w;}
85
+ }
86
+ }
87
+ }
88
+
89
+ return UIApplication.sharedApplication.keyWindow;
90
+ }
@@ -1,108 +1,26 @@
1
1
  import { Application } from '@nativescript/core';
2
2
 
3
- /** Tap-outside-to-blur: iOS keeps a focused UITextField/UITextView as first
4
- * responder until something else takes it, so a tap on blank chrome never
5
- * dismisses the keyboard on its own.
6
- *
7
- * iOS: a single window-level UITapGestureRecognizer (ref-counted across
8
- * attach calls) sees every touch in the app window — popups/sheets included —
9
- * where a recognizer on an intermediate container proved unreliable. On each
10
- * tap we hit-test and resign first responder unless the hit view is an
11
- * editable text view (otherwise the field would focus-then-blur in the same
12
- * tap — recognizers fire on touch-up, after the field's touch-down focus).
13
- * Keyboard taps live in a separate UIWindow, so they never reach it.
14
- * `cancelsTouchesInView` stays false so taps still reach buttons.
15
- *
16
- * Android: hides the soft keyboard from the currently focused view when a
17
- * tap lands on the attached container. */
3
+ /** Hide the Android soft keyboard when the user taps the attached view. */
18
4
  export function attachTapToBlur(view: any): () => void {
19
5
  const marker = '__xplatTapToBlur';
20
6
  if (!view || view[marker]) {return () => {};}
21
7
  view[marker] = true;
22
8
 
23
- if (Application.ios) {
24
- iosAttach();
25
- return () => {
26
- view[marker] = false;
27
- iosDetach();
28
- };
9
+ if (!Application.android) {
10
+ return () => { view[marker] = false; };
29
11
  }
30
12
 
31
- if (Application.android) {
32
- const handler = (_args: any) => {
33
- const activity = Application.android.foregroundActivity;
34
- const focused = activity?.currentFocus;
35
- if (!focused) {return;}
36
- const imm = activity.getSystemService(android.content.Context.INPUT_METHOD_SERVICE);
37
- imm?.hideSoftInputFromWindow(focused.getWindowToken(), 0);
38
- };
39
-
40
- view.on('tap', handler);
41
- return () => {
42
- view[marker] = false;
43
- view.off('tap', handler);
44
- };
45
- }
13
+ const handler = (_args: any) => {
14
+ const activity = Application.android.foregroundActivity;
15
+ const focused = activity?.currentFocus;
16
+ if (!focused) {return;}
17
+ const imm = activity.getSystemService(android.content.Context.INPUT_METHOD_SERVICE);
18
+ imm?.hideSoftInputFromWindow(focused.getWindowToken(), 0);
19
+ };
46
20
 
21
+ view.on('tap', handler);
47
22
  return () => {
48
23
  view[marker] = false;
24
+ view.off('tap', handler);
49
25
  };
50
26
  }
51
-
52
- let iosCount = 0;
53
- let iosTarget: any = null;
54
- let iosRecognizer: any = null;
55
- let iosWindow: any = null;
56
-
57
- function iosAttach() {
58
- iosCount++;
59
- if (iosRecognizer) {return;}
60
- const appWin = appWindow();
61
- if (!appWin) {return;}
62
- iosWindow = appWin;
63
-
64
- const Owner = class extends NSObject {
65
- static ObjCExposedMethods = {
66
- tap: { returns: interop.types.void, params: [UITapGestureRecognizer] },
67
- };
68
- tap(recognizer: any) {
69
- const point = recognizer.locationInView(iosWindow);
70
- // hitTest can land on a text field's internal subview — walk up.
71
- let hit = iosWindow.hitTest(point, null);
72
- while (hit) {
73
- if (hit instanceof UITextField || hit instanceof UITextView) {return;}
74
- hit = hit.superview;
75
- }
76
-
77
- iosWindow.endEditing(true);
78
- }
79
- };
80
-
81
- iosTarget = Owner.new();
82
- iosRecognizer = UITapGestureRecognizer.alloc().initWithTargetAction(iosTarget, 'tap');
83
- iosRecognizer.cancelsTouchesInView = false;
84
- appWin.addGestureRecognizer(iosRecognizer);
85
- }
86
-
87
- function iosDetach() {
88
- iosCount--;
89
- if (iosCount > 0 || !iosRecognizer) {return;}
90
- iosWindow?.removeGestureRecognizer(iosRecognizer);
91
- iosRecognizer = null;
92
- iosTarget = null;
93
- iosWindow = null;
94
- }
95
-
96
- function appWindow() {
97
- const scenes = UIApplication.sharedApplication.connectedScenes;
98
- // connectedScenes is an NSSet — `allObjects` marshals to a JS array.
99
- for (const scene of (scenes as any).allObjects ?? []) {
100
- if (scene instanceof UIWindowScene) {
101
- for (const w of (scene.windows as any)?.allObjects ?? scene.windows ?? []) {
102
- if (w.isKeyWindow) {return w;}
103
- }
104
- }
105
- }
106
-
107
- return UIApplication.sharedApplication.keyWindow;
108
- }
@@ -168,6 +168,8 @@ img {
168
168
 
169
169
  .vx-stack > * {
170
170
  grid-area: 1 / 1;
171
+ horizontal-align: left;
172
+ vertical-align: top;
171
173
  }
172
174
 
173
175
  /* xplat-web-only:start — Absolute's native leaf is absolutelayout; CSS
@@ -316,6 +318,11 @@ img {
316
318
  background-color: #000;
317
319
  }
318
320
 
321
+ .vx-video > * {
322
+ horizontal-align: stretch;
323
+ vertical-align: stretch;
324
+ }
325
+
319
326
  .vx-video-centerbtn {
320
327
  width: 56px;
321
328
  height: 56px;
@@ -617,6 +624,9 @@ button {
617
624
  line-height: 20px;
618
625
  color: var(--color-onprimary);
619
626
  }
627
+ .vx-checkbox--on .vx-checkbox-check {
628
+ color: var(--color-onprimary);
629
+ }
620
630
  .vx-checkbox-label {
621
631
  margin-left: 8px;
622
632
  }
@@ -1212,10 +1222,6 @@ input.vx-search-field::-webkit-search-cancel-button {
1212
1222
  /* CommandPalette — panel centered by the overlay layer. */
1213
1223
  .vx-commandpalette {
1214
1224
  width: 360px;
1215
- /* vw, not %: the overlay-content wrapper shrink-wraps the palette, so a
1216
- * plain % would resolve against the palette's own width (clamping an
1217
- * explicit style.width to 90% of itself). */
1218
- max-width: 90vw;
1219
1225
  padding: 8px;
1220
1226
  border-width: 1px;
1221
1227
  border-color: var(--color-border);
@@ -1224,6 +1230,13 @@ input.vx-search-field::-webkit-search-cancel-button {
1224
1230
  background-color: var(--color-surface);
1225
1231
  color: var(--color-text);
1226
1232
  }
1233
+ /* xplat-web-only:start — native uses Screen.mainScreen.widthDIPs */
1234
+ .vx-commandpalette {
1235
+ /* The overlay-content wrapper shrink-wraps the palette, so % would resolve
1236
+ * against the palette itself instead of the available viewport. */
1237
+ max-width: 90vw;
1238
+ }
1239
+ /* xplat-web-only:end */
1227
1240
  .vx-cmdk-search {
1228
1241
  margin-bottom: 4px;
1229
1242
  }
@@ -1615,25 +1628,28 @@ input.vx-search-field::-webkit-search-cancel-button {
1615
1628
  gap: 24px;
1616
1629
  }
1617
1630
 
1618
- /* line-height is REQUIRED on native: without it a Label's measured height
1619
- misses the font's line metrics, and Android clips the descenders/bottom
1620
- of the glyphs (observed: section-labels 21–29px bounds for 12sp text at
1621
- 3.25x). Tailwind pairs every text-* size with a leading, same here. */
1631
+ /* Native Labels keep their natural font height even with line-height set, so
1632
+ min-height aligns utilities whose natural metrics fall below their leading.
1633
+ Tailwind pairs every text-* size with a leading, same here. */
1622
1634
  .text-2xl {
1623
1635
  font-size: 28px;
1624
1636
  line-height: 36px;
1637
+ min-height: 36px;
1625
1638
  }
1626
1639
  .text-xl {
1627
1640
  font-size: 20px;
1628
1641
  line-height: 28px;
1642
+ min-height: 28px;
1629
1643
  }
1630
1644
  .text-lg {
1631
1645
  font-size: 18px;
1632
1646
  line-height: 28px;
1647
+ min-height: 28px;
1633
1648
  }
1634
1649
  .text-sm {
1635
1650
  font-size: 13px;
1636
1651
  line-height: 20px;
1652
+ min-height: 20px;
1637
1653
  }
1638
1654
  .font-bold {
1639
1655
  font-weight: bold;
@@ -1,5 +1,5 @@
1
1
  /** @jsxImportSource @nativescript-community/octane */
2
- import { useCallback, useEffect, useState } from 'octane';
2
+ import { useCallback, useEffect, useRef, useState } from 'octane';
3
3
  import type { MeasureBounds, MeasureResult, UseMeasureOptions } from './props';
4
4
 
5
5
  function readBounds(view: any): MeasureBounds | null {
@@ -11,14 +11,12 @@ function readBounds(view: any): MeasureBounds | null {
11
11
 
12
12
  /** Binds to a NativeScript view and observes screen-relative DIP bounds by default. */
13
13
  export function useMeasure(options: UseMeasureOptions = {}): MeasureResult {
14
- const [view, setView] = useState<any>(null);
15
14
  const [bounds, setBounds] = useState<MeasureBounds | null>(null);
15
+ const detach = useRef<(() => void) | null>(null);
16
16
  const observe = options.observe ?? true;
17
- const bind = useCallback((next: any) => {
18
- setView((current: any) => current === next ? current : next);
19
- }, []);
20
-
21
- useEffect(() => {
17
+ const bind = useCallback((view: any) => {
18
+ detach.current?.();
19
+ detach.current = null;
22
20
  if (!view) {
23
21
  setBounds(null);
24
22
  return;
@@ -28,39 +26,40 @@ export function useMeasure(options: UseMeasureOptions = {}): MeasureResult {
28
26
  const next = readBounds(view);
29
27
  // Fresh object each read — skip the setState when nothing moved
30
28
  // or the re-render → layoutChanged → update loop never ends.
31
- setBounds((prev: MeasureBounds | null) =>
32
- prev && next &&
33
- prev.x === next.x && prev.y === next.y &&
34
- prev.width === next.width && prev.height === next.height
29
+ setBounds((prev: MeasureBounds | null) => {
30
+ return prev && next &&
31
+ prev.x === next.x && prev.y === next.y &&
32
+ prev.width === next.width && prev.height === next.height
35
33
  ? prev
36
- : next,
37
- );
34
+ : next;
35
+ });
38
36
  };
39
37
 
40
- const onLoaded = update;
41
- view.on?.('loaded', onLoaded);
38
+ view.on?.('loaded', update);
42
39
  update();
40
+ const scrollParents: any[] = [];
43
41
  if (observe) {
44
42
  view.on?.('layoutChanged', update);
45
43
  let parent = view.parent;
46
44
  while (parent) {
47
45
  parent.on?.('scroll', update);
46
+ scrollParents.push(parent);
48
47
  parent = parent.parent;
49
48
  }
50
49
  }
51
50
 
52
- return () => {
53
- view.off?.('loaded', onLoaded);
51
+ detach.current = () => {
52
+ view.off?.('loaded', update);
54
53
  if (observe) {
55
54
  view.off?.('layoutChanged', update);
56
- let parent = view.parent;
57
- while (parent) {
55
+ for (const parent of scrollParents) {
58
56
  parent.off?.('scroll', update);
59
- parent = parent.parent;
60
57
  }
61
58
  }
62
59
  };
63
- }, [view, observe]);
60
+ }, [observe]);
61
+
62
+ useEffect(() => () => detach.current?.(), []);
64
63
 
65
64
  return { bind, bounds };
66
65
  }
@@ -50,6 +50,7 @@
50
50
  "Heading.d.ts",
51
51
  "Heading.web.d.ts",
52
52
  "Hoverable.d.ts",
53
+ "Hoverable.mobile.d.ts",
53
54
  "Hoverable.web.d.ts",
54
55
  "Icon.d.ts",
55
56
  "Icon.web.d.ts",
@@ -136,6 +137,7 @@
136
137
  "Timeline.d.ts",
137
138
  "Timeline.web.d.ts",
138
139
  "Tooltip.d.ts",
140
+ "Tooltip.mobile.d.ts",
139
141
  "Tooltip.web.d.ts",
140
142
  "Tree.d.ts",
141
143
  "Tree.web.d.ts",
@@ -162,9 +164,13 @@
162
164
  "anim.d.ts",
163
165
  "anim.web.d.ts",
164
166
  "apply-native-modifiers.native.d.ts",
167
+ "camera-permission.web.d.ts",
165
168
  "child-array.d.ts",
166
169
  "cx.d.ts",
167
170
  "escape-props.d.ts",
171
+ "escape-props.web.d.ts",
172
+ "grid-auto-placement.d.ts",
173
+ "grid-placement.d.ts",
168
174
  "icons.d.ts",
169
175
  "index.d.ts",
170
176
  "index.linux.d.ts",
@@ -219,15 +225,18 @@
219
225
  "styled.d.ts",
220
226
  "styled.web.d.ts",
221
227
  "svg.mobile.d.ts",
228
+ "tap-to-blur.ios.d.ts",
222
229
  "tap-to-blur.mobile.d.ts",
223
230
  "text-write.d.ts",
231
+ "text-write.web.d.ts",
224
232
  "theme/colorScheme.d.ts",
225
233
  "theme/colorScheme.linux.d.ts",
226
- "theme/colorScheme.web.d.ts",
227
234
  "theme/status-bar-scheme.mobile.d.ts",
228
235
  "theme/theme-scheme.d.ts",
229
236
  "toast-anchor.d.ts",
230
237
  "toast-anchor.web.d.ts",
238
+ "toast.d.ts",
239
+ "toast.web.d.ts",
231
240
  "transform.web.d.ts",
232
241
  "translate.d.ts",
233
242
  "translate.web.d.ts",
@@ -1,3 +1,2 @@
1
- /** @jsxImportSource @nativescript-community/octane */
2
1
  import type { GridProps } from './props.js';
3
2
  export declare function Grid(props: GridProps): unknown;
@@ -0,0 +1,8 @@
1
+ /** @jsxImportSource @nativescript-community/octane */
2
+ import type { HoverableProps } from './props.js';
3
+ /** Touch-target leaf: renders the children unchanged and never mounts the
4
+ * hover card — pointer intent has no touch semantic. A long-press stand-in
5
+ * is deliberately not provided (the fake-parity trap from decision #44).
6
+ * Keep essential information out of `card`; the pointer platforms (web,
7
+ * macOS) carry the real hover surface. */
8
+ export declare function Hoverable(props: HoverableProps): unknown;
@@ -0,0 +1,7 @@
1
+ /** @jsxImportSource @nativescript-community/octane */
2
+ import type { TooltipProps } from './props.js';
3
+ /** Touch-target leaf: renders the trigger unchanged and never mounts the
4
+ * hint layer — hover/focus intent has no touch semantic (decision #47,
5
+ * revised). Keep essential information out of `content`; the pointer
6
+ * platforms (web, macOS) carry the real hover surface. */
7
+ export declare function Tooltip(props: TooltipProps): unknown;
@@ -0,0 +1,2 @@
1
+ export declare function cameraHardwarePresent(): boolean;
2
+ export declare function ensureCameraPermission(): Promise<boolean>;
@@ -4,6 +4,10 @@ export declare function applyEscapeProps(view: any, props: {
4
4
  ios?: any;
5
5
  android?: any;
6
6
  modifiers?: readonly NativeModifier[];
7
+ row?: number;
8
+ col?: number;
9
+ rowSpan?: number;
10
+ colSpan?: number;
7
11
  }): void;
8
12
  /** Translate the shared/ARIA spelling to NativeScript's narrower role enum. */
9
13
  export declare function nativeAccessibilityRole(role?: Role): string | undefined;
@@ -0,0 +1,5 @@
1
+ /** Apply DOM escape props after the primitive's own props. Dash-named keys
2
+ * are attributes; other keys use the DOM property where available. */
3
+ export declare function applyEscapeProps(element: any, props: {
4
+ web?: any;
5
+ }): void;
@@ -0,0 +1,13 @@
1
+ import type { GridChildPlacement } from './grid-placement.js';
2
+ export interface GridCell {
3
+ row: number;
4
+ col: number;
5
+ }
6
+ export interface GridAutoPlacement {
7
+ cells: GridCell[];
8
+ rowCount: number;
9
+ columnCount: number;
10
+ }
11
+ /** Match CSS Grid's row-flow placement for NativeScript GridLayout children. */
12
+ export declare function autoPlaceGridChildren(items: readonly GridChildPlacement[], rowTracks?: string, columnTracks?: string): GridAutoPlacement;
13
+ export declare function ensureGridTracks(spec: string | undefined, requiredCount: number): string;
@@ -0,0 +1,5 @@
1
+ import type { LayoutChildProps } from './props.js';
2
+ export type GridChildPlacement = Pick<LayoutChildProps, 'row' | 'col' | 'rowSpan' | 'colSpan'>;
3
+ /** Keep the authored Grid placement next to its mounted NativeScript view. */
4
+ export declare function rememberGridChildPlacement(view: unknown, props: GridChildPlacement): void;
5
+ export declare function gridChildPlacement(view: unknown): GridChildPlacement;
@@ -1,111 +1 @@
1
- export { View } from './View.web.js';
2
- export { View as Column } from './View.web.js';
3
- export { Row } from './Row.web.js';
4
- export { Grid } from './Grid.web.js';
5
- export { Stack } from './Stack.web.js';
6
- export { Absolute } from './Absolute.web.js';
7
- export type { PanEvent, SwipeEvent, SetTranslate } from './props.js';
8
- export { setTranslate } from './translate.web.js';
9
- export { Spacer } from './Spacer.web.js';
10
- export { Text } from './Text.web.js';
11
- export { RichText, RichTextSpan } from './RichText.web.js';
12
- export { Pressable } from './Pressable.web.js';
13
- export { Button } from './Button.web.js';
14
- export { Collapsible } from './Collapsible.web.js';
15
- export { Accordion } from './Accordion.web.js';
16
- export { Checkbox } from './Checkbox.web.js';
17
- export { RadioGroup } from './RadioGroup.web.js';
18
- export { DropdownMenu } from './DropdownMenu.web.js';
19
- export { ContextMenu } from './ContextMenu.web.js';
20
- export { Badge } from './Badge.web.js';
21
- export { Separator } from './Separator.web.js';
22
- export { Skeleton } from './Skeleton.web.js';
23
- export { Avatar } from './Avatar.web.js';
24
- export { AvatarGroup } from './AvatarGroup.web.js';
25
- export type { AccordionItemSpec, AccordionProps, AvatarGroupProps, AvatarProps, BadgeProps, ButtonProps, CheckboxProps, CollapsibleProps, ContextMenuProps, DropdownMenuProps, MenuItem, RadioGroupProps, RadioOption, SegmentedControlProps, SeparatorProps, SkeletonProps, } from './props.js';
26
- export { FormField } from './FormField.web.js';
27
- export { FieldGroup } from './FieldGroup.web.js';
28
- export { ListItem } from './ListItem.web.js';
29
- export { InputNumber } from './InputNumber.web.js';
30
- export { PinInput } from './PinInput.web.js';
31
- export { Select } from './Select.web.js';
32
- export { SelectMenu, Combobox, InputMenu } from './aliases.web.js';
33
- export { InputTags } from './InputTags.web.js';
34
- export { InputRating } from './InputRating.web.js';
35
- export { CheckboxGroup } from './CheckboxGroup.web.js';
36
- export type { CheckboxGroupProps, FieldGroupProps, ListItemComponent, ListItemProps, ListItemSlotProps, FormFieldProps, InputNumberProps, InputRatingProps, InputTagsProps, PinInputProps, SelectOption, SelectProps, } from './props.js';
37
- export { Breadcrumb } from './Breadcrumb.web.js';
38
- export { Pagination } from './Pagination.web.js';
39
- export { Stepper } from './Stepper.web.js';
40
- export { NavigationMenu } from './NavigationMenu.web.js';
41
- export { CommandPalette } from './CommandPalette.web.js';
42
- export type { BreadcrumbItem, BreadcrumbProps, CommandPaletteProps, NavigationMenuItem, NavigationMenuProps, PaginationProps, StepperProps, StepperStep, } from './props.js';
43
- export { Table } from './Table.web.js';
44
- export { Timeline } from './Timeline.web.js';
45
- export { Tree } from './Tree.web.js';
46
- export { Alert } from './Alert.web.js';
47
- export { Card } from './Card.web.js';
48
- export { Chip } from './Chip.web.js';
49
- export { Kbd } from './Kbd.web.js';
50
- export { Empty } from './Empty.web.js';
51
- export { Banner } from './Banner.web.js';
52
- export { User } from './User.web.js';
53
- export { ProgressGroup } from './ProgressGroup.web.js';
54
- export type { AlertProps, BannerProps, CardProps, ChipProps, EmptyProps, KbdProps, ProgressGroupProps, TableColumn, TableProps, TimelineItem, TimelineProps, TreeNode, TreeProps, UserProps, } from './props.js';
55
- export { Link } from './Link.web.js';
56
- export { NavLink } from './NavLink.web.js';
57
- export { TextInput } from './TextInput.web.js';
58
- export { TextArea } from './TextArea.web.js';
59
- export { SearchInput } from './SearchInput.web.js';
60
- export { SegmentedControl } from './SegmentedControl.web.js';
61
- export { ScrollBox } from './ScrollBox.web.js';
62
- export { ScrollView } from './ScrollView.web.js';
63
- export { VirtualList } from './VirtualList.web.js';
64
- export type { VirtualListProps } from './props.js';
65
- export { Image } from './Image.web.js';
66
- export { WebView } from './WebView.web.js';
67
- export type { WebViewContentSize, WebViewHandle, WebViewLoadEvent, WebViewProps } from './props.js';
68
- export { Overlay } from './Overlay.web.js';
69
- export { Popover } from './Popover.web.js';
70
- export { Hoverable } from './Hoverable.web.js';
71
- export { Tooltip } from './Tooltip.web.js';
72
- export { showToast } from './toast-anchor.web.js';
73
- export type { HoverableProps, OverlayProps, PopoverAnchorRef, PopoverProps, PopoverPlacement, ToastContent, ToastOptions, ToastPosition, TooltipProps, } from './props.js';
74
- export { useAnimation } from './anim.web.js';
75
- export type { AnimatedValue } from './anim.web.js';
76
- export { useThemeScheme, getThemeScheme, setThemePreference, getThemePreference, themeSchemeClasses, onThemeSchemeChange, applyThemeClasses, } from './theme/theme-scheme.js';
77
- export { useColorScheme, getColorScheme } from './theme/colorScheme.web.js';
78
- export type { ColorScheme } from './theme/colorScheme.web.js';
79
- export { styled } from './styled.web.js';
80
- export { openWindow } from './windows.web.js';
81
- export { Screen } from './Screen.web.js';
82
- export { Tabs } from './Tabs.web.js';
83
- export type { TabSpec } from './Tabs.web.js';
84
- export { Switch } from './Switch.web.js';
85
- export { SafeArea } from './SafeArea.web.js';
86
- export { Drawer } from './Drawer.web.js';
87
- export { useSafeAreaInsets } from './safeAreaInsets.web.js';
88
- export type { SafeAreaInsets } from './safeAreaInsets.web.js';
89
- export { useMeasure } from './useMeasure.web.js';
90
- export type { MeasureBounds, MeasureResult, UseMeasureOptions } from './props.js';
91
- export { ActivityIndicator } from './ActivityIndicator.web.js';
92
- export { Meter } from './Meter.web.js';
93
- export { Slider } from './Slider.web.js';
94
- export { Icon } from './Icon.web.js';
95
- export { Heading } from './Heading.web.js';
96
- export { registerIcon, registerIcons } from './icons.js';
97
- export type { IconGlyph } from './icons.js';
98
- export type { ActivityIndicatorProps, HeadingProps, IconProps, MeterProps, RefreshProps, SearchInputProps, SliderProps, } from './props.js';
99
- export { isNative } from './platform.web.js';
100
- export { registerStack, getStack, stackEntries } from './stacks.web.js';
101
- export { pushRoute, popRoute, routeStacks, pushDeepLink, routeFor, currentRoute, currentModalRoute, canGoBack, useCanGoBack, useRoute, useModalRoute, redirect, addBackInterceptor, registerScreens, registerRoutes, addRoutes, screenFor, hrefFor, layoutsFor as layoutsForRoute, } from './route.web.js';
102
- export { useBackInterceptor } from './use-back.web.js';
103
- export { deriveRouteManifest, defineRoutes, mergeRouteManifests } from './route-table.js';
104
- export type { BeforeLoad, BeforeLoadArgs, LinkProps, NavLinkProps, Route, RouteContext, RouteHead, RouteHeadExport, RouteMeta, RouteManifest, RouteSpec, RouteSpecSet, ScreenTable, ModalOpenResult, OpenWindowOptions, } from './props.js';
105
- export { createStore } from './store.js';
106
- export type { Store, ReadableStore } from './store.js';
107
- export { useStore } from './use-store.web.js';
108
- export { Sheet } from './Sheet.web.js';
109
- export { openSheet, closeSheet } from './sheet-service.web.js';
110
- export type { SheetProps, SheetOpenOptions, OpenSheet } from './props.js';
111
- export type { AbsoluteProps, DrawerProps, GridProps, ImageProps, LayoutChildProps, PressableProps, RichTextProps, RichTextSpanProps, RowProps, SafeAreaProps, ScreenProps, ScrollBoxProps, ScrollViewProps, SpacerProps, StackProps, SwitchProps, TabsProps, TextAreaProps, TextInputProps, TextProps, ViewProps, } from './props.js';
1
+ export * from './index.shared.js';
@@ -0,0 +1,13 @@
1
+ /** Tap-outside-to-blur: iOS keeps a focused UITextField/UITextView as first
2
+ * responder until something else takes it, so a tap on blank chrome never
3
+ * dismisses the keyboard on its own.
4
+ *
5
+ * iOS: a single window-level UITapGestureRecognizer (ref-counted across
6
+ * attach calls) sees every touch in the app window — popups/sheets included —
7
+ * where a recognizer on an intermediate container proved unreliable. On each
8
+ * tap we hit-test and resign first responder unless the hit view is an
9
+ * editable text view (otherwise the field would focus-then-blur in the same
10
+ * tap — recognizers fire on touch-up, after the field's touch-down focus).
11
+ * Keyboard taps live in a separate UIWindow, so they never reach it.
12
+ * `cancelsTouchesInView` stays false so taps still reach buttons. */
13
+ export declare function attachTapToBlur(view: any): () => void;
@@ -1,16 +1,2 @@
1
- /** Tap-outside-to-blur: iOS keeps a focused UITextField/UITextView as first
2
- * responder until something else takes it, so a tap on blank chrome never
3
- * dismisses the keyboard on its own.
4
- *
5
- * iOS: a single window-level UITapGestureRecognizer (ref-counted across
6
- * attach calls) sees every touch in the app window — popups/sheets included —
7
- * where a recognizer on an intermediate container proved unreliable. On each
8
- * tap we hit-test and resign first responder unless the hit view is an
9
- * editable text view (otherwise the field would focus-then-blur in the same
10
- * tap — recognizers fire on touch-up, after the field's touch-down focus).
11
- * Keyboard taps live in a separate UIWindow, so they never reach it.
12
- * `cancelsTouchesInView` stays false so taps still reach buttons.
13
- *
14
- * Android: hides the soft keyboard from the currently focused view when a
15
- * tap lands on the attached container. */
1
+ /** Hide the Android soft keyboard when the user taps the attached view. */
16
2
  export declare function attachTapToBlur(view: any): () => void;
@@ -0,0 +1,4 @@
1
+ /** Web twin — controlled text writes are DOM value assignments; the browser
2
+ * keeps the selection on unchanged prefixes itself. Present for
3
+ * platform-suffix parity; the native leaves are the only callers. */
4
+ export declare function writeText(view: any, value: string | undefined | null): void;
@@ -0,0 +1,3 @@
1
+ import type { ToastContent, ToastOptions } from './props.js';
2
+ /** FIFO queue; each toast is shown after the prior toast closes. */
3
+ export declare function showToast(content: ToastContent, options?: ToastOptions): void;
@@ -0,0 +1,3 @@
1
+ import type { ToastContent, ToastOptions } from './props.js';
2
+ /** FIFO queue; each toast is shown after the prior toast closes. */
3
+ export declare function showToast(content: ToastContent, options?: ToastOptions): void;