optolith-database-schema 0.18.11 → 0.18.12

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.18.12](https://github.com/elyukai/optolith-database-schema/compare/v0.18.11...v0.18.12) (2025-10-17)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * allow single range as a possible book cost value ([4e60943](https://github.com/elyukai/optolith-database-schema/commit/4e60943174213defe3ad006f64b18c359cc86469))
11
+
5
12
  ## [0.18.11](https://github.com/elyukai/optolith-database-schema/compare/v0.18.10...v0.18.11) (2025-10-17)
6
13
 
7
14
 
@@ -1,8 +1,25 @@
1
- import { Array, Entity, Enum, EnumCase, IncludeIdentifier, Integer, Object, String, TypeAlias } from "tsondb/schema/def";
1
+ import { Array, Entity, Enum, EnumCase, IncludeIdentifier, Object, String, TypeAlias } from "tsondb/schema/def";
2
2
  export declare const Book: Entity<"Book", {
3
3
  cost: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"BookCost", {
4
- Constant: EnumCase<Integer>;
5
- Variable: EnumCase<Array<IncludeIdentifier<[], Enum<"BookCostVariant", {
4
+ Single: EnumCase<IncludeIdentifier<[], Enum<"Cost", {
5
+ Free: EnumCase<null>;
6
+ Various: EnumCase<null>;
7
+ Invaluable: EnumCase<null>;
8
+ Fixed: EnumCase<IncludeIdentifier<[], TypeAlias<"FixedCost", Object<{
9
+ value: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").FloatType, true>;
10
+ translations: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").NestedEntityMapType<"FixedCostTranslation", {
11
+ wrap_in_text: import("tsondb/schema/def").MemberDecl<String, true>;
12
+ }>, false>;
13
+ }>, []>>>;
14
+ Range: EnumCase<IncludeIdentifier<[], TypeAlias<"CostRange", Object<{
15
+ from: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").FloatType, true>;
16
+ to: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").FloatType, true>;
17
+ translations: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").NestedEntityMapType<"CostRangeTranslation", {
18
+ wrap_in_text: import("tsondb/schema/def").MemberDecl<String, true>;
19
+ }>, false>;
20
+ }>, []>>>;
21
+ }, []>>>;
22
+ Multiple: EnumCase<Array<IncludeIdentifier<[], Enum<"BookCostVariant", {
6
23
  Definite: EnumCase<IncludeIdentifier<[], TypeAlias<"DefiniteBookCostVariant", Object<{
7
24
  cost: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"Cost", {
8
25
  Free: EnumCase<null>;
@@ -39,48 +56,48 @@ export declare const Book: Entity<"Book", {
39
56
  Primitive: EnumCase<null>;
40
57
  Simple: EnumCase<null>;
41
58
  Complex: EnumCase<IncludeIdentifier<[], TypeAlias<"ComplexComplexity", Object<{
42
- ap_value: import("tsondb/schema/def").MemberDecl<Integer, true>;
59
+ ap_value: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").IntegerType, true>;
43
60
  }>, []>>>;
44
61
  }, []>>, false>;
45
62
  structure_points: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], TypeAlias<"StructurePoints", Array<IncludeIdentifier<[], TypeAlias<"StructurePointsComponent", Object<{
46
- points: import("tsondb/schema/def").MemberDecl<Integer, true>;
63
+ points: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").IntegerType, true>;
47
64
  }>, []>>>, []>>, false>;
48
65
  src: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], TypeAlias<"PublicationRefs", Array<IncludeIdentifier<[], TypeAlias<"PublicationRef", Object<{
49
66
  id: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").ReferenceIdentifierType, true>;
50
67
  occurrences: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").NestedEntityMapType<string, {
51
68
  initial: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], TypeAlias<"InitialOccurrence", Object<{
52
- printing: import("tsondb/schema/def").MemberDecl<Integer, false>;
69
+ printing: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").IntegerType, false>;
53
70
  pages: import("tsondb/schema/def").MemberDecl<Array<IncludeIdentifier<[], TypeAlias<"PageRange", Object<{
54
71
  first_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"Page", {
55
72
  InsideCoverFront: EnumCase<null>;
56
73
  InsideCoverBack: EnumCase<null>;
57
- Numbered: EnumCase<Integer>;
74
+ Numbered: EnumCase<import("tsondb/schema/def").IntegerType>;
58
75
  }, []>>, true>;
59
76
  last_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"Page", {
60
77
  InsideCoverFront: EnumCase<null>;
61
78
  InsideCoverBack: EnumCase<null>;
62
- Numbered: EnumCase<Integer>;
79
+ Numbered: EnumCase<import("tsondb/schema/def").IntegerType>;
63
80
  }, []>>, false>;
64
81
  }>, []>>>, true>;
65
82
  }>, []>>, true>;
66
83
  revisions: import("tsondb/schema/def").MemberDecl<Array<IncludeIdentifier<[], Enum<"Revision", {
67
84
  Since: EnumCase<IncludeIdentifier<[], TypeAlias<"Since", Object<{
68
- printing: import("tsondb/schema/def").MemberDecl<Integer, true>;
85
+ printing: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").IntegerType, true>;
69
86
  pages: import("tsondb/schema/def").MemberDecl<Array<IncludeIdentifier<[], TypeAlias<"PageRange", Object<{
70
87
  first_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"Page", {
71
88
  InsideCoverFront: EnumCase<null>;
72
89
  InsideCoverBack: EnumCase<null>;
73
- Numbered: EnumCase<Integer>;
90
+ Numbered: EnumCase<import("tsondb/schema/def").IntegerType>;
74
91
  }, []>>, true>;
75
92
  last_page: import("tsondb/schema/def").MemberDecl<IncludeIdentifier<[], Enum<"Page", {
76
93
  InsideCoverFront: EnumCase<null>;
77
94
  InsideCoverBack: EnumCase<null>;
78
- Numbered: EnumCase<Integer>;
95
+ Numbered: EnumCase<import("tsondb/schema/def").IntegerType>;
79
96
  }, []>>, false>;
80
97
  }>, []>>>, true>;
81
98
  }>, []>>>;
82
99
  Deprecated: EnumCase<IncludeIdentifier<[], TypeAlias<"Deprecation", Object<{
83
- printing: import("tsondb/schema/def").MemberDecl<Integer, true>;
100
+ printing: import("tsondb/schema/def").MemberDecl<import("tsondb/schema/def").IntegerType, true>;
84
101
  }>, []>>>;
85
102
  }, []>>>, false>;
86
103
  }>, true>;
@@ -1,4 +1,4 @@
1
- import { Array, Entity, Enum, EnumCase, IncludeIdentifier, Integer, Object, Optional, Required, String, TypeAlias, } from "tsondb/schema/def";
1
+ import { Array, Entity, Enum, EnumCase, IncludeIdentifier, Object, Optional, Required, String, TypeAlias, } from "tsondb/schema/def";
2
2
  import { NestedTranslationMap } from "../../Locale.js";
3
3
  import { Errata } from "../../source/_Erratum.js";
4
4
  import { src } from "../../source/_PublicationRef.js";
@@ -58,12 +58,13 @@ export const Book = Entity(import.meta.url, {
58
58
  });
59
59
  const BookCost = Enum(import.meta.url, {
60
60
  name: "BookCost",
61
+ comment: "The cost of the book, which may be a single value or multiple values that are defined by specific editions or other defining factors of the book.",
61
62
  values: () => ({
62
- Constant: EnumCase({
63
- comment: "The book has a fixed cost.",
64
- type: Integer({ minimum: 0 }),
63
+ Single: EnumCase({
64
+ comment: "The book only has a single cost description.",
65
+ type: IncludeIdentifier(Cost),
65
66
  }),
66
- Variable: EnumCase({
67
+ Multiple: EnumCase({
67
68
  comment: "The book’s cost varies by edition or other factors.",
68
69
  type: Array(IncludeIdentifier(BookCostVariant), { minItems: 2 }),
69
70
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optolith-database-schema",
3
- "version": "0.18.11",
3
+ "version": "0.18.12",
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",