@azx-pbc/axiom 0.0.0-stage → 0.0.6
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/LICENSE +21 -0
- package/README.md +76 -2
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AZX, PBC. Open Source
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,77 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@azx-pbc/axiom`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The headless React bindings and the runtime value contract under one import, so a host writes a
|
|
4
|
+
schema and a submit handler.
|
|
5
|
+
|
|
6
|
+
```sh
|
|
7
|
+
pnpm add @azx-pbc/axiom react
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
import { FormProvider, useField } from '@azx-pbc/axiom';
|
|
12
|
+
import type { CompiledSchema, WireRecord } from '@azx-pbc/axiom';
|
|
13
|
+
|
|
14
|
+
function Note() {
|
|
15
|
+
const note = useField('f_note');
|
|
16
|
+
return (
|
|
17
|
+
<input
|
|
18
|
+
id={note.a11y.controlId}
|
|
19
|
+
value={note.text}
|
|
20
|
+
readOnly={!note.mayWrite}
|
|
21
|
+
onChange={(event) => note.setValue(event.currentTarget.value)}
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function Page({ compiled, record }: { compiled: CompiledSchema; record: WireRecord }) {
|
|
27
|
+
return (
|
|
28
|
+
<FormProvider compiled={compiled} initialValues={record}>
|
|
29
|
+
<Note />
|
|
30
|
+
</FormProvider>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## What this package is
|
|
36
|
+
|
|
37
|
+
It is **level 4** of the [adoption ladder](https://github.com/AZX-PBC-OSS/axiom/blob/main/docs/architecture/adoption-ladder.md): the default
|
|
38
|
+
choice for a host that wants Axiom's bindings and value contract without choosing a renderer per
|
|
39
|
+
field. It owns no behaviour of its own; every symbol is re-exported from one of the two packages
|
|
40
|
+
below it.
|
|
41
|
+
|
|
42
|
+
| Door | What it publishes |
|
|
43
|
+
| ---------------- | ----------------------------------------------------------------------- |
|
|
44
|
+
| `.` | `@azx-pbc/axiom-react` and `@azx-pbc/axiom-runtime` under one ESM entry |
|
|
45
|
+
| `./package.json` | the manifest, for tooling that reads it through the package specifier |
|
|
46
|
+
|
|
47
|
+
The package depends on `@azx-pbc/axiom-react` and `@azx-pbc/axiom-runtime`, peers on
|
|
48
|
+
`react@^19.0.0`, and declares no other runtime dependency. It is ESM-only, has no top-level `main`,
|
|
49
|
+
`module` or `types` field, and publishes Node `>=24` like every package in the workspace.
|
|
50
|
+
|
|
51
|
+
This package is the batteries-included entry point. Each level below it is usable alone: the
|
|
52
|
+
runtime evaluates, the compiler emits, the bindings render. This composition does **not** re-export
|
|
53
|
+
the renderer in this release, so a host that wants the default controls installs
|
|
54
|
+
`@azx-pbc/axiom-web` beside this package. None of the lower packages imports this package, so
|
|
55
|
+
stripping down to one of them removes this package and changes no document or artifact.
|
|
56
|
+
|
|
57
|
+
## Environment
|
|
58
|
+
|
|
59
|
+
The manifest states Node `>=24`. The modules target browsers, Node and Hermes at the workspace's
|
|
60
|
+
ES2023 library floor, import no Node built-in, DOM global or `Intl`, and carry no CSS of their own.
|
|
61
|
+
React `^19.0.0` is a peer; the package installs no second reconciler.
|
|
62
|
+
|
|
63
|
+
## What this package does not re-export
|
|
64
|
+
|
|
65
|
+
`@azx-pbc/axiom-web` publishes the default components, but this composition does not re-export them:
|
|
66
|
+
the package is runtime plus bindings, and the host still paints every control or mounts
|
|
67
|
+
`RenderedForm` from the web package.
|
|
68
|
+
|
|
69
|
+
The compiler is not a dependency: level 1 compiles at build time, and a browser bundle that reached
|
|
70
|
+
it would ship the expression parser and the YAML front door to every device.
|
|
71
|
+
|
|
72
|
+
The [adoption ladder](https://github.com/AZX-PBC-OSS/axiom/blob/main/docs/architecture/adoption-ladder.md)
|
|
73
|
+
states which package holds each level.
|
|
74
|
+
|
|
75
|
+
## Licence
|
|
76
|
+
|
|
77
|
+
MIT; see [LICENSE](https://github.com/AZX-PBC-OSS/axiom/tree/main/packages/axiom/LICENSE).
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The batteries-included composition, level 4 of the adoption ladder.
|
|
3
|
+
*
|
|
4
|
+
* This package owns no behaviour. It re-exports the headless render tree and the runtime value
|
|
5
|
+
* contract so a host can write one import. A host that later strips down to
|
|
6
|
+
* `@azx-pbc/axiom-react` keeps the same artifact and the same `CompiledSchema` values, because
|
|
7
|
+
* both levels read exactly these two modules.
|
|
8
|
+
*
|
|
9
|
+
* Nothing here reaches the compiler: it is a build step, and a browser bundle that reached it
|
|
10
|
+
* would ship the Expr parser, the metaschema and the YAML front door to every device.
|
|
11
|
+
* `test/packaging/ladder.test.ts` proves the absence against an emitted bundle.
|
|
12
|
+
*/
|
|
13
|
+
export * from '@azx-pbc/axiom-react';
|
|
14
|
+
export * from '@azx-pbc/axiom-runtime';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The batteries-included composition, level 4 of the adoption ladder.
|
|
3
|
+
*
|
|
4
|
+
* This package owns no behaviour. It re-exports the headless render tree and the runtime value
|
|
5
|
+
* contract so a host can write one import. A host that later strips down to
|
|
6
|
+
* `@azx-pbc/axiom-react` keeps the same artifact and the same `CompiledSchema` values, because
|
|
7
|
+
* both levels read exactly these two modules.
|
|
8
|
+
*
|
|
9
|
+
* Nothing here reaches the compiler: it is a build step, and a browser bundle that reached it
|
|
10
|
+
* would ship the Expr parser, the metaschema and the YAML front door to every device.
|
|
11
|
+
* `test/packaging/ladder.test.ts` proves the absence against an emitted bundle.
|
|
12
|
+
*/
|
|
13
|
+
export * from '@azx-pbc/axiom-react';
|
|
14
|
+
export * from '@azx-pbc/axiom-runtime';
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC","sourcesContent":["/**\n * The batteries-included composition, level 4 of the adoption ladder.\n *\n * This package owns no behaviour. It re-exports the headless render tree and the runtime value\n * contract so a host can write one import. A host that later strips down to\n * `@azx-pbc/axiom-react` keeps the same artifact and the same `CompiledSchema` values, because\n * both levels read exactly these two modules.\n *\n * Nothing here reaches the compiler: it is a build step, and a browser bundle that reached it\n * would ship the Expr parser, the metaschema and the YAML front door to every device.\n * `test/packaging/ladder.test.ts` proves the absence against an emitted bundle.\n */\nexport * from '@azx-pbc/axiom-react';\nexport * from '@azx-pbc/axiom-runtime';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azx-pbc/axiom",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.6",
|
|
4
|
+
"description": "The headless React bindings and the runtime value contract under one import, so a host writes a schema and a submit handler.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "AZX, PBC",
|
|
7
|
+
"homepage": "https://github.com/AZX-PBC-OSS/axiom",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://github.com/AZX-PBC-OSS/axiom/issues"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"axiom",
|
|
13
|
+
"forms",
|
|
14
|
+
"react",
|
|
15
|
+
"schema"
|
|
16
|
+
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=24"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/AZX-PBC-OSS/axiom.git",
|
|
23
|
+
"directory": "packages/axiom"
|
|
24
|
+
},
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public",
|
|
27
|
+
"provenance": true
|
|
28
|
+
},
|
|
29
|
+
"sideEffects": false,
|
|
30
|
+
"type": "module",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"react-native": "./dist/index.js",
|
|
35
|
+
"browser": "./dist/index.js",
|
|
36
|
+
"default": "./dist/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./package.json": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"dist",
|
|
42
|
+
"LICENSE"
|
|
43
|
+
],
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"react": "^19.0.0"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@azx-pbc/axiom-react": "0.0.6",
|
|
49
|
+
"@azx-pbc/axiom-runtime": "0.0.6"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"check:publish": "publint && attw --pack . --profile esm-only"
|
|
53
|
+
}
|
|
6
54
|
}
|