@symbiote-native/components 0.2.4 → 0.2.6
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/build/index.js +2 -2
- package/build/state/scroll-routing-handle/index.d.ts +10 -0
- package/build/state/scroll-routing-handle/index.js +6 -0
- package/build/view/layout-event/index.d.ts +2 -0
- package/build/view/layout-event/index.js +12 -0
- package/build/view/{render-image.d.ts → render-image/index.d.ts} +2 -2
- package/build/view/{render-image.js → render-image/index.js} +1 -1
- package/build/view/render-image-background.js +1 -1
- package/build/view/{render-pressable.d.ts → render-pressable/index.d.ts} +2 -2
- package/package.json +7 -7
- /package/build/{bootstrap.d.ts → bootstrap/index.d.ts} +0 -0
- /package/build/{bootstrap.js → bootstrap/index.js} +0 -0
- /package/build/view/{render-pressable.js → render-pressable/index.js} +0 -0
package/build/index.js
CHANGED
|
@@ -24,7 +24,7 @@ export { switchReducer, createInitialSwitchState, shouldSnapBack, valueFromChang
|
|
|
24
24
|
export { resolveDecelerationRate, selectScrollIntrinsics, readLayoutDimension, didContentSizeChange, SCROLL_VIEW_BASE_HORIZONTAL, SCROLL_VIEW_BASE_VERTICAL, } from './view/render-scroll-view.js';
|
|
25
25
|
export { buildScrollViewHandle, splitLayoutProps, attachStickyScroll, isSymbioteEvent, forwardScrollEvent, } from './scroll-view-commands.js';
|
|
26
26
|
export { computeStickyInterpolation, nextStickyHeaderY, stickyDebounceMs, readLayoutNumber, STICKY_HEADER_Z_INDEX, } from './view/render-scroll-sticky.js';
|
|
27
|
-
export { renderImage } from './view/render-image.js';
|
|
27
|
+
export { renderImage } from './view/render-image/index.js';
|
|
28
28
|
export { imageStatics, setImageSourceResolver } from '@symbiote-native/engine';
|
|
29
29
|
// ImageBackground: render-only composition (absolute-fill image behind, children on top).
|
|
30
30
|
export { renderImageBackground } from './view/render-image-background.js';
|
|
@@ -40,7 +40,7 @@ export { computeInset, readKeyboardFrame, readLayoutFrame, resolveKeyboardAvoidi
|
|
|
40
40
|
// accessibilityState + ripple render decisions in view/render-pressable. Every adapter supplies
|
|
41
41
|
// only its reactive `pressed` cell + the View's measure handle (see the 3-layer split).
|
|
42
42
|
export { createPressHandlers, createPressRuntime, normalizeRect, maxEdge, isTouchWithinRegion, readPoint, computeRegion, rippleProps, DEFAULT_DELAY_LONG_PRESS_MS, DEFAULT_PRESS_RECT_OFFSETS, } from './state/pressable.js';
|
|
43
|
-
export { buildPressableListeners, resolveDisabledAccessibilityState, noteHoverNoop, shouldSuppressPress, shouldClaimResponder, isTerminationAllowed, } from './view/render-pressable.js';
|
|
43
|
+
export { buildPressableListeners, resolveDisabledAccessibilityState, noteHoverNoop, shouldSuppressPress, shouldClaimResponder, isTerminationAllowed, } from './view/render-pressable/index.js';
|
|
44
44
|
// Touchable*: shared press-timing constants + the deactivation-floor math (the Animated feedback
|
|
45
45
|
// itself stays per-adapter), and TouchableNativeFeedback's pure static factories + background map.
|
|
46
46
|
export { computePressOutWait, DEFAULT_ACTIVE_OPACITY, OPACITY_ACTIVE_DURATION_MS, OPACITY_INACTIVE_DURATION_MS, RESTING_OPACITY, DEFAULT_HIGHLIGHT_CHILD_OPACITY, DEFAULT_UNDERLAY_COLOR, DEFAULT_MIN_PRESS_DURATION_MS, } from './state/touchable.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ISymbioteNode } from '@symbiote-native/engine';
|
|
2
|
+
import type { IScrollViewHandle } from '../../scroll-view-commands';
|
|
3
|
+
export interface IScrollRoutingHandle {
|
|
4
|
+
flashScrollIndicators(): void;
|
|
5
|
+
getNativeScrollRef(): IScrollViewHandle | null;
|
|
6
|
+
getScrollableNode(): IScrollViewHandle | null;
|
|
7
|
+
getScrollResponder(): IScrollViewHandle | null;
|
|
8
|
+
getScrollNode(): ISymbioteNode | null;
|
|
9
|
+
recordInteraction(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// The inner-scroll routing tail every windowed-list imperative handle exposes
|
|
2
|
+
// (VirtualizedList, VirtualizedSectionList, and via those FlatList/SectionList). Each
|
|
3
|
+
// method forwards straight to the underlying ScrollView's own handle/node; neither list
|
|
4
|
+
// adds behavior of its own, so the 6 members live here once and both list handle types
|
|
5
|
+
// extend this instead of hand-duplicating (and risking drift in) the signatures.
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Shared across render-scroll-view's content/frame dimension read (width/height) and
|
|
2
|
+
// render-scroll-sticky's header position read (y/height): both pull a single numeric field out of
|
|
3
|
+
// an onLayout event's nativeEvent.layout. SymbioteEvent.nativeEvent is Record<string, unknown>, so
|
|
4
|
+
// the layout box and the requested field are narrowed at runtime, no cast. A malformed event
|
|
5
|
+
// yields undefined (no-op).
|
|
6
|
+
export function readLayoutField(event, key) {
|
|
7
|
+
const layout = event.nativeEvent.layout;
|
|
8
|
+
if (typeof layout !== 'object' || layout === null)
|
|
9
|
+
return undefined;
|
|
10
|
+
const value = Reflect.get(layout, key);
|
|
11
|
+
return typeof value === 'number' ? value : undefined;
|
|
12
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type IImageSource, type IImageSourceProp, type IStyleProp, type ISymbioteEvent, type IViewStyle } from '@symbiote-native/engine';
|
|
2
|
-
import type { IAccessibilityProps, IAriaProps } from '
|
|
3
|
-
import { type IDescriptor } from '
|
|
2
|
+
import type { IAccessibilityProps, IAriaProps } from '../../accessibility-props';
|
|
3
|
+
import { type IDescriptor } from '../../descriptor';
|
|
4
4
|
export type { IImageSource, IImageSourceProp };
|
|
5
5
|
type IImageEventHandler = (event: ISymbioteEvent) => void;
|
|
6
6
|
export type IResizeMode = 'cover' | 'contain' | 'stretch' | 'repeat' | 'center';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { dlog, flattenStyle, resolveImageSource, } from '@symbiote-native/engine';
|
|
2
|
-
import { el } from '
|
|
2
|
+
import { el } from '../../descriptor.js';
|
|
3
3
|
// Resolve the source, then normalize to the array shape native expects. A single
|
|
4
4
|
// object/number becomes a one-element array; an already-array source passes through.
|
|
5
5
|
function normalizeSource(source) {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// the box. `imageStyle` wins last.
|
|
11
11
|
import { dlog, flattenStyle, } from '@symbiote-native/engine';
|
|
12
12
|
import { el } from '../descriptor.js';
|
|
13
|
-
import { renderImage } from './render-image.js';
|
|
13
|
+
import { renderImage } from './render-image/index.js';
|
|
14
14
|
// The inner Image's positioning: absolute-fill behind the wrapper's children.
|
|
15
15
|
const IMAGE_BACKGROUND_ABSOLUTE_FILL = {
|
|
16
16
|
position: 'absolute',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IAccessibilityStateValue } from '
|
|
2
|
-
import type { IPressHandlers } from '
|
|
1
|
+
import type { IAccessibilityStateValue } from '../../accessibility-props';
|
|
2
|
+
import type { IPressHandlers } from '../../state/pressable';
|
|
3
3
|
export declare function resolveDisabledAccessibilityState(accessibilityState: IAccessibilityStateValue | undefined, disabled: boolean | undefined): IAccessibilityStateValue | undefined;
|
|
4
4
|
export declare function shouldSuppressPress(disabled: boolean | undefined): boolean;
|
|
5
5
|
export declare function shouldClaimResponder(disabled: boolean | undefined): boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/components",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Framework-agnostic component logic (state machines + render functions) for SymbioteNative — written once, inherited by every adapter (React, Vue, Angular, ...).",
|
|
5
|
+
"license": "MIT",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
7
8
|
"url": "git+https://github.com/OneEyed1366/symbiote-native.git",
|
|
@@ -22,8 +23,8 @@
|
|
|
22
23
|
"default": "./build/index.js"
|
|
23
24
|
},
|
|
24
25
|
"./bootstrap": {
|
|
25
|
-
"types": "./build/bootstrap.d.ts",
|
|
26
|
-
"default": "./build/bootstrap.js"
|
|
26
|
+
"types": "./build/bootstrap/index.d.ts",
|
|
27
|
+
"default": "./build/bootstrap/index.js"
|
|
27
28
|
}
|
|
28
29
|
},
|
|
29
30
|
"files": [
|
|
@@ -32,14 +33,13 @@
|
|
|
32
33
|
"publishConfig": {
|
|
33
34
|
"access": "public"
|
|
34
35
|
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"@symbiote-native/engine": "0.1.5"
|
|
37
|
-
},
|
|
38
36
|
"peerDependencies": {
|
|
37
|
+
"@symbiote-native/engine": ">=0.1.7",
|
|
39
38
|
"react-native": ">=0.86"
|
|
40
39
|
},
|
|
41
40
|
"devDependencies": {
|
|
42
|
-
"@types/node": "^26.0.0"
|
|
41
|
+
"@types/node": "^26.0.0",
|
|
42
|
+
"@symbiote-native/engine": "0.1.7"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"typecheck": "tsc --build",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|