@ankhorage/zora 9.0.1 → 11.0.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 (237) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +2 -2
  3. package/dist/constants.d.ts +2 -1
  4. package/dist/constants.d.ts.map +1 -1
  5. package/dist/constants.js +2 -1
  6. package/dist/constants.js.map +1 -1
  7. package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
  8. package/dist/features/card/cardMeta.d.ts +1 -1
  9. package/dist/features/card/mediaCardMeta.d.ts +1 -1
  10. package/dist/features/card/postCardMeta.d.ts +1 -1
  11. package/dist/features/form/adapters/inbound/Form.d.ts +5 -0
  12. package/dist/features/form/adapters/inbound/Form.d.ts.map +1 -0
  13. package/dist/features/form/adapters/inbound/Form.js +18 -0
  14. package/dist/features/form/adapters/inbound/Form.js.map +1 -0
  15. package/dist/{components/form → features/form/adapters/inbound}/FormActions.d.ts +1 -1
  16. package/dist/features/form/adapters/inbound/FormActions.d.ts.map +1 -0
  17. package/dist/{components/form → features/form/adapters/inbound}/FormActions.js +3 -3
  18. package/dist/features/form/adapters/inbound/FormActions.js.map +1 -0
  19. package/dist/features/form/adapters/inbound/FormError.d.ts +5 -0
  20. package/dist/features/form/adapters/inbound/FormError.d.ts.map +1 -0
  21. package/dist/features/form/adapters/inbound/FormError.js +18 -0
  22. package/dist/features/form/adapters/inbound/FormError.js.map +1 -0
  23. package/dist/features/form/adapters/inbound/FormField.d.ts +5 -0
  24. package/dist/features/form/adapters/inbound/FormField.d.ts.map +1 -0
  25. package/dist/{patterns/form-field → features/form/adapters/inbound}/FormField.js +5 -4
  26. package/dist/features/form/adapters/inbound/FormField.js.map +1 -0
  27. package/dist/features/form/formActionsMeta.d.ts +9 -0
  28. package/dist/features/form/formActionsMeta.d.ts.map +1 -0
  29. package/dist/features/form/formActionsMeta.js +9 -0
  30. package/dist/features/form/formActionsMeta.js.map +1 -0
  31. package/dist/features/form/formErrorMeta.d.ts +32 -0
  32. package/dist/features/form/formErrorMeta.d.ts.map +1 -0
  33. package/dist/features/form/formErrorMeta.js +19 -0
  34. package/dist/features/form/formErrorMeta.js.map +1 -0
  35. package/dist/{components/form/meta.d.ts → features/form/formFieldMeta.d.ts} +28 -39
  36. package/dist/features/form/formFieldMeta.d.ts.map +1 -0
  37. package/dist/features/form/formFieldMeta.js +35 -0
  38. package/dist/features/form/formFieldMeta.js.map +1 -0
  39. package/dist/features/form/formMeta.d.ts +61 -0
  40. package/dist/features/form/formMeta.d.ts.map +1 -0
  41. package/dist/features/form/formMeta.js +34 -0
  42. package/dist/features/form/formMeta.js.map +1 -0
  43. package/dist/features/form/public.d.ts +8 -0
  44. package/dist/features/form/public.d.ts.map +1 -0
  45. package/dist/features/form/public.js +7 -0
  46. package/dist/features/form/public.js.map +1 -0
  47. package/dist/{components → features}/form/useFormController.d.ts +1 -1
  48. package/dist/features/form/useFormController.d.ts.map +1 -0
  49. package/dist/{components → features}/form/useFormController.js +1 -1
  50. package/dist/features/form/useFormController.js.map +1 -0
  51. package/dist/{components/form → features/form/utils}/validation.d.ts +1 -1
  52. package/dist/features/form/utils/validation.d.ts.map +1 -0
  53. package/dist/{components/form → features/form/utils}/validation.js +2 -4
  54. package/dist/features/form/utils/validation.js.map +1 -0
  55. package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.d.ts +5 -0
  56. package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.d.ts.map +1 -0
  57. package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.js +10 -0
  58. package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.js.map +1 -0
  59. package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +36 -0
  60. package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts.map +1 -0
  61. package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.js +37 -0
  62. package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.js.map +1 -0
  63. package/dist/features/keyboard-avoiding-view/public.d.ts +3 -0
  64. package/dist/features/keyboard-avoiding-view/public.d.ts.map +1 -0
  65. package/dist/features/keyboard-avoiding-view/public.js +3 -0
  66. package/dist/features/keyboard-avoiding-view/public.js.map +1 -0
  67. package/dist/features/layout/boxMeta.d.ts +1 -1
  68. package/dist/features/layout/containerMeta.d.ts +1 -1
  69. package/dist/features/layout/gridMeta.d.ts +1 -1
  70. package/dist/features/layout/stackMeta.d.ts +1 -1
  71. package/dist/features/list/flatListMeta.d.ts +1 -1
  72. package/dist/features/list/sectionListMeta.d.ts +1 -1
  73. package/dist/features/surface/surfaceMeta.d.ts +1 -1
  74. package/dist/features/uploader/adapters/inbound/Uploader.d.ts.map +1 -1
  75. package/dist/features/uploader/adapters/inbound/Uploader.js +1 -1
  76. package/dist/features/uploader/adapters/inbound/Uploader.js.map +1 -1
  77. package/dist/index.d.ts +3 -4
  78. package/dist/index.d.ts.map +1 -1
  79. package/dist/index.js +2 -2
  80. package/dist/index.js.map +1 -1
  81. package/dist/layout/screen/meta.d.ts +1 -1
  82. package/dist/layout/screen-section/meta.d.ts +1 -1
  83. package/dist/metadata/allowedChildren.d.ts +3 -3
  84. package/dist/metadata/allowedChildren.d.ts.map +1 -1
  85. package/dist/metadata/allowedChildren.js +2 -2
  86. package/dist/metadata/allowedChildren.js.map +1 -1
  87. package/dist/metadata/bindableComponentMeta.d.ts +2 -2
  88. package/dist/metadata/componentMeta.d.ts.map +1 -1
  89. package/dist/metadata/componentMeta.js +6 -3
  90. package/dist/metadata/componentMeta.js.map +1 -1
  91. package/dist/patterns/auth/AuthForm.d.ts +21 -0
  92. package/dist/patterns/auth/AuthForm.d.ts.map +1 -0
  93. package/dist/patterns/auth/AuthForm.js +19 -0
  94. package/dist/patterns/auth/AuthForm.js.map +1 -0
  95. package/dist/patterns/auth/AuthFormField.d.ts +16 -0
  96. package/dist/patterns/auth/AuthFormField.d.ts.map +1 -0
  97. package/dist/patterns/auth/AuthFormField.js +38 -0
  98. package/dist/patterns/auth/AuthFormField.js.map +1 -0
  99. package/dist/patterns/auth/ForgotPasswordForm.d.ts.map +1 -1
  100. package/dist/patterns/auth/ForgotPasswordForm.js +2 -2
  101. package/dist/patterns/auth/ForgotPasswordForm.js.map +1 -1
  102. package/dist/patterns/auth/OtpForm.d.ts.map +1 -1
  103. package/dist/patterns/auth/OtpForm.js +2 -2
  104. package/dist/patterns/auth/OtpForm.js.map +1 -1
  105. package/dist/patterns/auth/SignInForm.d.ts.map +1 -1
  106. package/dist/patterns/auth/SignInForm.js +2 -2
  107. package/dist/patterns/auth/SignInForm.js.map +1 -1
  108. package/dist/patterns/auth/SignUpForm.d.ts.map +1 -1
  109. package/dist/patterns/auth/SignUpForm.js +2 -2
  110. package/dist/patterns/auth/SignUpForm.js.map +1 -1
  111. package/dist/patterns/auth/types.d.ts +1 -1
  112. package/dist/patterns/auth/types.d.ts.map +1 -1
  113. package/dist/patterns/auth/types.js.map +1 -1
  114. package/dist/patterns/auth/utils.d.ts +1 -1
  115. package/dist/patterns/auth/utils.d.ts.map +1 -1
  116. package/dist/patterns/auth/utils.js.map +1 -1
  117. package/dist/patterns/inspector-field/InspectorField.js +1 -1
  118. package/dist/patterns/inspector-field/InspectorField.js.map +1 -1
  119. package/dist/patterns/message-bubble/meta.d.ts +1 -1
  120. package/dist/patterns/notice/meta.d.ts +1 -1
  121. package/dist/patterns/panel/meta.d.ts +1 -1
  122. package/dist/patterns/reader/meta.d.ts +2 -2
  123. package/dist/patterns/scanner/meta.d.ts +2 -2
  124. package/dist/registry.js +3 -3
  125. package/dist/registry.js.map +1 -1
  126. package/dist/{components/form/types.d.ts → types/form.d.ts} +12 -28
  127. package/dist/types/form.d.ts.map +1 -0
  128. package/dist/types/form.js +2 -0
  129. package/dist/types/form.js.map +1 -0
  130. package/dist/types/keyboard-avoiding-view.d.ts +6 -0
  131. package/dist/types/keyboard-avoiding-view.d.ts.map +1 -0
  132. package/dist/types/keyboard-avoiding-view.js +2 -0
  133. package/dist/types/keyboard-avoiding-view.js.map +1 -0
  134. package/package.json +3 -2
  135. package/src/audit.test.ts +2 -4
  136. package/src/constants.ts +2 -1
  137. package/src/featureManifest.test.ts +7 -0
  138. package/src/features/form/adapters/inbound/Form.tsx +39 -0
  139. package/src/{components/form → features/form/adapters/inbound}/FormActions.tsx +4 -4
  140. package/src/features/form/adapters/inbound/FormError.tsx +22 -0
  141. package/src/{patterns/form-field → features/form/adapters/inbound}/FormField.tsx +6 -4
  142. package/src/features/form/formActionsMeta.ts +9 -0
  143. package/src/features/form/formErrorMeta.ts +19 -0
  144. package/src/features/form/formFieldMeta.ts +35 -0
  145. package/src/features/form/formMeta.ts +34 -0
  146. package/src/{components/form/index.ts → features/form/public.ts} +6 -7
  147. package/src/{components → features}/form/useFormController.ts +2 -2
  148. package/src/{components/form → features/form/utils}/validation.test.ts +4 -1
  149. package/src/{components/form → features/form/utils}/validation.ts +4 -8
  150. package/src/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.tsx +18 -0
  151. package/src/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.ts +38 -0
  152. package/src/features/keyboard-avoiding-view/public.ts +5 -0
  153. package/src/features/uploader/adapters/inbound/Uploader.tsx +1 -1
  154. package/src/index.ts +31 -29
  155. package/src/metadata/allowedChildren.ts +2 -2
  156. package/src/metadata/componentMeta.test.ts +32 -2
  157. package/src/metadata/componentMeta.ts +6 -3
  158. package/src/patterns/auth/AuthForm.tsx +68 -0
  159. package/src/patterns/auth/AuthFormField.tsx +81 -0
  160. package/src/patterns/auth/ForgotPasswordForm.tsx +3 -2
  161. package/src/patterns/auth/OtpForm.tsx +3 -2
  162. package/src/patterns/auth/SignInForm.tsx +3 -2
  163. package/src/patterns/auth/SignUpForm.tsx +3 -2
  164. package/src/patterns/auth/types.ts +1 -1
  165. package/src/patterns/auth/utils.ts +1 -1
  166. package/src/patterns/inspector-field/InspectorField.tsx +1 -1
  167. package/src/platformAcceptance.test.ts +1 -1
  168. package/src/registry.ts +3 -3
  169. package/src/showcaseCoverage.test.ts +1 -0
  170. package/src/theme/themeScopeStructure.test.ts +5 -7
  171. package/src/{components/form/types.ts → types/form.ts} +12 -36
  172. package/src/types/keyboard-avoiding-view.ts +10 -0
  173. package/dist/components/form/Form.d.ts +0 -7
  174. package/dist/components/form/Form.d.ts.map +0 -1
  175. package/dist/components/form/Form.js +0 -34
  176. package/dist/components/form/Form.js.map +0 -1
  177. package/dist/components/form/FormActions.d.ts.map +0 -1
  178. package/dist/components/form/FormActions.js.map +0 -1
  179. package/dist/components/form/FormError.d.ts +0 -7
  180. package/dist/components/form/FormError.d.ts.map +0 -1
  181. package/dist/components/form/FormError.js +0 -21
  182. package/dist/components/form/FormError.js.map +0 -1
  183. package/dist/components/form/FormField.d.ts +0 -7
  184. package/dist/components/form/FormField.d.ts.map +0 -1
  185. package/dist/components/form/FormField.js +0 -81
  186. package/dist/components/form/FormField.js.map +0 -1
  187. package/dist/components/form/index.d.ts +0 -8
  188. package/dist/components/form/index.d.ts.map +0 -1
  189. package/dist/components/form/index.js +0 -7
  190. package/dist/components/form/index.js.map +0 -1
  191. package/dist/components/form/meta.d.ts.map +0 -1
  192. package/dist/components/form/meta.js +0 -94
  193. package/dist/components/form/meta.js.map +0 -1
  194. package/dist/components/form/types.d.ts.map +0 -1
  195. package/dist/components/form/types.js +0 -2
  196. package/dist/components/form/types.js.map +0 -1
  197. package/dist/components/form/useFormController.d.ts.map +0 -1
  198. package/dist/components/form/useFormController.js.map +0 -1
  199. package/dist/components/form/validation.d.ts.map +0 -1
  200. package/dist/components/form/validation.js.map +0 -1
  201. package/dist/features/splash-screen/adapters/inbound/SplashScreen.d.ts +0 -11
  202. package/dist/features/splash-screen/adapters/inbound/SplashScreen.d.ts.map +0 -1
  203. package/dist/features/splash-screen/adapters/inbound/SplashScreen.js +0 -55
  204. package/dist/features/splash-screen/adapters/inbound/SplashScreen.js.map +0 -1
  205. package/dist/features/splash-screen/public.d.ts +0 -3
  206. package/dist/features/splash-screen/public.d.ts.map +0 -1
  207. package/dist/features/splash-screen/public.js +0 -2
  208. package/dist/features/splash-screen/public.js.map +0 -1
  209. package/dist/features/splash-screen/splashScreenMeta.d.ts +0 -39
  210. package/dist/features/splash-screen/splashScreenMeta.d.ts.map +0 -1
  211. package/dist/features/splash-screen/splashScreenMeta.js +0 -40
  212. package/dist/features/splash-screen/splashScreenMeta.js.map +0 -1
  213. package/dist/patterns/form-field/FormField.d.ts +0 -4
  214. package/dist/patterns/form-field/FormField.d.ts.map +0 -1
  215. package/dist/patterns/form-field/FormField.js.map +0 -1
  216. package/dist/patterns/form-field/index.d.ts +0 -2
  217. package/dist/patterns/form-field/index.d.ts.map +0 -1
  218. package/dist/patterns/form-field/index.js +0 -2
  219. package/dist/patterns/form-field/index.js.map +0 -1
  220. package/dist/patterns/form-field/types.d.ts +0 -9
  221. package/dist/patterns/form-field/types.d.ts.map +0 -1
  222. package/dist/patterns/form-field/types.js +0 -2
  223. package/dist/patterns/form-field/types.js.map +0 -1
  224. package/dist/types/splash-screen.d.ts +0 -16
  225. package/dist/types/splash-screen.d.ts.map +0 -1
  226. package/dist/types/splash-screen.js +0 -2
  227. package/dist/types/splash-screen.js.map +0 -1
  228. package/src/components/form/Form.tsx +0 -74
  229. package/src/components/form/FormError.tsx +0 -34
  230. package/src/components/form/FormField.tsx +0 -157
  231. package/src/components/form/meta.ts +0 -98
  232. package/src/features/splash-screen/adapters/inbound/SplashScreen.tsx +0 -98
  233. package/src/features/splash-screen/public.ts +0 -2
  234. package/src/features/splash-screen/splashScreenMeta.ts +0 -41
  235. package/src/patterns/form-field/index.ts +0 -1
  236. package/src/patterns/form-field/types.ts +0 -16
  237. package/src/types/splash-screen.ts +0 -18
@@ -0,0 +1,34 @@
1
+ export const formMeta = {
2
+ name: 'Form',
3
+ category: 'component',
4
+ directManifestNode: true,
5
+ allowedChildren: ['FormError', 'FormField'],
6
+ blueprint: {
7
+ label: 'Form',
8
+ defaultProps: { submitLabel: 'Submit', loading: false, disabled: false },
9
+ },
10
+ bindings: {
11
+ events: {
12
+ submit: {
13
+ label: 'Submit',
14
+ description: 'Runs when the form is submitted.',
15
+ payload: { eventType: 'form.submit', fields: [] },
16
+ },
17
+ },
18
+ },
19
+ events: {
20
+ submit: {
21
+ label: 'Submit',
22
+ eventType: 'form.submit',
23
+ description: 'Emitted when the form is submitted.',
24
+ payloadFields: [],
25
+ },
26
+ },
27
+ slots: { actions: { label: 'Actions', allowedChildren: ['Button', 'ButtonGroup'] } },
28
+ props: {
29
+ submitLabel: { type: 'string', category: 'Content', label: 'Submit label', default: 'Submit' },
30
+ loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
31
+ disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
32
+ },
33
+ };
34
+ //# sourceMappingURL=formMeta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formMeta.js","sourceRoot":"","sources":["../../../src/features/form/formMeta.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;IAC3C,SAAS,EAAE;QACT,KAAK,EAAE,MAAM;QACb,YAAY,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;KACzE;IACD,QAAQ,EAAE;QACR,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,kCAAkC;gBAC/C,OAAO,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,EAAE;aAClD;SACF;KACF;IACD,MAAM,EAAE;QACN,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,SAAS,EAAE,aAAa;YACxB,WAAW,EAAE,qCAAqC;YAClD,aAAa,EAAE,EAAE;SAClB;KACF;IACD,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAE,EAAE;IACpF,KAAK,EAAE;QACL,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC9F,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE;QACjF,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE;KACpF;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\nexport const formMeta = {\n name: 'Form',\n category: 'component',\n directManifestNode: true,\n allowedChildren: ['FormError', 'FormField'],\n blueprint: {\n label: 'Form',\n defaultProps: { submitLabel: 'Submit', loading: false, disabled: false },\n },\n bindings: {\n events: {\n submit: {\n label: 'Submit',\n description: 'Runs when the form is submitted.',\n payload: { eventType: 'form.submit', fields: [] },\n },\n },\n },\n events: {\n submit: {\n label: 'Submit',\n eventType: 'form.submit',\n description: 'Emitted when the form is submitted.',\n payloadFields: [],\n },\n },\n slots: { actions: { label: 'Actions', allowedChildren: ['Button', 'ButtonGroup'] } },\n props: {\n submitLabel: { type: 'string', category: 'Content', label: 'Submit label', default: 'Submit' },\n loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },\n disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -0,0 +1,8 @@
1
+ export type { FormActionsProps, FormErrorProps, FormErrors, FormFieldConfig, FormFieldInputType, FormFieldProps, FormProps, FormValidationErrors, FormValidationResult, FormValues, UseFormControllerOptions, UseFormControllerResult, ValidationRule, } from '../../types/form';
2
+ export { Form } from './adapters/inbound/Form';
3
+ export { FormActions } from './adapters/inbound/FormActions';
4
+ export { FormError } from './adapters/inbound/FormError';
5
+ export { FormField } from './adapters/inbound/FormField';
6
+ export { useFormController } from './useFormController';
7
+ export { hasRequiredRule, validateField, validateFields, validateValue } from './utils/validation';
8
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/form/public.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACV,wBAAwB,EACxB,uBAAuB,EACvB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { Form } from './adapters/inbound/Form';
2
+ export { FormActions } from './adapters/inbound/FormActions';
3
+ export { FormError } from './adapters/inbound/FormError';
4
+ export { FormField } from './adapters/inbound/FormField';
5
+ export { useFormController } from './useFormController';
6
+ export { hasRequiredRule, validateField, validateFields, validateValue } from './utils/validation';
7
+ //# sourceMappingURL=public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/form/public.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldInputType,\n FormFieldProps,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from '../../types/form';\nexport { Form } from './adapters/inbound/Form';\nexport { FormActions } from './adapters/inbound/FormActions';\nexport { FormError } from './adapters/inbound/FormError';\nexport { FormField } from './adapters/inbound/FormField';\nexport { useFormController } from './useFormController';\nexport { hasRequiredRule, validateField, validateFields, validateValue } from './utils/validation';\n"]}
@@ -1,3 +1,3 @@
1
- import type { UseFormControllerOptions, UseFormControllerResult } from './types';
1
+ import type { UseFormControllerOptions, UseFormControllerResult } from '../../types/form';
2
2
  export declare function useFormController<TName extends string = string>({ fields, initialValues, values: controlledValues, errors: externalErrors, onChange, onSubmit, validateOnChange, }: UseFormControllerOptions<TName>): UseFormControllerResult<TName>;
3
3
  //# sourceMappingURL=useFormController.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFormController.d.ts","sourceRoot":"","sources":["../../../src/features/form/useFormController.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAIV,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAe1B,wBAAgB,iBAAiB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,EAC/D,MAAM,EACN,aAAa,EACb,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,cAAc,EACtB,QAAQ,EACR,QAAQ,EACR,gBAAwB,GACzB,EAAE,wBAAwB,CAAC,KAAK,CAAC,GAAG,uBAAuB,CAAC,KAAK,CAAC,CA4ElE"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { validateFields } from './validation';
2
+ import { validateFields } from './utils/validation';
3
3
  function createInitialValues(fields, initialValues) {
4
4
  const values = fields.reduce((nextValues, field) => {
5
5
  nextValues[field.name] = initialValues?.[field.name] ?? '';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFormController.js","sourceRoot":"","sources":["../../../src/features/form/useFormController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,SAAS,mBAAmB,CAC1B,MAAkC,EAClC,aAAqD;IAErD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAiC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE;QACjF,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,aAAa,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAC3D,OAAO,UAAU,CAAC;IACpB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,MAA2B,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAgC,EAC/D,MAAM,EACN,aAAa,EACb,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,cAAc,EACtB,QAAQ,EACR,QAAQ,EACR,gBAAgB,GAAG,KAAK,GACQ;IAChC,MAAM,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAoB,GAAG,EAAE,CACjE,mBAAmB,CAAC,MAAM,EAAE,aAAa,CAAC,CAC3C,CAAC;IACF,MAAM,CAAC,cAAc,EAAE,iBAAiB,C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AC;YAClD,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrC,CAAC;IACH,CAAC,EACD,CAAC,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAC9C,CAAC;IAEF,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,KAAK,IAAI,EAAE;QAChD,MAAM,MAAM,GAAG,QAAQ,EAAE,CAAC;QAE1B,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAClB,OAAO;QACT,CAAC;QAED,MAAM,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IAEjC,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACnC,mBAAmB,CAAC,EAAE,CAAC,CAAC;QACxB,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC/B,CAAC,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC,CAAC;IAEnC,OAAO;QACL,MAAM;QACN,MAAM;QACN,SAAS;QACT,aAAa;QACb,QAAQ;QACR,YAAY;QACZ,KAAK;KACN,CAAC;AACJ,CAAC","sourcesContent":["import React from 'react';\n\nimport type {\n FormErrors,\n FormFieldValue,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n} from '../../types/form';\nimport { validateFields } from './utils/validation';\n\nfunction createInitialValues<TName extends string>(\n fields: readonly { name: TName }[],\n initialValues: Partial<FormValues<TName>> | undefined,\n): FormValues<TName> {\n const values = fields.reduce<Record<string, FormFieldValue>>((nextValues, field) => {\n nextValues[field.name] = initialValues?.[field.name] ?? '';\n return nextValues;\n }, {});\n\n return values as FormValues<TName>;\n}\n\nexport function useFormController<TName extends string = string>({\n fields,\n initialValues,\n values: controlledValues,\n errors: externalErrors,\n onChange,\n onSubmit,\n validateOnChange = false,\n}: UseFormControllerOptions<TName>): UseFormControllerResult<TName> {\n const [initialFormValues] = React.useState<FormValues<TName>>(() =>\n createInitialValues(fields, initialValues),\n );\n const [internalValues, setInternalValues] = React.useState<FormValues<TName>>(\n () => initialFormValues,\n );\n const [validationErrors, setValidationErrors] = React.useState<FormErrors<TName>>({});\n\n const values = controlledValues ?? internalValues;\n const errors = React.useMemo(\n () => ({\n ...validationErrors,\n ...externalErrors,\n }),\n [externalErrors, validationErrors],\n );\n\n const setValues = React.useCallback(\n (nextValues: FormValues<TName>) => {\n if (!controlledValues) {\n setInternalValues(nextValues);\n }\n\n onChange?.(nextValues);\n },\n [controlledValues, onChange],\n );\n\n const validate = React.useCallback(() => {\n const result = validateFields(fields, values);\n setValidationErrors(result.errors);\n return result;\n }, [fields, values]);\n\n const setFieldValue = React.useCallback(\n (name: TName, value: FormFieldValue) => {\n const nextValues = {\n ...values,\n [name]: value,\n };\n\n setValues(nextValues);\n\n if (validateOnChange) {\n const result = validateFields(fields, nextValues);\n setValidationErrors(result.errors);\n }\n },\n [fields, setValues, validateOnChange, values],\n );\n\n const handleSubmit = React.useCallback(async () => {\n const result = validate();\n\n if (!result.valid) {\n return;\n }\n\n await onSubmit?.(values);\n }, [onSubmit, validate, values]);\n\n const reset = React.useCallback(() => {\n setValidationErrors({});\n setValues(initialFormValues);\n }, [initialFormValues, setValues]);\n\n return {\n values,\n errors,\n setValues,\n setFieldValue,\n validate,\n handleSubmit,\n reset,\n };\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { FormFieldConfig, FormValidationResult, FormValues, ValidationRule } from './types';
1
+ import type { FormFieldConfig, FormValidationResult, FormValues, ValidationRule } from '../../../types/form';
2
2
  export declare function hasRequiredRule(rules: readonly ValidationRule[] | undefined): boolean;
3
3
  export declare function validateValue(value: string, rules: readonly ValidationRule[] | undefined): string | undefined;
4
4
  export declare function validateField<TName extends string>(field: FormFieldConfig<TName>, values: FormValues<TName>): string | undefined;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../src/features/form/utils/validation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,UAAU,EACV,cAAc,EACf,MAAM,qBAAqB,CAAC;AAE7B,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,GAAG,OAAO,CAErF;AAED,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,SAAS,cAAc,EAAE,GAAG,SAAS,GAC3C,MAAM,GAAG,SAAS,CAkCpB;AAED,wBAAgB,aAAa,CAAC,KAAK,SAAS,MAAM,EAChD,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,EAC7B,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,GACxB,MAAM,GAAG,SAAS,CAEpB;AAED,wBAAgB,cAAc,CAAC,KAAK,SAAS,MAAM,EACjD,MAAM,EAAE,SAAS,eAAe,CAAC,KAAK,CAAC,EAAE,EACzC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,GACxB,oBAAoB,CAAC,KAAK,CAAC,CAe7B"}
@@ -1,4 +1,4 @@
1
- const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
1
+ import { isEmail } from '@ankhorage/utility/regex';
2
2
  export function hasRequiredRule(rules) {
3
3
  return rules?.some((rule) => rule.kind === 'required') ?? false;
4
4
  }
@@ -11,9 +11,7 @@ export function validateValue(value, rules) {
11
11
  if (rule.kind === 'required' && normalizedValue.length === 0) {
12
12
  return rule.message ?? 'This field is required.';
13
13
  }
14
- if (rule.kind === 'email' &&
15
- normalizedValue.length > 0 &&
16
- !emailPattern.test(normalizedValue)) {
14
+ if (rule.kind === 'email' && normalizedValue.length > 0 && !isEmail(normalizedValue)) {
17
15
  return rule.message ?? 'Enter a valid email address.';
18
16
  }
19
17
  if (rule.kind === 'minLength' && value.length < rule.value) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../../src/features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AI,CAAC,KAAK,CAAC,EAAE,CAAC;oBACvD,OAAO,IAAI,CAAC,OAAO,IAAI,sBAAsB,CAAC;gBAChD,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,IAAI,CAAC,OAAO,IAAI,sBAAsB,CAAC;YAChD,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,KAA6B,EAC7B,MAAyB;IAEzB,OAAO,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,MAAyC,EACzC,MAAyB;IAEzB,MAAM,MAAM,GAAgC,EAAE,CAAC;IAE/C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAE3C,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QAC7B,CAAC;IACH,CAAC;IAED,OAAO;QACL,MAAM;QACN,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC;KACxC,CAAC;AACJ,CAAC","sourcesContent":["import { isEmail } from '@ankhorage/utility/regex';\n\nimport type {\n FormFieldConfig,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n ValidationRule,\n} from '../../../types/form';\n\nexport function hasRequiredRule(rules: readonly ValidationRule[] | undefined): boolean {\n return rules?.some((rule) => rule.kind === 'required') ?? false;\n}\n\nexport function validateValue(\n value: string,\n rules: readonly ValidationRule[] | undefined,\n): string | undefined {\n if (!rules?.length) {\n return undefined;\n }\n\n for (const rule of rules) {\n const normalizedValue = value.trim();\n\n if (rule.kind === 'required' && normalizedValue.length === 0) {\n return rule.message ?? 'This field is required.';\n }\n\n if (rule.kind === 'email' && normalizedValue.length > 0 && !isEmail(normalizedValue)) {\n return rule.message ?? 'Enter a valid email address.';\n }\n\n if (rule.kind === 'minLength' && value.length < rule.value) {\n return rule.message ?? `Enter at least ${rule.value} characters.`;\n }\n\n if (rule.kind === 'pattern') {\n try {\n const pattern = new RegExp(rule.value);\n\n if (normalizedValue.length > 0 && !pattern.test(value)) {\n return rule.message ?? 'Enter a valid value.';\n }\n } catch {\n return rule.message ?? 'Enter a valid value.';\n }\n }\n }\n\n return undefined;\n}\n\nexport function validateField<TName extends string>(\n field: FormFieldConfig<TName>,\n values: FormValues<TName>,\n): string | undefined {\n return validateValue(values[field.name], field.rules);\n}\n\nexport function validateFields<TName extends string>(\n fields: readonly FormFieldConfig<TName>[],\n values: FormValues<TName>,\n): FormValidationResult<TName> {\n const errors: FormValidationErrors<TName> = {};\n\n for (const field of fields) {\n const error = validateField(field, values);\n\n if (error) {\n errors[field.name] = error;\n }\n }\n\n return {\n errors,\n valid: Object.keys(errors).length === 0,\n };\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { KeyboardAvoidingViewProps } from '../../../../types/keyboard-avoiding-view';
3
+ /*** Native keyboard-aware container exposed through the canonical ZORA feature boundary. */
4
+ export declare const KeyboardAvoidingView: (props: KeyboardAvoidingViewProps) => React.ReactElement | null;
5
+ //# sourceMappingURL=KeyboardAvoidingView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyboardAvoidingView.d.ts","sourceRoot":"","sources":["../../../../../src/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAE1F,4FAA4F;AAC5F,eAAO,MAAM,oBAAoB,iEAAgD,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { KeyboardAvoidingView as SurfaceKeyboardAvoidingView } from '@ankhorage/surface';
2
+ import React from 'react';
3
+ import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
4
+ /*** Native keyboard-aware container exposed through the canonical ZORA feature boundary. */
5
+ export const KeyboardAvoidingView = withZoraThemeScope(KeyboardAvoidingViewInner);
6
+ /*** Forwards React Native keyboard avoidance and view props without adding platform behavior. */
7
+ function KeyboardAvoidingViewInner({ themeId: _themeId, mode: _mode, interactionPolicy: _interactionPolicy, ...props }) {
8
+ return <SurfaceKeyboardAvoidingView {...props}/>;
9
+ }
10
+ //# sourceMappingURL=KeyboardAvoidingView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyboardAvoidingView.js","sourceRoot":"","sources":["../../../../../src/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,IAAI,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACzF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG1E,4FAA4F;AAC5F,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC,yBAAyB,CAAC,CAAC;AAElF,iGAAiG;AACjG,SAAS,yBAAyB,CAAC,EACjC,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,GAAG,KAAK,EACkB;IAC1B,OAAO,CAAC,2BAA2B,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACpD,CAAC","sourcesContent":["import { KeyboardAvoidingView as SurfaceKeyboardAvoidingView } from '@ankhorage/surface';\nimport React from 'react';\n\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { KeyboardAvoidingViewProps } from '../../../../types/keyboard-avoiding-view';\n\n/*** Native keyboard-aware container exposed through the canonical ZORA feature boundary. */\nexport const KeyboardAvoidingView = withZoraThemeScope(KeyboardAvoidingViewInner);\n\n/*** Forwards React Native keyboard avoidance and view props without adding platform behavior. */\nfunction KeyboardAvoidingViewInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n ...props\n}: KeyboardAvoidingViewProps) {\n return <SurfaceKeyboardAvoidingView {...props} />;\n}\n"]}
@@ -0,0 +1,36 @@
1
+ export declare const keyboardAvoidingViewMeta: {
2
+ readonly name: "KeyboardAvoidingView";
3
+ readonly category: "layout";
4
+ readonly directManifestNode: true;
5
+ readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
6
+ readonly blueprint: {
7
+ readonly label: "Keyboard avoiding view";
8
+ readonly defaultProps: {
9
+ readonly behavior: "padding";
10
+ readonly enabled: true;
11
+ readonly keyboardVerticalOffset: 0;
12
+ };
13
+ };
14
+ readonly props: {
15
+ readonly behavior: {
16
+ readonly type: "enum";
17
+ readonly category: "Behavior";
18
+ readonly label: "Behavior";
19
+ readonly enum: readonly ["height", "position", "padding"];
20
+ readonly default: "padding";
21
+ };
22
+ readonly enabled: {
23
+ readonly type: "boolean";
24
+ readonly category: "Behavior";
25
+ readonly label: "Enabled";
26
+ readonly default: true;
27
+ };
28
+ readonly keyboardVerticalOffset: {
29
+ readonly type: "number";
30
+ readonly category: "Layout";
31
+ readonly label: "Keyboard vertical offset";
32
+ readonly default: 0;
33
+ };
34
+ };
35
+ };
36
+ //# sourceMappingURL=keyboardAvoidingViewMeta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboardAvoidingViewMeta.d.ts","sourceRoot":"","sources":["../../../src/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCC,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';
2
+ export const keyboardAvoidingViewMeta = {
3
+ name: 'KeyboardAvoidingView',
4
+ category: 'layout',
5
+ directManifestNode: true,
6
+ allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
7
+ blueprint: {
8
+ label: 'Keyboard avoiding view',
9
+ defaultProps: {
10
+ behavior: 'padding',
11
+ enabled: true,
12
+ keyboardVerticalOffset: 0,
13
+ },
14
+ },
15
+ props: {
16
+ behavior: {
17
+ type: 'enum',
18
+ category: 'Behavior',
19
+ label: 'Behavior',
20
+ enum: ['height', 'position', 'padding'],
21
+ default: 'padding',
22
+ },
23
+ enabled: {
24
+ type: 'boolean',
25
+ category: 'Behavior',
26
+ label: 'Enabled',
27
+ default: true,
28
+ },
29
+ keyboardVerticalOffset: {
30
+ type: 'number',
31
+ category: 'Layout',
32
+ label: 'Keyboard vertical offset',
33
+ default: 0,
34
+ },
35
+ },
36
+ };
37
+ //# sourceMappingURL=keyboardAvoidingViewMeta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboardAvoidingViewMeta.js","sourceRoot":"","sources":["../../../src/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAG5E,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,sBAAsB;IAC5B,QAAQ,EAAE,QAAQ;IAClB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,CAAC,GAAG,0BAA0B,CAAC;IAChD,SAAS,EAAE;QACT,KAAK,EAAE,wBAAwB;QAC/B,YAAY,EAAE;YACZ,QAAQ,EAAE,SAAS;YACnB,OAAO,EAAE,IAAI;YACb,sBAAsB,EAAE,CAAC;SAC1B;KACF;IACD,KAAK,EAAE;QACL,QAAQ,EAAE;YACR,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC;YACvC,OAAO,EAAE,SAAS;SACnB;QACD,OAAO,EAAE;YACP,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,IAAI;SACd;QACD,sBAAsB,EAAE;YACtB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,0BAA0B;YACjC,OAAO,EAAE,CAAC;SACX;KACF;CACmC,CAAC","sourcesContent":["import { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';\nimport type { ZoraComponentMeta } from '../../metadata/types';\n\nexport const keyboardAvoidingViewMeta = {\n name: 'KeyboardAvoidingView',\n category: 'layout',\n directManifestNode: true,\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n blueprint: {\n label: 'Keyboard avoiding view',\n defaultProps: {\n behavior: 'padding',\n enabled: true,\n keyboardVerticalOffset: 0,\n },\n },\n props: {\n behavior: {\n type: 'enum',\n category: 'Behavior',\n label: 'Behavior',\n enum: ['height', 'position', 'padding'],\n default: 'padding',\n },\n enabled: {\n type: 'boolean',\n category: 'Behavior',\n label: 'Enabled',\n default: true,\n },\n keyboardVerticalOffset: {\n type: 'number',\n category: 'Layout',\n label: 'Keyboard vertical offset',\n default: 0,\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -0,0 +1,3 @@
1
+ export { type KeyboardAvoidingViewBehavior, type KeyboardAvoidingViewProps, } from '../../types/keyboard-avoiding-view';
2
+ export { KeyboardAvoidingView } from './adapters/inbound/KeyboardAvoidingView';
3
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/keyboard-avoiding-view/public.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,GAC/B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export {} from '../../types/keyboard-avoiding-view';
2
+ export { KeyboardAvoidingView } from './adapters/inbound/KeyboardAvoidingView';
3
+ //# sourceMappingURL=public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/keyboard-avoiding-view/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC","sourcesContent":["export {\n type KeyboardAvoidingViewBehavior,\n type KeyboardAvoidingViewProps,\n} from '../../types/keyboard-avoiding-view';\nexport { KeyboardAvoidingView } from './adapters/inbound/KeyboardAvoidingView';\n"]}
@@ -2,7 +2,7 @@ export declare const boxMeta: {
2
2
  readonly name: "Box";
3
3
  readonly category: "foundation";
4
4
  readonly directManifestNode: true;
5
- readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
5
+ readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
6
6
  readonly props: {
7
7
  readonly bg: {
8
8
  readonly type: "color";
@@ -2,7 +2,7 @@ export declare const containerMeta: {
2
2
  readonly name: "Container";
3
3
  readonly category: "foundation";
4
4
  readonly directManifestNode: true;
5
- readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
5
+ readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
6
6
  readonly props: {
7
7
  [k: string]: {
8
8
  readonly type: "spacing";
@@ -2,7 +2,7 @@ export declare const gridMeta: {
2
2
  readonly name: "Grid";
3
3
  readonly category: "foundation";
4
4
  readonly directManifestNode: true;
5
- readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
5
+ readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
6
6
  readonly props: {
7
7
  readonly cols: {
8
8
  readonly type: "number";
@@ -2,7 +2,7 @@ export declare const stackMeta: {
2
2
  readonly name: "Stack";
3
3
  readonly category: "foundation";
4
4
  readonly directManifestNode: true;
5
- readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
5
+ readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
6
6
  readonly props: {
7
7
  readonly direction: {
8
8
  readonly type: "enum";
@@ -5,7 +5,7 @@ export declare const flatListMeta: {
5
5
  readonly blueprint: {
6
6
  readonly label: "Flat list";
7
7
  };
8
- readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
8
+ readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
9
9
  readonly description: "Virtualized children. Put node.repeat on this list for keyed data and item bindings; bind selection on the child Button/Card press event. Bound the list viewport and avoid nesting in a same-direction ScrollView.";
10
10
  readonly events: {
11
11
  readonly visibleItemsChange: {
@@ -109,6 +109,6 @@ export declare const sectionListMeta: {
109
109
  };
110
110
  readonly category: "layout";
111
111
  readonly directManifestNode: true;
112
- readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
112
+ readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
113
113
  };
114
114
  //# sourceMappingURL=sectionListMeta.d.ts.map
@@ -2,7 +2,7 @@ export declare const surfaceMeta: {
2
2
  readonly name: "Surface";
3
3
  readonly category: "foundation";
4
4
  readonly directManifestNode: true;
5
- readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
5
+ readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
6
6
  readonly props: {
7
7
  readonly variant: {
8
8
  readonly type: "enum";
@@ -1 +1 @@
1
- {"version":3,"file":"Uploader.d.ts","sourceRoot":"","sources":["../../../../../src/features/uploader/adapters/inbound/Uploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAe,aAAa,EAAc,MAAM,0BAA0B,CAAC;AAUvF,gFAAgF;AAChF,eAAO,MAAM,QAAQ,qDAAoC,CAAC"}
1
+ {"version":3,"file":"Uploader.d.ts","sourceRoot":"","sources":["../../../../../src/features/uploader/adapters/inbound/Uploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAe,aAAa,EAAc,MAAM,0BAA0B,CAAC;AAWvF,gFAAgF;AAChF,eAAO,MAAM,QAAQ,qDAAoC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { Modal } from '../../../../components/modal';
3
- import { FormField } from '../../../../patterns/form-field';
4
3
  import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
5
4
  import { Button } from '../../../button/public';
5
+ import { FormField } from '../../../form/public';
6
6
  import { Icon } from '../../../icon/public';
7
7
  import { Image } from '../../../image/public';
8
8
  import { Box, Stack } from '../../../layout/public';
@@ -1 +1 @@
1
- {"version":3,"file":"Uploader.js","sourceRoot":"","sources":["../../../../../src/features/uploader/adapters/inbound/Uploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,gFAAgF;AAChF,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;AAE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zC,CAAC;AAED,sEAAsE;AACtE,SAAS,kBAAkB,CAAC,KAAc;IACxC,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;QAC5C,OAAO,KAAK,CAAC,OAAO,CAAC;IACvB,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAED,6DAA6D;AAC7D,SAAS,WAAW,CAAC,KAAa;IAChC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,KAAK,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;IAC/C,IAAI,IAAI,GAAG,KAAK,CAAC;IACjB,IAAI,SAAS,GAAG,CAAC,CAAC;IAElB,OAAO,IAAI,IAAI,IAAI,IAAI,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpD,IAAI,IAAI,IAAI,CAAC;QACb,SAAS,IAAI,CAAC,CAAC;IACjB,CAAC;IAED,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC;IACxC,MAAM,OAAO,GAAG,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;IAChF,OAAO,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC;AAC9B,CAAC","sourcesContent":["import React from 'react';\n\nimport { Modal } from '../../../../components/modal';\nimport { FormField } from '../../../../patterns/form-field';\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { UploadAsset, UploaderProps, UploadType } from '../../../../types/upload';\nimport { Button } from '../../../button/public';\nimport { Icon } from '../../../icon/public';\nimport { Image } from '../../../image/public';\nimport { Box, Stack } from '../../../layout/public';\nimport { Progress } from '../../../progress/public';\nimport { Text } from '../../../typography/public';\nimport { validateUploadAsset } from '../../application/use-cases/validateUploadAsset';\nimport { createUploadPicker } from '../../composition/createUploadPicker';\n\n/*** Picks, validates, uploads, previews, and removes one generic file asset. */\nexport const Uploader = withZoraThemeScope(UploaderInner);\n\n/*** Owns the interactive state for the generic uploader inbound adapter. */\nfunction UploaderInner({\n themeId: _themeId,\n mode: _mode,\n testID,\n value = null,\n onChange,\n onValueChange,\n onUploadRequest,\n onRemoveRequest,\n onValidationError,\n uploadState = 'idle',\n uploadProgress,\n label = 'File',\n description,\n helperText,\n errorText,\n type = 'file',\n accept,\n maxSizeBytes,\n required,\n disabled = false,\n readOnly = false,\n validatePicked,\n onUpload,\n onRemove,\n aspectRatio = 1,\n interactionPolicy,\n}: UploaderProps) {\n const passive = interactionPolicy === 'passive';\n const picker = React.useMemo(() => createUploadPicker(), []);\n const [internalError, setInternalError] = React.useState<string | undefined>();\n const [internalUploading, setUploading] = React.useState(false);\n const [internalRemoving, setRemoving] = React.useState(false);\n const uploading = internalUploading || uploadState === 'uploading';\n const removing = internalRemoving || uploadState === 'removing';\n const [progress, setProgress] = React.useState<number | null>(null);\n const [previewOpen, setPreviewOpen] = React.useState(false);\n const mountedRef = React.useRef<boolean | null>(null);\n const resolvedAccept = resolveUploadAccept(type, accept);\n const actionsDisabled = disabled || readOnly;\n const effectiveError = errorText ?? internalError;\n const notifyValue = React.useCallback(\n (next: UploadAsset | null) => {\n onChange?.(next);\n onValueChange?.(next);\n },\n [onChange, onValueChange],\n );\n\n React.useEffect(() => {\n mountedRef.current = true;\n\n return () => {\n mountedRef.current = false;\n };\n }, []);\n\n const isMounted = React.useCallback(() => mountedRef.current === true, []);\n\n const setProgressSafe = React.useCallback(\n (next: number | null) => {\n if (!isMounted()) {\n return;\n }\n\n setProgress(clampProgress(next));\n },\n [isMounted],\n );\n\n const handlePick = React.useCallback(async () => {\n if (passive || actionsDisabled || uploading || removing) {\n return;\n }\n\n setInternalError(undefined);\n\n try {\n const picked = await picker.pickAsync({ accept: resolvedAccept, type });\n if (!picked || !isMounted()) {\n return;\n }\n\n const validationError = validateUploadAsset({\n accept: resolvedAccept,\n asset: picked,\n maxSizeBytes,\n validate: validatePicked,\n });\n if (validationError) {\n setInternalError(validationError);\n onValidationError?.({ message: validationError });\n return;\n }\n\n notifyValue(picked);\n onUploadRequest?.({ asset: picked });\n if (!onUpload) {\n return;\n }\n\n setUploading(true);\n setProgressSafe(0);\n\n try {\n const uploaded = await onUpload(picked, { setProgress: setProgressSafe });\n if (!isMounted()) {\n return;\n }\n\n notifyValue(uploaded);\n setUploading(false);\n setProgress(null);\n } catch (error) {\n if (!isMounted()) {\n return;\n }\n\n setInternalError(formatUnknownError(error));\n setUploading(false);\n setProgress(null);\n }\n } catch (error) {\n if (isMounted()) {\n setInternalError(formatUnknownError(error));\n }\n }\n }, [\n actionsDisabled,\n isMounted,\n maxSizeBytes,\n notifyValue,\n onUploadRequest,\n onValidationError,\n onUpload,\n passive,\n picker,\n removing,\n resolvedAccept,\n setProgressSafe,\n type,\n uploading,\n validatePicked,\n ]);\n\n const handleRemove = React.useCallback(async () => {\n if (passive || actionsDisabled || uploading || removing || !value) {\n return;\n }\n\n setInternalError(undefined);\n if (onRemoveRequest) {\n onRemoveRequest({ asset: value });\n return;\n }\n if (!onRemove) {\n notifyValue(null);\n return;\n }\n\n setRemoving(true);\n try {\n await onRemove(value);\n if (isMounted()) {\n notifyValue(null);\n setRemoving(false);\n }\n } catch (error) {\n if (isMounted()) {\n setInternalError(formatUnknownError(error));\n setRemoving(false);\n }\n }\n }, [\n actionsDisabled,\n isMounted,\n notifyValue,\n onRemove,\n onRemoveRequest,\n passive,\n removing,\n uploading,\n value,\n ]);\n\n const canPreviewImage = type === 'image' && resolveRenderableAssetUrl(value) !== null;\n\n return (\n <>\n <FormField\n description={description}\n disabled={disabled}\n errorText={effectiveError}\n helperText={helperText}\n interactionPolicy={interactionPolicy}\n invalid={Boolean(effectiveError)}\n label={label}\n readOnly={readOnly}\n required={required}\n testID={testID}\n >\n <Stack gap=\"m\">\n <UploadPresentation asset={value} aspectRatio={aspectRatio} type={type} />\n\n {resolvedAccept || maxSizeBytes ? (\n <Stack gap=\"xs\">\n {resolvedAccept ? (\n <Text emphasis=\"muted\" variant=\"caption\">\n Accepted: {resolvedAccept}\n </Text>\n ) : null}\n {maxSizeBytes ? (\n <Text emphasis=\"muted\" variant=\"caption\">\n Max size: {formatBytes(maxSizeBytes)}\n </Text>\n ) : null}\n </Stack>\n ) : null}\n\n {uploading ? (\n <Stack gap=\"xs\">\n <Text emphasis=\"muted\" variant=\"caption\">\n Uploading…\n </Text>\n {uploadProgress !== undefined || progress !== null ? (\n <Progress max={1} value={clampProgress(uploadProgress ?? progress) ?? 0} />\n ) : null}\n </Stack>\n ) : null}\n\n <Stack direction={{ base: 'column', md: 'row' }} gap=\"s\">\n <Button\n disabled={actionsDisabled || uploading || removing}\n interactionPolicy={interactionPolicy}\n onPress={() => {\n void handlePick();\n }}\n >\n {value ? 'Replace file' : 'Select file'}\n </Button>\n\n {value ? (\n <Button\n color=\"danger\"\n disabled={actionsDisabled || uploading || removing}\n interactionPolicy={interactionPolicy}\n loading={removing}\n variant=\"outline\"\n onPress={() => {\n void handleRemove();\n }}\n >\n Remove\n </Button>\n ) : null}\n\n {canPreviewImage ? (\n <Button\n color=\"neutral\"\n interactionPolicy={interactionPolicy}\n variant=\"soft\"\n onPress={() => setPreviewOpen(true)}\n >\n Preview\n </Button>\n ) : null}\n </Stack>\n </Stack>\n </FormField>\n\n {canPreviewImage ? (\n <Modal\n closeOnBackdrop\n interactionPolicy={interactionPolicy}\n onDismiss={() => setPreviewOpen(false)}\n title=\"Image preview\"\n visible={previewOpen}\n >\n <Stack gap=\"m\">\n <Image aspectRatio={aspectRatio} fit=\"contain\" source={value} />\n <Stack direction=\"row\" justify=\"flex-end\">\n <Button\n color=\"neutral\"\n interactionPolicy={interactionPolicy}\n variant=\"soft\"\n onPress={() => setPreviewOpen(false)}\n >\n Close\n </Button>\n </Stack>\n </Stack>\n </Modal>\n ) : null}\n </>\n );\n}\n\n/*** Renders image previews or generic file metadata without exposing picker-specific assets. */\nfunction UploadPresentation({\n asset,\n aspectRatio,\n type,\n}: {\n asset: UploadAsset | null;\n aspectRatio: number;\n type: UploadType;\n}) {\n if (type === 'image') {\n return <Image aspectRatio={aspectRatio} source={asset} />;\n }\n\n return (\n <Box borderWidth={1} p=\"m\" radius=\"m\">\n <Stack direction=\"row\" gap=\"s\">\n <Icon name={resolveUploadIcon(type)} size={22} />\n <Stack gap=\"xs\">\n <Text variant=\"label\" weight=\"semiBold\">\n {asset?.fileName ?? 'No file selected'}\n </Text>\n {asset?.contentType ? (\n <Text emphasis=\"muted\" variant=\"caption\">\n {asset.contentType}\n </Text>\n ) : null}\n </Stack>\n </Stack>\n </Box>\n );\n}\n\n/*** Resolves the native picker default while allowing accept to remain the precise restriction. */\nfunction resolveUploadAccept(type: UploadType, accept: string | undefined): string | undefined {\n if (accept) {\n return accept;\n }\n\n if (type === 'image') {\n return 'image/*';\n }\n\n if (type === 'video') {\n return 'video/*';\n }\n\n return undefined;\n}\n\n/*** Resolves an upload asset URL when it can be rendered directly. */\nfunction resolveRenderableAssetUrl(asset: UploadAsset | null): string | null {\n if (!asset) {\n return null;\n }\n\n switch (asset.kind) {\n case 'local':\n return asset.uri;\n case 'url':\n return asset.url;\n case 'storage':\n return asset.publicUrl ?? null;\n }\n}\n\n/*** Resolves a generic icon for the selected upload mode. */\nfunction resolveUploadIcon(\n type: UploadType,\n): 'attach-outline' | 'document-text-outline' | 'videocam-outline' {\n switch (type) {\n case 'video':\n return 'videocam-outline';\n case 'document':\n return 'document-text-outline';\n case 'file':\n case 'image':\n return 'attach-outline';\n }\n}\n\n/*** Clamps progress callbacks into the normalized 0..1 range. */\nfunction clampProgress(value: number | null): number | null {\n if (value === null || !Number.isFinite(value)) {\n return null;\n }\n\n return Math.max(0, Math.min(1, value));\n}\n\n/*** Converts unknown picker/upload failures into user-facing text. */\nfunction formatUnknownError(error: unknown): string {\n if (error instanceof Error && error.message) {\n return error.message;\n }\n\n if (typeof error === 'string' && error.trim().length > 0) {\n return error;\n }\n\n return 'Something went wrong.';\n}\n\n/*** Formats an upload byte limit for concise helper text. */\nfunction formatBytes(value: number): string {\n if (!Number.isFinite(value) || value <= 0) {\n return '0 B';\n }\n\n const units = ['B', 'KB', 'MB', 'GB'] as const;\n let size = value;\n let unitIndex = 0;\n\n while (size >= 1024 && unitIndex < units.length - 1) {\n size /= 1024;\n unitIndex += 1;\n }\n\n const unit = units.at(unitIndex) ?? 'B';\n const rounded = unitIndex === 0 ? Math.round(size) : Math.round(size * 10) / 10;\n return `${rounded} ${unit}`;\n}\n"]}
1
+ {"version":3,"file":"Uploader.js","sourceRoot":"","sources":["../../../../../src/features/uploader/adapters/inbound/Uploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B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I,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC;IAChF,OAAO,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC;AAC9B,CAAC","sourcesContent":["import React from 'react';\n\nimport { Modal } from '../../../../components/modal';\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { UploadAsset, UploaderProps, UploadType } from '../../../../types/upload';\nimport { Button } from '../../../button/public';\nimport { FormField } from '../../../form/public';\nimport { Icon } from '../../../icon/public';\nimport { Image } from '../../../image/public';\nimport { Box, Stack } from '../../../layout/public';\nimport { Progress } from '../../../progress/public';\nimport { Text } from '../../../typography/public';\nimport { validateUploadAsset } from '../../application/use-cases/validateUploadAsset';\nimport { createUploadPicker } from '../../composition/createUploadPicker';\n\n/*** Picks, validates, uploads, previews, and removes one generic file asset. */\nexport const Uploader = withZoraThemeScope(UploaderInner);\n\n/*** Owns the interactive state for the generic uploader inbound adapter. */\nfunction UploaderInner({\n themeId: _themeId,\n mode: _mode,\n testID,\n value = null,\n onChange,\n onValueChange,\n onUploadRequest,\n onRemoveRequest,\n onValidationError,\n uploadState = 'idle',\n uploadProgress,\n label = 'File',\n description,\n helperText,\n errorText,\n type = 'file',\n accept,\n maxSizeBytes,\n required,\n disabled = false,\n readOnly = false,\n validatePicked,\n onUpload,\n onRemove,\n aspectRatio = 1,\n interactionPolicy,\n}: UploaderProps) {\n const passive = interactionPolicy === 'passive';\n const picker = React.useMemo(() => createUploadPicker(), []);\n const [internalError, setInternalError] = React.useState<string | undefined>();\n const [internalUploading, setUploading] = React.useState(false);\n const [internalRemoving, setRemoving] = React.useState(false);\n const uploading = internalUploading || uploadState === 'uploading';\n const removing = internalRemoving || uploadState === 'removing';\n const [progress, setProgress] = React.useState<number | null>(null);\n const [previewOpen, setPreviewOpen] = React.useState(false);\n const mountedRef = React.useRef<boolean | null>(null);\n const resolvedAccept = resolveUploadAccept(type, accept);\n const actionsDisabled = disabled || readOnly;\n const effectiveError = errorText ?? internalError;\n const notifyValue = React.useCallback(\n (next: UploadAsset | null) => {\n onChange?.(next);\n onValueChange?.(next);\n },\n [onChange, onValueChange],\n );\n\n React.useEffect(() => {\n mountedRef.current = true;\n\n return () => {\n mountedRef.current = false;\n };\n }, []);\n\n const isMounted = React.useCallback(() => mountedRef.current === true, []);\n\n const setProgressSafe = React.useCallback(\n (next: number | null) => {\n if (!isMounted()) {\n return;\n }\n\n setProgress(clampProgress(next));\n },\n [isMounted],\n );\n\n const handlePick = React.useCallback(async () => {\n if (passive || actionsDisabled || uploading || removing) {\n return;\n }\n\n setInternalError(undefined);\n\n try {\n const picked = await picker.pickAsync({ accept: resolvedAccept, type });\n if (!picked || !isMounted()) {\n return;\n }\n\n const validationError = validateUploadAsset({\n accept: resolvedAccept,\n asset: picked,\n maxSizeBytes,\n validate: validatePicked,\n });\n if (validationError) {\n setInternalError(validationError);\n onValidationError?.({ message: validationError });\n return;\n }\n\n notifyValue(picked);\n onUploadRequest?.({ asset: picked });\n if (!onUpload) {\n return;\n }\n\n setUploading(true);\n setProgressSafe(0);\n\n try {\n const uploaded = await onUpload(picked, { setProgress: setProgressSafe });\n if (!isMounted()) {\n return;\n }\n\n notifyValue(uploaded);\n setUploading(false);\n setProgress(null);\n } catch (error) {\n if (!isMounted()) {\n return;\n }\n\n setInternalError(formatUnknownError(error));\n setUploading(false);\n setProgress(null);\n }\n } catch (error) {\n if (isMounted()) {\n setInternalError(formatUnknownError(error));\n }\n }\n }, [\n actionsDisabled,\n isMounted,\n maxSizeBytes,\n notifyValue,\n onUploadRequest,\n onValidationError,\n onUpload,\n passive,\n picker,\n removing,\n resolvedAccept,\n setProgressSafe,\n type,\n uploading,\n validatePicked,\n ]);\n\n const handleRemove = React.useCallback(async () => {\n if (passive || actionsDisabled || uploading || removing || !value) {\n return;\n }\n\n setInternalError(undefined);\n if (onRemoveRequest) {\n onRemoveRequest({ asset: value });\n return;\n }\n if (!onRemove) {\n notifyValue(null);\n return;\n }\n\n setRemoving(true);\n try {\n await onRemove(value);\n if (isMounted()) {\n notifyValue(null);\n setRemoving(false);\n }\n } catch (error) {\n if (isMounted()) {\n setInternalError(formatUnknownError(error));\n setRemoving(false);\n }\n }\n }, [\n actionsDisabled,\n isMounted,\n notifyValue,\n onRemove,\n onRemoveRequest,\n passive,\n removing,\n uploading,\n value,\n ]);\n\n const canPreviewImage = type === 'image' && resolveRenderableAssetUrl(value) !== null;\n\n return (\n <>\n <FormField\n description={description}\n disabled={disabled}\n errorText={effectiveError}\n helperText={helperText}\n interactionPolicy={interactionPolicy}\n invalid={Boolean(effectiveError)}\n label={label}\n readOnly={readOnly}\n required={required}\n testID={testID}\n >\n <Stack gap=\"m\">\n <UploadPresentation asset={value} aspectRatio={aspectRatio} type={type} />\n\n {resolvedAccept || maxSizeBytes ? (\n <Stack gap=\"xs\">\n {resolvedAccept ? (\n <Text emphasis=\"muted\" variant=\"caption\">\n Accepted: {resolvedAccept}\n </Text>\n ) : null}\n {maxSizeBytes ? (\n <Text emphasis=\"muted\" variant=\"caption\">\n Max size: {formatBytes(maxSizeBytes)}\n </Text>\n ) : null}\n </Stack>\n ) : null}\n\n {uploading ? (\n <Stack gap=\"xs\">\n <Text emphasis=\"muted\" variant=\"caption\">\n Uploading…\n </Text>\n {uploadProgress !== undefined || progress !== null ? (\n <Progress max={1} value={clampProgress(uploadProgress ?? progress) ?? 0} />\n ) : null}\n </Stack>\n ) : null}\n\n <Stack direction={{ base: 'column', md: 'row' }} gap=\"s\">\n <Button\n disabled={actionsDisabled || uploading || removing}\n interactionPolicy={interactionPolicy}\n onPress={() => {\n void handlePick();\n }}\n >\n {value ? 'Replace file' : 'Select file'}\n </Button>\n\n {value ? (\n <Button\n color=\"danger\"\n disabled={actionsDisabled || uploading || removing}\n interactionPolicy={interactionPolicy}\n loading={removing}\n variant=\"outline\"\n onPress={() => {\n void handleRemove();\n }}\n >\n Remove\n </Button>\n ) : null}\n\n {canPreviewImage ? (\n <Button\n color=\"neutral\"\n interactionPolicy={interactionPolicy}\n variant=\"soft\"\n onPress={() => setPreviewOpen(true)}\n >\n Preview\n </Button>\n ) : null}\n </Stack>\n </Stack>\n </FormField>\n\n {canPreviewImage ? (\n <Modal\n closeOnBackdrop\n interactionPolicy={interactionPolicy}\n onDismiss={() => setPreviewOpen(false)}\n title=\"Image preview\"\n visible={previewOpen}\n >\n <Stack gap=\"m\">\n <Image aspectRatio={aspectRatio} fit=\"contain\" source={value} />\n <Stack direction=\"row\" justify=\"flex-end\">\n <Button\n color=\"neutral\"\n interactionPolicy={interactionPolicy}\n variant=\"soft\"\n onPress={() => setPreviewOpen(false)}\n >\n Close\n </Button>\n </Stack>\n </Stack>\n </Modal>\n ) : null}\n </>\n );\n}\n\n/*** Renders image previews or generic file metadata without exposing picker-specific assets. */\nfunction UploadPresentation({\n asset,\n aspectRatio,\n type,\n}: {\n asset: UploadAsset | null;\n aspectRatio: number;\n type: UploadType;\n}) {\n if (type === 'image') {\n return <Image aspectRatio={aspectRatio} source={asset} />;\n }\n\n return (\n <Box borderWidth={1} p=\"m\" radius=\"m\">\n <Stack direction=\"row\" gap=\"s\">\n <Icon name={resolveUploadIcon(type)} size={22} />\n <Stack gap=\"xs\">\n <Text variant=\"label\" weight=\"semiBold\">\n {asset?.fileName ?? 'No file selected'}\n </Text>\n {asset?.contentType ? (\n <Text emphasis=\"muted\" variant=\"caption\">\n {asset.contentType}\n </Text>\n ) : null}\n </Stack>\n </Stack>\n </Box>\n );\n}\n\n/*** Resolves the native picker default while allowing accept to remain the precise restriction. */\nfunction resolveUploadAccept(type: UploadType, accept: string | undefined): string | undefined {\n if (accept) {\n return accept;\n }\n\n if (type === 'image') {\n return 'image/*';\n }\n\n if (type === 'video') {\n return 'video/*';\n }\n\n return undefined;\n}\n\n/*** Resolves an upload asset URL when it can be rendered directly. */\nfunction resolveRenderableAssetUrl(asset: UploadAsset | null): string | null {\n if (!asset) {\n return null;\n }\n\n switch (asset.kind) {\n case 'local':\n return asset.uri;\n case 'url':\n return asset.url;\n case 'storage':\n return asset.publicUrl ?? null;\n }\n}\n\n/*** Resolves a generic icon for the selected upload mode. */\nfunction resolveUploadIcon(\n type: UploadType,\n): 'attach-outline' | 'document-text-outline' | 'videocam-outline' {\n switch (type) {\n case 'video':\n return 'videocam-outline';\n case 'document':\n return 'document-text-outline';\n case 'file':\n case 'image':\n return 'attach-outline';\n }\n}\n\n/*** Clamps progress callbacks into the normalized 0..1 range. */\nfunction clampProgress(value: number | null): number | null {\n if (value === null || !Number.isFinite(value)) {\n return null;\n }\n\n return Math.max(0, Math.min(1, value));\n}\n\n/*** Converts unknown picker/upload failures into user-facing text. */\nfunction formatUnknownError(error: unknown): string {\n if (error instanceof Error && error.message) {\n return error.message;\n }\n\n if (typeof error === 'string' && error.trim().length > 0) {\n return error;\n }\n\n return 'Something went wrong.';\n}\n\n/*** Formats an upload byte limit for concise helper text. */\nfunction formatBytes(value: number): string {\n if (!Number.isFinite(value) || value <= 0) {\n return '0 B';\n }\n\n const units = ['B', 'KB', 'MB', 'GB'] as const;\n let size = value;\n let unitIndex = 0;\n\n while (size >= 1024 && unitIndex < units.length - 1) {\n size /= 1024;\n unitIndex += 1;\n }\n\n const unit = units.at(unitIndex) ?? 'B';\n const rounded = unitIndex === 0 ? Math.round(size) : Math.round(size * 10) / 10;\n return `${rounded} ${unit}`;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -4,8 +4,6 @@ export type { BreadcrumbItem, BreadcrumbsProps } from './components/breadcrumbs'
4
4
  export { Breadcrumbs } from './components/breadcrumbs';
5
5
  export type { DatePickerProps, DatePickerValue } from './components/date-picker';
6
6
  export { DatePicker } from './components/date-picker';
7
- export type { FormActionsProps, FormErrorProps, FormErrors, FormFieldConfig, FormFieldControlProps, FormFieldInputType, FormFieldProps, FormProps, FormValidationErrors, FormValidationResult, FormValues, UseFormControllerOptions, UseFormControllerResult, ValidationRule, } from './components/form';
8
- export { Form, FormActions, FormError, FormField, hasRequiredRule, useFormController, validateField, validateFields, validateValue, } from './components/form';
9
7
  export type { GradientColor, GradientColors, GradientLocations, GradientPoint, GradientProps, GradientRenderer, GradientRendererProps, GradientRendererProviderProps, } from './components/gradient';
10
8
  export { Gradient, GradientRendererProvider } from './components/gradient';
11
9
  export type { DropdownMenuProps, MenuAction, MenuActionIntent, MenuProps } from './components/menu';
@@ -65,12 +63,15 @@ export type { DataTableCellContext, DataTableColumn, DataTableColumnAlign, DataT
65
63
  export { DataTable } from './features/data-table/public';
66
64
  export { EmptyState, type EmptyStateAction, type EmptyStateProps, } from './features/empty-state/public';
67
65
  export { Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, } from './features/form/checkbox/public';
66
+ export type { FormActionsProps, FormErrorProps, FormErrors, FormFieldConfig, FormFieldInputType, FormFieldProps, FormProps, FormValidationErrors, FormValidationResult, FormValues, UseFormControllerOptions, UseFormControllerResult, ValidationRule, } from './features/form/public';
67
+ export { Form, FormActions, FormError, FormField, hasRequiredRule, useFormController, validateField, validateFields, validateValue, } from './features/form/public';
68
68
  export { Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, } from './features/form/radio/public';
69
69
  export { TextInput, type TextInputProps, type TextInputTrailingAction, } from './features/form/text-input/public';
70
70
  export type { IconProps } from './features/icon/public';
71
71
  export { Icon } from './features/icon/public';
72
72
  export type { ImageFit, ImageProps, SurfaceImageSource } from './features/image/public';
73
73
  export { Image } from './features/image/public';
74
+ export { KeyboardAvoidingView, type KeyboardAvoidingViewBehavior, type KeyboardAvoidingViewProps, } from './features/keyboard-avoiding-view/public';
74
75
  export type { BoxProps, ContainerProps, DividerProps, GridProps, StackProps, } from './features/layout/public';
75
76
  export type { ContentRailControlPressEvent, ContentRailDirection, ContentRailItemSize, ContentRailMotion, ContentRailProps, ContentRailSpacing, ContentRailVisibleRangeChangeEvent, } from './features/layout/public';
76
77
  export { Box, Container, Divider, Grid, Stack } from './features/layout/public';
@@ -78,8 +79,6 @@ export { ContentRail } from './features/layout/public';
78
79
  export type { ManifestListProps, ManifestListSection, ManifestSectionListProps, } from './features/list/public';
79
80
  export { FlatList, SectionList } from './features/list/public';
80
81
  export { Progress, type ProgressProps, ProgressRing, type ProgressRingProps, } from './features/progress/public';
81
- export type { SplashScreenLogoShape, SplashScreenProps } from './features/splash-screen/public';
82
- export { SplashScreen } from './features/splash-screen/public';
83
82
  export type { SurfaceProps, SurfaceVariant } from './features/surface/public';
84
83
  export { Surface } from './features/surface/public';
85
84
  export type { HeadingAlign, HeadingColor, HeadingEmphasis, HeadingLevel, HeadingProps, HeadingSize, HeadingWeight, } from './features/typography/public';