@kbach/react-native 1.0.0-beta.3 → 1.0.0-beta.31

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.
@@ -0,0 +1,29 @@
1
+ import "./chunk-XPVSILI4.mjs";
2
+ import {
3
+ Fragment,
4
+ jsx,
5
+ jsxs
6
+ } from "./chunk-FLPPVP5G.mjs";
7
+ import "./chunk-ZYE4VIZE.mjs";
8
+
9
+ // src/jsxRuntimeCore.ts
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ import { Fragment as Fragment2, useCallback, useRef, useState, useSyncExternalStore } from "react";
12
+ import { Pressable, useWindowDimensions } from "react-native";
13
+ function createJsxDEV(jsx2, jsxs2) {
14
+ return function jsxDEV2(type, props, key, isStaticChildren, source, self) {
15
+ const element = (isStaticChildren ? jsxs2 : jsx2)(type, props, key);
16
+ if (source && element && typeof element === "object" && Object.isExtensible(element)) {
17
+ element._source = source;
18
+ element._self = self;
19
+ }
20
+ return element;
21
+ };
22
+ }
23
+
24
+ // src/jsx-dev-runtime.web.tsx
25
+ var jsxDEV = createJsxDEV(jsx, jsxs);
26
+ export {
27
+ Fragment,
28
+ jsxDEV
29
+ };
@@ -1,30 +1,7 @@
1
- import { ReactElement } from 'react';
1
+ import * as react from 'react';
2
2
  export { Fragment, JSX } from 'react';
3
3
 
4
- /**
5
- * @kbach/react-native/jsx-runtime
6
- *
7
- * Drop-in replacement for react/jsx-runtime — same interception shape as
8
- * @kbach/react/jsx-runtime (Phase 3), but the resolved value becomes the
9
- * `style` prop instead of `className`: View/Text have no `className` prop
10
- * at all. Covers layout, color, spacing, border, typography, dark:,
11
- * active: (Pressable only), and sm:/md:/lg:/xl:/2xl: (gated against the
12
- * current window width, live) — see nativeBridge.ts / resolve_style.rs for
13
- * exactly what's resolved; every other modifier (hover:, group- and peer-
14
- * variants, has-[...], container queries, ...) parses but isn't applied —
15
- * there's no selector/pseudo-state/ancestor system on native to apply them
16
- * with.
17
- *
18
- * `active:` needs different handling from every other modifier: whether an
19
- * element is "pressed" isn't a value that can be read once and reused like
20
- * `dark:`'s color scheme — only RN's `Pressable` ever knows it, and only
21
- * via a style FUNCTION it calls on every press/release
22
- * (`style={({pressed}) => ...}`). So for `type === Pressable` specifically,
23
- * `style` is built as a function instead of a static value; every other
24
- * element type is completely unaffected by this — same code path as before.
25
- */
26
-
27
- declare function jsx(type: unknown, props: Record<string, unknown> | null, key?: string): ReactElement;
28
- declare function jsxs(type: unknown, props: Record<string, unknown> | null, key?: string): ReactElement;
4
+ declare const jsx: (type: unknown, props: Record<string, unknown> | null, key?: string) => react.ReactElement;
5
+ declare const jsxs: (type: unknown, props: Record<string, unknown> | null, key?: string) => react.ReactElement;
29
6
 
30
7
  export { jsx, jsxs };