@yschimke/livery-a2ui 0.0.0-stage → 0.12.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,63 @@
1
+ type Nullable<T> = T | null | undefined
2
+ declare function KtSingleton<T>(): T & (abstract new() => any);
3
+ export declare function previewCreate(config: string): number;
4
+ export declare function previewConnect(session: number): not.exported.kotlin.js.Promise<unknown>;
5
+ export declare function previewRefresh(session: number): not.exported.kotlin.js.Promise<unknown>;
6
+ export declare function previewRender(session: number, contract: string, data: string, space: string, designId: Nullable<string>, sha256: Nullable<string>): not.exported.kotlin.js.Promise<unknown>;
7
+ export declare function previewFetchImages(session: number): not.exported.kotlin.js.Promise<unknown>;
8
+ export declare function previewShown(session: number, render: number): void;
9
+ export declare function previewRelease(session: number, render: number): void;
10
+ export declare function previewAction(session: number, render: number, name: string, valueType: string, value: Nullable<string>): not.exported.kotlin.js.Promise<unknown>;
11
+ export declare function previewEvents(session: number): string;
12
+ export declare function previewClose(id: number): void;
13
+ declare namespace not.exported.kotlin.js {
14
+ class Promise<out T> {
15
+ constructor(executor: (resolve: (p0: T) => void, reject: (p0: NonNullable<unknown>) => void) => void);
16
+ then<S>(onFulfilled: Nullable<(p0: T) => S>): not.exported.kotlin.js.Promise<S>;
17
+ then<S>(onFulfilled: Nullable<(p0: T) => S>, onRejected: Nullable<(p0: NonNullable<unknown>) => S>): not.exported.kotlin.js.Promise<S>;
18
+ catch<S>(onRejected: (p0: NonNullable<unknown>) => S): not.exported.kotlin.js.Promise<S>;
19
+ finally(onFinally: () => void): not.exported.kotlin.js.Promise<T>;
20
+ get _hashCode(): number;
21
+ set _hashCode(value: number);
22
+ }
23
+ namespace Promise {
24
+ /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
25
+ namespace $metadata$ {
26
+ const constructor: abstract new <T>() => Promise<T>;
27
+ }
28
+ }
29
+ }
30
+ declare namespace not.exported.kotlin.js.Promise {
31
+ abstract class Companion extends KtSingleton<Companion.$metadata$.constructor>() {
32
+ private constructor();
33
+ }
34
+ namespace Companion {
35
+ /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
36
+ namespace $metadata$ {
37
+ abstract class constructor {
38
+ all<S>(promise: not.exported.kotlin.js.Array<not.exported.kotlin.js.Promise<S>>): not.exported.kotlin.js.Promise<not.exported.kotlin.js.Array<S>>;
39
+ race<S>(promise: not.exported.kotlin.js.Array<not.exported.kotlin.js.Promise<S>>): not.exported.kotlin.js.Promise<S>;
40
+ reject(e: NonNullable<unknown>): not.exported.kotlin.js.Promise<never>;
41
+ resolve<S>(e: S): not.exported.kotlin.js.Promise<S>;
42
+ resolve<S>(e: not.exported.kotlin.js.Promise<S>): not.exported.kotlin.js.Promise<S>;
43
+ get _hashCode(): number;
44
+ set _hashCode(value: number);
45
+ private constructor();
46
+ }
47
+ }
48
+ }
49
+ }
50
+ declare namespace not.exported.kotlin.js {
51
+ class Array<T> {
52
+ constructor();
53
+ get length(): number;
54
+ get _hashCode(): number;
55
+ set _hashCode(value: number);
56
+ }
57
+ namespace Array {
58
+ /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
59
+ namespace $metadata$ {
60
+ const constructor: abstract new <T>() => Array<T>;
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,333 @@
1
+
2
+ import * as QGpzLWpvZGEvY29yZQ from '@js-joda/core';
3
+ import * as d2FzbTpqcy1zdHJpbmc from './livery-livery-web-core.js-builtins.mjs';
4
+
5
+ const wasmJsTag = WebAssembly.JSTag;
6
+ const wasmTag = wasmJsTag ?? new WebAssembly.Tag({ parameters: ['externref'] });
7
+
8
+ // Placed here to give access to it from externals (js_code)
9
+ let wasmExports;
10
+
11
+ if (typeof process !== 'undefined' && process.release.name === 'node') {
12
+ function doNotUseRequire() {
13
+ throw new Error("Do not use top-level require. Prefer to use JS import or define your own require instead. Read more: https://kotl.in/r9txlt")
14
+ }
15
+
16
+ var require = new Proxy((function() {}), {
17
+ apply(target, thisArg, argumentsList) {
18
+ if (globalThis.require != null) {
19
+ return globalThis.require.apply(thisArg, argumentsList);
20
+ } else {
21
+ doNotUseRequire();
22
+ }
23
+ },
24
+ get(target, prop, receiver) {
25
+ if (globalThis.require != null) {
26
+ return Reflect.get(globalThis.require, prop);
27
+ } else {
28
+ doNotUseRequire();
29
+ }
30
+ },
31
+ });
32
+ }
33
+
34
+ export function setWasmExports(exports) {
35
+ wasmExports = exports;
36
+ }
37
+
38
+ const _ref_QGpzLWpvZGEvY29yZQ_ = QGpzLWpvZGEvY29yZQ;
39
+
40
+ const cachedJsObjects = new WeakMap();
41
+ function getCachedJsObject(ref, ifNotCached) {
42
+ if (typeof ref !== 'object' && typeof ref !== 'function') return ifNotCached;
43
+ const cached = cachedJsObjects.get(ref);
44
+ if (cached !== void 0) return cached;
45
+ cachedJsObjects.set(ref, ifNotCached);
46
+ return ifNotCached;
47
+ }
48
+
49
+ const js_code = {
50
+ 'kotlin.createJsError' : (message, cause) => new Error(message, { cause }),
51
+ 'kotlin.wasm.internal.jsThrow' : wasmTag === wasmJsTag ? (e) => { throw e; } : () => {},
52
+ 'kotlin.wasm.internal.getJsEmptyString' : () => '',
53
+ 'kotlin.wasm.internal.externrefToBoolean' : (ref) => Boolean(ref),
54
+ 'kotlin.wasm.internal.externrefToString' : (ref) => String(ref),
55
+ 'kotlin.wasm.internal.externrefEquals' : (lhs, rhs) => lhs === rhs,
56
+ 'kotlin.wasm.internal.externrefHashCode' :
57
+ (() => {
58
+ const dataView = new DataView(new ArrayBuffer(8));
59
+ function numberHashCode(obj) {
60
+ if ((obj | 0) === obj) {
61
+ return obj | 0;
62
+ } else {
63
+ dataView.setFloat64(0, obj, true);
64
+ return (dataView.getInt32(0, true) * 31 | 0) + dataView.getInt32(4, true) | 0;
65
+ }
66
+ }
67
+
68
+ const hashCodes = new WeakMap();
69
+ function getObjectHashCode(obj) {
70
+ const res = hashCodes.get(obj);
71
+ if (res === undefined) {
72
+ const POW_2_32 = 4294967296;
73
+ const hash = (Math.random() * POW_2_32) | 0;
74
+ hashCodes.set(obj, hash);
75
+ return hash;
76
+ }
77
+ return res;
78
+ }
79
+
80
+ function getStringHashCode(str) {
81
+ var hash = 0;
82
+ for (var i = 0; i < str.length; i++) {
83
+ var code = str.charCodeAt(i);
84
+ hash = (hash * 31 + code) | 0;
85
+ }
86
+ return hash;
87
+ }
88
+
89
+ return (obj) => {
90
+ if (obj == null) {
91
+ return 0;
92
+ }
93
+ switch (typeof obj) {
94
+ case "object":
95
+ case "function":
96
+ return getObjectHashCode(obj);
97
+ case "number":
98
+ return numberHashCode(obj);
99
+ case "boolean":
100
+ return obj ? 1231 : 1237;
101
+ default:
102
+ return getStringHashCode(String(obj));
103
+ }
104
+ }
105
+ })(),
106
+ 'kotlin.wasm.internal.isNullish' : (ref) => ref == null,
107
+ 'kotlin.wasm.internal.intToExternref' : (x) => x,
108
+ 'kotlin.wasm.internal.getJsTrue' : () => true,
109
+ 'kotlin.wasm.internal.getJsFalse' : () => false,
110
+ 'kotlin.wasm.internal.kotlinUIntToJsNumberUnsafe' : (x) => x >>> 0,
111
+ 'kotlin.wasm.internal.kotlinULongToJsBigIntUnsafe' : (x) => x & 0xFFFFFFFFFFFFFFFFn,
112
+ 'kotlin.wasm.internal.newJsArray' : () => [],
113
+ 'kotlin.wasm.internal.jsArrayPush' : (array, element) => { array.push(element); },
114
+ 'kotlin.wasm.internal.getCachedJsObject_$external_fun' : (p0, p1) => getCachedJsObject(p0, p1),
115
+ 'kotlin.wasm.internal.utoa32_$external_fun' : (p0) => String(p0),
116
+ 'kotlin.wasm.internal.utoa64_$external_fun' : (p0) => String(p0),
117
+ 'kotlin.wasm.internal.itoa32_$external_fun' : (p0) => String(p0),
118
+ 'kotlin.wasm.internal.itoa64_$external_fun' : (p0) => String(p0),
119
+ 'kotlin.js.jsArrayGet' : (array, index) => array[index],
120
+ 'kotlin.js.length_$external_prop_getter' : (_this) => _this.length,
121
+ 'kotlin.js.stackPlaceHolder_js_code' : () => (''),
122
+ 'kotlin.js.message_$external_prop_getter' : (_this) => _this.message,
123
+ 'kotlin.js.name_$external_prop_setter' : (_this, v) => _this.name = v,
124
+ 'kotlin.js.stack_$external_prop_getter' : (_this) => _this.stack,
125
+ 'kotlin.js.kotlinException_$external_prop_getter' : (_this) => _this.kotlinException,
126
+ 'kotlin.js.kotlinException_$external_prop_setter' : (_this, v) => _this.kotlinException = v,
127
+ 'kotlin.js.JsError_$external_class_instanceof' : (x) => x instanceof Error,
128
+ 'kotlin.js.JsString_$external_class_instanceof' : (x) => typeof x === 'string',
129
+ 'kotlin.js.JsString_$external_class_get' : () => JsString,
130
+ 'kotlin.js.Promise_$external_fun' : (p0) => new Promise(p0),
131
+ 'kotlin.js.__callJsClosure_((Js?)->Unit)' : (f, p0) => f(p0),
132
+ 'kotlin.js.__callJsClosure_((Js)->Unit)' : (f, p0) => f(p0),
133
+ 'kotlin.js.__convertKotlinClosureToJsClosure_2' : (f, trampoline) => getCachedJsObject(f, (p0, p1) => trampoline(f, p0, p1)),
134
+ 'kotlin.js.then_$external_fun' : (_this, p0) => _this.then(p0),
135
+ 'kotlin.js.__convertKotlinClosureToJsClosure_1' : (f, trampoline) => getCachedJsObject(f, (p0) => trampoline(f, p0)),
136
+ 'kotlin.js.then_$external_fun_1' : (_this, p0, p1) => _this.then(p0, p1),
137
+ 'kotlin.js.catch_$external_fun' : (_this, p0) => _this.catch(p0),
138
+ 'kotlin.js.Promise_$external_class_instanceof' : (x) => x instanceof Promise,
139
+ 'kotlin.js.Promise_$external_class_get' : () => Promise,
140
+ 'kotlin.random.initialSeed' : () => ((Math.random() * Math.pow(2, 32)) | 0),
141
+ 'kotlin.wasm.internal.getJsClassName' : (jsKlass) => jsKlass.name,
142
+ 'kotlin.wasm.internal.instanceOf' : (ref, jsKlass) => ref instanceof jsKlass,
143
+ 'kotlin.wasm.internal.getConstructor' : (obj) => obj.constructor,
144
+ 'kotlin.time.Date_$external_fun' : () => new Date(),
145
+ 'kotlin.time.getTime_$external_fun' : (_this, ) => _this.getTime(),
146
+ 'kotlin.time.tryGetPerformance' : () => typeof globalThis !== 'undefined' && typeof globalThis.performance !== 'undefined' ? globalThis.performance : null,
147
+ 'kotlin.time.getPerformanceNow' : (performance) => performance.now(),
148
+ 'kotlin.time.dateNow' : () => Date.now(),
149
+ 'kotlinx.coroutines.tryGetProcess' : () => (typeof(process) !== 'undefined' && typeof(process.nextTick) === 'function') ? process : null,
150
+ 'kotlinx.coroutines.tryGetWindow' : () => (typeof(window) !== 'undefined' && window != null && typeof(window.addEventListener) === 'function') ? window : null,
151
+ 'kotlinx.coroutines.nextTick_$external_fun' : (_this, p0) => _this.nextTick(p0),
152
+ 'kotlinx.coroutines.__convertKotlinClosureToJsClosure_0' : (f, trampoline) => getCachedJsObject(f, () => trampoline(f, )),
153
+ 'kotlinx.coroutines.createScheduleMessagePoster' : (process) => () => Promise.resolve(0).then(process),
154
+ 'kotlinx.coroutines.__callJsClosure_(()->Unit)' : (f, ) => f(),
155
+ 'kotlinx.coroutines.createRescheduleMessagePoster' : (window) => () => window.postMessage('dispatchCoroutine', '*'),
156
+ 'kotlinx.coroutines.subscribeToWindowMessages' : (window, process) => {
157
+ const handler = (event) => {
158
+ if (event.source == window && event.data == 'dispatchCoroutine') {
159
+ event.stopPropagation();
160
+ process();
161
+ }
162
+ }
163
+ window.addEventListener('message', handler, true);
164
+ },
165
+ 'kotlinx.coroutines.setTimeout' : (window, handler, timeout) => window.setTimeout(handler, timeout),
166
+ 'kotlinx.coroutines.clearTimeout' : (handle) => { if (typeof clearTimeout !== 'undefined') clearTimeout(handle); },
167
+ 'kotlinx.coroutines.clearTimeout_$external_fun' : (_this, p0) => _this.clearTimeout(p0),
168
+ 'kotlinx.coroutines.setTimeout_$external_fun' : (p0, p1) => setTimeout(p0, p1),
169
+ 'kotlinx.coroutines.promiseSetDeferred' : (promise, deferred) => promise.deferred = deferred,
170
+ 'kotlinx.coroutines.internal.throwAsyncJsError' : (message, className, stack) => {
171
+ var error = new Error();
172
+ error.message = message;
173
+ error.name = className;
174
+ error.stack = stack;
175
+ if (typeof globalThis.reportError === 'function') {
176
+ // Up-to-date browsers and some non-browser JS runtimes (Deno, Bun)
177
+ globalThis.reportError(error);
178
+ } else {
179
+ // Fallback for old browsers (pre-2022), Node.js
180
+ setTimeout(function () { throw error }, 0);
181
+ }
182
+ },
183
+ 'kotlinx.io.node.sep_$external_prop_getter' : (_this) => _this.sep,
184
+ 'kotlinx.io.getPlatformName' :
185
+ () => (typeof navigator !== "undefined" && navigator.platform) || "unknown"
186
+ ,
187
+ 'kotlinx.io.node.loadBuffer' : ((module) => () => module)(((typeof process !== 'undefined') && (process.release.name === 'node')) ? await import(/* webpackIgnore: true */'node:buffer') : null),
188
+ 'kotlinx.io.node.loadOs' : ((module) => () => module)(((typeof process !== 'undefined') && (process.release.name === 'node')) ? await import(/* webpackIgnore: true */'node:os') : null),
189
+ 'kotlinx.io.node.loadPath' : ((module) => () => module)(((typeof process !== 'undefined') && (process.release.name === 'node')) ? await import(/* webpackIgnore: true */'node:path') : null),
190
+ 'kotlinx.io.node.loadFs' : ((module) => () => module)(((typeof process !== 'undefined') && (process.release.name === 'node')) ? await import(/* webpackIgnore: true */'node:fs') : null),
191
+ 'org.khronos.webgl.getMethodImplForUint8Array' : (obj, index) => obj[index],
192
+ 'org.khronos.webgl.slice_$external_fun' : (_this, p0, p1, isDefault0) => _this.slice(p0, isDefault0 ? undefined : p1, ),
193
+ 'org.khronos.webgl.Uint8Array_$external_fun' : (p0, p1, p2, isDefault0, isDefault1) => new Uint8Array(p0, isDefault0 ? undefined : p1, isDefault1 ? undefined : p2, ),
194
+ 'org.khronos.webgl.length_$external_prop_getter' : (_this) => _this.length,
195
+ 'org.khronos.webgl.buffer_$external_prop_getter' : (_this) => _this.buffer,
196
+ 'org.khronos.webgl.byteOffset_$external_prop_getter' : (_this) => _this.byteOffset,
197
+ 'org.khronos.webgl.byteLength_$external_prop_getter' : (_this) => _this.byteLength,
198
+ 'org.w3c.dom.events.type_$external_prop_getter' : (_this) => _this.type,
199
+ 'org.w3c.dom.events.addEventListener_$external_fun' : (_this, p0, p1, p2) => _this.addEventListener(p0, p1, p2),
200
+ 'org.w3c.dom.events.addEventListener_$external_fun_1' : (_this, p0, p1) => _this.addEventListener(p0, p1),
201
+ 'org.w3c.dom.events.removeEventListener_$external_fun' : (_this, p0, p1) => _this.removeEventListener(p0, p1),
202
+ 'org.w3c.dom.AddEventListenerOptions_js_code' : (passive, once, capture) => ({ passive: passive, once: once, capture: capture }),
203
+ 'org.w3c.dom.readyState_$external_prop_getter' : (_this) => _this.readyState,
204
+ 'org.w3c.dom.protocol_$external_prop_getter' : (_this) => _this.protocol,
205
+ 'org.w3c.dom.binaryType_$external_prop_setter' : (_this, v) => _this.binaryType = v,
206
+ 'org.w3c.dom.close_$external_fun' : (_this, p0, p1, isDefault0, isDefault1) => _this.close(isDefault0 ? undefined : p0, isDefault1 ? undefined : p1, ),
207
+ 'org.w3c.dom.send_$external_fun' : (_this, p0) => _this.send(p0),
208
+ 'org.w3c.dom.send_$external_fun_1' : (_this, p0) => _this.send(p0),
209
+ 'org.w3c.dom.OPEN_$external_prop_getter' : (_this) => _this.OPEN,
210
+ 'org.w3c.dom.Companion_$external_object_getInstance' : () => WebSocket,
211
+ 'org.w3c.dom.data_$external_prop_getter' : (_this) => _this.data,
212
+ 'org.w3c.dom.code_$external_prop_getter' : (_this) => _this.code,
213
+ 'org.w3c.dom.reason_$external_prop_getter' : (_this) => _this.reason,
214
+ 'org.w3c.dom.Companion_$external_object_getInstance_1' : () => ({}),
215
+ 'org.w3c.fetch.status_$external_prop_getter' : (_this) => _this.status,
216
+ 'org.w3c.fetch.statusText_$external_prop_getter' : (_this) => _this.statusText,
217
+ 'org.w3c.fetch.headers_$external_prop_getter' : (_this) => _this.headers,
218
+ 'org.w3c.fetch.body_$external_prop_getter' : (_this) => _this.body,
219
+ 'org.w3c.fetch.get_$external_fun' : (_this, p0) => _this.get(p0),
220
+ 'org.w3c.fetch.Companion_$external_object_getInstance' : () => ({}),
221
+ 'io.ktor.utils.io.js.decode' : (decoder, buffer) => { try { return decoder.decode(buffer) } catch(e) { return null } },
222
+ 'io.ktor.utils.io.js.tryCreateTextDecoder' : (encoding, fatal) => { try { return new TextDecoder(encoding, { fatal: fatal }) } catch(e) { return null } },
223
+ 'io.ktor.utils.io.charsets.toJsArrayImpl' : (x) => new Int8Array(x),
224
+ 'io.ktor.util.date.Date_$external_fun' : () => new Date(),
225
+ 'io.ktor.util.date.Date_$external_fun_1' : (p0) => new Date(p0),
226
+ 'io.ktor.util.date.getTime_$external_fun' : (_this, ) => _this.getTime(),
227
+ 'io.ktor.util.date.getUTCDate_$external_fun' : (_this, ) => _this.getUTCDate(),
228
+ 'io.ktor.util.date.getUTCDay_$external_fun' : (_this, ) => _this.getUTCDay(),
229
+ 'io.ktor.util.date.getUTCFullYear_$external_fun' : (_this, ) => _this.getUTCFullYear(),
230
+ 'io.ktor.util.date.getUTCHours_$external_fun' : (_this, ) => _this.getUTCHours(),
231
+ 'io.ktor.util.date.getUTCMinutes_$external_fun' : (_this, ) => _this.getUTCMinutes(),
232
+ 'io.ktor.util.date.getUTCMonth_$external_fun' : (_this, ) => _this.getUTCMonth(),
233
+ 'io.ktor.util.date.getUTCSeconds_$external_fun' : (_this, ) => _this.getUTCSeconds(),
234
+ 'io.ktor.util.hasNodeApi' : () =>
235
+ (typeof process !== 'undefined'
236
+ && process.versions != null
237
+ && process.versions.node != null) ||
238
+ (typeof window !== 'undefined'
239
+ && typeof window.process !== 'undefined'
240
+ && window.process.versions != null
241
+ && window.process.versions.node != null)
242
+ ,
243
+ 'io.ktor.util.logging.getKtorLogLevel' : () => process ? process.env.KTOR_LOG_LEVEL : null,
244
+ 'io.ktor.util.logging.warn_$external_fun' : (_this, p0) => _this.warn(p0),
245
+ 'io.ktor.util.logging.debug_$external_fun' : (_this, p0) => _this.debug(p0),
246
+ 'io.ktor.util.logging.console_$external_prop_getter' : () => console,
247
+ 'io.ktor.http.locationOrigin' : () => function() {
248
+ var tmpLocation = null
249
+ if (typeof window !== 'undefined') {
250
+ tmpLocation = window.location
251
+ } else if (typeof self !== 'undefined') {
252
+ tmpLocation = self.location
253
+ }
254
+ var origin = ""
255
+ if (tmpLocation) {
256
+ origin = tmpLocation.origin
257
+ }
258
+ return origin && origin != "null" ? origin : "http://localhost"
259
+ }(),
260
+ 'io.ktor.client.engine.js.createBrowserWebSocket' : (urlString_capturingHack, protocols) => new WebSocket(urlString_capturingHack, protocols),
261
+ 'io.ktor.client.engine.js.createWebSocketNodeJs' : (socketCtor, urlString_capturingHack, headers_capturingHack, protocols) => new socketCtor(urlString_capturingHack, protocols, { headers: headers_capturingHack }),
262
+ 'io.ktor.client.engine.js.getKeys' : (headers) => Array.from(headers.keys()),
263
+ 'io.ktor.client.engine.js.compatibility.abortControllerCtorBrowser' : () => AbortController,
264
+ 'io.ktor.client.fetch.body_$external_prop_setter' : (_this, v) => _this.body = v,
265
+ 'io.ktor.client.fetch.headers_$external_prop_setter' : (_this, v) => _this.headers = v,
266
+ 'io.ktor.client.fetch.method_$external_prop_setter' : (_this, v) => _this.method = v,
267
+ 'io.ktor.client.fetch.redirect_$external_prop_setter' : (_this, v) => _this.redirect = v,
268
+ 'io.ktor.client.fetch.signal_$external_prop_setter' : (_this, v) => _this.signal = v,
269
+ 'io.ktor.client.fetch.fetch_$external_fun' : (p0, p1, isDefault0) => fetch(p0, isDefault0 ? undefined : p1, ),
270
+ 'io.ktor.client.fetch.signal_$external_prop_getter' : (_this) => _this.signal,
271
+ 'io.ktor.client.fetch.abort_$external_fun' : (_this, ) => _this.abort(),
272
+ 'io.ktor.client.fetch.getReader_$external_fun' : (_this, ) => _this.getReader(),
273
+ 'io.ktor.client.fetch.cancel_$external_fun' : (_this, p0, isDefault0) => _this.cancel(isDefault0 ? undefined : p0, ),
274
+ 'io.ktor.client.fetch.read_$external_fun' : (_this, ) => _this.read(),
275
+ 'io.ktor.client.fetch.done_$external_prop_getter' : (_this) => _this.done,
276
+ 'io.ktor.client.fetch.value_$external_prop_getter' : (_this) => _this.value,
277
+ 'io.ktor.client.plugins.websocket.tryGetEventDataAsString' : (data) => typeof(data) === 'string' ? data : null,
278
+ 'io.ktor.client.plugins.websocket.tryGetEventDataAsArrayBuffer' : (data) => data instanceof ArrayBuffer ? data : null,
279
+ 'io.ktor.client.utils.makeJsObject' : () => { return {}; },
280
+ 'io.ktor.client.utils.makeImport' : (name) => import(name),
281
+ 'io.ktor.client.utils.makeJsCall' : (func, arg) => func.apply(null, arg),
282
+ 'io.ktor.client.utils.jsObjectAssign' : () => Object.assign,
283
+ 'io.ktor.client.utils.makeJsNew' : (ctor) => new ctor(),
284
+ 'io.ktor.client.utils.getObjectField' : (obj, name) => obj[name],
285
+ 'io.ktor.client.utils.setObjectField' : (obj, name, value) => obj[name]=value,
286
+ 'io.ktor.client.utils.eventAsString' : (event) => JSON.stringify(event, ['message', 'target', 'type', 'isTrusted']),
287
+ 'io.ktor.client.utils.toJsArrayImpl' : (x) => new Uint8Array(x),
288
+ 'ee.schimke.livery.client.asUint8' : (buffer) => new Uint8Array(buffer),
289
+ 'ee.schimke.livery.client.digest' : (data) => crypto.subtle.digest('SHA-256', data),
290
+ 'ee.schimke.livery.client.importEd25519' : (key) => crypto.subtle.importKey('raw', key, { name: 'Ed25519' }, false, ['verify']),
291
+ 'ee.schimke.livery.client.verify' : (key, signature, message) => crypto.subtle.verify({ name: 'Ed25519' }, key, signature, message),
292
+ 'ee.schimke.livery.client.uint8Length' : (a) => a.length,
293
+ 'ee.schimke.livery.client.getUint8' : (a, i) => a[i],
294
+ 'ee.schimke.livery.client.newUint8' : (size) => new Uint8Array(size),
295
+ 'ee.schimke.livery.client.setUint8' : (a, i, v) => { a[i] = v; },
296
+ 'ee.schimke.composeai.rcplayer.trace.performanceMark' : (name) => { try { performance.mark(name); } catch (e) {} },
297
+ 'ee.schimke.composeai.rcplayer.trace.performanceMeasure' : (name, startMark) => { try { performance.measure(name, startMark); } catch (e) {} },
298
+ 'ee.schimke.composeai.rcplayer.trace.performanceClearMarks' : (name) => { try { performance.clearMarks(name); } catch (e) {} },
299
+ 'kotlinx.datetime.internal.Date_$external_fun' : (p0) => new Date(p0),
300
+ 'kotlinx.datetime.internal.getTimezoneOffset_$external_fun' : (_this, ) => _this.getTimezoneOffset(),
301
+ 'kotlinx.datetime.internal.JSJoda.ZoneRulesProvider_$external_object_getInstance' : () => _ref_QGpzLWpvZGEvY29yZQ_.ZoneRulesProvider,
302
+ 'kotlinx.datetime.internal.JSJoda.id_$external_fun' : (_this, ) => _this.id(),
303
+ 'kotlinx.datetime.internal.JSJoda.systemDefault_$external_fun' : (_this, ) => _this.systemDefault(),
304
+ 'kotlinx.datetime.internal.JSJoda.Companion_$external_object_getInstance' : () => _ref_QGpzLWpvZGEvY29yZQ_.ZoneId,
305
+ 'kotlinx.datetime.internal.withCaughtJsException' : (body) => {
306
+ try {
307
+ body();
308
+ return null;
309
+ } catch(e) {
310
+ return e;
311
+ }
312
+ },
313
+ 'kotlinx.datetime.internal.getExceptionMessage' : (jsException) => jsException.message,
314
+ 'kotlinx.datetime.internal.getZones' : (rulesProvider) => rulesProvider.getTzdbData().zones,
315
+ 'kotlinx.datetime.internal.getLinks' : (rulesProvider) => rulesProvider.getTzdbData().links
316
+ }
317
+
318
+ const StringConstantsProxy = new Proxy({}, {
319
+ get(_, prop) { return prop; }
320
+ });
321
+
322
+ export { wasmTag as __TAG };
323
+
324
+ export const importObject = {
325
+ js_code,
326
+ intrinsics: {
327
+ memory: new WebAssembly.Memory({ initial: 0 }),
328
+ tag: wasmTag
329
+ },
330
+ "'": StringConstantsProxy,
331
+ 'wasm:js-string': d2FzbTpqcy1zdHJpbmc,
332
+ };
333
+
@@ -0,0 +1,52 @@
1
+ export const length = (s) => s.length
2
+ export const concat = (a, b) => a + b
3
+ export const charCodeAt = (s, i) => s.charCodeAt(i >>> 0)
4
+ export const substring = (s, start, end) => {
5
+ start >>>= 0;
6
+ end >>>= 0;
7
+ return s.substring(start, end);
8
+ }
9
+
10
+ export const compare = (a, b) => {
11
+ return a === b ? 0 : a < b ? -1 : 1;
12
+ }
13
+
14
+ export const equals = (a, b) => a === b ? 1 : 0
15
+ const moduleFromCharCodeArray = new WebAssembly.Module(new Uint8Array([
16
+ 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0b, 0x02, 0x5e,
17
+ 0x77, 0x01, 0x60, 0x02, 0x64, 0x00, 0x7f, 0x01, 0x7f, 0x03, 0x02, 0x01,
18
+ 0x01, 0x07, 0x0b, 0x01, 0x07, 0x61, 0x31, 0x36, 0x5f, 0x67, 0x65, 0x74,
19
+ 0x00, 0x00, 0x0a, 0x0b, 0x01, 0x09, 0x00, 0x20, 0x00, 0x20, 0x01, 0xfb,
20
+ 0x0d, 0x00, 0x0b, 0x00, 0x13, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x04, 0x0c,
21
+ 0x01, 0x00, 0x09, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x69, 0x31, 0x36
22
+ ]));
23
+ const helpersFromCharCodeArray = new WebAssembly.Instance(moduleFromCharCodeArray).exports;
24
+
25
+ export const fromCharCodeArray = (array, start, end) => {
26
+ start >>>= 0;
27
+ end >>>= 0;
28
+ let result = [];
29
+ for (let i = start; i < end; i++) {
30
+ result.push(String.fromCharCode(helpersFromCharCodeArray.a16_get(array, i)));
31
+ }
32
+ return result.join("");
33
+ }
34
+
35
+ const moduleIntoCharCode = new WebAssembly.Module(new Uint8Array([
36
+ 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0b, 0x02, 0x5e,
37
+ 0x77, 0x01, 0x60, 0x03, 0x64, 0x00, 0x7f, 0x7f, 0x00, 0x03, 0x02, 0x01,
38
+ 0x01, 0x07, 0x0b, 0x01, 0x07, 0x61, 0x31, 0x36, 0x5f, 0x73, 0x65, 0x74,
39
+ 0x00, 0x00, 0x0a, 0x0d, 0x01, 0x0b, 0x00, 0x20, 0x00, 0x20, 0x01, 0x20,
40
+ 0x02, 0xfb, 0x0e, 0x00, 0x0b, 0x00, 0x13, 0x04, 0x6e, 0x61, 0x6d, 0x65,
41
+ 0x04, 0x0c, 0x01, 0x00, 0x09, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x69,
42
+ 0x31, 0x36
43
+ ]));
44
+ const helpersIntoCharCode = new WebAssembly.Instance(moduleIntoCharCode).exports;
45
+
46
+ export const intoCharCodeArray = (s, array, start) => {
47
+ start >>>= 0;
48
+ for (let i = 0; i < s.length; i++) {
49
+ helpersIntoCharCode.a16_set(array, start + i, s.charCodeAt(i));
50
+ }
51
+ return s.length;
52
+ }
@@ -0,0 +1,92 @@
1
+
2
+
3
+ import { importObject, setWasmExports } from './livery-livery-web-core.import-object.mjs'
4
+
5
+ let wasmInstance;
6
+
7
+ const wasmOptions = { builtins: ['js-string'], importedStringConstants: "'" }
8
+
9
+ try {
10
+ if ((typeof process !== 'undefined') && (process.release.name === 'node')) {
11
+ const fs = await import(/* webpackIgnore: true */'node:fs');
12
+ const url = await import(/* webpackIgnore: true */'node:url');
13
+ const filepath = import.meta.resolve('./livery-livery-web-core.wasm');
14
+ const wasmBuffer = fs.readFileSync(url.fileURLToPath(filepath));
15
+ const wasmModule = new WebAssembly.Module(wasmBuffer, wasmOptions);
16
+ wasmInstance = new WebAssembly.Instance(wasmModule, importObject);
17
+ } else if (typeof Deno !== 'undefined') {
18
+ const path = await import(/* webpackIgnore: true */'https://deno.land/std/path/mod.ts');
19
+ const binary = Deno.readFileSync(path.fromFileUrl(import.meta.resolve('./livery-livery-web-core.wasm')));
20
+ const module = await WebAssembly.compile(binary, wasmOptions);
21
+ wasmInstance = await WebAssembly.instantiate(module, importObject);
22
+ } else if (
23
+ (typeof d8 !== 'undefined' // V8
24
+ || typeof inIon !== 'undefined' // SpiderMonkey
25
+ || typeof jscOptions !== 'undefined' // JavaScriptCore
26
+ )
27
+ ) {
28
+ const filepath = import.meta.url.replace(/\.mjs$/, '.wasm');
29
+ const wasmBuffer = read(filepath, 'binary');
30
+ const wasmModule = new WebAssembly.Module(wasmBuffer, wasmOptions);
31
+ wasmInstance = new WebAssembly.Instance(wasmModule, importObject);
32
+ } else {
33
+ wasmInstance = (await WebAssembly.instantiateStreaming(fetch(new URL('./livery-livery-web-core.wasm',import.meta.url).href), importObject, wasmOptions)).instance;
34
+ }
35
+ } catch (e) {
36
+ if (e instanceof WebAssembly.CompileError) {
37
+ let text = `Please make sure that your runtime environment supports the latest version of Wasm GC and Exception-Handling proposals.
38
+ For more information, see https://kotl.in/wasm-help
39
+ `;
40
+ if (typeof console !== "undefined" && console.error !== void 0) {
41
+ console.error(text);
42
+ } else {
43
+ const t = "\n" + text;
44
+ if (typeof console !== "undefined" && console.log !== void 0)
45
+ console.log(t);
46
+ else
47
+ print(t);
48
+ }
49
+ }
50
+ throw e;
51
+ }
52
+
53
+ const exports = wasmInstance.exports
54
+
55
+ let memoryFirstTimeAccess = true;
56
+ const memoryProxy = new Proxy(importObject.intrinsics.memory, {
57
+ get(target, prop, receiver) {
58
+ if (memoryFirstTimeAccess) {
59
+ memoryFirstTimeAccess = false;
60
+ console.error('Accessing `memory` via `wasmExports` is deprecated. Use `kotlin.wasm.unsafe.wasmMemory` or update dependencies. Read more: https://kotl.in/vr3szr');
61
+ }
62
+ return Reflect.get(target, prop);
63
+ }
64
+ });
65
+ const wasmExports = new Proxy(memoryProxy, {
66
+ get(target, prop, receiver) {
67
+ if (prop == 'memory') {
68
+ return target;
69
+ } else {
70
+ throw new Error('Accessing exports via `wasmExports` is no longer supported. Remove usages or update dependencies. Read more: https://kotl.in/vr3szr');
71
+ }
72
+ }
73
+ });
74
+
75
+ const wasmMemory = wasmExports.memory;
76
+ export { wasmMemory as memory }
77
+
78
+ export const {
79
+ previewCreate,
80
+ previewConnect,
81
+ previewRefresh,
82
+ previewRender,
83
+ previewFetchImages,
84
+ previewShown,
85
+ previewRelease,
86
+ previewAction,
87
+ previewEvents,
88
+ previewClose
89
+ } = exports
90
+
91
+ setWasmExports(wasmExports);
92
+
@@ -0,0 +1,65 @@
1
+ import type { HostValue } from '../vendor/remote-compose-player.mjs';
2
+ /** A host named action the document sent: its name and value, as the player reported them. */
3
+ export interface NamedAction {
4
+ name: string;
5
+ valueType: 'none' | 'string' | 'int' | 'float';
6
+ value: unknown;
7
+ }
8
+ /** A persistent in-page renderer. Superseded shows resolve false; dispose cancels pending work. */
9
+ export interface LiveryPlayer {
10
+ /** Finite wrap-content height when supported by this player. */
11
+ readonly measuredHeightDp?: number;
12
+ show(key: string, document: Uint8Array, values: Record<string, HostValue>, widthPx: number, heightPx: number, density: number): Promise<boolean>;
13
+ resize(widthPx: number, heightPx: number, density: number): void;
14
+ forget(): void;
15
+ dispose(): void;
16
+ readonly stats: {
17
+ loads: number;
18
+ sets: number;
19
+ };
20
+ }
21
+ export type LiveryPlayerFactory = (container: HTMLElement, onAction: (action: NamedAction) => void) => LiveryPlayer;
22
+ /**
23
+ * The TypeScript Remote Compose player on a canvas in [container], in the page itself. A document
24
+ * is loaded once; its named values are set on it while it plays, so a data change moves the values
25
+ * and never reloads the document (Remote Compose's model, as `LiveryTemplate` does on Compose).
26
+ */
27
+ export declare class RcCanvasPlayer implements LiveryPlayer {
28
+ private readonly onAction;
29
+ private readonly options;
30
+ private readonly handle;
31
+ private host;
32
+ private key?;
33
+ private geometry?;
34
+ private values;
35
+ /** Shows run one after another; one asked for while another runs replaces any still queued. */
36
+ private queue;
37
+ private latest;
38
+ /** Last root layout height, in dp, after applying named values. */
39
+ measuredHeightDp?: number;
40
+ private disposed;
41
+ private epoch;
42
+ /** Documents loaded and values set, for tests and debugging. */
43
+ readonly stats: {
44
+ loads: number;
45
+ sets: number;
46
+ };
47
+ constructor(container: HTMLElement, onAction: (a: NamedAction) => void, options?: {
48
+ reloadOnResize?: boolean;
49
+ });
50
+ private bindHost;
51
+ /**
52
+ * Shows [documentKey]'s document with [values]: loads [document] only when the key differs from
53
+ * the one playing, then sets each value that changed. A load is asynchronous, so shows are
54
+ * queued: each waits for the one before it, and a show superseded while it waits does nothing
55
+ * (resolves `false`), so an older one can never land after a newer one.
56
+ */
57
+ show(documentKey: string, document: Uint8Array, values: Record<string, HostValue>, widthPx: number, heightPx: number, density: number): Promise<boolean>;
58
+ private apply;
59
+ /** The canvas at [widthPx] × [heightPx] CSS pixels. */
60
+ resize(widthPx: number, heightPx: number, density: number): void;
61
+ /** Forgets the document playing, so the next [show] loads its document again. */
62
+ forget(): void;
63
+ dispose(): void;
64
+ }
65
+ export type { HostValue } from '../vendor/remote-compose-player.mjs';