@onlyworlds/sdk 4.35.0 → 4.36.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 +6 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ earlier history lives in git log only.
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [4.36.0] - 2026-10-20
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **`fieldLabel`** keeps a word written all in capitals as written (`STR` reads "STR", `plan_B` "Plan B"), so a custom stat block reads the same in every tool (Temper, h63 #8197; Lantern and Atlas both call it). Schema field names are all lowercase, so no schema label changes.
|
|
13
|
+
|
|
8
14
|
## [4.35.0] - 2026-10-20
|
|
9
15
|
|
|
10
16
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -3348,7 +3348,10 @@ declare const FIELD_ACRONYMS: readonly string[];
|
|
|
3348
3348
|
/**
|
|
3349
3349
|
* A field name as a label: split on `_`, the first word capitalised, every other word
|
|
3350
3350
|
* lowercase, an acronym in capitals wherever it falls ("image_url" → "Image URL",
|
|
3351
|
-
* "url" → "URL", "time_range_current" → "Time range current").
|
|
3351
|
+
* "url" → "URL", "time_range_current" → "Time range current"). A word written all in
|
|
3352
|
+
* capitals stays as written: a custom field named `STR` reads "STR"
|
|
3353
|
+
* (Lantern's stat blocks; Temper, h63 #8197). Every schema field name is lowercase, so this
|
|
3354
|
+
* reaches only names a person or tool chose.
|
|
3352
3355
|
*
|
|
3353
3356
|
* The name is taken as given: a tool that hides an extension prefix (`atlas_`, `x_`,
|
|
3354
3357
|
* `shadow_`) drops it before calling this.
|
package/dist/index.js
CHANGED
|
@@ -2021,6 +2021,7 @@ function fieldLabel(name) {
|
|
|
2021
2021
|
return name.split("_").map((word, i) => {
|
|
2022
2022
|
const lower = word.toLowerCase();
|
|
2023
2023
|
if (ACRONYM_SET.has(lower)) return lower.toUpperCase();
|
|
2024
|
+
if (/[A-Z]/.test(word) && word === word.toUpperCase()) return word;
|
|
2024
2025
|
return i === 0 ? lower.charAt(0).toUpperCase() + lower.slice(1) : lower;
|
|
2025
2026
|
}).join(" ");
|
|
2026
2027
|
}
|