@kbach/react-native 1.0.0-beta.2 → 1.0.0-beta.20

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.
Files changed (42) hide show
  1. package/README.md +220 -87
  2. package/android/build.gradle +36 -0
  3. package/android/src/main/AndroidManifest.xml +14 -0
  4. package/android/src/main/java/com/kbachnative/KbachModule.kt +83 -0
  5. package/android/src/main/java/com/kbachnative/KbachPackage.kt +54 -0
  6. package/android/src/main/jniLibs/arm64-v8a/libkbach_core_engine.so +0 -0
  7. package/android/src/main/jniLibs/x86_64/libkbach_core_engine.so +0 -0
  8. package/dist/chunk-45GOGUHJ.mjs +107 -0
  9. package/dist/chunk-MJWWZJMH.mjs +40 -0
  10. package/dist/chunk-OGFB3OXS.mjs +552 -0
  11. package/dist/darkModeStore.d.ts +58 -0
  12. package/dist/darkModeStore.js +112 -0
  13. package/dist/dynamicTokens.d.ts +35 -0
  14. package/dist/dynamicTokens.js +75 -0
  15. package/dist/index.d.ts +53 -102
  16. package/dist/index.js +1578 -385
  17. package/dist/index.web.d.ts +18 -0
  18. package/dist/index.web.js +436 -0
  19. package/dist/index.web.mjs +210 -0
  20. package/dist/jsx-dev-runtime.d.ts +3 -12
  21. package/dist/jsx-dev-runtime.js +1565 -344
  22. package/dist/jsx-dev-runtime.web.d.ts +10 -0
  23. package/dist/jsx-dev-runtime.web.js +271 -0
  24. package/dist/jsx-dev-runtime.web.mjs +29 -0
  25. package/dist/jsx-runtime.d.ts +3 -23
  26. package/dist/jsx-runtime.js +1556 -336
  27. package/dist/jsx-runtime.web.d.ts +7 -0
  28. package/dist/jsx-runtime.web.js +252 -0
  29. package/dist/{jsx-runtime.mjs → jsx-runtime.web.mjs} +2 -2
  30. package/dist/theme.d.ts +54 -0
  31. package/dist/{chunk-YHF3QLRL.mjs → theme.js} +94 -72
  32. package/dist/useDynamicToken-Dr15c88t.d.ts +160 -0
  33. package/package.json +62 -14
  34. package/react-native.config.js +29 -0
  35. package/specs/NativeKbachModule.ts +31 -0
  36. package/src/babel-plugin.js +74 -2
  37. package/dist/chunk-SVMYVXY6.mjs +0 -44
  38. package/dist/index.d.mts +0 -148
  39. package/dist/index.mjs +0 -80
  40. package/dist/jsx-dev-runtime.d.mts +0 -19
  41. package/dist/jsx-dev-runtime.mjs +0 -20
  42. package/dist/jsx-runtime.d.mts +0 -27
@@ -0,0 +1,29 @@
1
+ import "./chunk-45GOGUHJ.mjs";
2
+ import {
3
+ Fragment,
4
+ jsx,
5
+ jsxs
6
+ } from "./chunk-MJWWZJMH.mjs";
7
+ import "./chunk-OGFB3OXS.mjs";
8
+
9
+ // src/jsxRuntimeCore.ts
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ import { Fragment as Fragment2, useCallback, 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,27 +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:, and
11
- * active: (Pressable only) — see nativeBridge.ts / resolve_style.rs for
12
- * exactly what's resolved; every other modifier (hover:/responsive/...)
13
- * parses but isn't applied yet.
14
- *
15
- * `active:` needs different handling from every other modifier: whether an
16
- * element is "pressed" isn't a value that can be read once and reused like
17
- * `dark:`'s color scheme — only RN's `Pressable` ever knows it, and only
18
- * via a style FUNCTION it calls on every press/release
19
- * (`style={({pressed}) => ...}`). So for `type === Pressable` specifically,
20
- * `style` is built as a function instead of a static value; every other
21
- * element type is completely unaffected by this — same code path as before.
22
- */
23
-
24
- declare function jsx(type: unknown, props: Record<string, unknown> | null, key?: string): ReactElement;
25
- 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;
26
6
 
27
7
  export { jsx, jsxs };