@yschimke/livery-a2ui 0.0.0-stage → 0.11.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.
Files changed (149) hide show
  1. package/README.md +194 -2
  2. package/dist/angular.d.ts +32 -0
  3. package/dist/angular.js +51 -0
  4. package/dist/api.d.ts +35 -0
  5. package/dist/api.js +35 -0
  6. package/dist/catalog.d.ts +18 -0
  7. package/dist/catalog.js +55 -0
  8. package/dist/cmp-player.d.ts +3 -0
  9. package/dist/cmp-player.js +125 -0
  10. package/dist/controller.d.ts +61 -0
  11. package/dist/controller.js +330 -0
  12. package/dist/index.d.ts +7 -0
  13. package/dist/index.js +4 -0
  14. package/dist/livery-web/livery-livery-web.d.mts +75 -0
  15. package/dist/livery-web/livery-livery-web.import-object.mjs +370 -0
  16. package/dist/livery-web/livery-livery-web.js-builtins.mjs +52 -0
  17. package/dist/livery-web/livery-livery-web.mjs +104 -0
  18. package/dist/livery-web/livery-livery-web.wasm +0 -0
  19. package/dist/livery-web-compose/fonts/NotoSansSymbols2-OFL.txt +117 -0
  20. package/dist/livery-web-compose/fonts/NotoSansSymbols2-Regular.ttf +0 -0
  21. package/dist/livery-web-compose/fonts/README.md +8 -0
  22. package/dist/livery-web-compose/fonts/RobotoFlex-OFL.txt +93 -0
  23. package/dist/livery-web-compose/fonts/RobotoFlex.ttf +0 -0
  24. package/dist/livery-web-compose/livery-livery-web-compose.d.mts +60 -0
  25. package/dist/livery-web-compose/livery-livery-web-compose.import-object.mjs +653 -0
  26. package/dist/livery-web-compose/livery-livery-web-compose.js-builtins.mjs +52 -0
  27. package/dist/livery-web-compose/livery-livery-web-compose.mjs +89 -0
  28. package/dist/livery-web-compose/livery-livery-web-compose.wasm +0 -0
  29. package/dist/livery-web-compose/skiko.mjs +1118 -0
  30. package/dist/livery-web-compose/skiko.wasm +0 -0
  31. package/dist/livery.d.ts +165 -0
  32. package/dist/livery.js +87 -0
  33. package/dist/player.d.ts +2 -0
  34. package/dist/player.js +2 -0
  35. package/dist/react.d.ts +24 -0
  36. package/dist/react.js +36 -0
  37. package/node_modules/@js-joda/core/CHANGELOG.md +363 -0
  38. package/node_modules/@js-joda/core/CheatSheet.md +947 -0
  39. package/node_modules/@js-joda/core/LICENSE +34 -0
  40. package/node_modules/@js-joda/core/README.md +155 -0
  41. package/node_modules/@js-joda/core/bower.json +21 -0
  42. package/node_modules/@js-joda/core/dist/js-joda.d.ts +2452 -0
  43. package/node_modules/@js-joda/core/dist/js-joda.esm.js +13564 -0
  44. package/node_modules/@js-joda/core/dist/js-joda.flow.js +949 -0
  45. package/node_modules/@js-joda/core/dist/js-joda.js +13630 -0
  46. package/node_modules/@js-joda/core/dist/js-joda.js.map +1 -0
  47. package/node_modules/@js-joda/core/dist/js-joda.min.js +5 -0
  48. package/node_modules/@js-joda/core/package.json +76 -0
  49. package/node_modules/@js-joda/core/src/Clock.js +330 -0
  50. package/node_modules/@js-joda/core/src/DayOfWeek.js +451 -0
  51. package/node_modules/@js-joda/core/src/Duration.js +1205 -0
  52. package/node_modules/@js-joda/core/src/Enum.js +30 -0
  53. package/node_modules/@js-joda/core/src/Instant.js +1012 -0
  54. package/node_modules/@js-joda/core/src/LocalDate.js +1703 -0
  55. package/node_modules/@js-joda/core/src/LocalDateTime.js +1686 -0
  56. package/node_modules/@js-joda/core/src/LocalTime.js +1415 -0
  57. package/node_modules/@js-joda/core/src/MathUtil.js +236 -0
  58. package/node_modules/@js-joda/core/src/Month.js +600 -0
  59. package/node_modules/@js-joda/core/src/MonthDay.js +730 -0
  60. package/node_modules/@js-joda/core/src/OffsetDateTime.js +757 -0
  61. package/node_modules/@js-joda/core/src/OffsetTime.js +621 -0
  62. package/node_modules/@js-joda/core/src/Period.js +933 -0
  63. package/node_modules/@js-joda/core/src/StringUtil.js +43 -0
  64. package/node_modules/@js-joda/core/src/Year.js +1015 -0
  65. package/node_modules/@js-joda/core/src/YearConstants.js +21 -0
  66. package/node_modules/@js-joda/core/src/YearMonth.js +1096 -0
  67. package/node_modules/@js-joda/core/src/ZoneId.js +236 -0
  68. package/node_modules/@js-joda/core/src/ZoneIdFactory.js +201 -0
  69. package/node_modules/@js-joda/core/src/ZoneOffset.js +486 -0
  70. package/node_modules/@js-joda/core/src/ZoneRegion.js +72 -0
  71. package/node_modules/@js-joda/core/src/ZonedDateTime.js +2007 -0
  72. package/node_modules/@js-joda/core/src/_init.js +68 -0
  73. package/node_modules/@js-joda/core/src/assert.js +33 -0
  74. package/node_modules/@js-joda/core/src/chrono/ChronoLocalDate.js +230 -0
  75. package/node_modules/@js-joda/core/src/chrono/ChronoLocalDateTime.js +130 -0
  76. package/node_modules/@js-joda/core/src/chrono/ChronoZonedDateTime.js +194 -0
  77. package/node_modules/@js-joda/core/src/chrono/IsoChronology.js +235 -0
  78. package/node_modules/@js-joda/core/src/convert.js +83 -0
  79. package/node_modules/@js-joda/core/src/errors.js +54 -0
  80. package/node_modules/@js-joda/core/src/format/DateTimeBuilder.js +535 -0
  81. package/node_modules/@js-joda/core/src/format/DateTimeFormatter.js +728 -0
  82. package/node_modules/@js-joda/core/src/format/DateTimeFormatterBuilder.js +1545 -0
  83. package/node_modules/@js-joda/core/src/format/DateTimeParseContext.js +297 -0
  84. package/node_modules/@js-joda/core/src/format/DateTimePrintContext.js +138 -0
  85. package/node_modules/@js-joda/core/src/format/DecimalStyle.js +113 -0
  86. package/node_modules/@js-joda/core/src/format/EnumMap.js +70 -0
  87. package/node_modules/@js-joda/core/src/format/ParsePosition.js +31 -0
  88. package/node_modules/@js-joda/core/src/format/ResolverStyle.js +93 -0
  89. package/node_modules/@js-joda/core/src/format/SignStyle.js +38 -0
  90. package/node_modules/@js-joda/core/src/format/StringBuilder.js +47 -0
  91. package/node_modules/@js-joda/core/src/format/TextStyle.js +114 -0
  92. package/node_modules/@js-joda/core/src/format/parser/CharLiteralPrinterParser.js +46 -0
  93. package/node_modules/@js-joda/core/src/format/parser/CompositePrinterParser.js +89 -0
  94. package/node_modules/@js-joda/core/src/format/parser/FractionPrinterParser.js +162 -0
  95. package/node_modules/@js-joda/core/src/format/parser/NumberPrinterParser.js +367 -0
  96. package/node_modules/@js-joda/core/src/format/parser/OffsetIdPrinterParser.js +177 -0
  97. package/node_modules/@js-joda/core/src/format/parser/PadPrinterParserDecorator.js +81 -0
  98. package/node_modules/@js-joda/core/src/format/parser/SettingsParser.js +44 -0
  99. package/node_modules/@js-joda/core/src/format/parser/StringLiteralPrinterParser.js +39 -0
  100. package/node_modules/@js-joda/core/src/format/parser/ZoneIdPrinterParser.js +218 -0
  101. package/node_modules/@js-joda/core/src/js-joda.js +210 -0
  102. package/node_modules/@js-joda/core/src/license-preamble.js +3 -0
  103. package/node_modules/@js-joda/core/src/temporal/ChronoField.js +470 -0
  104. package/node_modules/@js-joda/core/src/temporal/ChronoUnit.js +310 -0
  105. package/node_modules/@js-joda/core/src/temporal/DefaultInterfaceTemporal.js +118 -0
  106. package/node_modules/@js-joda/core/src/temporal/IsoFields.js +859 -0
  107. package/node_modules/@js-joda/core/src/temporal/NativeJsTemporal.js +105 -0
  108. package/node_modules/@js-joda/core/src/temporal/Temporal.js +346 -0
  109. package/node_modules/@js-joda/core/src/temporal/TemporalAccessor.js +125 -0
  110. package/node_modules/@js-joda/core/src/temporal/TemporalAdjuster.js +92 -0
  111. package/node_modules/@js-joda/core/src/temporal/TemporalAdjusters.js +464 -0
  112. package/node_modules/@js-joda/core/src/temporal/TemporalAmount.js +166 -0
  113. package/node_modules/@js-joda/core/src/temporal/TemporalField.js +248 -0
  114. package/node_modules/@js-joda/core/src/temporal/TemporalQueries.js +223 -0
  115. package/node_modules/@js-joda/core/src/temporal/TemporalQueriesFactory.js +77 -0
  116. package/node_modules/@js-joda/core/src/temporal/TemporalQuery.js +107 -0
  117. package/node_modules/@js-joda/core/src/temporal/TemporalUnit.js +179 -0
  118. package/node_modules/@js-joda/core/src/temporal/ValueRange.js +257 -0
  119. package/node_modules/@js-joda/core/src/use.js +20 -0
  120. package/node_modules/@js-joda/core/src/zone/SystemDefaultZoneId.js +31 -0
  121. package/node_modules/@js-joda/core/src/zone/SystemDefaultZoneRules.js +162 -0
  122. package/node_modules/@js-joda/core/src/zone/ZoneOffsetTransition.js +289 -0
  123. package/node_modules/@js-joda/core/src/zone/ZoneRules.js +464 -0
  124. package/node_modules/@js-joda/core/src/zone/ZoneRulesProvider.js +36 -0
  125. package/node_modules/@yschimke/livery-web/README.md +112 -0
  126. package/node_modules/@yschimke/livery-web/dist/descriptor.d.ts +24 -0
  127. package/node_modules/@yschimke/livery-web/dist/descriptor.js +32 -0
  128. package/node_modules/@yschimke/livery-web/dist/index.d.ts +9 -0
  129. package/node_modules/@yschimke/livery-web/dist/index.js +5 -0
  130. package/node_modules/@yschimke/livery-web/dist/livery-web/livery-livery-web-core.d.mts +63 -0
  131. package/node_modules/@yschimke/livery-web/dist/livery-web/livery-livery-web-core.import-object.mjs +333 -0
  132. package/node_modules/@yschimke/livery-web/dist/livery-web/livery-livery-web-core.js-builtins.mjs +52 -0
  133. package/node_modules/@yschimke/livery-web/dist/livery-web/livery-livery-web-core.mjs +92 -0
  134. package/node_modules/@yschimke/livery-web/dist/livery-web/livery-livery-web-core.wasm +0 -0
  135. package/node_modules/@yschimke/livery-web/dist/player.d.ts +65 -0
  136. package/node_modules/@yschimke/livery-web/dist/player.js +117 -0
  137. package/node_modules/@yschimke/livery-web/dist/preview.d.ts +57 -0
  138. package/node_modules/@yschimke/livery-web/dist/preview.js +214 -0
  139. package/node_modules/@yschimke/livery-web/dist/publication.d.ts +7 -0
  140. package/node_modules/@yschimke/livery-web/dist/publication.js +103 -0
  141. package/node_modules/@yschimke/livery-web/dist/session.d.ts +71 -0
  142. package/node_modules/@yschimke/livery-web/dist/session.js +55 -0
  143. package/node_modules/@yschimke/livery-web/dist/viewer.d.ts +1 -0
  144. package/node_modules/@yschimke/livery-web/dist/viewer.js +18 -0
  145. package/node_modules/@yschimke/livery-web/package.json +39 -0
  146. package/node_modules/@yschimke/livery-web/vendor/PROVENANCE.md +18 -0
  147. package/node_modules/@yschimke/livery-web/vendor/remote-compose-player.d.mts +30 -0
  148. package/node_modules/@yschimke/livery-web/vendor/remote-compose-player.mjs +86 -0
  149. package/package.json +102 -4
@@ -0,0 +1,236 @@
1
+ /**
2
+ * @copyright (c) 2016, Philipp Thürwächter & Pattrick Hüper
3
+ * @copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos
4
+ * @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
5
+ */
6
+ import {ArithmeticException} from './errors';
7
+
8
+ export const MAX_SAFE_INTEGER = 9007199254740991;
9
+ export const MIN_SAFE_INTEGER = -9007199254740991;
10
+
11
+ /**
12
+ * Math helper with static function for integer operations
13
+ */
14
+ export class MathUtil {
15
+ /**
16
+ *
17
+ * @param {number} x
18
+ * @param {number} y
19
+ * @returns {number}
20
+ */
21
+ static intDiv(x, y) {
22
+ let r = x/y;
23
+ r = MathUtil.roundDown(r);
24
+ return MathUtil.safeZero(r);
25
+ }
26
+
27
+ /**
28
+ *
29
+ * @param {number} x
30
+ * @param {number} y
31
+ * @returns {number}
32
+ */
33
+ static intMod(x, y) {
34
+ let r = x - MathUtil.intDiv(x, y) * y;
35
+ r = MathUtil.roundDown(r);
36
+ return MathUtil.safeZero(r);
37
+ }
38
+
39
+ /**
40
+ *
41
+ * @param {number} r
42
+ * @returns {number}
43
+ */
44
+ static roundDown(r){
45
+ if (r < 0) {
46
+ return Math.ceil(r);
47
+ } else {
48
+ return Math.floor(r);
49
+ }
50
+ }
51
+
52
+ /**
53
+ *
54
+ * @param {number} x
55
+ * @param {number} y
56
+ * @returns {number}
57
+ */
58
+ static floorDiv(x, y){
59
+ const r = Math.floor(x / y);
60
+ return MathUtil.safeZero(r);
61
+ }
62
+
63
+ /**
64
+ *
65
+ * @param {number} x
66
+ * @param {number} y
67
+ * @returns {number}
68
+ */
69
+ static floorMod(x, y){
70
+ const r = x - MathUtil.floorDiv(x, y) * y;
71
+ return MathUtil.safeZero(r);
72
+ }
73
+
74
+ /**
75
+ *
76
+ * @param {number} x
77
+ * @param {number} y
78
+ * @returns {number}
79
+ */
80
+ static safeAdd(x, y) {
81
+ MathUtil.verifyInt(x);
82
+ MathUtil.verifyInt(y);
83
+ if (x === 0) {
84
+ return MathUtil.safeZero(y);
85
+ }
86
+ if (y === 0) {
87
+ return MathUtil.safeZero(x);
88
+ }
89
+ const r = MathUtil.safeToInt(x + y);
90
+ if (r === x || r === y) {
91
+ throw new ArithmeticException('Invalid addition beyond MAX_SAFE_INTEGER!');
92
+ }
93
+ return r;
94
+ }
95
+
96
+ /**
97
+ *
98
+ * @param {number} x
99
+ * @param {number} y
100
+ * @returns {number}
101
+ */
102
+ static safeSubtract(x, y) {
103
+ MathUtil.verifyInt(x);
104
+ MathUtil.verifyInt(y);
105
+ if (x === 0 && y === 0) {
106
+ return 0;
107
+ } else if (x === 0) {
108
+ return MathUtil.safeZero(-1 * y);
109
+ } else if (y === 0) {
110
+ return MathUtil.safeZero(x);
111
+ }
112
+ return MathUtil.safeToInt(x - y);
113
+ }
114
+
115
+ /**
116
+ *
117
+ * @param {number} x
118
+ * @param {number} y
119
+ * @returns {number}
120
+ */
121
+ static safeMultiply(x, y) {
122
+ MathUtil.verifyInt(x);
123
+ MathUtil.verifyInt(y);
124
+ if (x === 1) {
125
+ return MathUtil.safeZero(y);
126
+ }
127
+ if (y === 1) {
128
+ return MathUtil.safeZero(x);
129
+ }
130
+ if (x === 0 || y === 0) {
131
+ return 0;
132
+ }
133
+ const r = MathUtil.safeToInt(x * y);
134
+ if (r / y !== x || (x === MIN_SAFE_INTEGER && y === -1) || (y === MIN_SAFE_INTEGER && x === -1)) {
135
+ throw new ArithmeticException('Multiplication overflows: ' + x + ' * ' + y);
136
+ }
137
+ return r;
138
+ }
139
+
140
+ /**
141
+ *
142
+ * @param {number} value
143
+ * @returns {number}
144
+ */
145
+ static parseInt(value) {
146
+ const r = parseInt(value);
147
+ return MathUtil.safeToInt(r);
148
+ }
149
+
150
+ /**
151
+ *
152
+ * @param {number} value
153
+ * @returns {number}
154
+ */
155
+ static safeToInt(value) {
156
+ MathUtil.verifyInt(value);
157
+ return MathUtil.safeZero(value);
158
+ }
159
+
160
+ /**
161
+ *
162
+ * @param {number} value
163
+ */
164
+ static verifyInt(value){
165
+ if (value == null) {
166
+ throw new ArithmeticException(`Invalid value: '${value}', using null or undefined as argument`);
167
+ }
168
+ if (isNaN(value)) {
169
+ throw new ArithmeticException('Invalid int value, using NaN as argument');
170
+ }
171
+ if ((value % 1) !== 0) {
172
+ throw new ArithmeticException(`Invalid value: '${value}' is a float`);
173
+ }
174
+ if (value > MAX_SAFE_INTEGER || value < MIN_SAFE_INTEGER) {
175
+ throw new ArithmeticException('Calculation overflows an int: ' + value);
176
+ }
177
+ }
178
+
179
+ /**
180
+ * convert -0 to 0 and int as string to a number ( '1' -> 1 )
181
+ *
182
+ * @param {number} value
183
+ * @returns {number}
184
+ */
185
+ static safeZero(value){
186
+ return value === 0 ? 0 : +value;
187
+ }
188
+
189
+ /**
190
+ * Compares two Numbers.
191
+ *
192
+ * @param {number} a the first value
193
+ * @param {number} b the second value
194
+ * @return {number} the result
195
+ */
196
+ static compareNumbers(a, b) {
197
+ if (a < b) {
198
+ return -1;
199
+ }
200
+ if (a > b) {
201
+ return 1;
202
+ }
203
+ return 0;
204
+ }
205
+
206
+ // convert to small integer for v8 optimisation
207
+ static smi(int) {
208
+ return ((int >>> 1) & 0x40000000) | (int & 0xBFFFFFFF);
209
+ }
210
+
211
+ // calculate 32 bit hash of a number and convert to SMI
212
+ static hash(number) {
213
+ if (number !== number || number === Infinity) {
214
+ return 0;
215
+ }
216
+ let result = number;
217
+ while (number > 0xFFFFFFFF) {
218
+ number /= 0xFFFFFFFF;
219
+ result ^= number;
220
+ }
221
+ return MathUtil.smi(result);
222
+ }
223
+
224
+ // default hashCode calculation for a number sequence as mentioned by Joshua Bloch
225
+ static hashCode(...numbers) {
226
+ let result = 17;
227
+ for (const n of numbers) {
228
+ result = (result << 5) - result + MathUtil.hash(n);
229
+ }
230
+ return MathUtil.hash(result);
231
+ }
232
+ }
233
+
234
+ MathUtil.MAX_SAFE_INTEGER = MAX_SAFE_INTEGER;
235
+ MathUtil.MIN_SAFE_INTEGER = MIN_SAFE_INTEGER;
236
+