@umriss-ui/calculation 0.3.0 → 0.3.1
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 +6 -0
- package/README.md +23 -26
- package/docs/llms-full.md +2461 -494
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,12 @@ under a heading "Changed" of its own, no matter which digit rose.
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
+
## 0.3.1 – Core 0.11.0 (Sep. 2026)
|
|
15
|
+
|
|
16
|
+
Needs `@umriss-ui/core` 0.11; the peer range moves to `^0.11.0`. Nothing else changes for a caller.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
14
20
|
## 0.3.0 – Forced colours and agent-readable docs (Sep. 2026)
|
|
15
21
|
|
|
16
22
|
Needs `@umriss-ui/core` 0.10; the peer range moves to `^0.10.0`.
|
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# @umriss-ui/calculation
|
|
2
2
|
|
|
3
|
-
A calculation a reader can follow and redo. A
|
|
4
|
-
|
|
3
|
+
A calculation a reader can follow and redo. A screen shows a figure — an
|
|
4
|
+
availability of 99.9 %, a cost per tour, an invoice total — and this package
|
|
5
|
+
shows how it came about, as a
|
|
5
6
|
statement of account: the operator before each number, the final result above a
|
|
6
7
|
double rule, and every figure opening beneath itself into the calculation it
|
|
7
8
|
came from, down to the numbers at its root. The package **performs every operation it
|
|
@@ -24,29 +25,25 @@ their children are their operands in order, givens are the leaves (ADR-0027). A
|
|
|
24
25
|
quantity used twice is defined once and stands elsewhere as a `<Ref>`:
|
|
25
26
|
|
|
26
27
|
```tsx
|
|
27
|
-
import { Calculation, Difference, Given, Product,
|
|
28
|
+
import { Calculation, Difference, Given, Product, Ref, Sum } from "@umriss-ui/calculation";
|
|
28
29
|
|
|
29
|
-
<Calculation aria-label="
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
<
|
|
33
|
-
<Given
|
|
34
|
-
<Given label="
|
|
35
|
-
</Difference>
|
|
36
|
-
<Ref to="planned" />
|
|
37
|
-
</Quotient>
|
|
38
|
-
<Quotient label="Performance" format="percent">
|
|
39
|
-
<Product label="Ideal run time" unit="min">
|
|
40
|
-
<Given label="Ideal cycle time" value={0.8} unit="min/pc" />
|
|
41
|
-
<Given id="total" label="Total count" value={480} unit="pcs" />
|
|
30
|
+
<Calculation aria-label="Invoice 2041">
|
|
31
|
+
<Sum label="Invoice total" unit="€" decimals={2}>
|
|
32
|
+
<Difference id="net" label="Net amount" unit="€">
|
|
33
|
+
<Product id="lines" label="Line amount" unit="€">
|
|
34
|
+
<Given label="Quantity" value={12} unit="pcs" />
|
|
35
|
+
<Given label="Unit price" value={389} unit="€" />
|
|
42
36
|
</Product>
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
37
|
+
<Product label="Discount" unit="€">
|
|
38
|
+
<Ref to="lines" />
|
|
39
|
+
<Given label="Discount rate" value={0.05} format="percent" />
|
|
40
|
+
</Product>
|
|
41
|
+
</Difference>
|
|
42
|
+
<Product label="VAT" unit="€">
|
|
43
|
+
<Ref to="net" />
|
|
44
|
+
<Given label="VAT rate" value={0.19} format="percent" />
|
|
45
|
+
</Product>
|
|
46
|
+
</Sum>
|
|
50
47
|
</Calculation>
|
|
51
48
|
```
|
|
52
49
|
|
|
@@ -97,9 +94,9 @@ in a tree - there it folds, and opens whole.
|
|
|
97
94
|
with "= label"; folded, the row shows the formula it hides in names — or how
|
|
98
95
|
many operands there are, above four. The Result is the last row, its number
|
|
99
96
|
underlined twice.
|
|
100
|
-
- **Every line is read as one sentence** — "
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
- **Every line is read as one sentence** — "Net amount equals Line amount
|
|
98
|
+
minus Discount, equals 4,668 € minus 233.40 €, equals 4,434.60 €" — and
|
|
99
|
+
every derivation is a disclosure.
|
|
103
100
|
- **A declaration the calculation cannot evaluate fails on the first render**
|
|
104
101
|
with a message saying which and where: a `Ref` to nothing (listing the ids
|
|
105
102
|
that exist), a circle through references, a wrong operand count, a
|