@ankhorage/zora 9.0.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +2 -2
  3. package/dist/constants.d.ts +1 -1
  4. package/dist/constants.js +1 -1
  5. package/dist/constants.js.map +1 -1
  6. package/dist/features/bottom-sheet/bottomSheetMeta.d.ts +1 -1
  7. package/dist/features/card/cardMeta.d.ts +1 -1
  8. package/dist/features/card/mediaCardMeta.d.ts +1 -1
  9. package/dist/features/card/postCardMeta.d.ts +1 -1
  10. package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.d.ts +5 -0
  11. package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.d.ts.map +1 -0
  12. package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.js +10 -0
  13. package/dist/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.js.map +1 -0
  14. package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts +36 -0
  15. package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.d.ts.map +1 -0
  16. package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.js +37 -0
  17. package/dist/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.js.map +1 -0
  18. package/dist/features/keyboard-avoiding-view/public.d.ts +3 -0
  19. package/dist/features/keyboard-avoiding-view/public.d.ts.map +1 -0
  20. package/dist/features/keyboard-avoiding-view/public.js +3 -0
  21. package/dist/features/keyboard-avoiding-view/public.js.map +1 -0
  22. package/dist/features/layout/boxMeta.d.ts +1 -1
  23. package/dist/features/layout/containerMeta.d.ts +1 -1
  24. package/dist/features/layout/gridMeta.d.ts +1 -1
  25. package/dist/features/layout/stackMeta.d.ts +1 -1
  26. package/dist/features/list/flatListMeta.d.ts +1 -1
  27. package/dist/features/list/sectionListMeta.d.ts +1 -1
  28. package/dist/features/surface/surfaceMeta.d.ts +1 -1
  29. package/dist/index.d.ts +1 -2
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +1 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/layout/screen/meta.d.ts +1 -1
  34. package/dist/layout/screen-section/meta.d.ts +1 -1
  35. package/dist/metadata/allowedChildren.d.ts +3 -3
  36. package/dist/metadata/allowedChildren.d.ts.map +1 -1
  37. package/dist/metadata/allowedChildren.js +1 -1
  38. package/dist/metadata/allowedChildren.js.map +1 -1
  39. package/dist/metadata/bindableComponentMeta.d.ts +2 -2
  40. package/dist/metadata/componentMeta.js +2 -2
  41. package/dist/metadata/componentMeta.js.map +1 -1
  42. package/dist/patterns/message-bubble/meta.d.ts +1 -1
  43. package/dist/patterns/notice/meta.d.ts +1 -1
  44. package/dist/patterns/panel/meta.d.ts +1 -1
  45. package/dist/patterns/reader/meta.d.ts +2 -2
  46. package/dist/patterns/scanner/meta.d.ts +2 -2
  47. package/dist/registry.js +2 -2
  48. package/dist/registry.js.map +1 -1
  49. package/dist/types/keyboard-avoiding-view.d.ts +6 -0
  50. package/dist/types/keyboard-avoiding-view.d.ts.map +1 -0
  51. package/dist/types/keyboard-avoiding-view.js +2 -0
  52. package/dist/types/keyboard-avoiding-view.js.map +1 -0
  53. package/package.json +2 -2
  54. package/src/constants.ts +1 -1
  55. package/src/features/keyboard-avoiding-view/adapters/inbound/KeyboardAvoidingView.tsx +18 -0
  56. package/src/features/keyboard-avoiding-view/keyboardAvoidingViewMeta.ts +38 -0
  57. package/src/features/keyboard-avoiding-view/public.ts +5 -0
  58. package/src/index.ts +5 -2
  59. package/src/metadata/allowedChildren.ts +1 -1
  60. package/src/metadata/componentMeta.test.ts +14 -1
  61. package/src/metadata/componentMeta.ts +2 -2
  62. package/src/platformAcceptance.test.ts +1 -1
  63. package/src/registry.ts +2 -2
  64. package/src/showcaseCoverage.test.ts +1 -0
  65. package/src/types/keyboard-avoiding-view.ts +10 -0
  66. package/dist/features/splash-screen/adapters/inbound/SplashScreen.d.ts +0 -11
  67. package/dist/features/splash-screen/adapters/inbound/SplashScreen.d.ts.map +0 -1
  68. package/dist/features/splash-screen/adapters/inbound/SplashScreen.js +0 -55
  69. package/dist/features/splash-screen/adapters/inbound/SplashScreen.js.map +0 -1
  70. package/dist/features/splash-screen/public.d.ts +0 -3
  71. package/dist/features/splash-screen/public.d.ts.map +0 -1
  72. package/dist/features/splash-screen/public.js +0 -2
  73. package/dist/features/splash-screen/public.js.map +0 -1
  74. package/dist/features/splash-screen/splashScreenMeta.d.ts +0 -39
  75. package/dist/features/splash-screen/splashScreenMeta.d.ts.map +0 -1
  76. package/dist/features/splash-screen/splashScreenMeta.js +0 -40
  77. package/dist/features/splash-screen/splashScreenMeta.js.map +0 -1
  78. package/dist/types/splash-screen.d.ts +0 -16
  79. package/dist/types/splash-screen.d.ts.map +0 -1
  80. package/dist/types/splash-screen.js +0 -2
  81. package/dist/types/splash-screen.js.map +0 -1
  82. package/src/features/splash-screen/adapters/inbound/SplashScreen.tsx +0 -98
  83. package/src/features/splash-screen/public.ts +0 -2
  84. package/src/features/splash-screen/splashScreenMeta.ts +0 -41
  85. package/src/types/splash-screen.ts +0 -18
@@ -9,6 +9,6 @@ test('passes the isolated Surface 4 and RN Web 0.21 acceptance suite', () => {
9
9
  const output = `${subprocess.stdout.toString()}\n${subprocess.stderr.toString()}`;
10
10
 
11
11
  expect(subprocess.exitCode, output).toBe(0);
12
- expect(output).toContain('9 pass');
12
+ expect(output).toContain('10 pass');
13
13
  expect(output).toContain('0 fail');
14
14
  });
package/src/registry.ts CHANGED
@@ -39,11 +39,11 @@ import { Radio, RadioGroup } from './features/form/radio/public';
39
39
  import { TextInput } from './features/form/text-input/public';
40
40
  import { Icon } from './features/icon/public';
41
41
  import { Image } from './features/image/public';
42
+ import { KeyboardAvoidingView } from './features/keyboard-avoiding-view/public';
42
43
  import { Box, Container, Divider, Grid, Stack } from './features/layout/public';
43
44
  import { ContentRail } from './features/layout/public';
44
45
  import { FlatList, SectionList } from './features/list/public';
45
46
  import { Progress, ProgressRing } from './features/progress/public';
46
- import { SplashScreen } from './features/splash-screen/public';
47
47
  import { Surface } from './features/surface/public';
48
48
  import { Heading } from './features/typography/public';
49
49
  import { Text } from './features/typography/public';
@@ -138,6 +138,7 @@ const _ZORA_COMPONENT_REGISTRY = {
138
138
  Icon,
139
139
  IconButton,
140
140
  Image,
141
+ KeyboardAvoidingView,
141
142
  TextInput,
142
143
  MediaCard,
143
144
  Menu,
@@ -155,7 +156,6 @@ const _ZORA_COMPONENT_REGISTRY = {
155
156
  SkeletonCard,
156
157
  SkeletonList,
157
158
  SkeletonText,
158
- SplashScreen,
159
159
  Tabs,
160
160
  Text,
161
161
  TimePicker,
@@ -36,6 +36,7 @@ const REQUIRED_SHOWCASE_COVERAGE = {
36
36
  'Icon',
37
37
  'IconButton',
38
38
  'Image',
39
+ 'KeyboardAvoidingView',
39
40
  'TextInput',
40
41
  'MediaCard',
41
42
  'MetricCard',
@@ -0,0 +1,10 @@
1
+ import type { KeyboardAvoidingViewProps as SurfaceKeyboardAvoidingViewProps } from '@ankhorage/surface';
2
+
3
+ import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
4
+
5
+ export type KeyboardAvoidingViewBehavior = NonNullable<
6
+ SurfaceKeyboardAvoidingViewProps['behavior']
7
+ >;
8
+
9
+ export interface KeyboardAvoidingViewProps
10
+ extends ZoraBaseProps, Omit<SurfaceKeyboardAvoidingViewProps, keyof ZoraBaseProps> {}
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import type { SplashScreenProps } from '../../../../types/splash-screen';
3
- /***
4
- * Branded launch/loading surface for previews, web fallbacks, and app bootstrap states.
5
- *
6
- * `SplashScreen` is a React-rendered component. It intentionally does not manage
7
- * Expo's native splash screen lifecycle or replace generated `expo-splash-screen`
8
- * configuration.
9
- */
10
- export declare const SplashScreen: (props: SplashScreenProps) => React.ReactElement | null;
11
- //# sourceMappingURL=SplashScreen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SplashScreen.d.ts","sourceRoot":"","sources":["../../../../../src/features/splash-screen/adapters/inbound/SplashScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAyB,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAIhG;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,yDAAwC,CAAC"}
@@ -1,55 +0,0 @@
1
- import React from 'react';
2
- import { Center } from '../../../../foundation';
3
- import { useZoraTheme } from '../../../../theme/useZoraTheme';
4
- import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
5
- import { Box, Stack } from '../../../layout/public';
6
- import { Heading } from '../../../typography/public';
7
- import { Text } from '../../../typography/public';
8
- /***
9
- * Branded launch/loading surface for previews, web fallbacks, and app bootstrap states.
10
- *
11
- * `SplashScreen` is a React-rendered component. It intentionally does not manage
12
- * Expo's native splash screen lifecycle or replace generated `expo-splash-screen`
13
- * configuration.
14
- */
15
- export const SplashScreen = withZoraThemeScope(SplashScreenInner);
16
- function resolveLogoRadius(shape) {
17
- switch (shape) {
18
- case 'circle':
19
- return 9999;
20
- case 'square':
21
- return 0;
22
- case 'rounded':
23
- default:
24
- return 28;
25
- }
26
- }
27
- function PlaceholderLogo({ label, shape, size }) {
28
- const { theme } = useZoraTheme();
29
- const radius = resolveLogoRadius(shape);
30
- return (<Center accessibilityLabel={label} bg={theme.semantics.action.primary.base} height={size} width={size} style={{ borderRadius: radius }}>
31
- <Text emphasis="inverse" variant="eyebrow" weight="bold">
32
- {label.slice(0, 2).toUpperCase()}
33
- </Text>
34
- </Center>);
35
- }
36
- function SplashScreenInner({ themeId: _themeId, mode: _mode, logo, title, subtitle, children, minHeight = '100%', backgroundColor, logoSize = 96, logoLabel = 'ZORA', logoShape = 'rounded', testID, }) {
37
- const { theme } = useZoraTheme();
38
- const background = backgroundColor ?? theme.semantics.neutral.surface;
39
- const renderedLogo = logo ?? (<PlaceholderLogo label={logoLabel} shape={logoShape} size={logoSize}/>);
40
- return (<Center bg={background} minHeight={minHeight} p="xl" testID={testID} width="100%">
41
- <Stack align="center" gap="l" style={{ maxWidth: 360 }}>
42
- {renderedLogo}
43
- {title || subtitle ? (<Stack align="center" gap="xs">
44
- {title ? (<Heading align="center" level={1} size="h1">
45
- {title}
46
- </Heading>) : null}
47
- {subtitle ? (<Text align="center" emphasis="muted" variant="bodySmall">
48
- {subtitle}
49
- </Text>) : null}
50
- </Stack>) : null}
51
- {children ? <Box width="100%">{children}</Box> : null}
52
- </Stack>
53
- </Center>);
54
- }
55
- //# sourceMappingURL=SplashScreen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SplashScreen.js","sourceRoot":"","sources":["../../../../../src/features/splash-screen/adapters/inbound/SplashScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;AAQlE,SAAS,iBAAiB,CAAC,KAA4B;IACrD,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,QAAQ;YACX,OAAO,IAAI,CAAC;QACd,KAAK,QAAQ;YACX,OAAO,CAAC,CAAC;QACX,KAAK,SAAS,CAAC;QACf;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,EAAE,KAAK,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import { Center } from '../../../../foundation';\nimport { useZoraTheme } from '../../../../theme/useZoraTheme';\nimport { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';\nimport type { SplashScreenLogoShape, SplashScreenProps } from '../../../../types/splash-screen';\nimport { Box, Stack } from '../../../layout/public';\nimport { Heading } from '../../../typography/public';\nimport { Text } from '../../../typography/public';\n/***\n * Branded launch/loading surface for previews, web fallbacks, and app bootstrap states.\n *\n * `SplashScreen` is a React-rendered component. It intentionally does not manage\n * Expo's native splash screen lifecycle or replace generated `expo-splash-screen`\n * configuration.\n */\nexport const SplashScreen = withZoraThemeScope(SplashScreenInner);\n\ninterface PlaceholderLogoProps {\n label: string;\n shape: SplashScreenLogoShape;\n size: number;\n}\n\nfunction resolveLogoRadius(shape: SplashScreenLogoShape): number {\n switch (shape) {\n case 'circle':\n return 9999;\n case 'square':\n return 0;\n case 'rounded':\n default:\n return 28;\n }\n}\n\nfunction PlaceholderLogo({ label, shape, size }: PlaceholderLogoProps) {\n const { theme } = useZoraTheme();\n const radius = resolveLogoRadius(shape);\n\n return (\n <Center\n accessibilityLabel={label}\n bg={theme.semantics.action.primary.base}\n height={size}\n width={size}\n style={{ borderRadius: radius }}\n >\n <Text emphasis=\"inverse\" variant=\"eyebrow\" weight=\"bold\">\n {label.slice(0, 2).toUpperCase()}\n </Text>\n </Center>\n );\n}\n\nfunction SplashScreenInner({\n themeId: _themeId,\n mode: _mode,\n logo,\n title,\n subtitle,\n children,\n minHeight = '100%',\n backgroundColor,\n logoSize = 96,\n logoLabel = 'ZORA',\n logoShape = 'rounded',\n testID,\n}: SplashScreenProps) {\n const { theme } = useZoraTheme();\n const background = backgroundColor ?? theme.semantics.neutral.surface;\n const renderedLogo = logo ?? (\n <PlaceholderLogo label={logoLabel} shape={logoShape} size={logoSize} />\n );\n\n return (\n <Center bg={background} minHeight={minHeight} p=\"xl\" testID={testID} width=\"100%\">\n <Stack align=\"center\" gap=\"l\" style={{ maxWidth: 360 }}>\n {renderedLogo}\n {title || subtitle ? (\n <Stack align=\"center\" gap=\"xs\">\n {title ? (\n <Heading align=\"center\" level={1} size=\"h1\">\n {title}\n </Heading>\n ) : null}\n {subtitle ? (\n <Text align=\"center\" emphasis=\"muted\" variant=\"bodySmall\">\n {subtitle}\n </Text>\n ) : null}\n </Stack>\n ) : null}\n {children ? <Box width=\"100%\">{children}</Box> : null}\n </Stack>\n </Center>\n );\n}\n"]}
@@ -1,3 +0,0 @@
1
- export type { SplashScreenLogoShape, SplashScreenProps } from '../../types/splash-screen';
2
- export { SplashScreen } from './adapters/inbound/SplashScreen';
3
- //# sourceMappingURL=public.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/features/splash-screen/public.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC"}
@@ -1,2 +0,0 @@
1
- export { SplashScreen } from './adapters/inbound/SplashScreen';
2
- //# sourceMappingURL=public.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/features/splash-screen/public.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC","sourcesContent":["export type { SplashScreenLogoShape, SplashScreenProps } from '../../types/splash-screen';\nexport { SplashScreen } from './adapters/inbound/SplashScreen';\n"]}
@@ -1,39 +0,0 @@
1
- export declare const splashScreenMeta: {
2
- readonly name: "SplashScreen";
3
- readonly category: "component";
4
- readonly directManifestNode: true;
5
- readonly allowedChildren: readonly ["ActivityIndicator", "Surface", "Avatar", "AvatarGroup", "Badge", "MediaCard", "MetricCard", "Chip", "ChipGroup", "DataTable", "IconButton", "SplashScreen", "Uploader", "FlatList", "SectionList", "BottomSheet", "ProductCard", "Box", "Stack", "Grid", "Container", "Divider", "Text", "Heading", "Icon", "Image", "Button", "ButtonGroup", "RadioGroup", "ThemeModeToggle", "TextInput", "FormField", "Card", "Panel", "Notice", "EmptyState", "SectionHeader", "SettingsRow", "PostCard", "ChatListItem", "MessageBubble", "ProgressRing", "ReaderSurface", "ContentRail", "MissingElement"];
6
- readonly description: "App content splash presentation; does not control the native launch screen.";
7
- readonly props: {
8
- readonly title: {
9
- readonly type: "string";
10
- readonly category: "Content";
11
- };
12
- readonly subtitle: {
13
- readonly type: "string";
14
- readonly category: "Content";
15
- };
16
- readonly minHeight: {
17
- readonly type: "number";
18
- readonly category: "Layout";
19
- };
20
- readonly backgroundColor: {
21
- readonly type: "color";
22
- readonly category: "Style";
23
- };
24
- readonly logoSize: {
25
- readonly type: "number";
26
- readonly category: "Layout";
27
- };
28
- readonly logoLabel: {
29
- readonly type: "string";
30
- readonly category: "Accessibility";
31
- };
32
- readonly logoShape: {
33
- readonly type: "enum";
34
- readonly category: "Style";
35
- readonly enum: readonly ["circle", "square", "rounded"];
36
- };
37
- };
38
- };
39
- //# sourceMappingURL=splashScreenMeta.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"splashScreenMeta.d.ts","sourceRoot":"","sources":["../../../src/features/splash-screen/splashScreenMeta.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCS,CAAC"}
@@ -1,40 +0,0 @@
1
- import { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';
2
- export const splashScreenMeta = {
3
- name: 'SplashScreen',
4
- category: 'component',
5
- directManifestNode: true,
6
- allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
7
- description: 'App content splash presentation; does not control the native launch screen.',
8
- props: {
9
- title: {
10
- type: 'string',
11
- category: 'Content',
12
- },
13
- subtitle: {
14
- type: 'string',
15
- category: 'Content',
16
- },
17
- minHeight: {
18
- type: 'number',
19
- category: 'Layout',
20
- },
21
- backgroundColor: {
22
- type: 'color',
23
- category: 'Style',
24
- },
25
- logoSize: {
26
- type: 'number',
27
- category: 'Layout',
28
- },
29
- logoLabel: {
30
- type: 'string',
31
- category: 'Accessibility',
32
- },
33
- logoShape: {
34
- type: 'enum',
35
- category: 'Style',
36
- enum: ['circle', 'square', 'rounded'],
37
- },
38
- },
39
- };
40
- //# sourceMappingURL=splashScreenMeta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"splashScreenMeta.js","sourceRoot":"","sources":["../../../src/features/splash-screen/splashScreenMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAG5E,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE,WAAW;IACrB,kBAAkB,EAAE,IAAI;IACxB,eAAe,EAAE,CAAC,GAAG,0BAA0B,CAAC;IAChD,WAAW,EAAE,6EAA6E;IAC1F,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;SACpB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,SAAS;SACpB;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;SACnB;QACD,eAAe,EAAE;YACf,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,OAAO;SAClB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,QAAQ;SACnB;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,eAAe;SAC1B;QACD,SAAS,EAAE;YACT,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,OAAO;YACjB,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC;SACtC;KACF;CACmC,CAAC","sourcesContent":["import { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';\nimport type { ZoraComponentMeta } from '../../metadata/types';\n\nexport const splashScreenMeta = {\n name: 'SplashScreen',\n category: 'component',\n directManifestNode: true,\n allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],\n description: 'App content splash presentation; does not control the native launch screen.',\n props: {\n title: {\n type: 'string',\n category: 'Content',\n },\n subtitle: {\n type: 'string',\n category: 'Content',\n },\n minHeight: {\n type: 'number',\n category: 'Layout',\n },\n backgroundColor: {\n type: 'color',\n category: 'Style',\n },\n logoSize: {\n type: 'number',\n category: 'Layout',\n },\n logoLabel: {\n type: 'string',\n category: 'Accessibility',\n },\n logoShape: {\n type: 'enum',\n category: 'Style',\n enum: ['circle', 'square', 'rounded'],\n },\n },\n} as const satisfies ZoraComponentMeta;\n"]}
@@ -1,16 +0,0 @@
1
- import type React from 'react';
2
- import type { BoxProps } from '../features/layout/public';
3
- import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
4
- export type SplashScreenLogoShape = 'circle' | 'square' | 'rounded';
5
- export interface SplashScreenProps extends ZoraBaseProps {
6
- logo?: React.ReactNode;
7
- title?: React.ReactNode;
8
- subtitle?: React.ReactNode;
9
- children?: React.ReactNode;
10
- minHeight?: BoxProps['minHeight'];
11
- backgroundColor?: BoxProps['bg'];
12
- logoSize?: number;
13
- logoLabel?: string;
14
- logoShape?: SplashScreenLogoShape;
15
- }
16
- //# sourceMappingURL=splash-screen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"splash-screen.d.ts","sourceRoot":"","sources":["../../src/types/splash-screen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEpE,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IAClC,eAAe,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,qBAAqB,CAAC;CACnC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=splash-screen.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"splash-screen.js","sourceRoot":"","sources":["../../src/types/splash-screen.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\n\nimport type { BoxProps } from '../features/layout/public';\nimport type { ZoraBaseProps } from '../theme/ZoraBaseProps';\n\nexport type SplashScreenLogoShape = 'circle' | 'square' | 'rounded';\n\nexport interface SplashScreenProps extends ZoraBaseProps {\n logo?: React.ReactNode;\n title?: React.ReactNode;\n subtitle?: React.ReactNode;\n children?: React.ReactNode;\n minHeight?: BoxProps['minHeight'];\n backgroundColor?: BoxProps['bg'];\n logoSize?: number;\n logoLabel?: string;\n logoShape?: SplashScreenLogoShape;\n}\n"]}
@@ -1,98 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Center } from '../../../../foundation';
4
- import { useZoraTheme } from '../../../../theme/useZoraTheme';
5
- import { withZoraThemeScope } from '../../../../theme/withZoraThemeScope';
6
- import type { SplashScreenLogoShape, SplashScreenProps } from '../../../../types/splash-screen';
7
- import { Box, Stack } from '../../../layout/public';
8
- import { Heading } from '../../../typography/public';
9
- import { Text } from '../../../typography/public';
10
- /***
11
- * Branded launch/loading surface for previews, web fallbacks, and app bootstrap states.
12
- *
13
- * `SplashScreen` is a React-rendered component. It intentionally does not manage
14
- * Expo's native splash screen lifecycle or replace generated `expo-splash-screen`
15
- * configuration.
16
- */
17
- export const SplashScreen = withZoraThemeScope(SplashScreenInner);
18
-
19
- interface PlaceholderLogoProps {
20
- label: string;
21
- shape: SplashScreenLogoShape;
22
- size: number;
23
- }
24
-
25
- function resolveLogoRadius(shape: SplashScreenLogoShape): number {
26
- switch (shape) {
27
- case 'circle':
28
- return 9999;
29
- case 'square':
30
- return 0;
31
- case 'rounded':
32
- default:
33
- return 28;
34
- }
35
- }
36
-
37
- function PlaceholderLogo({ label, shape, size }: PlaceholderLogoProps) {
38
- const { theme } = useZoraTheme();
39
- const radius = resolveLogoRadius(shape);
40
-
41
- return (
42
- <Center
43
- accessibilityLabel={label}
44
- bg={theme.semantics.action.primary.base}
45
- height={size}
46
- width={size}
47
- style={{ borderRadius: radius }}
48
- >
49
- <Text emphasis="inverse" variant="eyebrow" weight="bold">
50
- {label.slice(0, 2).toUpperCase()}
51
- </Text>
52
- </Center>
53
- );
54
- }
55
-
56
- function SplashScreenInner({
57
- themeId: _themeId,
58
- mode: _mode,
59
- logo,
60
- title,
61
- subtitle,
62
- children,
63
- minHeight = '100%',
64
- backgroundColor,
65
- logoSize = 96,
66
- logoLabel = 'ZORA',
67
- logoShape = 'rounded',
68
- testID,
69
- }: SplashScreenProps) {
70
- const { theme } = useZoraTheme();
71
- const background = backgroundColor ?? theme.semantics.neutral.surface;
72
- const renderedLogo = logo ?? (
73
- <PlaceholderLogo label={logoLabel} shape={logoShape} size={logoSize} />
74
- );
75
-
76
- return (
77
- <Center bg={background} minHeight={minHeight} p="xl" testID={testID} width="100%">
78
- <Stack align="center" gap="l" style={{ maxWidth: 360 }}>
79
- {renderedLogo}
80
- {title || subtitle ? (
81
- <Stack align="center" gap="xs">
82
- {title ? (
83
- <Heading align="center" level={1} size="h1">
84
- {title}
85
- </Heading>
86
- ) : null}
87
- {subtitle ? (
88
- <Text align="center" emphasis="muted" variant="bodySmall">
89
- {subtitle}
90
- </Text>
91
- ) : null}
92
- </Stack>
93
- ) : null}
94
- {children ? <Box width="100%">{children}</Box> : null}
95
- </Stack>
96
- </Center>
97
- );
98
- }
@@ -1,2 +0,0 @@
1
- export type { SplashScreenLogoShape, SplashScreenProps } from '../../types/splash-screen';
2
- export { SplashScreen } from './adapters/inbound/SplashScreen';
@@ -1,41 +0,0 @@
1
- import { CONTAINER_ALLOWED_CHILDREN } from '../../metadata/allowedChildren';
2
- import type { ZoraComponentMeta } from '../../metadata/types';
3
-
4
- export const splashScreenMeta = {
5
- name: 'SplashScreen',
6
- category: 'component',
7
- directManifestNode: true,
8
- allowedChildren: [...CONTAINER_ALLOWED_CHILDREN],
9
- description: 'App content splash presentation; does not control the native launch screen.',
10
- props: {
11
- title: {
12
- type: 'string',
13
- category: 'Content',
14
- },
15
- subtitle: {
16
- type: 'string',
17
- category: 'Content',
18
- },
19
- minHeight: {
20
- type: 'number',
21
- category: 'Layout',
22
- },
23
- backgroundColor: {
24
- type: 'color',
25
- category: 'Style',
26
- },
27
- logoSize: {
28
- type: 'number',
29
- category: 'Layout',
30
- },
31
- logoLabel: {
32
- type: 'string',
33
- category: 'Accessibility',
34
- },
35
- logoShape: {
36
- type: 'enum',
37
- category: 'Style',
38
- enum: ['circle', 'square', 'rounded'],
39
- },
40
- },
41
- } as const satisfies ZoraComponentMeta;
@@ -1,18 +0,0 @@
1
- import type React from 'react';
2
-
3
- import type { BoxProps } from '../features/layout/public';
4
- import type { ZoraBaseProps } from '../theme/ZoraBaseProps';
5
-
6
- export type SplashScreenLogoShape = 'circle' | 'square' | 'rounded';
7
-
8
- export interface SplashScreenProps extends ZoraBaseProps {
9
- logo?: React.ReactNode;
10
- title?: React.ReactNode;
11
- subtitle?: React.ReactNode;
12
- children?: React.ReactNode;
13
- minHeight?: BoxProps['minHeight'];
14
- backgroundColor?: BoxProps['bg'];
15
- logoSize?: number;
16
- logoLabel?: string;
17
- logoShape?: SplashScreenLogoShape;
18
- }