@hozo/primitives 0.1.0 → 0.3.0
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/CHANGELOG.md +42 -0
- package/README.md +24 -2
- package/dist/flat-list.native.d.ts +8 -8
- package/dist/flat-list.native.d.ts.map +1 -1
- package/dist/flat-list.native.js +55 -25
- package/dist/flat-list.native.js.map +1 -1
- package/dist/foundation.d.ts +7 -4
- package/dist/foundation.d.ts.map +1 -1
- package/dist/foundation.js +33 -16
- package/dist/foundation.js.map +1 -1
- package/dist/foundation.native.d.ts +16 -2
- package/dist/foundation.native.d.ts.map +1 -1
- package/dist/foundation.native.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -9
- package/dist/index.js.map +1 -1
- package/dist/index.native.d.ts +1 -0
- package/dist/index.native.d.ts.map +1 -1
- package/dist/index.native.js +1 -0
- package/dist/index.native.js.map +1 -1
- package/dist/link.native.d.ts +16 -7
- package/dist/link.native.d.ts.map +1 -1
- package/dist/link.native.js +9 -5
- package/dist/link.native.js.map +1 -1
- package/dist/presence-context.d.ts +15 -0
- package/dist/presence-context.d.ts.map +1 -0
- package/dist/presence-context.js +11 -0
- package/dist/presence-context.js.map +1 -0
- package/dist/presence.d.ts +12 -0
- package/dist/presence.d.ts.map +1 -0
- package/dist/presence.js +45 -0
- package/dist/presence.js.map +1 -0
- package/dist/presence.native.d.ts +8 -0
- package/dist/presence.native.d.ts.map +1 -0
- package/dist/presence.native.js +66 -0
- package/dist/presence.native.js.map +1 -0
- package/dist/pressable.d.ts +9 -2
- package/dist/pressable.d.ts.map +1 -1
- package/dist/pressable.js +9 -6
- package/dist/pressable.js.map +1 -1
- package/dist/pressable.native.d.ts.map +1 -1
- package/dist/pressable.native.js +181 -195
- package/dist/pressable.native.js.map +1 -1
- package/dist/runtime-container.native.d.ts +11 -9
- package/dist/runtime-container.native.d.ts.map +1 -1
- package/dist/runtime-container.native.js +8 -6
- package/dist/runtime-container.native.js.map +1 -1
- package/dist/runtime-transition.native.d.ts +16 -1
- package/dist/runtime-transition.native.d.ts.map +1 -1
- package/dist/runtime-transition.native.js +34 -7
- package/dist/runtime-transition.native.js.map +1 -1
- package/dist/text-input.d.ts +319 -3
- package/dist/text-input.d.ts.map +1 -1
- package/dist/text-input.js +4 -3
- package/dist/text-input.js.map +1 -1
- package/dist/view.d.ts +11 -2
- package/dist/view.d.ts.map +1 -1
- package/dist/view.js +7 -6
- package/dist/view.js.map +1 -1
- package/package.json +4 -3
- package/src/flat-list.native.tsx +69 -47
- package/src/foundation.native.tsx +16 -1
- package/src/foundation.tsx +66 -25
- package/src/index.native.ts +2 -0
- package/src/index.ts +209 -219
- package/src/link.native.tsx +29 -18
- package/src/presence-context.ts +27 -0
- package/src/presence.native.tsx +81 -0
- package/src/presence.tsx +55 -0
- package/src/pressable.native.tsx +251 -243
- package/src/pressable.ts +92 -79
- package/src/runtime-container.native.tsx +30 -15
- package/src/runtime-transition.native.tsx +68 -7
- package/src/text-input.ts +74 -72
- package/src/view.ts +76 -61
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @hozo/primitives
|
|
2
|
+
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#923](https://github.com/iray-tno/hozo/pull/923) [`8d58223`](https://github.com/iray-tno/hozo/commit/8d5822322607b6214fa7f57d233a9173a45815b6) Thanks [@iray-tno](https://github.com/iray-tno)! - Compile project-defined Tailwind animations and their keyframes for both backends, including keyframes needed by dynamic class candidates. StyleX conditions inside property values now reach the shared condition model.
|
|
8
|
+
|
|
9
|
+
Extend Native negated conditions across supported environment, breakpoint, pixel-width, container, prop, sibling and interaction predicates. Link states use the existing interaction owner, descendant focus-visible follows that owner, and independent transform resets and runtime-state transform families compose without losing their other transform entries. Unsupported predicates are still diagnosed, not assumed false.
|
|
10
|
+
|
|
11
|
+
Respect project radius tokens and built-in radius overrides, discover runtime candidates in quoted class arrays, and preserve separate Native style keys for ternary branches. Caller classes override a component's resting look while explicit state classes retain their precedence. On Web, fallback candidate rules stay below authored Tailwind utilities, and conditional class selection reaches elements that remain components.
|
|
12
|
+
|
|
13
|
+
Native line-breaking utilities that cannot be represented now warn instead of failing the build. This does not implement Android/CJK line-break controls that React Native does not expose.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#923](https://github.com/iray-tno/hozo/pull/923) [`8d58223`](https://github.com/iray-tno/hozo/commit/8d5822322607b6214fa7f57d233a9173a45815b6) Thanks [@iray-tno](https://github.com/iray-tno)! - Uncompiled View, Text and Image forward refs to their platform hosts. Container measurement preserves the host instead of replacing it, and Web View layout defaults agree between compiled output and fallback components.
|
|
18
|
+
|
|
19
|
+
An uncompiled Svg now uses its accessibility label as its name, as the compiled path already did. Web controls, including generated Canvas controls and form/pattern actions, show the shared clickable cursor without giving disabled controls an active pointer.
|
|
20
|
+
|
|
21
|
+
- [#923](https://github.com/iray-tno/hozo/pull/923) [`8d58223`](https://github.com/iray-tno/hozo/commit/8d5822322607b6214fa7f57d233a9173a45815b6) Thanks [@iray-tno](https://github.com/iray-tno)! - Resolve Native pattern class-name slots through the project's runtime class resolver. Pattern controls now share the primitive interaction engine and deliver hover, focus, focus-visible and pressed facts to their actual owners instead of reporting pressed alone.
|
|
22
|
+
|
|
23
|
+
Static interaction styles are additionally wired for Chip, ColorPicker swatches, Pagination page controls and CommandPalette pointer-state item slots. Selection slots and nested controls retain their own ownership: a remove button does not inherit its row's focus, and a command item does not borrow the input's focus. Other static state slots and semantic predicates remain subject to their existing diagnostics.
|
|
24
|
+
|
|
25
|
+
Styled Button receives a pressed look; Checkbox and Switch indicators are real elements on both platforms rather than Native-invisible pseudo-elements. Non-transition Native Pressables and their Text children no longer allocate animation values/listeners. Interaction ownership remains mounted when transitions are added or removed. This removes idle animation work, not every initial-mount cost or every platform delivery difference; measured list mount/update tradeoffs remain tracked separately.
|
|
26
|
+
- Updated dependencies [[`80f2686`](https://github.com/iray-tno/hozo/commit/80f2686ace0922e27502695d0b88c1dba2e08be0), [`adfe1fd`](https://github.com/iray-tno/hozo/commit/adfe1fd914d60effc27677efdaee6edf19feaf6b), [`496f1b7`](https://github.com/iray-tno/hozo/commit/496f1b75e06bc5f5b079870ce566754e7161c21a), [`ad1ad0b`](https://github.com/iray-tno/hozo/commit/ad1ad0b355c6ecae07372f44a65aed279e539e22), [`8d58223`](https://github.com/iray-tno/hozo/commit/8d5822322607b6214fa7f57d233a9173a45815b6), [`8d58223`](https://github.com/iray-tno/hozo/commit/8d5822322607b6214fa7f57d233a9173a45815b6), [`8d58223`](https://github.com/iray-tno/hozo/commit/8d5822322607b6214fa7f57d233a9173a45815b6), [`70cc763`](https://github.com/iray-tno/hozo/commit/70cc763166d3f3aa04c466c5a12e7a8a4dba0a0f), [`9a33076`](https://github.com/iray-tno/hozo/commit/9a3307689c1a37847d45bea9083cee1f63c7edba), [`8d58223`](https://github.com/iray-tno/hozo/commit/8d5822322607b6214fa7f57d233a9173a45815b6), [`030d179`](https://github.com/iray-tno/hozo/commit/030d1791515ef5523560c38c1788e4b23f6bfd92)]:
|
|
27
|
+
- @hozo/behaviors@0.3.0
|
|
28
|
+
- @hozo/engine@0.3.0
|
|
29
|
+
|
|
30
|
+
## 0.2.0
|
|
31
|
+
|
|
32
|
+
- Add `Presence` to retain a child through exit animation and expose `data-state="closed"`.
|
|
33
|
+
- Use React 19 ref props for Web components without forwardRef casts, repair Pressable ref forwarding and preserve existing author-facing ref usage.
|
|
34
|
+
- Integrate the compiled Native entrance/exit/keyframe path while keeping animated Text as a Text host.
|
|
35
|
+
|
|
36
|
+
See the [Hozo release notes and migration steps](https://github.com/iray-tno/hozo/blob/main/CHANGELOG.md#020) for cross-package changes and measured boundaries.
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- Updated Hozo dependencies:
|
|
41
|
+
- @hozo/engine@0.2.0
|
|
42
|
+
- @hozo/behaviors@0.2.0
|
package/README.md
CHANGED
|
@@ -29,8 +29,30 @@ export function Inbox({ messages, onOpen }) {
|
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
The browser `FlatList` windows its rows itself, so compiled and uncompiled paths behave the same,
|
|
32
|
-
and it reports the list's full length to assistive technology
|
|
33
|
-
|
|
32
|
+
and it reports the list's full length to assistive technology with `aria-setsize`/`aria-posinset`.
|
|
33
|
+
|
|
34
|
+
On Android each cell still reports where it sits, but the list no longer reports how long it is.
|
|
35
|
+
Android's collection info is set through an undocumented prop whose reader crashes the app on a
|
|
36
|
+
child that does not carry the matching per-item tag — which `VirtualizedList`'s own windowing
|
|
37
|
+
spacers do not. See [#512](https://github.com/iray-tno/hozo/issues/512); it comes back when React
|
|
38
|
+
Native stops casting that tag with `as` instead of `as?`.
|
|
39
|
+
|
|
40
|
+
### Responsive images
|
|
41
|
+
|
|
42
|
+
`Image` does what [#155](https://github.com/iray-tno/hozo/issues/155) asked for with what each platform already has, rather than with a second image component:
|
|
43
|
+
|
|
44
|
+
| | Web | React Native |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| A box before the image loads | `aspect-video`, `aspect-[4/3]`: CSS `aspect-ratio` | the same classes: `aspectRatio` |
|
|
47
|
+
| Several resolutions | `srcSet` and `sizes`, passed to `<img>` | `srcSet`, which React Native reads itself, by **density only** (`1x`, `2x`, `3x`) |
|
|
48
|
+
| A picture to show instead | `defaultSource`, shown if the image **fails** | `defaultSource`, shown **while it loads** on iOS |
|
|
49
|
+
| `loading="lazy"` | the browser's | ignored |
|
|
50
|
+
|
|
51
|
+
Width descriptors (`800w`) are skipped on device with a runtime warning, and `sizes` is not read there, so the compiler warns about a `srcSet` written with them.
|
|
52
|
+
|
|
53
|
+
Not provided:
|
|
54
|
+
- **BlurHash:** decoding one needs a library, which is a dependency for the application to choose (`expo-image` on Native).
|
|
55
|
+
- **A `<Picture>` with format negotiation:** that is the server's or the CDN's job, done with `Accept`.
|
|
34
56
|
|
|
35
57
|
What each primitive compiles to on both platforms is generated into
|
|
36
58
|
[docs/primitives.md](https://github.com/iray-tno/hozo/blob/main/docs/primitives.md).
|
|
@@ -3,15 +3,15 @@ import * as ReactNative from 'react-native';
|
|
|
3
3
|
export type HozoFlatListProps<T> = ReactNative.FlatListProps<T>;
|
|
4
4
|
export type HozoFlatListHandle<T = unknown> = ReactNative.FlatList<T>;
|
|
5
5
|
/**
|
|
6
|
-
* React Native's `FlatList`, told
|
|
6
|
+
* React Native's `FlatList`, with each cell told where it sits.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
* rows near the viewport exist as
|
|
10
|
-
*
|
|
11
|
-
* `accessibilityCollection`, and
|
|
12
|
-
*
|
|
8
|
+
* It used to be told how long it was as well, which is the thing a windowed
|
|
9
|
+
* list cannot say for itself: only the rows near the viewport exist as
|
|
10
|
+
* views, so TalkBack counts those. On the Web the answer is `aria-setsize`.
|
|
11
|
+
* Here it was `accessibilityCollection`, and it is not set any more -- the
|
|
12
|
+
* note below the hooks says why, and what to put back.
|
|
13
13
|
*/
|
|
14
|
-
export declare
|
|
14
|
+
export declare function HozoFlatList<T>(props: HozoFlatListProps<T> & {
|
|
15
15
|
ref?: Ref<ReactNative.FlatList<T>>;
|
|
16
|
-
})
|
|
16
|
+
}): ReactElement;
|
|
17
17
|
//# sourceMappingURL=flat-list.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flat-list.native.d.ts","sourceRoot":"","sources":["../src/flat-list.native.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"flat-list.native.d.ts","sourceRoot":"","sources":["../src/flat-list.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,GAAG,EAAW,MAAM,OAAO,CAAA;AAC3E,OAAO,KAAK,WAAW,MAAM,cAAc,CAAA;AAO3C,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;AAC/D,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,OAAO,IAAI,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;AA8FrE;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,GACnE,YAAY,CAiEd"}
|
package/dist/flat-list.native.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElement,
|
|
1
|
+
import { createElement, useMemo } from 'react';
|
|
2
2
|
import * as ReactNative from 'react-native';
|
|
3
3
|
/**
|
|
4
4
|
* Android only, and that is not a preference.
|
|
@@ -47,43 +47,73 @@ function collectionCell(columns) {
|
|
|
47
47
|
}, children);
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
/**
|
|
51
|
+
* React Native's `FlatList`, with each cell told where it sits.
|
|
52
|
+
*
|
|
53
|
+
* It used to be told how long it was as well, which is the thing a windowed
|
|
54
|
+
* list cannot say for itself: only the rows near the viewport exist as
|
|
55
|
+
* views, so TalkBack counts those. On the Web the answer is `aria-setsize`.
|
|
56
|
+
* Here it was `accessibilityCollection`, and it is not set any more -- the
|
|
57
|
+
* note below the hooks says why, and what to put back.
|
|
58
|
+
*/
|
|
59
|
+
export function HozoFlatList(props) {
|
|
60
|
+
const { data, numColumns, CellRendererComponent, ref: forwardedRef, ...rest } = props;
|
|
52
61
|
const android = isAndroid();
|
|
53
62
|
const columns = Math.max(1, Math.floor(numColumns ?? 1));
|
|
54
|
-
const count = data?.length ?? 0;
|
|
55
63
|
// A component identity that only changes when the column count does. A
|
|
56
64
|
// fresh one every render would remount every cell in the list.
|
|
57
65
|
const cell = useMemo(() => collectionCell(columns), [columns]);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
// `accessibilityCollection` is not set, and the list no longer says how
|
|
67
|
+
// long it is. It used to, and a device heard it: "Button, In list Hozo
|
|
68
|
+
// native acceptance screen, 3 items".
|
|
69
|
+
//
|
|
70
|
+
// It crashes the app (#512). React Native's own delegate reads the tag
|
|
71
|
+
// this sets, then walks the content view's children reading each one's
|
|
72
|
+
// `accessibility_collection_item`:
|
|
73
|
+
//
|
|
74
|
+
// // ReactScrollViewAccessibilityDelegate.kt
|
|
75
|
+
// :56 view.getTag(R.id.accessibility_collection) as? ReadableMap ?: return
|
|
76
|
+
// :74 nextChild.getTag(R.id.accessibility_collection_item) as ReadableMap
|
|
77
|
+
// :88 nestedNextChild.getTag(R.id.accessibility_collection_item) as? ReadableMap
|
|
78
|
+
//
|
|
79
|
+
// Line 74 is the only one of the four reads in that file with a non-null
|
|
80
|
+
// cast, two lines above a comment describing the null it forbids. Any
|
|
81
|
+
// child without the tag throws `NullPointerException: null cannot be cast
|
|
82
|
+
// to non-null type ReadableMap`, and in a release build that is the
|
|
83
|
+
// process. Still unfixed on `main` and on `0.87-stable`.
|
|
84
|
+
//
|
|
85
|
+
// Not every child can have the tag. `VirtualizedList` pushes its own
|
|
86
|
+
// `<View key={`$spacer-…`} style={…} />` for the windowed-away regions,
|
|
87
|
+
// and a list header, footer or empty component is a plain child too. The
|
|
88
|
+
// spacers are the reason this cannot be narrowed to "lists without a
|
|
89
|
+
// header": any list long enough to window has them.
|
|
90
|
+
//
|
|
91
|
+
// Line 56 returns early when the tag is absent, so not setting it is what
|
|
92
|
+
// makes the rest unreachable. The cells keep their
|
|
93
|
+
// `accessibilityCollectionItem` -- `ReactAccessibilityDelegate.kt:107`
|
|
94
|
+
// reads that one as `as ReadableMap?` and is not part of this -- so
|
|
95
|
+
// restoring the announcement is putting this back:
|
|
96
|
+
//
|
|
97
|
+
// const collection: AndroidCollection | undefined = android
|
|
98
|
+
// ? {
|
|
99
|
+
// itemCount: count,
|
|
100
|
+
// rowCount: Math.ceil(count / columns),
|
|
101
|
+
// columnCount: columns,
|
|
102
|
+
// hierarchical: false,
|
|
103
|
+
// }
|
|
104
|
+
// : undefined
|
|
105
|
+
//
|
|
106
|
+
// and `accessibilityCollection: collection` below, once a React Native
|
|
107
|
+
// with `as?` on line 74 is the floor.
|
|
66
108
|
return createElement(ReactNative.FlatList, {
|
|
67
109
|
...rest,
|
|
68
110
|
data,
|
|
69
111
|
numColumns,
|
|
70
112
|
ref: forwardedRef,
|
|
71
|
-
accessibilityCollection: collection,
|
|
72
113
|
// The caller's own cell renderer wins. Composing would put one view
|
|
73
114
|
// inside another and hand the outer one the handlers the inner one
|
|
74
|
-
// needs; deferring means the
|
|
75
|
-
// the per-item position is left unsaid.
|
|
115
|
+
// needs; deferring means only the per-item position is left unsaid.
|
|
76
116
|
CellRendererComponent: CellRendererComponent ?? (android ? cell : undefined),
|
|
77
117
|
});
|
|
78
118
|
}
|
|
79
|
-
/**
|
|
80
|
-
* React Native's `FlatList`, told how long it is.
|
|
81
|
-
*
|
|
82
|
-
* A windowed list has a length its accessibility tree does not: only the
|
|
83
|
-
* rows near the viewport exist as views, so TalkBack counts those and
|
|
84
|
-
* announces them. On the Web the answer is `aria-setsize`; here it is
|
|
85
|
-
* `accessibilityCollection`, and neither is something an app should have to
|
|
86
|
-
* write itself when the list already knows.
|
|
87
|
-
*/
|
|
88
|
-
export const HozoFlatList = forwardRef(HozoFlatListInner);
|
|
89
119
|
//# sourceMappingURL=flat-list.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flat-list.native.js","sourceRoot":"","sources":["../src/flat-list.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"flat-list.native.js","sourceRoot":"","sources":["../src/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,OAAO,CAAC,CAAC,CAAA;IAE9D,wEAAwE;IACxE,uEAAuE;IACvE,sCAAsC;IACtC,EAAE;IACF,uEAAuE;IACvE,uEAAuE;IACvE,mCAAmC;IACnC,EAAE;IACF,+CAA+C;IAC/C,8EAA8E;IAC9E,6EAA6E;IAC7E,oFAAoF;IACpF,EAAE;IACF,yEAAyE;IACzE,sEAAsE;IACtE,0EAA0E;IAC1E,oEAAoE;IACpE,yDAAyD;IACzD,EAAE;IACF,qEAAqE;IACrE,wEAAwE;IACxE,yEAAyE;IACzE,qEAAqE;IACrE,oDAAoD;IACpD,EAAE;IACF,0EAA0E;IAC1E,mDAAmD;IACnD,uEAAuE;IACvE,oEAAoE;IACpE,mDAAmD;IACnD,EAAE;IACF,8DAA8D;IAC9D,UAAU;IACV,4BAA4B;IAC5B,gDAAgD;IAChD,gCAAgC;IAChC,+BAA+B;IAC/B,UAAU;IACV,kBAAkB;IAClB,EAAE;IACF,uEAAuE;IACvE,sCAAsC;IACtC,OAAO,aAAa,CAClB,WAAW,CAAC,QAA4B,EACxC;QACE,GAAG,IAAI;QACP,IAAI;QACJ,UAAU;QACV,GAAG,EAAE,YAAY;QACjB,oEAAoE;QACpE,mEAAmE;QACnE,oEAAoE;QACpE,qBAAqB,EACnB,qBAAqB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAE,IAAyB,CAAC,CAAC,CAAC,SAAS,CAAC;KACrE,CACX,CAAA;AACH,CAAC"}
|
package/dist/foundation.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HozoDomStyle, type ResponderProps } from '@hozo/engine';
|
|
2
|
-
import { type AriaRole, type CSSProperties, type MouseEventHandler, type ReactNode } from 'react';
|
|
2
|
+
import { type AriaRole, type CSSProperties, type MouseEventHandler, type ReactNode, type Ref } from 'react';
|
|
3
3
|
import { HozoPressable, type HozoPressableProps } from './pressable.ts';
|
|
4
4
|
import { HozoTextInput, type HozoTextInputProps } from './text-input.ts';
|
|
5
5
|
export type { HozoResponderEvent, HozoResponderTouch, HozoTouchHistory, HozoTouchTrack, ResponderProps, } from '@hozo/engine';
|
|
@@ -42,13 +42,15 @@ export interface UniversalProps {
|
|
|
42
42
|
export interface ViewProps extends UniversalProps, ResponderProps {
|
|
43
43
|
className?: string;
|
|
44
44
|
children?: ReactNode;
|
|
45
|
+
ref?: Ref<HTMLDivElement>;
|
|
45
46
|
}
|
|
46
|
-
export declare function View({ className, children, onLayout, ...universal }: ViewProps): import("react").JSX.Element;
|
|
47
|
+
export declare function View({ className, children, onLayout, ref, ...universal }: ViewProps): import("react").JSX.Element;
|
|
47
48
|
export interface TextProps extends UniversalProps {
|
|
48
49
|
className?: string;
|
|
49
50
|
children?: ReactNode;
|
|
51
|
+
ref?: Ref<HTMLSpanElement>;
|
|
50
52
|
}
|
|
51
|
-
export declare function Text({ className, children, onLayout, ...universal }: TextProps): import("react").JSX.Element;
|
|
53
|
+
export declare function Text({ className, children, onLayout, ref, ...universal }: TextProps): import("react").JSX.Element;
|
|
52
54
|
export interface ImageProps extends UniversalProps {
|
|
53
55
|
className?: string;
|
|
54
56
|
src: HozoImageSource;
|
|
@@ -57,13 +59,14 @@ export interface ImageProps extends UniversalProps {
|
|
|
57
59
|
accessibilityLabel?: string;
|
|
58
60
|
onLoad?: (event: unknown) => void;
|
|
59
61
|
onError?: (event: unknown) => void;
|
|
62
|
+
ref?: Ref<HTMLImageElement>;
|
|
60
63
|
}
|
|
61
64
|
export interface HozoImageSourceObject {
|
|
62
65
|
uri?: string;
|
|
63
66
|
default?: string;
|
|
64
67
|
}
|
|
65
68
|
export type HozoImageSource = string | number | HozoImageSourceObject | readonly HozoImageSourceObject[];
|
|
66
|
-
export declare function Image({ className, src, defaultSource, alt, accessibilityLabel, onLoad, onError, onLayout, ...universal }: ImageProps): import("react").JSX.Element;
|
|
69
|
+
export declare function Image({ className, src, defaultSource, alt, accessibilityLabel, onLoad, onError, onLayout, ref, ...universal }: ImageProps): import("react").JSX.Element;
|
|
67
70
|
export { HozoPressable as Pressable, type HozoPressableProps as PressableProps, HozoTextInput as TextInput, type HozoTextInputProps as TextInputProps, };
|
|
68
71
|
export interface LinkProps {
|
|
69
72
|
className?: string;
|
package/dist/foundation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foundation.d.ts","sourceRoot":"","sources":["../src/foundation.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"foundation.d.ts","sourceRoot":"","sources":["../src/foundation.tsx"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,YAAY,EAIjB,KAAK,cAAc,EAEpB,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,GAAG,EAKT,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAExE,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,cAAc,GACf,MAAM,cAAc,CAAA;AAErB,MAAM,WAAW,mBAAmB;IAClC,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE;QAAE,MAAM,EAAE,mBAAmB,CAAA;KAAE,CAAA;CAC7C;AAED,MAAM,MAAM,SAAS,GAAG,YAAY,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAA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EACT,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,MAAM,EACN,GAAG,EACH,QAAQ,EACR,MAAM,GACP,EAAE,WAAW,+BAwCb"}
|
package/dist/foundation.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// Canonical authored primitives. The compiler normally lowers these to a
|
|
3
3
|
// platform element, but these implementations keep uncompiled and partially
|
|
4
4
|
// compiled source useful instead of turning compilation into a runtime
|
|
5
5
|
// requirement.
|
|
6
|
-
import { hozoDomStyle, useResponderDomProps, } from '@hozo/engine';
|
|
7
|
-
import { useEffect, useRef, useState, } from 'react';
|
|
6
|
+
import { hozoDomStyle, hozoViewBase, hozoViewClassName, useResponderDomProps, } from '@hozo/engine';
|
|
7
|
+
import { useCallback, useEffect, useRef, useState, } from 'react';
|
|
8
8
|
import { HozoLink } from './link.js';
|
|
9
9
|
import { HozoPressable } from './pressable.js';
|
|
10
10
|
import { HozoTextInput } from './text-input.js';
|
|
@@ -32,8 +32,25 @@ function universalDomProps(props) {
|
|
|
32
32
|
'aria-description': props.accessibilityHint,
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
/**
|
|
36
|
+
* The element, for `onLayout` and the responder, and the caller's `ref` too.
|
|
37
|
+
*
|
|
38
|
+
* React Native's `View` takes a `ref`, and the compiled `<div>` passes one
|
|
39
|
+
* straight through. This fallback held its own ref for `onLayout` and gave
|
|
40
|
+
* the caller nothing, so whether `ref` worked depended on whether the
|
|
41
|
+
* compiler had run. `setRef` hands the node to both.
|
|
42
|
+
*/
|
|
43
|
+
function useLayoutRef(onLayout, forwarded) {
|
|
36
44
|
const elementRef = useRef(null);
|
|
45
|
+
// A new function only when the caller's ref changes, so React detaches the
|
|
46
|
+
// old one and attaches the new rather than re-running both every render.
|
|
47
|
+
const setRef = useCallback((node) => {
|
|
48
|
+
elementRef.current = node;
|
|
49
|
+
if (typeof forwarded === 'function')
|
|
50
|
+
forwarded(node);
|
|
51
|
+
else if (forwarded)
|
|
52
|
+
forwarded.current = node;
|
|
53
|
+
}, [forwarded]);
|
|
37
54
|
const callbackRef = useRef(onLayout);
|
|
38
55
|
callbackRef.current = onLayout;
|
|
39
56
|
useEffect(() => {
|
|
@@ -62,16 +79,16 @@ function useLayoutRef(onLayout) {
|
|
|
62
79
|
observer.observe(element);
|
|
63
80
|
return () => observer.disconnect();
|
|
64
81
|
}, []);
|
|
65
|
-
return elementRef;
|
|
82
|
+
return { elementRef, setRef };
|
|
66
83
|
}
|
|
67
|
-
export function View({ className, children, onLayout, ...universal }) {
|
|
68
|
-
const
|
|
69
|
-
const responder = useResponderDomProps(
|
|
70
|
-
return (_jsx("div", { ref:
|
|
84
|
+
export function View({ className, children, onLayout, ref, ...universal }) {
|
|
85
|
+
const { elementRef, setRef } = useLayoutRef(onLayout, ref);
|
|
86
|
+
const responder = useResponderDomProps(elementRef, universal);
|
|
87
|
+
return (_jsxs(_Fragment, { children: [hozoViewBase(), _jsx("div", { ref: setRef, className: hozoViewClassName(className), ...universalDomProps(universal), ...responder, children: children })] }));
|
|
71
88
|
}
|
|
72
|
-
export function Text({ className, children, onLayout, ...universal }) {
|
|
73
|
-
const
|
|
74
|
-
return (_jsx("span", { ref:
|
|
89
|
+
export function Text({ className, children, onLayout, ref, ...universal }) {
|
|
90
|
+
const { setRef } = useLayoutRef(onLayout, ref);
|
|
91
|
+
return (_jsx("span", { ref: setRef, className: className, ...universalDomProps(universal), children: children }));
|
|
75
92
|
}
|
|
76
93
|
function webImageSource(source) {
|
|
77
94
|
if (typeof source === 'string')
|
|
@@ -93,11 +110,11 @@ function webImageSource(source) {
|
|
|
93
110
|
? object.default
|
|
94
111
|
: undefined;
|
|
95
112
|
}
|
|
96
|
-
export function Image({ className, src, defaultSource, alt, accessibilityLabel, onLoad, onError, onLayout, ...universal }) {
|
|
97
|
-
const
|
|
113
|
+
export function Image({ className, src, defaultSource, alt, accessibilityLabel, onLoad, onError, onLayout, ref, ...universal }) {
|
|
114
|
+
const { setRef } = useLayoutRef(onLayout, ref);
|
|
98
115
|
const [failedSource, setFailedSource] = useState();
|
|
99
116
|
const webSrc = (failedSource === src ? undefined : webImageSource(src)) ?? webImageSource(defaultSource);
|
|
100
|
-
return (_jsx("img", { ref:
|
|
117
|
+
return (_jsx("img", { ref: setRef, className: className, src: webSrc, alt: alt ?? accessibilityLabel ?? '', onLoad: onLoad, onError: (event) => {
|
|
101
118
|
setFailedSource(src);
|
|
102
119
|
onError?.(event);
|
|
103
120
|
}, ...universalDomProps(universal) }));
|
|
@@ -110,6 +127,6 @@ export function Button({ className, children, onPress, disabled, accessibilityLa
|
|
|
110
127
|
if (href != null) {
|
|
111
128
|
return (_jsx(HozoLink, { href: href, external: external, replace: replace, prefetch: prefetch, target: target, rel: rel, download: download, className: className, accessibilityLabel: accessibilityLabel, accessibilityHint: accessibilityHint, disabled: disabled, testID: testID, onPress: onPress, children: children }));
|
|
112
129
|
}
|
|
113
|
-
return (_jsx("button", { type: "button", className: className, disabled: disabled, "data-hozo-disabled": disabled ? '' : undefined, "aria-label": accessibilityLabel, "aria-description": accessibilityHint, "data-testid": testID, onClick: onPress, children: children }));
|
|
130
|
+
return (_jsxs(_Fragment, { children: [hozoViewBase(), _jsx("button", { type: "button", className: className, disabled: disabled, "data-hozo-disabled": disabled ? '' : undefined, "data-hozo-pressable": onPress && !disabled ? '' : undefined, "aria-label": accessibilityLabel, "aria-description": accessibilityHint, "data-testid": testID, onClick: onPress, children: children })] }));
|
|
114
131
|
}
|
|
115
132
|
//# sourceMappingURL=foundation.js.map
|
package/dist/foundation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foundation.js","sourceRoot":"","sources":["../src/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AS,EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,iBAAiB,EAAE,iBAAiB,EACpC,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAA+C,YAEvD,QAAQ,GACA,CACZ,CAAA;IACH,CAAC;IACD,OAAO,CACL,8BACG,YAAY,EAAE,EACf,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,wBACE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,yBACxB,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,gBAC9C,kBAAkB,sBACZ,iBAAiB,iBACtB,MAAM,EACnB,OAAO,EAAE,OAA+C,YAEvD,QAAQ,GACF,IACR,CACJ,CAAA;AACH,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { type ReactNode } from 'react';
|
|
2
|
-
import { type AccessibilityRole, type PressableProps as RNPressableProps, type TextProps as RNTextProps, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
1
|
+
import React, { type ReactNode, type Ref } from 'react';
|
|
2
|
+
import { type AccessibilityRole, type HostInstance, type PressableProps as RNPressableProps, type TextProps as RNTextProps, type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
3
|
export type { HozoResponderEvent, HozoResponderTouch, HozoTouchHistory, HozoTouchTrack, ResponderProps, } from '@hozo/engine';
|
|
4
4
|
export type { ImageProps, TextInputProps, ViewProps, } from 'react-native';
|
|
5
5
|
export { Image, TextInput, View } from 'react-native';
|
|
@@ -7,6 +7,20 @@ export type { HozoImageSource, HozoImageSourceObject, HozoLayoutEvent, HozoLayou
|
|
|
7
7
|
export type TextProps = RNTextProps;
|
|
8
8
|
export declare function Text({ children, style, ...props }: TextProps): React.JSX.Element;
|
|
9
9
|
export interface PressableProps extends RNPressableProps {
|
|
10
|
+
/**
|
|
11
|
+
* The view this press target lands on.
|
|
12
|
+
*
|
|
13
|
+
* Declared rather than inherited, because React Native's own
|
|
14
|
+
* `PressableProps` does not carry it: the `ref` is on the *component*
|
|
15
|
+
* (`(props: Omit<PressableProps, 'ref'> & { ref?: Ref<PressableInstance> })`),
|
|
16
|
+
* so a wrapper whose props are `PressableProps` rejects one. It is spread
|
|
17
|
+
* through to `RNPressable` below either way -- this only stops TypeScript
|
|
18
|
+
* refusing what already worked.
|
|
19
|
+
*
|
|
20
|
+
* A caller needs it to hand the control to something else: `Dialog`'s
|
|
21
|
+
* `restoreFocusTo` is where this came up (#462).
|
|
22
|
+
*/
|
|
23
|
+
ref?: Ref<HostInstance>;
|
|
10
24
|
href?: string;
|
|
11
25
|
external?: boolean;
|
|
12
26
|
replace?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foundation.native.d.ts","sourceRoot":"","sources":["../src/foundation.native.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAsB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"foundation.native.d.ts","sourceRoot":"","sources":["../src/foundation.native.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAsB,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3E,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAEjB,KAAK,cAAc,IAAI,gBAAgB,EAEvC,KAAK,SAAS,IAAI,WAAW,EAC7B,KAAK,SAAS,EAEd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAA;AAGrB,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,cAAc,GACf,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,UAAU,EACV,cAAc,EACd,SAAS,GACV,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,KAAK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wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,KAAK,EACL,MAAM,GACP,EAAE,WAAW,qBA+Bb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"foundation.native.js","sourceRoot":"","sources":["../src/foundation.native.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"foundation.native.js","sourceRoot":"","sources":["../src/foundation.native.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,EAAgD,MAAM,OAAO,CAAA;AAC3E,OAAO,EAGL,SAAS,IAAI,WAAW,EAExB,IAAI,IAAI,MAAM,EAGd,UAAU,GAGX,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAmB,CAAA;AAc5C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAYrD,MAAM,UAAU,IAAI,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAa;IAC3D,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAA;IAChD,MAAM,IAAI,GAAG,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,QAAQ,CAAC,CAAA;IACvE,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,IAAI,CAAA;IACnC,OAAO,KAAC,mBAAmB,C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;QACrE,KAAK;QACL,MAAM;KACP,CAAA;IACD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,MAAM,UAAU,GAAG,QAElB,CAAA;QACD,OAAO,CACL,KAAC,UAAU,IACT,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,KACZ,MAAM,YAET,QAAQ,GACE,CACd,CAAA;IACH,CAAC;IACD,OAAO,CACL,KAAC,WAAW,IAAC,iBAAiB,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,KAAM,MAAM,YACjE,gBAAgB,CAAC,QAAQ,CAAC,GACf,CACf,CAAA;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { type HTMLAttributes, type ReactElement, type ReactNode, type Ref } from
|
|
|
3
3
|
import type { HozoLayoutEvent } from './foundation.tsx';
|
|
4
4
|
import { type MaintainVisibleContentPosition } from './windowing.ts';
|
|
5
5
|
export * from './foundation.tsx';
|
|
6
|
+
export { Presence, type PresenceProps } from './presence.tsx';
|
|
6
7
|
export interface HozoScrollEvent {
|
|
7
8
|
nativeEvent: {
|
|
8
9
|
contentOffset: {
|
|
@@ -85,8 +86,10 @@ interface SharedScrollableProps extends Omit<HTMLAttributes<HTMLDivElement>, 'ch
|
|
|
85
86
|
snapToEnd?: boolean;
|
|
86
87
|
}
|
|
87
88
|
export interface HozoScrollViewProps extends SharedScrollableProps {
|
|
89
|
+
/** Declared here, because React 19 takes `ref` as an ordinary prop. */
|
|
90
|
+
ref?: Ref<HTMLDivElement>;
|
|
88
91
|
}
|
|
89
|
-
export declare
|
|
92
|
+
export declare function HozoScrollView({ ref: forwardedRef, children, className, style, contentContainerStyle, horizontal, refreshing, onRefresh, refreshControl, showsVerticalScrollIndicator, showsHorizontalScrollIndicator, onScroll, scrollEventThrottle, onScrollBeginDrag, onScrollEndDrag, onMomentumScrollEnd, onContentSizeChange, onLayout, testID, nativeID, pointerEvents, accessibilityLabel, accessibilityHint, accessibilityRole, accessibilityState, accessibilityValue, accessibilityLiveRegion, keyboardShouldPersistTaps: _keyboardShouldPersistTaps, stickyHeaderIndices: _stickyHeaderIndices, contentInsetAdjustmentBehavior: _contentInsetAdjustmentBehavior, automaticallyAdjustKeyboardInsets: _automaticallyAdjustKeyboardInsets, bounces: _bounces, pagingEnabled: _pagingEnabled, directionalLockEnabled: _directionalLockEnabled, nestedScrollEnabled: _nestedScrollEnabled, alwaysBounceVertical: _alwaysBounceVertical, overScrollMode: _overScrollMode, snapToOffsets: _snapToOffsets, snapToEnd: _snapToEnd, onPointerDown, onPointerDownCapture, onPointerMove, onPointerMoveCapture, onPointerUp, onPointerCancel, onLostPointerCapture, onStartShouldSetResponder, onStartShouldSetResponderCapture, onMoveShouldSetResponder, onMoveShouldSetResponderCapture, onResponderGrant, onResponderStart, onResponderMove, onResponderEnd, onResponderRelease, onResponderReject, onResponderTerminate, onResponderTerminationRequest, ...domProps }: HozoScrollViewProps): ReactElement;
|
|
90
93
|
export interface HozoFlatListRenderInfo<T> {
|
|
91
94
|
item: T;
|
|
92
95
|
index: number;
|
|
@@ -178,9 +181,9 @@ export interface HozoFlatListHandle extends HTMLDivElement {
|
|
|
178
181
|
viewOffset?: number;
|
|
179
182
|
}): void;
|
|
180
183
|
}
|
|
181
|
-
export declare
|
|
184
|
+
export declare function HozoFlatList<T>(props: HozoFlatListProps<T> & {
|
|
182
185
|
ref?: Ref<HozoFlatListHandle>;
|
|
183
|
-
})
|
|
186
|
+
}): import("react").FunctionComponentElement<HozoScrollViewProps>;
|
|
184
187
|
export { HozoFlatList as FlatList, HozoScrollView as ScrollView };
|
|
185
188
|
export type FlatListRenderInfo<T> = HozoFlatListRenderInfo<T>;
|
|
186
189
|
export type FlatListProps<T> = HozoFlatListProps<T>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,cAAc,EAEpB,MAAM,cAAc,CAAA;AACrB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,cAAc,EAEpB,MAAM,cAAc,CAAA;AACrB,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,GAAG,EAOT,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,EAKL,KAAK,8BAA8B,EAGpC,MAAM,gBAAgB,CAAA;AAEvB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE7D,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE;QACX,aAAa,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;QACvC,WAAW,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAA;QAC9C,iBAAiB,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAA;KACrD,CAAA;CACF;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,uFAAuF;AACvF,wBAAgB,kBAAkB,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,uBA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MG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kEAAkE;IAClE,8BAA8B,CAAC,EAAE,8BAA8B,CAAA;IAC/D;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD,cAAc,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;IACrE,WAAW,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;IACnD,aAAa,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACzF;AASD,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,kBAAkB,CAAC,CAAA;CAAE,iEAmmB9F;AAED,OAAO,EAAE,YAAY,IAAI,QAAQ,EAAE,cAAc,IAAI,UAAU,EAAE,CAAA;AACjE,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAAA;AAC7D,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,CAAA;AACnD,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { hozoDomStyle, useResponderDomProps, } from '@hozo/engine';
|
|
2
|
-
import { createElement,
|
|
2
|
+
import { createElement, isValidElement, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, } from 'react';
|
|
3
3
|
import { anchorRow, initialRange, ListMetrics, windowRange, withFocus, } from './windowing.js';
|
|
4
4
|
export * from './foundation.js';
|
|
5
|
+
export { Presence } from './presence.js';
|
|
5
6
|
/** A portable refresh intent. Hozo lists consume it; standalone use stays operable. */
|
|
6
7
|
export function HozoRefreshControl({ refreshing, onRefresh }) {
|
|
7
8
|
return createElement('button', {
|
|
@@ -78,7 +79,7 @@ function useMeasurements(rootRef, contentRef, onLayout, onContentSizeChange) {
|
|
|
78
79
|
return () => observer.disconnect();
|
|
79
80
|
}, [rootRef, contentRef]);
|
|
80
81
|
}
|
|
81
|
-
export
|
|
82
|
+
export function HozoScrollView({ ref: forwardedRef, children, className, style, contentContainerStyle, horizontal, refreshing, onRefresh, refreshControl, showsVerticalScrollIndicator = true, showsHorizontalScrollIndicator = true, onScroll, scrollEventThrottle = 0, onScrollBeginDrag, onScrollEndDrag, onMomentumScrollEnd, onContentSizeChange, onLayout, testID, nativeID, pointerEvents, accessibilityLabel, accessibilityHint, accessibilityRole, accessibilityState, accessibilityValue, accessibilityLiveRegion, keyboardShouldPersistTaps: _keyboardShouldPersistTaps, stickyHeaderIndices: _stickyHeaderIndices, contentInsetAdjustmentBehavior: _contentInsetAdjustmentBehavior, automaticallyAdjustKeyboardInsets: _automaticallyAdjustKeyboardInsets, bounces: _bounces, pagingEnabled: _pagingEnabled, directionalLockEnabled: _directionalLockEnabled, nestedScrollEnabled: _nestedScrollEnabled, alwaysBounceVertical: _alwaysBounceVertical, overScrollMode: _overScrollMode, snapToOffsets: _snapToOffsets, snapToEnd: _snapToEnd, onPointerDown, onPointerDownCapture, onPointerMove, onPointerMoveCapture, onPointerUp, onPointerCancel, onLostPointerCapture, onStartShouldSetResponder, onStartShouldSetResponderCapture, onMoveShouldSetResponder, onMoveShouldSetResponderCapture, onResponderGrant, onResponderStart, onResponderMove, onResponderEnd, onResponderRelease, onResponderReject, onResponderTerminate, onResponderTerminationRequest, ...domProps }) {
|
|
82
83
|
const rootRef = useRef(null);
|
|
83
84
|
const contentRef = useRef(null);
|
|
84
85
|
const lastScroll = useRef(0);
|
|
@@ -106,9 +107,7 @@ export const HozoScrollView = forwardRef(function HozoScrollView({ children, cla
|
|
|
106
107
|
const nestedRefresh = refreshProps(refreshControl);
|
|
107
108
|
const activeRefreshing = refreshing ?? nestedRefresh?.refreshing ?? false;
|
|
108
109
|
const activeRefresh = onRefresh ?? nestedRefresh?.onRefresh;
|
|
109
|
-
const hideScrollbar = horizontal
|
|
110
|
-
? !showsHorizontalScrollIndicator
|
|
111
|
-
: !showsVerticalScrollIndicator;
|
|
110
|
+
const hideScrollbar = horizontal ? !showsHorizontalScrollIndicator : !showsVerticalScrollIndicator;
|
|
112
111
|
const viewport = horizontal
|
|
113
112
|
? { overflowX: 'auto', overflowY: 'hidden' }
|
|
114
113
|
: { overflowX: 'hidden', overflowY: 'auto' };
|
|
@@ -204,14 +203,14 @@ export const HozoScrollView = forwardRef(function HozoScrollView({ children, cla
|
|
|
204
203
|
onRefresh: activeRefresh,
|
|
205
204
|
})
|
|
206
205
|
: null, createElement('div', { ref: contentRef, style: hozoDomStyle(contentContainerStyle) }, children));
|
|
207
|
-
}
|
|
206
|
+
}
|
|
208
207
|
const separators = { highlight() { }, unhighlight() { }, updateProps() { } };
|
|
209
208
|
/** The mirror `inverted` applies, in React Native's own spelling. */
|
|
210
209
|
function invertedTransform(horizontal) {
|
|
211
210
|
return horizontal ? [{ scaleX: -1 }] : [{ scaleY: -1 }];
|
|
212
211
|
}
|
|
213
|
-
function
|
|
214
|
-
const { data = [], renderItem, keyExtractor, ListHeaderComponent, ListFooterComponent, ListEmptyComponent, ItemSeparatorComponent, numColumns = 1, horizontal, inverted, contentContainerStyle, style, onEndReached,
|
|
212
|
+
export function HozoFlatList(props) {
|
|
213
|
+
const { ref: forwardedRef, data = [], renderItem, keyExtractor, ListHeaderComponent, ListFooterComponent, ListEmptyComponent, ItemSeparatorComponent, numColumns = 1, horizontal, inverted, contentContainerStyle, style, onEndReached,
|
|
215
214
|
// React Native's default, read from `VirtualizedListProps`. This file
|
|
216
215
|
// used to default it to 0, which asks for the callback only once the
|
|
217
216
|
// very last pixel is on screen.
|
|
@@ -713,6 +712,5 @@ function HozoFlatListInner(props, forwardedRef) {
|
|
|
713
712
|
}, mounted)
|
|
714
713
|
: null, slot(renderSlot(ListFooterComponent)), createElement('div', { ref: endRef, 'aria-hidden': true }));
|
|
715
714
|
}
|
|
716
|
-
export const HozoFlatList = forwardRef(HozoFlatListInner);
|
|
717
715
|
export { HozoFlatList as FlatList, HozoScrollView as ScrollView };
|
|
718
716
|
//# sourceMappingURL=index.js.map
|