tiny-essentials 1.24.3 β 1.24.4
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/1/24/4.md +71 -0
- package/dist/v1/TinyEssentials.min.js +1 -1
- package/dist/v1/TinySimpleDice.min.js +1 -1
- package/dist/v1/libs/TinySimpleDice.cjs +428 -0
- package/dist/v1/libs/TinySimpleDice.d.mts +207 -0
- package/dist/v1/libs/TinySimpleDice.mjs +369 -0
- package/docs/v1/Exports.md +71 -1
- package/docs/v1/libs/TinySimpleDice.md +287 -0
- package/package.json +1 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
### π§ TinySimpleDice Improvements & API Refinements
|
|
2
|
+
|
|
3
|
+
This update focuses heavily on enhancing the **TinySimpleDice** system, improving both internal stability and developer-facing clarity. Version **1.24.4** brings expanded dice-expression support, a new tokenizer system, richer typings, better internal transparency.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## π² Major Dice System Enhancements
|
|
8
|
+
|
|
9
|
+
### **βοΈ Multi-Dice Support (`3d6`, `4d10`, etc.)**
|
|
10
|
+
|
|
11
|
+
Dice expressions now support quantity-based patterns.
|
|
12
|
+
Instead of treating `d6` as a single roll only, TinySimpleDice now correctly resolves:
|
|
13
|
+
|
|
14
|
+
* `3d6`
|
|
15
|
+
* `2d10`
|
|
16
|
+
* `5d4`
|
|
17
|
+
β¦each consuming multiple values and aggregating the total automatically.
|
|
18
|
+
|
|
19
|
+
This change improves compatibility with traditional tabletop dice notation.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## β¨ New Tokenization Engine
|
|
24
|
+
|
|
25
|
+
### **βοΈ `tokenizeValues()`**
|
|
26
|
+
|
|
27
|
+
Introduced a new function that:
|
|
28
|
+
|
|
29
|
+
* Replaces dice expressions with computed values
|
|
30
|
+
* Tokenizes expressions into numbers and operators
|
|
31
|
+
* Supports structured evaluation workflows
|
|
32
|
+
* Produces arrays like:
|
|
33
|
+
|
|
34
|
+
```js
|
|
35
|
+
[7, "+", 4, "-", 5]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
This makes expression parsing safer and dramatically more predictable.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## π Improved Documentation (jsDoc)
|
|
43
|
+
|
|
44
|
+
This release includes extensive documentation improvements:
|
|
45
|
+
|
|
46
|
+
* More precise descriptions of dice evaluation steps
|
|
47
|
+
* Clearer examples demonstrating multi-dice behavior
|
|
48
|
+
* Better internal documentation for each transformation stage
|
|
49
|
+
* Expanded jsDoc for:
|
|
50
|
+
|
|
51
|
+
* `ApplyDiceModifiersResult`
|
|
52
|
+
* `ApplyDiceModifiersStep`
|
|
53
|
+
* `DiceModifiersValues`
|
|
54
|
+
* Tokenization helpers
|
|
55
|
+
* Dice pattern matchers
|
|
56
|
+
β¦ and new examples added across all typedefs.
|
|
57
|
+
|
|
58
|
+
These changes improve IDE IntelliSense and reduce onboarding friction for new contributors.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## π Future-Proofing
|
|
63
|
+
|
|
64
|
+
These internal changes create a foundation for future features such as:
|
|
65
|
+
|
|
66
|
+
* Roll history tracking
|
|
67
|
+
* Expression rewriting
|
|
68
|
+
* AST-based dice evaluation
|
|
69
|
+
* Modifier chaining
|
|
70
|
+
|
|
71
|
+
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.24.3...1.24.4
|