index.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. // Types
  2. export type {
  3. DynamicValue,
  4. DynamicString,
  5. DynamicNumber,
  6. DynamicBoolean,
  7. UIElement,
  8. FlatElement,
  9. Spec,
  10. VisibilityCondition,
  11. LogicExpression,
  12. AuthState,
  13. StateModel,
  14. ComponentSchema,
  15. ValidationMode,
  16. PatchOp,
  17. JsonPatch,
  18. // SpecStream types
  19. SpecStreamLine,
  20. SpecStreamCompiler,
  21. } from "./types";
  22. export {
  23. DynamicValueSchema,
  24. DynamicStringSchema,
  25. DynamicNumberSchema,
  26. DynamicBooleanSchema,
  27. resolveDynamicValue,
  28. getByPath,
  29. setByPath,
  30. addByPath,
  31. removeByPath,
  32. findFormValue,
  33. // SpecStream - streaming format for building specs (RFC 6902)
  34. parseSpecStreamLine,
  35. applySpecStreamPatch,
  36. compileSpecStream,
  37. createSpecStreamCompiler,
  38. } from "./types";
  39. // Visibility
  40. export type { VisibilityContext } from "./visibility";
  41. export {
  42. VisibilityConditionSchema,
  43. LogicExpressionSchema,
  44. evaluateVisibility,
  45. evaluateLogicExpression,
  46. visibility,
  47. } from "./visibility";
  48. // Prop Expressions
  49. export type { PropExpression } from "./props";
  50. export { resolvePropValue, resolveElementProps } from "./props";
  51. // Actions
  52. export type {
  53. ActionBinding,
  54. /** @deprecated Use ActionBinding instead */
  55. Action,
  56. ActionConfirm,
  57. ActionOnSuccess,
  58. ActionOnError,
  59. ActionHandler,
  60. ActionDefinition,
  61. ResolvedAction,
  62. ActionExecutionContext,
  63. } from "./actions";
  64. export {
  65. ActionBindingSchema,
  66. /** @deprecated Use ActionBindingSchema instead */
  67. ActionSchema,
  68. ActionConfirmSchema,
  69. ActionOnSuccessSchema,
  70. ActionOnErrorSchema,
  71. resolveAction,
  72. executeAction,
  73. interpolateString,
  74. actionBinding,
  75. /** @deprecated Use actionBinding instead */
  76. action,
  77. } from "./actions";
  78. // Validation
  79. export type {
  80. ValidationCheck,
  81. ValidationConfig,
  82. ValidationFunction,
  83. ValidationFunctionDefinition,
  84. ValidationCheckResult,
  85. ValidationResult,
  86. ValidationContext,
  87. } from "./validation";
  88. export {
  89. ValidationCheckSchema,
  90. ValidationConfigSchema,
  91. builtInValidationFunctions,
  92. runValidationCheck,
  93. runValidation,
  94. check,
  95. } from "./validation";
  96. // Spec Structural Validation
  97. export type {
  98. SpecIssueSeverity,
  99. SpecIssue,
  100. SpecValidationIssues,
  101. ValidateSpecOptions,
  102. } from "./spec-validator";
  103. export { validateSpec, autoFixSpec, formatSpecIssues } from "./spec-validator";
  104. // Schema (new API)
  105. export type {
  106. SchemaBuilder,
  107. SchemaType,
  108. SchemaDefinition,
  109. Schema,
  110. Catalog,
  111. PromptOptions,
  112. PromptContext,
  113. PromptTemplate,
  114. SchemaOptions,
  115. SpecValidationResult,
  116. InferCatalogInput,
  117. InferSpec,
  118. // Catalog type inference
  119. InferCatalogComponents,
  120. InferCatalogActions,
  121. InferComponentProps,
  122. InferActionParams,
  123. } from "./schema";
  124. export { defineSchema, defineCatalog } from "./schema";
  125. // User Prompt Builder
  126. export type { UserPromptOptions } from "./prompt";
  127. export { buildUserPrompt } from "./prompt";
  128. // Legacy Catalog (for backwards compatibility during migration)
  129. export type {
  130. ComponentDefinition,
  131. CatalogConfig,
  132. Catalog as LegacyCatalog,
  133. InferCatalogComponentProps,
  134. SystemPromptOptions,
  135. } from "./catalog";
  136. export {
  137. createCatalog,
  138. generateCatalogPrompt,
  139. generateSystemPrompt,
  140. } from "./catalog";