@optolith/database-schema 0.42.3 → 0.42.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.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [0.42.4](https://github.com/Optolith/database-schema/compare/v0.42.3...v0.42.4) (2026-04-10)
6
+
7
+
8
+ ### Features
9
+
10
+ * add replacement text option to known item specifics ([4a6648e](https://github.com/Optolith/database-schema/commit/4a6648e307a35a62422c923de59b156811da1119))
11
+
5
12
  ## [0.42.3](https://github.com/Optolith/database-schema/compare/v0.42.2...v0.42.3) (2026-04-10)
6
13
 
7
14
  ## [0.42.2](https://github.com/elyukai/optolith-database-schema/compare/v0.42.1...v0.42.2) (2026-04-10)
package/gen/types.d.ts CHANGED
@@ -11705,6 +11705,25 @@ export interface ConstantCollectorsValue {
11705
11705
  * The collector’s value is a fixed price in silverthalers.
11706
11706
  */
11707
11707
  value: number
11708
+
11709
+ /**
11710
+ * All translations for the entry, identified by IETF language tag (BCP47).
11711
+ */
11712
+ translations?: {
11713
+ [localeId: string]: ConstantCollectorsValueTranslation
11714
+ }
11715
+ }
11716
+
11717
+ export interface ConstantCollectorsValueTranslation {
11718
+ /**
11719
+ * A note, appended to the generated string in parenthesis.
11720
+ */
11721
+ note?: ResponsiveTextOptional
11722
+
11723
+ /**
11724
+ * A replacement string.
11725
+ */
11726
+ replacement?: ResponsiveTextReplace
11708
11727
  }
11709
11728
 
11710
11729
  export interface MinimumCollectorsValue {
@@ -11725,7 +11744,12 @@ export interface MinimumCollectorsValueTranslation {
11725
11744
  /**
11726
11745
  * A note, appended to the generated string in parenthesis.
11727
11746
  */
11728
- note: ResponsiveTextOptional
11747
+ note?: ResponsiveTextOptional
11748
+
11749
+ /**
11750
+ * A replacement string.
11751
+ */
11752
+ replacement?: ResponsiveTextReplace
11729
11753
  }
11730
11754
 
11731
11755
  export interface KnownItemSpecificsTranslation {
@@ -84,6 +84,16 @@ export declare const Armor: DB.Entity<"Armor", {
84
84
  collectorsValue: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"CollectorsValue", {
85
85
  Constant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantCollectorsValue", DB.Object<{
86
86
  value: DB.MemberDecl<DB.Float, true>;
87
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ConstantCollectorsValueTranslation", {
88
+ note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
89
+ full: DB.MemberDecl<DB.String, true>;
90
+ compressed: DB.MemberDecl<DB.String, false>;
91
+ }>, []>>, false>;
92
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
93
+ full: DB.MemberDecl<DB.String, true>;
94
+ compressed: DB.MemberDecl<DB.String, true>;
95
+ }>, []>>, false>;
96
+ }>, false>;
87
97
  }>, []>>>;
88
98
  Minimum: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"MinimumCollectorsValue", DB.Object<{
89
99
  value: DB.MemberDecl<DB.Float, true>;
@@ -91,7 +101,11 @@ export declare const Armor: DB.Entity<"Armor", {
91
101
  note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
92
102
  full: DB.MemberDecl<DB.String, true>;
93
103
  compressed: DB.MemberDecl<DB.String, false>;
94
- }>, []>>, true>;
104
+ }>, []>>, false>;
105
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
106
+ full: DB.MemberDecl<DB.String, true>;
107
+ compressed: DB.MemberDecl<DB.String, true>;
108
+ }>, []>>, false>;
95
109
  }>, false>;
96
110
  }>, []>>>;
97
111
  Invaluable: DB.EnumCase<null>;
@@ -116,6 +116,16 @@ export declare const Weapon: DB.Entity<"Weapon", {
116
116
  collectorsValue: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"CollectorsValue", {
117
117
  Constant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantCollectorsValue", DB.Object<{
118
118
  value: DB.MemberDecl<DB.Float, true>;
119
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ConstantCollectorsValueTranslation", {
120
+ note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
121
+ full: DB.MemberDecl<DB.String, true>;
122
+ compressed: DB.MemberDecl<DB.String, false>;
123
+ }>, []>>, false>;
124
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
125
+ full: DB.MemberDecl<DB.String, true>;
126
+ compressed: DB.MemberDecl<DB.String, true>;
127
+ }>, []>>, false>;
128
+ }>, false>;
119
129
  }>, []>>>;
120
130
  Minimum: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"MinimumCollectorsValue", DB.Object<{
121
131
  value: DB.MemberDecl<DB.Float, true>;
@@ -123,7 +133,11 @@ export declare const Weapon: DB.Entity<"Weapon", {
123
133
  note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
124
134
  full: DB.MemberDecl<DB.String, true>;
125
135
  compressed: DB.MemberDecl<DB.String, false>;
126
- }>, []>>, true>;
136
+ }>, []>>, false>;
137
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
138
+ full: DB.MemberDecl<DB.String, true>;
139
+ compressed: DB.MemberDecl<DB.String, true>;
140
+ }>, []>>, false>;
127
141
  }>, false>;
128
142
  }>, []>>>;
129
143
  Invaluable: DB.EnumCase<null>;
@@ -432,6 +432,16 @@ export declare const KnownItemSpecifics: DB.TypeAlias<"KnownItemSpecifics", DB.O
432
432
  collectorsValue: DB.MemberDecl<DB.IncludeIdentifier<[], DB.Enum<"CollectorsValue", {
433
433
  Constant: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"ConstantCollectorsValue", DB.Object<{
434
434
  value: DB.MemberDecl<DB.Float, true>;
435
+ translations: DB.MemberDecl<DB.NestedEntityMap<"ConstantCollectorsValueTranslation", {
436
+ note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
437
+ full: DB.MemberDecl<DB.String, true>;
438
+ compressed: DB.MemberDecl<DB.String, false>;
439
+ }>, []>>, false>;
440
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
441
+ full: DB.MemberDecl<DB.String, true>;
442
+ compressed: DB.MemberDecl<DB.String, true>;
443
+ }>, []>>, false>;
444
+ }>, false>;
435
445
  }>, []>>>;
436
446
  Minimum: DB.EnumCase<DB.IncludeIdentifier<[], DB.TypeAlias<"MinimumCollectorsValue", DB.Object<{
437
447
  value: DB.MemberDecl<DB.Float, true>;
@@ -439,7 +449,11 @@ export declare const KnownItemSpecifics: DB.TypeAlias<"KnownItemSpecifics", DB.O
439
449
  note: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextOptional", DB.Object<{
440
450
  full: DB.MemberDecl<DB.String, true>;
441
451
  compressed: DB.MemberDecl<DB.String, false>;
442
- }>, []>>, true>;
452
+ }>, []>>, false>;
453
+ replacement: DB.MemberDecl<DB.IncludeIdentifier<[], DB.TypeAlias<"ResponsiveTextReplace", DB.Object<{
454
+ full: DB.MemberDecl<DB.String, true>;
455
+ compressed: DB.MemberDecl<DB.String, true>;
456
+ }>, []>>, false>;
443
457
  }>, false>;
444
458
  }>, []>>>;
445
459
  Invaluable: DB.EnumCase<null>;
@@ -1,6 +1,6 @@
1
1
  import * as DB from "tsondb/schema/dsl";
2
2
  import { BlessedTraditionIdentifier, CultureIdentifier, MagicalTraditionIdentifier, ProfessionIdentifier, RaceIdentifier, } from "../../_Identifier.js";
3
- import { ResponsiveTextOptional } from "../../_ResponsiveText.js";
3
+ import { ResponsiveTextOptional, ResponsiveTextReplace } from "../../_ResponsiveText.js";
4
4
  import { NestedTranslationMap } from "../../Locale.js";
5
5
  import { Errata } from "../../source/_Erratum.js";
6
6
  import { src } from "../../source/_PublicationRef.js";
@@ -339,6 +339,16 @@ const ConstantCollectorsValue = DB.TypeAlias(import.meta.url, {
339
339
  comment: "The collector’s value is a fixed price in silverthalers.",
340
340
  type: DB.Float({ minimum: { value: 0, isExclusive: true } }),
341
341
  }),
342
+ translations: NestedTranslationMap(DB.Optional, "ConstantCollectorsValue", DB.Object({
343
+ note: DB.Optional({
344
+ comment: "A note, appended to the generated string in parenthesis.",
345
+ type: DB.IncludeIdentifier(ResponsiveTextOptional),
346
+ }),
347
+ replacement: DB.Optional({
348
+ comment: "A replacement string.",
349
+ type: DB.IncludeIdentifier(ResponsiveTextReplace),
350
+ }),
351
+ }, { minProperties: 1 })),
342
352
  }),
343
353
  });
344
354
  const MinimumCollectorsValue = DB.TypeAlias(import.meta.url, {
@@ -349,11 +359,15 @@ const MinimumCollectorsValue = DB.TypeAlias(import.meta.url, {
349
359
  type: DB.Float({ minimum: { value: 0, isExclusive: true } }),
350
360
  }),
351
361
  translations: NestedTranslationMap(DB.Optional, "MinimumCollectorsValue", DB.Object({
352
- note: DB.Required({
362
+ note: DB.Optional({
353
363
  comment: "A note, appended to the generated string in parenthesis.",
354
364
  type: DB.IncludeIdentifier(ResponsiveTextOptional),
355
365
  }),
356
- })),
366
+ replacement: DB.Optional({
367
+ comment: "A replacement string.",
368
+ type: DB.IncludeIdentifier(ResponsiveTextReplace),
369
+ }),
370
+ }, { minProperties: 1 })),
357
371
  }),
358
372
  });
359
373
  /*
@@ -64,14 +64,14 @@ export const checkWeaponCombatTechniqueIntegrity = ({ instanceContent, getInstan
64
64
  checkPart(ct.special.has_length, meleeUse.length, "a length", "close", ctId),
65
65
  checkPart(ct.special.has_reach, meleeUse.reach, "a reach", "close", ctId),
66
66
  checkPart(ct.special.has_shield_size, meleeUse.size, "a shield size", "close", ctId),
67
- ].filter(v => v !== undefined);
67
+ ];
68
68
  }),
69
69
  ...Object.entries(instanceContent.ranged_uses ?? {}).flatMap(([ctId, rangedUse]) => {
70
70
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- integrity has been checked, it must be present
71
71
  const ct = getInstanceById("RangedCombatTechnique", ctId);
72
72
  return [
73
73
  checkPart(ct.special.has_ammunition, rangedUse.ammunition, "an ammunition", "ranged", ctId),
74
- ].filter(v => v !== undefined);
74
+ ];
75
75
  }),
76
76
  ].filter(v => v !== undefined);
77
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optolith/database-schema",
3
- "version": "0.42.3",
3
+ "version": "0.42.4",
4
4
  "description": "Definitions and utilities for the flat-file database of Optolith, a character creation tool for the Pen and Paper RPG “The Dark Eye 5”, and its external integrations into other software.",
5
5
  "keywords": [
6
6
  "tde",