@contractspec/lib.presentation-runtime-react-native 34.0.5 → 35.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.
- package/README.md +41 -43
- package/dist/browser/index.js +12 -2
- package/dist/browser/useContractTable.js +3 -0
- package/dist/browser/useDataViewTable.js +3 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +12 -2
- package/dist/useContractTable.d.ts +1 -0
- package/dist/useContractTable.js +4 -0
- package/dist/useDataViewTable.d.ts +1 -0
- package/dist/useDataViewTable.js +4 -0
- package/package.json +33 -7
package/README.md
CHANGED
|
@@ -1,66 +1,64 @@
|
|
|
1
1
|
# @contractspec/lib.presentation-runtime-react-native
|
|
2
2
|
|
|
3
|
-
Website: https://contractspec.io
|
|
3
|
+
Website: https://contractspec.io
|
|
4
4
|
|
|
5
|
+
**React Native presentation runtime for mobile apps.**
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
## What It Provides
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
- **Layer**: lib.
|
|
10
|
+
- **Consumers**: mobile apps.
|
|
11
|
+
- Related ContractSpec packages include `@contractspec/lib.presentation-runtime-core`, `@contractspec/lib.presentation-runtime-react`, `@contractspec/lib.ui-kit`, `@contractspec/tool.bun`.
|
|
12
|
+
- Related ContractSpec packages include `@contractspec/lib.presentation-runtime-core`, `@contractspec/lib.presentation-runtime-react`, `@contractspec/lib.ui-kit`, `@contractspec/tool.bun`.
|
|
11
13
|
|
|
12
14
|
## Installation
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
npm install @contractspec/lib.presentation-runtime-react-native
|
|
16
|
-
# or
|
|
17
|
-
bun add @contractspec/lib.presentation-runtime-react-native
|
|
18
|
-
```
|
|
16
|
+
`npm install @contractspec/lib.presentation-runtime-react-native`
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
or
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
- **Universal**: API parity with `@contractspec/lib.presentation-runtime-react` where possible.
|
|
20
|
+
`bun add @contractspec/lib.presentation-runtime-react-native`
|
|
24
21
|
|
|
25
22
|
## Usage
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```tsx
|
|
30
|
-
import { useWorkflow } from '@contractspec/lib.presentation-runtime-react-native';
|
|
31
|
-
// ... usage
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
24
|
+
Import the root entrypoint from `@contractspec/lib.presentation-runtime-react-native`, or choose a documented subpath when you only need one part of the package surface.
|
|
57
25
|
|
|
26
|
+
## Architecture
|
|
58
27
|
|
|
28
|
+
- `src/index.ts` is the root public barrel and package entrypoint.
|
|
29
|
+
- `src/nativewind-env.d.ts` is part of the package's public or composition surface.
|
|
30
|
+
- `src/useContractTable.ts` is part of the package's public or composition surface.
|
|
31
|
+
- `src/useDataViewTable.ts` is part of the package's public or composition surface.
|
|
59
32
|
|
|
33
|
+
## Public Entry Points
|
|
60
34
|
|
|
35
|
+
- Export `.` resolves through `./src/index.ts`.
|
|
36
|
+
- Export `./nativewind-env.d` resolves through `./src/nativewind-env.d.ts`.
|
|
37
|
+
- Export `./useContractTable` resolves through `./src/useContractTable.ts`.
|
|
38
|
+
- Export `./useDataViewTable` resolves through `./src/useDataViewTable.ts`.
|
|
61
39
|
|
|
40
|
+
## Local Commands
|
|
62
41
|
|
|
42
|
+
- `bun run dev` — contractspec-bun-build dev
|
|
43
|
+
- `bun run build` — bun run prebuild && bun run build:bundle && bun run build:types
|
|
44
|
+
- `bun run lint` — bun run lint:fix
|
|
45
|
+
- `bun run lint:check` — biome check .
|
|
46
|
+
- `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
|
|
47
|
+
- `bun run typecheck` — tsc --noEmit -p tsconfig.json
|
|
48
|
+
- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose
|
|
49
|
+
- `bun run publish:pkg:canary` — bun publish:pkg --tag canary
|
|
50
|
+
- `bun run clean` — rimraf dist .turbo
|
|
51
|
+
- `bun run build:bundle` — contractspec-bun-build transpile
|
|
52
|
+
- `bun run build:types` — contractspec-bun-build types
|
|
53
|
+
- `bun run prebuild` — contractspec-bun-build prebuild
|
|
63
54
|
|
|
55
|
+
## Recent Updates
|
|
64
56
|
|
|
57
|
+
- Replace eslint+prettier by biomejs to optimize speed.
|
|
58
|
+
- Add table capabilities.
|
|
65
59
|
|
|
60
|
+
## Notes
|
|
66
61
|
|
|
62
|
+
- Must stay compatible with presentation-runtime-core; do not diverge from the shared interface.
|
|
63
|
+
- NativeWind integration is platform-specific — changes must be tested on actual devices/simulators.
|
|
64
|
+
- Avoid web-only APIs; all code must run in React Native's JavaScript environment.
|
package/dist/browser/index.js
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
useForm
|
|
5
|
+
} from "react-hook-form";
|
|
6
|
+
import {
|
|
7
|
+
useContractTable
|
|
8
|
+
} from "@contractspec/lib.presentation-runtime-react/useContractTable";
|
|
9
|
+
import {
|
|
10
|
+
useDataViewTable
|
|
11
|
+
} from "@contractspec/lib.presentation-runtime-react/useDataViewTable";
|
|
4
12
|
function usePresentationController({
|
|
5
13
|
defaults,
|
|
6
14
|
form: formOpts,
|
|
@@ -104,5 +112,7 @@ function useListCoordinator({
|
|
|
104
112
|
}
|
|
105
113
|
export {
|
|
106
114
|
usePresentationController,
|
|
107
|
-
useListCoordinator
|
|
115
|
+
useListCoordinator,
|
|
116
|
+
useDataViewTable,
|
|
117
|
+
useContractTable
|
|
108
118
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { DefaultValues, Resolver, UseFormReturn } from 'react-hook-form';
|
|
3
1
|
import type { ListFetcher, ListState } from '@contractspec/lib.presentation-runtime-core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { type DefaultValues, type Resolver, type UseFormReturn } from 'react-hook-form';
|
|
4
4
|
export interface UsePresentationControllerOpts<TFilters extends Record<string, unknown>, TVars, TItem> {
|
|
5
5
|
defaults: ListState<TFilters>;
|
|
6
6
|
form: {
|
|
@@ -90,3 +90,5 @@ export declare function useListCoordinator<TFilters extends Record<string, unkno
|
|
|
90
90
|
readonly submitFilters: (e?: React.BaseSyntheticEvent) => Promise<void>;
|
|
91
91
|
readonly clearAll: () => void;
|
|
92
92
|
};
|
|
93
|
+
export { type ContractTableColumnDef, type ContractTableController, type UseContractTableOptions, useContractTable, } from '@contractspec/lib.presentation-runtime-react/useContractTable';
|
|
94
|
+
export { type UseDataViewTableOptions, useDataViewTable, } from '@contractspec/lib.presentation-runtime-react/useDataViewTable';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// src/index.ts
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
useForm
|
|
6
|
+
} from "react-hook-form";
|
|
7
|
+
import {
|
|
8
|
+
useContractTable
|
|
9
|
+
} from "@contractspec/lib.presentation-runtime-react/useContractTable";
|
|
10
|
+
import {
|
|
11
|
+
useDataViewTable
|
|
12
|
+
} from "@contractspec/lib.presentation-runtime-react/useDataViewTable";
|
|
5
13
|
function usePresentationController({
|
|
6
14
|
defaults,
|
|
7
15
|
form: formOpts,
|
|
@@ -105,5 +113,7 @@ function useListCoordinator({
|
|
|
105
113
|
}
|
|
106
114
|
export {
|
|
107
115
|
usePresentationController,
|
|
108
|
-
useListCoordinator
|
|
116
|
+
useListCoordinator,
|
|
117
|
+
useDataViewTable,
|
|
118
|
+
useContractTable
|
|
109
119
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type ContractTableColumnDef, type ContractTableController, type UseContractTableOptions, useContractTable, } from '@contractspec/lib.presentation-runtime-react/useContractTable';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type UseDataViewTableOptions, useDataViewTable, } from '@contractspec/lib.presentation-runtime-react/useDataViewTable';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/lib.presentation-runtime-react-native",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "35.0.0",
|
|
4
4
|
"description": "React Native presentation runtime for mobile apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contractspec",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"build:types": "contractspec-bun-build types",
|
|
23
23
|
"dev": "contractspec-bun-build dev",
|
|
24
24
|
"lint": "bun run lint:fix",
|
|
25
|
-
"lint:fix": "
|
|
26
|
-
"lint:check": "
|
|
25
|
+
"lint:fix": "biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .",
|
|
26
|
+
"lint:check": "biome check .",
|
|
27
27
|
"prebuild": "contractspec-bun-build prebuild",
|
|
28
28
|
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
29
29
|
},
|
|
@@ -32,11 +32,13 @@
|
|
|
32
32
|
"react-native": "*",
|
|
33
33
|
"react-hook-form": "^7.70.0",
|
|
34
34
|
"zod": "^4.3.5",
|
|
35
|
-
"@contractspec/lib.presentation-runtime-core": "3.
|
|
35
|
+
"@contractspec/lib.presentation-runtime-core": "3.8.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"@contractspec/lib.
|
|
38
|
+
"@tanstack/react-table": "^8.21.3",
|
|
39
|
+
"@contractspec/lib.presentation-runtime-react": "35.0.0",
|
|
40
|
+
"@contractspec/lib.presentation-runtime-core": "3.8.0",
|
|
41
|
+
"@contractspec/lib.ui-kit": "3.8.0"
|
|
40
42
|
},
|
|
41
43
|
"files": [
|
|
42
44
|
"dist",
|
|
@@ -54,6 +56,18 @@
|
|
|
54
56
|
"browser": "./dist/browser/nativewind-env.d.js",
|
|
55
57
|
"bun": "./dist/nativewind-env.d.js",
|
|
56
58
|
"default": "./dist/nativewind-env.d.js"
|
|
59
|
+
},
|
|
60
|
+
"./useContractTable": {
|
|
61
|
+
"types": "./dist/useContractTable.d.ts",
|
|
62
|
+
"browser": "./dist/browser/useContractTable.js",
|
|
63
|
+
"bun": "./dist/useContractTable.js",
|
|
64
|
+
"default": "./dist/useContractTable.js"
|
|
65
|
+
},
|
|
66
|
+
"./useDataViewTable": {
|
|
67
|
+
"types": "./dist/useDataViewTable.d.ts",
|
|
68
|
+
"browser": "./dist/browser/useDataViewTable.js",
|
|
69
|
+
"bun": "./dist/useDataViewTable.js",
|
|
70
|
+
"default": "./dist/useDataViewTable.js"
|
|
57
71
|
}
|
|
58
72
|
},
|
|
59
73
|
"publishConfig": {
|
|
@@ -70,6 +84,18 @@
|
|
|
70
84
|
"browser": "./dist/browser/nativewind-env.d.js",
|
|
71
85
|
"bun": "./dist/nativewind-env.d.js",
|
|
72
86
|
"default": "./dist/nativewind-env.d.js"
|
|
87
|
+
},
|
|
88
|
+
"./useContractTable": {
|
|
89
|
+
"types": "./dist/useContractTable.d.ts",
|
|
90
|
+
"browser": "./dist/browser/useContractTable.js",
|
|
91
|
+
"bun": "./dist/useContractTable.js",
|
|
92
|
+
"default": "./dist/useContractTable.js"
|
|
93
|
+
},
|
|
94
|
+
"./useDataViewTable": {
|
|
95
|
+
"types": "./dist/useDataViewTable.d.ts",
|
|
96
|
+
"browser": "./dist/browser/useDataViewTable.js",
|
|
97
|
+
"bun": "./dist/useDataViewTable.js",
|
|
98
|
+
"default": "./dist/useDataViewTable.js"
|
|
73
99
|
}
|
|
74
100
|
},
|
|
75
101
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -83,6 +109,6 @@
|
|
|
83
109
|
"homepage": "https://contractspec.io",
|
|
84
110
|
"devDependencies": {
|
|
85
111
|
"react-native-css": "^3.0.4",
|
|
86
|
-
"@contractspec/tool.bun": "3.7.
|
|
112
|
+
"@contractspec/tool.bun": "3.7.6"
|
|
87
113
|
}
|
|
88
114
|
}
|