react-native-gtkx 0.2.0-alpha.1 → 0.3.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -2
- package/dist/adw/widgets.generated.d.ts +4 -4
- package/dist/adw/widgets.generated.js +51 -51
- package/dist/adw/widgets.generated.js.map +1 -1
- package/dist/aliases/index.d.ts +84 -0
- package/dist/aliases/index.js +208 -0
- package/dist/aliases/index.js.map +1 -0
- package/dist/animated/create-animated.d.ts +2 -0
- package/dist/animated/create-animated.js +2 -0
- package/dist/animated/create-animated.js.map +1 -1
- package/dist/animated/index.d.ts +4 -0
- package/dist/animated/index.js +6 -0
- package/dist/animated/index.js.map +1 -1
- package/dist/animated/types.d.ts +1 -0
- package/dist/animated/types.js.map +1 -1
- package/dist/animated/value-animation.js +17 -4
- package/dist/animated/value-animation.js.map +1 -1
- package/dist/animated/value-xy.d.ts +41 -0
- package/dist/animated/value-xy.js +90 -0
- package/dist/animated/value-xy.js.map +1 -0
- package/dist/animated/value.d.ts +9 -0
- package/dist/animated/value.js +30 -2
- package/dist/animated/value.js.map +1 -1
- package/dist/apis/host.gtkx.js +9 -12
- package/dist/apis/host.gtkx.js.map +1 -1
- package/dist/apis/index.d.ts +4 -2
- package/dist/apis/index.js +2 -0
- package/dist/apis/index.js.map +1 -1
- package/dist/apis/keyboard.d.ts +60 -0
- package/dist/apis/keyboard.js +63 -0
- package/dist/apis/keyboard.js.map +1 -0
- package/dist/apis/log-box.d.ts +15 -0
- package/dist/apis/log-box.js +46 -0
- package/dist/apis/log-box.js.map +1 -0
- package/dist/apis/platform.d.ts +18 -1
- package/dist/apis/platform.js.map +1 -1
- package/dist/common/icon.d.ts +23 -0
- package/dist/common/icon.js +14 -0
- package/dist/common/icon.js.map +1 -0
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.js +25 -0
- package/dist/common/index.js.map +1 -1
- package/dist/common/widget.d.ts +1 -22
- package/dist/common/widget.js +75 -8
- package/dist/common/widget.js.map +1 -1
- package/dist/components/animated.d.ts +73 -7
- package/dist/components/animated.js +560 -45
- package/dist/components/animated.js.map +1 -1
- package/dist/components/app-registry.d.ts +26 -0
- package/dist/components/app-registry.js.map +1 -1
- package/dist/components/driven-size.d.ts +27 -0
- package/dist/components/driven-size.js +85 -0
- package/dist/components/driven-size.js.map +1 -0
- package/dist/components/find-node-handle.d.ts +11 -0
- package/dist/components/find-node-handle.js +53 -0
- package/dist/components/find-node-handle.js.map +1 -0
- package/dist/components/flat-list.d.ts +3 -2
- package/dist/components/flat-list.js.map +1 -1
- package/dist/components/frame-scheduler.d.ts +16 -0
- package/dist/components/frame-scheduler.js +37 -0
- package/dist/components/frame-scheduler.js.map +1 -0
- package/dist/components/host-node.d.ts +7 -0
- package/dist/components/host-node.js +26 -1
- package/dist/components/host-node.js.map +1 -1
- package/dist/components/image.d.ts +6 -1
- package/dist/components/image.js +15 -4
- package/dist/components/image.js.map +1 -1
- package/dist/components/index.d.ts +11 -5
- package/dist/components/index.js +7 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/measure.d.ts +63 -0
- package/dist/components/measure.js +150 -0
- package/dist/components/measure.js.map +1 -0
- package/dist/components/modal.d.ts +1 -1
- package/dist/components/press-event.d.ts +28 -0
- package/dist/components/press-event.js +46 -0
- package/dist/components/press-event.js.map +1 -0
- package/dist/components/pressable.d.ts +63 -7
- package/dist/components/pressable.js +165 -12
- package/dist/components/pressable.js.map +1 -1
- package/dist/components/rect-store.d.ts +58 -0
- package/dist/components/rect-store.js +124 -3
- package/dist/components/rect-store.js.map +1 -1
- package/dist/components/root.js +6 -1
- package/dist/components/root.js.map +1 -1
- package/dist/components/scroll-phase.d.ts +35 -0
- package/dist/components/scroll-phase.js +26 -0
- package/dist/components/scroll-phase.js.map +1 -0
- package/dist/components/scroll-view.d.ts +43 -3
- package/dist/components/scroll-view.js +386 -45
- package/dist/components/scroll-view.js.map +1 -1
- package/dist/components/text-input.js +9 -25
- package/dist/components/text-input.js.map +1 -1
- package/dist/components/text.d.ts +6 -2
- package/dist/components/text.js +68 -9
- package/dist/components/text.js.map +1 -1
- package/dist/components/use-focus.d.ts +27 -0
- package/dist/components/use-focus.js +116 -0
- package/dist/components/use-focus.js.map +1 -0
- package/dist/components/use-layout-child.d.ts +13 -1
- package/dist/components/use-layout-child.js +205 -19
- package/dist/components/use-layout-child.js.map +1 -1
- package/dist/components/view.d.ts +12 -4
- package/dist/components/view.js +25 -14
- package/dist/components/view.js.map +1 -1
- package/dist/components/virtualized-list.d.ts +45 -5
- package/dist/components/virtualized-list.js +90 -24
- package/dist/components/virtualized-list.js.map +1 -1
- package/dist/components/wheel-scroll-session.d.ts +7 -0
- package/dist/components/wheel-scroll-session.js +53 -0
- package/dist/components/wheel-scroll-session.js.map +1 -0
- package/dist/components/widget-retention.d.ts +35 -0
- package/dist/components/widget-retention.js +169 -0
- package/dist/components/widget-retention.js.map +1 -0
- package/dist/contracts.d.ts +23 -3
- package/dist/contracts.js.map +1 -1
- package/dist/dnd/context.d.ts +69 -0
- package/dist/dnd/context.js +149 -0
- package/dist/dnd/context.js.map +1 -0
- package/dist/dnd/draggable.d.ts +59 -0
- package/dist/dnd/draggable.js +149 -0
- package/dist/dnd/draggable.js.map +1 -0
- package/dist/dnd/droppable.d.ts +24 -0
- package/dist/dnd/droppable.js +74 -0
- package/dist/dnd/droppable.js.map +1 -0
- package/dist/dnd/gtk-controllers.d.ts +39 -0
- package/dist/dnd/gtk-controllers.js +110 -0
- package/dist/dnd/gtk-controllers.js.map +1 -0
- package/dist/dnd/index.d.ts +6 -0
- package/dist/dnd/index.js +31 -0
- package/dist/dnd/index.js.map +1 -0
- package/dist/dnd/order.d.ts +7 -0
- package/dist/dnd/order.js +20 -0
- package/dist/dnd/order.js.map +1 -0
- package/dist/dnd/payload.d.ts +14 -0
- package/dist/dnd/payload.js +41 -0
- package/dist/dnd/payload.js.map +1 -0
- package/dist/dnd/sortable.d.ts +49 -0
- package/dist/dnd/sortable.js +307 -0
- package/dist/dnd/sortable.js.map +1 -0
- package/dist/dnd/types.d.ts +290 -0
- package/dist/dnd/types.js +25 -0
- package/dist/dnd/types.js.map +1 -0
- package/dist/gesture-handler-compat/builder.d.ts +251 -0
- package/dist/gesture-handler-compat/builder.js +513 -0
- package/dist/gesture-handler-compat/builder.js.map +1 -0
- package/dist/gesture-handler-compat/composition.d.ts +23 -0
- package/dist/gesture-handler-compat/composition.js +111 -0
- package/dist/gesture-handler-compat/composition.js.map +1 -0
- package/dist/gesture-handler-compat/deciders.d.ts +3 -0
- package/dist/gesture-handler-compat/deciders.js +47 -0
- package/dist/gesture-handler-compat/deciders.js.map +1 -0
- package/dist/gesture-handler-compat/detector-runtime.d.ts +44 -0
- package/dist/gesture-handler-compat/detector-runtime.js +374 -0
- package/dist/gesture-handler-compat/detector-runtime.js.map +1 -0
- package/dist/gesture-handler-compat/detector.d.ts +22 -0
- package/dist/gesture-handler-compat/detector.js +104 -0
- package/dist/gesture-handler-compat/detector.js.map +1 -0
- package/dist/gesture-handler-compat/fling.d.ts +24 -0
- package/dist/gesture-handler-compat/fling.js +123 -0
- package/dist/gesture-handler-compat/fling.js.map +1 -0
- package/dist/gesture-handler-compat/force-touch.d.ts +13 -0
- package/dist/gesture-handler-compat/force-touch.js +40 -0
- package/dist/gesture-handler-compat/force-touch.js.map +1 -0
- package/dist/gesture-handler-compat/hooks.d.ts +157 -0
- package/dist/gesture-handler-compat/hooks.js +268 -0
- package/dist/gesture-handler-compat/hooks.js.map +1 -0
- package/dist/gesture-handler-compat/hover.d.ts +2 -0
- package/dist/gesture-handler-compat/hover.js +22 -0
- package/dist/gesture-handler-compat/hover.js.map +1 -0
- package/dist/gesture-handler-compat/index.d.ts +98 -0
- package/dist/gesture-handler-compat/index.js +255 -0
- package/dist/gesture-handler-compat/index.js.map +1 -0
- package/dist/gesture-handler-compat/long-press.d.ts +6 -0
- package/dist/gesture-handler-compat/long-press.js +21 -0
- package/dist/gesture-handler-compat/long-press.js.map +1 -0
- package/dist/gesture-handler-compat/manual.d.ts +2 -0
- package/dist/gesture-handler-compat/manual.js +18 -0
- package/dist/gesture-handler-compat/manual.js.map +1 -0
- package/dist/gesture-handler-compat/native.d.ts +7 -0
- package/dist/gesture-handler-compat/native.js +34 -0
- package/dist/gesture-handler-compat/native.js.map +1 -0
- package/dist/gesture-handler-compat/orchestrator.d.ts +77 -0
- package/dist/gesture-handler-compat/orchestrator.js +284 -0
- package/dist/gesture-handler-compat/orchestrator.js.map +1 -0
- package/dist/gesture-handler-compat/pan.d.ts +23 -0
- package/dist/gesture-handler-compat/pan.js +116 -0
- package/dist/gesture-handler-compat/pan.js.map +1 -0
- package/dist/gesture-handler-compat/recognizer.d.ts +268 -0
- package/dist/gesture-handler-compat/recognizer.js +1056 -0
- package/dist/gesture-handler-compat/recognizer.js.map +1 -0
- package/dist/gesture-handler-compat/relations.d.ts +43 -0
- package/dist/gesture-handler-compat/relations.js +128 -0
- package/dist/gesture-handler-compat/relations.js.map +1 -0
- package/dist/gesture-handler-compat/tap.d.ts +6 -0
- package/dist/gesture-handler-compat/tap.js +29 -0
- package/dist/gesture-handler-compat/tap.js.map +1 -0
- package/dist/gesture-handler-compat/touchpad.d.ts +41 -0
- package/dist/gesture-handler-compat/touchpad.js +64 -0
- package/dist/gesture-handler-compat/touchpad.js.map +1 -0
- package/dist/gesture-handler-compat/types.d.ts +441 -0
- package/dist/gesture-handler-compat/types.js +167 -0
- package/dist/gesture-handler-compat/types.js.map +1 -0
- package/dist/gtk/controllers.d.ts +39 -0
- package/dist/gtk/controllers.js +92 -0
- package/dist/gtk/controllers.js.map +1 -0
- package/dist/gtk/index.d.ts +3 -1
- package/dist/gtk/index.js +14 -1
- package/dist/gtk/index.js.map +1 -1
- package/dist/gtk/widgets.generated.d.ts +14 -14
- package/dist/gtk/widgets.generated.js +101 -102
- package/dist/gtk/widgets.generated.js.map +1 -1
- package/dist/gtk/window-actions.d.ts +77 -0
- package/dist/gtk/window-actions.js +193 -0
- package/dist/gtk/window-actions.js.map +1 -0
- package/dist/gtkx/bridge/geometry.d.ts +15 -0
- package/dist/gtkx/bridge/geometry.js +40 -0
- package/dist/gtkx/bridge/geometry.js.map +1 -0
- package/dist/gtkx/bridge/index.d.ts +7 -3
- package/dist/gtkx/bridge/index.js +12 -4
- package/dist/gtkx/bridge/index.js.map +1 -1
- package/dist/gtkx/bridge/slot-portal.d.ts +12 -0
- package/dist/gtkx/bridge/slot-portal.js +17 -0
- package/dist/gtkx/bridge/slot-portal.js.map +1 -0
- package/dist/gtkx/bridge/svg-node.js +10 -54
- package/dist/gtkx/bridge/svg-node.js.map +1 -1
- package/dist/gtkx/bridge/use-signal.js +2 -2
- package/dist/gtkx/bridge/use-signal.js.map +1 -1
- package/dist/gtkx/bridge/view-box.d.ts +56 -0
- package/dist/gtkx/bridge/view-box.js +394 -9
- package/dist/gtkx/bridge/view-box.js.map +1 -1
- package/dist/gtkx/bridge/widget-css.d.ts +17 -0
- package/dist/gtkx/bridge/widget-css.js +72 -0
- package/dist/gtkx/bridge/widget-css.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/driven-size.d.ts +12 -0
- package/dist/layout/driven-size.js +70 -0
- package/dist/layout/driven-size.js.map +1 -0
- package/dist/layout/engine.d.ts +17 -1
- package/dist/layout/engine.js +3 -20
- package/dist/layout/engine.js.map +1 -1
- package/dist/layout/node.d.ts +13 -0
- package/dist/layout/node.js +14 -0
- package/dist/layout/node.js.map +1 -1
- package/dist/layout/yoga.d.ts +3 -2
- package/dist/layout/yoga.js +5 -2
- package/dist/layout/yoga.js.map +1 -1
- package/dist/mcp/data/generated.d.ts +310 -91
- package/dist/mcp/data/generated.js +365 -90
- package/dist/mcp/data/generated.js.map +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/metro/index.d.ts +10 -0
- package/dist/metro/index.js +21 -12
- package/dist/metro/index.js.map +1 -1
- package/dist/navigation/sidebar.d.ts +47 -1
- package/dist/navigation/sidebar.js +77 -3
- package/dist/navigation/sidebar.js.map +1 -1
- package/dist/reanimated-compat/animated-ref.d.ts +32 -0
- package/dist/reanimated-compat/animated-ref.js +57 -0
- package/dist/reanimated-compat/animated-ref.js.map +1 -0
- package/dist/reanimated-compat/animation.d.ts +177 -0
- package/dist/reanimated-compat/animation.js +540 -0
- package/dist/reanimated-compat/animation.js.map +1 -0
- package/dist/reanimated-compat/color.d.ts +28 -0
- package/dist/reanimated-compat/color.js +249 -0
- package/dist/reanimated-compat/color.js.map +1 -0
- package/dist/reanimated-compat/decay.d.ts +39 -0
- package/dist/reanimated-compat/decay.js +96 -0
- package/dist/reanimated-compat/decay.js.map +1 -0
- package/dist/reanimated-compat/easing.d.ts +30 -0
- package/dist/reanimated-compat/easing.js +76 -0
- package/dist/reanimated-compat/easing.js.map +1 -0
- package/dist/reanimated-compat/hooks.d.ts +14 -0
- package/dist/reanimated-compat/hooks.js +217 -0
- package/dist/reanimated-compat/hooks.js.map +1 -0
- package/dist/reanimated-compat/index.d.ts +258 -0
- package/dist/reanimated-compat/index.js +464 -0
- package/dist/reanimated-compat/index.js.map +1 -0
- package/dist/reanimated-compat/interpolation.d.ts +18 -0
- package/dist/reanimated-compat/interpolation.js +122 -0
- package/dist/reanimated-compat/interpolation.js.map +1 -0
- package/dist/reanimated-compat/layout-animation-config.d.ts +43 -0
- package/dist/reanimated-compat/layout-animation-config.js +78 -0
- package/dist/reanimated-compat/layout-animation-config.js.map +1 -0
- package/dist/reanimated-compat/layout-animation-presets.d.ts +117 -0
- package/dist/reanimated-compat/layout-animation-presets.js +498 -0
- package/dist/reanimated-compat/layout-animation-presets.js.map +1 -0
- package/dist/reanimated-compat/layout-animation-runtime.d.ts +21 -0
- package/dist/reanimated-compat/layout-animation-runtime.js +311 -0
- package/dist/reanimated-compat/layout-animation-runtime.js.map +1 -0
- package/dist/reanimated-compat/layout-animation-view.d.ts +27 -0
- package/dist/reanimated-compat/layout-animation-view.js +266 -0
- package/dist/reanimated-compat/layout-animation-view.js.map +1 -0
- package/dist/reanimated-compat/layout-animation.d.ts +171 -0
- package/dist/reanimated-compat/layout-animation.js +469 -0
- package/dist/reanimated-compat/layout-animation.js.map +1 -0
- package/dist/reanimated-compat/layout-transitions.d.ts +83 -0
- package/dist/reanimated-compat/layout-transitions.js +350 -0
- package/dist/reanimated-compat/layout-transitions.js.map +1 -0
- package/dist/reanimated-compat/mutable.d.ts +29 -0
- package/dist/reanimated-compat/mutable.js +139 -0
- package/dist/reanimated-compat/mutable.js.map +1 -0
- package/dist/reanimated-compat/props.d.ts +18 -0
- package/dist/reanimated-compat/props.js +111 -0
- package/dist/reanimated-compat/props.js.map +1 -0
- package/dist/reanimated-compat/scroll-handler.d.ts +119 -0
- package/dist/reanimated-compat/scroll-handler.js +274 -0
- package/dist/reanimated-compat/scroll-handler.js.map +1 -0
- package/dist/reanimated-compat/scroll-offset.d.ts +12 -0
- package/dist/reanimated-compat/scroll-offset.js +104 -0
- package/dist/reanimated-compat/scroll-offset.js.map +1 -0
- package/dist/reanimated-compat/style.d.ts +90 -0
- package/dist/reanimated-compat/style.js +452 -0
- package/dist/reanimated-compat/style.js.map +1 -0
- package/dist/reanimated-compat/test-timers.d.ts +28 -0
- package/dist/reanimated-compat/test-timers.js +136 -0
- package/dist/reanimated-compat/test-timers.js.map +1 -0
- package/dist/reanimated-compat/threads.d.ts +13 -0
- package/dist/reanimated-compat/threads.js +41 -0
- package/dist/reanimated-compat/threads.js.map +1 -0
- package/dist/reanimated-compat/tracking.d.ts +41 -0
- package/dist/reanimated-compat/tracking.js +106 -0
- package/dist/reanimated-compat/tracking.js.map +1 -0
- package/dist/reanimated-compat/updater-animations.d.ts +36 -0
- package/dist/reanimated-compat/updater-animations.js +273 -0
- package/dist/reanimated-compat/updater-animations.js.map +1 -0
- package/dist/responder/system.d.ts +100 -0
- package/dist/responder/system.js +304 -0
- package/dist/responder/system.js.map +1 -0
- package/dist/responder/touch-history.d.ts +10 -0
- package/dist/responder/touch-history.js +78 -0
- package/dist/responder/touch-history.js.map +1 -0
- package/dist/responder/types.d.ts +63 -0
- package/dist/responder/types.js +29 -0
- package/dist/responder/types.js.map +1 -0
- package/dist/responder/use-responder.d.ts +23 -0
- package/dist/responder/use-responder.js +317 -0
- package/dist/responder/use-responder.js.map +1 -0
- package/dist/runner/host-dev.js +4 -2
- package/dist/runner/host-dev.js.map +1 -1
- package/dist/runner/host.js +6 -2
- package/dist/runner/host.js.map +1 -1
- package/dist/runner/index.js +3 -3
- package/dist/runner/index.js.map +1 -1
- package/dist/sea/gtkx-config-module.js +2 -2
- package/dist/sea/gtkx-config-module.js.map +1 -1
- package/dist/style/absolute-insets.d.ts +26 -0
- package/dist/style/absolute-insets.js +113 -0
- package/dist/style/absolute-insets.js.map +1 -0
- package/dist/style/animated-size.d.ts +25 -0
- package/dist/style/animated-size.js +225 -0
- package/dist/style/animated-size.js.map +1 -0
- package/dist/style/box-shadow.d.ts +7 -0
- package/dist/style/box-shadow.js +197 -0
- package/dist/style/box-shadow.js.map +1 -0
- package/dist/style/colors.d.ts +17 -0
- package/dist/style/colors.js +25 -6
- package/dist/style/colors.js.map +1 -1
- package/dist/style/imperative-css.d.ts +21 -0
- package/dist/style/imperative-css.js +63 -0
- package/dist/style/imperative-css.js.map +1 -0
- package/dist/style/index.d.ts +4 -1
- package/dist/style/index.js +4 -1
- package/dist/style/index.js.map +1 -1
- package/dist/style/split-style.d.ts +5 -2
- package/dist/style/split-style.js +36 -3
- package/dist/style/split-style.js.map +1 -1
- package/dist/style/text-decoration.d.ts +15 -0
- package/dist/style/text-decoration.js +26 -0
- package/dist/style/text-decoration.js.map +1 -0
- package/dist/style/visual-css.js +37 -1
- package/dist/style/visual-css.js.map +1 -1
- package/dist/svg/gradient-geometry.js +2 -5
- package/dist/svg/gradient-geometry.js.map +1 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/unsupported-export.d.ts +8 -0
- package/dist/unsupported-export.js +66 -0
- package/dist/unsupported-export.js.map +1 -0
- package/dist/vendor/react-native/pan-responder.d.ts +102 -0
- package/dist/vendor/react-native/pan-responder.js +196 -0
- package/dist/vendor/react-native/pan-responder.js.map +1 -0
- package/dist/vendor/react-native/touch-history-math.d.ts +18 -0
- package/dist/vendor/react-native/touch-history-math.js +102 -0
- package/dist/vendor/react-native/touch-history-math.js.map +1 -0
- package/dist/vite/index.d.ts +21 -8
- package/dist/vite/index.js +127 -82
- package/dist/vite/index.js.map +1 -1
- package/dist/vitest/index.d.ts +2 -2
- package/dist/vitest/index.js.map +1 -1
- package/dist/worklets-compat/index.d.ts +4 -0
- package/dist/worklets-compat/index.js +28 -0
- package/dist/worklets-compat/index.js.map +1 -0
- package/dist/worklets-compat/surface.d.ts +110 -0
- package/dist/worklets-compat/surface.js +153 -0
- package/dist/worklets-compat/surface.js.map +1 -0
- package/package.json +25 -9
- package/types.d.ts +9 -0
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ And the portability proof — `examples/profile` renders ONE source file with bo
|
|
|
31
31
|
|
|
32
32
|
- [x] Yoga + GtkFixed spike — **GO** (0 px accuracy, 500-node reflow in 0.17 ms, 60 fps — `docs/research/yoga-gtk-spike.md`)
|
|
33
33
|
- [x] Dev environment (UTM VM with a native GNOME session, headless sway for tests) and dev workflow
|
|
34
|
-
- [x] gtkx bridge (isolation from the RC API; [workaround catalog](https://github.com/itsmepetrov/react-native-gtkx/blob/main/docs/gtkx-
|
|
34
|
+
- [x] gtkx bridge (isolation from the RC API; [workaround catalog](https://github.com/itsmepetrov/react-native-gtkx/blob/main/docs/gtkx-rc4-notes.md))
|
|
35
35
|
- [x] Layout engine (Yoga shadow tree, measure via Pango, batching, diffing, onLayout)
|
|
36
36
|
- [x] StyleSheet: layout/visual split, CSS Color 4 colors, PlatformColor → Adwaita
|
|
37
37
|
- [x] View / Text / Image / AppRegistry — first RN render in GTK
|
|
@@ -44,7 +44,7 @@ And the portability proof — `examples/profile` renders ONE source file with bo
|
|
|
44
44
|
- [x] **Fast Refresh on both toolchains**: `run-linux --dev` (Metro dev server + HMR in the GTK host, state preserved) and `gtkx dev` (vite)
|
|
45
45
|
- [x] **Navigation on real Adwaita widgets**: react-navigation navigators backed by `Adw.NavigationView` and `Adw.NavigationSplitView` — see below
|
|
46
46
|
|
|
47
|
-
Verified live: `examples/hn-app` (a Hacker News reader on the Metro path), `examples/gallery` (the whole surface
|
|
47
|
+
Verified live: `examples/hn-app` (a Hacker News reader on the Metro path), `examples/gallery` (the whole surface, 32 sections), and `examples/tasks-app` (a full GNOME task manager — a port of the [gtkx tutorial](https://gtkx.dev/tutorial/)'s Tasks app, and the platform's most demanding app so far) — 1,647 tests (unit + component tests under headless Wayland).
|
|
48
48
|
|
|
49
49
|
## Navigation is native, not redrawn
|
|
50
50
|
|
|
@@ -98,11 +98,23 @@ GTK allocation. Two orders of magnitude of headroom against a 60 fps frame
|
|
|
98
98
|
budget, measured, not estimated (see docs/research/yoga-gtk-spike.md and
|
|
99
99
|
docs/research/layout-manager.md).
|
|
100
100
|
|
|
101
|
+
Those are this layer's own costs, and a scrolling-list study measured what
|
|
102
|
+
share of a real frame they are: 0.6 ms of a 44.5 ms frame at full screen,
|
|
103
|
+
where the rest is software rasterization on a GPU-less test VM. Windowed,
|
|
104
|
+
a `FlatList` is indistinguishable from a native `GtkScrolledWindow`. Read
|
|
105
|
+
that as "the compatibility layer is not what costs frames on that rig"
|
|
106
|
+
rather than as an absolute — the same study retracted an earlier headline
|
|
107
|
+
number that had compared two different window sizes
|
|
108
|
+
(docs/research/scroll-performance.md).
|
|
109
|
+
|
|
101
110
|
## Documentation
|
|
102
111
|
|
|
103
112
|
- [Getting Started](https://github.com/itsmepetrov/react-native-gtkx/blob/main/docs/getting-started.md) — a new project in a minute, and adding Linux to an existing RN app;
|
|
104
113
|
- [API v1](https://github.com/itsmepetrov/react-native-gtkx/blob/main/docs/api.md) — the full surface and differences from RN;
|
|
105
114
|
- [The platform layer](https://github.com/itsmepetrov/react-native-gtkx/blob/main/docs/platform-layer.md) — `react-native-gtkx/gtk` and `react-native-gtkx/adw`: Adwaita and GTK widgets as React components, driven by React Native style, usable with your own router or none at all;
|
|
115
|
+
- [Gestures](https://github.com/itsmepetrov/react-native-gtkx/blob/main/docs/gestures.md) — the responder system and `PanResponder` on GTK: which layer to reach for, how the negotiation works, every difference from React Native, and what to do about `react-native-gesture-handler`;
|
|
116
|
+
- [Drag and drop](https://github.com/itsmepetrov/react-native-gtkx/blob/main/docs/api.md#drag-and-drop-react-native-gtkxdnd) — `react-native-gtkx/dnd`: `react-native-reanimated-dnd`'s API on GTK's own drag-and-drop, aliased by both bundler presets (along with `GestureHandlerRootView`) so an app that already has drag-and-drop adds a Linux build without touching its source. That claim is tested by running **upstream's own example app** here: [`examples/reanimated-dnd`](examples/reanimated-dnd/README.md), whose README lists every line the port had to change;
|
|
117
|
+
- [Reanimated](https://github.com/itsmepetrov/react-native-gtkx/blob/main/docs/api.md#react-native-reanimated-react-native-gtkxreanimated) — `react-native-gtkx/reanimated`: shared values, `useAnimatedStyle` and the `with*` animations reimplemented on one runtime and aliased onto the package name, plus the honest boundary of what a widget can be told without a React render;
|
|
106
118
|
- [Navigation research](https://github.com/itsmepetrov/react-native-gtkx/blob/main/docs/research/navigation-extensibility.md) — the two layers, how an existing react-navigation app ports, and why the other desktop RN platforms never got native navigation;
|
|
107
119
|
- [What we need from gtkx](https://github.com/itsmepetrov/react-native-gtkx/blob/main/docs/upstream-gtkx.md) — the standing upstream agenda (bugs with repros, API asks, workarounds we want to delete);
|
|
108
120
|
- [CONTRIBUTING](https://github.com/itsmepetrov/react-native-gtkx/blob/main/CONTRIBUTING.md) — developing the library (from macOS — via the UTM VM).
|
|
@@ -44,19 +44,19 @@ export declare const AdwViewSwitcherSidebar: React.ComponentType<import("@gtkx/j
|
|
|
44
44
|
export declare const AdwViewSwitcherTitle: React.ComponentType<import("@gtkx/jsx/adw").AdwViewSwitcherTitleProps<import("@gtkx/gi/adw").ViewSwitcherTitle> & import("../common").ReactNativeLayoutProps>;
|
|
45
45
|
export declare const AdwWindowTitle: React.ComponentType<import("@gtkx/jsx/adw").AdwWindowTitleProps<import("@gtkx/gi/adw").WindowTitle> & import("../common").ReactNativeLayoutProps>;
|
|
46
46
|
export declare const AdwWrapBox: React.ComponentType<import("@gtkx/jsx/adw").AdwWrapBoxProps<import("@gtkx/gi/adw").WrapBox> & import("../common").ReactNativeLayoutProps>;
|
|
47
|
-
export { AdwAboutWindow, // toplevel (
|
|
47
|
+
export { AdwAboutWindow, // toplevel (implements GtkRoot)
|
|
48
48
|
AdwActionRow, // child-only (derives Gtk.ListBoxRow)
|
|
49
|
-
AdwApplicationWindow, // toplevel (
|
|
49
|
+
AdwApplicationWindow, // toplevel (implements GtkRoot)
|
|
50
50
|
AdwButtonRow, // child-only (derives Gtk.ListBoxRow)
|
|
51
51
|
AdwComboRow, // child-only (derives Gtk.ListBoxRow)
|
|
52
52
|
AdwEntryRow, // child-only (derives Gtk.ListBoxRow)
|
|
53
53
|
AdwExpanderRow, // child-only (derives Gtk.ListBoxRow)
|
|
54
|
-
AdwMessageDialog, // toplevel (
|
|
54
|
+
AdwMessageDialog, // toplevel (implements GtkRoot)
|
|
55
55
|
AdwNavigationPage, // child-only (denylist — see scripts/widget-surface/classify.ts)
|
|
56
56
|
AdwPasswordEntryRow, // child-only (derives Gtk.ListBoxRow)
|
|
57
57
|
AdwPreferencesPage, // child-only (denylist — see scripts/widget-surface/classify.ts)
|
|
58
58
|
AdwPreferencesRow, // child-only (derives Gtk.ListBoxRow)
|
|
59
|
-
AdwPreferencesWindow, // toplevel (
|
|
59
|
+
AdwPreferencesWindow, // toplevel (implements GtkRoot)
|
|
60
60
|
AdwSpinRow, // child-only (derives Gtk.ListBoxRow)
|
|
61
61
|
AdwSwitchRow, // child-only (derives Gtk.ListBoxRow)
|
|
62
62
|
AdwWindow, } from "../gtkx/bridge/widgets.generated";
|
|
@@ -11,68 +11,68 @@
|
|
|
11
11
|
// as the hand-picked ones were before this file existed.
|
|
12
12
|
import { wrapReactNative } from "../common/widget";
|
|
13
13
|
import { AdwAboutDialog as RawAdwAboutDialog, AdwAlertDialog as RawAdwAlertDialog, AdwAvatar as RawAdwAvatar, AdwBanner as RawAdwBanner, AdwBin as RawAdwBin, AdwBottomSheet as RawAdwBottomSheet, AdwBreakpointBin as RawAdwBreakpointBin, AdwButtonContent as RawAdwButtonContent, AdwCarousel as RawAdwCarousel, AdwCarouselIndicatorDots as RawAdwCarouselIndicatorDots, AdwCarouselIndicatorLines as RawAdwCarouselIndicatorLines, AdwClamp as RawAdwClamp, AdwClampScrollable as RawAdwClampScrollable, AdwDialog as RawAdwDialog, AdwFlap as RawAdwFlap, AdwHeaderBar as RawAdwHeaderBar, AdwInlineViewSwitcher as RawAdwInlineViewSwitcher, AdwLayoutSlot as RawAdwLayoutSlot, AdwLeaflet as RawAdwLeaflet, AdwMultiLayoutView as RawAdwMultiLayoutView, AdwNavigationSplitView as RawAdwNavigationSplitView, AdwNavigationView as RawAdwNavigationView, AdwOverlaySplitView as RawAdwOverlaySplitView, AdwPreferencesDialog as RawAdwPreferencesDialog, AdwPreferencesGroup as RawAdwPreferencesGroup, AdwShortcutLabel as RawAdwShortcutLabel, AdwShortcutsDialog as RawAdwShortcutsDialog, AdwSidebar as RawAdwSidebar, AdwSpinner as RawAdwSpinner, AdwSplitButton as RawAdwSplitButton, AdwSqueezer as RawAdwSqueezer, AdwStatusPage as RawAdwStatusPage, AdwTabBar as RawAdwTabBar, AdwTabButton as RawAdwTabButton, AdwTabOverview as RawAdwTabOverview, AdwTabView as RawAdwTabView, AdwToastOverlay as RawAdwToastOverlay, AdwToggleGroup as RawAdwToggleGroup, AdwToolbarView as RawAdwToolbarView, AdwViewStack as RawAdwViewStack, AdwViewSwitcher as RawAdwViewSwitcher, AdwViewSwitcherBar as RawAdwViewSwitcherBar, AdwViewSwitcherSidebar as RawAdwViewSwitcherSidebar, AdwViewSwitcherTitle as RawAdwViewSwitcherTitle, AdwWindowTitle as RawAdwWindowTitle, AdwWrapBox as RawAdwWrapBox, } from "../gtkx/bridge/widgets.generated";
|
|
14
|
-
export const AdwAboutDialog = wrapReactNative(RawAdwAboutDialog);
|
|
15
|
-
export const AdwAlertDialog = wrapReactNative(RawAdwAlertDialog);
|
|
16
|
-
export const AdwAvatar = wrapReactNative(RawAdwAvatar);
|
|
17
|
-
export const AdwBanner = wrapReactNative(RawAdwBanner);
|
|
18
|
-
export const AdwBin = wrapReactNative(RawAdwBin);
|
|
19
|
-
export const AdwBottomSheet = wrapReactNative(RawAdwBottomSheet);
|
|
20
|
-
export const AdwBreakpointBin = wrapReactNative(RawAdwBreakpointBin);
|
|
21
|
-
export const AdwButtonContent = wrapReactNative(RawAdwButtonContent);
|
|
22
|
-
export const AdwCarousel = wrapReactNative(RawAdwCarousel);
|
|
23
|
-
export const AdwCarouselIndicatorDots = wrapReactNative(RawAdwCarouselIndicatorDots);
|
|
24
|
-
export const AdwCarouselIndicatorLines = wrapReactNative(RawAdwCarouselIndicatorLines);
|
|
25
|
-
export const AdwClamp = wrapReactNative(RawAdwClamp);
|
|
26
|
-
export const AdwClampScrollable = wrapReactNative(RawAdwClampScrollable);
|
|
27
|
-
export const AdwDialog = wrapReactNative(RawAdwDialog);
|
|
28
|
-
export const AdwFlap = wrapReactNative(RawAdwFlap);
|
|
29
|
-
export const AdwHeaderBar = wrapReactNative(RawAdwHeaderBar);
|
|
30
|
-
export const AdwInlineViewSwitcher = wrapReactNative(RawAdwInlineViewSwitcher);
|
|
31
|
-
export const AdwLayoutSlot = wrapReactNative(RawAdwLayoutSlot);
|
|
32
|
-
export const AdwLeaflet = wrapReactNative(RawAdwLeaflet);
|
|
33
|
-
export const AdwMultiLayoutView = wrapReactNative(RawAdwMultiLayoutView);
|
|
34
|
-
export const AdwNavigationSplitView = wrapReactNative(RawAdwNavigationSplitView);
|
|
35
|
-
export const AdwNavigationView = wrapReactNative(RawAdwNavigationView);
|
|
36
|
-
export const AdwOverlaySplitView = wrapReactNative(RawAdwOverlaySplitView);
|
|
37
|
-
export const AdwPreferencesDialog = wrapReactNative(RawAdwPreferencesDialog);
|
|
38
|
-
export const AdwPreferencesGroup = wrapReactNative(RawAdwPreferencesGroup);
|
|
39
|
-
export const AdwShortcutLabel = wrapReactNative(RawAdwShortcutLabel);
|
|
40
|
-
export const AdwShortcutsDialog = wrapReactNative(RawAdwShortcutsDialog);
|
|
41
|
-
export const AdwSidebar = wrapReactNative(RawAdwSidebar);
|
|
42
|
-
export const AdwSpinner = wrapReactNative(RawAdwSpinner);
|
|
43
|
-
export const AdwSplitButton = wrapReactNative(RawAdwSplitButton);
|
|
44
|
-
export const AdwSqueezer = wrapReactNative(RawAdwSqueezer);
|
|
45
|
-
export const AdwStatusPage = wrapReactNative(RawAdwStatusPage);
|
|
46
|
-
export const AdwTabBar = wrapReactNative(RawAdwTabBar);
|
|
47
|
-
export const AdwTabButton = wrapReactNative(RawAdwTabButton);
|
|
48
|
-
export const AdwTabOverview = wrapReactNative(RawAdwTabOverview);
|
|
49
|
-
export const AdwTabView = wrapReactNative(RawAdwTabView);
|
|
50
|
-
export const AdwToastOverlay = wrapReactNative(RawAdwToastOverlay);
|
|
51
|
-
export const AdwToggleGroup = wrapReactNative(RawAdwToggleGroup);
|
|
52
|
-
export const AdwToolbarView = wrapReactNative(RawAdwToolbarView);
|
|
53
|
-
export const AdwViewStack = wrapReactNative(RawAdwViewStack);
|
|
54
|
-
export const AdwViewSwitcher = wrapReactNative(RawAdwViewSwitcher);
|
|
55
|
-
export const AdwViewSwitcherBar = wrapReactNative(RawAdwViewSwitcherBar);
|
|
56
|
-
export const AdwViewSwitcherSidebar = wrapReactNative(RawAdwViewSwitcherSidebar);
|
|
57
|
-
export const AdwViewSwitcherTitle = wrapReactNative(RawAdwViewSwitcherTitle);
|
|
58
|
-
export const AdwWindowTitle = wrapReactNative(RawAdwWindowTitle);
|
|
59
|
-
export const AdwWrapBox = wrapReactNative(RawAdwWrapBox);
|
|
60
|
-
export { AdwAboutWindow, // toplevel (
|
|
14
|
+
export const AdwAboutDialog = wrapReactNative(RawAdwAboutDialog, "AdwAboutDialog");
|
|
15
|
+
export const AdwAlertDialog = wrapReactNative(RawAdwAlertDialog, "AdwAlertDialog");
|
|
16
|
+
export const AdwAvatar = wrapReactNative(RawAdwAvatar, "AdwAvatar");
|
|
17
|
+
export const AdwBanner = wrapReactNative(RawAdwBanner, "AdwBanner");
|
|
18
|
+
export const AdwBin = wrapReactNative(RawAdwBin, "AdwBin");
|
|
19
|
+
export const AdwBottomSheet = wrapReactNative(RawAdwBottomSheet, "AdwBottomSheet");
|
|
20
|
+
export const AdwBreakpointBin = wrapReactNative(RawAdwBreakpointBin, "AdwBreakpointBin");
|
|
21
|
+
export const AdwButtonContent = wrapReactNative(RawAdwButtonContent, "AdwButtonContent");
|
|
22
|
+
export const AdwCarousel = wrapReactNative(RawAdwCarousel, "AdwCarousel");
|
|
23
|
+
export const AdwCarouselIndicatorDots = wrapReactNative(RawAdwCarouselIndicatorDots, "AdwCarouselIndicatorDots");
|
|
24
|
+
export const AdwCarouselIndicatorLines = wrapReactNative(RawAdwCarouselIndicatorLines, "AdwCarouselIndicatorLines");
|
|
25
|
+
export const AdwClamp = wrapReactNative(RawAdwClamp, "AdwClamp");
|
|
26
|
+
export const AdwClampScrollable = wrapReactNative(RawAdwClampScrollable, "AdwClampScrollable");
|
|
27
|
+
export const AdwDialog = wrapReactNative(RawAdwDialog, "AdwDialog");
|
|
28
|
+
export const AdwFlap = wrapReactNative(RawAdwFlap, "AdwFlap");
|
|
29
|
+
export const AdwHeaderBar = wrapReactNative(RawAdwHeaderBar, "AdwHeaderBar");
|
|
30
|
+
export const AdwInlineViewSwitcher = wrapReactNative(RawAdwInlineViewSwitcher, "AdwInlineViewSwitcher");
|
|
31
|
+
export const AdwLayoutSlot = wrapReactNative(RawAdwLayoutSlot, "AdwLayoutSlot");
|
|
32
|
+
export const AdwLeaflet = wrapReactNative(RawAdwLeaflet, "AdwLeaflet");
|
|
33
|
+
export const AdwMultiLayoutView = wrapReactNative(RawAdwMultiLayoutView, "AdwMultiLayoutView");
|
|
34
|
+
export const AdwNavigationSplitView = wrapReactNative(RawAdwNavigationSplitView, "AdwNavigationSplitView");
|
|
35
|
+
export const AdwNavigationView = wrapReactNative(RawAdwNavigationView, "AdwNavigationView");
|
|
36
|
+
export const AdwOverlaySplitView = wrapReactNative(RawAdwOverlaySplitView, "AdwOverlaySplitView");
|
|
37
|
+
export const AdwPreferencesDialog = wrapReactNative(RawAdwPreferencesDialog, "AdwPreferencesDialog");
|
|
38
|
+
export const AdwPreferencesGroup = wrapReactNative(RawAdwPreferencesGroup, "AdwPreferencesGroup");
|
|
39
|
+
export const AdwShortcutLabel = wrapReactNative(RawAdwShortcutLabel, "AdwShortcutLabel");
|
|
40
|
+
export const AdwShortcutsDialog = wrapReactNative(RawAdwShortcutsDialog, "AdwShortcutsDialog");
|
|
41
|
+
export const AdwSidebar = wrapReactNative(RawAdwSidebar, "AdwSidebar");
|
|
42
|
+
export const AdwSpinner = wrapReactNative(RawAdwSpinner, "AdwSpinner");
|
|
43
|
+
export const AdwSplitButton = wrapReactNative(RawAdwSplitButton, "AdwSplitButton");
|
|
44
|
+
export const AdwSqueezer = wrapReactNative(RawAdwSqueezer, "AdwSqueezer");
|
|
45
|
+
export const AdwStatusPage = wrapReactNative(RawAdwStatusPage, "AdwStatusPage");
|
|
46
|
+
export const AdwTabBar = wrapReactNative(RawAdwTabBar, "AdwTabBar");
|
|
47
|
+
export const AdwTabButton = wrapReactNative(RawAdwTabButton, "AdwTabButton");
|
|
48
|
+
export const AdwTabOverview = wrapReactNative(RawAdwTabOverview, "AdwTabOverview");
|
|
49
|
+
export const AdwTabView = wrapReactNative(RawAdwTabView, "AdwTabView");
|
|
50
|
+
export const AdwToastOverlay = wrapReactNative(RawAdwToastOverlay, "AdwToastOverlay");
|
|
51
|
+
export const AdwToggleGroup = wrapReactNative(RawAdwToggleGroup, "AdwToggleGroup");
|
|
52
|
+
export const AdwToolbarView = wrapReactNative(RawAdwToolbarView, "AdwToolbarView");
|
|
53
|
+
export const AdwViewStack = wrapReactNative(RawAdwViewStack, "AdwViewStack");
|
|
54
|
+
export const AdwViewSwitcher = wrapReactNative(RawAdwViewSwitcher, "AdwViewSwitcher");
|
|
55
|
+
export const AdwViewSwitcherBar = wrapReactNative(RawAdwViewSwitcherBar, "AdwViewSwitcherBar");
|
|
56
|
+
export const AdwViewSwitcherSidebar = wrapReactNative(RawAdwViewSwitcherSidebar, "AdwViewSwitcherSidebar");
|
|
57
|
+
export const AdwViewSwitcherTitle = wrapReactNative(RawAdwViewSwitcherTitle, "AdwViewSwitcherTitle");
|
|
58
|
+
export const AdwWindowTitle = wrapReactNative(RawAdwWindowTitle, "AdwWindowTitle");
|
|
59
|
+
export const AdwWrapBox = wrapReactNative(RawAdwWrapBox, "AdwWrapBox");
|
|
60
|
+
export { AdwAboutWindow, // toplevel (implements GtkRoot)
|
|
61
61
|
AdwActionRow, // child-only (derives Gtk.ListBoxRow)
|
|
62
|
-
AdwApplicationWindow, // toplevel (
|
|
62
|
+
AdwApplicationWindow, // toplevel (implements GtkRoot)
|
|
63
63
|
AdwButtonRow, // child-only (derives Gtk.ListBoxRow)
|
|
64
64
|
AdwComboRow, // child-only (derives Gtk.ListBoxRow)
|
|
65
65
|
AdwEntryRow, // child-only (derives Gtk.ListBoxRow)
|
|
66
66
|
AdwExpanderRow, // child-only (derives Gtk.ListBoxRow)
|
|
67
|
-
AdwMessageDialog, // toplevel (
|
|
67
|
+
AdwMessageDialog, // toplevel (implements GtkRoot)
|
|
68
68
|
AdwNavigationPage, // child-only (denylist — see scripts/widget-surface/classify.ts)
|
|
69
69
|
AdwPasswordEntryRow, // child-only (derives Gtk.ListBoxRow)
|
|
70
70
|
AdwPreferencesPage, // child-only (denylist — see scripts/widget-surface/classify.ts)
|
|
71
71
|
AdwPreferencesRow, // child-only (derives Gtk.ListBoxRow)
|
|
72
|
-
AdwPreferencesWindow, // toplevel (
|
|
72
|
+
AdwPreferencesWindow, // toplevel (implements GtkRoot)
|
|
73
73
|
AdwSpinRow, // child-only (derives Gtk.ListBoxRow)
|
|
74
74
|
AdwSwitchRow, // child-only (derives Gtk.ListBoxRow)
|
|
75
|
-
AdwWindow, // toplevel (
|
|
75
|
+
AdwWindow, // toplevel (implements GtkRoot)
|
|
76
76
|
} from "../gtkx/bridge/widgets.generated";
|
|
77
77
|
export const ADW_WRAPPED_WIDGET_NAMES = [
|
|
78
78
|
"AdwAboutDialog",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgets.generated.js","sourceRoot":"","sources":["../../src/adw/widgets.generated.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,0EAA0E;AAC1E,sDAAsD;AACtD,yEAAyE;AACzE,6DAA6D;AAC7D,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,sEAAsE;AACtE,4EAA4E;AAC5E,yDAAyD;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EACL,cAAc,IAAI,iBAAiB,EACnC,cAAc,IAAI,iBAAiB,EACnC,SAAS,IAAI,YAAY,EACzB,SAAS,IAAI,YAAY,EACzB,MAAM,IAAI,SAAS,EACnB,cAAc,IAAI,iBAAiB,EACnC,gBAAgB,IAAI,mBAAmB,EACvC,gBAAgB,IAAI,mBAAmB,EACvC,WAAW,IAAI,cAAc,EAC7B,wBAAwB,IAAI,2BAA2B,EACvD,yBAAyB,IAAI,4BAA4B,EACzD,QAAQ,IAAI,WAAW,EACvB,kBAAkB,IAAI,qBAAqB,EAC3C,SAAS,IAAI,YAAY,EACzB,OAAO,IAAI,UAAU,EACrB,YAAY,IAAI,eAAe,EAC/B,qBAAqB,IAAI,wBAAwB,EACjD,aAAa,IAAI,gBAAgB,EACjC,UAAU,IAAI,aAAa,EAC3B,kBAAkB,IAAI,qBAAqB,EAC3C,sBAAsB,IAAI,yBAA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iBAAiB;IACjB,oBAAoB;IACpB,wBAAwB;IACxB,sBAAsB;IACtB,gBAAgB;IAChB,YAAY;CACJ,CAAA","sourcesContent":["// GENERATED FILE — do not edit by hand.\n// Produced by scripts/generate-widget-surface.ts. Re-run it inside the VM\n// after `npm run codegen` picks up a gtkx update; see\n// scripts/widget-surface/classification.json for the full classification\n// and .claude/epics/widget-surface/ for the rules behind it.\n//\n// Wrapped: RN layout + a GTK CSS class from the style prop, steps aside and\n// renders bare outside RN layout (see wrapReactNative in ../common/widget).\n// Raw: toplevels and child-only widgets, where a wrapper box would be\n// invalid GTK rather than a convenience — exported as gtkx binds them, same\n// as the hand-picked ones were before this file existed.\n\nimport { wrapReactNative } from \"../common/widget\"\nimport {\n AdwAboutDialog as RawAdwAboutDialog,\n AdwAlertDialog as RawAdwAlertDialog,\n AdwAvatar as RawAdwAvatar,\n AdwBanner as RawAdwBanner,\n AdwBin as RawAdwBin,\n AdwBottomSheet as RawAdwBottomSheet,\n AdwBreakpointBin as RawAdwBreakpointBin,\n AdwButtonContent as RawAdwButtonContent,\n AdwCarousel as RawAdwCarousel,\n AdwCarouselIndicatorDots as RawAdwCarouselIndicatorDots,\n AdwCarouselIndicatorLines as RawAdwCarouselIndicatorLines,\n AdwClamp as RawAdwClamp,\n AdwClampScrollable as RawAdwClampScrollable,\n AdwDialog as RawAdwDialog,\n AdwFlap as RawAdwFlap,\n AdwHeaderBar as RawAdwHeaderBar,\n AdwInlineViewSwitcher as RawAdwInlineViewSwitcher,\n AdwLayoutSlot as RawAdwLayoutSlot,\n AdwLeaflet as RawAdwLeaflet,\n AdwMultiLayoutView as RawAdwMultiLayoutView,\n AdwNavigationSplitView as RawAdwNavigationSplitView,\n AdwNavigationView as RawAdwNavigationView,\n AdwOverlaySplitView as RawAdwOverlaySplitView,\n AdwPreferencesDialog as RawAdwPreferencesDialog,\n AdwPreferencesGroup as RawAdwPreferencesGroup,\n AdwShortcutLabel as RawAdwShortcutLabel,\n AdwShortcutsDialog as RawAdwShortcutsDialog,\n AdwSidebar as RawAdwSidebar,\n AdwSpinner as RawAdwSpinner,\n AdwSplitButton as RawAdwSplitButton,\n AdwSqueezer as RawAdwSqueezer,\n AdwStatusPage as RawAdwStatusPage,\n AdwTabBar as RawAdwTabBar,\n AdwTabButton as RawAdwTabButton,\n AdwTabOverview as RawAdwTabOverview,\n AdwTabView as RawAdwTabView,\n AdwToastOverlay as RawAdwToastOverlay,\n AdwToggleGroup as RawAdwToggleGroup,\n AdwToolbarView as RawAdwToolbarView,\n AdwViewStack as RawAdwViewStack,\n AdwViewSwitcher as RawAdwViewSwitcher,\n AdwViewSwitcherBar as RawAdwViewSwitcherBar,\n AdwViewSwitcherSidebar as RawAdwViewSwitcherSidebar,\n AdwViewSwitcherTitle as RawAdwViewSwitcherTitle,\n AdwWindowTitle as RawAdwWindowTitle,\n AdwWrapBox as RawAdwWrapBox,\n} from \"../gtkx/bridge/widgets.generated\"\n\nexport const AdwAboutDialog = wrapReactNative(RawAdwAboutDialog)\nexport const AdwAlertDialog = wrapReactNative(RawAdwAlertDialog)\nexport const AdwAvatar = wrapReactNative(RawAdwAvatar)\nexport const AdwBanner = wrapReactNative(RawAdwBanner)\nexport const AdwBin = wrapReactNative(RawAdwBin)\nexport const AdwBottomSheet = wrapReactNative(RawAdwBottomSheet)\nexport const AdwBreakpointBin = wrapReactNative(RawAdwBreakpointBin)\nexport const AdwButtonContent = wrapReactNative(RawAdwButtonContent)\nexport const AdwCarousel = wrapReactNative(RawAdwCarousel)\nexport const AdwCarouselIndicatorDots = wrapReactNative(\n RawAdwCarouselIndicatorDots,\n)\nexport const AdwCarouselIndicatorLines = wrapReactNative(\n RawAdwCarouselIndicatorLines,\n)\nexport const AdwClamp = wrapReactNative(RawAdwClamp)\nexport const AdwClampScrollable = wrapReactNative(RawAdwClampScrollable)\nexport const AdwDialog = wrapReactNative(RawAdwDialog)\nexport const AdwFlap = wrapReactNative(RawAdwFlap)\nexport const AdwHeaderBar = wrapReactNative(RawAdwHeaderBar)\nexport const AdwInlineViewSwitcher = wrapReactNative(RawAdwInlineViewSwitcher)\nexport const AdwLayoutSlot = wrapReactNative(RawAdwLayoutSlot)\nexport const AdwLeaflet = wrapReactNative(RawAdwLeaflet)\nexport const AdwMultiLayoutView = wrapReactNative(RawAdwMultiLayoutView)\nexport const AdwNavigationSplitView = wrapReactNative(RawAdwNavigationSplitView)\nexport const AdwNavigationView = wrapReactNative(RawAdwNavigationView)\nexport const AdwOverlaySplitView = wrapReactNative(RawAdwOverlaySplitView)\nexport const AdwPreferencesDialog = wrapReactNative(RawAdwPreferencesDialog)\nexport const AdwPreferencesGroup = wrapReactNative(RawAdwPreferencesGroup)\nexport const AdwShortcutLabel = wrapReactNative(RawAdwShortcutLabel)\nexport const AdwShortcutsDialog = wrapReactNative(RawAdwShortcutsDialog)\nexport const AdwSidebar = wrapReactNative(RawAdwSidebar)\nexport const AdwSpinner = wrapReactNative(RawAdwSpinner)\nexport const AdwSplitButton = wrapReactNative(RawAdwSplitButton)\nexport const AdwSqueezer = wrapReactNative(RawAdwSqueezer)\nexport const AdwStatusPage = wrapReactNative(RawAdwStatusPage)\nexport const AdwTabBar = wrapReactNative(RawAdwTabBar)\nexport const AdwTabButton = wrapReactNative(RawAdwTabButton)\nexport const AdwTabOverview = wrapReactNative(RawAdwTabOverview)\nexport const AdwTabView = wrapReactNative(RawAdwTabView)\nexport const AdwToastOverlay = wrapReactNative(RawAdwToastOverlay)\nexport const AdwToggleGroup = wrapReactNative(RawAdwToggleGroup)\nexport const AdwToolbarView = wrapReactNative(RawAdwToolbarView)\nexport const AdwViewStack = wrapReactNative(RawAdwViewStack)\nexport const AdwViewSwitcher = wrapReactNative(RawAdwViewSwitcher)\nexport const AdwViewSwitcherBar = wrapReactNative(RawAdwViewSwitcherBar)\nexport const AdwViewSwitcherSidebar = wrapReactNative(RawAdwViewSwitcherSidebar)\nexport const AdwViewSwitcherTitle = wrapReactNative(RawAdwViewSwitcherTitle)\nexport const AdwWindowTitle = wrapReactNative(RawAdwWindowTitle)\nexport const AdwWrapBox = wrapReactNative(RawAdwWrapBox)\n\nexport {\n AdwAboutWindow, // toplevel (derives Gtk.Window)\n AdwActionRow, // child-only (derives Gtk.ListBoxRow)\n AdwApplicationWindow, // toplevel (derives Gtk.Window)\n AdwButtonRow, // child-only (derives Gtk.ListBoxRow)\n AdwComboRow, // child-only (derives Gtk.ListBoxRow)\n AdwEntryRow, // child-only (derives Gtk.ListBoxRow)\n AdwExpanderRow, // child-only (derives Gtk.ListBoxRow)\n AdwMessageDialog, // toplevel (derives Gtk.Window)\n AdwNavigationPage, // child-only (denylist — see scripts/widget-surface/classify.ts)\n AdwPasswordEntryRow, // child-only (derives Gtk.ListBoxRow)\n AdwPreferencesPage, // child-only (denylist — see scripts/widget-surface/classify.ts)\n AdwPreferencesRow, // child-only (derives Gtk.ListBoxRow)\n AdwPreferencesWindow, // toplevel (derives Gtk.Window)\n AdwSpinRow, // child-only (derives Gtk.ListBoxRow)\n AdwSwitchRow, // child-only (derives Gtk.ListBoxRow)\n AdwWindow, // toplevel (derives Gtk.Window)\n} from \"../gtkx/bridge/widgets.generated\"\n\nexport const ADW_WRAPPED_WIDGET_NAMES = [\n \"AdwAboutDialog\",\n \"AdwAlertDialog\",\n \"AdwAvatar\",\n \"AdwBanner\",\n \"AdwBin\",\n \"AdwBottomSheet\",\n \"AdwBreakpointBin\",\n \"AdwButtonContent\",\n \"AdwCarousel\",\n \"AdwCarouselIndicatorDots\",\n \"AdwCarouselIndicatorLines\",\n \"AdwClamp\",\n \"AdwClampScrollable\",\n \"AdwDialog\",\n \"AdwFlap\",\n \"AdwHeaderBar\",\n \"AdwInlineViewSwitcher\",\n \"AdwLayoutSlot\",\n \"AdwLeaflet\",\n \"AdwMultiLayoutView\",\n \"AdwNavigationSplitView\",\n \"AdwNavigationView\",\n \"AdwOverlaySplitView\",\n \"AdwPreferencesDialog\",\n \"AdwPreferencesGroup\",\n \"AdwShortcutLabel\",\n \"AdwShortcutsDialog\",\n \"AdwSidebar\",\n \"AdwSpinner\",\n \"AdwSplitButton\",\n \"AdwSqueezer\",\n \"AdwStatusPage\",\n \"AdwTabBar\",\n \"AdwTabButton\",\n \"AdwTabOverview\",\n \"AdwTabView\",\n \"AdwToastOverlay\",\n \"AdwToggleGroup\",\n \"AdwToolbarView\",\n \"AdwViewStack\",\n \"AdwViewSwitcher\",\n \"AdwViewSwitcherBar\",\n \"AdwViewSwitcherSidebar\",\n \"AdwViewSwitcherTitle\",\n \"AdwWindowTitle\",\n \"AdwWrapBox\",\n] as const\n"]}
|
|
1
|
+
{"version":3,"file":"widgets.generated.js","sourceRoot":"","sources":["../../src/adw/widgets.generated.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,0EAA0E;AAC1E,sDAAsD;AACtD,yEAAyE;AACzE,6DAA6D;AAC7D,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,sEAAsE;AACtE,4EAA4E;AAC5E,yDAAyD;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EACL,cAAc,IAAI,iBAAiB,EACnC,cAAc,IAAI,iBAAiB,EACnC,SAAS,IAAI,YAAY,EACzB,SAAS,IAAI,YAAY,EACzB,MAAM,IAAI,SAAS,EACnB,cAAc,IAAI,iBAAiB,EACnC,gBAAgB,IAAI,mBAAmB,EACvC,gBAAgB,IAAI,mBAAmB,EACvC,WAAW,IAAI,cAAc,EAC7B,wBAAwB,IAAI,2BAA2B,EACvD,yBAAyB,IAAI,4BAA4B,EACzD,QAAQ,IAAI,WAAW,EACvB,kBAAkB,IAAI,qBAAqB,EAC3C,SAAS,IAAI,YAAY,EACzB,OAAO,IAAI,UAAU,EACrB,YAAY,IAAI,eAAe,EAC/B,qBAAqB,IAAI,wBAAwB,EACjD,aAAa,IAAI,gBAAgB,EACjC,UAAU,IAAI,aAAa,EAC3B,kBAAkB,IAAI,qBAAqB,EAC3C,sBAAsB,IAAI,yBAAyB,EACnD,i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gC;EAC5C,MAAM,kCAAkC,CAAA;AAEzC,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,gBAAgB;IAChB,gBAAgB;IAChB,WAAW;IACX,WAAW;IACX,QAAQ;IACR,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,aAAa;IACb,0BAA0B;IAC1B,2BAA2B;IAC3B,UAAU;IACV,oBAAoB;IACpB,WAAW;IACX,SAAS;IACT,cAAc;IACd,uBAAuB;IACvB,eAAe;IACf,YAAY;IACZ,oBAAoB;IACpB,wBAAwB;IACxB,mBAAmB;IACnB,qBAAqB;IACrB,sBAAsB;IACtB,qBAAqB;IACrB,kBAAkB;IAClB,oBAAoB;IACpB,YAAY;IACZ,YAAY;IACZ,gBAAgB;IAChB,aAAa;IACb,eAAe;IACf,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,YAAY;IACZ,iBAAiB;IACjB,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,iBAAiB;IACjB,oBAAoB;IACpB,wBAAwB;IACxB,sBAAsB;IACtB,gBAAgB;IAChB,YAAY;CACJ,CAAA","sourcesContent":["// GENERATED FILE — do not edit by hand.\n// Produced by scripts/generate-widget-surface.ts. Re-run it inside the VM\n// after `npm run codegen` picks up a gtkx update; see\n// scripts/widget-surface/classification.json for the full classification\n// and .claude/epics/widget-surface/ for the rules behind it.\n//\n// Wrapped: RN layout + a GTK CSS class from the style prop, steps aside and\n// renders bare outside RN layout (see wrapReactNative in ../common/widget).\n// Raw: toplevels and child-only widgets, where a wrapper box would be\n// invalid GTK rather than a convenience — exported as gtkx binds them, same\n// as the hand-picked ones were before this file existed.\n\nimport { wrapReactNative } from \"../common/widget\"\nimport {\n AdwAboutDialog as RawAdwAboutDialog,\n AdwAlertDialog as RawAdwAlertDialog,\n AdwAvatar as RawAdwAvatar,\n AdwBanner as RawAdwBanner,\n AdwBin as RawAdwBin,\n AdwBottomSheet as RawAdwBottomSheet,\n AdwBreakpointBin as RawAdwBreakpointBin,\n AdwButtonContent as RawAdwButtonContent,\n AdwCarousel as RawAdwCarousel,\n AdwCarouselIndicatorDots as RawAdwCarouselIndicatorDots,\n AdwCarouselIndicatorLines as RawAdwCarouselIndicatorLines,\n AdwClamp as RawAdwClamp,\n AdwClampScrollable as RawAdwClampScrollable,\n AdwDialog as RawAdwDialog,\n AdwFlap as RawAdwFlap,\n AdwHeaderBar as RawAdwHeaderBar,\n AdwInlineViewSwitcher as RawAdwInlineViewSwitcher,\n AdwLayoutSlot as RawAdwLayoutSlot,\n AdwLeaflet as RawAdwLeaflet,\n AdwMultiLayoutView as RawAdwMultiLayoutView,\n AdwNavigationSplitView as RawAdwNavigationSplitView,\n AdwNavigationView as RawAdwNavigationView,\n AdwOverlaySplitView as RawAdwOverlaySplitView,\n AdwPreferencesDialog as RawAdwPreferencesDialog,\n AdwPreferencesGroup as RawAdwPreferencesGroup,\n AdwShortcutLabel as RawAdwShortcutLabel,\n AdwShortcutsDialog as RawAdwShortcutsDialog,\n AdwSidebar as RawAdwSidebar,\n AdwSpinner as RawAdwSpinner,\n AdwSplitButton as RawAdwSplitButton,\n AdwSqueezer as RawAdwSqueezer,\n AdwStatusPage as RawAdwStatusPage,\n AdwTabBar as RawAdwTabBar,\n AdwTabButton as RawAdwTabButton,\n AdwTabOverview as RawAdwTabOverview,\n AdwTabView as RawAdwTabView,\n AdwToastOverlay as RawAdwToastOverlay,\n AdwToggleGroup as RawAdwToggleGroup,\n AdwToolbarView as RawAdwToolbarView,\n AdwViewStack as RawAdwViewStack,\n AdwViewSwitcher as RawAdwViewSwitcher,\n AdwViewSwitcherBar as RawAdwViewSwitcherBar,\n AdwViewSwitcherSidebar as RawAdwViewSwitcherSidebar,\n AdwViewSwitcherTitle as RawAdwViewSwitcherTitle,\n AdwWindowTitle as RawAdwWindowTitle,\n AdwWrapBox as RawAdwWrapBox,\n} from \"../gtkx/bridge/widgets.generated\"\n\nexport const AdwAboutDialog = wrapReactNative(\n RawAdwAboutDialog,\n \"AdwAboutDialog\",\n)\nexport const AdwAlertDialog = wrapReactNative(\n RawAdwAlertDialog,\n \"AdwAlertDialog\",\n)\nexport const AdwAvatar = wrapReactNative(RawAdwAvatar, \"AdwAvatar\")\nexport const AdwBanner = wrapReactNative(RawAdwBanner, \"AdwBanner\")\nexport const AdwBin = wrapReactNative(RawAdwBin, \"AdwBin\")\nexport const AdwBottomSheet = wrapReactNative(\n RawAdwBottomSheet,\n \"AdwBottomSheet\",\n)\nexport const AdwBreakpointBin = wrapReactNative(\n RawAdwBreakpointBin,\n \"AdwBreakpointBin\",\n)\nexport const AdwButtonContent = wrapReactNative(\n RawAdwButtonContent,\n \"AdwButtonContent\",\n)\nexport const AdwCarousel = wrapReactNative(RawAdwCarousel, \"AdwCarousel\")\nexport const AdwCarouselIndicatorDots = wrapReactNative(\n RawAdwCarouselIndicatorDots,\n \"AdwCarouselIndicatorDots\",\n)\nexport const AdwCarouselIndicatorLines = wrapReactNative(\n RawAdwCarouselIndicatorLines,\n \"AdwCarouselIndicatorLines\",\n)\nexport const AdwClamp = wrapReactNative(RawAdwClamp, \"AdwClamp\")\nexport const AdwClampScrollable = wrapReactNative(\n RawAdwClampScrollable,\n \"AdwClampScrollable\",\n)\nexport const AdwDialog = wrapReactNative(RawAdwDialog, \"AdwDialog\")\nexport const AdwFlap = wrapReactNative(RawAdwFlap, \"AdwFlap\")\nexport const AdwHeaderBar = wrapReactNative(RawAdwHeaderBar, \"AdwHeaderBar\")\nexport const AdwInlineViewSwitcher = wrapReactNative(\n RawAdwInlineViewSwitcher,\n \"AdwInlineViewSwitcher\",\n)\nexport const AdwLayoutSlot = wrapReactNative(RawAdwLayoutSlot, \"AdwLayoutSlot\")\nexport const AdwLeaflet = wrapReactNative(RawAdwLeaflet, \"AdwLeaflet\")\nexport const AdwMultiLayoutView = wrapReactNative(\n RawAdwMultiLayoutView,\n \"AdwMultiLayoutView\",\n)\nexport const AdwNavigationSplitView = wrapReactNative(\n RawAdwNavigationSplitView,\n \"AdwNavigationSplitView\",\n)\nexport const AdwNavigationView = wrapReactNative(\n RawAdwNavigationView,\n \"AdwNavigationView\",\n)\nexport const AdwOverlaySplitView = wrapReactNative(\n RawAdwOverlaySplitView,\n \"AdwOverlaySplitView\",\n)\nexport const AdwPreferencesDialog = wrapReactNative(\n RawAdwPreferencesDialog,\n \"AdwPreferencesDialog\",\n)\nexport const AdwPreferencesGroup = wrapReactNative(\n RawAdwPreferencesGroup,\n \"AdwPreferencesGroup\",\n)\nexport const AdwShortcutLabel = wrapReactNative(\n RawAdwShortcutLabel,\n \"AdwShortcutLabel\",\n)\nexport const AdwShortcutsDialog = wrapReactNative(\n RawAdwShortcutsDialog,\n \"AdwShortcutsDialog\",\n)\nexport const AdwSidebar = wrapReactNative(RawAdwSidebar, \"AdwSidebar\")\nexport const AdwSpinner = wrapReactNative(RawAdwSpinner, \"AdwSpinner\")\nexport const AdwSplitButton = wrapReactNative(\n RawAdwSplitButton,\n \"AdwSplitButton\",\n)\nexport const AdwSqueezer = wrapReactNative(RawAdwSqueezer, \"AdwSqueezer\")\nexport const AdwStatusPage = wrapReactNative(RawAdwStatusPage, \"AdwStatusPage\")\nexport const AdwTabBar = wrapReactNative(RawAdwTabBar, \"AdwTabBar\")\nexport const AdwTabButton = wrapReactNative(RawAdwTabButton, \"AdwTabButton\")\nexport const AdwTabOverview = wrapReactNative(\n RawAdwTabOverview,\n \"AdwTabOverview\",\n)\nexport const AdwTabView = wrapReactNative(RawAdwTabView, \"AdwTabView\")\nexport const AdwToastOverlay = wrapReactNative(\n RawAdwToastOverlay,\n \"AdwToastOverlay\",\n)\nexport const AdwToggleGroup = wrapReactNative(\n RawAdwToggleGroup,\n \"AdwToggleGroup\",\n)\nexport const AdwToolbarView = wrapReactNative(\n RawAdwToolbarView,\n \"AdwToolbarView\",\n)\nexport const AdwViewStack = wrapReactNative(RawAdwViewStack, \"AdwViewStack\")\nexport const AdwViewSwitcher = wrapReactNative(\n RawAdwViewSwitcher,\n \"AdwViewSwitcher\",\n)\nexport const AdwViewSwitcherBar = wrapReactNative(\n RawAdwViewSwitcherBar,\n \"AdwViewSwitcherBar\",\n)\nexport const AdwViewSwitcherSidebar = wrapReactNative(\n RawAdwViewSwitcherSidebar,\n \"AdwViewSwitcherSidebar\",\n)\nexport const AdwViewSwitcherTitle = wrapReactNative(\n RawAdwViewSwitcherTitle,\n \"AdwViewSwitcherTitle\",\n)\nexport const AdwWindowTitle = wrapReactNative(\n RawAdwWindowTitle,\n \"AdwWindowTitle\",\n)\nexport const AdwWrapBox = wrapReactNative(RawAdwWrapBox, \"AdwWrapBox\")\n\nexport {\n AdwAboutWindow, // toplevel (implements GtkRoot)\n AdwActionRow, // child-only (derives Gtk.ListBoxRow)\n AdwApplicationWindow, // toplevel (implements GtkRoot)\n AdwButtonRow, // child-only (derives Gtk.ListBoxRow)\n AdwComboRow, // child-only (derives Gtk.ListBoxRow)\n AdwEntryRow, // child-only (derives Gtk.ListBoxRow)\n AdwExpanderRow, // child-only (derives Gtk.ListBoxRow)\n AdwMessageDialog, // toplevel (implements GtkRoot)\n AdwNavigationPage, // child-only (denylist — see scripts/widget-surface/classify.ts)\n AdwPasswordEntryRow, // child-only (derives Gtk.ListBoxRow)\n AdwPreferencesPage, // child-only (denylist — see scripts/widget-surface/classify.ts)\n AdwPreferencesRow, // child-only (derives Gtk.ListBoxRow)\n AdwPreferencesWindow, // toplevel (implements GtkRoot)\n AdwSpinRow, // child-only (derives Gtk.ListBoxRow)\n AdwSwitchRow, // child-only (derives Gtk.ListBoxRow)\n AdwWindow, // toplevel (implements GtkRoot)\n} from \"../gtkx/bridge/widgets.generated\"\n\nexport const ADW_WRAPPED_WIDGET_NAMES = [\n \"AdwAboutDialog\",\n \"AdwAlertDialog\",\n \"AdwAvatar\",\n \"AdwBanner\",\n \"AdwBin\",\n \"AdwBottomSheet\",\n \"AdwBreakpointBin\",\n \"AdwButtonContent\",\n \"AdwCarousel\",\n \"AdwCarouselIndicatorDots\",\n \"AdwCarouselIndicatorLines\",\n \"AdwClamp\",\n \"AdwClampScrollable\",\n \"AdwDialog\",\n \"AdwFlap\",\n \"AdwHeaderBar\",\n \"AdwInlineViewSwitcher\",\n \"AdwLayoutSlot\",\n \"AdwLeaflet\",\n \"AdwMultiLayoutView\",\n \"AdwNavigationSplitView\",\n \"AdwNavigationView\",\n \"AdwOverlaySplitView\",\n \"AdwPreferencesDialog\",\n \"AdwPreferencesGroup\",\n \"AdwShortcutLabel\",\n \"AdwShortcutsDialog\",\n \"AdwSidebar\",\n \"AdwSpinner\",\n \"AdwSplitButton\",\n \"AdwSqueezer\",\n \"AdwStatusPage\",\n \"AdwTabBar\",\n \"AdwTabButton\",\n \"AdwTabOverview\",\n \"AdwTabView\",\n \"AdwToastOverlay\",\n \"AdwToggleGroup\",\n \"AdwToolbarView\",\n \"AdwViewStack\",\n \"AdwViewSwitcher\",\n \"AdwViewSwitcherBar\",\n \"AdwViewSwitcherSidebar\",\n \"AdwViewSwitcherTitle\",\n \"AdwWindowTitle\",\n \"AdwWrapBox\",\n] as const\n"]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A rewrite rule in its general form: a pattern matched against the whole
|
|
3
|
+
* specifier and the replacement it produces (`$1`… back-references allowed).
|
|
4
|
+
* Only needed when a package's subpath layout differs from its target's — the
|
|
5
|
+
* string form covers "exact name or subpath, tail transplanted".
|
|
6
|
+
*/
|
|
7
|
+
export type AliasPattern = {
|
|
8
|
+
pattern: RegExp;
|
|
9
|
+
replace: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* What an `aliases` entry may say about one package name:
|
|
13
|
+
* - a string target — exact name or subpath, tail transplanted;
|
|
14
|
+
* - a `{ pattern, replace }` rule for a differing subpath layout;
|
|
15
|
+
* - `false` — drop an alias this preset installs, so the real package loads.
|
|
16
|
+
*/
|
|
17
|
+
export type AliasOverride = string | AliasPattern | false;
|
|
18
|
+
/** The `aliases` option, keyed by package name. */
|
|
19
|
+
export type AliasOverrides = Readonly<Record<string, AliasOverride>>;
|
|
20
|
+
/** A validated rule, tagged with the package name it was declared under. */
|
|
21
|
+
export type CompiledAlias = {
|
|
22
|
+
/** The package name this rule belongs to. */
|
|
23
|
+
name: string;
|
|
24
|
+
pattern: RegExp;
|
|
25
|
+
replace: string;
|
|
26
|
+
};
|
|
27
|
+
/** The result of validating an `aliases` option against the defaults. */
|
|
28
|
+
export type AliasTable = {
|
|
29
|
+
/**
|
|
30
|
+
* Rules to try, most specific package name first. Order is a tie-breaker
|
|
31
|
+
* only: overlapping rules are rejected, so at most one can ever match.
|
|
32
|
+
*/
|
|
33
|
+
rules: readonly CompiledAlias[];
|
|
34
|
+
/**
|
|
35
|
+
* Every package name the table knows about, INCLUDING the ones turned off
|
|
36
|
+
* with `false`. The vite preset keeps all of them inside its own pipeline:
|
|
37
|
+
* a package whose alias was dropped still imports `react-native` at module
|
|
38
|
+
* scope, and that import only reaches the alias if Node never sees the
|
|
39
|
+
* package first.
|
|
40
|
+
*/
|
|
41
|
+
names: readonly string[];
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* `react-native` is not a package substitution and is not configurable. It is
|
|
45
|
+
* the platform: "the react-native API rendered as GTK widgets" is what this
|
|
46
|
+
* package IS, so a preset that stopped aliasing it would not be this preset.
|
|
47
|
+
*/
|
|
48
|
+
export declare const PLATFORM_ALIAS = "react-native";
|
|
49
|
+
/**
|
|
50
|
+
* The aliases both presets install, package name → target. See docs/api.md
|
|
51
|
+
* for the full story on each, and for which one is a real choice.
|
|
52
|
+
*/
|
|
53
|
+
export declare const DEFAULT_ALIASES: Readonly<Record<string, string>>;
|
|
54
|
+
/** The default aliases an app may retarget or drop — everything but the platform. */
|
|
55
|
+
export declare const CONFIGURABLE_ALIASES: readonly string[];
|
|
56
|
+
/**
|
|
57
|
+
* The string form, compiled. The guard is exact-match-or-slash-prefix, never a
|
|
58
|
+
* bare prefix: `react-native-reanimated-dnd` is a lookalike of
|
|
59
|
+
* `react-native-reanimated`, and `react-native-worklets-core` is a REAL and
|
|
60
|
+
* unrelated package (the VisionCamera one) that looks like
|
|
61
|
+
* `react-native-worklets`. A loose prefix would rewrite either onto a
|
|
62
|
+
* `react-native-gtkx/*` subpath that does not exist. The lookahead keeps the
|
|
63
|
+
* tail out of the match so `String.replace` transplants it onto the target.
|
|
64
|
+
*/
|
|
65
|
+
export declare const aliasPattern: (name: string, target: string) => AliasPattern;
|
|
66
|
+
/**
|
|
67
|
+
* Merges an app's `aliases` deltas over the defaults and validates the result.
|
|
68
|
+
* Throws — at config load, where the mistake is — with a message that names
|
|
69
|
+
* the valid keys.
|
|
70
|
+
*
|
|
71
|
+
* Deltas rather than a replacement list because a replacement list can
|
|
72
|
+
* silently lose an entry, which is #90 all over again: an app that re-listed
|
|
73
|
+
* five of the six names would get the sixth handed to Node before the alias
|
|
74
|
+
* ran, and the failure surfaces as an unrelated crash deep inside a library.
|
|
75
|
+
*/
|
|
76
|
+
export declare const compileAliases: (overrides?: AliasOverrides) => AliasTable;
|
|
77
|
+
/**
|
|
78
|
+
* Applies a compiled table to one specifier. Returns the rewritten specifier,
|
|
79
|
+
* or null when nothing claims it — including for `react-native-gtkx` itself
|
|
80
|
+
* and for every package the app turned off with `false`.
|
|
81
|
+
*/
|
|
82
|
+
export declare const applyAliases: (table: AliasTable, specifier: string) => string | null;
|
|
83
|
+
/** The table with no app overrides — what both presets install by default. */
|
|
84
|
+
export declare const DEFAULT_ALIAS_TABLE: AliasTable;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
// The package alias table, and the one place either preset learns about it.
|
|
2
|
+
//
|
|
3
|
+
// Six package names are rewritten onto this platform's own implementations.
|
|
4
|
+
// Until now `src/metro/index.ts` and `src/vite/index.ts` each hand-rolled the
|
|
5
|
+
// same six rules, and they drifted: the vite preset's `ssr.noExternal` listed
|
|
6
|
+
// three of the six names, so vite handed the other three to Node before any
|
|
7
|
+
// `resolveId` hook could run and the REAL `react-native-gesture-handler`
|
|
8
|
+
// loaded into a linux app (#90). Deriving both the resolver rules and the
|
|
9
|
+
// externalization list from one object makes that class of bug inexpressible.
|
|
10
|
+
//
|
|
11
|
+
// This module is imported with an explicit `.js` extension by both presets,
|
|
12
|
+
// because bare Node loads them (metro.config.ts, vite.config.ts) and its ESM
|
|
13
|
+
// resolver does not guess extensions — see scripts/check-package.ts.
|
|
14
|
+
//
|
|
15
|
+
// The rules are DATA rather than functions on purpose. Data can be validated:
|
|
16
|
+
// a typo'd key can be named, a pattern that also matches a separately declared
|
|
17
|
+
// package can be reported at config time, and the string form can be anchored
|
|
18
|
+
// by construction. All three are failure modes this repo has actually had.
|
|
19
|
+
/**
|
|
20
|
+
* `react-native` is not a package substitution and is not configurable. It is
|
|
21
|
+
* the platform: "the react-native API rendered as GTK widgets" is what this
|
|
22
|
+
* package IS, so a preset that stopped aliasing it would not be this preset.
|
|
23
|
+
*/
|
|
24
|
+
export const PLATFORM_ALIAS = "react-native";
|
|
25
|
+
/**
|
|
26
|
+
* The aliases both presets install, package name → target. See docs/api.md
|
|
27
|
+
* for the full story on each, and for which one is a real choice.
|
|
28
|
+
*/
|
|
29
|
+
export const DEFAULT_ALIASES = {
|
|
30
|
+
// The platform. Not configurable: the out-of-tree npmPackageName
|
|
31
|
+
// declaration alone does not alias imports for a Metro `bundle`, and the
|
|
32
|
+
// vite path has no such declaration at all — the resolver has to.
|
|
33
|
+
"react-native": "react-native-gtkx",
|
|
34
|
+
// The SVG surface, in the shape of the react-native-svg package (see
|
|
35
|
+
// src/svg-compat/index.ts). The real package is a native module.
|
|
36
|
+
"react-native-svg": "react-native-gtkx/svg",
|
|
37
|
+
// Drag and drop, on GtkDragSource/GtkDropTarget (see src/dnd/index.ts).
|
|
38
|
+
// The ONE alias that is a genuine choice: the real 2.0.0 does run here on
|
|
39
|
+
// top of the compat surfaces below, so an app may want it. Everything else
|
|
40
|
+
// in this table substitutes an implementation that cannot run at all.
|
|
41
|
+
"react-native-reanimated-dnd": "react-native-gtkx/dnd",
|
|
42
|
+
// Reanimated, on GTK's frame clock (see src/reanimated-compat/index.tsx).
|
|
43
|
+
// The real package needs a worklet runtime and a Babel plugin.
|
|
44
|
+
"react-native-reanimated": "react-native-gtkx/reanimated",
|
|
45
|
+
// Where Reanimated 4 moved the worklet surface (see
|
|
46
|
+
// src/worklets-compat/index.ts). Libraries pull scheduleOnRN/scheduleOnUI
|
|
47
|
+
// out of it at module scope with no try/require guard, so an unaliased
|
|
48
|
+
// name fails at IMPORT rather than at use.
|
|
49
|
+
"react-native-worklets": "react-native-gtkx/worklets",
|
|
50
|
+
// Not a port of RNGH (docs/research/gestures.md): the shim supplies
|
|
51
|
+
// GestureHandlerRootView, the one symbol apps that use none of the rest
|
|
52
|
+
// still have at the root of their tree, and makes every other export throw
|
|
53
|
+
// where it is used instead of arriving as undefined.
|
|
54
|
+
"react-native-gesture-handler": "react-native-gtkx/gesture-handler",
|
|
55
|
+
};
|
|
56
|
+
/** The default aliases an app may retarget or drop — everything but the platform. */
|
|
57
|
+
export const CONFIGURABLE_ALIASES = Object.keys(DEFAULT_ALIASES).filter((name) => name !== PLATFORM_ALIAS);
|
|
58
|
+
const fail = (message) => {
|
|
59
|
+
throw new Error(`react-native-gtkx: ${message}`);
|
|
60
|
+
};
|
|
61
|
+
const quoted = (names) => names.map((name) => `"${name}"`).join(", ");
|
|
62
|
+
const escapeRegExp = (literal) => literal.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
63
|
+
/**
|
|
64
|
+
* The string form, compiled. The guard is exact-match-or-slash-prefix, never a
|
|
65
|
+
* bare prefix: `react-native-reanimated-dnd` is a lookalike of
|
|
66
|
+
* `react-native-reanimated`, and `react-native-worklets-core` is a REAL and
|
|
67
|
+
* unrelated package (the VisionCamera one) that looks like
|
|
68
|
+
* `react-native-worklets`. A loose prefix would rewrite either onto a
|
|
69
|
+
* `react-native-gtkx/*` subpath that does not exist. The lookahead keeps the
|
|
70
|
+
* tail out of the match so `String.replace` transplants it onto the target.
|
|
71
|
+
*/
|
|
72
|
+
export const aliasPattern = (name, target) => ({
|
|
73
|
+
pattern: new RegExp(`^${escapeRegExp(name)}(?=$|/)`),
|
|
74
|
+
replace: target,
|
|
75
|
+
});
|
|
76
|
+
const isAliasPattern = (value) => typeof value === "object" &&
|
|
77
|
+
value !== null &&
|
|
78
|
+
"pattern" in value &&
|
|
79
|
+
"replace" in value;
|
|
80
|
+
const checkTarget = (name, target) => {
|
|
81
|
+
if (target.trim() !== target || target === "") {
|
|
82
|
+
fail(`aliases["${name}"] must be a package specifier, got ${JSON.stringify(target)}.`);
|
|
83
|
+
}
|
|
84
|
+
if (target.startsWith(".") || target.startsWith("/")) {
|
|
85
|
+
fail(`aliases["${name}"] is ${JSON.stringify(target)}, a path. Alias targets are module ` +
|
|
86
|
+
"specifiers resolved from the importing file — name a package or one of its " +
|
|
87
|
+
"subpaths instead.");
|
|
88
|
+
}
|
|
89
|
+
if (target.endsWith("/")) {
|
|
90
|
+
fail(`aliases["${name}"] is ${JSON.stringify(target)}; a target ends at the subpath, ` +
|
|
91
|
+
"not at a slash — the matched tail is appended to it.");
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const compileOverride = (name, value) => {
|
|
95
|
+
if (typeof value === "string") {
|
|
96
|
+
checkTarget(name, value);
|
|
97
|
+
return { name, ...aliasPattern(name, value) };
|
|
98
|
+
}
|
|
99
|
+
if (!isAliasPattern(value)) {
|
|
100
|
+
fail(`aliases["${name}"] must be a target string, a { pattern, replace } rule, or false.`);
|
|
101
|
+
}
|
|
102
|
+
const { pattern, replace } = value;
|
|
103
|
+
if (!(pattern instanceof RegExp)) {
|
|
104
|
+
fail(`aliases["${name}"].pattern must be a RegExp.`);
|
|
105
|
+
}
|
|
106
|
+
if (typeof replace !== "string") {
|
|
107
|
+
fail(`aliases["${name}"].replace must be a string.`);
|
|
108
|
+
}
|
|
109
|
+
if (pattern.flags.includes("g") || pattern.flags.includes("y")) {
|
|
110
|
+
fail(`aliases["${name}"].pattern must not use the g or y flag: a stateful lastIndex ` +
|
|
111
|
+
"makes the same specifier match or not depending on what was resolved before it.");
|
|
112
|
+
}
|
|
113
|
+
if (!pattern.source.startsWith("^")) {
|
|
114
|
+
fail(`aliases["${name}"].pattern must be anchored with ^: an unanchored pattern matches ` +
|
|
115
|
+
`inside a longer specifier, so ${pattern} would also rewrite packages that merely ` +
|
|
116
|
+
"contain that text.");
|
|
117
|
+
}
|
|
118
|
+
return { name, pattern, replace };
|
|
119
|
+
};
|
|
120
|
+
// Probes stand in for "this package, and something inside it". Any rule that
|
|
121
|
+
// matches one of them owns that package name.
|
|
122
|
+
const probesFor = (name) => [name, `${name}/__subpath__`];
|
|
123
|
+
/**
|
|
124
|
+
* Rejects two rules that can both claim the same specifier. Only possible with
|
|
125
|
+
* the `{ pattern }` form — the string form is anchored to its own package name
|
|
126
|
+
* and cannot reach another one — and it is exactly the trap the presets carry
|
|
127
|
+
* a comment about: an anchored replace on a loose prefix turns
|
|
128
|
+
* `react-native-reanimated-dnd` into `react-native-gtkx/reanimated-dnd`, which
|
|
129
|
+
* does not exist. With every rule declared as data, the preset can see it.
|
|
130
|
+
*/
|
|
131
|
+
const checkOverlaps = (rules) => {
|
|
132
|
+
for (const rule of rules) {
|
|
133
|
+
for (const other of rules) {
|
|
134
|
+
if (other.name === rule.name) {
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
const hit = probesFor(other.name).find((probe) => rule.pattern.test(probe));
|
|
138
|
+
if (hit !== undefined) {
|
|
139
|
+
fail(`aliases["${rule.name}"].pattern (${rule.pattern}) also matches "${hit}", which is ` +
|
|
140
|
+
`declared separately as "${other.name}". Two rules claiming one specifier make ` +
|
|
141
|
+
"resolution order-dependent — narrow the pattern, or use the string form, which " +
|
|
142
|
+
"is anchored to its own package name and cannot overlap.");
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
const checkKey = (name, value) => {
|
|
148
|
+
if (name === PLATFORM_ALIAS) {
|
|
149
|
+
fail(value === false
|
|
150
|
+
? `aliases["${PLATFORM_ALIAS}"] cannot be false. "${PLATFORM_ALIAS}" is not a package ` +
|
|
151
|
+
"substitution here, it is the platform: rendering the react-native API as GTK " +
|
|
152
|
+
"widgets is what this preset does, and dropping the alias would leave the app " +
|
|
153
|
+
`importing a package with no linux implementation. Removable: ${quoted(CONFIGURABLE_ALIASES)}.`
|
|
154
|
+
: `aliases["${PLATFORM_ALIAS}"] cannot be retargeted. "${PLATFORM_ALIAS}" is the ` +
|
|
155
|
+
"platform, not one of the substituted packages — it always resolves to " +
|
|
156
|
+
`react-native-gtkx. Configurable: ${quoted(CONFIGURABLE_ALIASES)}.`);
|
|
157
|
+
}
|
|
158
|
+
if (value === false && !(name in DEFAULT_ALIASES)) {
|
|
159
|
+
fail(`aliases["${name}"] is false, but "${name}" is not an alias this preset installs, so ` +
|
|
160
|
+
`there is nothing to drop. Aliases that can be dropped: ${quoted(CONFIGURABLE_ALIASES)}. ` +
|
|
161
|
+
`(To ADD an alias for "${name}", give it a target instead of false.)`);
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* Merges an app's `aliases` deltas over the defaults and validates the result.
|
|
166
|
+
* Throws — at config load, where the mistake is — with a message that names
|
|
167
|
+
* the valid keys.
|
|
168
|
+
*
|
|
169
|
+
* Deltas rather than a replacement list because a replacement list can
|
|
170
|
+
* silently lose an entry, which is #90 all over again: an app that re-listed
|
|
171
|
+
* five of the six names would get the sixth handed to Node before the alias
|
|
172
|
+
* ran, and the failure surfaces as an unrelated crash deep inside a library.
|
|
173
|
+
*/
|
|
174
|
+
export const compileAliases = (overrides = {}) => {
|
|
175
|
+
const targets = new Map(Object.entries(DEFAULT_ALIASES));
|
|
176
|
+
for (const [name, value] of Object.entries(overrides)) {
|
|
177
|
+
checkKey(name, value);
|
|
178
|
+
targets.set(name, value);
|
|
179
|
+
}
|
|
180
|
+
const rules = [];
|
|
181
|
+
for (const [name, value] of targets) {
|
|
182
|
+
if (value !== false) {
|
|
183
|
+
rules.push(compileOverride(name, value));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
checkOverlaps(rules);
|
|
187
|
+
// Longest package name first. Overlaps are rejected above, so this only
|
|
188
|
+
// fixes an order rather than choosing between candidates — but a stable,
|
|
189
|
+
// most-specific-first order is what a reader expects when they scan it.
|
|
190
|
+
rules.sort((a, b) => b.name.length - a.name.length || a.name.localeCompare(b.name));
|
|
191
|
+
return { rules, names: [...targets.keys()] };
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Applies a compiled table to one specifier. Returns the rewritten specifier,
|
|
195
|
+
* or null when nothing claims it — including for `react-native-gtkx` itself
|
|
196
|
+
* and for every package the app turned off with `false`.
|
|
197
|
+
*/
|
|
198
|
+
export const applyAliases = (table, specifier) => {
|
|
199
|
+
for (const rule of table.rules) {
|
|
200
|
+
if (rule.pattern.test(specifier)) {
|
|
201
|
+
return specifier.replace(rule.pattern, rule.replace);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return null;
|
|
205
|
+
};
|
|
206
|
+
/** The table with no app overrides — what both presets install by default. */
|
|
207
|
+
export const DEFAULT_ALIAS_TABLE = compileAliases();
|
|
208
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/aliases/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,8EAA8E;AAC9E,4EAA4E;AAC5E,yEAAyE;AACzE,0EAA0E;AAC1E,8EAA8E;AAC9E,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,qEAAqE;AACrE,EAAE;AACF,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,2EAA2E;AAiD3E;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,cAAc,CAAA;AAE5C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C;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,8EAA8E;AAC9E,MAAM,CAAC,MAAM,mBAAmB,GAAe,cAAc,EAAE,CAAA","sourcesContent":["// The package alias table, and the one place either preset learns about it.\n//\n// Six package names are rewritten onto this platform's own implementations.\n// Until now `src/metro/index.ts` and `src/vite/index.ts` each hand-rolled the\n// same six rules, and they drifted: the vite preset's `ssr.noExternal` listed\n// three of the six names, so vite handed the other three to Node before any\n// `resolveId` hook could run and the REAL `react-native-gesture-handler`\n// loaded into a linux app (#90). Deriving both the resolver rules and the\n// externalization list from one object makes that class of bug inexpressible.\n//\n// This module is imported with an explicit `.js` extension by both presets,\n// because bare Node loads them (metro.config.ts, vite.config.ts) and its ESM\n// resolver does not guess extensions — see scripts/check-package.ts.\n//\n// The rules are DATA rather than functions on purpose. Data can be validated:\n// a typo'd key can be named, a pattern that also matches a separately declared\n// package can be reported at config time, and the string form can be anchored\n// by construction. All three are failure modes this repo has actually had.\n\n/**\n * A rewrite rule in its general form: a pattern matched against the whole\n * specifier and the replacement it produces (`$1`… back-references allowed).\n * Only needed when a package's subpath layout differs from its target's — the\n * string form covers \"exact name or subpath, tail transplanted\".\n */\nexport type AliasPattern = {\n pattern: RegExp\n replace: string\n}\n\n/**\n * What an `aliases` entry may say about one package name:\n * - a string target — exact name or subpath, tail transplanted;\n * - a `{ pattern, replace }` rule for a differing subpath layout;\n * - `false` — drop an alias this preset installs, so the real package loads.\n */\nexport type AliasOverride = string | AliasPattern | false\n\n/** The `aliases` option, keyed by package name. */\nexport type AliasOverrides = Readonly<Record<string, AliasOverride>>\n\n/** A validated rule, tagged with the package name it was declared under. */\nexport type CompiledAlias = {\n /** The package name this rule belongs to. */\n name: string\n pattern: RegExp\n replace: string\n}\n\n/** The result of validating an `aliases` option against the defaults. */\nexport type AliasTable = {\n /**\n * Rules to try, most specific package name first. Order is a tie-breaker\n * only: overlapping rules are rejected, so at most one can ever match.\n */\n rules: readonly CompiledAlias[]\n /**\n * Every package name the table knows about, INCLUDING the ones turned off\n * with `false`. The vite preset keeps all of them inside its own pipeline:\n * a package whose alias was dropped still imports `react-native` at module\n * scope, and that import only reaches the alias if Node never sees the\n * package first.\n */\n names: readonly string[]\n}\n\n/**\n * `react-native` is not a package substitution and is not configurable. It is\n * the platform: \"the react-native API rendered as GTK widgets\" is what this\n * package IS, so a preset that stopped aliasing it would not be this preset.\n */\nexport const PLATFORM_ALIAS = \"react-native\"\n\n/**\n * The aliases both presets install, package name → target. See docs/api.md\n * for the full story on each, and for which one is a real choice.\n */\nexport const DEFAULT_ALIASES: Readonly<Record<string, string>> = {\n // The platform. Not configurable: the out-of-tree npmPackageName\n // declaration alone does not alias imports for a Metro `bundle`, and the\n // vite path has no such declaration at all — the resolver has to.\n \"react-native\": \"react-native-gtkx\",\n // The SVG surface, in the shape of the react-native-svg package (see\n // src/svg-compat/index.ts). The real package is a native module.\n \"react-native-svg\": \"react-native-gtkx/svg\",\n // Drag and drop, on GtkDragSource/GtkDropTarget (see src/dnd/index.ts).\n // The ONE alias that is a genuine choice: the real 2.0.0 does run here on\n // top of the compat surfaces below, so an app may want it. Everything else\n // in this table substitutes an implementation that cannot run at all.\n \"react-native-reanimated-dnd\": \"react-native-gtkx/dnd\",\n // Reanimated, on GTK's frame clock (see src/reanimated-compat/index.tsx).\n // The real package needs a worklet runtime and a Babel plugin.\n \"react-native-reanimated\": \"react-native-gtkx/reanimated\",\n // Where Reanimated 4 moved the worklet surface (see\n // src/worklets-compat/index.ts). Libraries pull scheduleOnRN/scheduleOnUI\n // out of it at module scope with no try/require guard, so an unaliased\n // name fails at IMPORT rather than at use.\n \"react-native-worklets\": \"react-native-gtkx/worklets\",\n // Not a port of RNGH (docs/research/gestures.md): the shim supplies\n // GestureHandlerRootView, the one symbol apps that use none of the rest\n // still have at the root of their tree, and makes every other export throw\n // where it is used instead of arriving as undefined.\n \"react-native-gesture-handler\": \"react-native-gtkx/gesture-handler\",\n}\n\n/** The default aliases an app may retarget or drop — everything but the platform. */\nexport const CONFIGURABLE_ALIASES: readonly string[] = Object.keys(\n DEFAULT_ALIASES,\n).filter((name) => name !== PLATFORM_ALIAS)\n\nconst fail = (message: string): never => {\n throw new Error(`react-native-gtkx: ${message}`)\n}\n\nconst quoted = (names: readonly string[]): string =>\n names.map((name) => `\"${name}\"`).join(\", \")\n\nconst escapeRegExp = (literal: string): string =>\n literal.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")\n\n/**\n * The string form, compiled. The guard is exact-match-or-slash-prefix, never a\n * bare prefix: `react-native-reanimated-dnd` is a lookalike of\n * `react-native-reanimated`, and `react-native-worklets-core` is a REAL and\n * unrelated package (the VisionCamera one) that looks like\n * `react-native-worklets`. A loose prefix would rewrite either onto a\n * `react-native-gtkx/*` subpath that does not exist. The lookahead keeps the\n * tail out of the match so `String.replace` transplants it onto the target.\n */\nexport const aliasPattern = (name: string, target: string): AliasPattern => ({\n pattern: new RegExp(`^${escapeRegExp(name)}(?=$|/)`),\n replace: target,\n})\n\nconst isAliasPattern = (value: unknown): value is AliasPattern =>\n typeof value === \"object\" &&\n value !== null &&\n \"pattern\" in value &&\n \"replace\" in value\n\nconst checkTarget = (name: string, target: string): void => {\n if (target.trim() !== target || target === \"\") {\n fail(\n `aliases[\"${name}\"] must be a package specifier, got ${JSON.stringify(target)}.`,\n )\n }\n if (target.startsWith(\".\") || target.startsWith(\"/\")) {\n fail(\n `aliases[\"${name}\"] is ${JSON.stringify(target)}, a path. Alias targets are module ` +\n \"specifiers resolved from the importing file — name a package or one of its \" +\n \"subpaths instead.\",\n )\n }\n if (target.endsWith(\"/\")) {\n fail(\n `aliases[\"${name}\"] is ${JSON.stringify(target)}; a target ends at the subpath, ` +\n \"not at a slash — the matched tail is appended to it.\",\n )\n }\n}\n\nconst compileOverride = (name: string, value: AliasOverride): CompiledAlias => {\n if (typeof value === \"string\") {\n checkTarget(name, value)\n return { name, ...aliasPattern(name, value) }\n }\n if (!isAliasPattern(value)) {\n fail(\n `aliases[\"${name}\"] must be a target string, a { pattern, replace } rule, or false.`,\n )\n }\n const { pattern, replace } = value as AliasPattern\n if (!(pattern instanceof RegExp)) {\n fail(`aliases[\"${name}\"].pattern must be a RegExp.`)\n }\n if (typeof replace !== \"string\") {\n fail(`aliases[\"${name}\"].replace must be a string.`)\n }\n if (pattern.flags.includes(\"g\") || pattern.flags.includes(\"y\")) {\n fail(\n `aliases[\"${name}\"].pattern must not use the g or y flag: a stateful lastIndex ` +\n \"makes the same specifier match or not depending on what was resolved before it.\",\n )\n }\n if (!pattern.source.startsWith(\"^\")) {\n fail(\n `aliases[\"${name}\"].pattern must be anchored with ^: an unanchored pattern matches ` +\n `inside a longer specifier, so ${pattern} would also rewrite packages that merely ` +\n \"contain that text.\",\n )\n }\n return { name, pattern, replace }\n}\n\n// Probes stand in for \"this package, and something inside it\". Any rule that\n// matches one of them owns that package name.\nconst probesFor = (name: string): string[] => [name, `${name}/__subpath__`]\n\n/**\n * Rejects two rules that can both claim the same specifier. Only possible with\n * the `{ pattern }` form — the string form is anchored to its own package name\n * and cannot reach another one — and it is exactly the trap the presets carry\n * a comment about: an anchored replace on a loose prefix turns\n * `react-native-reanimated-dnd` into `react-native-gtkx/reanimated-dnd`, which\n * does not exist. With every rule declared as data, the preset can see it.\n */\nconst checkOverlaps = (rules: readonly CompiledAlias[]): void => {\n for (const rule of rules) {\n for (const other of rules) {\n if (other.name === rule.name) {\n continue\n }\n const hit = probesFor(other.name).find((probe) =>\n rule.pattern.test(probe),\n )\n if (hit !== undefined) {\n fail(\n `aliases[\"${rule.name}\"].pattern (${rule.pattern}) also matches \"${hit}\", which is ` +\n `declared separately as \"${other.name}\". Two rules claiming one specifier make ` +\n \"resolution order-dependent — narrow the pattern, or use the string form, which \" +\n \"is anchored to its own package name and cannot overlap.\",\n )\n }\n }\n }\n}\n\nconst checkKey = (name: string, value: AliasOverride): void => {\n if (name === PLATFORM_ALIAS) {\n fail(\n value === false\n ? `aliases[\"${PLATFORM_ALIAS}\"] cannot be false. \"${PLATFORM_ALIAS}\" is not a package ` +\n \"substitution here, it is the platform: rendering the react-native API as GTK \" +\n \"widgets is what this preset does, and dropping the alias would leave the app \" +\n `importing a package with no linux implementation. Removable: ${quoted(CONFIGURABLE_ALIASES)}.`\n : `aliases[\"${PLATFORM_ALIAS}\"] cannot be retargeted. \"${PLATFORM_ALIAS}\" is the ` +\n \"platform, not one of the substituted packages — it always resolves to \" +\n `react-native-gtkx. Configurable: ${quoted(CONFIGURABLE_ALIASES)}.`,\n )\n }\n if (value === false && !(name in DEFAULT_ALIASES)) {\n fail(\n `aliases[\"${name}\"] is false, but \"${name}\" is not an alias this preset installs, so ` +\n `there is nothing to drop. Aliases that can be dropped: ${quoted(CONFIGURABLE_ALIASES)}. ` +\n `(To ADD an alias for \"${name}\", give it a target instead of false.)`,\n )\n }\n}\n\n/**\n * Merges an app's `aliases` deltas over the defaults and validates the result.\n * Throws — at config load, where the mistake is — with a message that names\n * the valid keys.\n *\n * Deltas rather than a replacement list because a replacement list can\n * silently lose an entry, which is #90 all over again: an app that re-listed\n * five of the six names would get the sixth handed to Node before the alias\n * ran, and the failure surfaces as an unrelated crash deep inside a library.\n */\nexport const compileAliases = (overrides: AliasOverrides = {}): AliasTable => {\n const targets = new Map<string, AliasOverride>(\n Object.entries(DEFAULT_ALIASES),\n )\n for (const [name, value] of Object.entries(overrides)) {\n checkKey(name, value)\n targets.set(name, value)\n }\n const rules: CompiledAlias[] = []\n for (const [name, value] of targets) {\n if (value !== false) {\n rules.push(compileOverride(name, value))\n }\n }\n checkOverlaps(rules)\n // Longest package name first. Overlaps are rejected above, so this only\n // fixes an order rather than choosing between candidates — but a stable,\n // most-specific-first order is what a reader expects when they scan it.\n rules.sort(\n (a, b) => b.name.length - a.name.length || a.name.localeCompare(b.name),\n )\n return { rules, names: [...targets.keys()] }\n}\n\n/**\n * Applies a compiled table to one specifier. Returns the rewritten specifier,\n * or null when nothing claims it — including for `react-native-gtkx` itself\n * and for every package the app turned off with `false`.\n */\nexport const applyAliases = (\n table: AliasTable,\n specifier: string,\n): string | null => {\n for (const rule of table.rules) {\n if (rule.pattern.test(specifier)) {\n return specifier.replace(rule.pattern, rule.replace)\n }\n }\n return null\n}\n\n/** The table with no app overrides — what both presets install by default. */\nexport const DEFAULT_ALIAS_TABLE: AliasTable = compileAliases()\n"]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { CompositeAnimation, FrameScheduler, LoopConfig, ParallelConfig, SpringConfig, TimingConfig } from "./types";
|
|
2
2
|
import { AnimatedValue } from "./value";
|
|
3
|
+
import { AnimatedValueXY } from "./value-xy";
|
|
3
4
|
export type AnimatedApi = {
|
|
4
5
|
Value: typeof AnimatedValue;
|
|
6
|
+
ValueXY: typeof AnimatedValueXY;
|
|
5
7
|
timing(value: AnimatedValue, config: TimingConfig): CompositeAnimation;
|
|
6
8
|
spring(value: AnimatedValue, config: SpringConfig): CompositeAnimation;
|
|
7
9
|
sequence(animations: CompositeAnimation[]): CompositeAnimation;
|