@ankhorage/contracts 0.0.3 → 0.0.4

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 (2) hide show
  1. package/README.md +13 -85
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,92 +1,20 @@
1
- # @ankhorage/contracts
1
+ # contracts
2
2
 
3
- Serializable app, action, and theme-config contracts for the Ankhorage ecosystem.
3
+ Shared type definitions for applications.
4
4
 
5
- ## Scope
5
+ ## 🎯 What you get
6
+ - Strongly typed app structures
7
+ - Clear contracts between systems
6
8
 
7
- This package owns the serializable shapes shared across Ankhorage packages and generated
8
- apps:
9
-
10
- - app manifest contracts
11
- - screen and navigator schema
12
- - action contracts
13
- - theme configuration contracts
14
- - infra and auth configuration contracts
15
-
16
- It does not own rendering behavior, runtime action execution, Studio authoring behavior,
17
- or project generation.
18
-
19
- ## Installation
20
-
21
- ```sh
22
- bun add @ankhorage/contracts
23
- ```
24
-
25
- ## Usage
9
+ ## Features
10
+ - Serializable schemas
11
+ - App manifests
12
+ - UI definitions
26
13
 
14
+ ## 📦 Usage
27
15
  ```ts
28
- import type { AppManifest, ThemeConfig, UiNode } from '@ankhorage/contracts';
29
-
30
- const theme: ThemeConfig = {
31
- id: 'default',
32
- name: 'Default',
33
- light: {
34
- primaryColor: '#3366ff',
35
- harmony: 'analogous',
36
- systemTone: 'neutral',
37
- },
38
- dark: {
39
- primaryColor: '#3366ff',
40
- harmony: 'analogous',
41
- systemTone: 'neutral',
42
- },
43
- };
44
-
45
- const root: UiNode = {
46
- id: 'root',
47
- type: 'Container',
48
- };
49
-
50
- const manifest: AppManifest = {
51
- metadata: {
52
- name: 'Example',
53
- slug: 'example',
54
- version: '1.0.0',
55
- themeId: theme.id,
56
- },
57
- themes: [theme],
58
- activeThemeId: theme.id,
59
- infra: {
60
- plugins: [],
61
- },
62
- navigator: {
63
- type: 'stack',
64
- routes: [],
65
- },
66
- screens: {
67
- home: {
68
- id: 'home',
69
- name: 'home',
70
- root,
71
- },
72
- },
73
- settings: {
74
- localization: {
75
- defaultLocale: 'en',
76
- locales: ['en'],
77
- },
78
- authFlow: {
79
- loginRoute: '/login',
80
- unauthorizedRoute: '/login',
81
- postLoginRoute: '/',
82
- },
83
- },
84
- };
16
+ import { AppManifest } from '@ankhorage/contracts'
85
17
  ```
86
18
 
87
- ## Non-Goals
88
-
89
- - runtime rendering
90
- - Studio authoring behavior
91
- - Expo or React Native UI primitives
92
- - CLI project generation
19
+ ## 🧠 Why this exists
20
+ Separates data contracts from implementation.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ankhorage/contracts",
3
3
  "type": "module",
4
- "version": "0.0.3",
4
+ "version": "0.0.4",
5
5
  "description": "Serializable app, action, and theme config contracts for Ankhorage.",
6
6
  "main": "./dist/index.js",
7
7
  "sideEffects": false,