@ankhorage/zora 12.0.0 → 12.1.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 (215) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/dist/constants.d.ts +2 -0
  4. package/dist/constants.d.ts.map +1 -1
  5. package/dist/constants.js +9 -0
  6. package/dist/constants.js.map +1 -1
  7. package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthForm.d.ts +3 -3
  8. package/dist/features/auth/adapters/inbound/AuthForm.d.ts.map +1 -0
  9. package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthForm.js +2 -2
  10. package/dist/features/auth/adapters/inbound/AuthForm.js.map +1 -0
  11. package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.d.ts +2 -2
  12. package/dist/features/auth/adapters/inbound/AuthFormField.d.ts.map +1 -0
  13. package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.js +2 -2
  14. package/dist/features/auth/adapters/inbound/AuthFormField.js.map +1 -0
  15. package/dist/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.d.ts +1 -1
  16. package/dist/features/auth/adapters/inbound/ForgotPasswordForm.d.ts.map +1 -0
  17. package/dist/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.js +5 -5
  18. package/dist/features/auth/adapters/inbound/ForgotPasswordForm.js.map +1 -0
  19. package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.d.ts +1 -1
  20. package/dist/features/auth/adapters/inbound/OAuthProviderButton.d.ts.map +1 -0
  21. package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.js +3 -3
  22. package/dist/features/auth/adapters/inbound/OAuthProviderButton.js.map +1 -0
  23. package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.d.ts +1 -1
  24. package/dist/features/auth/adapters/inbound/OAuthProviderList.d.ts.map +1 -0
  25. package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.js +2 -2
  26. package/dist/features/auth/adapters/inbound/OAuthProviderList.js.map +1 -0
  27. package/dist/{patterns/auth → features/auth/adapters/inbound}/OtpForm.d.ts +1 -1
  28. package/dist/features/auth/adapters/inbound/OtpForm.d.ts.map +1 -0
  29. package/dist/{patterns/auth → features/auth/adapters/inbound}/OtpForm.js +4 -4
  30. package/dist/features/auth/adapters/inbound/OtpForm.js.map +1 -0
  31. package/dist/{patterns/auth → features/auth/adapters/inbound}/SignInForm.d.ts +1 -1
  32. package/dist/features/auth/adapters/inbound/SignInForm.d.ts.map +1 -0
  33. package/dist/{patterns/auth → features/auth/adapters/inbound}/SignInForm.js +5 -5
  34. package/dist/features/auth/adapters/inbound/SignInForm.js.map +1 -0
  35. package/dist/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.d.ts +1 -1
  36. package/dist/features/auth/adapters/inbound/SignUpForm.d.ts.map +1 -0
  37. package/dist/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.js +3 -3
  38. package/dist/features/auth/adapters/inbound/SignUpForm.js.map +1 -0
  39. package/dist/features/auth/forgotPasswordFormMeta.d.ts +79 -0
  40. package/dist/features/auth/forgotPasswordFormMeta.d.ts.map +1 -0
  41. package/dist/features/auth/forgotPasswordFormMeta.js +48 -0
  42. package/dist/features/auth/forgotPasswordFormMeta.js.map +1 -0
  43. package/dist/features/auth/oauthProviderButtonMeta.d.ts +83 -0
  44. package/dist/features/auth/oauthProviderButtonMeta.d.ts.map +1 -0
  45. package/dist/features/auth/oauthProviderButtonMeta.js +61 -0
  46. package/dist/features/auth/oauthProviderButtonMeta.js.map +1 -0
  47. package/dist/features/auth/oauthProviderListMeta.d.ts +109 -0
  48. package/dist/features/auth/oauthProviderListMeta.d.ts.map +1 -0
  49. package/dist/features/auth/oauthProviderListMeta.js +66 -0
  50. package/dist/features/auth/oauthProviderListMeta.js.map +1 -0
  51. package/dist/features/auth/otpFormMeta.d.ts +89 -0
  52. package/dist/features/auth/otpFormMeta.d.ts.map +1 -0
  53. package/dist/features/auth/otpFormMeta.js +54 -0
  54. package/dist/features/auth/otpFormMeta.js.map +1 -0
  55. package/dist/features/auth/public.d.ts +9 -0
  56. package/dist/features/auth/public.d.ts.map +1 -0
  57. package/dist/features/auth/public.js +8 -0
  58. package/dist/features/auth/public.js.map +1 -0
  59. package/dist/features/auth/signInFormMeta.d.ts +100 -0
  60. package/dist/features/auth/signInFormMeta.d.ts.map +1 -0
  61. package/dist/features/auth/signInFormMeta.js +62 -0
  62. package/dist/features/auth/signInFormMeta.js.map +1 -0
  63. package/dist/features/auth/signUpFormMeta.d.ts +111 -0
  64. package/dist/features/auth/signUpFormMeta.d.ts.map +1 -0
  65. package/dist/features/auth/signUpFormMeta.js +66 -0
  66. package/dist/features/auth/signUpFormMeta.js.map +1 -0
  67. package/dist/{patterns/auth/utils.d.ts → features/auth/utils/authForm.d.ts} +3 -3
  68. package/dist/features/auth/utils/authForm.d.ts.map +1 -0
  69. package/dist/{patterns/auth/utils.js → features/auth/utils/authForm.js} +1 -1
  70. package/dist/features/auth/utils/authForm.js.map +1 -0
  71. package/dist/{patterns/auth → features/auth/utils}/oauthProviders.d.ts +1 -1
  72. package/dist/features/auth/utils/oauthProviders.d.ts.map +1 -0
  73. package/dist/features/auth/utils/oauthProviders.js.map +1 -0
  74. package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
  75. package/dist/features/card/cardMeta.d.ts +1 -1
  76. package/dist/features/card/mediaCardMeta.d.ts +1 -1
  77. package/dist/features/card/postCardMeta.d.ts +1 -1
  78. package/dist/{components/gradient → features/gradient/adapters/inbound}/Gradient.d.ts +1 -1
  79. package/dist/features/gradient/adapters/inbound/Gradient.d.ts.map +1 -0
  80. package/dist/{components/gradient → features/gradient/adapters/inbound}/Gradient.js +2 -2
  81. package/dist/features/gradient/adapters/inbound/Gradient.js.map +1 -0
  82. package/dist/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.d.ts +3 -2
  83. package/dist/features/gradient/adapters/inbound/GradientRendererContext.d.ts.map +1 -0
  84. package/dist/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.js +2 -1
  85. package/dist/features/gradient/adapters/inbound/GradientRendererContext.js.map +1 -0
  86. package/dist/features/gradient/gradientMeta.d.ts +48 -0
  87. package/dist/features/gradient/gradientMeta.d.ts.map +1 -0
  88. package/dist/features/gradient/gradientMeta.js +25 -0
  89. package/dist/features/gradient/gradientMeta.js.map +1 -0
  90. package/dist/features/gradient/public.d.ts +4 -0
  91. package/dist/features/gradient/public.d.ts.map +1 -0
  92. package/dist/features/gradient/public.js +3 -0
  93. package/dist/features/gradient/public.js.map +1 -0
  94. package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +1 -1
  95. package/dist/features/layout/boxMeta.d.ts +1 -1
  96. package/dist/features/layout/containerMeta.d.ts +1 -1
  97. package/dist/features/layout/gridMeta.d.ts +1 -1
  98. package/dist/features/layout/stackMeta.d.ts +1 -1
  99. package/dist/features/list/flatListMeta.d.ts +1 -1
  100. package/dist/features/list/sectionListMeta.d.ts +1 -1
  101. package/dist/features/surface/surfaceMeta.d.ts +1 -1
  102. package/dist/index.d.ts +4 -4
  103. package/dist/index.d.ts.map +1 -1
  104. package/dist/index.js +2 -2
  105. package/dist/index.js.map +1 -1
  106. package/dist/layout/screen/meta.d.ts +1 -1
  107. package/dist/layout/screen-section/meta.d.ts +1 -1
  108. package/dist/metadata/allowedChildren.d.ts +3 -3
  109. package/dist/metadata/allowedChildren.d.ts.map +1 -1
  110. package/dist/metadata/allowedChildren.js +7 -0
  111. package/dist/metadata/allowedChildren.js.map +1 -1
  112. package/dist/metadata/bindableComponentMeta.d.ts +2 -2
  113. package/dist/metadata/componentMeta.d.ts.map +1 -1
  114. package/dist/metadata/componentMeta.js +7 -2
  115. package/dist/metadata/componentMeta.js.map +1 -1
  116. package/dist/patterns/message-bubble/meta.d.ts +1 -1
  117. package/dist/patterns/notice/meta.d.ts +1 -1
  118. package/dist/patterns/panel/meta.d.ts +1 -1
  119. package/dist/patterns/reader/meta.d.ts +2 -2
  120. package/dist/patterns/scanner/meta.d.ts +2 -2
  121. package/dist/registry.js +2 -2
  122. package/dist/registry.js.map +1 -1
  123. package/dist/{patterns/auth/types.d.ts → types/auth.d.ts} +8 -8
  124. package/dist/types/auth.d.ts.map +1 -0
  125. package/dist/types/auth.js +2 -0
  126. package/dist/types/auth.js.map +1 -0
  127. package/dist/{components/gradient/types.d.ts → types/gradient.d.ts} +3 -3
  128. package/dist/types/gradient.d.ts.map +1 -0
  129. package/dist/types/gradient.js +2 -0
  130. package/dist/types/gradient.js.map +1 -0
  131. package/package.json +1 -1
  132. package/src/constants.ts +9 -0
  133. package/src/expo57Migration.test.ts +1 -1
  134. package/src/featureManifest.test.ts +2 -0
  135. package/src/{patterns/auth → features/auth/adapters/inbound}/AuthForm.tsx +5 -5
  136. package/src/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.tsx +4 -4
  137. package/src/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.tsx +8 -8
  138. package/src/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.tsx +4 -4
  139. package/src/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.tsx +3 -3
  140. package/src/{patterns/auth → features/auth/adapters/inbound}/OtpForm.tsx +6 -6
  141. package/src/{patterns/auth → features/auth/adapters/inbound}/SignInForm.tsx +8 -8
  142. package/src/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.tsx +5 -5
  143. package/src/features/auth/forgotPasswordFormMeta.ts +49 -0
  144. package/src/features/auth/oauthProviderButtonMeta.ts +62 -0
  145. package/src/features/auth/oauthProviderListMeta.ts +67 -0
  146. package/src/features/auth/otpFormMeta.ts +55 -0
  147. package/src/features/auth/public.test.ts +34 -0
  148. package/src/{patterns/auth/index.ts → features/auth/public.ts} +12 -12
  149. package/src/features/auth/signInFormMeta.ts +63 -0
  150. package/src/features/auth/signUpFormMeta.ts +67 -0
  151. package/src/{patterns/auth/utils.ts → features/auth/utils/authForm.ts} +2 -2
  152. package/src/{patterns/auth → features/auth/utils}/oauthProviders.test.ts +1 -1
  153. package/src/{patterns/auth → features/auth/utils}/oauthProviders.ts +1 -1
  154. package/src/{components/gradient → features/gradient/adapters/inbound}/Gradient.tsx +3 -3
  155. package/src/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.tsx +3 -2
  156. package/src/features/gradient/gradientMeta.ts +26 -0
  157. package/src/features/gradient/public.test.ts +15 -0
  158. package/src/{components/gradient/index.ts → features/gradient/public.ts} +3 -3
  159. package/src/index.ts +40 -40
  160. package/src/metadata/allowedChildren.ts +7 -0
  161. package/src/metadata/componentMeta.test.ts +7 -0
  162. package/src/metadata/componentMeta.ts +7 -9
  163. package/src/registry.ts +9 -9
  164. package/src/theme/themeScopeStructure.test.ts +7 -5
  165. package/src/{patterns/auth/types.ts → types/auth.ts} +7 -7
  166. package/src/{components/gradient/types.ts → types/gradient.ts} +2 -2
  167. package/dist/components/gradient/Gradient.d.ts.map +0 -1
  168. package/dist/components/gradient/Gradient.js.map +0 -1
  169. package/dist/components/gradient/GradientRendererContext.d.ts.map +0 -1
  170. package/dist/components/gradient/GradientRendererContext.js.map +0 -1
  171. package/dist/components/gradient/index.d.ts +0 -4
  172. package/dist/components/gradient/index.d.ts.map +0 -1
  173. package/dist/components/gradient/index.js +0 -3
  174. package/dist/components/gradient/index.js.map +0 -1
  175. package/dist/components/gradient/meta.d.ts +0 -9
  176. package/dist/components/gradient/meta.d.ts.map +0 -1
  177. package/dist/components/gradient/meta.js +0 -9
  178. package/dist/components/gradient/meta.js.map +0 -1
  179. package/dist/components/gradient/types.d.ts.map +0 -1
  180. package/dist/components/gradient/types.js +0 -2
  181. package/dist/components/gradient/types.js.map +0 -1
  182. package/dist/patterns/auth/AuthForm.d.ts.map +0 -1
  183. package/dist/patterns/auth/AuthForm.js.map +0 -1
  184. package/dist/patterns/auth/AuthFormField.d.ts.map +0 -1
  185. package/dist/patterns/auth/AuthFormField.js.map +0 -1
  186. package/dist/patterns/auth/ForgotPasswordForm.d.ts.map +0 -1
  187. package/dist/patterns/auth/ForgotPasswordForm.js.map +0 -1
  188. package/dist/patterns/auth/OAuthProviderButton.d.ts.map +0 -1
  189. package/dist/patterns/auth/OAuthProviderButton.js.map +0 -1
  190. package/dist/patterns/auth/OAuthProviderList.d.ts.map +0 -1
  191. package/dist/patterns/auth/OAuthProviderList.js.map +0 -1
  192. package/dist/patterns/auth/OtpForm.d.ts.map +0 -1
  193. package/dist/patterns/auth/OtpForm.js.map +0 -1
  194. package/dist/patterns/auth/SignInForm.d.ts.map +0 -1
  195. package/dist/patterns/auth/SignInForm.js.map +0 -1
  196. package/dist/patterns/auth/SignUpForm.d.ts.map +0 -1
  197. package/dist/patterns/auth/SignUpForm.js.map +0 -1
  198. package/dist/patterns/auth/index.d.ts +0 -9
  199. package/dist/patterns/auth/index.d.ts.map +0 -1
  200. package/dist/patterns/auth/index.js +0 -8
  201. package/dist/patterns/auth/index.js.map +0 -1
  202. package/dist/patterns/auth/meta.d.ts +0 -49
  203. package/dist/patterns/auth/meta.d.ts.map +0 -1
  204. package/dist/patterns/auth/meta.js +0 -50
  205. package/dist/patterns/auth/meta.js.map +0 -1
  206. package/dist/patterns/auth/oauthProviders.d.ts.map +0 -1
  207. package/dist/patterns/auth/oauthProviders.js.map +0 -1
  208. package/dist/patterns/auth/types.d.ts.map +0 -1
  209. package/dist/patterns/auth/types.js +0 -2
  210. package/dist/patterns/auth/types.js.map +0 -1
  211. package/dist/patterns/auth/utils.d.ts.map +0 -1
  212. package/dist/patterns/auth/utils.js.map +0 -1
  213. package/src/components/gradient/meta.ts +0 -10
  214. package/src/patterns/auth/meta.ts +0 -57
  215. /package/dist/{patterns/auth → features/auth/utils}/oauthProviders.js +0 -0
@@ -0,0 +1,62 @@
1
+ import { ZORA_COLORS } from '../../internal/colorModel';
2
+ import type { ZoraComponentMeta } from '../../metadata';
3
+
4
+ export const oauthProviderButtonMeta = {
5
+ name: 'OAuthProviderButton',
6
+ category: 'pattern',
7
+ description: 'Renders a provider-branded OAuth action button.',
8
+ directManifestNode: true,
9
+ allowedChildren: [],
10
+ blueprint: {
11
+ label: 'OAuth provider button',
12
+ defaultProps: {
13
+ providerId: 'google',
14
+ fullWidth: true,
15
+ size: 'l',
16
+ variant: 'outline',
17
+ color: 'neutral',
18
+ loading: false,
19
+ disabled: false,
20
+ },
21
+ },
22
+ events: {
23
+ press: {
24
+ label: 'Press',
25
+ eventType: 'oauthProviderButton.press',
26
+ payloadFields: [{ path: 'providerId', type: 'string', label: 'Provider ID' }],
27
+ },
28
+ },
29
+ props: {
30
+ providerId: {
31
+ type: 'string',
32
+ category: 'Authentication',
33
+ label: 'Provider ID',
34
+ default: 'google',
35
+ },
36
+ label: { type: 'string', category: 'Content', label: 'Label' },
37
+ disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
38
+ loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
39
+ fullWidth: { type: 'boolean', category: 'Layout', label: 'Full width', default: true },
40
+ size: {
41
+ type: 'enum',
42
+ category: 'Style',
43
+ label: 'Size',
44
+ enum: ['s', 'm', 'l'],
45
+ default: 'l',
46
+ },
47
+ variant: {
48
+ type: 'enum',
49
+ category: 'Style',
50
+ label: 'Variant',
51
+ enum: ['solid', 'outline', 'ghost', 'soft'],
52
+ default: 'outline',
53
+ },
54
+ color: {
55
+ type: 'enum',
56
+ category: 'Style',
57
+ label: 'Color',
58
+ enum: [...ZORA_COLORS],
59
+ default: 'neutral',
60
+ },
61
+ },
62
+ } as const satisfies ZoraComponentMeta;
@@ -0,0 +1,67 @@
1
+ import { ZORA_COLORS } from '../../internal/colorModel';
2
+ import type { ZoraComponentMeta } from '../../metadata';
3
+
4
+ export const oauthProviderListMeta = {
5
+ name: 'OAuthProviderList',
6
+ category: 'pattern',
7
+ description: 'Renders a configurable group of OAuth provider actions.',
8
+ directManifestNode: true,
9
+ allowedChildren: [],
10
+ blueprint: {
11
+ label: 'OAuth provider list',
12
+ defaultProps: {
13
+ providers: [{ id: 'google', label: 'Continue with Google' }],
14
+ layout: 'stack',
15
+ loading: false,
16
+ disabled: false,
17
+ },
18
+ },
19
+ events: {
20
+ providerPress: {
21
+ label: 'Provider press',
22
+ eventType: 'oauthProviderList.providerPress',
23
+ payloadFields: [{ path: 'providerId', type: 'string', label: 'Provider ID' }],
24
+ },
25
+ },
26
+ props: {
27
+ providers: {
28
+ type: 'array',
29
+ category: 'Authentication',
30
+ label: 'Providers',
31
+ itemSchema: [
32
+ { key: 'id', schema: { type: 'string', category: 'Identity', label: 'Provider ID' } },
33
+ { key: 'label', schema: { type: 'string', category: 'Content', label: 'Label' } },
34
+ { key: 'disabled', schema: { type: 'boolean', category: 'State', label: 'Disabled' } },
35
+ { key: 'loading', schema: { type: 'boolean', category: 'State', label: 'Loading' } },
36
+ ],
37
+ },
38
+ disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
39
+ loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
40
+ fullWidth: { type: 'boolean', category: 'Layout', label: 'Full width' },
41
+ layout: {
42
+ type: 'enum',
43
+ category: 'Layout',
44
+ label: 'Layout',
45
+ enum: ['stack', 'inline'],
46
+ default: 'stack',
47
+ },
48
+ size: {
49
+ type: 'enum',
50
+ category: 'Style',
51
+ label: 'Size',
52
+ enum: ['s', 'm', 'l'],
53
+ },
54
+ variant: {
55
+ type: 'enum',
56
+ category: 'Style',
57
+ label: 'Variant',
58
+ enum: ['solid', 'outline', 'ghost', 'soft'],
59
+ },
60
+ color: {
61
+ type: 'enum',
62
+ category: 'Style',
63
+ label: 'Color',
64
+ enum: [...ZORA_COLORS],
65
+ },
66
+ },
67
+ } as const satisfies ZoraComponentMeta;
@@ -0,0 +1,55 @@
1
+ import type { ZoraComponentMeta } from '../../metadata';
2
+
3
+ export const otpFormMeta = {
4
+ name: 'OtpForm',
5
+ category: 'pattern',
6
+ description: 'Collects and verifies a one-time passcode with an optional resend action.',
7
+ directManifestNode: true,
8
+ allowedChildren: [],
9
+ blueprint: {
10
+ label: 'OTP form',
11
+ defaultProps: {
12
+ length: 6,
13
+ otpLabel: 'Code',
14
+ resendLabel: 'Resend code',
15
+ submitLabel: 'Verify code',
16
+ resendDisabled: false,
17
+ resendLoading: false,
18
+ loading: false,
19
+ disabled: false,
20
+ },
21
+ },
22
+ events: {
23
+ submit: {
24
+ label: 'Submit',
25
+ eventType: 'otpForm.submit',
26
+ payloadFields: [{ path: 'otp', type: 'string', label: 'One-time passcode' }],
27
+ },
28
+ resend: {
29
+ label: 'Resend',
30
+ eventType: 'otpForm.resend',
31
+ payloadFields: [],
32
+ },
33
+ },
34
+ props: {
35
+ length: { type: 'number', category: 'Validation', label: 'Code length', default: 6 },
36
+ otpLabel: { type: 'string', category: 'Content', label: 'Code label' },
37
+ resendLabel: { type: 'string', category: 'Content', label: 'Resend label' },
38
+ submitLabel: { type: 'string', category: 'Content', label: 'Submit label' },
39
+ error: { type: 'string', category: 'State', label: 'Error' },
40
+ resendDisabled: {
41
+ type: 'boolean',
42
+ category: 'State',
43
+ label: 'Resend disabled',
44
+ default: false,
45
+ },
46
+ resendLoading: {
47
+ type: 'boolean',
48
+ category: 'State',
49
+ label: 'Resend loading',
50
+ default: false,
51
+ },
52
+ loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
53
+ disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
54
+ },
55
+ } as const satisfies ZoraComponentMeta;
@@ -0,0 +1,34 @@
1
+ import { expect, test } from 'bun:test';
2
+
3
+ import { ZORA_COMPONENT_META } from '../../metadata/componentMeta';
4
+
5
+ const AUTH_MANIFEST_ELEMENTS = [
6
+ 'ForgotPasswordForm',
7
+ 'OAuthProviderButton',
8
+ 'OAuthProviderList',
9
+ 'OtpForm',
10
+ 'SignInForm',
11
+ 'SignUpForm',
12
+ ] as const;
13
+ const authMetaByName = new Map(Object.entries(ZORA_COMPONENT_META));
14
+
15
+ test('auth solutions are direct manifest leaf nodes with authoring schemas', () => {
16
+ for (const name of AUTH_MANIFEST_ELEMENTS) {
17
+ const meta = authMetaByName.get(name);
18
+ expect(meta?.directManifestNode, name).toBe(true);
19
+ expect(meta?.allowedChildren, name).toEqual([]);
20
+ expect(Object.keys(meta?.props ?? {}).length, name).toBeGreaterThan(0);
21
+ }
22
+ });
23
+
24
+ test('auth solution events expose their actionable boundaries', () => {
25
+ expect(ZORA_COMPONENT_META.SignInForm?.events?.submit?.payloadFields).toContainEqual({
26
+ path: 'secret',
27
+ type: 'string',
28
+ label: 'Secret',
29
+ });
30
+ expect(ZORA_COMPONENT_META.OtpForm?.events?.resend?.eventType).toBe('otpForm.resend');
31
+ expect(ZORA_COMPONENT_META.OAuthProviderList?.events?.providerPress?.payloadFields).toEqual([
32
+ { path: 'providerId', type: 'string', label: 'Provider ID' },
33
+ ]);
34
+ });
@@ -1,14 +1,3 @@
1
- export { ForgotPasswordForm } from './ForgotPasswordForm';
2
- export { OAuthProviderButton } from './OAuthProviderButton';
3
- export { OAuthProviderList } from './OAuthProviderList';
4
- export {
5
- DEFAULT_OAUTH_PROVIDER_ICONS,
6
- resolveOAuthProviderIcon,
7
- resolveOAuthProviderLabel,
8
- } from './oauthProviders';
9
- export { OtpForm } from './OtpForm';
10
- export { SignInForm } from './SignInForm';
11
- export { SignUpForm } from './SignUpForm';
12
1
  export type {
13
2
  AuthFormBaseProps,
14
3
  AuthIdentifierKind,
@@ -26,4 +15,15 @@ export type {
26
15
  SignUpFormField,
27
16
  SignUpFormProps,
28
17
  SignUpFormValues,
29
- } from './types';
18
+ } from '../../types/auth';
19
+ export { ForgotPasswordForm } from './adapters/inbound/ForgotPasswordForm';
20
+ export { OAuthProviderButton } from './adapters/inbound/OAuthProviderButton';
21
+ export { OAuthProviderList } from './adapters/inbound/OAuthProviderList';
22
+ export { OtpForm } from './adapters/inbound/OtpForm';
23
+ export { SignInForm } from './adapters/inbound/SignInForm';
24
+ export { SignUpForm } from './adapters/inbound/SignUpForm';
25
+ export {
26
+ DEFAULT_OAUTH_PROVIDER_ICONS,
27
+ resolveOAuthProviderIcon,
28
+ resolveOAuthProviderLabel,
29
+ } from './utils/oauthProviders';
@@ -0,0 +1,63 @@
1
+ import type { ZoraComponentMeta } from '../../metadata';
2
+
3
+ export const signInFormMeta = {
4
+ name: 'SignInForm',
5
+ category: 'pattern',
6
+ description: 'Collects an account identifier and secret for sign-in.',
7
+ directManifestNode: true,
8
+ allowedChildren: [],
9
+ blueprint: {
10
+ label: 'Sign-in form',
11
+ defaultProps: {
12
+ identifiers: ['email'],
13
+ identifierLabel: 'Email',
14
+ secretLabel: 'Password',
15
+ forgotPasswordLabel: 'Forgot password',
16
+ signUpLabel: 'Sign up',
17
+ submitLabel: 'Sign in',
18
+ loading: false,
19
+ disabled: false,
20
+ },
21
+ },
22
+ events: {
23
+ submit: {
24
+ label: 'Submit',
25
+ eventType: 'signInForm.submit',
26
+ payloadFields: [
27
+ { path: 'identifier', type: 'string', label: 'Identifier' },
28
+ { path: 'identifierKind', type: 'string', label: 'Identifier kind' },
29
+ { path: 'secret', type: 'string', label: 'Secret' },
30
+ ],
31
+ },
32
+ forgotPassword: {
33
+ label: 'Forgot password',
34
+ eventType: 'signInForm.forgotPassword',
35
+ payloadFields: [],
36
+ },
37
+ signUp: {
38
+ label: 'Sign up',
39
+ eventType: 'signInForm.signUp',
40
+ payloadFields: [],
41
+ },
42
+ },
43
+ props: {
44
+ identifiers: {
45
+ type: 'array',
46
+ category: 'Authentication',
47
+ label: 'Identifiers',
48
+ default: ['email'],
49
+ },
50
+ identifierLabel: { type: 'string', category: 'Content', label: 'Identifier label' },
51
+ secretLabel: { type: 'string', category: 'Content', label: 'Secret label' },
52
+ forgotPasswordLabel: {
53
+ type: 'string',
54
+ category: 'Content',
55
+ label: 'Forgot-password label',
56
+ },
57
+ signUpLabel: { type: 'string', category: 'Content', label: 'Sign-up label' },
58
+ submitLabel: { type: 'string', category: 'Content', label: 'Submit label' },
59
+ error: { type: 'string', category: 'State', label: 'Error' },
60
+ loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
61
+ disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
62
+ },
63
+ } as const satisfies ZoraComponentMeta;
@@ -0,0 +1,67 @@
1
+ import type { ZoraComponentMeta } from '../../metadata';
2
+
3
+ export const signUpFormMeta = {
4
+ name: 'SignUpForm',
5
+ category: 'pattern',
6
+ description: 'Collects configurable account fields for sign-up.',
7
+ directManifestNode: true,
8
+ allowedChildren: [],
9
+ blueprint: {
10
+ label: 'Sign-up form',
11
+ defaultProps: {
12
+ signInLabel: 'Sign in',
13
+ submitLabel: 'Sign up',
14
+ loading: false,
15
+ disabled: false,
16
+ },
17
+ },
18
+ events: {
19
+ submit: {
20
+ label: 'Submit',
21
+ eventType: 'signUpForm.submit',
22
+ payloadFields: [{ path: 'values', type: 'record', label: 'Values' }],
23
+ },
24
+ signIn: {
25
+ label: 'Sign in',
26
+ eventType: 'signUpForm.signIn',
27
+ payloadFields: [],
28
+ },
29
+ },
30
+ props: {
31
+ fields: {
32
+ type: 'array',
33
+ category: 'Authentication',
34
+ label: 'Fields',
35
+ itemSchema: [
36
+ { key: 'name', schema: { type: 'string', category: 'Identity', label: 'Name' } },
37
+ { key: 'label', schema: { type: 'string', category: 'Content', label: 'Label' } },
38
+ {
39
+ key: 'type',
40
+ schema: {
41
+ type: 'enum',
42
+ category: 'Authentication',
43
+ label: 'Type',
44
+ enum: ['email', 'number', 'otp', 'password', 'tel', 'text', 'url'],
45
+ },
46
+ },
47
+ {
48
+ key: 'placeholder',
49
+ schema: { type: 'string', category: 'Content', label: 'Placeholder' },
50
+ },
51
+ {
52
+ key: 'required',
53
+ schema: { type: 'boolean', category: 'Validation', label: 'Required' },
54
+ },
55
+ {
56
+ key: 'disabled',
57
+ schema: { type: 'boolean', category: 'State', label: 'Disabled' },
58
+ },
59
+ ],
60
+ },
61
+ signInLabel: { type: 'string', category: 'Content', label: 'Sign-in label' },
62
+ submitLabel: { type: 'string', category: 'Content', label: 'Submit label' },
63
+ error: { type: 'string', category: 'State', label: 'Error' },
64
+ loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
65
+ disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
66
+ },
67
+ } as const satisfies ZoraComponentMeta;
@@ -1,5 +1,5 @@
1
- import type { FormFieldConfig, ValidationRule } from '../../types/form';
2
- import type { AuthIdentifierKind } from './types';
1
+ import type { AuthIdentifierKind } from '../../../types/auth';
2
+ import type { FormFieldConfig, ValidationRule } from '../../../types/form';
3
3
 
4
4
  export const defaultIdentifiers = ['email'] as const satisfies readonly AuthIdentifierKind[];
5
5
 
@@ -6,7 +6,7 @@ import {
6
6
  resolveOAuthProviderLabel,
7
7
  } from './oauthProviders';
8
8
 
9
- describe('OAuth provider UI helpers', () => {
9
+ describe('Auth OAuth provider helpers', () => {
10
10
  it('resolves known provider labels', () => {
11
11
  expect(resolveOAuthProviderLabel('google')).toBe('Google');
12
12
  expect(resolveOAuthProviderLabel('github')).toBe('GitHub');
@@ -1,4 +1,4 @@
1
- import type { OAuthProviderIconSpec } from './types';
1
+ import type { OAuthProviderIconSpec } from '../../../types/auth';
2
2
 
3
3
  export const DEFAULT_OAUTH_PROVIDER_ICONS = {
4
4
  apple: { provider: 'FontAwesome', name: 'apple' },
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
 
3
- import { Box } from '../../features/layout/public';
4
- import { withZoraThemeScope } from '../../theme/withZoraThemeScope';
3
+ import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
4
+ import type { GradientProps } from '../../../../types/gradient';
5
+ import { Box } from '../../../layout/public';
5
6
  import { useGradientRenderer } from './GradientRendererContext';
6
- import type { GradientProps } from './types';
7
7
 
8
8
  function GradientInner({
9
9
  themeId: _themeId,
@@ -1,10 +1,10 @@
1
1
  import React, { createContext, use } from 'react';
2
2
 
3
- import type { GradientRenderer, GradientRendererProviderProps } from './types';
3
+ import type { GradientRenderer, GradientRendererProviderProps } from '../../../../types/gradient';
4
4
 
5
5
  const GradientRendererContext = createContext<GradientRenderer | null>(null);
6
6
 
7
- /**
7
+ /***
8
8
  * Supplies the host-owned renderer used by `Gradient`.
9
9
  *
10
10
  * Expo apps can adapt `expo-linear-gradient` here, while standalone React
@@ -14,6 +14,7 @@ export function GradientRendererProvider({ children, renderer }: GradientRendere
14
14
  return <GradientRendererContext value={renderer}>{children}</GradientRendererContext>;
15
15
  }
16
16
 
17
+ /*** Resolves the host-owned gradient renderer for a Gradient instance. */
17
18
  export function useGradientRenderer(): GradientRenderer {
18
19
  const renderer = use(GradientRendererContext);
19
20
 
@@ -0,0 +1,26 @@
1
+ import type { ZoraComponentMeta } from '../../metadata';
2
+ import { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';
3
+
4
+ export const gradientMeta = {
5
+ name: 'Gradient',
6
+ category: 'component',
7
+ description: 'Renders a host-backed gradient container for nested manifest content.',
8
+ directManifestNode: true,
9
+ allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
10
+ blueprint: {
11
+ label: 'Gradient',
12
+ },
13
+ props: {
14
+ colors: {
15
+ type: 'array',
16
+ category: 'Style',
17
+ label: 'Colors',
18
+ },
19
+ locations: { type: 'array', category: 'Style', label: 'Locations' },
20
+ width: { type: 'number', category: 'Layout', label: 'Width' },
21
+ height: { type: 'number', category: 'Layout', label: 'Height' },
22
+ minHeight: { type: 'number', category: 'Layout', label: 'Minimum height' },
23
+ radius: { type: 'radius', category: 'Style', label: 'Corner radius' },
24
+ p: { type: 'spacing', category: 'Layout', label: 'Padding' },
25
+ },
26
+ } as const satisfies ZoraComponentMeta;
@@ -0,0 +1,15 @@
1
+ import { expect, test } from 'bun:test';
2
+
3
+ import { ZORA_COMPONENT_META } from '../../metadata/componentMeta';
4
+
5
+ test('Gradient is a direct manifest container with serializable colors', () => {
6
+ const meta = ZORA_COMPONENT_META.Gradient;
7
+
8
+ expect(meta?.directManifestNode).toBe(true);
9
+ expect(meta?.allowedChildren.length).toBeGreaterThan(0);
10
+ expect(meta?.props.colors).toEqual({
11
+ type: 'array',
12
+ category: 'Style',
13
+ label: 'Colors',
14
+ });
15
+ });
@@ -1,5 +1,3 @@
1
- export { Gradient } from './Gradient';
2
- export { GradientRendererProvider } from './GradientRendererContext';
3
1
  export type {
4
2
  GradientColor,
5
3
  GradientColors,
@@ -9,4 +7,6 @@ export type {
9
7
  GradientRenderer,
10
8
  GradientRendererProps,
11
9
  GradientRendererProviderProps,
12
- } from './types';
10
+ } from '../../types/gradient';
11
+ export { Gradient } from './adapters/inbound/Gradient';
12
+ export { GradientRendererProvider } from './adapters/inbound/GradientRendererContext';
package/src/index.ts CHANGED
@@ -2,17 +2,6 @@ export type { AppBarMode, AppBarOverflowAction, AppBarProps } from './components
2
2
  export { AppBar } from './components/app-bar';
3
3
  export type { BreadcrumbItem, BreadcrumbsProps } from './components/breadcrumbs';
4
4
  export { Breadcrumbs } from './components/breadcrumbs';
5
- export type {
6
- GradientColor,
7
- GradientColors,
8
- GradientLocations,
9
- GradientPoint,
10
- GradientProps,
11
- GradientRenderer,
12
- GradientRendererProps,
13
- GradientRendererProviderProps,
14
- } from './components/gradient';
15
- export { Gradient, GradientRendererProvider } from './components/gradient';
16
5
  export type { DropdownMenuProps, MenuAction, MenuActionIntent, MenuProps } from './components/menu';
17
6
  export { DropdownMenu, Menu } from './components/menu';
18
7
  export type { ModalProps } from './components/modal';
@@ -37,6 +26,35 @@ export {
37
26
  ActivityIndicator,
38
27
  type ActivityIndicatorProps,
39
28
  } from './features/activity-indicator/public';
29
+ export type {
30
+ AuthFormBaseProps,
31
+ AuthIdentifierKind,
32
+ ForgotPasswordFormProps,
33
+ ForgotPasswordFormValues,
34
+ OAuthProviderButtonProps,
35
+ OAuthProviderIconSpec,
36
+ OAuthProviderItem,
37
+ OAuthProviderListLayout,
38
+ OAuthProviderListProps,
39
+ OtpFormProps,
40
+ OtpFormValues,
41
+ SignInFormProps,
42
+ SignInFormValues,
43
+ SignUpFormField,
44
+ SignUpFormProps,
45
+ SignUpFormValues,
46
+ } from './features/auth/public';
47
+ export {
48
+ DEFAULT_OAUTH_PROVIDER_ICONS,
49
+ ForgotPasswordForm,
50
+ OAuthProviderButton,
51
+ OAuthProviderList,
52
+ OtpForm,
53
+ resolveOAuthProviderIcon,
54
+ resolveOAuthProviderLabel,
55
+ SignInForm,
56
+ SignUpForm,
57
+ } from './features/auth/public';
40
58
  export type { AvatarProps, AvatarShape, AvatarSize } from './features/avatar/public';
41
59
  export type { AvatarGroupItem, AvatarGroupProps } from './features/avatar/public';
42
60
  export { Avatar, resolveAvatarInitials } from './features/avatar/public';
@@ -141,6 +159,17 @@ export {
141
159
  type TextInputProps,
142
160
  type TextInputTrailingAction,
143
161
  } from './features/form/text-input/public';
162
+ export type {
163
+ GradientColor,
164
+ GradientColors,
165
+ GradientLocations,
166
+ GradientPoint,
167
+ GradientProps,
168
+ GradientRenderer,
169
+ GradientRendererProps,
170
+ GradientRendererProviderProps,
171
+ } from './features/gradient/public';
172
+ export { Gradient, GradientRendererProvider } from './features/gradient/public';
144
173
  export {
145
174
  Hero,
146
175
  type HeroAction,
@@ -296,35 +325,6 @@ export {
296
325
  ZORA_THEME_RECIPE_META,
297
326
  ZORA_THEME_TOKEN_FAMILIES,
298
327
  } from './metadata';
299
- export type {
300
- AuthFormBaseProps,
301
- AuthIdentifierKind,
302
- ForgotPasswordFormProps,
303
- ForgotPasswordFormValues,
304
- OAuthProviderButtonProps,
305
- OAuthProviderIconSpec,
306
- OAuthProviderItem,
307
- OAuthProviderListLayout,
308
- OAuthProviderListProps,
309
- OtpFormProps,
310
- OtpFormValues,
311
- SignInFormProps,
312
- SignInFormValues,
313
- SignUpFormField,
314
- SignUpFormProps,
315
- SignUpFormValues,
316
- } from './patterns/auth';
317
- export {
318
- DEFAULT_OAUTH_PROVIDER_ICONS,
319
- ForgotPasswordForm,
320
- OAuthProviderButton,
321
- OAuthProviderList,
322
- OtpForm,
323
- resolveOAuthProviderIcon,
324
- resolveOAuthProviderLabel,
325
- SignInForm,
326
- SignUpForm,
327
- } from './patterns/auth';
328
328
  export type { ChatListAvatar, ChatListItemProps } from './patterns/chat-list-item';
329
329
  export { ChatListItem } from './patterns/chat-list-item';
330
330
  export type {
@@ -1,5 +1,11 @@
1
1
  export const CONTAINER_ALLOWED_CHILDREN = [
2
2
  'ActivityIndicator',
3
+ 'ForgotPasswordForm',
4
+ 'OAuthProviderButton',
5
+ 'OAuthProviderList',
6
+ 'OtpForm',
7
+ 'SignInForm',
8
+ 'SignUpForm',
3
9
  'Surface',
4
10
  'Avatar',
5
11
  'AvatarGroup',
@@ -23,6 +29,7 @@ export const CONTAINER_ALLOWED_CHILDREN = [
23
29
  'Box',
24
30
  'Stack',
25
31
  'Grid',
32
+ 'Gradient',
26
33
  'Container',
27
34
  'Divider',
28
35
  'Text',
@@ -137,6 +137,12 @@ describe('ZORA_COMPONENT_META invariants', () => {
137
137
  test('direct manifest node leaf/container rules', () => {
138
138
  const expectedLeafNodes = new Set([
139
139
  'ActivityIndicator',
140
+ 'ForgotPasswordForm',
141
+ 'OAuthProviderButton',
142
+ 'OAuthProviderList',
143
+ 'OtpForm',
144
+ 'SignInForm',
145
+ 'SignUpForm',
140
146
  'Avatar',
141
147
  'AvatarGroup',
142
148
  'Badge',
@@ -181,6 +187,7 @@ describe('ZORA_COMPONENT_META invariants', () => {
181
187
 
182
188
  const expectedContainerNodes = new Set([
183
189
  'Form',
190
+ 'Gradient',
184
191
  'Surface',
185
192
  'MediaCard',
186
193
  'FlatList',