@niscorp/loom 0.1.0 → 0.2.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/CHANGELOG.md ADDED
@@ -0,0 +1,30 @@
1
+ # @niscorp/loom
2
+
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f1cec45: A Prism config that validates no longer names an op Prism does not have. `validate` accepted `{ card: { $fetch: … } }` and `{ $eval: "…" }`: the plain-object branch refused only the names of ops that exist, so any other `$` key passed as a template key. Such a config could be stored — an endpoint request, a vex mapping, a strata migration — and then failed every time it was evaluated (`E_NODE_SHAPE`, "Unsupported node shape").
8
+
9
+ A key that starts with `$` is now an op's name and nothing else. The template branch refuses every `$` key — the rule the evaluator already held — so `validate` reports it with the key and where it is (`card.$fetch: Not a Prism op. A key that starts with "$" names an op; data with such a key goes in $const.`), and `evaluate` and `compile` fail with `E_SCHEMA` before anything runs. An op's name used as a template key keeps its own message. `E_NODE_SHAPE` is left for a tree that never went through the schema: an IR handed to `execute`. Adding an op no longer takes a key away from templates.
10
+ - **prism** — the change, and a grammar narrowing: `nisc.prism` 2, a marker with no document step (a key that never evaluated has nothing to be rewritten to). `$` keys that are data are untouched: a `$const` payload, `$with` names, `$renameKeys` and `$fromEntries` keys. The JSON Schema's template key pattern is `^(?!\$)` instead of a list of every op.
11
+ - **nova, vex, moss, loom, cli, nisc** — no change of their own. They depend on prism and are released with it, so the set installs together; the configs they hand to prism (endpoint `request` and `response`, `$prism` bindings, vex mappings) are held to the same rule.
12
+ - **create-nisc** — the templates' sources are recorded at `nisc.prism` 2.
13
+
14
+ **What to change:** in a config with a `$`-prefixed key that is not a Prism op, remove the key — or put the object in `$const` if it is literal data. An app that keeps a `strata.lock.json` runs `pnpm strata upgrade`, then `pnpm strata verify`; there is nothing to edit unless it has such a config. Everything else: nothing.
15
+
16
+ BREAKING — approved by moccadroid, 2026-10-04: a config with a `$`-prefixed key that is not a Prism op no longer validates, compiles or evaluates — also where evaluation never reached the key (an untaken `$case` branch, a short-circuited `$or`, a `$map` body over an empty array), which used to work. A vex seed mapping with one fails when it is seeded, at boot, instead of on each replay. Code that matched `E_NODE_SHAPE` from `evaluate` gets `E_SCHEMA`. The `@niscorp` packages that depend on prism move with it, so an app moves them together (`@niscorp/nisc` 0.3.0).
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [de6d980]
21
+ - Updated dependencies [f1cec45]
22
+ - @niscorp/nova@0.2.0
23
+ - @niscorp/prism@0.2.0
24
+ - @niscorp/vex@0.2.0
25
+
26
+ ## 0.1.1
27
+
28
+ ### Patch Changes
29
+
30
+ - b67a125: Documentation only: each package's README, reference and design docs checked against its source and corrected — install lines and peers, signatures, defaults, status codes, licenses (loom, signal: Apache-2.0), and API that existed but was not documented.
package/README.md CHANGED
@@ -18,8 +18,10 @@ pnpm add @niscorp/loom @niscorp/nova zod
18
18
 
19
19
  `@niscorp/nova` is required. The React surface (`@niscorp/loom/react`) also needs
20
20
  `react`. Domain plugins each need their own library — `@niscorp/vex` for the Vex
21
- plugin, `@niscorp/prism` for the Prism plugin. All three are optional: a consumer
22
- that only uses the compiler installs none of them.
21
+ plugin, `@niscorp/prism` for the Prism plugin. All three are optional peers of Loom: a consumer that only
22
+ uses the compiler needs none of them for Loom itself. (Nova has required peers
23
+ of its own — `@niscorp/prism` and `@niscorp/strata` — which pnpm installs with
24
+ it.)
23
25
 
24
26
  ## Two ways to use Loom
25
27
 
@@ -75,13 +77,16 @@ import { prism } from '@niscorp/loom/plugins/prism/react';
75
77
  - To switch to a different artifact, give the element a new React `key`.
76
78
 
77
79
  A **plugin** wires one domain into the editor. It contributes the schemas to edit
78
- (its *documents*), optional custom field widgets, and usually a preview. The two
80
+ (its *documents*), optional custom field widgets, and usually a preview. The three
79
81
  reference plugins:
80
82
 
81
83
  - `prism({ input })` — edit a [Prism](../prism) transform config; the preview
82
84
  applies it to `input` and shows the output.
83
85
  - `vex({ run, db })` — edit a [Vex](../vex) query; the preview runs it with `run`
84
86
  and shows the rows. Pass `db` to get column-aware field pickers.
87
+ - `nova({ manifest })` — edit a [Nova](../nova) layout built from the
88
+ components the manifest lists (each `{ name, props, container?, render }`,
89
+ `props` a Zod schema); the preview renders the layout with them.
85
90
 
86
91
  ## Entry points
87
92
 
@@ -98,4 +103,4 @@ reference plugins:
98
103
 
99
104
  ## License
100
105
 
101
- MIT
106
+ Apache-2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@niscorp/loom",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Schema-driven editors that run on Nova — turn any schema into an editing UI",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -113,16 +113,16 @@
113
113
  "tsup": "^8.5.1",
114
114
  "vitest": "^4.1.2",
115
115
  "zod": "^4.6.5",
116
- "@niscorp/nova": "^0.1.0",
117
- "@niscorp/vex": "^0.1.0",
118
- "@niscorp/prism": "^0.1.0"
116
+ "@niscorp/nova": "^0.2.0",
117
+ "@niscorp/prism": "^0.2.0",
118
+ "@niscorp/vex": "^0.2.0"
119
119
  },
120
120
  "peerDependencies": {
121
121
  "react": "^19.2.4",
122
122
  "zod": "^4.2.0",
123
- "@niscorp/nova": "^0.1.0",
124
- "@niscorp/vex": "^0.1.0",
125
- "@niscorp/prism": "^0.1.0"
123
+ "@niscorp/nova": "^0.2.0",
124
+ "@niscorp/prism": "^0.2.0",
125
+ "@niscorp/vex": "^0.2.0"
126
126
  },
127
127
  "peerDependenciesMeta": {
128
128
  "@niscorp/prism": {