@kbach/react-native 1.0.0-beta.9 → 1.1.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/AGENTS.md +504 -0
  2. package/LICENSE +21 -0
  3. package/README.md +206 -70
  4. package/THIRD_PARTY_NOTICES.md +41 -0
  5. package/android/src/main/jniLibs/arm64-v8a/libkbach_core_engine.so +0 -0
  6. package/android/src/main/jniLibs/x86_64/libkbach_core_engine.so +0 -0
  7. package/dist/{chunk-YOC3SHF5.mjs → chunk-6F44N62F.mjs} +2 -2
  8. package/dist/chunk-FSO4WVCH.mjs +112 -0
  9. package/dist/chunk-R7E5D3D6.mjs +623 -0
  10. package/dist/darkModeStore.d.ts +73 -0
  11. package/dist/darkModeStore.js +118 -0
  12. package/dist/dynamicTokens.d.ts +53 -0
  13. package/dist/dynamicTokens.js +75 -0
  14. package/dist/index.d.ts +90 -70
  15. package/dist/index.js +1369 -611
  16. package/dist/index.web.d.ts +91 -1
  17. package/dist/index.web.js +204 -441
  18. package/dist/index.web.mjs +294 -12
  19. package/dist/jsx-dev-runtime.d.ts +2 -2
  20. package/dist/jsx-dev-runtime.js +1600 -603
  21. package/dist/jsx-dev-runtime.web.d.ts +2 -2
  22. package/dist/jsx-dev-runtime.web.js +20 -355
  23. package/dist/jsx-dev-runtime.web.mjs +18 -6
  24. package/dist/jsx-runtime.d.ts +3 -3
  25. package/dist/jsx-runtime.js +1590 -593
  26. package/dist/jsx-runtime.web.d.ts +3 -3
  27. package/dist/jsx-runtime.web.js +17 -355
  28. package/dist/jsx-runtime.web.mjs +2 -3
  29. package/dist/semanticElements-Bk3TB-vt.d.ts +334 -0
  30. package/dist/theme.d.ts +79 -0
  31. package/dist/{chunk-HK6PDJJK.mjs → theme.js} +99 -11
  32. package/llms.txt +38 -0
  33. package/package.json +15 -13
  34. package/src/babel-plugin.js +95 -25
  35. package/dist/chunk-DLIXI5OW.mjs +0 -53
  36. package/dist/chunk-DOWW44F7.mjs +0 -14
  37. package/dist/chunk-H5Z24XX5.mjs +0 -192
  38. package/dist/chunk-SY5OAY2C.mjs +0 -1211
  39. package/dist/chunk-X4UQCEOE.mjs +0 -186
  40. package/dist/chunk-Z664AKW7.mjs +0 -54
  41. package/dist/index.d.mts +0 -83
  42. package/dist/index.mjs +0 -38
  43. package/dist/index.web.d.mts +0 -15
  44. package/dist/jsx-dev-runtime.d.mts +0 -10
  45. package/dist/jsx-dev-runtime.mjs +0 -18
  46. package/dist/jsx-dev-runtime.web.d.mts +0 -10
  47. package/dist/jsx-runtime.d.mts +0 -7
  48. package/dist/jsx-runtime.mjs +0 -15
  49. package/dist/jsx-runtime.web.d.mts +0 -7
  50. package/dist/useColors-CeP5_HvM.d.mts +0 -230
  51. package/dist/useColors-CeP5_HvM.d.ts +0 -230
@@ -1,5 +1,9 @@
1
- export { C as ColorEntry, a as ColorScale, b as ColorsAPI, c as ContainerConfig, K as KbachConfig, T as ThemeConfig, d as ThemeMode, e as ThemeProvider, f as ThemeProviderProps, g as ThemeState, h as applyKbachConfig, i as defaultTheme, j as getGlobalDarkMode, k as getGlobalThemeMode, l as getTheme, r as resolveKbachConfig, s as setGlobalThemeMode, m as setTheme, n as subscribeGlobalDarkMode, t as toggleGlobalDarkMode, u as useColors, o as useTheme } from './useColors-CeP5_HvM.js';
1
+ export { ColorEntry, ContainerConfig, ThemeConfig, defaultTheme, getTheme, setTheme } from './theme';
2
+ export { B as Button, a as ButtonProps, C as ClassArray, b as ClassDictionary, c as ClassValue, d as ColorScale, e as ColorsAPI, H as H1, f as H2, g as H3, h as H4, i as H5, j as H6, k as HeadingProps, K as KbachConfig, P as Paragraph, l as ParagraphProps, T as ThemeProvider, m as ThemeProviderProps, n as ThemeState, p as applyKbachConfig, q as clsx, r as resolveKbachConfig, u as useColors, s as useDynamicToken, t as useTheme } from './semanticElements-Bk3TB-vt.js';
3
+ export { ThemeMode, getGlobalDarkMode, getGlobalThemeMode, setGlobalThemeMode, subscribeGlobalDarkMode, toggleGlobalDarkMode } from './darkModeStore';
4
+ export { deleteDynamicToken, getDynamicToken, setDynamicToken, subscribeDynamicTokens } from './dynamicTokens';
2
5
  import 'react';
6
+ import 'react-native';
3
7
 
4
8
  /**
5
9
  * Resolves `classString` to CSS via the WASM engine, injects every returned
@@ -13,3 +17,89 @@ import 'react';
13
17
  declare function resolveClassName(classString: string): string;
14
18
 
15
19
  export { resolveClassName };
20
+
21
+ /**
22
+ * Ambient module augmentation adding `className?: string` to React
23
+ * Native's own component prop types — without this, `<View
24
+ * className="...">` type-checks fine at RUNTIME (the babel plugin/
25
+ * jsx-runtime accept `className` on ANY host element regardless of its
26
+ * declared prop type — see jsxRuntimeCore.ts's own `processElement` doc
27
+ * comment) but fails `tsc`/editor type-checking, since `ViewProps`/
28
+ * `TextProps`/etc. (react-native's own types) have no `className` field at
29
+ * all. Confirmed as a real, reported gap: nothing in this package shipped
30
+ * this augmentation before, so a React Native CLI project running `tsc`
31
+ * (or just seeing red squiggles in-editor) hit "Property 'className' does
32
+ * not exist on type ... ViewProps ..." on every styled element.
33
+ *
34
+ * A plain `.d.ts` file has no effect on its own unless something actually
35
+ * pulls it into a consumer's type-checking. A side-effect `import
36
+ * './rnClassNameTypes'` from index.ts was the first thing tried here, but
37
+ * tsup's dts rollup (rollup-plugin-dts) tree-shakes a side-effect-only
38
+ * import with nothing it can trace a type reference through — confirmed by
39
+ * hand that this wasn't even consistent (survived one build, silently
40
+ * vanished from an immediately-following clean rebuild of the identical
41
+ * source). `scripts/append-classname-types.mjs` appends this file's own
42
+ * text onto the end of the built `dist/index.d.ts`/`dist/index.web.d.ts`
43
+ * directly as a deterministic post-build step instead — see that script's
44
+ * own doc comment. Anyone who imports ANYTHING from '@kbach/react-native'
45
+ * gets it with no extra tsconfig step needed either way. Same underlying
46
+ * problem (and the interface-merge half of this fix) nativewind — a React
47
+ * Native styling library solving this identical className-typing problem —
48
+ * also has to solve.
49
+ *
50
+ * Every interface below is `export interface XProps extends Readonly<...>
51
+ * {}` in react-native's own generated types (RN >= ~0.81's Flow-to-TS
52
+ * generation, `types_generated/`) — an otherwise-empty body, so merging a
53
+ * member in is exactly as safe as against a hand-written interface.
54
+ * Deliberately NOT listed here: `ImageProps`, `TouchableOpacityProps`,
55
+ * `ModalProps` — these are `export type X = Readonly<...>` TYPE ALIASES in
56
+ * the same generated types, which TypeScript cannot declaration-merge into
57
+ * at all (confirmed by hand: attempting it is a flat "Duplicate identifier"
58
+ * compile error, not a silent no-op). They don't need an entry anyway —
59
+ * confirmed against a real `tsc` run (RN 0.87) that `className` on
60
+ * `Image`/`TouchableOpacity`/`TouchableHighlight`/`Modal`/`SafeAreaView`
61
+ * ALL already type-check cleanly once `ViewProps` and
62
+ * `TouchableWithoutFeedbackProps` below are augmented — each of those
63
+ * components' real prop type composes one or the other somewhere in its
64
+ * own `Omit<...> & ...` chain (`SafeAreaView` in particular turned out to
65
+ * reuse `ViewProps` directly, with no separate props type of its own at
66
+ * all), so the merged `className` field flows through without needing its
67
+ * own dedicated entry.
68
+ */
69
+ export {};
70
+
71
+ declare module 'react-native' {
72
+ interface ViewProps {
73
+ className?: string;
74
+ }
75
+ interface TextProps {
76
+ className?: string;
77
+ }
78
+ interface ScrollViewProps {
79
+ className?: string;
80
+ }
81
+ interface PressableProps {
82
+ className?: string;
83
+ }
84
+ interface TextInputProps {
85
+ className?: string;
86
+ }
87
+ interface TouchableHighlightProps {
88
+ className?: string;
89
+ }
90
+ interface TouchableWithoutFeedbackProps {
91
+ className?: string;
92
+ }
93
+ interface SwitchProps {
94
+ className?: string;
95
+ }
96
+ interface KeyboardAvoidingViewProps {
97
+ className?: string;
98
+ }
99
+ interface FlatListProps<ItemT> {
100
+ className?: string;
101
+ }
102
+ interface SectionListProps<ItemT, SectionT> {
103
+ className?: string;
104
+ }
105
+ }