@gjsify/react-native 0.45.0 → 0.46.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/PROPS.md +525 -0
- package/README.md +45 -163
- package/SUPPORT.md +472 -0
- package/lib/esm/accessor.js +1 -0
- package/lib/esm/animated/brand.js +1 -0
- package/lib/esm/animated/easing.js +1 -0
- package/lib/esm/animated/index.js +1 -0
- package/lib/esm/animated/properties.js +1 -0
- package/lib/esm/animated/timing.js +1 -0
- package/lib/esm/animated/value.js +1 -0
- package/lib/esm/announce.js +1 -0
- package/lib/esm/app-registry.js +1 -1
- package/lib/esm/components.js +1 -1
- package/lib/esm/generated/own-exports.js +1 -1
- package/lib/esm/generated/unsupported-async-storage.js +0 -0
- package/lib/esm/generated/unsupported-expo-audio.js +1 -0
- package/lib/esm/generated/unsupported-expo-constants.js +1 -0
- package/lib/esm/generated/unsupported-expo-font.js +1 -0
- package/lib/esm/generated/unsupported-expo-image.js +1 -0
- package/lib/esm/generated/unsupported-expo-linking.js +1 -0
- package/lib/esm/generated/unsupported-expo-splash-screen.js +1 -0
- package/lib/esm/generated/unsupported-expo-status-bar.js +1 -0
- package/lib/esm/generated/unsupported-expo-system-ui.js +1 -0
- package/lib/esm/generated/unsupported-expo-video.js +1 -0
- package/lib/esm/generated/unsupported-expo-web-browser.js +1 -0
- package/lib/esm/generated/unsupported-nativewind.js +1 -0
- package/lib/esm/generated/unsupported-react-native-gesture-handler.js +1 -0
- package/lib/esm/generated/unsupported-react-native-safe-area-context.js +1 -0
- package/lib/esm/generated/unsupported-react-native-webview.js +1 -0
- package/lib/esm/generated/unsupported-react-native.js +1 -0
- package/lib/esm/generated/unsupported-router.js +1 -0
- package/lib/esm/generated/unsupported-vector-icons.js +1 -0
- package/lib/esm/index.js +1 -1
- package/lib/esm/lists/controller.js +1 -1
- package/lib/esm/primitives/answers.js +1 -0
- package/lib/esm/primitives/defaults.js +1 -0
- package/lib/esm/primitives/errors.js +1 -1
- package/lib/esm/primitives/handles.js +1 -0
- package/lib/esm/primitives/index.js +1 -1
- package/lib/esm/primitives/intents.js +1 -1
- package/lib/esm/primitives/resolve.js +1 -1
- package/lib/esm/primitives/style.js +1 -1
- package/lib/esm/primitives/table.js +1 -1
- package/lib/esm/prop-table.js +1 -0
- package/lib/esm/router/href.js +1 -0
- package/lib/esm/router/index.js +1 -1
- package/lib/esm/router/navigation.js +1 -1
- package/lib/esm/router/tabs.js +1 -1
- package/lib/esm/solid/index.js +1 -1
- package/lib/esm/stylesheet.js +1 -1
- package/lib/esm/support-table.js +1 -1
- package/lib/esm/surfaces/async-storage.js +1 -0
- package/lib/esm/surfaces/expo-audio.js +1 -0
- package/lib/esm/surfaces/expo-constants.js +1 -0
- package/lib/esm/surfaces/expo-font.js +1 -0
- package/lib/esm/surfaces/expo-image.js +1 -0
- package/lib/esm/surfaces/expo-linking.js +1 -0
- package/lib/esm/surfaces/expo-splash-screen.js +1 -0
- package/lib/esm/surfaces/expo-status-bar.js +1 -0
- package/lib/esm/surfaces/expo-system-ui.js +1 -0
- package/lib/esm/surfaces/expo-video.js +1 -0
- package/lib/esm/surfaces/expo-web-browser.js +1 -0
- package/lib/esm/surfaces/icon-map.js +1 -0
- package/lib/esm/surfaces/nativewind.js +1 -0
- package/lib/esm/surfaces/react-native-gesture-handler.js +1 -0
- package/lib/esm/surfaces/react-native-safe-area-context.js +1 -0
- package/lib/esm/surfaces/react-native-webview.js +1 -0
- package/lib/esm/surfaces/vector-icons.js +1 -0
- package/lib/esm/unsupported.js +1 -1
- package/lib/types/accessor.d.ts +10 -0
- package/lib/types/animated/animated.spec.d.ts +2 -0
- package/lib/types/animated/brand.d.ts +8 -0
- package/lib/types/animated/easing.d.ts +70 -0
- package/lib/types/animated/easing.spec.d.ts +2 -0
- package/lib/types/animated/index.d.ts +55 -0
- package/lib/types/animated/properties.d.ts +33 -0
- package/lib/types/animated/timing.d.ts +37 -0
- package/lib/types/animated/value.d.ts +103 -0
- package/lib/types/announce.d.ts +18 -0
- package/lib/types/components.d.ts +82 -3
- package/lib/types/generated/unsupported-async-storage.d.ts +1 -0
- package/lib/types/generated/unsupported-expo-audio.d.ts +4 -0
- package/lib/types/generated/unsupported-expo-constants.d.ts +2 -0
- package/lib/types/generated/unsupported-expo-font.d.ts +4 -0
- package/lib/types/generated/unsupported-expo-image.d.ts +3 -0
- package/lib/types/generated/unsupported-expo-linking.d.ts +4 -0
- package/lib/types/generated/unsupported-expo-splash-screen.d.ts +5 -0
- package/lib/types/generated/unsupported-expo-status-bar.d.ts +5 -0
- package/lib/types/generated/unsupported-expo-system-ui.d.ts +2 -0
- package/lib/types/generated/unsupported-expo-video.d.ts +3 -0
- package/lib/types/generated/unsupported-expo-web-browser.d.ts +6 -0
- package/lib/types/generated/unsupported-nativewind.d.ts +5 -0
- package/lib/types/generated/unsupported-react-native-gesture-handler.d.ts +10 -0
- package/lib/types/generated/unsupported-react-native-safe-area-context.d.ts +4 -0
- package/lib/types/generated/unsupported-react-native-webview.d.ts +1 -0
- package/lib/types/generated/{unsupported-exports.d.ts → unsupported-react-native.d.ts} +0 -2
- package/lib/types/generated/unsupported-vector-icons.d.ts +11 -0
- package/lib/types/index.d.ts +5 -1
- package/lib/types/primitives/answers.d.ts +69 -0
- package/lib/types/primitives/defaults.d.ts +52 -0
- package/lib/types/primitives/defaults.spec.d.ts +2 -0
- package/lib/types/primitives/errors.d.ts +9 -0
- package/lib/types/primitives/handles.d.ts +56 -0
- package/lib/types/primitives/index.d.ts +8 -2
- package/lib/types/primitives/intents.d.ts +36 -0
- package/lib/types/primitives/resolve.d.ts +25 -1
- package/lib/types/primitives/table.d.ts +63 -1
- package/lib/types/prop-table.d.ts +56 -0
- package/lib/types/prop-table.spec.d.ts +2 -0
- package/lib/types/router/href.d.ts +58 -0
- package/lib/types/router/href.spec.d.ts +2 -0
- package/lib/types/router/index.d.ts +3 -1
- package/lib/types/router/navigation.d.ts +47 -5
- package/lib/types/router/tabs.d.ts +35 -0
- package/lib/types/solid/index.d.ts +15 -1
- package/lib/types/support-table.d.ts +79 -10
- package/lib/types/surfaces/async-storage.d.ts +57 -0
- package/lib/types/surfaces/expo-audio.d.ts +1 -0
- package/lib/types/surfaces/expo-constants.d.ts +11 -0
- package/lib/types/surfaces/expo-font.d.ts +34 -0
- package/lib/types/surfaces/expo-image.d.ts +1 -0
- package/lib/types/surfaces/expo-linking.d.ts +36 -0
- package/lib/types/surfaces/expo-splash-screen.d.ts +1 -0
- package/lib/types/surfaces/expo-status-bar.d.ts +16 -0
- package/lib/types/surfaces/expo-system-ui.d.ts +1 -0
- package/lib/types/surfaces/expo-video.d.ts +1 -0
- package/lib/types/surfaces/expo-web-browser.d.ts +21 -0
- package/lib/types/surfaces/icon-map.d.ts +14 -0
- package/lib/types/surfaces/nativewind.d.ts +1 -0
- package/lib/types/surfaces/react-native-gesture-handler.d.ts +10 -0
- package/lib/types/surfaces/react-native-safe-area-context.d.ts +60 -0
- package/lib/types/surfaces/react-native-webview.d.ts +4 -0
- package/lib/types/surfaces/surfaces.spec.d.ts +2 -0
- package/lib/types/surfaces/vector-icons.d.ts +15 -0
- package/lib/types/unsupported.d.ts +12 -3
- package/package.json +85 -14
- package/lib/esm/generated/unsupported-exports.js +0 -1
- package/lib/esm/generated/unsupported-router-exports.js +0 -1
- /package/lib/types/generated/{unsupported-router-exports.d.ts → unsupported-router.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unsupported as e}from"../unsupported.js";const t=e(`Image`,`expo-image`),n=e(`ImageBackground`,`expo-image`),r=e(`useImage`,`expo-image`);export{t as Image,n as ImageBackground,r as useImage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unsupported as e}from"../unsupported.js";const t=e(`createURL`,`expo-linking`),n=e(`addEventListener`,`expo-linking`),r=e(`openSettings`,`expo-linking`),i=e(`sendIntent`,`expo-linking`);export{n as addEventListener,t as createURL,r as openSettings,i as sendIntent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unsupported as e}from"../unsupported.js";const t=e(`preventAutoHideAsync`,`expo-splash-screen`),n=e(`hideAsync`,`expo-splash-screen`),r=e(`hide`,`expo-splash-screen`),i=e(`preventAutoHide`,`expo-splash-screen`),a=e(`setOptions`,`expo-splash-screen`);export{r as hide,n as hideAsync,i as preventAutoHide,t as preventAutoHideAsync,a as setOptions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unsupported as e}from"../unsupported.js";const t=e(`setStatusBarStyle`,`expo-status-bar`),n=e(`setStatusBarHidden`,`expo-status-bar`),r=e(`setStatusBarBackgroundColor`,`expo-status-bar`),i=e(`setStatusBarTranslucent`,`expo-status-bar`),a=e(`setStatusBarNetworkActivityIndicatorVisible`,`expo-status-bar`);export{r as setStatusBarBackgroundColor,n as setStatusBarHidden,a as setStatusBarNetworkActivityIndicatorVisible,t as setStatusBarStyle,i as setStatusBarTranslucent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unsupported as e}from"../unsupported.js";const t=e(`setBackgroundColorAsync`,`expo-system-ui`),n=e(`getBackgroundColorAsync`,`expo-system-ui`);export{n as getBackgroundColorAsync,t as setBackgroundColorAsync};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unsupported as e}from"../unsupported.js";const t=e(`VideoView`,`expo-video`),n=e(`useVideoPlayer`,`expo-video`),r=e(`VideoContentFit`,`expo-video`);export{r as VideoContentFit,t as VideoView,n as useVideoPlayer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unsupported as e}from"../unsupported.js";const t=e(`dismissBrowser`,`expo-web-browser`),n=e(`openAuthSessionAsync`,`expo-web-browser`),r=e(`dismissAuthSession`,`expo-web-browser`),i=e(`maybeCompleteAuthSession`,`expo-web-browser`),a=e(`warmUpAsync`,`expo-web-browser`),o=e(`coolDownAsync`,`expo-web-browser`);export{o as coolDownAsync,r as dismissAuthSession,t as dismissBrowser,i as maybeCompleteAuthSession,n as openAuthSessionAsync,a as warmUpAsync};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unsupported as e}from"../unsupported.js";const t=e(`cssInterop`,`nativewind`),n=e(`remapProps`,`nativewind`),r=e(`styled`,`nativewind`),i=e(`vars`,`nativewind`),a=e(`useColorScheme`,`nativewind`);export{t as cssInterop,n as remapProps,r as styled,a as useColorScheme,i as vars};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unsupported as e}from"../unsupported.js";const t=e(`Gesture`,`react-native-gesture-handler`),n=e(`GestureDetector`,`react-native-gesture-handler`),r=e(`PanGestureHandler`,`react-native-gesture-handler`),i=e(`TapGestureHandler`,`react-native-gesture-handler`),a=e(`LongPressGestureHandler`,`react-native-gesture-handler`),o=e(`PinchGestureHandler`,`react-native-gesture-handler`),s=e(`Swipeable`,`react-native-gesture-handler`),c=e(`ScrollView`,`react-native-gesture-handler`),l=e(`Directions`,`react-native-gesture-handler`),u=e(`State`,`react-native-gesture-handler`);export{l as Directions,t as Gesture,n as GestureDetector,a as LongPressGestureHandler,r as PanGestureHandler,o as PinchGestureHandler,c as ScrollView,u as State,s as Swipeable,i as TapGestureHandler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unsupported as e}from"../unsupported.js";const t=e(`SafeAreaInsetsContext`,`react-native-safe-area-context`),n=e(`SafeAreaFrameContext`,`react-native-safe-area-context`),r=e(`withSafeAreaInsets`,`react-native-safe-area-context`),i=e(`SafeAreaConsumer`,`react-native-safe-area-context`);export{i as SafeAreaConsumer,n as SafeAreaFrameContext,t as SafeAreaInsetsContext,r as withSafeAreaInsets};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unsupported as e}from"../unsupported.js";const t=e(`WebView`,`react-native-webview`);export{t as WebView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unsupported as e}from"../unsupported.js";const t=e(`Modal`,`react-native`),n=e(`RefreshControl`,`react-native`),r=e(`AppState`,`react-native`),i=e(`PixelRatio`,`react-native`),a=e(`PlatformColor`,`react-native`),o=e(`AccessibilityInfo`,`react-native`),s=e(`LayoutAnimation`,`react-native`),c=e(`InteractionManager`,`react-native`),l=e(`useAnimatedValue`,`react-native`),u=e(`useAnimatedValueXY`,`react-native`),d=e(`useAnimatedColor`,`react-native`),f=e(`PanResponder`,`react-native`),p=e(`usePressability`,`react-native`),m=e(`DrawerLayoutAndroid`,`react-native`),h=e(`I18nManager`,`react-native`),g=e(`LogBox`,`react-native`),_=e(`Systrace`,`react-native`),v=e(`Vibration`,`react-native`),y=e(`ToastAndroid`,`react-native`),b=e(`InputAccessoryView`,`react-native`),x=e(`TouchableNativeFeedback`,`react-native`),S=e(`ActionSheetIOS`,`react-native`),C=e(`PushNotificationIOS`,`react-native`),w=e(`PermissionsAndroid`,`react-native`),T=e(`Settings`,`react-native`),E=e(`Clipboard`,`react-native`),D=e(`BackHandler`,`react-native`),O=e(`DynamicColorIOS`,`react-native`),k=e(`processColor`,`react-native`),A=e(`UTFSequence`,`react-native`),j=e(`experimental_LayoutConformance`,`react-native`),M=e(`unstable_VirtualView`,`react-native`),N=e(`VirtualViewMode`,`react-native`),P=e(`unstable_NativeText`,`react-native`),F=e(`unstable_NativeView`,`react-native`),I=e(`unstable_TextAncestorContext`,`react-native`),L=e(`ReactNativeVersion`,`react-native`),R=e(`DeviceInfo`,`react-native`),z=e(`DevMenu`,`react-native`),B=e(`DevSettings`,`react-native`),V=e(`NativeModules`,`react-native`),H=e(`TurboModuleRegistry`,`react-native`),U=e(`NativeComponentRegistry`,`react-native`),W=e(`requireNativeComponent`,`react-native`),G=e(`codegenNativeComponent`,`react-native`),K=e(`codegenNativeCommands`,`react-native`),q=e(`UIManager`,`react-native`),J=e(`findNodeHandle`,`react-native`),Y=e(`registerCallableModule`,`react-native`),X=e(`Networking`,`react-native`),Z=e(`NativeDialogManagerAndroid`,`react-native`),Q=e(`ProgressBarAndroid`,`react-native`),$=e(`Touchable`,`react-native`),ee=e(`NativeEventEmitter`,`react-native`),te=e(`DeviceEventEmitter`,`react-native`),ne=e(`NativeAppEventEmitter`,`react-native`),re=e(`RootTagContext`,`react-native`);export{o as AccessibilityInfo,S as ActionSheetIOS,r as AppState,D as BackHandler,E as Clipboard,z as DevMenu,B as DevSettings,te as DeviceEventEmitter,R as DeviceInfo,m as DrawerLayoutAndroid,O as DynamicColorIOS,h as I18nManager,b as InputAccessoryView,c as InteractionManager,s as LayoutAnimation,g as LogBox,t as Modal,ne as NativeAppEventEmitter,U as NativeComponentRegistry,Z as NativeDialogManagerAndroid,ee as NativeEventEmitter,V as NativeModules,X as Networking,f as PanResponder,w as PermissionsAndroid,i as PixelRatio,a as PlatformColor,Q as ProgressBarAndroid,C as PushNotificationIOS,L as ReactNativeVersion,n as RefreshControl,re as RootTagContext,T as Settings,_ as Systrace,y as ToastAndroid,$ as Touchable,x as TouchableNativeFeedback,H as TurboModuleRegistry,q as UIManager,A as UTFSequence,v as Vibration,N as VirtualViewMode,K as codegenNativeCommands,G as codegenNativeComponent,j as experimental_LayoutConformance,J as findNodeHandle,k as processColor,Y as registerCallableModule,W as requireNativeComponent,P as unstable_NativeText,F as unstable_NativeView,I as unstable_TextAncestorContext,M as unstable_VirtualView,d as useAnimatedColor,l as useAnimatedValue,u as useAnimatedValueXY,p as usePressability};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unsupported as e}from"../unsupported.js";const t=e(`Link`,`expo-router`),n=e(`Redirect`,`expo-router`),r=e(`Slot`,`expo-router`),i=e(`useRouter`,`expo-router`),a=e(`useSegments`,`expo-router`),o=e(`useGlobalSearchParams`,`expo-router`),s=e(`useNavigation`,`expo-router`),c=e(`useFocusEffect`,`expo-router`),l=e(`useRootNavigationState`,`expo-router`),u=e(`Drawer`,`expo-router`),d=e(`withLayoutContext`,`expo-router`),f=e(`Navigator`,`expo-router`),p=e(`ErrorBoundary`,`expo-router`),m=e(`ExpoRoot`,`expo-router`),h=e(`useUnstableGlobalHref`,`expo-router`),g=e(`useNavigationContainerRef`,`expo-router`),_=e(`SplashScreen`,`expo-router`);export{u as Drawer,p as ErrorBoundary,m as ExpoRoot,t as Link,f as Navigator,n as Redirect,r as Slot,_ as SplashScreen,c as useFocusEffect,o as useGlobalSearchParams,s as useNavigation,g as useNavigationContainerRef,l as useRootNavigationState,i as useRouter,a as useSegments,h as useUnstableGlobalHref,d as withLayoutContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{unsupported as e}from"../unsupported.js";const t=e(`MaterialIcons`,`@expo/vector-icons`),n=e(`MaterialCommunityIcons`,`@expo/vector-icons`),r=e(`FontAwesome`,`@expo/vector-icons`),i=e(`Feather`,`@expo/vector-icons`),a=e(`AntDesign`,`@expo/vector-icons`),o=e(`Entypo`,`@expo/vector-icons`),s=e(`Octicons`,`@expo/vector-icons`),c=e(`SimpleLineIcons`,`@expo/vector-icons`),l=e(`createIconSet`,`@expo/vector-icons`),u=e(`createIconSetFromFontello`,`@expo/vector-icons`),d=e(`createIconSetFromIcoMoon`,`@expo/vector-icons`);export{a as AntDesign,o as Entypo,i as Feather,r as FontAwesome,n as MaterialCommunityIcons,t as MaterialIcons,s as Octicons,c as SimpleLineIcons,l as createIconSet,u as createIconSetFromFontello,d as createIconSetFromIcoMoon};
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";import{PrimitiveError as e}from"./primitives/errors.js";import{
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{PrimitiveError as e}from"./primitives/errors.js";import{Easing as t}from"./animated/easing.js";import{configureStyle as n,resetStyleConfig as r,styleConfig as i}from"./style-config.js";import{ActivityIndicator as a,Button as o,Image as s,ImageBackground as c,KeyboardAvoidingView as l,Pressable as u,SafeAreaView as d,ScrollView as f,StatusBar as p,Switch as m,Text as h,TextInput as g,TouchableHighlight as _,TouchableOpacity as v,TouchableWithoutFeedback as y,View as b}from"./components.js";import{Animated as x}from"./animated/index.js";import{Alert as S}from"./apis/alert.js";import{Appearance as C}from"./apis/appearance.js";import{Dimensions as w}from"./apis/dimensions.js";import{Keyboard as T}from"./apis/keyboard.js";import{Linking as E}from"./apis/linking.js";import{Platform as D}from"./apis/platform.js";import{Share as O}from"./apis/share.js";import"./apis/index.js";import{OWN_EXPORT_NAMES as k}from"./generated/own-exports.js";import{SUPPORTED_NAMES as A,SUPPORT_TABLE as j,explainUnsupported as M,isImportable as N,isOwnExport as P}from"./support-table.js";import{UnsupportedError as F}from"./unsupported.js";import{AppRegistry as I,registerRootComponent as L}from"./app-registry.js";import{EventEmitter as R}from"./event-emitter.js";import{AccessibilityInfo as z,ActionSheetIOS as B,AppState as V,BackHandler as H,Clipboard as U,DevMenu as W,DevSettings as G,DeviceEventEmitter as K,DeviceInfo as q,DrawerLayoutAndroid as J,DynamicColorIOS as Y,I18nManager as X,InputAccessoryView as Z,InteractionManager as Q,LayoutAnimation as $,LogBox as ee,Modal as te,NativeAppEventEmitter as ne,NativeComponentRegistry as re,NativeDialogManagerAndroid as ie,NativeEventEmitter as ae,NativeModules as oe,Networking as se,PanResponder as ce,PermissionsAndroid as le,PixelRatio as ue,PlatformColor as de,ProgressBarAndroid as fe,PushNotificationIOS as pe,ReactNativeVersion as me,RefreshControl as he,RootTagContext as ge,Settings as _e,Systrace as ve,ToastAndroid as ye,Touchable as be,TouchableNativeFeedback as xe,TurboModuleRegistry as Se,UIManager as Ce,UTFSequence as we,Vibration as Te,VirtualViewMode as Ee,codegenNativeCommands as De,codegenNativeComponent as Oe,experimental_LayoutConformance as ke,findNodeHandle as Ae,processColor as je,registerCallableModule as Me,requireNativeComponent as Ne,unstable_NativeText as Pe,unstable_NativeView as Fe,unstable_TextAncestorContext as Ie,unstable_VirtualView as Le,useAnimatedColor as Re,useAnimatedValue as ze,useAnimatedValueXY as Be,usePressability as Ve}from"./generated/unsupported-react-native.js";import{useColorScheme as He,useWindowDimensions as Ue}from"./hooks.js";import{FlatList as We,SectionList as Ge,VirtualizedList as Ke,VirtualizedSectionList as qe}from"./lists/components.js";import{StyleSheet as Je}from"./stylesheet.js";import{primitives_exports as Ye}from"./primitives/index.js";import{PRIMITIVE_VARIANTS as Xe,acceptsProp as Ze,explainProp as Qe,propAnswer as $e,propNames as et,propTable as tt}from"./prop-table.js";function unstable_batchedUpdates(e,t){return e(t)}export{z as AccessibilityInfo,B as ActionSheetIOS,a as ActivityIndicator,S as Alert,x as Animated,I as AppRegistry,V as AppState,C as Appearance,H as BackHandler,o as Button,U as Clipboard,W as DevMenu,G as DevSettings,K as DeviceEventEmitter,q as DeviceInfo,w as Dimensions,J as DrawerLayoutAndroid,Y as DynamicColorIOS,t as Easing,R as EventEmitter,We as FlatList,X as I18nManager,s as Image,c as ImageBackground,Z as InputAccessoryView,Q as InteractionManager,T as Keyboard,l as KeyboardAvoidingView,$ as LayoutAnimation,E as Linking,ee as LogBox,te as Modal,ne as NativeAppEventEmitter,re as NativeComponentRegistry,ie as NativeDialogManagerAndroid,ae as NativeEventEmitter,oe as NativeModules,se as Networking,k as OWN_EXPORT_NAMES,Xe as PRIMITIVE_VARIANTS,ce as PanResponder,le as PermissionsAndroid,ue as PixelRatio,D as Platform,de as PlatformColor,u as Pressable,e as PrimitiveError,fe as ProgressBarAndroid,pe as PushNotificationIOS,me as ReactNativeVersion,he as RefreshControl,ge as RootTagContext,A as SUPPORTED_NAMES,j as SUPPORT_TABLE,d as SafeAreaView,f as ScrollView,Ge as SectionList,_e as Settings,O as Share,p as StatusBar,Je as StyleSheet,m as Switch,ve as Systrace,h as Text,g as TextInput,ye as ToastAndroid,be as Touchable,_ as TouchableHighlight,xe as TouchableNativeFeedback,v as TouchableOpacity,y as TouchableWithoutFeedback,Se as TurboModuleRegistry,Ce as UIManager,we as UTFSequence,F as UnsupportedError,Te as Vibration,b as View,Ee as VirtualViewMode,Ke as VirtualizedList,qe as VirtualizedSectionList,Ze as acceptsProp,De as codegenNativeCommands,Oe as codegenNativeComponent,n as configureStyle,ke as experimental_LayoutConformance,Qe as explainProp,M as explainUnsupported,Ae as findNodeHandle,N as isImportable,P as isOwnExport,Ye as primitives,je as processColor,$e as propAnswer,et as propNames,tt as propTable,Me as registerCallableModule,L as registerRootComponent,Ne as requireNativeComponent,r as resetStyleConfig,i as styleConfig,Pe as unstable_NativeText,Fe as unstable_NativeView,Ie as unstable_TextAncestorContext,Le as unstable_VirtualView,unstable_batchedUpdates,Re as useAnimatedColor,ze as useAnimatedValue,Be as useAnimatedValueXY,He as useColorScheme,Ve as usePressability,Ue as useWindowDimensions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{ParentProvider as e}from"../parent-context.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{ParentProvider as e}from"../parent-context.js";import{createElement as t}from"react";import{createRoot as n}from"@gjsify/gtk-host/react";import{adopt as r,createElement as i,insert as a,widgetOf as o}from"@gjsify/gtk-host";import{ListController as s,onScrollNearEnd as c}from"@gjsify/gtk-host/list";const l={orientation:`vertical`,props:{},overlay:!1},RowBody=({row:e})=>e.render();function reactRows(s){let c=new Map,u=[],d=!1,schedule=()=>{d||(d=!0,queueMicrotask(()=>{d=!1;let e=[...c];c.clear();for(let[t,n]of e)t.render(n);let t=u.splice(0,u.length);for(let e of t)e.unmount()}))};return{mountRow(e){let t=i(`GtkBox`,{orientation:`vertical`});a(t,r(e));let c=s.onRowError;return n(o(t),c===void 0?{}:{onUncaughtError:c})},showRow(n,r){c.set(n,r===null?null:t(e,{value:l},t(RowBody,{row:r}))),schedule()},disposeRow(e){c.delete(e),u.push(e),schedule()}}}function createListController(e={}){return new s(reactRows(e))}function rowKey(e,t,n){if(n!==void 0)return n(e,t);if(typeof e==`object`&&e){let t=e;if(typeof t.key==`string`)return t.key;if(typeof t.id==`string`||typeof t.id==`number`)return String(t.id)}return String(t)}export{createListController,c as onScrollNearEnd,rowKey};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";const isAccepted=e=>e!==`refused`&&e!==`unknown`,unknownPropDetail=e=>`is not a prop this primitive answers for. It takes: ${Object.keys(e.props).sort().join(`, `)}. An unlisted prop is refused rather than dropped: a prop that silently does nothing is indistinguishable from a bug in the application, forever`,unknownPrimitiveDetail=e=>`is not a primitive this layer answers for. Known: ${[...e].sort().join(`, `)}`;function answerForRoute(e){switch(e.to){case`property`:return{status:`property`,why:``,gtk:e.names};case`style-property`:return{status:`style`,why:``,gtk:[`style: ${e.name}`]};case`event`:return{status:`event`,why:``,gtk:[e.signal]};case`file`:return{status:`file`,why:``,gtk:[e.property]};case`gesture`:return{status:`gesture`,why:``,gtk:[`Gtk.GestureClick::${e.signal}`]};case`announce`:return{status:`announcement`,why:``,gtk:[e.signal,`Gtk.Accessible.announce()`]};case`ignored`:return{status:`ignored`,why:e.why,gtk:[]};case`refused`:return{status:`refused`,why:e.why,gtk:[]}}}function answerFor(e,t,n,r){if(t.refusesStyle!==void 0&&(n===`style`||n===`className`))return{primitive:e,prop:n,status:`refused`,why:t.refusesStyle,gtk:[]};if(r.has(n))return{primitive:e,prop:n,status:`framework`,why:``,gtk:[]};let i=t.props[n];if(i===void 0)return{primitive:e,prop:n,status:`unknown`,why:unknownPropDetail(t),gtk:[]};let a=(Array.isArray(i)?i:[i]).map(answerForRoute),o=a[0];return{primitive:e,prop:n,status:o.status,why:o.why,gtk:a.flatMap(e=>e.gtk)}}function propNamesOf(e){return Object.keys(e.props).sort()}export{answerFor,isAccepted,propNamesOf,unknownPrimitiveDetail,unknownPropDetail};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";const e=[{gtype:`GtkBox`,property:`orientation`,gtk:`horizontal`,reactNative:`column`,source:"Yoga’s own default — `ReactCommon/yoga/yoga/style/Style.h`: `FlexDirection::Column`. CSS defaults to `row`; React Native deliberately does not.",verdict:`normalised`,normalisedTo:`vertical`,reason:`The first inversion this layer met, and the loudest: a screen written as a column would have come out as a row.`},{gtype:`GtkBox`,property:`spacing`,gtk:0,reactNative:"0 (`gap` is unset)",source:`Yoga: an unset gap is 0.`,verdict:`agrees`,reason:`Nothing to do.`},{gtype:`GtkBox`,property:`homogeneous`,gtk:!1,reactNative:`no counterpart — children are sized by flex`,source:`Yoga has no "all children equal" mode.`,verdict:`agrees`,reason:"GTK’s `false` is what a flex container does, so the absent concept and the default coincide."},{gtype:`GtkLabel`,property:`wrap`,gtk:!1,reactNative:`text wraps`,source:"React Native’s `<Text>` wraps unless `numberOfLines` says otherwise.",verdict:`normalised`,normalisedTo:!0,reason:`Without it a long line forces the window wider instead of wrapping — which reads as a layout bug anywhere but here.`},{gtype:`GtkLabel`,property:`xalign`,gtk:.5,reactNative:`the script’s natural alignment — start, i.e. left in LTR`,source:'`ReactCommon/react/renderer/attributedstring/TextAttributes.h`: `std::optional<TextAlignment> alignment{}` is UNSET by default, and `primitives.h` documents `TextAlignment::Natural` as "the default alignment for script". Observed in a 25-route port: every string on every screen rendered centred.',verdict:`normalised`,normalisedTo:0,reason:"MEASURED as a position, not as a property: a `Gtk.Label` allocated 400×100 reports `get_layout_offsets()` = (193, 41) with GTK’s defaults and (0, 0) with xalign/yalign 0. Nothing anywhere reports the difference."},{gtype:`GtkLabel`,property:`yalign`,gtk:.5,reactNative:`the top of the text’s box`,source:"The same unset `alignment`; vertical centring is `textAlignVertical`/`verticalAlign`, which is also unset. Same layout-offset measurement as `xalign` — the 41 in (193, 41) is this one.",verdict:`normalised`,normalisedTo:0,reason:"Only visible when the label is given more height than its text — a `flex-1` or an explicit height — which is exactly when it is hardest to attribute."},{gtype:`GtkLabel`,property:`justify`,gtk:`left`,reactNative:`natural, i.e. left in LTR`,source:"As `xalign`: unset means natural.",verdict:`agrees`,reason:"GTK’s enum default already is the LTR answer. It is `xalign` that positions the BLOCK and this that positions the lines within it, which is why only one of the pair was wrong."},{gtype:`GtkLabel`,property:`ellipsize`,gtk:`none`,reactNative:"no truncation until `numberOfLines` is set",source:"React Native applies `ellipsizeMode` only together with `numberOfLines`.",verdict:`agrees`,reason:`Both truncate nothing until asked.`},{gtype:`GtkLabel`,property:`selectable`,gtk:!1,reactNative:"`selectable` defaults to false",source:"React Native’s `TextProps`.",verdict:`agrees`,reason:`Nothing to do.`},{gtype:`GtkTextView`,property:`wrap-mode`,gtk:`none`,reactNative:`a multiline input wraps`,source:"React Native’s multiline `TextInput` wraps, as `<Text>` does.",verdict:`normalised`,normalisedTo:`word-char`,reason:"The same disagreement as `Gtk.Label:wrap`, one widget over: without it the field scrolls sideways for ever."},{gtype:`GtkTextView`,property:`editable`,gtk:!0,reactNative:"`editable` defaults to true",source:"React Native’s `TextInputProps`.",verdict:`agrees`,reason:`Nothing to do.`},{gtype:`GtkPicture`,property:`content-fit`,gtk:`contain`,reactNative:`cover`,source:"React Native’s `Image` defaults `resizeMode` to `cover`.",verdict:`normalised`,normalisedTo:`cover`,reason:`Inverted between the two platforms, and an image that fits where it should fill looks deliberate.`},{gtype:`GtkScrolledWindow`,property:`hscrollbar-policy`,gtk:`automatic`,reactNative:"vertical only — `horizontal` defaults to false",source:"React Native’s `ScrollViewProps`.",verdict:`normalised`,normalisedTo:`never`,reason:`GTK would scroll sideways as well, which is a second scroll axis the author did not ask for.`},{gtype:`GtkScrolledWindow`,property:`vexpand`,gtk:!1,reactNative:"`flexGrow` 0, as for any widget",source:"Yoga: an unset `flexGrow` is 0.",verdict:`primitive`,reason:"`FlatList` writes it on its scroller, and it is a layout decision rather than a default: the scroller is one of up to three children of the outer box and it is the one that takes the leftover space, because a header and a footer are their own natural height."},{gtype:`GtkScrolledWindow`,property:`hexpand`,gtk:!1,reactNative:"`flexGrow` 0, as for any widget",source:"Yoga: an unset `flexGrow` is 0.",verdict:`primitive`,reason:"As `vexpand`, one axis over — `FlatList`’s scroller fills its box."},{gtype:`GtkScrolledWindow`,property:`kinetic-scrolling`,gtk:!0,reactNative:`no counterpart on a desktop`,source:`—`,verdict:`kept`,reason:`Touch-and-flick scrolling is GTK’s own behaviour on a touchscreen and costs nothing with a mouse. Turning it off would remove a desktop affordance to match a phone API that does not describe it.`},{gtype:`GtkEntry`,property:`has-frame`,gtk:!0,reactNative:`unstyled — a bare text field with no border`,source:"React Native’s `TextInput` draws no chrome of its own on either platform.",verdict:`kept`,reason:`DELIBERATE, and the one row here that is a design choice rather than a match: an Adwaita entry without its frame is not a text field a desktop user recognises. The divergence is visible, which is what separates it from the silent ones — an author sees the frame immediately and can remove it from the stylesheet.`},{gtype:`GtkEntry`,property:`visibility`,gtk:!0,reactNative:"`secureTextEntry` defaults to false",source:"React Native’s `TextInputProps`.",verdict:`agrees`,reason:`Nothing to do.`},{gtype:`GtkSwitch`,property:`active`,gtk:!1,reactNative:"`value` defaults to false",source:"React Native’s `SwitchProps`.",verdict:`agrees`,reason:`Nothing to do.`},{gtype:`GtkWidget`,property:`halign`,gtk:`fill`,reactNative:`stretch`,source:"Yoga’s own default — `ReactCommon/yoga/yoga/style/Style.h`: `Align alignItems_ = Align::Stretch`.",verdict:`agrees`,reason:"GTK’s `fill` and CSS’s `stretch` are the same instruction under different words — `intents.ts` maps them to each other for the explicit case too."},{gtype:`GtkWidget`,property:`hexpand`,gtk:!1,reactNative:"`flexGrow` 0",source:"Yoga: an unset `flexGrow` is 0.",verdict:`agrees`,reason:"Neither grows until asked. `flex-1` is what asks, and `intents.ts` resolves it against the PARENT’s axis."},{gtype:`GtkWidget`,property:`opacity`,gtk:1,reactNative:`1`,source:`React Native’s style default.`,verdict:`agrees`,reason:"Nothing to do. `Animated.View` writes this property, which is why it is worth having checked."},{gtype:`GtkWidget`,property:`overflow`,gtk:`visible`,reactNative:`visible`,source:"React Native’s `overflow` style default.",verdict:`agrees`,reason:`Nothing to do.`},{gtype:`GtkWidget`,property:`can-target`,gtk:!0,reactNative:"`pointerEvents` defaults to `auto`",source:"React Native’s `ViewProps`.",verdict:`agrees`,reason:`Nothing to do.`}],t=e.filter(e=>e.verdict===`normalised`),defaultRowFor=(t,n)=>e.find(e=>e.gtype===t&&e.property===n)??e.find(e=>e.gtype===`GtkWidget`&&e.property===n);export{e as DEFAULT_ROWS,t as NORMALISED_DEFAULTS,defaultRowFor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";const primitiveErrorMessage=(e,t,n)=>`@gjsify/react-native: <${e}>${t===``?``:` ${t}`} — ${n}`;var PrimitiveError=class extends Error{constructor(e,t,n){super(primitiveErrorMessage(e,t,n)),this.name=`PrimitiveError`,this.primitive=e,this.subject=t}};export{PrimitiveError,primitiveErrorMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{PrimitiveError as e}from"./errors.js";const t="reports a laid-out geometry, and GTK only has one after the widget has been allocated inside a window that is presented — before that every number is zero, which is indistinguishable from a real measurement of an empty widget. GTK’s counterpart is `Gtk.Widget.compute_bounds(target)`, a synchronous read rather than React Native’s callback, so wrapping it here would promise an ordering this layer cannot keep. Call it on `ref.current.widget` at a moment you know the widget is mapped",refuse=(t,n)=>{throw new e(`TextInput`,`ref.${t}()`,n)};function textInputHandle(e,n){let r=n===`GtkTextView`,buffer=()=>e.get_buffer(),entry=()=>e;return{widget:e,focus:()=>void e.grab_focus(),blur:()=>{let t=e.get_root();t!==null&&t.get_focus()===e&&t.set_focus(null)},clear:()=>{r?buffer().set_text(``,0):entry().set_text(``)},isFocused:()=>e.is_focus(),setSelection:(e,t)=>{if(r){let n=buffer();n.select_range(n.get_iter_at_offset(e),n.get_iter_at_offset(t))}else entry().select_region(e,t)},measure:()=>refuse(`measure`,t),measureInWindow:()=>refuse(`measureInWindow`,t),measureLayout:()=>refuse(`measureLayout`,t),setNativeProps:()=>refuse(`setNativeProps`,"is React Native’s escape hatch for writing straight to a native view, and there is nothing here for it to escape: `ref.current.widget` IS the `Gtk.Entry`/`Gtk.TextView`, and every GTK property is settable on it by its own name. A second spelling that took React Native prop names would be a second prop table beside `primitives/table.ts`")}}function createHandle(e,t,n){return e===null?t:textInputHandle(t,n)}export{createHandle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{PrimitiveError as t}from"./errors.js";import{
|
|
1
|
+
import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{PrimitiveError as t}from"./errors.js";import{createHandle as n}from"./handles.js";import{answerFor as r,isAccepted as i,propNamesOf as a,unknownPrimitiveDetail as o,unknownPropDetail as s}from"./answers.js";import{resolveIntent as c}from"./intents.js";import{splitVariants as l}from"./classes.js";import{flattenStyle as u,mintClass as d,normalise as f,variantDeclarations as p}from"./style.js";import{FRAMEWORK_PROPS as m,PRIMITIVES as h,PRIMITIVE_NAMES as g}from"./table.js";import{declaresAbsolute as _,resolvePrimitive as v}from"./resolve.js";import{DEFAULT_ROWS as y,NORMALISED_DEFAULTS as b,defaultRowFor as x}from"./defaults.js";var S=e({DEFAULT_ROWS:()=>y,FRAMEWORK_PROPS:()=>m,NORMALISED_DEFAULTS:()=>b,PRIMITIVES:()=>h,PRIMITIVE_NAMES:()=>g,PrimitiveError:()=>t,answerFor:()=>r,createHandle:()=>n,declaresAbsolute:()=>_,defaultRowFor:()=>x,flattenStyle:()=>u,isAccepted:()=>i,mintClass:()=>d,normalise:()=>f,propNamesOf:()=>a,resolveIntent:()=>c,resolvePrimitive:()=>v,splitVariants:()=>l,unknownPrimitiveDetail:()=>o,unknownPropDetail:()=>s,variantDeclarations:()=>p});export{y as DEFAULT_ROWS,m as FRAMEWORK_PROPS,b as NORMALISED_DEFAULTS,h as PRIMITIVES,g as PRIMITIVE_NAMES,t as PrimitiveError,r as answerFor,n as createHandle,_ as declaresAbsolute,x as defaultRowFor,u as flattenStyle,i as isAccepted,d as mintClass,f as normalise,S as primitives_exports,a as propNamesOf,c as resolveIntent,v as resolvePrimitive,l as splitVariants,o as unknownPrimitiveDetail,s as unknownPropDetail,p as variantDeclarations};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{PrimitiveError as e}from"./errors.js";const t={"flex-start":`start`,"flex-end":`end`,center:`center`,stretch:`fill`,baseline:`baseline`},n={"flex-start":`start`,"flex-end":`end`,center:`center`},r={left:{xalign:0,justify:`left`},center:{xalign:.5,justify:`center`},right:{xalign:1,justify:`right`},justify:{xalign:0,justify:`fill`}},cross=e=>e===`horizontal`?`valign`:`halign`,main=e=>e===`horizontal`?`halign`:`valign`;function resolveIntent(i){let{primitive:a,intent:o,orientation:s,widget:c,parent:l}=i,u={},d=[],f={},p={},m=null,h=l?.textAlign;if(o.alignChildren!==void 0){if(!c.box)throw new e(a,`items-*`,`aligns CHILDREN, and this primitive has none to align — the widget it becomes is not a box. Move the utility to the container`);f[cross(s)]=t[o.alignChildren]}if(o.distribute!==void 0){if(!c.box)throw new e(a,`justify-*`,`distributes CHILDREN along the main axis, and the widget this primitive becomes is not a box. Move the utility to the container`);let t=n[o.distribute];if(t===void 0)throw new e(a,`justify-${label(o.distribute)}`,"GTK's box has no main-axis justification, and ADR 0032 § 6's mapping for this one is `Gtk.CenterBox` — a different WIDGET, not another property on this one. The host's `slotted` policy used to be what blocked it, because it named a `remove` that gtk 4.22.4's `Gtk.CenterBox` does not install (it clears a slot with `set_center_widget(null)`); that block is gone, since `children.remove` is optional for a policy whose slots are all setters. What is missing is the CHILD COUNT — two or three children pick the widget, and this layer resolves properties for the widget it was handed, with no children to count. Spell the distribution with a spacer child (`flex-1`) or with `gap-*`");u[main(s)]=t}if(o.axisSpacing!==void 0){if(!c.box)throw new e(a,`gap-x-*/gap-y-*`,"is a `Gtk.Box:spacing`, and the widget this primitive becomes has none (measured, gtk-props.ts)");o.axisSpacing.axis===s&&(u.spacing=o.axisSpacing.pixels)}if(o.textAlign!==void 0&&(
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{PrimitiveError as e}from"./errors.js";const t={"flex-start":`start`,"flex-end":`end`,center:`center`,stretch:`fill`,baseline:`baseline`},n={"flex-start":`start`,"flex-end":`end`,center:`center`},r={left:{xalign:0,justify:`left`},center:{xalign:.5,justify:`center`},right:{xalign:1,justify:`right`},justify:{xalign:0,justify:`fill`}},cross=e=>e===`horizontal`?`valign`:`halign`,main=e=>e===`horizontal`?`halign`:`valign`;function resolveIntent(i){let{primitive:a,intent:o,orientation:s,widget:c,parent:l}=i,u={},d=[],f={},p={},m=null,h=null,g=l?.textAlign;if(o.alignChildren!==void 0){if(!c.box)throw new e(a,`items-*`,`aligns CHILDREN, and this primitive has none to align — the widget it becomes is not a box. Move the utility to the container`);f[cross(s)]=t[o.alignChildren]}if(o.distribute!==void 0){if(!c.box)throw new e(a,`justify-*`,`distributes CHILDREN along the main axis, and the widget this primitive becomes is not a box. Move the utility to the container`);let t=n[o.distribute];if(t===void 0)throw new e(a,`justify-${label(o.distribute)}`,"GTK's box has no main-axis justification, and ADR 0032 § 6's mapping for this one is `Gtk.CenterBox` — a different WIDGET, not another property on this one. The host's `slotted` policy used to be what blocked it, because it named a `remove` that gtk 4.22.4's `Gtk.CenterBox` does not install (it clears a slot with `set_center_widget(null)`); that block is gone, since `children.remove` is optional for a policy whose slots are all setters. What is missing is the CHILD COUNT — two or three children pick the widget, and this layer resolves properties for the widget it was handed, with no children to count. Spell the distribution with a spacer child (`flex-1`) or with `gap-*`");u[main(s)]=t}if(o.axisSpacing!==void 0){if(!c.box)throw new e(a,`gap-x-*/gap-y-*`,"is a `Gtk.Box:spacing`, and the widget this primitive becomes has none (measured, gtk-props.ts)");o.axisSpacing.axis===s&&(u.spacing=o.axisSpacing.pixels)}if(o.wrap!==void 0){let t=c.wrapsInto;if(t===null)throw new e(a,`flex-wrap/flex-nowrap`,"wraps CHILDREN onto a second line, and the widget this primitive becomes has no wrapping counterpart: `Gtk.FlowBox` is a box that wraps, and there is no wrapping `Gtk.Label`, `Gtk.Button` or `Gtk.ScrolledWindow` to swap in. Move the utility to the container — on a `ScrollView` that is `contentContainerClassName`, which lands on a real box");if(o.wrap.lines===`multi`){let{rowSpacing:e,columnSpacing:n}=o.wrap;h={tag:t.tag,props:{...t.widgetProps,...e===void 0?{}:{"row-spacing":e},...n===void 0?{}:{"column-spacing":n}}}}}if(o.textAlign!==void 0&&(g=o.textAlign),g!==void 0&&c.alignsText){let e=r[g];u.xalign=e.xalign,u.justify=e.justify,g=void 0}if(o.expand!==void 0&&(l===void 0?p.expand=o.expand:u[l.orientation===`horizontal`?`hexpand`:`vexpand`]=!0),o.alignSelf!==void 0&&(l===void 0?p.alignSelf=o.alignSelf:u[cross(l.orientation)]=t[o.alignSelf]),o.overlay?.role===`child`)if(l===void 0)p.overlay=o.overlay;else if(l.overlay)m=`overlay`,placeAbsolute(a,o.overlay.edges,i.emittedProps,u,d);else throw new e(a,`absolute`,"positions this element on top of its parent, so the PARENT has to be a `Gtk.Overlay` — and it is not. A `View` becomes one as soon as one of its children is absolutely positioned, so the parent here is either not a `View` (a `ScrollView`, a `Pressable`, a `Text`) or the element is a root");return{props:u,css:d,childContext:{orientation:s,props:f,overlay:!1,...g===void 0?{}:{textAlign:g}},slot:m,wrapping:h,remaining:p}}function placeAbsolute(t,n,r,i,a){let{top:o,right:s,bottom:c,left:l}=n;if((o!==void 0||c!==void 0)&&(i.valign=o!==void 0&&c!==void 0?`fill`:o===void 0?`end`:`start`,o!==void 0&&(i[`margin-top`]=o),c!==void 0&&(i[`margin-bottom`]=c)),!(l===void 0&&s===void 0)){if(r[`margin-start`]!==void 0||r[`margin-end`]!==void 0)throw new e(t,`absolute + ms-*/me-*`,"offsets a PHYSICAL edge (`left-*`/`right-*`/`inset-*`), which becomes GTK CSS, while `ms-*`/`me-*` become the widget properties `margin-start`/`margin-end`. GTK applies both and they ADD, where CSS would have let one win. Spell the horizontal margin one way");i.halign=l!==void 0&&s!==void 0?`fill`:l===void 0?`end`:`start`,l!==void 0&&a.push(`margin-left: ${l}px`),s!==void 0&&a.push(`margin-right: ${s}px`)}}const label=e=>e.replace(/^space-/,``);export{resolveIntent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{PrimitiveError as e}from"./errors.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{PrimitiveError as e}from"./errors.js";import{unknownPrimitiveDetail as t,unknownPropDetail as n}from"./answers.js";import{resolveIntent as r}from"./intents.js";import{mintClass as i,normalise as a,partition as o,variantDeclarations as s}from"./style.js";import{FRAMEWORK_PROPS as c,PRIMITIVES as l,PRIMITIVE_NAMES as u}from"./table.js";const d=[`orientation`,`spacing`],withOrientationClass=(e,t)=>{if(t.length===0)return t;let n=e.orientation;return typeof n==`string`?[n,...t]:t},wrapped=(e,t,n)=>{if(n===null)return{tag:e,props:t};let{spacing:r,...i}=t;return{tag:n.tag,props:{...i,...n.props}}};function declaresAbsolute(e,t,n=`View`){let{props:r}=a(e,t,n);return o(r).intent.overlay?.role===`child`}function resolvePrimitive(f,p,m){let h=l[f];if(h===void 0)throw new e(f,``,t(u));let g=h.switchOn!==void 0&&p[h.switchOn.prop]===!0?h.switchOn.whenTrue:h,_=g.content,v={...g.widgetProps},y={..._?.widgetProps},b={...g.backdrop?.widgetProps},x={},S=[],C=[],w=[],T=[],E=new Set([_?.styleProp,_?.classNameProp,g.backdrop?.styleProp,g.backdrop?.classNameProp].filter(e=>typeof e==`string`));if(g.refusesStyle!==void 0&&(p.className!==void 0||p.style!==void 0))throw new e(f,p.className===void 0?`prop "style"`:`prop "className"`,g.refusesStyle);for(let t of Object.keys(p)){if(c.has(t)||E.has(t))continue;let r=p[t];if(r===void 0)continue;let i=g.props[t];if(i===void 0)throw new e(f,`prop "${t}"`,n(g));for(let e of Array.isArray(i)?i:[i])applyRoute(e,t,r,{primitive:f,spec:g,outerProps:v,contentProps:y,backdropProps:b,styleExtra:x,events:S,files:C,gestures:w,announcements:T})}let D=a(p,m.tokens,f),O=o({...D.props,...x}),k=orientationOf(O.props.orientation??v.orientation,g.orientation),A=_===void 0?k:orientationOf(y.orientation,_.orientation),j=r({primitive:f,intent:O.intent,orientation:A,widget:g.widget,...m.parent===void 0?{}:{parent:m.parent},...m.children===void 0?{}:{children:m.children},emittedProps:O.props}),M=i(m.sheet,[...O.css,...j.css],s(D.groups,m.tokens,f));Object.assign(v,O.props,j.props),assertOneTextAuthority(f,g,v,m.children);let N=[...g.cssClasses,...M===null?[]:[M]],P=g.overlayOnAbsoluteChild;if(P!==void 0&&(m.children?.absolute??0)>0){let e={...g.widgetProps};for(let t of d)v[t]!==void 0&&(e[t]=v[t],delete v[t]);let t=wrapped(g.tag,e,j.wrapping);return{primitive:f,node:{tag:P.tag,props:v,cssClasses:withOrientationClass(v,N)},content:{tag:t.tag,props:t.props,cssClasses:[]},backdrop:null,backdropSlot:null,contentSlot:null,slot:j.slot,absoluteSlot:P.slot,events:S,files:C,gestures:w,announcements:T,handle:g.handle??null,textSink:g.textSink,childContext:{...j.childContext,orientation:A,overlay:!0},intent:j.remaining}}let F=_===void 0?null:resolveNode(_,p,y,m,f),I=g.backdrop===void 0?null:resolveNode(g.backdrop,p,b,m,f),L=wrapped(g.tag,v,j.wrapping);return{primitive:f,node:{tag:L.tag,props:L.props,cssClasses:withOrientationClass(L.props,N)},content:F===null?null:F.node,backdrop:I===null?null:I.node,backdropSlot:g.backdrop?.slot??null,contentSlot:_?.slot??null,slot:j.slot,absoluteSlot:null,events:S,files:C,gestures:w,announcements:T,handle:g.handle??null,textSink:g.textSink,childContext:F===null?{...j.childContext,overlay:!1}:{...F.childContext,...F.childContext.textAlign===void 0&&j.childContext.textAlign!==void 0?{textAlign:j.childContext.textAlign}:{},overlay:!1},intent:j.remaining}}function resolveNode(e,t,n,c,l){let u=`${l} ${e.styleProp??`content`}`,d=a({...e.classNameProp===null?{}:{className:t[e.classNameProp]},...e.styleProp===null?{}:{style:t[e.styleProp]}},c.tokens,u),f=o(d.props),p=orientationOf(f.props.orientation??n.orientation,e.orientation),m=r({primitive:u,intent:f.intent,orientation:p,widget:e.widget,parent:{orientation:p,props:{},overlay:!1},emittedProps:f.props}),h=i(c.sheet,[...f.css,...m.css],s(d.groups,c.tokens,u));Object.assign(n,f.props,m.props);let g=wrapped(e.tag,n,m.wrapping);return{node:{tag:g.tag,props:g.props,cssClasses:withOrientationClass(g.props,h===null?[]:[h])},childContext:{...m.childContext,orientation:p}}}function applyRoute(t,n,r,i){switch(t.to){case`refused`:throw new e(i.primitive,`prop "${n}"`,t.why);case`ignored`:return;case`style-property`:i.styleExtra[t.name]=r;return;case`event`:if(typeof r!=`function`)throw new e(i.primitive,`prop "${n}"`,`binds the GTK signal "${t.signal}" and needs a function; got ${describe(r)}`);i.events.push({prop:n,signal:t.signal,read:t.read??null});return;case`file`:i.files.push({on:nodeOf(t.on,i,n),property:t.property,...normaliseSource(i.primitive,n,r)});return;case`gesture`:if(typeof r!=`function`)throw new e(i.primitive,`prop "${n}"`,`binds a Gtk.GestureClick's "${t.signal}" and needs a function; got ${describe(r)}`);i.gestures.push({prop:n,signal:t.signal});return;case`announce`:{let a=t.map[String(r)];if(a===void 0)throw new e(i.primitive,`prop "${n}"`,`has no GTK equivalent for ${describe(r)}. Known: ${Object.keys(t.map).sort().join(`, `)}. A value absent from that list is absent because GTK has no member for it, not because the table is short`);if(a===null)return;i.announcements.push({prop:n,signal:t.signal,read:t.read,priority:a});return}case`property`:{let e=nodeOf(t.on,i,n),a=e===`content`?i.contentProps:e===`backdrop`?i.backdropProps:i.outerProps,o=coerce(t,n,r,i.primitive);for(let e of t.names)a[e]=o;t.also!==void 0&&Object.assign(a,t.also);return}}}function nodeOf(t,n,r){if(t===`content`&&n.spec.content===void 0)throw new e(n.primitive,`prop "${r}"`,`is routed to a content node this primitive does not declare — the table is wrong, not the call`);if(t===`backdrop`&&n.spec.backdrop===void 0)throw new e(n.primitive,`prop "${r}"`,`is routed to a backdrop node this primitive does not declare — the table is wrong, not the call`);return t??`outer`}function normaliseSource(t,n,r){let refuse=r=>{throw new e(t,`prop "${n}"`,r)};if(typeof r==`number`)return refuse("is a number, which is what `require('./image.png')` returns: an opaque id into React Native’s own asset registry. This build chain has no such registry (ADR 0032 § 12 leaves the build to the consumer), so there is nothing to resolve it against. Use `{ uri: '/path/to/image.png' }`, or ship the image in a GResource and use `{ uri: 'resource:///…' }`");if(Array.isArray(r))return refuse("is an array, which is React Native’s per-device-scale picker (`@2x`, `@3x`). GTK draws ONE texture and scales it by the surface’s own scale factor, so there is no candidate to choose between. Give one source");if(typeof r==`string`)return refuse("is a bare string. React Native’s own type is `{ uri }`, and accepting both spellings here would make one string ambiguous between a path and a URI at exactly the layer that has to decide. Write `{ uri: … }`");if(typeof r!=`object`||!r)return refuse(`expects { uri }; got ${describe(r)}`);let i=r,a=Object.keys(i).filter(e=>e!==`uri`);if(a.length>0)return refuse(`carries ${a.join(`, `)} beside \`uri\`. Those describe a remote image React Native measures before it arrives (\`width\`/\`height\`) or fetches with headers, and neither reaches a \`Gtk.Picture\` — it takes a file and draws it. Keep \`uri\` alone`);let o=i.uri;if(typeof o!=`string`||o===``)return refuse(`expects { uri: string }; got uri = ${describe(o)}`);let s=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(o)?.[1]?.toLowerCase();return s===void 0?{kind:`path`,value:o}:s===`file`||s===`resource`?{kind:`uri`,value:o}:refuse(s===`http`||s===`https`||s===`data`?`is a \`${s}:\` URI, and loading one needs a fetch, a decoder and a cache — an asynchronous pipeline this layer does not own. Handing a non-native \`Gio.File\` to \`Gtk.Picture:file\` would decode on the main loop instead. Fetch the bytes yourself, build a \`Gdk.Texture\`, and set \`paintable\` through a ref`:`is a \`${s}:\` URI, and this layer only opens what GTK can read synchronously: a local path, \`file:\` and \`resource:\` (measured). Anything else needs a loader that is not here`)}function coerce(t,n,r,i){let bad=t=>{throw new e(i,`prop "${n}"`,`expects ${t}; got ${describe(r)}`)};switch(t.as){case`string`:return typeof r==`string`?r:typeof r==`number`||typeof r==`boolean`?String(r):bad(`a string`);case`boolean`:return typeof r==`boolean`?r:bad(`a boolean`);case`not`:return typeof r==`boolean`?!r:bad(`a boolean`);case`int`:return typeof r==`number`&&Number.isFinite(r)?Math.trunc(r):bad(`a number`);case`map`:return lookup(t,n,r,i);case`pixels-or-map`:return typeof r==`number`&&Number.isFinite(r)?Math.trunc(r):lookup(t,n,r,i)}}function lookup(t,n,r,i){let a=t.map??{},o=a[String(r)];if(o!==void 0)return o;throw new e(i,`prop "${n}"`,`has no GTK equivalent for ${describe(r)}. Known: ${Object.keys(a).sort().join(`, `)}. A value absent from that list is absent because GTK has no member for it, not because the table is short`)}function assertOneTextAuthority(t,n,r,i){if(!(n.textSink===null||i?.text!==!0)&&r[n.textSink]!==void 0)throw new e(t,`prop → "${n.textSink}"`,`is the same widget property a text CHILD writes, and both were given. Whichever the reconciler applied last would win, possibly differently on a first render and on an update — so it is refused. Keep one`)}const orientationOf=(e,t)=>e===`horizontal`||e===`vertical`?e:t,describe=e=>typeof e==`string`?`"${e}"`:typeof e==`object`&&e?Object.prototype.toString.call(e):String(e);export{declaresAbsolute,resolvePrimitive};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{isAnimatedValue as e}from"../animated/brand.js";import{PrimitiveError as t}from"./errors.js";import{splitVariants as n}from"./classes.js";import{partition as r,resolveUtilities as i}from"@gjsify/gtk-host/style";function flattenStyle(e){if(e==null||e===!1)return{};if(!Array.isArray(e))return e;let t={};for(let n of e)Object.assign(t,flattenStyle(n));return t}const a=new Set([`flexGrow`,`flexShrink`,`flex`,`opacity`,`fontWeight`,`zIndex`,`aspectRatio`]);function normalise(e,t,r){let a=n(e.className,r),o={...i(a.base,t)};for(let[t,n]of Object.entries(flattenStyle(e.style)))n!=null&&(typeof n!=`number`&&typeof n!=`string`&&scalarOnly(r,t,n),o[t]=typeof n==`number`?stringify(t,n):n);return{props:o,groups:a}}function variantDeclarations(e,n,a){let o={};for(let[s,c]of Object.entries(e.variants)){let e=r(i(c,n)),l=Object.keys(e.props),u=Object.keys(e.intent);if(l.length>0||u.length>0)throw new t(a,`className "${s}:${c.join(` ${s}:`)}"`,`resolves to ${[...l,...u].join(`, `)}, which ${l.length>0?`is a GTK WIDGET PROPERTY`:`is a layout INTENT`} rather than a CSS declaration. A variant becomes a GTK CSS pseudo-class, and a widget property has no pseudo-class form — only the paint half of the vocabulary (colour, opacity, radius, border, font) can carry a variant`);o[s]=e.css}return o}function scalarOnly(n,r,i){throw new t(n,`style={{ ${r}: … }}`,e(i)?'carries an `Animated.Value`, and this element is not an `Animated.View`. A plain element partitions its style into GTK CSS and widget properties before a widget sees it, so the value would land in a CSS declaration as "[object Object]" — which GTK drops without a diagnostic. Render `<Animated.View>` instead':`is a ${Array.isArray(i)?`array`:typeof i}, and the style partition reads numbers and strings. GTK CSS is composed by interpolating the value into a declaration, so anything else becomes a declaration GTK’s parser drops in silence`)}const stringify=(e,t)=>a.has(e)?`${t}`:`${t}px`;function mintClass(e,t,n){let r=Object.values(n).some(e=>e.length>0);return t.length===0&&!r?null:e.classFor(t,n)}export{flattenStyle,mintClass,normalise,r as partition,variantDeclarations};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";const e={box:!0,alignsText:!1},t={box:!1,alignsText:!1},n={box:!1,alignsText:!0},r="GTK carries accessibility through `Gtk.Accessible.update_property()`, an imperative call, not through a widget property — so there is nothing for this layer to set as data. `AccessibilityInfo` (tier P3) is the entry that owns this, and GTK’s model maps onto the props well once it exists",i="would write `Gtk.Widget:name`, and so does `testID`. Two props for one property is the silent-drop shape the host refuses by name (`signalTaken`), so this layer picks one: use `testID`",a={testID:{to:`property`,names:[`name`],as:`string`},id:{to:`refused`,why:i},nativeID:{to:`refused`,why:i},onLayout:{to:`refused`,why:"GTK reports its allocation through `Gtk.Widget.vfunc_size_allocate`, a SUBCLASS override rather than a signal, so there is no handler to bind. `useWindowDimensions` (tier P2) is the window-level answer"},accessible:{to:`refused`,why:r},accessibilityLabel:{to:`refused`,why:r},accessibilityRole:{to:`refused`,why:r},accessibilityHint:{to:`refused`,why:r},accessibilityState:{to:`refused`,why:r}},o={to:`property`,names:[`can-target`],as:`map`,map:{auto:!0,none:!1}},s={...a,multiline:{to:`ignored`,why:`it chose the widget; it is not also a property`},editable:{to:`property`,names:[`editable`],as:`boolean`},keyboardType:{to:`property`,names:[`input-purpose`],as:`map`,map:{default:`free-form`,"email-address":`email`,"phone-pad":`phone`,"number-pad":`digits`,numeric:`number`,"decimal-pad":`number`,url:`url`}},autoFocus:{to:`refused`,why:"focus is `Gtk.Widget.grab_focus()`, which only works once the widget is mapped — an imperative call at a moment this layer does not own. Call it from a ref in an effect"},onFocus:{to:`refused`,why:"focus arrives through a `Gtk.EventControllerFocus`, a controller rather than a signal on the widget, so it is not a prop this layer can route"},onBlur:{to:`refused`,why:"see `onFocus` — the same controller"},returnKeyType:{to:`ignored`,why:`a desktop keyboard has one Return key and no label to change`},autoCapitalize:{to:`ignored`,why:`an on-screen keyboard behaviour; a hardware keyboard has no shift state to preset`},autoCorrect:{to:`ignored`,why:`an on-screen keyboard behaviour`},keyboardAppearance:{to:`ignored`,why:`there is no on-screen keyboard to theme`}},c="`Gtk.TextView` keeps its content in a `Gtk.TextBuffer` rather than in a property (measured: 61 properties, no `text`), so there is nothing for this layer to set as data. Drop `multiline` for a `Gtk.Entry`, or reach the buffer through a ref",l={tag:`GtkTextView`,widgetProps:{"wrap-mode":`word-char`},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,props:{...s,value:{to:`refused`,why:c},defaultValue:{to:`refused`,why:c},onChangeText:{to:`refused`,why:c},placeholder:{to:`refused`,why:"`Gtk.TextView` installs no `placeholder-text` (measured); the Adwaita idiom is a label above the field"},maxLength:{to:`refused`,why:"`Gtk.TextView` installs no `max-length` (measured) — the limit belongs to the buffer"},secureTextEntry:{to:`refused`,why:"`Gtk.TextView` installs no `visibility` (measured), and a multiline password field is not a thing a desktop offers"},onSubmitEditing:{to:`refused`,why:`Return inserts a newline in a multiline field; there is nothing to submit`}}},u={cover:`cover`,contain:`contain`,stretch:`fill`,center:`scale-down`},d="is a load event, and `Gtk.Picture` emits NO signals at all (measured: its GType lists none) — it is handed a file or a paintable and draws it, reporting neither progress nor failure. A missing file leaves `paintable` null with no diagnostic, so a callback that never fires would hide exactly the case it exists to report. Load the bytes yourself and set `paintable` through a ref",f="is a per-pixel effect. GTK composites a `Gdk.Paintable` and has no filter property on the widget that draws it — the counterpart is a `Gsk` render node or a `Gtk.Snapshot` subclass, which is a widget of its own rather than a prop on this one",PRESSED_STYLE_IS_CSS=e=>`sets the pressed appearance, which on GTK is the CSS \`:active\` pseudo-class rather than a prop (ADR 0032 § 7). Write \`${e}\` — it resolves through the same variant mechanism as every other utility, reads the project's own token scale, and GTK animates it with no re-render at all`,p="tunes React Native’s own virtualisation, and `Gtk.ListView` does that job itself — it creates and recycles rows through the factory as the viewport moves (measured: 205 of 500 rows set up in a 400×300 window) and installs no property that changes the batching. There is nothing for this to set",m="is pull-to-refresh, which GTK has no idiom for and should not grow one — `RefreshControl` is `refused` in the support table for the same reason. Give the desktop build a refresh action in the header bar",h={...a,disabled:{to:`property`,names:[`sensitive`],as:`not`},onPressIn:{to:`refused`,why:"press state is the GTK CSS `:active` pseudo-class, not React state (ADR 0032 § 7) — write `active:opacity-70` and GTK animates it with no re-render at all"},onPressOut:{to:`refused`,why:"see `onPressIn` — `active:` is the mechanism"},onLongPress:{to:`refused`,why:"a long press is a `Gtk.GestureLongPress` controller added to the widget, not a property or a signal on it, so it is not something this layer can route as data"},delayLongPress:{to:`refused`,why:"see `onLongPress`"},delayPressIn:{to:`refused`,why:"see `onPressIn` — there is no press-in event to delay"},delayPressOut:{to:`refused`,why:"see `onPressIn`"},hitSlop:{to:`refused`,why:"GTK hit-tests the allocation and has no way to grow it past the widget. Pad the element (`p-*`), which enlarges the real target"},pressRetentionOffset:{to:`refused`,why:"see `hitSlop` — GTK hit-tests the allocation and nothing around it"},touchSoundDisabled:{to:`ignored`,why:`an Android touch sound; a desktop button makes none`}},g={View:{tag:`GtkBox`,widgetProps:{orientation:`vertical`},cssClasses:[],orientation:`vertical`,widget:e,textSink:null,overlayOnAbsoluteChild:{tag:`GtkOverlay`,slot:`overlay`},props:{...a,pointerEvents:o}},Text:{tag:`GtkLabel`,widgetProps:{wrap:!0},cssClasses:[],orientation:`vertical`,widget:n,textSink:`label`,props:{...a,numberOfLines:{to:`property`,names:[`lines`],as:`int`,also:{ellipsize:`end`,wrap:!0}},ellipsizeMode:{to:`property`,names:[`ellipsize`],as:`map`,map:{head:`start`,middle:`middle`,tail:`end`}},selectable:{to:`property`,names:[`selectable`],as:`boolean`},onPress:{to:`refused`,why:"a `Gtk.Label` emits no `clicked` (measured: `activate-current-link`, `activate-link`, `copy-clipboard`, `move-cursor` and nothing else). Wrap it in a `<Pressable>`, which is a real `Gtk.Button`"},allowFontScaling:{to:`ignored`,why:`text scaling is a desktop-wide GNOME setting, not a per-label opt-in`},maxFontSizeMultiplier:{to:`ignored`,why:"see `allowFontScaling`"},adjustsFontSizeToFit:{to:`refused`,why:"GTK has no shrink-to-fit text; a label ellipsizes or wraps. Use `numberOfLines` with `ellipsizeMode`"}}},Pressable:{tag:`GtkButton`,widgetProps:{},cssClasses:[`flat`],orientation:`vertical`,widget:t,textSink:`label`,props:{...a,pointerEvents:o,onPress:{to:`event`,signal:`clicked`},onPressIn:{to:`refused`,why:"press state is the GTK CSS `:active` pseudo-class, not React state (ADR 0032 § 7) — write `active:opacity-70` and GTK animates it with no re-render at all"},onPressOut:{to:`refused`,why:"see `onPressIn` — `active:` is the mechanism"},onLongPress:{to:`refused`,why:"a long press is a `Gtk.GestureLongPress` controller added to the widget, not a property or a signal on it, so it is not something this layer can route as data"},delayLongPress:{to:`refused`,why:"see `onLongPress`"},hitSlop:{to:`refused`,why:"GTK hit-tests the allocation and has no way to grow it past the widget. Pad the button (`p-*`), which enlarges the real target"},android_ripple:{to:`ignored`,why:`an Android-only ripple; Adwaita has its own press feedback`},disabled:{to:`property`,names:[`sensitive`],as:`not`}}},ScrollView:{tag:`GtkScrolledWindow`,widgetProps:{"hscrollbar-policy":`never`},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,content:{tag:`GtkBox`,widgetProps:{orientation:`vertical`},orientation:`vertical`,widget:e,styleProp:`contentContainerStyle`,classNameProp:`contentContainerClassName`},props:{...a,horizontal:[{to:`property`,on:`content`,names:[`orientation`],as:`map`,map:{true:`horizontal`,false:`vertical`}},{to:`property`,on:`outer`,names:[`hscrollbar-policy`],as:`map`,map:{true:`automatic`,false:`never`}},{to:`property`,on:`outer`,names:[`vscrollbar-policy`],as:`map`,map:{true:`never`,false:`automatic`}}],showsVerticalScrollIndicator:{to:`property`,names:[`vscrollbar-policy`],as:`map`,map:{true:`automatic`,false:`external`}},showsHorizontalScrollIndicator:{to:`property`,names:[`hscrollbar-policy`],as:`map`,map:{true:`automatic`,false:`external`}},scrollEnabled:{to:`refused`,why:"a `Gtk.ScrolledWindow` has no switch that stops scrolling — setting both policies to `never` hides the bars AND clamps the child, which is a different thing. Render the content without the ScrollView when it must not scroll"},onScroll:{to:`refused`,why:"GTK reports scroll position through the `Gtk.Adjustment` objects behind `hadjustment`/`vadjustment` — `notify::value` on an adjustment, not a signal on the scrolled window — so there is no prop to route. Reach the adjustment through a ref"},scrollEventThrottle:{to:`refused`,why:"see `onScroll`"},refreshControl:{to:`refused`,why:"GTK has no pull-to-refresh idiom and `RefreshControl` is `refused` in the support table for that reason. Give the desktop build a refresh action"},keyboardShouldPersistTaps:{to:`ignored`,why:`there is no on-screen keyboard to dismiss`},keyboardDismissMode:{to:`ignored`,why:"see `keyboardShouldPersistTaps`"},contentContainerStyle:{to:`ignored`,why:`read directly as the content node’s style set`},contentContainerClassName:{to:`ignored`,why:`read directly as the content node’s class list`}}},ActivityIndicator:{tag:`AdwSpinner`,widgetProps:{},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,props:{...a,animating:{to:`property`,names:[`visible`],as:`boolean`},hidesWhenStopped:{to:`ignored`,why:"a stopped `Adw.Spinner` is a hidden one here — there is no property that stops it while it is on screen (measured), so this is already the behaviour"},size:{to:`property`,names:[`width-request`,`height-request`],as:`pixels-or-map`,map:{small:16,large:32}},color:{to:`style-property`,name:`color`}}},TextInput:{tag:`GtkEntry`,widgetProps:{},cssClasses:[],orientation:`vertical`,widget:t,textSink:`text`,switchOn:{prop:`multiline`,whenTrue:l},props:{...s,value:{to:`property`,names:[`text`],as:`string`},defaultValue:{to:`property`,names:[`text`],as:`string`},placeholder:{to:`property`,names:[`placeholder-text`],as:`string`},maxLength:{to:`property`,names:[`max-length`],as:`int`},secureTextEntry:{to:`property`,names:[`visibility`],as:`not`},onChangeText:{to:`event`,signal:`notify::text`,read:`text`},onSubmitEditing:{to:`event`,signal:`activate`}}},Switch:{tag:`GtkSwitch`,widgetProps:{},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,props:{...a,value:{to:`property`,names:[`active`],as:`boolean`},onValueChange:{to:`event`,signal:`notify::active`,read:`active`},disabled:{to:`property`,names:[`sensitive`],as:`not`},trackColor:{to:`refused`,why:"Adwaita paints the switch from the theme’s accent colour, and its track is a CSS `slider`/`trough` subnode rather than a property. Style it from the application stylesheet"},thumbColor:{to:`refused`,why:"see `trackColor`"},ios_backgroundColor:{to:`ignored`,why:`an iOS-only fallback colour`}}},Image:{tag:`GtkPicture`,widgetProps:{"content-fit":`cover`},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,props:{...a,source:{to:`file`,property:`file`},resizeMode:{to:`property`,names:[`content-fit`],as:`map`,map:u},alt:{to:`property`,names:[`alternative-text`],as:`string`},onLoad:{to:`refused`,why:d},onLoadStart:{to:`refused`,why:d},onLoadEnd:{to:`refused`,why:d},onError:{to:`refused`,why:d},onProgress:{to:`refused`,why:d},blurRadius:{to:`refused`,why:f},tintColor:{to:`refused`,why:f},capInsets:{to:`refused`,why:"is iOS nine-part stretching. GTK’s counterpart is a CSS `border-image` on a widget’s background, which is a different widget and a different property set"},defaultSource:{to:`refused`,why:"is the placeholder shown while the real image loads, and `Gtk.Picture` has one file at a time with no load event to swap on (measured: it emits no signals). Render a placeholder widget beside it and remove it yourself"},loadingIndicatorSource:{to:`refused`,why:"see `defaultSource`"},progressiveRenderingEnabled:{to:`ignored`,why:`GTK decodes an image in one pass`},fadeDuration:{to:`ignored`,why:`an Android cross-fade on load; there is no load event here to fade from (measured)`},resizeMethod:{to:`ignored`,why:`an Android decoder hint`},resizeMultiplier:{to:`ignored`,why:`an Android decoder hint`}}},ImageBackground:{tag:`GtkOverlay`,widgetProps:{},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,backdrop:{tag:`GtkPicture`,widgetProps:{"content-fit":`cover`},orientation:`vertical`,widget:t,styleProp:`imageStyle`,classNameProp:null,slot:`child`},content:{tag:`GtkBox`,widgetProps:{orientation:`vertical`},orientation:`vertical`,widget:e,styleProp:null,classNameProp:null,slot:`overlay`},props:{...a,pointerEvents:o,source:{to:`file`,on:`backdrop`,property:`file`},resizeMode:{to:`property`,on:`backdrop`,names:[`content-fit`],as:`map`,map:u},alt:{to:`property`,on:`backdrop`,names:[`alternative-text`],as:`string`},imageStyle:{to:`ignored`,why:`read directly as the picture node’s style set`},imageRef:{to:`refused`,why:"hands back the inner `Image`’s instance. This element’s `ref` is the `Gtk.Overlay`; the picture is its main child and `overlay.get_child()` reaches it, so a second ref would be a second way to say the same thing"}}},TouchableOpacity:{tag:`GtkButton`,cssClasses:[`flat`],widgetProps:{},orientation:`vertical`,widget:t,textSink:`label`,props:{...h,pointerEvents:o,onPress:{to:`event`,signal:`clicked`},activeOpacity:{to:`refused`,why:PRESSED_STYLE_IS_CSS(`active:opacity-70`)}}},TouchableHighlight:{tag:`GtkButton`,cssClasses:[`flat`],widgetProps:{},orientation:`vertical`,widget:t,textSink:`label`,props:{...h,pointerEvents:o,onPress:{to:`event`,signal:`clicked`},activeOpacity:{to:`refused`,why:PRESSED_STYLE_IS_CSS(`active:opacity-70`)},underlayColor:{to:`refused`,why:PRESSED_STYLE_IS_CSS(`active:bg-<token>`)},onShowUnderlay:{to:`refused`,why:"see `underlayColor` — there is no underlay to show"},onHideUnderlay:{to:`refused`,why:"see `underlayColor`"}}},TouchableWithoutFeedback:{tag:`GtkBox`,widgetProps:{orientation:`vertical`},cssClasses:[],orientation:`vertical`,widget:e,textSink:null,overlayOnAbsoluteChild:{tag:`GtkOverlay`,slot:`overlay`},props:{...h,pointerEvents:o,onPress:{to:`gesture`,signal:`released`},disabled:{to:`property`,names:[`can-target`],as:`not`}}},Button:{tag:`GtkButton`,widgetProps:{},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,refusesStyle:"takes no `style` and no `className`. React Native’s own `Button` takes neither — its documented styling story is that you cannot, and you use `Pressable` when you need to — and GTK agrees: an Adwaita button is painted by the theme and by its own classes (`suggested-action`, `destructive-action`), which an application stylesheet sets. Use `<Pressable>`",props:{...a,title:{to:`property`,names:[`label`],as:`string`},onPress:{to:`event`,signal:`clicked`},disabled:{to:`property`,names:[`sensitive`],as:`not`},color:{to:`refused`,why:"is the button’s background on Android and its text colour on iOS — one prop, two meanings, and GTK has a third answer: `suggested-action` and `destructive-action` are Adwaita’s own classes for the two cases a colour is usually asking for. Set them from the application stylesheet, or use `<Pressable>`"},touchSoundDisabled:{to:`ignored`,why:`an Android touch sound; a desktop button makes none`},hasTVPreferredFocus:{to:`ignored`,why:`an Android TV focus hint`},nextFocusDown:{to:`ignored`,why:`an Android TV focus hint`},nextFocusForward:{to:`ignored`,why:`an Android TV focus hint`},nextFocusLeft:{to:`ignored`,why:`an Android TV focus hint`},nextFocusRight:{to:`ignored`,why:`an Android TV focus hint`},nextFocusUp:{to:`ignored`,why:`an Android TV focus hint`}}},SafeAreaView:{tag:`GtkBox`,widgetProps:{orientation:`vertical`},cssClasses:[],orientation:`vertical`,widget:e,textSink:null,overlayOnAbsoluteChild:{tag:`GtkOverlay`,slot:`overlay`},props:{...a,pointerEvents:o}},KeyboardAvoidingView:{tag:`GtkBox`,widgetProps:{orientation:`vertical`},cssClasses:[],orientation:`vertical`,widget:e,textSink:null,overlayOnAbsoluteChild:{tag:`GtkOverlay`,slot:`overlay`},props:{...a,pointerEvents:o,behavior:{to:`ignored`,why:`describes how to move out of an on-screen keyboard’s way, and none appears`},keyboardVerticalOffset:{to:`ignored`,why:"see `behavior`"},enabled:{to:`ignored`,why:"see `behavior` — the avoidance is already off"},contentContainerStyle:{to:`refused`,why:"styles the inner view React Native adds to do the avoiding, and there is no avoiding here — so there is no second node to style. Put it on `style`, which lands on the one box this element is"}}},FlatList:{tag:`GtkBox`,widgetProps:{orientation:`vertical`},cssClasses:[],orientation:`vertical`,widget:e,textSink:null,content:{tag:`GtkScrolledWindow`,widgetProps:{"hscrollbar-policy":`never`,vexpand:!0,hexpand:!0},orientation:`vertical`,widget:t,styleProp:null,classNameProp:null},props:{...a,horizontal:[{to:`property`,on:`outer`,names:[`orientation`],as:`map`,map:{true:`horizontal`,false:`vertical`}},{to:`property`,on:`content`,names:[`hscrollbar-policy`],as:`map`,map:{true:`automatic`,false:`never`}},{to:`property`,on:`content`,names:[`vscrollbar-policy`],as:`map`,map:{true:`never`,false:`automatic`}}],showsVerticalScrollIndicator:{to:`property`,on:`content`,names:[`vscrollbar-policy`],as:`map`,map:{true:`automatic`,false:`external`}},showsHorizontalScrollIndicator:{to:`property`,on:`content`,names:[`hscrollbar-policy`],as:`map`,map:{true:`automatic`,false:`external`}},data:{to:`ignored`,why:`read by the component, which drives the Gio.ListStore from it`},renderItem:{to:`ignored`,why:`read by the item factory`},keyExtractor:{to:`ignored`,why:`read by the component, to key the model rows`},getItem:{to:`ignored`,why:"read by the component — VirtualizedList’s accessor form of `data`"},getItemCount:{to:`ignored`,why:"see `getItem`"},sections:{to:`ignored`,why:"read by the component — SectionList’s form of `data`"},renderSectionHeader:{to:`ignored`,why:`read by the item factory`},ListEmptyComponent:{to:`ignored`,why:`rendered by the component instead of the scroller`},ListHeaderComponent:{to:`ignored`,why:`rendered by the component, before the scroller`},ListFooterComponent:{to:`ignored`,why:`rendered by the component, after the scroller`},onEndReached:{to:`ignored`,why:`bound by the component to the scroller’s own Gtk.Adjustment`},onEndReachedThreshold:{to:`ignored`,why:"see `onEndReached`"},extraData:{to:`ignored`,why:`read by the component; a change re-renders every bound row`},onRowError:{to:`ignored`,why:`read by the component, and handed to each row’s own React root`},initialNumToRender:{to:`refused`,why:p},maxToRenderPerBatch:{to:`refused`,why:p},updateCellsBatchingPeriod:{to:`refused`,why:p},windowSize:{to:`refused`,why:p},removeClippedSubviews:{to:`refused`,why:p},getItemLayout:{to:`refused`,why:p},initialScrollIndex:{to:`refused`,why:"scrolls to a row before the first paint. `Gtk.ListView.scroll_to(position, flags, scroll_info)` is the counterpart and it is an imperative call on a realised view, not a property — reach the view through a ref and call it"},onViewableItemsChanged:{to:`refused`,why:"reports which rows are on screen. `Gtk.ListView` binds and unbinds rows itself and exposes no viewport range — the closest fact is `Gtk.ListItem:position` inside the factory, which is per row rather than a set, so a faithful answer would be a guess assembled from bind order"},viewabilityConfig:{to:`refused`,why:"see `onViewableItemsChanged`"},viewabilityConfigCallbackPairs:{to:`refused`,why:"see `onViewableItemsChanged`"},onScroll:{to:`refused`,why:"GTK reports scroll position through the `Gtk.Adjustment` objects behind the scroller’s `hadjustment`/`vadjustment` — `notify::value` on an adjustment, not a signal on the widget. `onEndReached` is the one question this layer answers from it; reach the adjustment through a ref for the rest"},scrollEventThrottle:{to:`refused`,why:"see `onScroll`"},numColumns:{to:`refused`,why:"lays the rows out in a grid, and a `Gtk.ListView` is one column of rows by construction. `Gtk.GridView` is the widget that does this and it is a different tag with a different model contract, so it is a primitive of its own rather than a prop on this one"},columnWrapperStyle:{to:`refused`,why:"see `numColumns`"},inverted:{to:`refused`,why:"draws the list bottom-up. GTK has no reversed list view; the honest equivalent is to reverse `data` yourself, which is one line and visible in the code"},refreshing:{to:`refused`,why:m},onRefresh:{to:`refused`,why:m},refreshControl:{to:`refused`,why:m},ItemSeparatorComponent:{to:`refused`,why:"puts a widget BETWEEN rows, and a `Gtk.ListView` has no between — it has rows. `Gtk.ListView:show-separators` draws the Adwaita separator itself; set it through a ref, or give the row its own bottom border with `border-b`"},stickySectionHeadersEnabled:{to:`refused`,why:"GTK’s own sticky headers are a `Gtk.ListView:header-factory` over a model that implements `Gtk.SectionModel` (MEASURED: `Gio.ListStore` does not, every selection model and `Gtk.FlattenListModel` do). This layer flattens the sections into one model with header ROWS instead, so a header scrolls with its section — which is what `stickySectionHeadersEnabled={false}` asks for and the only thing it can deliver"},keyboardShouldPersistTaps:{to:`ignored`,why:`there is no on-screen keyboard to dismiss`},keyboardDismissMode:{to:`ignored`,why:"see `keyboardShouldPersistTaps`"},contentContainerStyle:{to:`refused`,why:"styles the box React Native puts the rows in, and there is no such box: `Gtk.ListView` builds each row from the factory and owns the space between them. Style the row inside `renderItem`, or the list itself through `style`"}}}},_=Object.keys(g),v=new Set([`children`,`key`,`ref`,`className`,`style`]);export{v as FRAMEWORK_PROPS,g as PRIMITIVES,_ as PRIMITIVE_NAMES};
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";const e={box:!0,alignsText:!1,wrapsInto:{tag:`GtkFlowBox`,widgetProps:{"max-children-per-line":65535,"selection-mode":`none`}}},t={box:!1,alignsText:!1,wrapsInto:null},n={box:!1,alignsText:!0,wrapsInto:null},r="GTK carries accessibility through `Gtk.Accessible.update_property()`, an imperative call, not through a widget property — so there is nothing for this layer to set as data. `AccessibilityInfo` (tier P3) is the entry that owns this, and GTK’s model maps onto the props well once it exists",i="would write `Gtk.Widget:name`, and so does `testID`. Two props for one property is the silent-drop shape the host refuses by name (`signalTaken`), so this layer picks one: use `testID`",a={testID:{to:`property`,names:[`name`],as:`string`},id:{to:`refused`,why:i},nativeID:{to:`refused`,why:i},onLayout:{to:`refused`,why:"GTK reports its allocation through `Gtk.Widget.vfunc_size_allocate`, a SUBCLASS override rather than a signal, so there is no handler to bind. `useWindowDimensions` (tier P2) is the window-level answer"},accessible:{to:`refused`,why:r},accessibilityLabel:{to:`refused`,why:r},accessibilityRole:{to:`refused`,why:r},accessibilityHint:{to:`refused`,why:r},accessibilityState:{to:`refused`,why:r},accessibilityLiveRegion:{to:`refused`,why:"declares that a screen reader should speak this element when its CONTENT changes. GTK has the announcement — `Gtk.Accessible.announce(message, priority)` since 4.14 — but not the watch: it is an imperative call, and this element’s content is a SUBTREE, which GTK emits no signal for. `<Text>` answers this prop, because its content is one property (`Gtk.Label:label`) and so is both the moment and the message. Elsewhere, call `announce()` on the widget through a ref when you change the content"}},o={to:`property`,names:[`can-target`],as:`map`,map:{auto:!0,none:!1}},s={...a,multiline:{to:`ignored`,why:`it chose the widget; it is not also a property`},editable:{to:`property`,names:[`editable`],as:`boolean`},keyboardType:{to:`property`,names:[`input-purpose`],as:`map`,map:{default:`free-form`,"email-address":`email`,"phone-pad":`phone`,"number-pad":`digits`,numeric:`number`,"decimal-pad":`number`,url:`url`}},autoFocus:{to:`refused`,why:"focus is `Gtk.Widget.grab_focus()`, which only works once the widget is mapped — an imperative call at a moment this layer does not own. Call it from a ref in an effect"},onFocus:{to:`refused`,why:"focus arrives through a `Gtk.EventControllerFocus`, a controller rather than a signal on the widget, so it is not a prop this layer can route"},onBlur:{to:`refused`,why:"see `onFocus` — the same controller"},returnKeyType:{to:`ignored`,why:`a desktop keyboard has one Return key and no label to change`},autoCapitalize:{to:`ignored`,why:`an on-screen keyboard behaviour; a hardware keyboard has no shift state to preset`},autoCorrect:{to:`ignored`,why:`an on-screen keyboard behaviour`},keyboardAppearance:{to:`ignored`,why:`there is no on-screen keyboard to theme`},autoComplete:{to:`ignored`,why:"is Android’s autofill hint, and there is no autofill service on a GTK desktop to hint to — a password manager fills a field through the accessibility bus or a paste, neither of which the widget declares anything for. `keyboardType` is the one hint that does land: it writes `Gtk.Entry:input-purpose`, which an input method reads"},textContentType:{to:`ignored`,why:"is `autoComplete`’s iOS spelling and has the same absent addressee. Note `Gtk.Accessible` does carry an `autocomplete` PROPERTY, and it is a different thing: it describes a widget that completes its own text (a combo box), not a system that fills it in"},submitBehavior:{to:`ignored`,why:"chooses what the Return key does, and each GTK widget has exactly one answer with nothing to select between: a `Gtk.Entry` always emits `activate` (which is `onSubmitEditing`) and can never insert a newline, and a `Gtk.TextView` always inserts a newline and never submits — which is why `onSubmitEditing` is refused on a multiline input. `multiline` is the prop that picks the behaviour, because it picks the widget"}},c="`Gtk.TextView` keeps its content in a `Gtk.TextBuffer` rather than in a property (measured: 61 properties, no `text`), so there is nothing for this layer to set as data. Drop `multiline` for a `Gtk.Entry`, or reach the buffer through a ref",l={tag:`GtkTextView`,widgetProps:{"wrap-mode":`word-char`},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,handle:`text-input`,props:{...s,value:{to:`refused`,why:c},defaultValue:{to:`refused`,why:c},onChangeText:{to:`refused`,why:c},placeholder:{to:`refused`,why:"`Gtk.TextView` installs no `placeholder-text` (measured); the Adwaita idiom is a label above the field"},maxLength:{to:`refused`,why:"`Gtk.TextView` installs no `max-length` (measured) — the limit belongs to the buffer"},secureTextEntry:{to:`refused`,why:"`Gtk.TextView` installs no `visibility` (measured), and a multiline password field is not a thing a desktop offers"},onSubmitEditing:{to:`refused`,why:`Return inserts a newline in a multiline field; there is nothing to submit`}}},u={cover:`cover`,contain:`contain`,stretch:`fill`,center:`scale-down`},d="is a load event, and `Gtk.Picture` emits NO signals at all (measured: its GType lists none) — it is handed a file or a paintable and draws it, reporting neither progress nor failure. A missing file leaves `paintable` null with no diagnostic, so a callback that never fires would hide exactly the case it exists to report. Load the bytes yourself and set `paintable` through a ref",f="is a per-pixel effect. GTK composites a `Gdk.Paintable` and has no filter property on the widget that draws it — the counterpart is a `Gsk` render node or a `Gtk.Snapshot` subclass, which is a widget of its own rather than a prop on this one",PRESSED_STYLE_IS_CSS=e=>`sets the pressed appearance, which on GTK is the CSS \`:active\` pseudo-class rather than a prop (ADR 0032 § 7). Write \`${e}\` — it resolves through the same variant mechanism as every other utility, reads the project's own token scale, and GTK animates it with no re-render at all`,p="tunes React Native’s own virtualisation, and `Gtk.ListView` does that job itself — it creates and recycles rows through the factory as the viewport moves (measured: 205 of 500 rows set up in a 400×300 window) and installs no property that changes the batching. There is nothing for this to set",m="is pull-to-refresh, which GTK has no idiom for and should not grow one — `RefreshControl` is `refused` in the support table for the same reason. Give the desktop build a refresh action in the header bar",h={...a,disabled:{to:`property`,names:[`sensitive`],as:`not`},onPressIn:{to:`refused`,why:"press state is the GTK CSS `:active` pseudo-class, not React state (ADR 0032 § 7) — write `active:opacity-70` and GTK animates it with no re-render at all"},onPressOut:{to:`refused`,why:"see `onPressIn` — `active:` is the mechanism"},onLongPress:{to:`refused`,why:"a long press is a `Gtk.GestureLongPress` controller added to the widget, not a property or a signal on it, so it is not something this layer can route as data"},delayLongPress:{to:`refused`,why:"see `onLongPress`"},delayPressIn:{to:`refused`,why:"see `onPressIn` — there is no press-in event to delay"},delayPressOut:{to:`refused`,why:"see `onPressIn`"},hitSlop:{to:`refused`,why:"GTK hit-tests the allocation and has no way to grow it past the widget. Pad the element (`p-*`), which enlarges the real target"},pressRetentionOffset:{to:`refused`,why:"see `hitSlop` — GTK hit-tests the allocation and nothing around it"},touchSoundDisabled:{to:`ignored`,why:`an Android touch sound; a desktop button makes none`}},g={View:{tag:`GtkBox`,widgetProps:{orientation:`vertical`},cssClasses:[],orientation:`vertical`,widget:e,textSink:null,overlayOnAbsoluteChild:{tag:`GtkOverlay`,slot:`overlay`},props:{...a,pointerEvents:o}},Text:{tag:`GtkLabel`,widgetProps:{wrap:!0,xalign:0,yalign:0},cssClasses:[],orientation:`vertical`,widget:n,textSink:`label`,props:{...a,numberOfLines:{to:`property`,names:[`lines`],as:`int`,also:{ellipsize:`end`,wrap:!0}},ellipsizeMode:{to:`property`,names:[`ellipsize`],as:`map`,map:{head:`start`,middle:`middle`,tail:`end`}},selectable:{to:`property`,names:[`selectable`],as:`boolean`},accessibilityLiveRegion:{to:`announce`,signal:`notify::label`,read:`label`,map:{none:null,polite:`medium`,assertive:`high`}},onPress:{to:`refused`,why:"a `Gtk.Label` emits no `clicked` (measured: `activate-current-link`, `activate-link`, `copy-clipboard`, `move-cursor` and nothing else). Wrap it in a `<Pressable>`, which is a real `Gtk.Button`"},allowFontScaling:{to:`ignored`,why:`text scaling is a desktop-wide GNOME setting, not a per-label opt-in`},maxFontSizeMultiplier:{to:`ignored`,why:"see `allowFontScaling`"},adjustsFontSizeToFit:{to:`refused`,why:"GTK has no shrink-to-fit text; a label ellipsizes or wraps. Use `numberOfLines` with `ellipsizeMode`"}}},Pressable:{tag:`GtkButton`,widgetProps:{},cssClasses:[`flat`],orientation:`vertical`,widget:t,textSink:`label`,props:{...a,pointerEvents:o,onPress:{to:`event`,signal:`clicked`},onPressIn:{to:`refused`,why:"press state is the GTK CSS `:active` pseudo-class, not React state (ADR 0032 § 7) — write `active:opacity-70` and GTK animates it with no re-render at all"},onPressOut:{to:`refused`,why:"see `onPressIn` — `active:` is the mechanism"},onLongPress:{to:`refused`,why:"a long press is a `Gtk.GestureLongPress` controller added to the widget, not a property or a signal on it, so it is not something this layer can route as data"},delayLongPress:{to:`refused`,why:"see `onLongPress`"},hitSlop:{to:`refused`,why:"GTK hit-tests the allocation and has no way to grow it past the widget. Pad the button (`p-*`), which enlarges the real target"},android_ripple:{to:`ignored`,why:`an Android-only ripple; Adwaita has its own press feedback`},disabled:{to:`property`,names:[`sensitive`],as:`not`}}},ScrollView:{tag:`GtkScrolledWindow`,widgetProps:{"hscrollbar-policy":`never`},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,content:{tag:`GtkBox`,widgetProps:{orientation:`vertical`},orientation:`vertical`,widget:e,styleProp:`contentContainerStyle`,classNameProp:`contentContainerClassName`},props:{...a,horizontal:[{to:`property`,on:`content`,names:[`orientation`],as:`map`,map:{true:`horizontal`,false:`vertical`}},{to:`property`,on:`outer`,names:[`hscrollbar-policy`],as:`map`,map:{true:`automatic`,false:`never`}},{to:`property`,on:`outer`,names:[`vscrollbar-policy`],as:`map`,map:{true:`never`,false:`automatic`}}],showsVerticalScrollIndicator:{to:`property`,names:[`vscrollbar-policy`],as:`map`,map:{true:`automatic`,false:`external`}},showsHorizontalScrollIndicator:{to:`property`,names:[`hscrollbar-policy`],as:`map`,map:{true:`automatic`,false:`external`}},scrollEnabled:{to:`refused`,why:"a `Gtk.ScrolledWindow` has no switch that stops scrolling — setting both policies to `never` hides the bars AND clamps the child, which is a different thing. Render the content without the ScrollView when it must not scroll"},onScroll:{to:`refused`,why:"GTK reports scroll position through the `Gtk.Adjustment` objects behind `hadjustment`/`vadjustment` — `notify::value` on an adjustment, not a signal on the scrolled window — so there is no prop to route. Reach the adjustment through a ref"},scrollEventThrottle:{to:`refused`,why:"see `onScroll`"},refreshControl:{to:`refused`,why:"GTK has no pull-to-refresh idiom and `RefreshControl` is `refused` in the support table for that reason. Give the desktop build a refresh action"},keyboardShouldPersistTaps:{to:`ignored`,why:`there is no on-screen keyboard to dismiss`},keyboardDismissMode:{to:`ignored`,why:"see `keyboardShouldPersistTaps`"},contentContainerStyle:{to:`ignored`,why:`read directly as the content node’s style set`},contentContainerClassName:{to:`ignored`,why:`read directly as the content node’s class list`}}},ActivityIndicator:{tag:`AdwSpinner`,widgetProps:{},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,props:{...a,animating:{to:`property`,names:[`visible`],as:`boolean`},hidesWhenStopped:{to:`ignored`,why:"a stopped `Adw.Spinner` is a hidden one here — there is no property that stops it while it is on screen (measured), so this is already the behaviour"},size:{to:`property`,names:[`width-request`,`height-request`],as:`pixels-or-map`,map:{small:16,large:32}},color:{to:`style-property`,name:`color`}}},TextInput:{tag:`GtkEntry`,widgetProps:{},cssClasses:[],orientation:`vertical`,widget:t,textSink:`text`,handle:`text-input`,switchOn:{prop:`multiline`,whenTrue:l},props:{...s,value:{to:`property`,names:[`text`],as:`string`},defaultValue:{to:`property`,names:[`text`],as:`string`},placeholder:{to:`property`,names:[`placeholder-text`],as:`string`},maxLength:{to:`property`,names:[`max-length`],as:`int`},secureTextEntry:{to:`property`,names:[`visibility`],as:`not`},onChangeText:{to:`event`,signal:`notify::text`,read:`text`},onSubmitEditing:{to:`event`,signal:`activate`}}},Switch:{tag:`GtkSwitch`,widgetProps:{},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,props:{...a,value:{to:`property`,names:[`active`],as:`boolean`},onValueChange:{to:`event`,signal:`notify::active`,read:`active`},disabled:{to:`property`,names:[`sensitive`],as:`not`},trackColor:{to:`refused`,why:"Adwaita paints the switch from the theme’s accent colour, and its track is a CSS `slider`/`trough` subnode rather than a property. Style it from the application stylesheet"},thumbColor:{to:`refused`,why:"see `trackColor`"},ios_backgroundColor:{to:`ignored`,why:`an iOS-only fallback colour`}}},Image:{tag:`GtkPicture`,widgetProps:{"content-fit":`cover`},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,props:{...a,source:{to:`file`,property:`file`},resizeMode:{to:`property`,names:[`content-fit`],as:`map`,map:u},alt:{to:`property`,names:[`alternative-text`],as:`string`},onLoad:{to:`refused`,why:d},onLoadStart:{to:`refused`,why:d},onLoadEnd:{to:`refused`,why:d},onError:{to:`refused`,why:d},onProgress:{to:`refused`,why:d},blurRadius:{to:`refused`,why:f},tintColor:{to:`refused`,why:f},capInsets:{to:`refused`,why:"is iOS nine-part stretching. GTK’s counterpart is a CSS `border-image` on a widget’s background, which is a different widget and a different property set"},defaultSource:{to:`refused`,why:"is the placeholder shown while the real image loads, and `Gtk.Picture` has one file at a time with no load event to swap on (measured: it emits no signals). Render a placeholder widget beside it and remove it yourself"},loadingIndicatorSource:{to:`refused`,why:"see `defaultSource`"},progressiveRenderingEnabled:{to:`ignored`,why:`GTK decodes an image in one pass`},fadeDuration:{to:`ignored`,why:`an Android cross-fade on load; there is no load event here to fade from (measured)`},resizeMethod:{to:`ignored`,why:`an Android decoder hint`},resizeMultiplier:{to:`ignored`,why:`an Android decoder hint`}}},ImageBackground:{tag:`GtkOverlay`,widgetProps:{},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,backdrop:{tag:`GtkPicture`,widgetProps:{"content-fit":`cover`},orientation:`vertical`,widget:t,styleProp:`imageStyle`,classNameProp:null,slot:`child`},content:{tag:`GtkBox`,widgetProps:{orientation:`vertical`},orientation:`vertical`,widget:e,styleProp:null,classNameProp:null,slot:`overlay`},props:{...a,pointerEvents:o,source:{to:`file`,on:`backdrop`,property:`file`},resizeMode:{to:`property`,on:`backdrop`,names:[`content-fit`],as:`map`,map:u},alt:{to:`property`,on:`backdrop`,names:[`alternative-text`],as:`string`},imageStyle:{to:`ignored`,why:`read directly as the picture node’s style set`},imageRef:{to:`refused`,why:"hands back the inner `Image`’s instance. This element’s `ref` is the `Gtk.Overlay`; the picture is its main child and `overlay.get_child()` reaches it, so a second ref would be a second way to say the same thing"}}},TouchableOpacity:{tag:`GtkButton`,cssClasses:[`flat`],widgetProps:{},orientation:`vertical`,widget:t,textSink:`label`,props:{...h,pointerEvents:o,onPress:{to:`event`,signal:`clicked`},activeOpacity:{to:`refused`,why:PRESSED_STYLE_IS_CSS(`active:opacity-70`)}}},TouchableHighlight:{tag:`GtkButton`,cssClasses:[`flat`],widgetProps:{},orientation:`vertical`,widget:t,textSink:`label`,props:{...h,pointerEvents:o,onPress:{to:`event`,signal:`clicked`},activeOpacity:{to:`refused`,why:PRESSED_STYLE_IS_CSS(`active:opacity-70`)},underlayColor:{to:`refused`,why:PRESSED_STYLE_IS_CSS(`active:bg-<token>`)},onShowUnderlay:{to:`refused`,why:"see `underlayColor` — there is no underlay to show"},onHideUnderlay:{to:`refused`,why:"see `underlayColor`"}}},TouchableWithoutFeedback:{tag:`GtkBox`,widgetProps:{orientation:`vertical`},cssClasses:[],orientation:`vertical`,widget:e,textSink:null,overlayOnAbsoluteChild:{tag:`GtkOverlay`,slot:`overlay`},props:{...h,pointerEvents:o,onPress:{to:`gesture`,signal:`released`},disabled:{to:`property`,names:[`can-target`],as:`not`}}},Button:{tag:`GtkButton`,widgetProps:{},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,refusesStyle:"takes no `style` and no `className`. React Native’s own `Button` takes neither — its documented styling story is that you cannot, and you use `Pressable` when you need to — and GTK agrees: an Adwaita button is painted by the theme and by its own classes (`suggested-action`, `destructive-action`), which an application stylesheet sets. Use `<Pressable>`",props:{...a,title:{to:`property`,names:[`label`],as:`string`},onPress:{to:`event`,signal:`clicked`},disabled:{to:`property`,names:[`sensitive`],as:`not`},color:{to:`refused`,why:"is the button’s background on Android and its text colour on iOS — one prop, two meanings, and GTK has a third answer: `suggested-action` and `destructive-action` are Adwaita’s own classes for the two cases a colour is usually asking for. Set them from the application stylesheet, or use `<Pressable>`"},touchSoundDisabled:{to:`ignored`,why:`an Android touch sound; a desktop button makes none`},hasTVPreferredFocus:{to:`ignored`,why:`an Android TV focus hint`},nextFocusDown:{to:`ignored`,why:`an Android TV focus hint`},nextFocusForward:{to:`ignored`,why:`an Android TV focus hint`},nextFocusLeft:{to:`ignored`,why:`an Android TV focus hint`},nextFocusRight:{to:`ignored`,why:`an Android TV focus hint`},nextFocusUp:{to:`ignored`,why:`an Android TV focus hint`}}},SafeAreaView:{tag:`GtkBox`,widgetProps:{orientation:`vertical`},cssClasses:[],orientation:`vertical`,widget:e,textSink:null,overlayOnAbsoluteChild:{tag:`GtkOverlay`,slot:`overlay`},props:{...a,pointerEvents:o}},Icon:{tag:`GtkImage`,widgetProps:{},cssClasses:[],orientation:`vertical`,widget:t,textSink:null,props:{...a,name:{to:`property`,names:[`icon-name`],as:`string`},size:{to:`property`,names:[`pixel-size`],as:`int`},color:{to:`style-property`,name:`color`}}},KeyboardAvoidingView:{tag:`GtkBox`,widgetProps:{orientation:`vertical`},cssClasses:[],orientation:`vertical`,widget:e,textSink:null,overlayOnAbsoluteChild:{tag:`GtkOverlay`,slot:`overlay`},props:{...a,pointerEvents:o,behavior:{to:`ignored`,why:`describes how to move out of an on-screen keyboard’s way, and none appears`},keyboardVerticalOffset:{to:`ignored`,why:"see `behavior`"},enabled:{to:`ignored`,why:"see `behavior` — the avoidance is already off"},contentContainerStyle:{to:`refused`,why:"styles the inner view React Native adds to do the avoiding, and there is no avoiding here — so there is no second node to style. Put it on `style`, which lands on the one box this element is"}}},FlatList:{tag:`GtkBox`,widgetProps:{orientation:`vertical`},cssClasses:[],orientation:`vertical`,widget:e,textSink:null,content:{tag:`GtkScrolledWindow`,widgetProps:{"hscrollbar-policy":`never`,vexpand:!0,hexpand:!0},orientation:`vertical`,widget:t,styleProp:null,classNameProp:null},props:{...a,horizontal:[{to:`property`,on:`outer`,names:[`orientation`],as:`map`,map:{true:`horizontal`,false:`vertical`}},{to:`property`,on:`content`,names:[`hscrollbar-policy`],as:`map`,map:{true:`automatic`,false:`never`}},{to:`property`,on:`content`,names:[`vscrollbar-policy`],as:`map`,map:{true:`never`,false:`automatic`}}],showsVerticalScrollIndicator:{to:`property`,on:`content`,names:[`vscrollbar-policy`],as:`map`,map:{true:`automatic`,false:`external`}},showsHorizontalScrollIndicator:{to:`property`,on:`content`,names:[`hscrollbar-policy`],as:`map`,map:{true:`automatic`,false:`external`}},data:{to:`ignored`,why:`read by the component, which drives the Gio.ListStore from it`},renderItem:{to:`ignored`,why:`read by the item factory`},keyExtractor:{to:`ignored`,why:`read by the component, to key the model rows`},getItem:{to:`ignored`,why:"read by the component — VirtualizedList’s accessor form of `data`"},getItemCount:{to:`ignored`,why:"see `getItem`"},sections:{to:`ignored`,why:"read by the component — SectionList’s form of `data`"},renderSectionHeader:{to:`ignored`,why:`read by the item factory`},ListEmptyComponent:{to:`ignored`,why:`rendered by the component instead of the scroller`},ListHeaderComponent:{to:`ignored`,why:`rendered by the component, before the scroller`},ListFooterComponent:{to:`ignored`,why:`rendered by the component, after the scroller`},onEndReached:{to:`ignored`,why:`bound by the component to the scroller’s own Gtk.Adjustment`},onEndReachedThreshold:{to:`ignored`,why:"see `onEndReached`"},extraData:{to:`ignored`,why:`read by the component; a change re-renders every bound row`},onRowError:{to:`ignored`,why:`read by the component, and handed to each row’s own React root`},initialNumToRender:{to:`refused`,why:p},maxToRenderPerBatch:{to:`refused`,why:p},updateCellsBatchingPeriod:{to:`refused`,why:p},windowSize:{to:`refused`,why:p},removeClippedSubviews:{to:`refused`,why:p},getItemLayout:{to:`refused`,why:p},initialScrollIndex:{to:`refused`,why:"scrolls to a row before the first paint. `Gtk.ListView.scroll_to(position, flags, scroll_info)` is the counterpart and it is an imperative call on a realised view, not a property — reach the view through a ref and call it"},onViewableItemsChanged:{to:`refused`,why:"reports which rows are on screen. `Gtk.ListView` binds and unbinds rows itself and exposes no viewport range — the closest fact is `Gtk.ListItem:position` inside the factory, which is per row rather than a set, so a faithful answer would be a guess assembled from bind order"},viewabilityConfig:{to:`refused`,why:"see `onViewableItemsChanged`"},viewabilityConfigCallbackPairs:{to:`refused`,why:"see `onViewableItemsChanged`"},onScroll:{to:`refused`,why:"GTK reports scroll position through the `Gtk.Adjustment` objects behind the scroller’s `hadjustment`/`vadjustment` — `notify::value` on an adjustment, not a signal on the widget. `onEndReached` is the one question this layer answers from it; reach the adjustment through a ref for the rest"},scrollEventThrottle:{to:`refused`,why:"see `onScroll`"},numColumns:{to:`refused`,why:"lays the rows out in a grid, and a `Gtk.ListView` is one column of rows by construction. `Gtk.GridView` is the widget that does this and it is a different tag with a different model contract, so it is a primitive of its own rather than a prop on this one"},columnWrapperStyle:{to:`refused`,why:"see `numColumns`"},inverted:{to:`refused`,why:"draws the list bottom-up. GTK has no reversed list view; the honest equivalent is to reverse `data` yourself, which is one line and visible in the code"},refreshing:{to:`refused`,why:m},onRefresh:{to:`refused`,why:m},refreshControl:{to:`refused`,why:m},ItemSeparatorComponent:{to:`refused`,why:"puts a widget BETWEEN rows, and a `Gtk.ListView` has no between — it has rows. `Gtk.ListView:show-separators` draws the Adwaita separator itself; set it through a ref, or give the row its own bottom border with `border-b`"},stickySectionHeadersEnabled:{to:`refused`,why:"GTK’s own sticky headers are a `Gtk.ListView:header-factory` over a model that implements `Gtk.SectionModel` (MEASURED: `Gio.ListStore` does not, every selection model and `Gtk.FlattenListModel` do). This layer flattens the sections into one model with header ROWS instead, so a header scrolls with its section — which is what `stickySectionHeadersEnabled={false}` asks for and the only thing it can deliver"},keyboardShouldPersistTaps:{to:`ignored`,why:`there is no on-screen keyboard to dismiss`},keyboardDismissMode:{to:`ignored`,why:"see `keyboardShouldPersistTaps`"},contentContainerStyle:{to:`refused`,why:"styles the box React Native puts the rows in, and there is no such box: `Gtk.ListView` builds each row from the factory and owns the space between them. Style the row inside `renderItem`, or the list itself through `style`"}}}},_=Object.keys(g),v=new Set([`children`,`key`,`ref`,`className`,`style`]);export{v as FRAMEWORK_PROPS,g as PRIMITIVES,_ as PRIMITIVE_NAMES};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{PrimitiveError as e,primitiveErrorMessage as t}from"./primitives/errors.js";import{answerFor as n,isAccepted as r,propNamesOf as i,unknownPrimitiveDetail as a}from"./primitives/answers.js";import{FRAMEWORK_PROPS as o,PRIMITIVES as s,PRIMITIVE_NAMES as c}from"./primitives/table.js";const l=Object.fromEntries(Object.entries(s).filter(([,e])=>e.switchOn!==void 0).map(([e,t])=>[e,t.switchOn.prop]));function specFor(t,n){let r=s[t];if(r===void 0)throw new e(t,``,a(c));let i=r.switchOn;return i===void 0||n===void 0||n[i.prop]!==!0?r:i.whenTrue}function propAnswer(e,t,r){return n(e,specFor(e,r),t,o)}function acceptsProp(e,t,n){return r(propAnswer(e,t,n).status)}function explainProp(e,n,i){let a=propAnswer(e,n,i);return r(a.status)?null:t(e,`prop "${n}"`,a.why)}function propNames(e,t){return i(specFor(e,t))}function propTable(e){return c.flatMap(t=>propNames(t,e).map(n=>propAnswer(t,n,e)))}export{c as PRIMITIVE_NAMES,l as PRIMITIVE_VARIANTS,acceptsProp,explainProp,propAnswer,propNames,propTable};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{RouterError as e}from"./errors.js";const t=new Set([`screen`,`params`,`initial`,`state`,`path`,`pop`,`merge`]),scalar=e=>typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):null;function paramsSeenBy(e){let n={};for(let[r,i]of Object.entries(e??{})){if(t.has(r))continue;let e=scalar(i);e!==null&&(n[r]=e)}return n}function patternParams(e){let t=[];for(let n of e.split(`/`))n.startsWith(`[`)&&n.endsWith(`]`)&&t.push(n.slice(1,-1));return t}function hrefFrom(n,r){if(typeof r==`string`)return r;if(typeof r!=`object`||!r)throw new e(`unresolved-href`,`router.${n}()`,`takes a path or a { pathname, params } object, and received ${r===null?`null`:typeof r}. This used to accept the string form only, and an object reached the router as "[object Object]" — which matched no route and landed on +not-found without a word`);let{pathname:i,params:a}=r;if(typeof i!=`string`||i===``)throw new e(`unresolved-href`,`router.${n}()`,`takes a { pathname } that is a non-empty string, and received ${typeof i}`);let o=new Map(Object.entries(a??{})),s=i.split(`/`).map(t=>{if(!t.startsWith(`[`)||!t.endsWith(`]`))return t;let r=t.slice(1,-1);if(r.startsWith(`...`))throw new e(`deep-dynamic-unsupported`,`router.${n}()`,`the pathname "${i}" has a catch-all segment "${t}", and this layer does not answer for catch-all routes — the file-tree parser refuses one too. Use one [param] per segment`);if(!o.has(r))throw new e(`unresolved-href`,`router.${n}()`,`the pathname "${i}" needs a param "${r}" and params carries ${o.size===0?`none`:Object.keys(a??{}).join(`, `)}. Leaving it unfilled would send the literal "${t}" to the router, which matches no route`);let s=o.get(r);o.delete(r);let c=scalar(s);if(c===null)throw new e(`unresolved-href`,`router.${n}()`,`the param "${r}" is ${Array.isArray(s)?`an array`:typeof s}, and a URL segment is a string. useLocalSearchParams() reads segments back as strings, so a structural value could not survive the trip in either direction`);return encodeURIComponent(c)}),c=new URLSearchParams;for(let[r,i]of o){if(t.has(r))throw new e(`unresolved-href`,`router.${n}()`,`"${r}" is one of React Navigation's own nesting keys (${[...t].join(`, `)}), so useLocalSearchParams() filters it out — sending it would be a param that silently never arrives`);let a=scalar(i);if(a===null)throw new e(`unresolved-href`,`router.${n}()`,`the param "${r}" is ${Array.isArray(i)?`an array`:typeof i}, and a query value is a string. Serialise it, or put it in a store rather than in the URL`);c.append(r,a)}let l=c.toString();return l===``?s.join(`/`):`${s.join(`/`)}?${l}`}function paramsInHref(e,t){let[n,r=``]=t.split(`?`),i=e.split(`/`),a=(n??``).split(`/`),o={};for(let[e,t]of i.entries()){if(!t.startsWith(`[`)||!t.endsWith(`]`))continue;let n=a[e];n!==void 0&&(o[t.slice(1,-1)]=decodeURIComponent(n))}for(let[e,t]of new URLSearchParams(r))o[e]=t;return o}export{t as INTERNAL_PARAMS,hrefFrom,paramsInHref,paramsSeenBy,patternParams,scalar};
|
package/lib/esm/router/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ROUTER_NAMES as e,ROUTER_SUPPORT_TABLE as t,explainUnsupported as n,isImportable as r}from"../support-table.js";import{Drawer as i,ErrorBoundary as a,ExpoRoot as o,Link as s,Navigator as c,Redirect as l,Slot as u,SplashScreen as d,useFocusEffect as f,useGlobalSearchParams as p,useNavigation as m,useNavigationContainerRef as h,useRootNavigationState as g,useRouter as _,useSegments as v,useUnstableGlobalHref as y,withLayoutContext as b}from"../generated/unsupported-router
|
|
1
|
+
import{ROUTER_NAMES as e,ROUTER_SUPPORT_TABLE as t,explainUnsupported as n,isImportable as r}from"../support-table.js";import{Drawer as i,ErrorBoundary as a,ExpoRoot as o,Link as s,Navigator as c,Redirect as l,Slot as u,SplashScreen as d,useFocusEffect as f,useGlobalSearchParams as p,useNavigation as m,useNavigationContainerRef as h,useRootNavigationState as g,useRouter as _,useSegments as v,useUnstableGlobalHref as y,withLayoutContext as b}from"../generated/unsupported-router.js";import{RouterError as x}from"./errors.js";import{hrefFrom as S,paramsInHref as C,paramsSeenBy as w,patternParams as T}from"./href.js";import{buildRouteTree as E,pathConfigOf as D,screenUrls as O}from"./routes.js";import{navigationRef as k,router as A,useLocalSearchParams as j,usePathname as M}from"./navigation.js";import{componentFor as N,provideRouteNode as P,screenOptionsFrom as F,useRouteNode as I,useSynthesisedScreens as L}from"./screens.js";import{Stack as R}from"./stack.js";import{Tabs as z}from"./tabs.js";import{RouterRoot as B}from"./root.js";export{i as Drawer,a as ErrorBoundary,o as ExpoRoot,s as Link,c as Navigator,e as ROUTER_NAMES,t as ROUTER_SUPPORT_TABLE,l as Redirect,x as RouterError,B as RouterRoot,u as Slot,d as SplashScreen,R as Stack,z as Tabs,E as buildRouteTree,N as componentFor,n as explainUnsupported,S as hrefFrom,r as isImportable,k as navigationRef,C as paramsInHref,w as paramsSeenBy,D as pathConfigOf,T as patternParams,P as provideRouteNode,A as router,F as screenOptionsFrom,O as screenUrls,f as useFocusEffect,p as useGlobalSearchParams,j as useLocalSearchParams,m as useNavigation,h as useNavigationContainerRef,M as usePathname,g as useRootNavigationState,I as useRouteNode,_ as useRouter,v as useSegments,L as useSynthesisedScreens,y as useUnstableGlobalHref,b as withLayoutContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{RouterError as e}from"./errors.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{RouterError as e}from"./errors.js";import{hrefFrom as t,paramsSeenBy as n}from"./href.js";import{pathConfigOf as r,screenUrls as i}from"./routes.js";import{useSyncExternalStore as a}from"react";import{CommonActions as o,StackActions as s,createNavigationContainerRef as c,getActionFromState as l,getPathFromState as u,getStateFromPath as d,useRoute as f}from"@react-navigation/core";const p=c(),upstream=e=>e;let m=null;const h=new Set,liveRootState=()=>p.isReady()?p.getRootState():void 0;function installRouter(t){if(m!==null)throw new e(`no-router-mounted`,`RouterRoot`,"is already mounted. `router` is a module-level object — the shape of the name being reproduced — so one process routes one tree. Render one RouterRoot and nest navigators inside it");m={tree:t,config:r(t)}}function uninstallRouter(){m=null,notifyStateChanged()}function notifyStateChanged(){for(let e of h)e()}function required(t){if(m===null)throw new e(`no-router-mounted`,`router.${t}()`,`was called with no router mounted. Render <RouterRoot manifest={…}> above the tree that calls it — the manifest is the bundler plugin’s virtual module`);return m}function readyContainer(t){if(required(t),!p.isReady())throw new e(`no-router-mounted`,`router.${t}()`,`was called before the navigation container was ready. A container becomes ready during the first commit, so this is a call from a module body or from a render — move it into an effect or an event handler`);return p}function resolve(t,n){let{tree:r,config:a}=required(t),o=d(n,upstream(a));if(o===void 0)throw new e(`unresolved-href`,n,`matches no route. The manifest holds: ${i(r).join(`, `)}. A \`+not-found.tsx\` catches everything else`);return o}function focusChain(e){let t=[],n=e;for(;n!==void 0;){let e=n.index??n.routes.length-1,r=n.routes[e];if(r===void 0)break;t.push({name:r.name,...r.params===void 0?{}:{params:r.params}}),n=r.state}return t}function targetFor(e){let t=liveRootState();for(let[n,r]of e.entries()){if(t===void 0)return null;if(n===e.length-1)return t.routeNames.includes(r.name)?{key:t.key,type:t.type}:null;let i=t.routes.find(e=>e.name===r.name);if(i===void 0)return null;t=i.state}return null}function pushOrReplace(e,n){let r=t(e,n),i=readyContainer(e),{config:a}=required(e),c=resolve(e,r),u=focusChain(c),d=u[u.length-1],f=targetFor(u);if(d!==void 0&&f!==null&&f.type===`stack`){let t=e===`push`?s.push(d.name,d.params):s.replace(d.name,d.params);i.dispatch({...t,target:f.key});return}let p=l(c,upstream(a));i.dispatch(p??o.reset(c))}const g={push(e){pushOrReplace(`push`,e)},navigate(e){let n=readyContainer(`navigate`),{config:r}=required(`navigate`),i=resolve(`navigate`,t(`navigate`,e)),a=l(i,upstream(r));n.dispatch(a??o.reset(i))},replace(e){pushOrReplace(`replace`,e)},back(){let t=readyContainer(`back`);if(!t.canGoBack())throw new e(`unresolved-href`,`router.back()`,`has nothing to go back to — this is the first screen in the history. Guard the call, or use router.replace() to leave a screen that cannot be popped`);t.dispatch(o.goBack())},canGoBack(){return m===null||!p.isReady()?!1:p.canGoBack()},dismiss(){throw dismissRefusal(`dismiss`)},dismissAll(){throw dismissRefusal(`dismissAll`)},dismissTo(){throw dismissRefusal(`dismissTo`)},setParams(){throw new e(`unresolved-href`,`router.setParams()`,"edits the current route’s params in place, so the URL stops describing the screen — `usePathname()` would answer for a path whose params are no longer the route’s. Navigate with `router.replace({ pathname, params })` instead, which changes both together")}},dismissRefusal=t=>new e(`unresolved-href`,`router.${t}()`,"dismisses a MODAL, and this layer has no modal stack to dismiss from: `<Modal>` is `planned` in the support table because an `Adw.Dialog` is PRESENTED against a parent rather than parented by it, which needs a portal seam the host does not have. `router.back()` pops the navigation stack"),subscribe=e=>(h.add(e),()=>{h.delete(e)}),currentPathname=()=>{let e=liveRootState();if(m===null||e===void 0)return`/`;let t=u(e,upstream(m.config)),n=t.indexOf(`?`);return n===-1?t:t.slice(0,n)};function usePathname(){return a(subscribe,currentPathname,currentPathname)}function useLocalSearchParams(){return n(f().params)}export{installRouter,p as navigationRef,notifyStateChanged,g as router,uninstallRouter,useLocalSearchParams,usePathname};
|
package/lib/esm/router/tabs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{RouterError as e}from"./errors.js";import{navigationPair as t,screenOptionsFrom as n,useRouteNode as r,useSynthesisedScreens as i}from"./screens.js";import{createElement as a,useCallback as o,useLayoutEffect as s,useRef as c}from"react";import{TabActions as l,TabRouter as u,useNavigationBuilder as d}from"@react-navigation/core";const f=[`title`];function TabsView(t){let{state:n,descriptors:r,navigation:i,NavigationContent:f}=d(u,t),p=c(null),m=c(null),h=n.routes[n.index]?.key;s(()=>{let e=m.current,t=p.current;e!==null&&t!==null&&e.get_stack()!==t&&e.set_stack(t)}),s(()=>{let e=p.current;e===null||h===void 0||
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{RouterError as e}from"./errors.js";import{navigationPair as t,screenOptionsFrom as n,useRouteNode as r,useSynthesisedScreens as i}from"./screens.js";import{createElement as a,useCallback as o,useLayoutEffect as s,useRef as c}from"react";import{TabActions as l,TabRouter as u,useNavigationBuilder as d}from"@react-navigation/core";const f=[`title`];function showFocusedPage(e,t){if(e.get_visible_child_name()===t)return!0;let n=e.get_child_by_name(t);return n===null||!n.get_visible()?!1:(e.set_visible_child_name(t),!0)}function TabsView(t){let{state:n,descriptors:r,navigation:i,NavigationContent:f}=d(u,t),p=c(null),m=c(null),h=n.routes[n.index]?.key;s(()=>{let e=m.current,t=p.current;e!==null&&t!==null&&e.get_stack()!==t&&e.set_stack(t)}),s(()=>{let e=p.current;e===null||h===void 0||showFocusedPage(e,h)});let g=o(()=>{let t=p.current;if(t===null)return;let n=t.get_visible_child_name();if(n===null)return;let r=i.getState();if(n===r.routes[r.index]?.key)return;let a=r.routes.find(e=>e.key===n);if(a===void 0)throw new e(`no-route-node`,`<Tabs> page "${n}"`,`became visible and belongs to no route in this navigator. Every page is added under its route key, so this means something outside the router added a child to the Adw.ViewStack`);if(i.emit({type:`tabPress`,target:a.key,canPreventDefault:!0}).defaultPrevented){showFocusedPage(t,r.routes[r.index]?.key??n);return}i.dispatch({...l.jumpTo(a.name,a.params),target:r.key})},[i]),_=n.routes.map(t=>{let n=r[t.key];if(n===void 0)throw new e(`no-route-node`,`<Tabs> route "${t.name}"`,`has no descriptor. React Navigation builds one per screen, so this is a route the navigator never received a <Screen> for`);return a(`AdwBin`,{key:t.key,layout:{name:t.key,title:n.options.title??t.name}},n.render())}),v=a(`AdwViewStack`,{ref:p,"on:notify::visible-child-name":g},..._);return t.headerShown===!1?a(f,null,v):a(f,null,a(`AdwToolbarView`,null,a(`AdwHeaderBar`,{slot:`top`},a(`AdwViewSwitcher`,{slot:`title`,ref:m,policy:`wide`})),v))}TabsView.displayName=`GjsifyTabsView`;const p=t(TabsView);function TabsScreen(t){throw new e(`not-a-screen-child`,`<Tabs.Screen>`,"was rendered instead of being read. It is a declaration: `<Tabs>` collects its `name` and `options` and never renders it, so it only belongs as a direct child of `<Tabs>`")}TabsScreen.displayName=`Tabs.Screen`;function Tabs(e){let t=r(`Tabs`),o=n(`Tabs`,TabsScreen,f,e.children),s=i(t,p.Screen,o);return a(p.Navigator,{...e.screenOptions===void 0?{}:{screenOptions:e.screenOptions},...e.headerShown===void 0?{}:{headerShown:e.headerShown}},...s)}Tabs.Screen=TabsScreen;export{Tabs,showFocusedPage};
|
package/lib/esm/solid/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../_virtual/_rolldown/runtime.js";import{
|
|
1
|
+
import"../_virtual/_rolldown/runtime.js";import{accessor as e}from"../accessor.js";import{PrimitiveError as t}from"../primitives/errors.js";import{onLiveRegion as n}from"../announce.js";import{createHandle as r}from"../primitives/handles.js";import{resolvePrimitive as i}from"../primitives/resolve.js";import{styleConfig as a}from"../style-config.js";import{createContext as o,createMemo as s,createSignal as c,onCleanup as l,onMount as u,untrack as d,useContext as f}from"solid-js";import{createComponent as p,createElement as m,effect as h,insert as g,insertNode as _,mount as v,setProp as y,widgetOf as b}from"@gjsify/gtk-host/solid";const x=o(()=>null),S=new WeakSet,C=new WeakMap,w={absolute:1,count:1,text:!1},sameContext=(e,t)=>JSON.stringify(e)===JSON.stringify(t),sameValue=(e,t)=>Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t;function element(e,t){let o=t,p=a(),v=f(x),[T,E]=c(null),D=s(()=>{let t=v();return i(e,o,{tokens:p.tokens,sheet:p.sheet,...t===null?{}:{parent:t},children:T()??w})}),O=d(D).childContext.overlay,k=s(()=>({...D().childContext,overlay:O}),void 0,{equals:sameContext}),A=childrenUnder(o,k);assertOwnChildren(e,A(),k),E(factsOf(e,A()));let j=d(D),M=m(j.node.tag),N=j.content===null?null:m(j.content.tag);j.slot!==null&&S.add(M),C.set(M,v);for(let[e,t]of Object.entries(dispatchers(j.events,o,M)))y(M,e,t);j.announcements.length>0&&u(()=>{let e=b(M),t=j.announcements.map(t=>n(e,t));l(()=>{for(let e of t)e()})});let P={},F={};h(()=>{let t=D();assertStableShape(e,j,t),writeProps(M,P,{...v()?.props,...t.node.props,...t.slot===null?{}:{slot:t.slot},...classProp(t.node)}),N!==null&&t.content!==null&&writeProps(N,F,{...t.content.props,...classProp(t.content)})});let I=o.ref;typeof I==`function`&&u(()=>I(r(j.handle,b(M),j.node.tag))),N!==null&&_(M,N);let L=N??M;if(j.absoluteSlot===null)g(L,A);else{g(L,()=>split(A()).ordinary);for(let e of split(d(A)).slotted)_(M,e)}return M}function childrenUnder(e,t){let n=x.Provider;return p(n,{value:t,get children(){return e.children}})}function assertOwnChildren(e,n,r){for(let i of Array.isArray(n)?n:[n]){if(typeof i!=`object`||!i)continue;let n=C.get(i);if(!(n===void 0||n===r))throw new t(e,`children`,"contains an element that was built BEFORE this one, so it resolved outside this element's context: it never learned this parent's orientation or its inherited alignment, and the loss is silent — `flex-1` stays unresolved and `items-center` never reaches it. Pass children lazily, `get children() { return … }`, which is what every Solid JSX compiler emits and the reason Solid's context works at all")}}function factsOf(e,n){let r=(Array.isArray(n)?n:[n]).filter(e=>e!=null&&typeof e!=`boolean`),i=0,a=!1;for(let n of r)if(typeof n==`string`||typeof n==`number`)a=!0;else if(typeof n==`function`)throw new t(e,`children`,"was given a function that takes an argument. Children-as-a-function-of-`{ pressed }` is implemented in the REACT binding and not in this one, and the difference is Solid's own: a component body runs once, so the press state would have to arrive as a SIGNAL the child reads rather than as a value the parent re-renders with — a different design, not a port of the React one. Write `className=\"active:opacity-70\"`, which is the GTK CSS `:active` pseudo-class (ADR 0032 § 7) and what nearly every use of the function form is asking for. A zero-argument accessor is Solid's own dynamic child and never reaches this refusal");else typeof n==`object`&&n&&S.has(n)&&i++;return{absolute:i,count:r.length,text:a}}function split(e){let t=Array.isArray(e)?e:[e],n=[],r=[];for(let e of t)typeof e==`object`&&e&&S.has(e)?r.push(e):n.push(e);return{ordinary:n,slotted:r}}function dispatchers(t,n,r){let i={};for(let a of t)i[`on:${a.signal}`]=()=>{let t=n[a.prop];if(typeof t==`function`){if(a.read===null){t();return}t(b(r)[e(a.read)])}};return i}function writeProps(e,t,n){for(let r of Object.keys(t))r in n||(y(e,r,void 0),delete t[r]);for(let[r,i]of Object.entries(n))sameValue(t[r],i)||(y(e,r,i),t[r]=i)}const classProp=e=>e.cssClasses.length===0?{}:{"css-classes":[...e.cssClasses]};function assertStableShape(e,n,r){let shape=e=>[e.node.tag,e.content?.tag??`-`,e.events.map(e=>`${e.prop}>${e.signal}`).join(`,`),e.announcements.map(e=>`${e.signal}>${e.priority}`).join(`,`)].join(`|`),i=shape(n),a=shape(r);if(i!==a)throw new t(e,`reactive update`,`would change the element from ${i} to ${a}, and a Solid element is created once — there is no reconciler pass that could swap the widget. Split the branches into two elements under a <Show>, where each one is created for its own shape`)}function View(e){return element(`View`,e)}function Text(e){return element(`Text`,e)}function Pressable(e){return element(`Pressable`,e)}function ScrollView(e){return element(`ScrollView`,e)}function ActivityIndicator(e){return element(`ActivityIndicator`,e)}function TextInput(e){return element(`TextInput`,e)}function Switch(e){return element(`Switch`,e)}export{ActivityIndicator,Pressable,ScrollView,Switch,Text,TextInput,View,v as mount};
|
package/lib/esm/stylesheet.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./_virtual/_rolldown/runtime.js";import{PrimitiveError as e}from"./primitives/errors.js";import{
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{PrimitiveError as e}from"./primitives/errors.js";import{flattenStyle as t}from"./primitives/style.js";import{hairlineWidth as n}from"./apis/display.js";const r={position:`absolute`,top:0,right:0,bottom:0,left:0},i={create(e){return e},flatten(e){return t(e)},compose(e,t){return e==null||e===!1?t:t==null||t===!1?e:[e,t]},get hairlineWidth(){return n()},absoluteFill:r,absoluteFillObject:r,setStyleAttributePreprocessor(){throw new e(`StyleSheet`,`setStyleAttributePreprocessor`,"installs a process-wide transform on every style value, which this layer answers with a scoped one: `configureStyle({ tokens })` is where a project’s own values enter the vocabulary (ADR 0032 § 3). A global preprocessor beside it would be a second source of truth that no element could opt out of")}};export{i as StyleSheet,r as absoluteFillObject};
|