@ankhorage/zora 0.2.2 → 0.3.2

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,23 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 5348764: Sort imports
8
+
9
+ ## 0.3.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 798dc20: Add missing useZoraTheme file
14
+
15
+ ## 0.3.0
16
+
17
+ ### Minor Changes
18
+
19
+ - 961422e: Export Icon component to public API
20
+
3
21
  ## 0.2.2
4
22
 
5
23
  ### Patch Changes
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # zora
1
+ # ZORA
2
2
 
3
3
  <!-- markdownlint-disable MD013 MD033 -->
4
4
 
@@ -29,18 +29,35 @@ Wrap your app in `ZoraProvider`, then import components from
29
29
 
30
30
  ```tsx
31
31
  import React from 'react';
32
- import { Button, Card, Page, PageHeader, ZoraProvider } from '@ankhorage/zora';
32
+ import {
33
+ AppShell,
34
+ Button,
35
+ Card,
36
+ Page,
37
+ PageHeader,
38
+ Toolbar,
39
+ ToolbarAction,
40
+ ZoraProvider,
41
+ } from '@ankhorage/zora';
33
42
 
34
43
  export function App() {
35
44
  return (
36
45
  <ZoraProvider>
37
- <Page header={<PageHeader title="Dashboard" description="Ready to build." />}>
38
- <Card
39
- actions={<Button>Continue</Button>}
40
- description="ZORA provides composed UI surfaces for apps."
41
- title="Welcome"
42
- />
43
- </Page>
46
+ <AppShell
47
+ topbar={
48
+ <Toolbar position="inline">
49
+ <ToolbarAction icon={{ name: 'menu-outline' }} label="Menu" />
50
+ </Toolbar>
51
+ }
52
+ >
53
+ <Page header={<PageHeader title="Dashboard" description="Ready to build." />}>
54
+ <Card
55
+ actions={<Button>Continue</Button>}
56
+ description="ZORA provides composed UI surfaces for apps."
57
+ title="Welcome"
58
+ />
59
+ </Page>
60
+ </AppShell>
44
61
  </ZoraProvider>
45
62
  );
46
63
  }
@@ -408,6 +425,35 @@ Picks these Surface `DrawerProps`: `closeOnBackdrop`, `onDismiss`, `position`,
408
425
 
409
426
  ## Layouts
410
427
 
428
+ ### `AppShell`
429
+
430
+ Theme-aware application root shell with optional topbar and full-height content
431
+ area. Use it as the outer app chrome inside `ZoraProvider`.
432
+
433
+ ```tsx
434
+ <AppShell topbar={<Toolbar position="inline">{actions}</Toolbar>}>
435
+ <Page header={<PageHeader title="Dashboard" />}>{content}</Page>
436
+ </AppShell>
437
+ ```
438
+
439
+ <details>
440
+ <summary>Props</summary>
441
+
442
+ ZORA props:
443
+
444
+ | Prop | Type | Default | Notes |
445
+ | --- | --- | --- | --- |
446
+ | `children` | `React.ReactNode` | - | Main app content. |
447
+ | `topbar` | `React.ReactNode` | - | Optional top app bar rendered above content. |
448
+ | `testID` | `string` | - | Forwarded to the root Surface background container. |
449
+
450
+ Inherited props:
451
+
452
+ No inherited props. `AppShellProps` is declared directly by ZORA.
453
+
454
+ </details>
455
+
456
+
411
457
  ### `Page`
412
458
 
413
459
  Constrained page container with optional header and footer slots.
@@ -1114,8 +1160,11 @@ const zoraTheme: ThemeConfig = {
1114
1160
 
1115
1161
  ## Public Exports
1116
1162
 
1163
+ Add `AppShell` to the public exports:
1164
+
1117
1165
  ```ts
1118
1166
  export {
1167
+ AppShell,
1119
1168
  AuthLayout,
1120
1169
  Badge,
1121
1170
  Button,
@@ -1154,8 +1203,11 @@ export {
1154
1203
  ZoraProvider,
1155
1204
  zoraTheme,
1156
1205
  };
1206
+ ```
1157
1207
 
1208
+ ```ts
1158
1209
  export type {
1210
+ AppShellProps,
1159
1211
  AuthLayoutProps,
1160
1212
  BadgeProps,
1161
1213
  ButtonProps,
@@ -1198,15 +1250,16 @@ export type {
1198
1250
 
1199
1251
  ## Example App
1200
1252
 
1201
- A complete Expo showcase lives in `examples/expo-showcase`. It renders every
1202
- current ZORA component, pattern, layout, and theme entry point on one screen.
1253
+ A complete Expo showcase lives in `examples/expo-showcase`. It renders the
1254
+ current ZORA components, layouts, patterns, and theme entry points, including
1255
+ light/dark mode through `AppShell`.
1203
1256
 
1204
1257
  Run it locally:
1205
1258
 
1206
1259
  ```bash
1207
1260
  cd examples/expo-showcase
1208
- npm install
1209
- npm run web
1261
+ bun install
1262
+ bun run web
1210
1263
  ```
1211
1264
 
1212
1265
  The example imports `@ankhorage/zora` and demonstrates the package API in
@@ -0,0 +1,3 @@
1
+ export type { ButtonIconSpec, IconProps } from '@ankhorage/surface';
2
+ export { Icon } from '@ankhorage/surface';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/icon/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Icon } from '@ankhorage/surface';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/icon/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export type { ZoraThemeOverride } from './createZoraTheme';
2
2
  export { createZoraTheme } from './createZoraTheme';
3
+ export { useZoraTheme } from './useZoraTheme';
3
4
  export type { ZoraProviderProps } from './ZoraProvider';
4
5
  export { ZoraProvider } from './ZoraProvider';
5
6
  export { zoraTheme } from './zoraTheme';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export { createZoraTheme } from './createZoraTheme';
2
+ export { useZoraTheme } from './useZoraTheme';
2
3
  export { ZoraProvider } from './ZoraProvider';
3
4
  export { zoraTheme } from './zoraTheme';
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare function useZoraTheme(): {
2
+ theme: import("@ankhorage/surface").AnkhTheme;
3
+ mode: "light" | "dark";
4
+ setThemeConfig: (config: Partial<import("@ankhorage/contracts").ThemeConfig>) => void;
5
+ setMode: (mode: "light" | "dark") => void;
6
+ _hasProvider?: boolean;
7
+ };
8
+ //# sourceMappingURL=useZoraTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useZoraTheme.d.ts","sourceRoot":"","sources":["../../src/theme/useZoraTheme.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY;;;;;;EAE3B"}
@@ -0,0 +1,5 @@
1
+ import { useTheme } from '@ankhorage/surface';
2
+ export function useZoraTheme() {
3
+ return useTheme();
4
+ }
5
+ //# sourceMappingURL=useZoraTheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useZoraTheme.js","sourceRoot":"","sources":["../../src/theme/useZoraTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,MAAM,UAAU,YAAY;IAC1B,OAAO,QAAQ,EAAE,CAAC;AACpB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ankhorage/zora",
3
3
  "type": "module",
4
- "version": "0.2.2",
4
+ "version": "0.3.2",
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": {