@symbiote-native/components 0.4.0 → 0.5.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/README.md +10 -2
- package/build/accessibility-props.js +2 -1
- package/build/bootstrap/index.js +1 -1
- package/build/component-names/index.android.js +1 -1
- package/build/component-names/index.ios.js +1 -1
- package/build/component-names/shared.js +4 -1
- package/build/descriptor.d.ts +8 -0
- package/build/descriptor.js +27 -0
- package/build/index.d.ts +19 -11
- package/build/index.js +12 -5
- package/build/state/pressable.js +13 -3
- package/build/state/sticky-header-reducer.js +28 -5
- package/build/state/switch.js +1 -1
- package/build/state/text-input.d.ts +2 -1
- package/build/state/text-input.js +35 -8
- package/build/state/touchable.d.ts +30 -1
- package/build/state/touchable.js +94 -5
- package/build/state/virtualized-list-diagnostics.d.ts +31 -0
- package/build/state/virtualized-list-diagnostics.js +33 -0
- package/build/state/virtualized-list-reducer.d.ts +14 -0
- package/build/state/virtualized-list-reducer.js +179 -45
- package/build/state/virtualized-list.d.ts +5 -2
- package/build/state/virtualized-list.js +143 -34
- package/build/text-props.d.ts +9 -0
- package/build/text-props.js +24 -0
- package/build/view/render-activity-indicator.js +11 -3
- package/build/view/render-image/index.js +13 -3
- package/build/view/render-input-accessory-view.js +5 -2
- package/build/view/render-keyboard-avoiding-view.d.ts +14 -2
- package/build/view/render-keyboard-avoiding-view.js +52 -6
- package/build/view/render-modal.js +4 -2
- package/build/view/render-pressable/index.js +3 -1
- package/build/view/render-scroll-sticky.js +1 -1
- package/build/view/render-scroll-view.js +9 -3
- package/build/view/render-switch.js +4 -1
- package/build/view/render-touchable-highlight.d.ts +11 -1
- package/build/view/render-touchable-highlight.js +11 -10
- package/build/view/render-touchable-native-feedback.js +5 -1
- package/package.json +2 -2
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// TouchableHighlight underlay: the shared render decision (framework-agnostic). RN drives the
|
|
2
|
-
// highlight with setState
|
|
3
|
-
// opacity
|
|
4
|
-
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
// highlight with setState, not Animated — while shown it paints underlayColor and lowers the child
|
|
3
|
+
// opacity; at rest it is the bare style (TouchableHighlight.js).
|
|
4
|
+
import { DEFAULT_HIGHLIGHT_CHILD_OPACITY, DEFAULT_UNDERLAY_COLOR, } from '../state/touchable.js';
|
|
5
|
+
// undefined = paint nothing extra, which is RN's `extraStyles: null` state.
|
|
6
|
+
export function resolveHighlightExtraStyles(view) {
|
|
7
|
+
if (!view.shown || !view.hasPressHandler)
|
|
8
|
+
return undefined;
|
|
9
|
+
return {
|
|
10
|
+
underlay: { backgroundColor: view.underlayColor ?? DEFAULT_UNDERLAY_COLOR },
|
|
11
|
+
child: { opacity: view.activeOpacity ?? DEFAULT_HIGHLIGHT_CHILD_OPACITY },
|
|
12
|
+
};
|
|
12
13
|
}
|
|
@@ -14,7 +14,11 @@ export function canUseNativeForeground() {
|
|
|
14
14
|
Platform.Version >= ANDROID_FOREGROUND_MIN_VERSION);
|
|
15
15
|
}
|
|
16
16
|
export function selectableBackground(rippleRadius) {
|
|
17
|
-
return {
|
|
17
|
+
return {
|
|
18
|
+
type: 'ThemeAttrAndroid',
|
|
19
|
+
attribute: 'selectableItemBackground',
|
|
20
|
+
rippleRadius,
|
|
21
|
+
};
|
|
18
22
|
}
|
|
19
23
|
export function selectableBackgroundBorderless(rippleRadius) {
|
|
20
24
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Framework-agnostic component logic (state machines + render functions) for SymbioteNative — written once, inherited by every adapter (React, Vue, Angular, ...).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^26.0.0",
|
|
42
|
-
"@symbiote-native/engine": "0.
|
|
42
|
+
"@symbiote-native/engine": "0.3.0"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"typecheck": "tsc --build",
|