@ankhorage/zora 0.7.0 → 0.8.1

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f7e5fdc: Stop resolving localization internally in Text and Heading. Localization keys now remain passive fallback content so runtime integrations can resolve localized display props before rendering.
8
+
9
+ ## 0.8.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 5ff5e06: Re-export selected Surface foundation primitives such as `Box`, `Stack`,
14
+ `Grid`, and `Container` through the ZORA public API.
15
+
3
16
  ## 0.7.0
4
17
 
5
18
  ### Minor Changes
package/README.md CHANGED
@@ -68,6 +68,19 @@ export function App() {
68
68
  }
69
69
  ```
70
70
 
71
+ ## Foundation primitives
72
+
73
+ ZORA re-exports selected Surface foundation primitives for app-facing layout
74
+ code:
75
+
76
+ ```tsx
77
+ import { Box, Container, Grid, Heading, Stack, Text } from '@ankhorage/zora';
78
+ ```
79
+
80
+ Use ZORA `Text` and `Heading` for typography. Use `Box`, `Stack`, `Grid`, and
81
+ `Container` for layout. Surface remains the lower-level render foundation and
82
+ should not be required in normal app-facing UI code.
83
+
71
84
  ## Shared Types
72
85
 
73
86
  These unions appear across the catalogue:
@@ -109,21 +122,21 @@ responsive for mobile and web layouts.
109
122
 
110
123
  ZORA props:
111
124
 
112
- | Prop | Type | Default | Notes |
113
- | --------------- | ------------------------------------------- | ----------- | ------------------------------------------ |
114
- | `children` | `React.ReactNode` | - | Primary content. |
115
- | `text` | `string` | - | Manifest-friendly content prop. |
116
- | `i18nKey` | `string` | - | Translation key fallback. |
117
- | `level` | `HeadingLevel` | `2` | Semantic heading level from `1` through `6`. |
118
- | `size` | `Responsive<HeadingSize>` | level size | Visual scale: `display`, `h1` through `h6`. |
119
- | `tone` | `Responsive<HeadingTone>` | `'default'` | Semantic text color. |
120
- | `align` | `Responsive<HeadingAlign>` | - | Text alignment. |
121
- | `weight` | `Responsive<HeadingWeight>` | recipe | Optional structured weight override. |
122
- | `italic` | `boolean` | `false` | Italic style. |
123
- | `numberOfLines` | `number` | - | Native/web truncation line count. |
124
- | `ellipsizeMode` | `'head' \| 'middle' \| 'tail' \| 'clip'` | - | Truncation behavior. |
125
- | `selectable` | `boolean` | - | Allows text selection where supported. |
126
- | `testID` | `string` | - | Test id. |
125
+ | Prop | Type | Default | Notes |
126
+ | --------------- | ---------------------------------------- | ----------- | -------------------------------------------- |
127
+ | `children` | `React.ReactNode` | - | Primary content. |
128
+ | `text` | `string` | - | Manifest-friendly content prop. |
129
+ | `i18nKey` | `string` | - | Runtime-resolved fallback key when no content prop is provided. |
130
+ | `level` | `HeadingLevel` | `2` | Semantic heading level from `1` through `6`. |
131
+ | `size` | `Responsive<HeadingSize>` | level size | Visual scale: `display`, `h1` through `h6`. |
132
+ | `tone` | `Responsive<HeadingTone>` | `'default'` | Semantic text color. |
133
+ | `align` | `Responsive<HeadingAlign>` | - | Text alignment. |
134
+ | `weight` | `Responsive<HeadingWeight>` | recipe | Optional structured weight override. |
135
+ | `italic` | `boolean` | `false` | Italic style. |
136
+ | `numberOfLines` | `number` | - | Native/web truncation line count. |
137
+ | `ellipsizeMode` | `'head' \| 'middle' \| 'tail' \| 'clip'` | - | Truncation behavior. |
138
+ | `selectable` | `boolean` | - | Allows text selection where supported. |
139
+ | `testID` | `string` | - | Test id. |
127
140
 
128
141
  No inherited props. `HeadingProps` is declared directly by ZORA to keep heading
129
142
  usage structured and template-safe.
@@ -154,7 +167,7 @@ ZORA props:
154
167
  | --------------- | ---------------------------------------- | ----------- | -------------------------------------- |
155
168
  | `children` | `React.ReactNode` | - | Primary content. |
156
169
  | `text` | `string` | - | Manifest-friendly content prop. |
157
- | `i18nKey` | `string` | - | Translation key fallback. |
170
+ | `i18nKey` | `string` | - | Runtime-resolved fallback key when no content prop is provided. |
158
171
  | `variant` | `Responsive<TextVariant>` | `'body'` | Typography recipe. |
159
172
  | `tone` | `Responsive<TextTone>` | `'default'` | Semantic text color. |
160
173
  | `align` | `Responsive<TextAlign>` | - | Text alignment. |
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../src/components/heading/Heading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAkC5C,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,KAAS,EACT,IAAI,EACJ,IAAgB,EAChB,KAAK,EACL,MAAM,EACN,MAAc,EACd,aAAa,EACb,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,iBAA4B,EAC5B,QAAQ,EACR,MAAM,GACP,EAAE,YAAY,4BAoCd"}
1
+ {"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../src/components/heading/Heading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA0B5C,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,KAAS,EACT,IAAI,EACJ,IAAgB,EAChB,KAAK,EACL,MAAM,EACN,MAAc,EACd,aAAa,EACb,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,iBAA4B,EAC5B,QAAQ,EACR,MAAM,GACP,EAAE,YAAY,4BAmCd"}
@@ -1,9 +1,9 @@
1
- import { resolveResponsive, useResponsiveRuntime, useTranslationContext } from '@ankhorage/surface';
1
+ import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';
2
2
  import React from 'react';
3
3
  import { Text as ReactNativeText } from 'react-native';
4
4
  import { useZoraTheme } from '../../theme/useZoraTheme';
5
5
  import { resolveHeadingRecipe, resolveHeadingSizeFromLevel } from './resolveHeadingRecipe';
6
- function resolveHeadingContent({ children, text, i18nKey, translate, }) {
6
+ function resolveHeadingContent({ children, text, i18nKey, }) {
7
7
  if (children !== undefined) {
8
8
  return children;
9
9
  }
@@ -13,20 +13,12 @@ function resolveHeadingContent({ children, text, i18nKey, translate, }) {
13
13
  if (!i18nKey) {
14
14
  return null;
15
15
  }
16
- try {
17
- const translated = translate(i18nKey);
18
- return translated && translated !== i18nKey ? translated : i18nKey;
19
- }
20
- catch (error) {
21
- console.warn('[ZoraHeading] Translation error:', error);
22
- return i18nKey;
23
- }
16
+ return i18nKey;
24
17
  }
25
18
  export function Heading({ children, text, i18nKey, level = 2, size, tone = 'default', align, weight, italic = false, numberOfLines, ellipsizeMode, selectable, accessibilityLabel, accessibilityHint, accessibilityRole = 'header', nativeID, testID, }) {
26
19
  const { theme } = useZoraTheme();
27
20
  const { breakpoint } = useResponsiveRuntime();
28
- const { t } = useTranslationContext();
29
- const content = resolveHeadingContent({ children, text, i18nKey, translate: t });
21
+ const content = resolveHeadingContent({ children, text, i18nKey });
30
22
  const resolvedSize = resolveResponsive(size, breakpoint) ?? resolveHeadingSizeFromLevel(level);
31
23
  const resolvedTone = resolveResponsive(tone, breakpoint) ?? 'default';
32
24
  const resolvedAlign = resolveResponsive(align, breakpoint);
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../../src/components/heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AACpG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAG3F,SAAS,qBAAqB,CAAC,EAC7B,QAAQ,EACR,IAAI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CAAC,CAAC;IAC/F,MAAM,YAAY,GAAG,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,SAAS,CAAC;IACtE,MAAM,aAAa,GAAG,iBAAiB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAC3D,MAAM,cAAc,GAAG,iBAAiB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAE7D,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,CAAC,eAAe,CACd,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE;YACjC,KAAK,EAAE,aAAa;YACpB,MAAM;YACN,KAAK;YACL,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,YAAY;YAClB,MAAM,EAAE,cAAc;SACvB,CAAC,CAAC,CAEH;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC","sourcesContent":["import { resolveResponsive, useResponsiveRuntime, useTranslationContext } from '@ankhorage/surface';\nimport React from 'react';\nimport { Text as ReactNativeText } from 'react-native';\n\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { resolveHeadingRecipe, resolveHeadingSizeFromLevel } from './resolveHeadingRecipe';\nimport type { HeadingProps } from './types';\n\nfunction resolveHeadingContent({\n children,\n text,\n i18nKey,\n translate,\n}: {\n children: HeadingProps['children'];\n text: HeadingProps['text'];\n i18nKey: HeadingProps['i18nKey'];\n translate: (key: string) => string;\n}): React.ReactNode {\n if (children !== undefined) {\n return children;\n }\n\n if (text !== undefined) {\n return text;\n }\n\n if (!i18nKey) {\n return null;\n }\n\n try {\n const translated = translate(i18nKey);\n return translated && translated !== i18nKey ? translated : i18nKey;\n } catch (error) {\n console.warn('[ZoraHeading] Translation error:', error);\n return i18nKey;\n }\n}\n\nexport function Heading({\n children,\n text,\n i18nKey,\n level = 2,\n size,\n tone = 'default',\n align,\n weight,\n italic = false,\n numberOfLines,\n ellipsizeMode,\n selectable,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'header',\n nativeID,\n testID,\n}: HeadingProps) {\n const { theme } = useZoraTheme();\n const { breakpoint } = useResponsiveRuntime();\n const { t } = useTranslationContext();\n const content = resolveHeadingContent({ children, text, i18nKey, translate: t });\n const resolvedSize = resolveResponsive(size, breakpoint) ?? resolveHeadingSizeFromLevel(level);\n const resolvedTone = resolveResponsive(tone, breakpoint) ?? 'default';\n const resolvedAlign = resolveResponsive(align, breakpoint);\n const resolvedWeight = resolveResponsive(weight, breakpoint);\n\n if (content === null || content === undefined) {\n return null;\n }\n\n return (\n <ReactNativeText\n accessibilityHint={accessibilityHint}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole={accessibilityRole}\n ellipsizeMode={ellipsizeMode}\n nativeID={nativeID}\n numberOfLines={numberOfLines}\n selectable={selectable}\n testID={testID}\n style={resolveHeadingRecipe(theme, {\n align: resolvedAlign,\n italic,\n level,\n size: resolvedSize,\n tone: resolvedTone,\n weight: resolvedWeight,\n })}\n >\n {content}\n </ReactNativeText>\n );\n}\n"]}
1
+ {"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../../src/components/heading/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,e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M,cAAc,GAAG,iBAAiB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAE7D,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,CAAC,eAAe,CACd,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE;YACjC,KAAK,EAAE,aAAa;YACpB,MAAM;YACN,KAAK;YACL,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,YAAY;YAClB,MAAM,EAAE,cAAc;SACvB,CAAC,CAAC,CAEH;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC","sourcesContent":["import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';\nimport React from 'react';\nimport { Text as ReactNativeText } from 'react-native';\n\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { resolveHeadingRecipe, resolveHeadingSizeFromLevel } from './resolveHeadingRecipe';\nimport type { HeadingProps } from './types';\n\nfunction resolveHeadingContent({\n children,\n text,\n i18nKey,\n}: {\n children: HeadingProps['children'];\n text: HeadingProps['text'];\n i18nKey: HeadingProps['i18nKey'];\n}): React.ReactNode {\n if (children !== undefined) {\n return children;\n }\n\n if (text !== undefined) {\n return text;\n }\n\n if (!i18nKey) {\n return null;\n }\n\n return i18nKey;\n}\n\nexport function Heading({\n children,\n text,\n i18nKey,\n level = 2,\n size,\n tone = 'default',\n align,\n weight,\n italic = false,\n numberOfLines,\n ellipsizeMode,\n selectable,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'header',\n nativeID,\n testID,\n}: HeadingProps) {\n const { theme } = useZoraTheme();\n const { breakpoint } = useResponsiveRuntime();\n const content = resolveHeadingContent({ children, text, i18nKey });\n const resolvedSize = resolveResponsive(size, breakpoint) ?? resolveHeadingSizeFromLevel(level);\n const resolvedTone = resolveResponsive(tone, breakpoint) ?? 'default';\n const resolvedAlign = resolveResponsive(align, breakpoint);\n const resolvedWeight = resolveResponsive(weight, breakpoint);\n\n if (content === null || content === undefined) {\n return null;\n }\n\n return (\n <ReactNativeText\n accessibilityHint={accessibilityHint}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole={accessibilityRole}\n ellipsizeMode={ellipsizeMode}\n nativeID={nativeID}\n numberOfLines={numberOfLines}\n selectable={selectable}\n testID={testID}\n style={resolveHeadingRecipe(theme, {\n align: resolvedAlign,\n italic,\n level,\n size: resolvedSize,\n tone: resolvedTone,\n weight: resolvedWeight,\n })}\n >\n {content}\n </ReactNativeText>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAkCzC,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,OAAgB,EAChB,IAAgB,EAChB,KAAK,EACL,MAAM,EACN,MAAc,EACd,aAAa,EACb,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,MAAM,GACP,EAAE,SAAS,4BAmCX"}
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AA0BzC,wBAAgB,IAAI,CAAC,EACnB,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,OAAgB,EAChB,IAAgB,EAChB,KAAK,EACL,MAAM,EACN,MAAc,EACd,aAAa,EACb,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,MAAM,GACP,EAAE,SAAS,4BAkCX"}
@@ -1,9 +1,9 @@
1
- import { resolveResponsive, useResponsiveRuntime, useTranslationContext } from '@ankhorage/surface';
1
+ import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';
2
2
  import React from 'react';
3
3
  import { Text as ReactNativeText } from 'react-native';
4
4
  import { useZoraTheme } from '../../theme/useZoraTheme';
5
5
  import { resolveTextStyle } from './resolveTextRecipe';
6
- function resolveTextContent({ children, text, i18nKey, translate, }) {
6
+ function resolveTextContent({ children, text, i18nKey, }) {
7
7
  if (children !== undefined) {
8
8
  return children;
9
9
  }
@@ -13,20 +13,12 @@ function resolveTextContent({ children, text, i18nKey, translate, }) {
13
13
  if (!i18nKey) {
14
14
  return null;
15
15
  }
16
- try {
17
- const translated = translate(i18nKey);
18
- return translated && translated !== i18nKey ? translated : i18nKey;
19
- }
20
- catch (error) {
21
- console.warn('[ZoraText] Translation error:', error);
22
- return i18nKey;
23
- }
16
+ return i18nKey;
24
17
  }
25
18
  export function Text({ children, text, i18nKey, variant = 'body', tone = 'default', align, weight, italic = false, numberOfLines, ellipsizeMode, selectable, accessibilityLabel, accessibilityHint, accessibilityRole, nativeID, testID, }) {
26
19
  const { theme } = useZoraTheme();
27
20
  const { breakpoint } = useResponsiveRuntime();
28
- const { t } = useTranslationContext();
29
- const content = resolveTextContent({ children, text, i18nKey, translate: t });
21
+ const content = resolveTextContent({ children, text, i18nKey });
30
22
  const resolvedVariant = resolveResponsive(variant, breakpoint) ?? 'body';
31
23
  const resolvedStyle = resolveTextStyle({
32
24
  theme,
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/components/text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AACpG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,SAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,SAAS,GAMV;IACC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,UAAU,IAAI,UAAU,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC;IACrE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAC;QACrD,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,EACnB,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,OAAO,GAAG,MAAM,EAChB,IAAI,GAAG,SAAS,EAChB,KAAK,EACL,MAAM,EACN,MAAM,GAAG,KAAK,EACd,aAAa,EACb,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,MAAM,GACI;IACV,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IACjC,MAAM,EAAE,UAAU,EAAE,GAAG,oBAAoB,EAAE,CAAC;IAC9C,MAAM,EAAE,CAAC,EAAE,GAAG,qBAAqB,EAAE,CAAC;IACtC,MAAM,OAAO,GAAG,kBAAkB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;IAC9E,MAAM,eAAe,GAAG,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC;IACzE,MAAM,aAAa,GAAG,gBAAgB,CAAC;QACrC,KAAK;QACL,UAAU;QACV,OAAO,EAAE,eAAe;QACxB,IAAI;QACJ,KAAK;QACL,MAAM;QACN,MAAM;KACP,CAAC,CAAC;IAEH,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,CAAC,eAAe,CACd,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,aAAa,CAAC,CAErB;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC","sourcesContent":["import { resolveResponsive, useResponsiveRuntime, useTranslationContext } from '@ankhorage/surface';\nimport React from 'react';\nimport { Text as ReactNativeText } from 'react-native';\n\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { resolveTextStyle } from './resolveTextRecipe';\nimport type { TextProps } from './types';\n\nfunction resolveTextContent({\n children,\n text,\n i18nKey,\n translate,\n}: {\n children: TextProps['children'];\n text: TextProps['text'];\n i18nKey: TextProps['i18nKey'];\n translate: (key: string) => string;\n}): React.ReactNode {\n if (children !== undefined) {\n return children;\n }\n\n if (text !== undefined) {\n return text;\n }\n\n if (!i18nKey) {\n return null;\n }\n\n try {\n const translated = translate(i18nKey);\n return translated && translated !== i18nKey ? translated : i18nKey;\n } catch (error) {\n console.warn('[ZoraText] Translation error:', error);\n return i18nKey;\n }\n}\n\nexport function Text({\n children,\n text,\n i18nKey,\n variant = 'body',\n tone = 'default',\n align,\n weight,\n italic = false,\n numberOfLines,\n ellipsizeMode,\n selectable,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole,\n nativeID,\n testID,\n}: TextProps) {\n const { theme } = useZoraTheme();\n const { breakpoint } = useResponsiveRuntime();\n const { t } = useTranslationContext();\n const content = resolveTextContent({ children, text, i18nKey, translate: t });\n const resolvedVariant = resolveResponsive(variant, breakpoint) ?? 'body';\n const resolvedStyle = resolveTextStyle({\n theme,\n breakpoint,\n variant: resolvedVariant,\n tone,\n align,\n weight,\n italic,\n });\n\n if (content === null || content === undefined) {\n return null;\n }\n\n return (\n <ReactNativeText\n accessibilityHint={accessibilityHint}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole={accessibilityRole}\n ellipsizeMode={ellipsizeMode}\n nativeID={nativeID}\n numberOfLines={numberOfLines}\n selectable={selectable}\n testID={testID}\n style={resolvedStyle}\n >\n {content}\n </ReactNativeText>\n );\n}\n"]}
1
+ {"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/components/text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,eAAe,EAAE,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CAAC;IACd,CAAC;IAED,OAAO,CACL,CAAC,eAAe,CACd,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,CACvC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,aAAa,CAAC,CAErB;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC","sourcesContent":["import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';\nimport React from 'react';\nimport { Text as ReactNativeText } from 'react-native';\n\nimport { useZoraTheme } from '../../theme/useZoraTheme';\nimport { resolveTextStyle } from './resolveTextRecipe';\nimport type { TextProps } from './types';\n\nfunction resolveTextContent({\n children,\n text,\n i18nKey,\n}: {\n children: TextProps['children'];\n text: TextProps['text'];\n i18nKey: TextProps['i18nKey'];\n}): React.ReactNode {\n if (children !== undefined) {\n return children;\n }\n\n if (text !== undefined) {\n return text;\n }\n\n if (!i18nKey) {\n return null;\n }\n\n return i18nKey;\n}\n\nexport function Text({\n children,\n text,\n i18nKey,\n variant = 'body',\n tone = 'default',\n align,\n weight,\n italic = false,\n numberOfLines,\n ellipsizeMode,\n selectable,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole,\n nativeID,\n testID,\n}: TextProps) {\n const { theme } = useZoraTheme();\n const { breakpoint } = useResponsiveRuntime();\n const content = resolveTextContent({ children, text, i18nKey });\n const resolvedVariant = resolveResponsive(variant, breakpoint) ?? 'body';\n const resolvedStyle = resolveTextStyle({\n theme,\n breakpoint,\n variant: resolvedVariant,\n tone,\n align,\n weight,\n italic,\n });\n\n if (content === null || content === undefined) {\n return null;\n }\n\n return (\n <ReactNativeText\n accessibilityHint={accessibilityHint}\n accessibilityLabel={accessibilityLabel}\n accessibilityRole={accessibilityRole}\n ellipsizeMode={ellipsizeMode}\n nativeID={nativeID}\n numberOfLines={numberOfLines}\n selectable={selectable}\n testID={testID}\n style={resolvedStyle}\n >\n {content}\n </ReactNativeText>\n );\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export type { BoxProps, CenterProps, ContainerProps, DividerProps, GridProps, InlineProps, ShowProps, SpacerProps, StackProps, SurfaceProps, SurfaceVariant, } from '@ankhorage/surface';
2
+ export { Box, Center, Container, Divider, Grid, Inline, Show, Spacer, Stack, Surface, } from '@ankhorage/surface';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/foundation/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,QAAQ,EACR,WAAW,EACX,cAAc,EACd,YAAY,EACZ,SAAS,EACT,WAAW,EACX,SAAS,EACT,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,GACf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,GAAG,EACH,MAAM,EACN,SAAS,EACT,OAAO,EACP,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,MAAM,EACN,KAAK,EACL,OAAO,GACR,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Box, Center, Container, Divider, Grid, Inline, Show, Spacer, Stack, Surface, } from '@ankhorage/surface';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/foundation/index.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,GAAG,EACH,MAAM,EACN,SAAS,EACT,OAAO,EACP,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,MAAM,EACN,KAAK,EACL,OAAO,GACR,MAAM,oBAAoB,CAAC","sourcesContent":["export type {\n BoxProps,\n CenterProps,\n ContainerProps,\n DividerProps,\n GridProps,\n InlineProps,\n ShowProps,\n SpacerProps,\n StackProps,\n SurfaceProps,\n SurfaceVariant,\n} from '@ankhorage/surface';\nexport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from '@ankhorage/surface';\n"]}
package/dist/index.d.ts CHANGED
@@ -32,6 +32,8 @@ export type { TextareaProps } from './components/textarea';
32
32
  export { Textarea } from './components/textarea';
33
33
  export type { ToolbarActionProps, ToolbarProps } from './components/toolbar';
34
34
  export { Toolbar, ToolbarAction } from './components/toolbar';
35
+ export type { BoxProps, CenterProps, ContainerProps, DividerProps, GridProps, InlineProps, ShowProps, SpacerProps, StackProps, SurfaceProps, SurfaceVariant, } from './foundation';
36
+ export { Box, Center, Container, Divider, Grid, Inline, Show, Spacer, Stack, Surface, } from './foundation';
35
37
  export type { AppShellProps } from './layout/app-shell';
36
38
  export { AppShell } from './layout/app-shell';
37
39
  export type { AuthLayoutProps } from './layout/auth-layout';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAChE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,M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AM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,YAAY,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC7D,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -15,6 +15,7 @@ export { Tabs } from './components/tabs';
15
15
  export { Text } from './components/text';
16
16
  export { Textarea } from './components/textarea';
17
17
  export { Toolbar, ToolbarAction } from './components/toolbar';
18
+ export { Box, Center, Container, Divider, Grid, Inline, Show, Spacer, Stack, Surface, } from './foundation';
18
19
  export { AppShell } from './layout/app-shell';
19
20
  export { AuthLayout } from './layout/auth-layout';
20
21
  export { Page } from './layout/page';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OA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MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AActD,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAKtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,SAAS,CAAC","sourcesContent":["export type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './components/checkbox';\nexport { Checkbox, CheckboxGroup } from './components/checkbox';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormFieldValue,\n FormFieldWrapperProps,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './components/form';\nexport {\n Form,\n FormActions,\n FormError,\n FormField,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './components/form';\nexport type {\n HeadingAlign,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingTone,\n HeadingWeight,\n} from './components/heading';\nexport { Heading } from './components/heading';\nexport type { IconProps } from './components/icon';\nexport { Icon } from './components/icon';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { InputProps } from './components/input';\nexport { Input } from './components/input';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';\nexport { Radio, RadioGroup } from './components/radio';\nexport type { SelectOption, SelectProps } from './components/select';\nexport { Select } from './components/select';\nexport type { TabItem, TabsProps } from './components/tabs';\nexport { Tabs } from './components/tabs';\nexport type { TextAlign, TextProps, TextTone, TextVariant, TextWeight } from './components/text';\nexport { Text } from './components/text';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToolbarActionProps, ToolbarProps } from './components/toolbar';\nexport { Toolbar, ToolbarAction } from './components/toolbar';\nexport type { AppShellProps } from './layout/app-shell';\nexport { AppShell } from './layout/app-shell';\nexport type { AuthLayoutProps } from './layout/auth-layout';\nexport { AuthLayout } from './layout/auth-layout';\nexport type { PageProps } from './layout/page';\nexport { Page } from './layout/page';\nexport type { PageHeaderProps } from './layout/page-header';\nexport { PageHeader } from './layout/page-header';\nexport type { PageSectionProps } from './layout/page-section';\nexport { PageSection } from './layout/page-section';\nexport type { SettingsLayoutProps } from './layout/settings-layout';\nexport { SettingsLayout } from './layout/settings-layout';\nexport type { SidebarLayoutProps } from './layout/sidebar-layout';\nexport { SidebarLayout } from './layout/sidebar-layout';\nexport type { TopbarLayoutProps } from './layout/topbar-layout';\nexport { TopbarLayout } from './layout/topbar-layout';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './patterns/auth';\nexport { ForgotPasswordForm, OtpForm, SignInForm, SignUpForm } from './patterns/auth';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './patterns/collection-editor';\nexport { CollectionEditor } from './patterns/collection-editor';\nexport type { ConfirmDialogProps } from './patterns/confirm-dialog';\nexport { ConfirmDialog } from './patterns/confirm-dialog';\nexport type { DisclosureSectionProps } from './patterns/disclosure-section';\nexport { DisclosureSection } from './patterns/disclosure-section';\nexport type { EmptyStateAction, EmptyStateProps } from './patterns/empty-state';\nexport { EmptyState } from './patterns/empty-state';\nexport type { InspectorFieldProps } from './patterns/inspector-field';\nexport { InspectorField } from './patterns/inspector-field';\nexport type { NoticeProps } from './patterns/notice';\nexport { Notice } from './patterns/notice';\nexport type { PanelProps } from './patterns/panel';\nexport { Panel } from './patterns/panel';\nexport type { ResponsivePanelProps } from './patterns/responsive-panel';\nexport { ResponsivePanel } from './patterns/responsive-panel';\nexport type { SectionHeaderProps } from './patterns/section-header';\nexport { SectionHeader } from './patterns/section-header';\nexport type { SettingsRowProps } from './patterns/settings-row';\nexport { SettingsRow } from './patterns/settings-row';\nexport type { SwitchFieldProps } from './patterns/switch-field';\nexport { SwitchField } from './patterns/switch-field';\nexport type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';\nexport { PaletteItem, TileGrid } from './patterns/tile-grid';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';\nexport { TreeItem, TreeView } from './patterns/tree-view';\nexport * from './theme';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAmB7C,OAAO,EACL,IAAI,EACJ,WAAW,EACX,SAAS,EACT,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,aAAa,GACd,MAAM,mBAAmB,CAAC;AAS3B,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAc9D,OAAO,EACL,GAAG,EACH,MAAM,EACN,SAAS,EACT,OAAO,EACP,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,MAAM,EACN,K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CAAC;AAC1D,cAAc,SAAS,CAAC","sourcesContent":["export type { BadgeProps } from './components/badge';\nexport { Badge } from './components/badge';\nexport type { ButtonProps } from './components/button';\nexport { Button } from './components/button';\nexport type { CardProps } from './components/card';\nexport { Card } from './components/card';\nexport type { CheckboxGroupOption, CheckboxGroupProps, CheckboxProps } from './components/checkbox';\nexport { Checkbox, CheckboxGroup } from './components/checkbox';\nexport type { DrawerProps } from './components/drawer';\nexport { Drawer } from './components/drawer';\nexport type {\n FormActionsProps,\n FormErrorProps,\n FormErrors,\n FormFieldConfig,\n FormFieldControlProps,\n FormFieldInputType,\n FormFieldProps,\n FormFieldValue,\n FormFieldWrapperProps,\n FormProps,\n FormValidationErrors,\n FormValidationResult,\n FormValues,\n UseFormControllerOptions,\n UseFormControllerResult,\n ValidationRule,\n} from './components/form';\nexport {\n Form,\n FormActions,\n FormError,\n FormField,\n hasRequiredRule,\n useFormController,\n validateField,\n validateFields,\n validateValue,\n} from './components/form';\nexport type {\n HeadingAlign,\n HeadingLevel,\n HeadingProps,\n HeadingSize,\n HeadingTone,\n HeadingWeight,\n} from './components/heading';\nexport { Heading } from './components/heading';\nexport type { IconProps } from './components/icon';\nexport { Icon } from './components/icon';\nexport type { IconButtonProps } from './components/icon-button';\nexport { IconButton } from './components/icon-button';\nexport type { InputProps } from './components/input';\nexport { Input } from './components/input';\nexport type { ModalProps } from './components/modal';\nexport { Modal } from './components/modal';\nexport type { RadioGroupOption, RadioGroupProps, RadioProps } from './components/radio';\nexport { Radio, RadioGroup } from './components/radio';\nexport type { SelectOption, SelectProps } from './components/select';\nexport { Select } from './components/select';\nexport type { TabItem, TabsProps } from './components/tabs';\nexport { Tabs } from './components/tabs';\nexport type { TextAlign, TextProps, TextTone, TextVariant, TextWeight } from './components/text';\nexport { Text } from './components/text';\nexport type { TextareaProps } from './components/textarea';\nexport { Textarea } from './components/textarea';\nexport type { ToolbarActionProps, ToolbarProps } from './components/toolbar';\nexport { Toolbar, ToolbarAction } from './components/toolbar';\nexport type {\n BoxProps,\n CenterProps,\n ContainerProps,\n DividerProps,\n GridProps,\n InlineProps,\n ShowProps,\n SpacerProps,\n StackProps,\n SurfaceProps,\n SurfaceVariant,\n} from './foundation';\nexport {\n Box,\n Center,\n Container,\n Divider,\n Grid,\n Inline,\n Show,\n Spacer,\n Stack,\n Surface,\n} from './foundation';\nexport type { AppShellProps } from './layout/app-shell';\nexport { AppShell } from './layout/app-shell';\nexport type { AuthLayoutProps } from './layout/auth-layout';\nexport { AuthLayout } from './layout/auth-layout';\nexport type { PageProps } from './layout/page';\nexport { Page } from './layout/page';\nexport type { PageHeaderProps } from './layout/page-header';\nexport { PageHeader } from './layout/page-header';\nexport type { PageSectionProps } from './layout/page-section';\nexport { PageSection } from './layout/page-section';\nexport type { SettingsLayoutProps } from './layout/settings-layout';\nexport { SettingsLayout } from './layout/settings-layout';\nexport type { SidebarLayoutProps } from './layout/sidebar-layout';\nexport { SidebarLayout } from './layout/sidebar-layout';\nexport type { TopbarLayoutProps } from './layout/topbar-layout';\nexport { TopbarLayout } from './layout/topbar-layout';\nexport type {\n AuthFormBaseProps,\n AuthIdentifierKind,\n ForgotPasswordFormProps,\n ForgotPasswordFormValues,\n OtpFormProps,\n OtpFormValues,\n SignInFormProps,\n SignInFormValues,\n SignUpFormField,\n SignUpFormProps,\n SignUpFormValues,\n} from './patterns/auth';\nexport { ForgotPasswordForm, OtpForm, SignInForm, SignUpForm } from './patterns/auth';\nexport type {\n CollectionEditorProps,\n CollectionEditorRenderItemProps,\n} from './patterns/collection-editor';\nexport { CollectionEditor } from './patterns/collection-editor';\nexport type { ConfirmDialogProps } from './patterns/confirm-dialog';\nexport { ConfirmDialog } from './patterns/confirm-dialog';\nexport type { DisclosureSectionProps } from './patterns/disclosure-section';\nexport { DisclosureSection } from './patterns/disclosure-section';\nexport type { EmptyStateAction, EmptyStateProps } from './patterns/empty-state';\nexport { EmptyState } from './patterns/empty-state';\nexport type { InspectorFieldProps } from './patterns/inspector-field';\nexport { InspectorField } from './patterns/inspector-field';\nexport type { NoticeProps } from './patterns/notice';\nexport { Notice } from './patterns/notice';\nexport type { PanelProps } from './patterns/panel';\nexport { Panel } from './patterns/panel';\nexport type { ResponsivePanelProps } from './patterns/responsive-panel';\nexport { ResponsivePanel } from './patterns/responsive-panel';\nexport type { SectionHeaderProps } from './patterns/section-header';\nexport { SectionHeader } from './patterns/section-header';\nexport type { SettingsRowProps } from './patterns/settings-row';\nexport { SettingsRow } from './patterns/settings-row';\nexport type { SwitchFieldProps } from './patterns/switch-field';\nexport { SwitchField } from './patterns/switch-field';\nexport type { PaletteItemProps, TileGridProps } from './patterns/tile-grid';\nexport { PaletteItem, TileGrid } from './patterns/tile-grid';\nexport type { TreeItemNode, TreeItemRenderProps, TreeViewProps } from './patterns/tree-view';\nexport { TreeItem, TreeView } from './patterns/tree-view';\nexport * from './theme';\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ankhorage/zora",
3
3
  "type": "module",
4
- "version": "0.7.0",
4
+ "version": "0.8.1",
5
5
  "description": "Opinionated React Native and React Native Web UI kit built on @ankhorage/surface.",
6
6
  "homepage": "https://github.com/ankhorage/zora#readme",
7
7
  "bugs": {
@@ -0,0 +1,23 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+
4
+ import { describe, expect, it } from 'bun:test';
5
+
6
+ const textSource = readFileSync(join(import.meta.dir, 'text', 'Text.tsx'), 'utf8');
7
+ const headingSource = readFileSync(join(import.meta.dir, 'heading', 'Heading.tsx'), 'utf8');
8
+
9
+ describe('content fallback ownership', () => {
10
+ it('keeps Text free of translation context coupling', () => {
11
+ expect(textSource).not.toMatch(/useTranslationContext/);
12
+ expect(textSource).toMatch(/if \(children !== undefined\) \{/);
13
+ expect(textSource).toMatch(/if \(text !== undefined\) \{/);
14
+ expect(textSource).toMatch(/return i18nKey;/);
15
+ });
16
+
17
+ it('keeps Heading free of translation context coupling', () => {
18
+ expect(headingSource).not.toMatch(/useTranslationContext/);
19
+ expect(headingSource).toMatch(/if \(children !== undefined\) \{/);
20
+ expect(headingSource).toMatch(/if \(text !== undefined\) \{/);
21
+ expect(headingSource).toMatch(/return i18nKey;/);
22
+ });
23
+ });
@@ -1,4 +1,4 @@
1
- import { resolveResponsive, useResponsiveRuntime, useTranslationContext } from '@ankhorage/surface';
1
+ import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';
2
2
  import React from 'react';
3
3
  import { Text as ReactNativeText } from 'react-native';
4
4
 
@@ -10,12 +10,10 @@ function resolveHeadingContent({
10
10
  children,
11
11
  text,
12
12
  i18nKey,
13
- translate,
14
13
  }: {
15
14
  children: HeadingProps['children'];
16
15
  text: HeadingProps['text'];
17
16
  i18nKey: HeadingProps['i18nKey'];
18
- translate: (key: string) => string;
19
17
  }): React.ReactNode {
20
18
  if (children !== undefined) {
21
19
  return children;
@@ -29,13 +27,7 @@ function resolveHeadingContent({
29
27
  return null;
30
28
  }
31
29
 
32
- try {
33
- const translated = translate(i18nKey);
34
- return translated && translated !== i18nKey ? translated : i18nKey;
35
- } catch (error) {
36
- console.warn('[ZoraHeading] Translation error:', error);
37
- return i18nKey;
38
- }
30
+ return i18nKey;
39
31
  }
40
32
 
41
33
  export function Heading({
@@ -59,8 +51,7 @@ export function Heading({
59
51
  }: HeadingProps) {
60
52
  const { theme } = useZoraTheme();
61
53
  const { breakpoint } = useResponsiveRuntime();
62
- const { t } = useTranslationContext();
63
- const content = resolveHeadingContent({ children, text, i18nKey, translate: t });
54
+ const content = resolveHeadingContent({ children, text, i18nKey });
64
55
  const resolvedSize = resolveResponsive(size, breakpoint) ?? resolveHeadingSizeFromLevel(level);
65
56
  const resolvedTone = resolveResponsive(tone, breakpoint) ?? 'default';
66
57
  const resolvedAlign = resolveResponsive(align, breakpoint);
@@ -1,4 +1,4 @@
1
- import { resolveResponsive, useResponsiveRuntime, useTranslationContext } from '@ankhorage/surface';
1
+ import { resolveResponsive, useResponsiveRuntime } from '@ankhorage/surface';
2
2
  import React from 'react';
3
3
  import { Text as ReactNativeText } from 'react-native';
4
4
 
@@ -10,12 +10,10 @@ function resolveTextContent({
10
10
  children,
11
11
  text,
12
12
  i18nKey,
13
- translate,
14
13
  }: {
15
14
  children: TextProps['children'];
16
15
  text: TextProps['text'];
17
16
  i18nKey: TextProps['i18nKey'];
18
- translate: (key: string) => string;
19
17
  }): React.ReactNode {
20
18
  if (children !== undefined) {
21
19
  return children;
@@ -29,13 +27,7 @@ function resolveTextContent({
29
27
  return null;
30
28
  }
31
29
 
32
- try {
33
- const translated = translate(i18nKey);
34
- return translated && translated !== i18nKey ? translated : i18nKey;
35
- } catch (error) {
36
- console.warn('[ZoraText] Translation error:', error);
37
- return i18nKey;
38
- }
30
+ return i18nKey;
39
31
  }
40
32
 
41
33
  export function Text({
@@ -58,8 +50,7 @@ export function Text({
58
50
  }: TextProps) {
59
51
  const { theme } = useZoraTheme();
60
52
  const { breakpoint } = useResponsiveRuntime();
61
- const { t } = useTranslationContext();
62
- const content = resolveTextContent({ children, text, i18nKey, translate: t });
53
+ const content = resolveTextContent({ children, text, i18nKey });
63
54
  const resolvedVariant = resolveResponsive(variant, breakpoint) ?? 'body';
64
55
  const resolvedStyle = resolveTextStyle({
65
56
  theme,
@@ -0,0 +1,35 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+
4
+ import { describe, expect, it } from 'bun:test';
5
+
6
+ const foundationIndex = readFileSync(join(import.meta.dir, 'index.ts'), 'utf8');
7
+ const rootIndex = readFileSync(join(import.meta.dir, '..', 'index.ts'), 'utf8');
8
+
9
+ describe('foundation exports', () => {
10
+ it('defines a narrow Surface foundation export layer', () => {
11
+ expect(foundationIndex).toMatch(/export type \{/);
12
+ expect(foundationIndex).toMatch(/BoxProps/);
13
+ expect(foundationIndex).toMatch(/ContainerProps/);
14
+ expect(foundationIndex).toMatch(/GridProps/);
15
+ expect(foundationIndex).toMatch(/StackProps/);
16
+ expect(foundationIndex).toMatch(/SurfaceProps/);
17
+ expect(foundationIndex).toMatch(/export \{/);
18
+ expect(foundationIndex).toMatch(/Box/);
19
+ expect(foundationIndex).toMatch(/Container/);
20
+ expect(foundationIndex).toMatch(/Grid/);
21
+ expect(foundationIndex).toMatch(/Stack/);
22
+ expect(foundationIndex).toMatch(/Surface/);
23
+ expect(foundationIndex).not.toMatch(/Heading/);
24
+ expect(foundationIndex).not.toMatch(/Text/);
25
+ expect(foundationIndex).not.toMatch(/ThemeProvider/);
26
+ expect(foundationIndex).not.toMatch(/ResponsiveProvider/);
27
+ expect(foundationIndex).not.toMatch(/useTheme/);
28
+ expect(foundationIndex).not.toMatch(/useResponsiveRuntime/);
29
+ expect(foundationIndex).not.toMatch(/resolveResponsive/);
30
+ });
31
+
32
+ it('re-exports the foundation layer from the ZORA root entrypoint', () => {
33
+ expect(rootIndex).toMatch(/from '\.\/foundation';/);
34
+ });
35
+ });
@@ -0,0 +1,25 @@
1
+ export type {
2
+ BoxProps,
3
+ CenterProps,
4
+ ContainerProps,
5
+ DividerProps,
6
+ GridProps,
7
+ InlineProps,
8
+ ShowProps,
9
+ SpacerProps,
10
+ StackProps,
11
+ SurfaceProps,
12
+ SurfaceVariant,
13
+ } from '@ankhorage/surface';
14
+ export {
15
+ Box,
16
+ Center,
17
+ Container,
18
+ Divider,
19
+ Grid,
20
+ Inline,
21
+ Show,
22
+ Spacer,
23
+ Stack,
24
+ Surface,
25
+ } from '@ankhorage/surface';
package/src/index.ts CHANGED
@@ -66,6 +66,31 @@ export type { TextareaProps } from './components/textarea';
66
66
  export { Textarea } from './components/textarea';
67
67
  export type { ToolbarActionProps, ToolbarProps } from './components/toolbar';
68
68
  export { Toolbar, ToolbarAction } from './components/toolbar';
69
+ export type {
70
+ BoxProps,
71
+ CenterProps,
72
+ ContainerProps,
73
+ DividerProps,
74
+ GridProps,
75
+ InlineProps,
76
+ ShowProps,
77
+ SpacerProps,
78
+ StackProps,
79
+ SurfaceProps,
80
+ SurfaceVariant,
81
+ } from './foundation';
82
+ export {
83
+ Box,
84
+ Center,
85
+ Container,
86
+ Divider,
87
+ Grid,
88
+ Inline,
89
+ Show,
90
+ Spacer,
91
+ Stack,
92
+ Surface,
93
+ } from './foundation';
69
94
  export type { AppShellProps } from './layout/app-shell';
70
95
  export { AppShell } from './layout/app-shell';
71
96
  export type { AuthLayoutProps } from './layout/auth-layout';