index.ts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. useOptionalValidation,
  31. useFieldValidation,
  32. type ValidationContextValue,
  33. type ValidationProviderProps,
  34. type FieldValidationState,
  35. } from "./contexts/validation";
  36. export {
  37. RepeatScopeProvider,
  38. useRepeatScope,
  39. type RepeatScopeValue,
  40. } from "./contexts/repeat-scope";
  41. export { FocusProvider, useFocus, useFocusDisable } from "./contexts/focus";
  42. // Schema (Ink's spec format)
  43. export { schema, type InkSchema, type InkSpec } from "./schema";
  44. // Core types (re-exported for convenience)
  45. export type { Spec, StateStore } from "@json-render/core";
  46. export { createStateStore } from "@json-render/core";
  47. // Catalog-aware types for Ink
  48. export type {
  49. SetState,
  50. StateModel,
  51. ComponentContext,
  52. ComponentFn,
  53. Components,
  54. ActionFn,
  55. Actions,
  56. } from "./catalog-types";
  57. // Renderer
  58. export {
  59. // Registry
  60. defineRegistry,
  61. type DefineRegistryResult,
  62. // createRenderer (higher-level, includes providers)
  63. createRenderer,
  64. type CreateRendererProps,
  65. type ComponentMap,
  66. // Low-level
  67. Renderer,
  68. JSONUIProvider,
  69. type ComponentRenderProps,
  70. type ComponentRenderer,
  71. type ComponentRegistry,
  72. type RendererProps,
  73. type JSONUIProviderProps,
  74. } from "./renderer";
  75. // Standard components
  76. export { standardComponents } from "./components/standard";
  77. // Hooks
  78. export {
  79. useUIStream,
  80. useBoundProp,
  81. flatToTree,
  82. type UseUIStreamOptions,
  83. type UseUIStreamReturn,
  84. } from "./hooks";
  85. // Catalog definitions
  86. export {
  87. standardComponentDefinitions,
  88. standardActionDefinitions,
  89. type ComponentDefinition,
  90. type ActionDefinition,
  91. } from "./catalog";