@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.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +9 -0
- package/dist/constants.js.map +1 -1
- package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthForm.d.ts +3 -3
- package/dist/features/auth/adapters/inbound/AuthForm.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthForm.js +2 -2
- package/dist/features/auth/adapters/inbound/AuthForm.js.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.d.ts +2 -2
- package/dist/features/auth/adapters/inbound/AuthFormField.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.js +2 -2
- package/dist/features/auth/adapters/inbound/AuthFormField.js.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.d.ts +1 -1
- package/dist/features/auth/adapters/inbound/ForgotPasswordForm.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.js +5 -5
- package/dist/features/auth/adapters/inbound/ForgotPasswordForm.js.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.d.ts +1 -1
- package/dist/features/auth/adapters/inbound/OAuthProviderButton.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.js +3 -3
- package/dist/features/auth/adapters/inbound/OAuthProviderButton.js.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.d.ts +1 -1
- package/dist/features/auth/adapters/inbound/OAuthProviderList.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.js +2 -2
- package/dist/features/auth/adapters/inbound/OAuthProviderList.js.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/OtpForm.d.ts +1 -1
- package/dist/features/auth/adapters/inbound/OtpForm.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/OtpForm.js +4 -4
- package/dist/features/auth/adapters/inbound/OtpForm.js.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/SignInForm.d.ts +1 -1
- package/dist/features/auth/adapters/inbound/SignInForm.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/SignInForm.js +5 -5
- package/dist/features/auth/adapters/inbound/SignInForm.js.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.d.ts +1 -1
- package/dist/features/auth/adapters/inbound/SignUpForm.d.ts.map +1 -0
- package/dist/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.js +3 -3
- package/dist/features/auth/adapters/inbound/SignUpForm.js.map +1 -0
- package/dist/features/auth/forgotPasswordFormMeta.d.ts +79 -0
- package/dist/features/auth/forgotPasswordFormMeta.d.ts.map +1 -0
- package/dist/features/auth/forgotPasswordFormMeta.js +48 -0
- package/dist/features/auth/forgotPasswordFormMeta.js.map +1 -0
- package/dist/features/auth/oauthProviderButtonMeta.d.ts +83 -0
- package/dist/features/auth/oauthProviderButtonMeta.d.ts.map +1 -0
- package/dist/features/auth/oauthProviderButtonMeta.js +61 -0
- package/dist/features/auth/oauthProviderButtonMeta.js.map +1 -0
- package/dist/features/auth/oauthProviderListMeta.d.ts +109 -0
- package/dist/features/auth/oauthProviderListMeta.d.ts.map +1 -0
- package/dist/features/auth/oauthProviderListMeta.js +66 -0
- package/dist/features/auth/oauthProviderListMeta.js.map +1 -0
- package/dist/features/auth/otpFormMeta.d.ts +89 -0
- package/dist/features/auth/otpFormMeta.d.ts.map +1 -0
- package/dist/features/auth/otpFormMeta.js +54 -0
- package/dist/features/auth/otpFormMeta.js.map +1 -0
- package/dist/features/auth/public.d.ts +9 -0
- package/dist/features/auth/public.d.ts.map +1 -0
- package/dist/features/auth/public.js +8 -0
- package/dist/features/auth/public.js.map +1 -0
- package/dist/features/auth/signInFormMeta.d.ts +100 -0
- package/dist/features/auth/signInFormMeta.d.ts.map +1 -0
- package/dist/features/auth/signInFormMeta.js +62 -0
- package/dist/features/auth/signInFormMeta.js.map +1 -0
- package/dist/features/auth/signUpFormMeta.d.ts +111 -0
- package/dist/features/auth/signUpFormMeta.d.ts.map +1 -0
- package/dist/features/auth/signUpFormMeta.js +66 -0
- package/dist/features/auth/signUpFormMeta.js.map +1 -0
- package/dist/{patterns/auth/utils.d.ts → features/auth/utils/authForm.d.ts} +3 -3
- package/dist/features/auth/utils/authForm.d.ts.map +1 -0
- package/dist/{patterns/auth/utils.js → features/auth/utils/authForm.js} +1 -1
- package/dist/features/auth/utils/authForm.js.map +1 -0
- package/dist/{patterns/auth → features/auth/utils}/oauthProviders.d.ts +1 -1
- package/dist/features/auth/utils/oauthProviders.d.ts.map +1 -0
- package/dist/features/auth/utils/oauthProviders.js.map +1 -0
- package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
- package/dist/features/card/cardMeta.d.ts +1 -1
- package/dist/features/card/mediaCardMeta.d.ts +1 -1
- package/dist/features/card/postCardMeta.d.ts +1 -1
- package/dist/{components/gradient → features/gradient/adapters/inbound}/Gradient.d.ts +1 -1
- package/dist/features/gradient/adapters/inbound/Gradient.d.ts.map +1 -0
- package/dist/{components/gradient → features/gradient/adapters/inbound}/Gradient.js +2 -2
- package/dist/features/gradient/adapters/inbound/Gradient.js.map +1 -0
- package/dist/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.d.ts +3 -2
- package/dist/features/gradient/adapters/inbound/GradientRendererContext.d.ts.map +1 -0
- package/dist/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.js +2 -1
- package/dist/features/gradient/adapters/inbound/GradientRendererContext.js.map +1 -0
- package/dist/features/gradient/gradientMeta.d.ts +48 -0
- package/dist/features/gradient/gradientMeta.d.ts.map +1 -0
- package/dist/features/gradient/gradientMeta.js +25 -0
- package/dist/features/gradient/gradientMeta.js.map +1 -0
- package/dist/features/gradient/public.d.ts +4 -0
- package/dist/features/gradient/public.d.ts.map +1 -0
- package/dist/features/gradient/public.js +3 -0
- package/dist/features/gradient/public.js.map +1 -0
- package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +1 -1
- package/dist/features/layout/boxMeta.d.ts +1 -1
- package/dist/features/layout/containerMeta.d.ts +1 -1
- package/dist/features/layout/gridMeta.d.ts +1 -1
- package/dist/features/layout/stackMeta.d.ts +1 -1
- package/dist/features/list/flatListMeta.d.ts +1 -1
- package/dist/features/list/sectionListMeta.d.ts +1 -1
- package/dist/features/surface/surfaceMeta.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/screen/meta.d.ts +1 -1
- package/dist/layout/screen-section/meta.d.ts +1 -1
- package/dist/metadata/allowedChildren.d.ts +3 -3
- package/dist/metadata/allowedChildren.d.ts.map +1 -1
- package/dist/metadata/allowedChildren.js +7 -0
- package/dist/metadata/allowedChildren.js.map +1 -1
- package/dist/metadata/bindableComponentMeta.d.ts +2 -2
- package/dist/metadata/componentMeta.d.ts.map +1 -1
- package/dist/metadata/componentMeta.js +7 -2
- package/dist/metadata/componentMeta.js.map +1 -1
- package/dist/patterns/message-bubble/meta.d.ts +1 -1
- package/dist/patterns/notice/meta.d.ts +1 -1
- package/dist/patterns/panel/meta.d.ts +1 -1
- package/dist/patterns/reader/meta.d.ts +2 -2
- package/dist/patterns/scanner/meta.d.ts +2 -2
- package/dist/registry.js +2 -2
- package/dist/registry.js.map +1 -1
- package/dist/{patterns/auth/types.d.ts → types/auth.d.ts} +8 -8
- package/dist/types/auth.d.ts.map +1 -0
- package/dist/types/auth.js +2 -0
- package/dist/types/auth.js.map +1 -0
- package/dist/{components/gradient/types.d.ts → types/gradient.d.ts} +3 -3
- package/dist/types/gradient.d.ts.map +1 -0
- package/dist/types/gradient.js +2 -0
- package/dist/types/gradient.js.map +1 -0
- package/package.json +1 -1
- package/src/constants.ts +9 -0
- package/src/expo57Migration.test.ts +1 -1
- package/src/featureManifest.test.ts +2 -0
- package/src/{patterns/auth → features/auth/adapters/inbound}/AuthForm.tsx +5 -5
- package/src/{patterns/auth → features/auth/adapters/inbound}/AuthFormField.tsx +4 -4
- package/src/{patterns/auth → features/auth/adapters/inbound}/ForgotPasswordForm.tsx +8 -8
- package/src/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderButton.tsx +4 -4
- package/src/{patterns/auth → features/auth/adapters/inbound}/OAuthProviderList.tsx +3 -3
- package/src/{patterns/auth → features/auth/adapters/inbound}/OtpForm.tsx +6 -6
- package/src/{patterns/auth → features/auth/adapters/inbound}/SignInForm.tsx +8 -8
- package/src/{patterns/auth → features/auth/adapters/inbound}/SignUpForm.tsx +5 -5
- package/src/features/auth/forgotPasswordFormMeta.ts +49 -0
- package/src/features/auth/oauthProviderButtonMeta.ts +62 -0
- package/src/features/auth/oauthProviderListMeta.ts +67 -0
- package/src/features/auth/otpFormMeta.ts +55 -0
- package/src/features/auth/public.test.ts +34 -0
- package/src/{patterns/auth/index.ts → features/auth/public.ts} +12 -12
- package/src/features/auth/signInFormMeta.ts +63 -0
- package/src/features/auth/signUpFormMeta.ts +67 -0
- package/src/{patterns/auth/utils.ts → features/auth/utils/authForm.ts} +2 -2
- package/src/{patterns/auth → features/auth/utils}/oauthProviders.test.ts +1 -1
- package/src/{patterns/auth → features/auth/utils}/oauthProviders.ts +1 -1
- package/src/{components/gradient → features/gradient/adapters/inbound}/Gradient.tsx +3 -3
- package/src/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.tsx +3 -2
- package/src/features/gradient/gradientMeta.ts +26 -0
- package/src/features/gradient/public.test.ts +15 -0
- package/src/{components/gradient/index.ts → features/gradient/public.ts} +3 -3
- package/src/index.ts +40 -40
- package/src/metadata/allowedChildren.ts +7 -0
- package/src/metadata/componentMeta.test.ts +7 -0
- package/src/metadata/componentMeta.ts +7 -9
- package/src/registry.ts +9 -9
- package/src/theme/themeScopeStructure.test.ts +7 -5
- package/src/{patterns/auth/types.ts → types/auth.ts} +7 -7
- package/src/{components/gradient/types.ts → types/gradient.ts} +2 -2
- package/dist/components/gradient/Gradient.d.ts.map +0 -1
- package/dist/components/gradient/Gradient.js.map +0 -1
- package/dist/components/gradient/GradientRendererContext.d.ts.map +0 -1
- package/dist/components/gradient/GradientRendererContext.js.map +0 -1
- package/dist/components/gradient/index.d.ts +0 -4
- package/dist/components/gradient/index.d.ts.map +0 -1
- package/dist/components/gradient/index.js +0 -3
- package/dist/components/gradient/index.js.map +0 -1
- package/dist/components/gradient/meta.d.ts +0 -9
- package/dist/components/gradient/meta.d.ts.map +0 -1
- package/dist/components/gradient/meta.js +0 -9
- package/dist/components/gradient/meta.js.map +0 -1
- package/dist/components/gradient/types.d.ts.map +0 -1
- package/dist/components/gradient/types.js +0 -2
- package/dist/components/gradient/types.js.map +0 -1
- package/dist/patterns/auth/AuthForm.d.ts.map +0 -1
- package/dist/patterns/auth/AuthForm.js.map +0 -1
- package/dist/patterns/auth/AuthFormField.d.ts.map +0 -1
- package/dist/patterns/auth/AuthFormField.js.map +0 -1
- package/dist/patterns/auth/ForgotPasswordForm.d.ts.map +0 -1
- package/dist/patterns/auth/ForgotPasswordForm.js.map +0 -1
- package/dist/patterns/auth/OAuthProviderButton.d.ts.map +0 -1
- package/dist/patterns/auth/OAuthProviderButton.js.map +0 -1
- package/dist/patterns/auth/OAuthProviderList.d.ts.map +0 -1
- package/dist/patterns/auth/OAuthProviderList.js.map +0 -1
- package/dist/patterns/auth/OtpForm.d.ts.map +0 -1
- package/dist/patterns/auth/OtpForm.js.map +0 -1
- package/dist/patterns/auth/SignInForm.d.ts.map +0 -1
- package/dist/patterns/auth/SignInForm.js.map +0 -1
- package/dist/patterns/auth/SignUpForm.d.ts.map +0 -1
- package/dist/patterns/auth/SignUpForm.js.map +0 -1
- package/dist/patterns/auth/index.d.ts +0 -9
- package/dist/patterns/auth/index.d.ts.map +0 -1
- package/dist/patterns/auth/index.js +0 -8
- package/dist/patterns/auth/index.js.map +0 -1
- package/dist/patterns/auth/meta.d.ts +0 -49
- package/dist/patterns/auth/meta.d.ts.map +0 -1
- package/dist/patterns/auth/meta.js +0 -50
- package/dist/patterns/auth/meta.js.map +0 -1
- package/dist/patterns/auth/oauthProviders.d.ts.map +0 -1
- package/dist/patterns/auth/oauthProviders.js.map +0 -1
- package/dist/patterns/auth/types.d.ts.map +0 -1
- package/dist/patterns/auth/types.js +0 -2
- package/dist/patterns/auth/types.js.map +0 -1
- package/dist/patterns/auth/utils.d.ts.map +0 -1
- package/dist/patterns/auth/utils.js.map +0 -1
- package/src/components/gradient/meta.ts +0 -10
- package/src/patterns/auth/meta.ts +0 -57
- /package/dist/{patterns/auth → features/auth/utils}/oauthProviders.js +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export const signInFormMeta = {
|
|
2
|
+
name: 'SignInForm',
|
|
3
|
+
category: 'pattern',
|
|
4
|
+
description: 'Collects an account identifier and secret for sign-in.',
|
|
5
|
+
directManifestNode: true,
|
|
6
|
+
allowedChildren: [],
|
|
7
|
+
blueprint: {
|
|
8
|
+
label: 'Sign-in form',
|
|
9
|
+
defaultProps: {
|
|
10
|
+
identifiers: ['email'],
|
|
11
|
+
identifierLabel: 'Email',
|
|
12
|
+
secretLabel: 'Password',
|
|
13
|
+
forgotPasswordLabel: 'Forgot password',
|
|
14
|
+
signUpLabel: 'Sign up',
|
|
15
|
+
submitLabel: 'Sign in',
|
|
16
|
+
loading: false,
|
|
17
|
+
disabled: false,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
events: {
|
|
21
|
+
submit: {
|
|
22
|
+
label: 'Submit',
|
|
23
|
+
eventType: 'signInForm.submit',
|
|
24
|
+
payloadFields: [
|
|
25
|
+
{ path: 'identifier', type: 'string', label: 'Identifier' },
|
|
26
|
+
{ path: 'identifierKind', type: 'string', label: 'Identifier kind' },
|
|
27
|
+
{ path: 'secret', type: 'string', label: 'Secret' },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
forgotPassword: {
|
|
31
|
+
label: 'Forgot password',
|
|
32
|
+
eventType: 'signInForm.forgotPassword',
|
|
33
|
+
payloadFields: [],
|
|
34
|
+
},
|
|
35
|
+
signUp: {
|
|
36
|
+
label: 'Sign up',
|
|
37
|
+
eventType: 'signInForm.signUp',
|
|
38
|
+
payloadFields: [],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
props: {
|
|
42
|
+
identifiers: {
|
|
43
|
+
type: 'array',
|
|
44
|
+
category: 'Authentication',
|
|
45
|
+
label: 'Identifiers',
|
|
46
|
+
default: ['email'],
|
|
47
|
+
},
|
|
48
|
+
identifierLabel: { type: 'string', category: 'Content', label: 'Identifier label' },
|
|
49
|
+
secretLabel: { type: 'string', category: 'Content', label: 'Secret label' },
|
|
50
|
+
forgotPasswordLabel: {
|
|
51
|
+
type: 'string',
|
|
52
|
+
category: 'Content',
|
|
53
|
+
label: 'Forgot-password label',
|
|
54
|
+
},
|
|
55
|
+
signUpLabel: { type: 'string', category: 'Content', label: 'Sign-up label' },
|
|
56
|
+
submitLabel: { type: 'string', category: 'Content', label: 'Submit label' },
|
|
57
|
+
error: { type: 'string', category: 'State', label: 'Error' },
|
|
58
|
+
loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
|
|
59
|
+
disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=signInFormMeta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signInFormMeta.js","sourceRoot":"","sources":["../../../src/features/auth/signInFormMeta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IACl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,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE;QAC3E,mBAAmB,EAAE;YACnB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;YACnB,KAAK,EAAE,uBAAuB;SAC/B;QACD,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE;QAC5E,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE;QAC3E,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;QAC5D,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';\n\nexport const signInFormMeta = {\n name: 'SignInForm',\n category: 'pattern',\n description: 'Collects an account identifier and secret for sign-in.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Sign-in form',\n defaultProps: {\n identifiers: ['email'],\n identifierLabel: 'Email',\n secretLabel: 'Password',\n forgotPasswordLabel: 'Forgot password',\n signUpLabel: 'Sign up',\n submitLabel: 'Sign in',\n loading: false,\n disabled: false,\n },\n },\n events: {\n submit: {\n label: 'Submit',\n eventType: 'signInForm.submit',\n payloadFields: [\n { path: 'identifier', type: 'string', label: 'Identifier' },\n { path: 'identifierKind', type: 'string', label: 'Identifier kind' },\n { path: 'secret', type: 'string', label: 'Secret' },\n ],\n },\n forgotPassword: {\n label: 'Forgot password',\n eventType: 'signInForm.forgotPassword',\n payloadFields: [],\n },\n signUp: {\n label: 'Sign up',\n eventType: 'signInForm.signUp',\n payloadFields: [],\n },\n },\n props: {\n identifiers: {\n type: 'array',\n category: 'Authentication',\n label: 'Identifiers',\n default: ['email'],\n },\n identifierLabel: { type: 'string', category: 'Content', label: 'Identifier label' },\n secretLabel: { type: 'string', category: 'Content', label: 'Secret label' },\n forgotPasswordLabel: {\n type: 'string',\n category: 'Content',\n label: 'Forgot-password label',\n },\n signUpLabel: { type: 'string', category: 'Content', label: 'Sign-up label' },\n submitLabel: { type: 'string', category: 'Content', label: 'Submit label' },\n error: { type: 'string', category: 'State', label: 'Error' },\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,111 @@
|
|
|
1
|
+
export declare const signUpFormMeta: {
|
|
2
|
+
readonly name: "SignUpForm";
|
|
3
|
+
readonly category: "pattern";
|
|
4
|
+
readonly description: "Collects configurable account fields for sign-up.";
|
|
5
|
+
readonly directManifestNode: true;
|
|
6
|
+
readonly allowedChildren: readonly [];
|
|
7
|
+
readonly blueprint: {
|
|
8
|
+
readonly label: "Sign-up form";
|
|
9
|
+
readonly defaultProps: {
|
|
10
|
+
readonly signInLabel: "Sign in";
|
|
11
|
+
readonly submitLabel: "Sign up";
|
|
12
|
+
readonly loading: false;
|
|
13
|
+
readonly disabled: false;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
readonly events: {
|
|
17
|
+
readonly submit: {
|
|
18
|
+
readonly label: "Submit";
|
|
19
|
+
readonly eventType: "signUpForm.submit";
|
|
20
|
+
readonly payloadFields: readonly [{
|
|
21
|
+
readonly path: "values";
|
|
22
|
+
readonly type: "record";
|
|
23
|
+
readonly label: "Values";
|
|
24
|
+
}];
|
|
25
|
+
};
|
|
26
|
+
readonly signIn: {
|
|
27
|
+
readonly label: "Sign in";
|
|
28
|
+
readonly eventType: "signUpForm.signIn";
|
|
29
|
+
readonly payloadFields: readonly [];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
readonly props: {
|
|
33
|
+
readonly fields: {
|
|
34
|
+
readonly type: "array";
|
|
35
|
+
readonly category: "Authentication";
|
|
36
|
+
readonly label: "Fields";
|
|
37
|
+
readonly itemSchema: readonly [{
|
|
38
|
+
readonly key: "name";
|
|
39
|
+
readonly schema: {
|
|
40
|
+
readonly type: "string";
|
|
41
|
+
readonly category: "Identity";
|
|
42
|
+
readonly label: "Name";
|
|
43
|
+
};
|
|
44
|
+
}, {
|
|
45
|
+
readonly key: "label";
|
|
46
|
+
readonly schema: {
|
|
47
|
+
readonly type: "string";
|
|
48
|
+
readonly category: "Content";
|
|
49
|
+
readonly label: "Label";
|
|
50
|
+
};
|
|
51
|
+
}, {
|
|
52
|
+
readonly key: "type";
|
|
53
|
+
readonly schema: {
|
|
54
|
+
readonly type: "enum";
|
|
55
|
+
readonly category: "Authentication";
|
|
56
|
+
readonly label: "Type";
|
|
57
|
+
readonly enum: readonly ["email", "number", "otp", "password", "tel", "text", "url"];
|
|
58
|
+
};
|
|
59
|
+
}, {
|
|
60
|
+
readonly key: "placeholder";
|
|
61
|
+
readonly schema: {
|
|
62
|
+
readonly type: "string";
|
|
63
|
+
readonly category: "Content";
|
|
64
|
+
readonly label: "Placeholder";
|
|
65
|
+
};
|
|
66
|
+
}, {
|
|
67
|
+
readonly key: "required";
|
|
68
|
+
readonly schema: {
|
|
69
|
+
readonly type: "boolean";
|
|
70
|
+
readonly category: "Validation";
|
|
71
|
+
readonly label: "Required";
|
|
72
|
+
};
|
|
73
|
+
}, {
|
|
74
|
+
readonly key: "disabled";
|
|
75
|
+
readonly schema: {
|
|
76
|
+
readonly type: "boolean";
|
|
77
|
+
readonly category: "State";
|
|
78
|
+
readonly label: "Disabled";
|
|
79
|
+
};
|
|
80
|
+
}];
|
|
81
|
+
};
|
|
82
|
+
readonly signInLabel: {
|
|
83
|
+
readonly type: "string";
|
|
84
|
+
readonly category: "Content";
|
|
85
|
+
readonly label: "Sign-in label";
|
|
86
|
+
};
|
|
87
|
+
readonly submitLabel: {
|
|
88
|
+
readonly type: "string";
|
|
89
|
+
readonly category: "Content";
|
|
90
|
+
readonly label: "Submit label";
|
|
91
|
+
};
|
|
92
|
+
readonly error: {
|
|
93
|
+
readonly type: "string";
|
|
94
|
+
readonly category: "State";
|
|
95
|
+
readonly label: "Error";
|
|
96
|
+
};
|
|
97
|
+
readonly loading: {
|
|
98
|
+
readonly type: "boolean";
|
|
99
|
+
readonly category: "State";
|
|
100
|
+
readonly label: "Loading";
|
|
101
|
+
readonly default: false;
|
|
102
|
+
};
|
|
103
|
+
readonly disabled: {
|
|
104
|
+
readonly type: "boolean";
|
|
105
|
+
readonly category: "State";
|
|
106
|
+
readonly label: "Disabled";
|
|
107
|
+
readonly default: false;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=signUpFormMeta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signUpFormMeta.d.ts","sourceRoot":"","sources":["../../../src/features/auth/signUpFormMeta.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEW,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export const signUpFormMeta = {
|
|
2
|
+
name: 'SignUpForm',
|
|
3
|
+
category: 'pattern',
|
|
4
|
+
description: 'Collects configurable account fields for sign-up.',
|
|
5
|
+
directManifestNode: true,
|
|
6
|
+
allowedChildren: [],
|
|
7
|
+
blueprint: {
|
|
8
|
+
label: 'Sign-up form',
|
|
9
|
+
defaultProps: {
|
|
10
|
+
signInLabel: 'Sign in',
|
|
11
|
+
submitLabel: 'Sign up',
|
|
12
|
+
loading: false,
|
|
13
|
+
disabled: false,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
events: {
|
|
17
|
+
submit: {
|
|
18
|
+
label: 'Submit',
|
|
19
|
+
eventType: 'signUpForm.submit',
|
|
20
|
+
payloadFields: [{ path: 'values', type: 'record', label: 'Values' }],
|
|
21
|
+
},
|
|
22
|
+
signIn: {
|
|
23
|
+
label: 'Sign in',
|
|
24
|
+
eventType: 'signUpForm.signIn',
|
|
25
|
+
payloadFields: [],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
props: {
|
|
29
|
+
fields: {
|
|
30
|
+
type: 'array',
|
|
31
|
+
category: 'Authentication',
|
|
32
|
+
label: 'Fields',
|
|
33
|
+
itemSchema: [
|
|
34
|
+
{ key: 'name', schema: { type: 'string', category: 'Identity', label: 'Name' } },
|
|
35
|
+
{ key: 'label', schema: { type: 'string', category: 'Content', label: 'Label' } },
|
|
36
|
+
{
|
|
37
|
+
key: 'type',
|
|
38
|
+
schema: {
|
|
39
|
+
type: 'enum',
|
|
40
|
+
category: 'Authentication',
|
|
41
|
+
label: 'Type',
|
|
42
|
+
enum: ['email', 'number', 'otp', 'password', 'tel', 'text', 'url'],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
key: 'placeholder',
|
|
47
|
+
schema: { type: 'string', category: 'Content', label: 'Placeholder' },
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
key: 'required',
|
|
51
|
+
schema: { type: 'boolean', category: 'Validation', label: 'Required' },
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
key: 'disabled',
|
|
55
|
+
schema: { type: 'boolean', category: 'State', label: 'Disabled' },
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
signInLabel: { type: 'string', category: 'Content', label: 'Sign-in label' },
|
|
60
|
+
submitLabel: { type: 'string', category: 'Content', label: 'Submit label' },
|
|
61
|
+
error: { type: 'string', category: 'State', label: 'Error' },
|
|
62
|
+
loading: { type: 'boolean', category: 'State', label: 'Loading', default: false },
|
|
63
|
+
disabled: { type: 'boolean', category: 'State', label: 'Disabled', default: false },
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=signUpFormMeta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signUpFormMeta.js","sourceRoot":"","sources":["../../../src/features/auth/signUpFormMeta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE,mDAAmD;IAChE,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,EAAE;IACnB,SAAS,EAAE;QACT,KAAK,EAAE,cAAc;QACrB,YAAY,EAAE;YACZ,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,SAAS;YACtB,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,KAAK;SAChB;KACF;IACD,MAAM,EAAE;QACN,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,SAAS,EAAE,mBAAmB;YAC9B,aAAa,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;SACrE;QACD,MAAM,EAAE;YACN,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,mBAAmB;YAC9B,aAAa,EAAE,EAAE;SAClB;KACF;IACD,KAAK,EAAE;QACL,MAAM,EAAE;YACN,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,gBAAgB;YAC1B,KAAK,EAAE,QAAQ;YACf,UAAU,EAAE;gBACV,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE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ACjF,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';\n\nexport const signUpFormMeta = {\n name: 'SignUpForm',\n category: 'pattern',\n description: 'Collects configurable account fields for sign-up.',\n directManifestNode: true,\n allowedChildren: [],\n blueprint: {\n label: 'Sign-up form',\n defaultProps: {\n signInLabel: 'Sign in',\n submitLabel: 'Sign up',\n loading: false,\n disabled: false,\n },\n },\n events: {\n submit: {\n label: 'Submit',\n eventType: 'signUpForm.submit',\n payloadFields: [{ path: 'values', type: 'record', label: 'Values' }],\n },\n signIn: {\n label: 'Sign in',\n eventType: 'signUpForm.signIn',\n payloadFields: [],\n },\n },\n props: {\n fields: {\n type: 'array',\n category: 'Authentication',\n label: 'Fields',\n itemSchema: [\n { key: 'name', schema: { type: 'string', category: 'Identity', label: 'Name' } },\n { key: 'label', schema: { type: 'string', category: 'Content', label: 'Label' } },\n {\n key: 'type',\n schema: {\n type: 'enum',\n category: 'Authentication',\n label: 'Type',\n enum: ['email', 'number', 'otp', 'password', 'tel', 'text', 'url'],\n },\n },\n {\n key: 'placeholder',\n schema: { type: 'string', category: 'Content', label: 'Placeholder' },\n },\n {\n key: 'required',\n schema: { type: 'boolean', category: 'Validation', label: 'Required' },\n },\n {\n key: 'disabled',\n schema: { type: 'boolean', category: 'State', label: 'Disabled' },\n },\n ],\n },\n signInLabel: { type: 'string', category: 'Content', label: 'Sign-in label' },\n submitLabel: { type: 'string', category: 'Content', label: 'Submit label' },\n error: { type: 'string', category: 'State', label: 'Error' },\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"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { AuthIdentifierKind } from '../../../types/auth';
|
|
2
|
+
import type { FormFieldConfig, ValidationRule } from '../../../types/form';
|
|
3
3
|
export declare const defaultIdentifiers: readonly ["email"];
|
|
4
4
|
export declare function resolveIdentifierLabel(identifiers: readonly AuthIdentifierKind[]): string;
|
|
5
5
|
export declare function resolveIdentifierType(identifiers: readonly AuthIdentifierKind[]): FormFieldConfig['type'];
|
|
6
6
|
export declare function resolveIdentifierRules(identifiers: readonly AuthIdentifierKind[]): readonly ValidationRule[];
|
|
7
7
|
export declare function normalizeIdentifierKind(identifier: string, identifiers: readonly AuthIdentifierKind[]): AuthIdentifierKind;
|
|
8
|
-
//# sourceMappingURL=
|
|
8
|
+
//# sourceMappingURL=authForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authForm.d.ts","sourceRoot":"","sources":["../../../../src/features/auth/utils/authForm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE3E,eAAO,MAAM,kBAAkB,oBAA6D,CAAC;AAqB7F,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,CAMzF;AAED,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,SAAS,kBAAkB,EAAE,GACzC,eAAe,CAAC,MAAM,CAAC,CAgBzB;AAED,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,SAAS,kBAAkB,EAAE,GACzC,SAAS,cAAc,EAAE,CAM3B;AAED,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,SAAS,kBAAkB,EAAE,GACzC,kBAAkB,CAoBpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authForm.js","sourceRoot":"","sources":["../../../../src/features/auth/utils/authForm.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,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,UAAkB,EAClB,WAA0C;IAE1C,MAAM,oBAAoB,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;IAE/C,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,WAAW,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC;IACnC,CAAC;IAED,IAAI,kBAAkB,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QACnF,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,IAAI,kBAAkB,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC;QAC5F,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,IAAI,kBAAkB,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,CAAC;QAChD,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO,WAAW,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC;AACnC,CAAC","sourcesContent":["import type { AuthIdentifierKind } from '../../../types/auth';\nimport type { FormFieldConfig, ValidationRule } from '../../../types/form';\n\nexport const defaultIdentifiers = ['email'] as const satisfies readonly AuthIdentifierKind[];\n\nfunction resolveIdentifierKindLabel(identifier: AuthIdentifierKind): string {\n switch (identifier) {\n case 'phone':\n return 'Phone';\n case 'username':\n return 'Username';\n case 'email':\n default:\n return 'Email';\n }\n}\n\nfunction includesIdentifier(\n identifiers: readonly AuthIdentifierKind[],\n identifier: AuthIdentifierKind,\n): boolean {\n return identifiers.includes(identifier);\n}\n\nexport function resolveIdentifierLabel(identifiers: readonly AuthIdentifierKind[]): string {\n if (identifiers.length === 1) {\n return resolveIdentifierKindLabel(identifiers[0] ?? 'email');\n }\n\n return identifiers.map(resolveIdentifierKindLabel).join(', or ');\n}\n\nexport function resolveIdentifierType(\n identifiers: readonly AuthIdentifierKind[],\n): FormFieldConfig['type'] {\n if (identifiers.length !== 1) {\n return 'text';\n }\n\n const [identifier] = identifiers;\n\n if (identifier === 'email') {\n return 'email';\n }\n\n if (identifier === 'phone') {\n return 'tel';\n }\n\n return 'text';\n}\n\nexport function resolveIdentifierRules(\n identifiers: readonly AuthIdentifierKind[],\n): readonly ValidationRule[] {\n if (identifiers.length === 1 && identifiers[0] === 'email') {\n return [{ kind: 'required' }, { kind: 'email' }];\n }\n\n return [{ kind: 'required' }];\n}\n\nexport function normalizeIdentifierKind(\n identifier: string,\n identifiers: readonly AuthIdentifierKind[],\n): AuthIdentifierKind {\n const normalizedIdentifier = identifier.trim();\n\n if (identifiers.length === 1) {\n return identifiers[0] ?? 'email';\n }\n\n if (includesIdentifier(identifiers, 'email') && normalizedIdentifier.includes('@')) {\n return 'email';\n }\n\n if (includesIdentifier(identifiers, 'phone') && /^[+()\\d\\s.-]+$/.test(normalizedIdentifier)) {\n return 'phone';\n }\n\n if (includesIdentifier(identifiers, 'username')) {\n return 'username';\n }\n\n return identifiers[0] ?? 'email';\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauthProviders.d.ts","sourceRoot":"","sources":["../../../../src/features/auth/utils/oauthProviders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEjE,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBiB,CAAC;AA+B3D,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAE9F;AAED,wBAAg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AwB,CAAC,UAAkB;IACzD,OAAO,kBAAkB,CAAC,GAAG,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,UAAkB;IAC1D,MAAM,oBAAoB,GAAG,wBAAwB,CAAC,UAAU,CAAC,CAAC;IAClE,MAAM,UAAU,GAAG,mBAAmB,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;IAEjE,OAAO,UAAU,IAAI,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,wBAAwB,CAAC,UAAkB;IAClD,OAAO,UAAU,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AACzC,CAAC;AAED,SAAS,mBAAmB,CAAC,UAAkB;IAC7C,MAAM,KAAK,GAAG,UAAU;SACrB,KAAK,CAAC,UAAU,CAAC;SACjB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SAC1B,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAErC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1F,CAAC","sourcesContent":["import type { OAuthProviderIconSpec } from '../../../types/auth';\n\nexport const DEFAULT_OAUTH_PROVIDER_ICONS = {\n apple: { provider: 'FontAwesome', name: 'apple' },\n azure: { provider: 'FontAwesome5', name: 'microsoft', variant: 'brand' },\n bitbucket: { provider: 'FontAwesome', name: 'bitbucket' },\n discord: { provider: 'FontAwesome5', name: 'discord', variant: 'brand' },\n facebook: { provider: 'FontAwesome', name: 'facebook' },\n figma: { provider: 'FontAwesome5', name: 'figma', variant: 'brand' },\n github: { provider: 'FontAwesome', name: 'github' },\n gitlab: { provider: 'FontAwesome5', name: 'gitlab', variant: 'brand' },\n google: { provider: 'FontAwesome', name: 'google' },\n linkedin: { provider: 'FontAwesome', name: 'linkedin' },\n microsoft: { provider: 'FontAwesome5', name: 'microsoft', variant: 'brand' },\n slack: { provider: 'FontAwesome5', name: 'slack', variant: 'brand' },\n spotify: { provider: 'FontAwesome', name: 'spotify' },\n twitch: { provider: 'FontAwesome5', name: 'twitch', variant: 'brand' },\n twitter: { provider: 'FontAwesome', name: 'twitter' },\n x: { provider: 'FontAwesome6', name: 'x-twitter', variant: 'brand' },\n zoom: { provider: 'FontAwesome5', name: 'video', variant: 'solid' },\n} as const satisfies Record<string, OAuthProviderIconSpec>;\n\nconst DEFAULT_OAUTH_PROVIDER_LABELS = {\n apple: 'Apple',\n azure: 'Microsoft',\n bitbucket: 'Bitbucket',\n discord: 'Discord',\n facebook: 'Facebook',\n figma: 'Figma',\n github: 'GitHub',\n gitlab: 'GitLab',\n google: 'Google',\n kakao: 'Kakao',\n keycloak: 'Keycloak',\n linkedin: 'LinkedIn',\n microsoft: 'Microsoft',\n notion: 'Notion',\n slack: 'Slack',\n spotify: 'Spotify',\n twitch: 'Twitch',\n twitter: 'Twitter',\n workos: 'WorkOS',\n x: 'X',\n zoom: 'Zoom',\n} as const satisfies Record<string, string>;\n\nconst oauthProviderIcons = new Map<string, OAuthProviderIconSpec>(\n Object.entries(DEFAULT_OAUTH_PROVIDER_ICONS),\n);\nconst oauthProviderLabels = new Map<string, string>(Object.entries(DEFAULT_OAUTH_PROVIDER_LABELS));\n\nexport function resolveOAuthProviderIcon(providerId: string): OAuthProviderIconSpec | undefined {\n return oauthProviderIcons.get(normalizeOAuthProviderId(providerId));\n}\n\nexport function resolveOAuthProviderLabel(providerId: string): string {\n const normalizedProviderId = normalizeOAuthProviderId(providerId);\n const knownLabel = oauthProviderLabels.get(normalizedProviderId);\n\n return knownLabel ?? titleCaseProviderId(normalizedProviderId);\n}\n\nfunction normalizeOAuthProviderId(providerId: string): string {\n return providerId.trim().toLowerCase();\n}\n\nfunction titleCaseProviderId(providerId: string): string {\n const words = providerId\n .split(/[-_\\s]+/u)\n .map((word) => word.trim())\n .filter((word) => word.length > 0);\n\n if (words.length === 0) {\n return 'Provider';\n }\n\n return words.map((word) => `${word.charAt(0).toUpperCase()}${word.slice(1)}`).join(' ');\n}\n"]}
|
|
@@ -2,7 +2,7 @@ export declare const bottomSheetMeta: {
|
|
|
2
2
|
readonly name: "BottomSheet";
|
|
3
3
|
readonly category: "layout";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly description: "Controlled presentation through the shared single-sheet host. Bind dismiss to clear open.";
|
|
7
7
|
readonly events: {
|
|
8
8
|
readonly dismiss: {
|
|
@@ -2,7 +2,7 @@ export declare const cardMeta: {
|
|
|
2
2
|
readonly name: "Card";
|
|
3
3
|
readonly category: "component";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly blueprint: {
|
|
7
7
|
readonly label: "Card";
|
|
8
8
|
readonly defaultProps: {
|
|
@@ -2,7 +2,7 @@ export declare const mediaCardMeta: {
|
|
|
2
2
|
readonly name: "MediaCard";
|
|
3
3
|
readonly category: "component";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly events: {
|
|
7
7
|
readonly press: {
|
|
8
8
|
readonly label: "Press";
|
|
@@ -3,7 +3,7 @@ export declare const postCardMeta: {
|
|
|
3
3
|
readonly category: "pattern";
|
|
4
4
|
readonly description: "Social/content post card with author identity, body, media, actions, and comment previews.";
|
|
5
5
|
readonly directManifestNode: true;
|
|
6
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
7
7
|
readonly blueprint: {
|
|
8
8
|
readonly label: "Post card";
|
|
9
9
|
readonly icon: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gradient.d.ts","sourceRoot":"","sources":["../../../../../src/features/gradient/adapters/inbound/Gradient.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAgDhE;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,qDAAoC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
|
|
3
|
+
import { Box } from '../../../layout/public';
|
|
4
4
|
import { useGradientRenderer } from './GradientRendererContext';
|
|
5
5
|
function GradientInner({ themeId: _themeId, mode: _mode, interactionPolicy: _interactionPolicy, children, colors, locations, start, end, width = '100%', height, minHeight, radius, p, testID, }) {
|
|
6
6
|
const gradientRenderer = useGradientRenderer();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gradient.js","sourceRoot":"","sources":["../../../../../src/features/gradient/adapters/inbound/Gradient.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,SAAS,aAAa,CAAC,EACrB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EACX,iBAAiB,EAAE,kBAAkB,EACrC,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,KAAK,GAAG,MAAM,EACd,MAAM,EACN,SAAS,EACT,MAAM,EACN,CAAC,EACD,MAAM,GACQ;IACd,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAE/C,OAAO,CACL,CAAC,GAAG,CACF,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAE9B;MAAA,CAAC,KAAK,CAAC,aAAa,CAClB,gBAAgB,EAChB;YACE,MAAM;YACN,GAAG;YACH,SAAS;YACT,KAAK;YACL,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;SACnB,EACD,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAC5B;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,GAAG,CAAC,CACP,CACH;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { GradientProps } from '../../../../types/gradient';\nimport { Box } from '../../../layout/public';\nimport { useGradientRenderer } from './GradientRendererContext';\n\nfunction GradientInner({\n themeId: _themeId,\n mode: _mode,\n interactionPolicy: _interactionPolicy,\n children,\n colors,\n locations,\n start,\n end,\n width = '100%',\n height,\n minHeight,\n radius,\n p,\n testID,\n}: GradientProps) {\n const gradientRenderer = useGradientRenderer();\n\n return (\n <Box\n height={height}\n minHeight={minHeight}\n radius={radius}\n testID={testID}\n width={width}\n style={{ overflow: 'hidden' }}\n >\n {React.createElement(\n gradientRenderer,\n {\n colors,\n end,\n locations,\n start,\n style: { flex: 1 },\n },\n <Box p={p} style={{ flex: 1 }}>\n {children}\n </Box>,\n )}\n </Box>\n );\n}\n\n/***\n * Gradient background container for branded loading surfaces, hero blocks, and previews.\n *\n * The host supplies a platform-compatible renderer through\n * `GradientRendererProvider`; ZORA does not require an Expo runtime.\n */\nexport const Gradient = withZoraThemeScope(GradientInner);\n"]}
|
package/dist/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.d.ts
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { GradientRenderer, GradientRendererProviderProps } from '
|
|
3
|
-
|
|
2
|
+
import type { GradientRenderer, GradientRendererProviderProps } from '../../../../types/gradient';
|
|
3
|
+
/***
|
|
4
4
|
* Supplies the host-owned renderer used by `Gradient`.
|
|
5
5
|
*
|
|
6
6
|
* Expo apps can adapt `expo-linear-gradient` here, while standalone React
|
|
7
7
|
* Native hosts can inject another compatible implementation.
|
|
8
8
|
*/
|
|
9
9
|
export declare function GradientRendererProvider({ children, renderer }: GradientRendererProviderProps): React.JSX.Element;
|
|
10
|
+
/*** Resolves the host-owned gradient renderer for a Gradient instance. */
|
|
10
11
|
export declare function useGradientRenderer(): GradientRenderer;
|
|
11
12
|
//# sourceMappingURL=GradientRendererContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GradientRendererContext.d.ts","sourceRoot":"","sources":["../../../../../src/features/gradient/adapters/inbound/GradientRendererContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAIlG;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,6BAA6B,qBAE7F;AAED,0EAA0E;AAC1E,wBAAgB,mBAAmB,IAAI,gBAAgB,CAUtD"}
|
package/dist/{components/gradient → features/gradient/adapters/inbound}/GradientRendererContext.js
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { createContext, use } from 'react';
|
|
2
2
|
const GradientRendererContext = createContext(null);
|
|
3
|
-
|
|
3
|
+
/***
|
|
4
4
|
* Supplies the host-owned renderer used by `Gradient`.
|
|
5
5
|
*
|
|
6
6
|
* Expo apps can adapt `expo-linear-gradient` here, while standalone React
|
|
@@ -9,6 +9,7 @@ const GradientRendererContext = createContext(null);
|
|
|
9
9
|
export function GradientRendererProvider({ children, renderer }) {
|
|
10
10
|
return <GradientRendererContext value={renderer}>{children}</GradientRendererContext>;
|
|
11
11
|
}
|
|
12
|
+
/*** Resolves the host-owned gradient renderer for a Gradient instance. */
|
|
12
13
|
export function useGradientRenderer() {
|
|
13
14
|
const renderer = use(GradientRendererContext);
|
|
14
15
|
if (!renderer) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GradientRendererContext.js","sourceRoot":"","sources":["../../../../../src/features/gradient/adapters/inbound/GradientRendererContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIlD,MAAM,uBAAuB,GAAG,aAAa,CAA0B,IAAI,CAAC,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAiC;IAC5F,OAAO,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,uBAAuB,CAAC,CAAC;AACxF,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,mBAAmB;IACjC,MAAM,QAAQ,GAAG,GAAG,CAAC,uBAAuB,CAAC,CAAC;IAE9C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CACb,4HAA4H,CAC7H,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import React, { createContext, use } from 'react';\n\nimport type { GradientRenderer, GradientRendererProviderProps } from '../../../../types/gradient';\n\nconst GradientRendererContext = createContext<GradientRenderer | null>(null);\n\n/***\n * Supplies the host-owned renderer used by `Gradient`.\n *\n * Expo apps can adapt `expo-linear-gradient` here, while standalone React\n * Native hosts can inject another compatible implementation.\n */\nexport function GradientRendererProvider({ children, renderer }: GradientRendererProviderProps) {\n return <GradientRendererContext value={renderer}>{children}</GradientRendererContext>;\n}\n\n/*** Resolves the host-owned gradient renderer for a Gradient instance. */\nexport function useGradientRenderer(): GradientRenderer {\n const renderer = use(GradientRendererContext);\n\n if (!renderer) {\n throw new Error(\n 'Gradient requires a renderer. Wrap the app in GradientRendererProvider with a platform-compatible gradient implementation.',\n );\n }\n\n return renderer;\n}\n"]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare const gradientMeta: {
|
|
2
|
+
readonly name: "Gradient";
|
|
3
|
+
readonly category: "component";
|
|
4
|
+
readonly description: "Renders a host-backed gradient container for nested manifest content.";
|
|
5
|
+
readonly directManifestNode: true;
|
|
6
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
7
|
+
readonly blueprint: {
|
|
8
|
+
readonly label: "Gradient";
|
|
9
|
+
};
|
|
10
|
+
readonly props: {
|
|
11
|
+
readonly colors: {
|
|
12
|
+
readonly type: "array";
|
|
13
|
+
readonly category: "Style";
|
|
14
|
+
readonly label: "Colors";
|
|
15
|
+
};
|
|
16
|
+
readonly locations: {
|
|
17
|
+
readonly type: "array";
|
|
18
|
+
readonly category: "Style";
|
|
19
|
+
readonly label: "Locations";
|
|
20
|
+
};
|
|
21
|
+
readonly width: {
|
|
22
|
+
readonly type: "number";
|
|
23
|
+
readonly category: "Layout";
|
|
24
|
+
readonly label: "Width";
|
|
25
|
+
};
|
|
26
|
+
readonly height: {
|
|
27
|
+
readonly type: "number";
|
|
28
|
+
readonly category: "Layout";
|
|
29
|
+
readonly label: "Height";
|
|
30
|
+
};
|
|
31
|
+
readonly minHeight: {
|
|
32
|
+
readonly type: "number";
|
|
33
|
+
readonly category: "Layout";
|
|
34
|
+
readonly label: "Minimum height";
|
|
35
|
+
};
|
|
36
|
+
readonly radius: {
|
|
37
|
+
readonly type: "radius";
|
|
38
|
+
readonly category: "Style";
|
|
39
|
+
readonly label: "Corner radius";
|
|
40
|
+
};
|
|
41
|
+
readonly p: {
|
|
42
|
+
readonly type: "spacing";
|
|
43
|
+
readonly category: "Layout";
|
|
44
|
+
readonly label: "Padding";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=gradientMeta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradientMeta.d.ts","sourceRoot":"","sources":["../../../src/features/gradient/gradientMeta.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBa,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';
|
|
2
|
+
export const gradientMeta = {
|
|
3
|
+
name: 'Gradient',
|
|
4
|
+
category: 'component',
|
|
5
|
+
description: 'Renders a host-backed gradient container for nested manifest content.',
|
|
6
|
+
directManifestNode: true,
|
|
7
|
+
allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
|
|
8
|
+
blueprint: {
|
|
9
|
+
label: 'Gradient',
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
colors: {
|
|
13
|
+
type: 'array',
|
|
14
|
+
category: 'Style',
|
|
15
|
+
label: 'Colors',
|
|
16
|
+
},
|
|
17
|
+
locations: { type: 'array', category: 'Style', label: 'Locations' },
|
|
18
|
+
width: { type: 'number', category: 'Layout', label: 'Width' },
|
|
19
|
+
height: { type: 'number', category: 'Layout', label: 'Height' },
|
|
20
|
+
minHeight: { type: 'number', category: 'Layout', label: 'Minimum height' },
|
|
21
|
+
radius: { type: 'radius', category: 'Style', label: 'Corner radius' },
|
|
22
|
+
p: { type: 'spacing', category: 'Layout', label: 'Padding' },
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=gradientMeta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradientMeta.js","sourceRoot":"","sources":["../../../src/features/gradient/gradientMeta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAE5E,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,WAAW;IACrB,WAAW,EAAE,uEAAuE;IACpF,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,CAAC,GAAG,0BAA0B,CAAC;IAChD,SAAS,EAAE;QACT,KAAK,EAAE,UAAU;KAClB;IACD,KAAK,EAAE;QACL,MAAM,EAAE;YACN,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,OAAO;YACjB,KAAK,EAAE,QAAQ;SAChB;QACD,SAAS,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE;QACnE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;QAC7D,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;QAC/D,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE;QAC1E,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE;QACrE,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE;KAC7D;CACmC,CAAC","sourcesContent":["import type { ZoraComponentMeta } from '../../metadata';\nimport { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';\n\nexport const gradientMeta = {\n name: 'Gradient',\n category: 'component',\n description: 'Renders a host-backed gradient container for nested manifest content.',\n directManifestNode: true,\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n blueprint: {\n label: 'Gradient',\n },\n props: {\n colors: {\n type: 'array',\n category: 'Style',\n label: 'Colors',\n },\n locations: { type: 'array', category: 'Style', label: 'Locations' },\n width: { type: 'number', category: 'Layout', label: 'Width' },\n height: { type: 'number', category: 'Layout', label: 'Height' },\n minHeight: { type: 'number', category: 'Layout', label: 'Minimum height' },\n radius: { type: 'radius', category: 'Style', label: 'Corner radius' },\n p: { type: 'spacing', category: 'Layout', label: 'Padding' },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { GradientColor, GradientColors, GradientLocations, GradientPoint, GradientProps, GradientRenderer, GradientRendererProps, GradientRendererProviderProps, } from '../../types/gradient';
|
|
2
|
+
export { Gradient } from './adapters/inbound/Gradient';
|
|
3
|
+
export { GradientRendererProvider } from './adapters/inbound/GradientRendererContext';
|
|
4
|
+
//# sourceMappingURL=public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/gradient/public.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/gradient/public.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC","sourcesContent":["export type {\n GradientColor,\n GradientColors,\n GradientLocations,\n GradientPoint,\n GradientProps,\n GradientRenderer,\n GradientRendererProps,\n GradientRendererProviderProps,\n} from '../../types/gradient';\nexport { Gradient } from './adapters/inbound/Gradient';\nexport { GradientRendererProvider } from './adapters/inbound/GradientRendererContext';\n"]}
|
|
@@ -2,7 +2,7 @@ export declare const keyboardAvoidingViewMeta: {
|
|
|
2
2
|
readonly name: "KeyboardAvoidingView";
|
|
3
3
|
readonly category: "layout";
|
|
4
4
|
readonly directManifestNode: true;
|
|
5
|
-
readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
6
6
|
readonly blueprint: {
|
|
7
7
|
readonly label: "Keyboard avoiding view";
|
|
8
8
|
readonly defaultProps: {
|
|
@@ -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", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "Form", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
|
|
5
|
+
readonly allowedChildren: readonly ["ActivityIndicator", "ForgotPasswordForm", "OAuthProviderButton", "OAuthProviderList", "OtpForm", "SignInForm", "SignUpForm", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "DatePicker", "Skeleton", "SkeletonCard", "SkeletonList", "SkeletonText", "IconButton", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Gradient", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Hero", "KeyboardAvoidingView", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "TimePicker", "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";
|