index.ts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. // Contexts
  2. export {
  3. StateProvider,
  4. useStateStore,
  5. useStateValue,
  6. useStateBinding,
  7. type StateContextValue,
  8. type StateProviderProps,
  9. } from "./contexts/state";
  10. export {
  11. VisibilityProvider,
  12. useVisibility,
  13. useIsVisible,
  14. type VisibilityContextValue,
  15. type VisibilityProviderProps,
  16. } from "./contexts/visibility";
  17. export {
  18. ActionProvider,
  19. useActions,
  20. useAction,
  21. ConfirmDialog,
  22. type ActionContextValue,
  23. type ActionProviderProps,
  24. type PendingConfirmation,
  25. type ConfirmDialogProps,
  26. } from "./contexts/actions";
  27. export {
  28. ValidationProvider,
  29. useValidation,
  30. useFieldValidation,
  31. type ValidationContextValue,
  32. type ValidationProviderProps,
  33. type FieldValidationState,
  34. } from "./contexts/validation";
  35. export {
  36. RepeatScopeProvider,
  37. useRepeatScope,
  38. type RepeatScopeValue,
  39. } from "./contexts/repeat-scope";
  40. // Schema (React Native's spec format)
  41. export {
  42. schema,
  43. type ReactNativeSchema,
  44. type ReactNativeSpec,
  45. // Backward compatibility
  46. elementTreeSchema,
  47. type ElementTreeSchema,
  48. type ElementTreeSpec,
  49. } from "./schema";
  50. // Core types (re-exported for convenience)
  51. export type { Spec, StateStore } from "@json-render/core";
  52. export { createStateStore } from "@json-render/core";
  53. // Catalog-aware types for React Native
  54. export type {
  55. SetState,
  56. StateModel,
  57. ComponentContext,
  58. ComponentFn,
  59. Components,
  60. ActionFn,
  61. Actions,
  62. } from "./catalog-types";
  63. // Renderer
  64. export {
  65. // Registry
  66. defineRegistry,
  67. type DefineRegistryResult,
  68. // createRenderer (higher-level, includes providers)
  69. createRenderer,
  70. type CreateRendererProps,
  71. type ComponentMap,
  72. // Low-level
  73. Renderer,
  74. JSONUIProvider,
  75. type ComponentRenderProps,
  76. type ComponentRenderer,
  77. type ComponentRegistry,
  78. type RendererProps,
  79. type JSONUIProviderProps,
  80. // Standard components
  81. standardComponents,
  82. createStandardActionHandlers,
  83. } from "./renderer";
  84. // Hooks
  85. export {
  86. useUIStream,
  87. useBoundProp,
  88. flatToTree,
  89. type UseUIStreamOptions,
  90. type UseUIStreamReturn,
  91. } from "./hooks";
  92. // Catalog definitions
  93. export {
  94. standardComponentDefinitions,
  95. standardActionDefinitions,
  96. type ComponentDefinition,
  97. type ActionDefinition,
  98. } from "./catalog";