@jxsuite/formulas 0.0.16 → 0.0.18

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 +7 -25
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,26 +1,13 @@
1
1
  # @jxsuite/formulas
2
2
 
3
- Composite **pure formulas** for Jx, authored as declarative `$expression` JSON
4
- (spec §19.4c). Each formula is a named, parameterized computation (`clamp`,
5
- `sum`, `average`, `truncate`, `initials`, …) whose body is built exclusively
6
- from blessed operators, pure standard-library method operators (§19.4d), and
7
- blessed globals. No JavaScript source anywhere: every formula is inspectable
8
- data that the visual editor can open, badge with live values, and recompose.
3
+ Composite **pure formulas** for Jx, authored as declarative `$expression` JSON (spec §19.4c). Each formula is a named, parameterized computation (`clamp`, `sum`, `average`, `truncate`, `initials`, …) whose body is built exclusively from blessed operators, pure standard-library method operators (§19.4d), and blessed globals. No JavaScript source anywhere: every formula is inspectable data that the visual editor can open, badge with live values, and recompose.
9
4
 
10
5
  ## Consumption model: copy-in, not a project dependency
11
6
 
12
- This package is a **studio/tooling dependency**, deliberately _not_ a runtime
13
- or project dependency. Jx documents stay self-contained plain JSON:
7
+ This package is a **studio/tooling dependency**, deliberately _not_ a runtime or project dependency. Jx documents stay self-contained plain JSON:
14
8
 
15
- - **In Jx Studio**, the formula catalog lists these formulas alongside
16
- operators and blessed globals. Picking one **copies its state entry into the
17
- document** (vendoring the JSON) and inserts a `call` node referencing it.
18
- From that moment the project owns the formula: no package resolution at
19
- build or run time, no version coupling, and the user can edit their copy
20
- like any other named formula.
21
- - **Programmatically**, `formulaEntries()` returns the catalog as
22
- ready-to-merge `state` entries for tooling that seeds documents or
23
- `project.json` state (starters, importers, AI agents):
9
+ - **In Jx Studio**, the formula catalog lists these formulas alongside operators and blessed globals. Picking one **copies its state entry into the document** (vendoring the JSON) and inserts a `call` node referencing it. From that moment the project owns the formula: no package resolution at build or run time, no version coupling, and the user can edit their copy like any other named formula.
10
+ - **Programmatically**, `formulaEntries()` returns the catalog as ready-to-merge `state` entries for tooling that seeds documents or `project.json` state (starters, importers, AI agents):
24
11
 
25
12
  ```ts
26
13
  import { catalog, formulaEntries } from "@jxsuite/formulas";
@@ -29,8 +16,7 @@ or project dependency. Jx documents stay self-contained plain JSON:
29
16
  // → { clamp: { $expression: …, parameters: […] }, sum: …, … }
30
17
  ```
31
18
 
32
- Because consumption is copy-in, publishing a new package version never changes
33
- existing projects. A project upgrades a formula by re-inserting it.
19
+ Because consumption is copy-in, publishing a new package version never changes existing projects. A project upgrades a formula by re-inserting it.
34
20
 
35
21
  ## Authoring a formula
36
22
 
@@ -47,12 +33,8 @@ Then regenerate the catalog module:
47
33
  bun run generate
48
34
  ```
49
35
 
50
- The generator (`bin/generate.ts`) emits `src/catalog.ts` and **fails the build
51
- on anything impure**: unknown or mutating operators, or `call` targets outside
52
- the blessed pure globals (`window#/Math/…`, `window#/JSON/…`, …). Descriptions
53
- are mandatory because they double as editor tooltips and the LLM contract.
36
+ The generator (`bin/generate.ts`) emits `src/catalog.ts` and **fails the build on anything impure**: unknown or mutating operators, or `call` targets outside the blessed pure globals (`window#/Math/…`, `window#/JSON/…`, …). Descriptions are mandatory because they double as editor tooltips and the LLM contract.
54
37
 
55
38
  ## Releases
56
39
 
57
- Versioned independently via release-please (`formulas` component); published to
58
- npm with provenance by the repo's publish workflow when a release is cut.
40
+ Versioned independently via release-please (`formulas` component); published to npm with provenance by the repo's publish workflow when a release is cut.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jxsuite/formulas",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "description": "Composite pure formulas for Jx, authored as declarative $expression JSON",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -25,9 +25,9 @@
25
25
  "test": "bun test --isolate"
26
26
  },
27
27
  "dependencies": {
28
- "@jxsuite/schema": "^2.1.0"
28
+ "@jxsuite/schema": "^2.2.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@jxsuite/runtime": "^3.1.0"
31
+ "@jxsuite/runtime": "^4.0.1"
32
32
  }
33
33
  }