@amazon-devices/kepler-graphics 2.3.5 → 2.4.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 (22) hide show
  1. package/SystemBundles/dfa819fc45ec7441ad32aeb1438bef9e177db9f571b5fe997cfd30da0783e0d1.bundle.map +1 -0
  2. package/SystemBundles/hermes-072/dfa819fc45ec7441ad32aeb1438bef9e177db9f571b5fe997cfd30da0783e0d1.bundle.map +1 -0
  3. package/SystemBundles/hermes-072/index.amzn__kepler-graphics-2.hermes.bundle +0 -0
  4. package/SystemBundles/hermes-083/dfa819fc45ec7441ad32aeb1438bef9e177db9f571b5fe997cfd30da0783e0d1.bundle.map +1 -0
  5. package/SystemBundles/hermes-083/index.amzn__kepler-graphics-2.hermes.bundle +0 -0
  6. package/SystemBundles/index.amzn__kepler-graphics-2.hermes.bundle +0 -0
  7. package/SystemModules/amzn__kepler-graphics-2.private.modules.txt +5 -8
  8. package/dist/turbo-modules/AmazonGraphicsTurboModule.d.ts +5 -0
  9. package/dist/turbo-modules/Display.d.ts +26 -1
  10. package/dist/turbo-modules/Display.js +34 -0
  11. package/dist/turbo-modules/DisplayManager.d.ts +10 -1
  12. package/dist/turbo-modules/DisplayManager.js +11 -0
  13. package/dist/turbo-modules/__mocks__/AmazonGraphicsTurboModule.d.ts +5 -1
  14. package/dist/turbo-modules/__mocks__/AmazonGraphicsTurboModule.js +4 -0
  15. package/dist/types/GraphicsTypes.d.ts +22 -0
  16. package/dist/types/GraphicsTypes.js +20 -1
  17. package/dist/types/index.d.ts +2 -2
  18. package/dist/types/index.js +2 -1
  19. package/kepler-compatibility.json +2 -1
  20. package/package.json +1 -1
  21. package/SystemBundles/85e2040f418404d98b11030ca64ecbfc82c6b30d1405fd2340da85bab1c6b9ae.bundle +0 -1742
  22. package/SystemBundles/85e2040f418404d98b11030ca64ecbfc82c6b30d1405fd2340da85bab1c6b9ae.bundle.map +0 -1
@@ -1,1742 +0,0 @@
1
- var __BUNDLE_START_TIME__=this.nativePerformanceNow?nativePerformanceNow():Date.now(),__DEV__=false,process=this.process||{},__METRO_GLOBAL_PREFIX__='';process.env=process.env||{};process.env.NODE_ENV=process.env.NODE_ENV||"production";
2
- (function (global) {
3
- /**
4
- * Copyright (c) Meta Platforms, Inc. and affiliates.
5
- *
6
- * This source code is licensed under the MIT license found in the
7
- * LICENSE file in the root directory of this source tree.
8
- *
9
- * @polyfill
10
- * @nolint
11
- * @format
12
- */
13
-
14
- /* eslint-disable no-shadow, eqeqeq, curly, no-unused-vars, no-void, no-control-regex */
15
-
16
- /**
17
- * This pipes all of our console logging functions to native logging so that
18
- * JavaScript errors in required modules show up in Xcode via NSLog.
19
- */
20
- var inspect = function () {
21
- // Copyright Joyent, Inc. and other Node contributors.
22
- //
23
- // Permission is hereby granted, free of charge, to any person obtaining a
24
- // copy of this software and associated documentation files (the
25
- // "Software"), to deal in the Software without restriction, including
26
- // without limitation the rights to use, copy, modify, merge, publish,
27
- // distribute, sublicense, and/or sell copies of the Software, and to permit
28
- // persons to whom the Software is furnished to do so, subject to the
29
- // following conditions:
30
- //
31
- // The above copyright notice and this permission notice shall be included
32
- // in all copies or substantial portions of the Software.
33
- //
34
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
35
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
37
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
38
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
39
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
40
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
41
- //
42
- // https://github.com/joyent/node/blob/master/lib/util.js
43
-
44
- function inspect(obj, opts) {
45
- var ctx = {
46
- seen: [],
47
- formatValueCalls: 0,
48
- stylize: stylizeNoColor
49
- };
50
- return formatValue(ctx, obj, opts.depth);
51
- }
52
- function stylizeNoColor(str, styleType) {
53
- return str;
54
- }
55
- function arrayToHash(array) {
56
- var hash = {};
57
- array.forEach(function (val, idx) {
58
- hash[val] = true;
59
- });
60
- return hash;
61
- }
62
- function formatValue(ctx, value, recurseTimes) {
63
- ctx.formatValueCalls++;
64
- if (ctx.formatValueCalls > 200) {
65
- return `[TOO BIG formatValueCalls ${ctx.formatValueCalls} exceeded limit of 200]`;
66
- }
67
-
68
- // Primitive types cannot have properties
69
- var primitive = formatPrimitive(ctx, value);
70
- if (primitive) {
71
- return primitive;
72
- }
73
-
74
- // Look up the keys of the object.
75
- var keys = Object.keys(value);
76
- var visibleKeys = arrayToHash(keys);
77
-
78
- // IE doesn't make error fields non-enumerable
79
- // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
80
- if (isError(value) && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
81
- return formatError(value);
82
- }
83
-
84
- // Some type of object without properties can be shortcutted.
85
- if (keys.length === 0) {
86
- if (isFunction(value)) {
87
- var name = value.name ? ': ' + value.name : '';
88
- return ctx.stylize('[Function' + name + ']', 'special');
89
- }
90
- if (isRegExp(value)) {
91
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
92
- }
93
- if (isDate(value)) {
94
- return ctx.stylize(Date.prototype.toString.call(value), 'date');
95
- }
96
- if (isError(value)) {
97
- return formatError(value);
98
- }
99
- }
100
- var base = '',
101
- array = false,
102
- braces = ['{', '}'];
103
-
104
- // Make Array say that they are Array
105
- if (isArray(value)) {
106
- array = true;
107
- braces = ['[', ']'];
108
- }
109
-
110
- // Make functions say that they are functions
111
- if (isFunction(value)) {
112
- var n = value.name ? ': ' + value.name : '';
113
- base = ' [Function' + n + ']';
114
- }
115
-
116
- // Make RegExps say that they are RegExps
117
- if (isRegExp(value)) {
118
- base = ' ' + RegExp.prototype.toString.call(value);
119
- }
120
-
121
- // Make dates with properties first say the date
122
- if (isDate(value)) {
123
- base = ' ' + Date.prototype.toUTCString.call(value);
124
- }
125
-
126
- // Make error with message first say the error
127
- if (isError(value)) {
128
- base = ' ' + formatError(value);
129
- }
130
- if (keys.length === 0 && (!array || value.length == 0)) {
131
- return braces[0] + base + braces[1];
132
- }
133
- if (recurseTimes < 0) {
134
- if (isRegExp(value)) {
135
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
136
- } else {
137
- return ctx.stylize('[Object]', 'special');
138
- }
139
- }
140
- ctx.seen.push(value);
141
- var output;
142
- if (array) {
143
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
144
- } else {
145
- output = keys.map(function (key) {
146
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
147
- });
148
- }
149
- ctx.seen.pop();
150
- return reduceToSingleString(output, base, braces);
151
- }
152
- function formatPrimitive(ctx, value) {
153
- if (isUndefined(value)) return ctx.stylize('undefined', 'undefined');
154
- if (isString(value)) {
155
- var simple = "'" + JSON.stringify(value).replace(/^"|"$/g, '').replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
156
- return ctx.stylize(simple, 'string');
157
- }
158
- if (isNumber(value)) return ctx.stylize('' + value, 'number');
159
- if (isBoolean(value)) return ctx.stylize('' + value, 'boolean');
160
- // For some reason typeof null is "object", so special case here.
161
- if (isNull(value)) return ctx.stylize('null', 'null');
162
- }
163
- function formatError(value) {
164
- return '[' + Error.prototype.toString.call(value) + ']';
165
- }
166
- function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
167
- var output = [];
168
- for (var i = 0, l = value.length; i < l; ++i) {
169
- if (hasOwnProperty(value, String(i))) {
170
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
171
- } else {
172
- output.push('');
173
- }
174
- }
175
- keys.forEach(function (key) {
176
- if (!key.match(/^\d+$/)) {
177
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
178
- }
179
- });
180
- return output;
181
- }
182
- function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
183
- var name, str, desc;
184
- desc = Object.getOwnPropertyDescriptor(value, key) || {
185
- value: value[key]
186
- };
187
- if (desc.get) {
188
- if (desc.set) {
189
- str = ctx.stylize('[Getter/Setter]', 'special');
190
- } else {
191
- str = ctx.stylize('[Getter]', 'special');
192
- }
193
- } else {
194
- if (desc.set) {
195
- str = ctx.stylize('[Setter]', 'special');
196
- }
197
- }
198
- if (!hasOwnProperty(visibleKeys, key)) {
199
- name = '[' + key + ']';
200
- }
201
- if (!str) {
202
- if (ctx.seen.indexOf(desc.value) < 0) {
203
- if (isNull(recurseTimes)) {
204
- str = formatValue(ctx, desc.value, null);
205
- } else {
206
- str = formatValue(ctx, desc.value, recurseTimes - 1);
207
- }
208
- if (str.indexOf('\n') > -1) {
209
- if (array) {
210
- str = str.split('\n').map(function (line) {
211
- return ' ' + line;
212
- }).join('\n').substr(2);
213
- } else {
214
- str = '\n' + str.split('\n').map(function (line) {
215
- return ' ' + line;
216
- }).join('\n');
217
- }
218
- }
219
- } else {
220
- str = ctx.stylize('[Circular]', 'special');
221
- }
222
- }
223
- if (isUndefined(name)) {
224
- if (array && key.match(/^\d+$/)) {
225
- return str;
226
- }
227
- name = JSON.stringify('' + key);
228
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
229
- name = name.substr(1, name.length - 2);
230
- name = ctx.stylize(name, 'name');
231
- } else {
232
- name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
233
- name = ctx.stylize(name, 'string');
234
- }
235
- }
236
- return name + ': ' + str;
237
- }
238
- function reduceToSingleString(output, base, braces) {
239
- var numLinesEst = 0;
240
- var length = output.reduce(function (prev, cur) {
241
- numLinesEst++;
242
- if (cur.indexOf('\n') >= 0) numLinesEst++;
243
- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
244
- }, 0);
245
- if (length > 60) {
246
- return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1];
247
- }
248
- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
249
- }
250
-
251
- // NOTE: These type checking functions intentionally don't use `instanceof`
252
- // because it is fragile and can be easily faked with `Object.create()`.
253
- function isArray(ar) {
254
- return Array.isArray(ar);
255
- }
256
- function isBoolean(arg) {
257
- return typeof arg === 'boolean';
258
- }
259
- function isNull(arg) {
260
- return arg === null;
261
- }
262
- function isNumber(arg) {
263
- return typeof arg === 'number';
264
- }
265
- function isString(arg) {
266
- return typeof arg === 'string';
267
- }
268
- function isUndefined(arg) {
269
- return arg === undefined;
270
- }
271
- function isRegExp(re) {
272
- return isObject(re) && objectToString(re) === '[object RegExp]';
273
- }
274
- function isObject(arg) {
275
- return typeof arg === 'object' && arg !== null;
276
- }
277
- function isDate(d) {
278
- return isObject(d) && objectToString(d) === '[object Date]';
279
- }
280
- function isError(e) {
281
- return isObject(e) && (objectToString(e) === '[object Error]' || e instanceof Error);
282
- }
283
- function isFunction(arg) {
284
- return typeof arg === 'function';
285
- }
286
- function objectToString(o) {
287
- return Object.prototype.toString.call(o);
288
- }
289
- function hasOwnProperty(obj, prop) {
290
- return Object.prototype.hasOwnProperty.call(obj, prop);
291
- }
292
- return inspect;
293
- }();
294
- var OBJECT_COLUMN_NAME = '(index)';
295
- var LOG_LEVELS = {
296
- trace: 0,
297
- info: 1,
298
- warn: 2,
299
- error: 3
300
- };
301
- var INSPECTOR_LEVELS = [];
302
- INSPECTOR_LEVELS[LOG_LEVELS.trace] = 'debug';
303
- INSPECTOR_LEVELS[LOG_LEVELS.info] = 'log';
304
- INSPECTOR_LEVELS[LOG_LEVELS.warn] = 'warning';
305
- INSPECTOR_LEVELS[LOG_LEVELS.error] = 'error';
306
-
307
- // Strip the inner function in getNativeLogFunction(), if in dev also
308
- // strip method printing to originalConsole.
309
- var INSPECTOR_FRAMES_TO_SKIP = 1;
310
- function getNativeLogFunction(level) {
311
- return function () {
312
- var str;
313
- if (arguments.length === 1 && typeof arguments[0] === 'string') {
314
- str = arguments[0];
315
- } else {
316
- str = Array.prototype.map.call(arguments, function (arg) {
317
- return inspect(arg, {
318
- depth: 10
319
- });
320
- }).join(', ');
321
- }
322
-
323
- // TRICKY
324
- // If more than one argument is provided, the code above collapses them all
325
- // into a single formatted string. This transform wraps string arguments in
326
- // single quotes (e.g. "foo" -> "'foo'") which then breaks the "Warning:"
327
- // check below. So it's important that we look at the first argument, rather
328
- // than the formatted argument string.
329
- var firstArg = arguments[0];
330
- var logLevel = level;
331
- if (typeof firstArg === 'string' && firstArg.slice(0, 9) === 'Warning: ' && logLevel >= LOG_LEVELS.error) {
332
- // React warnings use console.error so that a stack trace is shown,
333
- // but we don't (currently) want these to show a redbox
334
- // (Note: Logic duplicated in ExceptionsManager.js.)
335
- logLevel = LOG_LEVELS.warn;
336
- }
337
- if (global.__inspectorLog) {
338
- global.__inspectorLog(INSPECTOR_LEVELS[logLevel], str, [].slice.call(arguments), INSPECTOR_FRAMES_TO_SKIP);
339
- }
340
- if (groupStack.length) {
341
- str = groupFormat('', str);
342
- }
343
- global.nativeLoggingHook(str, logLevel);
344
- };
345
- }
346
- function repeat(element, n) {
347
- return Array.apply(null, Array(n)).map(function () {
348
- return element;
349
- });
350
- }
351
- function consoleTablePolyfill(rows) {
352
- // convert object -> array
353
- if (!Array.isArray(rows)) {
354
- var data = rows;
355
- rows = [];
356
- for (var key in data) {
357
- if (data.hasOwnProperty(key)) {
358
- var row = data[key];
359
- row[OBJECT_COLUMN_NAME] = key;
360
- rows.push(row);
361
- }
362
- }
363
- }
364
- if (rows.length === 0) {
365
- global.nativeLoggingHook('', LOG_LEVELS.info);
366
- return;
367
- }
368
- var columns = Object.keys(rows[0]).sort();
369
- var stringRows = [];
370
- var columnWidths = [];
371
-
372
- // Convert each cell to a string. Also
373
- // figure out max cell width for each column
374
- columns.forEach(function (k, i) {
375
- columnWidths[i] = k.length;
376
- for (var j = 0; j < rows.length; j++) {
377
- var cellStr = (rows[j][k] || '?').toString();
378
- stringRows[j] = stringRows[j] || [];
379
- stringRows[j][i] = cellStr;
380
- columnWidths[i] = Math.max(columnWidths[i], cellStr.length);
381
- }
382
- });
383
-
384
- // Join all elements in the row into a single string with | separators
385
- // (appends extra spaces to each cell to make separators | aligned)
386
- function joinRow(row, space) {
387
- var cells = row.map(function (cell, i) {
388
- var extraSpaces = repeat(' ', columnWidths[i] - cell.length).join('');
389
- return cell + extraSpaces;
390
- });
391
- space = space || ' ';
392
- return cells.join(space + '|' + space);
393
- }
394
- var separators = columnWidths.map(function (columnWidth) {
395
- return repeat('-', columnWidth).join('');
396
- });
397
- var separatorRow = joinRow(separators, '-');
398
- var header = joinRow(columns);
399
- var table = [header, separatorRow];
400
- for (var i = 0; i < rows.length; i++) {
401
- table.push(joinRow(stringRows[i]));
402
- }
403
-
404
- // Notice extra empty line at the beginning.
405
- // Native logging hook adds "RCTLog >" at the front of every
406
- // logged string, which would shift the header and screw up
407
- // the table
408
- global.nativeLoggingHook('\n' + table.join('\n'), LOG_LEVELS.info);
409
- }
410
- var GROUP_PAD = "\u2502"; // Box light vertical
411
- var GROUP_OPEN = "\u2510"; // Box light down+left
412
- var GROUP_CLOSE = "\u2518"; // Box light up+left
413
-
414
- var groupStack = [];
415
- function groupFormat(prefix, msg) {
416
- // Insert group formatting before the console message
417
- return groupStack.join('') + prefix + ' ' + (msg || '');
418
- }
419
- function consoleGroupPolyfill(label) {
420
- global.nativeLoggingHook(groupFormat(GROUP_OPEN, label), LOG_LEVELS.info);
421
- groupStack.push(GROUP_PAD);
422
- }
423
- function consoleGroupCollapsedPolyfill(label) {
424
- global.nativeLoggingHook(groupFormat(GROUP_CLOSE, label), LOG_LEVELS.info);
425
- groupStack.push(GROUP_PAD);
426
- }
427
- function consoleGroupEndPolyfill() {
428
- groupStack.pop();
429
- global.nativeLoggingHook(groupFormat(GROUP_CLOSE), LOG_LEVELS.info);
430
- }
431
- function consoleAssertPolyfill(expression, label) {
432
- if (!expression) {
433
- global.nativeLoggingHook('Assertion failed: ' + label, LOG_LEVELS.error);
434
- }
435
- }
436
- if (global.nativeLoggingHook) {
437
- var originalConsole = global.console;
438
- // Preserve the original `console` as `originalConsole`
439
-
440
- global.console = {
441
- error: getNativeLogFunction(LOG_LEVELS.error),
442
- info: getNativeLogFunction(LOG_LEVELS.info),
443
- log: getNativeLogFunction(LOG_LEVELS.info),
444
- warn: getNativeLogFunction(LOG_LEVELS.warn),
445
- trace: getNativeLogFunction(LOG_LEVELS.trace),
446
- debug: getNativeLogFunction(LOG_LEVELS.trace),
447
- table: consoleTablePolyfill,
448
- group: consoleGroupPolyfill,
449
- groupEnd: consoleGroupEndPolyfill,
450
- groupCollapsed: consoleGroupCollapsedPolyfill,
451
- assert: consoleAssertPolyfill
452
- };
453
- Object.defineProperty(console, '_isPolyfilled', {
454
- value: true,
455
- enumerable: false
456
- });
457
-
458
- // If available, also call the original `console` method since that is
459
- // sometimes useful. Ex: on OS X, this will let you see rich output in
460
- // the Safari Web Inspector console.
461
- } else if (!global.console) {
462
- var stub = function stub() {};
463
- var log = global.print || stub;
464
- global.console = {
465
- debug: log,
466
- error: log,
467
- info: log,
468
- log: log,
469
- trace: log,
470
- warn: log,
471
- assert: function assert(expression, label) {
472
- if (!expression) {
473
- log('Assertion failed: ' + label);
474
- }
475
- },
476
- clear: stub,
477
- dir: stub,
478
- dirxml: stub,
479
- group: stub,
480
- groupCollapsed: stub,
481
- groupEnd: stub,
482
- profile: stub,
483
- profileEnd: stub,
484
- table: stub
485
- };
486
- Object.defineProperty(console, '_isPolyfilled', {
487
- value: true,
488
- enumerable: false
489
- });
490
- }
491
- })(typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this);
492
- (function (global) {
493
- /**
494
- * Copyright (c) Meta Platforms, Inc. and affiliates.
495
- *
496
- * This source code is licensed under the MIT license found in the
497
- * LICENSE file in the root directory of this source tree.
498
- *
499
- * @format
500
- *
501
- * @polyfill
502
- */
503
-
504
- var _inGuard = 0;
505
- /**
506
- * This is the error handler that is called when we encounter an exception
507
- * when loading a module. This will report any errors encountered before
508
- * ExceptionsManager is configured.
509
- */
510
- var _globalHandler = function onError(e, isFatal) {
511
- throw e;
512
- };
513
-
514
- /**
515
- * The particular require runtime that we are using looks for a global
516
- * `ErrorUtils` object and if it exists, then it requires modules with the
517
- * error handler specified via ErrorUtils.setGlobalHandler by calling the
518
- * require function with applyWithGuard. Since the require module is loaded
519
- * before any of the modules, this ErrorUtils must be defined (and the handler
520
- * set) globally before requiring anything.
521
- */
522
- var ErrorUtils = {
523
- setGlobalHandler: function setGlobalHandler(fun) {
524
- _globalHandler = fun;
525
- },
526
- getGlobalHandler: function getGlobalHandler() {
527
- return _globalHandler;
528
- },
529
- reportError: function reportError(error) {
530
- _globalHandler && _globalHandler(error, false);
531
- },
532
- reportFatalError: function reportFatalError(error) {
533
- // NOTE: This has an untyped call site in Metro.
534
- _globalHandler && _globalHandler(error, true);
535
- },
536
- applyWithGuard: function applyWithGuard(fun, context, args,
537
- // Unused, but some code synced from www sets it to null.
538
- unused_onError,
539
- // Some callers pass a name here, which we ignore.
540
- unused_name) {
541
- try {
542
- _inGuard++;
543
- /* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,
544
- * null) is fine. (2) array -> rest array should work */
545
- /* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,
546
- * null) is fine. (2) array -> rest array should work */
547
- return fun.apply(context, args);
548
- } catch (e) {
549
- ErrorUtils.reportError(e);
550
- } finally {
551
- _inGuard--;
552
- }
553
- return null;
554
- },
555
- applyWithGuardIfNeeded: function applyWithGuardIfNeeded(fun, context, args) {
556
- if (ErrorUtils.inGuard()) {
557
- /* $FlowFixMe[incompatible-call] : TODO T48204745 (1) apply(context,
558
- * null) is fine. (2) array -> rest array should work */
559
- /* $FlowFixMe[incompatible-type] : TODO T48204745 (1) apply(context,
560
- * null) is fine. (2) array -> rest array should work */
561
- return fun.apply(context, args);
562
- } else {
563
- ErrorUtils.applyWithGuard(fun, context, args);
564
- }
565
- return null;
566
- },
567
- inGuard: function inGuard() {
568
- return !!_inGuard;
569
- },
570
- guard: function guard(fun, name, context) {
571
- var _ref;
572
- // TODO: (moti) T48204753 Make sure this warning is never hit and remove it - types
573
- // should be sufficient.
574
- if (typeof fun !== 'function') {
575
- console.warn('A function must be passed to ErrorUtils.guard, got ', fun);
576
- return null;
577
- }
578
- var guardName = (_ref = name != null ? name : fun.name) != null ? _ref : '<generated guard>';
579
- /* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by
580
- * Flow's LTI update could not be added via codemod */
581
- function guarded() {
582
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
583
- args[_key] = arguments[_key];
584
- }
585
- return ErrorUtils.applyWithGuard(fun, context != null ? context : this, args, null, guardName);
586
- }
587
- return guarded;
588
- }
589
- };
590
- global.ErrorUtils = ErrorUtils;
591
- })(typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this);
592
- (function (global) {
593
- /**
594
- * Copyright (c) Meta Platforms, Inc. and affiliates.
595
- *
596
- * This source code is licensed under the MIT license found in the
597
- * LICENSE file in the root directory of this source tree.
598
- *
599
- * @format
600
- * @polyfill
601
- * @nolint
602
- */
603
-
604
- (function () {
605
- 'use strict';
606
-
607
- var hasOwnProperty = Object.prototype.hasOwnProperty;
608
-
609
- /**
610
- * Returns an array of the given object's own enumerable entries.
611
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
612
- */
613
- if (typeof Object.entries !== 'function') {
614
- Object.entries = function (object) {
615
- // `null` and `undefined` values are not allowed.
616
- if (object == null) {
617
- throw new TypeError('Object.entries called on non-object');
618
- }
619
- var entries = [];
620
- for (var key in object) {
621
- if (hasOwnProperty.call(object, key)) {
622
- entries.push([key, object[key]]);
623
- }
624
- }
625
- return entries;
626
- };
627
- }
628
-
629
- /**
630
- * Returns an array of the given object's own enumerable entries.
631
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values
632
- */
633
- if (typeof Object.values !== 'function') {
634
- Object.values = function (object) {
635
- // `null` and `undefined` values are not allowed.
636
- if (object == null) {
637
- throw new TypeError('Object.values called on non-object');
638
- }
639
- var values = [];
640
- for (var key in object) {
641
- if (hasOwnProperty.call(object, key)) {
642
- values.push(object[key]);
643
- }
644
- }
645
- return values;
646
- };
647
- }
648
- })();
649
- })(typeof globalThis !== 'undefined' ? globalThis : typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : this);
650
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
651
- "use strict";
652
-
653
- /*
654
- * Copyright (c) 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
655
- *
656
- * PROPRIETARY/CONFIDENTIAL
657
- *
658
- * Use is subject to license terms.
659
- */
660
- var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
661
- if (k2 === undefined) k2 = k;
662
- var desc = Object.getOwnPropertyDescriptor(m, k);
663
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
664
- desc = {
665
- enumerable: true,
666
- get: function get() {
667
- return m[k];
668
- }
669
- };
670
- }
671
- Object.defineProperty(o, k2, desc);
672
- } : function (o, m, k, k2) {
673
- if (k2 === undefined) k2 = k;
674
- o[k2] = m[k];
675
- });
676
- var __exportStar = this && this.__exportStar || function (m, exports) {
677
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
678
- };
679
- var __importDefault = this && this.__importDefault || function (mod) {
680
- return mod && mod.__esModule ? mod : {
681
- "default": mod
682
- };
683
- };
684
- Object.defineProperty(exports, "__esModule", {
685
- value: true
686
- });
687
- exports.DisplayController = exports.Display = exports.DisplayManager = undefined;
688
- __exportStar(_$$_REQUIRE(_dependencyMap[0]), exports);
689
- Object.defineProperty(exports, "DisplayManager", {
690
- enumerable: true,
691
- get: function get() {
692
- return __importDefault(_$$_REQUIRE(_dependencyMap[1])).default;
693
- }
694
- });
695
- Object.defineProperty(exports, "Display", {
696
- enumerable: true,
697
- get: function get() {
698
- return __importDefault(_$$_REQUIRE(_dependencyMap[2])).default;
699
- }
700
- });
701
- Object.defineProperty(exports, "DisplayController", {
702
- enumerable: true,
703
- get: function get() {
704
- return __importDefault(_$$_REQUIRE(_dependencyMap[3])).default;
705
- }
706
- });
707
- },"7821c1f7acc3acb6da4f",["b8567ef2eb3c077dadc8","1abcf9d7f48516798bb3","ac675029e949aab3f4ec","80ca0e817a58b3f128e0"]);
708
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
709
- "use strict";
710
-
711
- /*
712
- * Copyright (c) 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
713
- *
714
- * PROPRIETARY/CONFIDENTIAL
715
- *
716
- * Use is subject to license terms.
717
- */
718
- Object.defineProperty(exports, "__esModule", {
719
- value: true
720
- });
721
- exports.TransferFunction = exports.ColorGamut = exports.BufferPixelFormat = exports.HdcpLevel = exports.LlmState = exports.HdrType = exports.HdrMode = exports.ColorSpace = exports.ColorDepth = undefined;
722
- Object.defineProperty(exports, "ColorSpace", {
723
- enumerable: true,
724
- get: function get() {
725
- return _$$_REQUIRE(_dependencyMap[0]).ColorSpace;
726
- }
727
- });
728
- Object.defineProperty(exports, "ColorDepth", {
729
- enumerable: true,
730
- get: function get() {
731
- return _$$_REQUIRE(_dependencyMap[0]).ColorDepth;
732
- }
733
- });
734
- Object.defineProperty(exports, "HdrMode", {
735
- enumerable: true,
736
- get: function get() {
737
- return _$$_REQUIRE(_dependencyMap[0]).HdrMode;
738
- }
739
- });
740
- Object.defineProperty(exports, "HdrType", {
741
- enumerable: true,
742
- get: function get() {
743
- return _$$_REQUIRE(_dependencyMap[0]).HdrType;
744
- }
745
- });
746
- Object.defineProperty(exports, "LlmState", {
747
- enumerable: true,
748
- get: function get() {
749
- return _$$_REQUIRE(_dependencyMap[0]).LlmState;
750
- }
751
- });
752
- Object.defineProperty(exports, "HdcpLevel", {
753
- enumerable: true,
754
- get: function get() {
755
- return _$$_REQUIRE(_dependencyMap[0]).HdcpLevel;
756
- }
757
- });
758
- Object.defineProperty(exports, "BufferPixelFormat", {
759
- enumerable: true,
760
- get: function get() {
761
- return _$$_REQUIRE(_dependencyMap[0]).BufferPixelFormat;
762
- }
763
- });
764
- Object.defineProperty(exports, "ColorGamut", {
765
- enumerable: true,
766
- get: function get() {
767
- return _$$_REQUIRE(_dependencyMap[0]).ColorGamut;
768
- }
769
- });
770
- Object.defineProperty(exports, "TransferFunction", {
771
- enumerable: true,
772
- get: function get() {
773
- return _$$_REQUIRE(_dependencyMap[0]).TransferFunction;
774
- }
775
- });
776
- },"b8567ef2eb3c077dadc8",["4cc680f1586dfc15e935"]);
777
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
778
- "use strict";
779
-
780
- /*
781
- * Copyright (c) 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
782
- *
783
- * PROPRIETARY/CONFIDENTIAL
784
- *
785
- * Use is subject to license terms.
786
- */
787
- Object.defineProperty(exports, "__esModule", {
788
- value: true
789
- });
790
- exports.BufferPixelFormat = exports.HdcpLevel = exports.LlmState = exports.TransferFunction = exports.ColorGamut = exports.HdrType = exports.HdrMode = exports.ColorDepth = exports.ColorSpace = undefined;
791
- /**
792
- * Defines Different color space types in a display.
793
- */
794
- var ColorSpace;
795
- (function (ColorSpace) {
796
- /**
797
- * Invalid color space type
798
- */
799
- ColorSpace[ColorSpace["INVALID"] = 1] = "INVALID";
800
- /**
801
- * Color space type is automatic i.e display server is free to choose any color space. This is default.
802
- */
803
- ColorSpace[ColorSpace["AUTO"] = 2] = "AUTO";
804
- /**
805
- * display server is requested to use RGB color space
806
- */
807
- ColorSpace[ColorSpace["RGB"] = 3] = "RGB";
808
- /**
809
- * display server is requested to use YCbCr color space
810
- */
811
- ColorSpace[ColorSpace["YCBCR"] = 4] = "YCBCR";
812
- })(ColorSpace = exports.ColorSpace || (exports.ColorSpace = {}));
813
- ;
814
- /**
815
- * Defines all possible color depths in a display.
816
- */
817
- var ColorDepth;
818
- (function (ColorDepth) {
819
- /**
820
- * Unknown color depth type
821
- */
822
- ColorDepth[ColorDepth["COLORDEPTH_UNKNOWN"] = 1] = "COLORDEPTH_UNKNOWN";
823
- /**
824
- * Color depth type is automatic i.e display server is free to choose any. This is default.
825
- */
826
- ColorDepth[ColorDepth["COLORDEPTH_AUTO"] = 2] = "COLORDEPTH_AUTO";
827
- /**
828
- * Display server is free to choose any color depth up to 8 bits per channel.
829
- */
830
- ColorDepth[ColorDepth["COLORDEPTH_8"] = 3] = "COLORDEPTH_8";
831
- /**
832
- * Display server is free to choose any color depth up to 10 bits per channel.
833
- */
834
- ColorDepth[ColorDepth["COLORDEPTH_10"] = 4] = "COLORDEPTH_10";
835
- /**
836
- * Display server is free to choose any color depth up to 12 bits per channel.
837
- */
838
- ColorDepth[ColorDepth["COLORDEPTH_12"] = 5] = "COLORDEPTH_12";
839
- })(ColorDepth = exports.ColorDepth || (exports.ColorDepth = {}));
840
- ;
841
- /**
842
- * Defines values for High dynamic range mode for display
843
- */
844
- var HdrMode;
845
- (function (HdrMode) {
846
- /**
847
- * High dynamic range is disabled
848
- */
849
- HdrMode[HdrMode["DISABLED"] = 0] = "DISABLED";
850
- /**
851
- * High dynamic range mode usage depends on current settings.
852
- */
853
- HdrMode[HdrMode["ADAPTIVE"] = 1] = "ADAPTIVE";
854
- /**
855
- * always use high dynamic range mode
856
- */
857
- HdrMode[HdrMode["ALWAYS"] = 2] = "ALWAYS";
858
- })(HdrMode = exports.HdrMode || (exports.HdrMode = {}));
859
- ;
860
- /**
861
- * Defines list of supported underlying HDR technologies
862
- */
863
- var HdrType;
864
- (function (HdrType) {
865
- /**
866
- * No HDR is supported
867
- */
868
- HdrType[HdrType["NONE"] = 1] = "NONE";
869
- /**
870
- * HDR10 Display
871
- */
872
- HdrType[HdrType["HDR10"] = 2] = "HDR10";
873
- /**
874
- * HDR10+ Display
875
- */
876
- HdrType[HdrType["HDR10_PLUS"] = 3] = "HDR10_PLUS";
877
- /**
878
- * Hybrid Log-Gamma HDR display.
879
- */
880
- HdrType[HdrType["HLG"] = 4] = "HLG";
881
- /**
882
- * Dolby Vision high dynamic range (HDR) display.
883
- */
884
- HdrType[HdrType["DOLBY_VISION"] = 5] = "DOLBY_VISION";
885
- })(HdrType = exports.HdrType || (exports.HdrType = {}));
886
- ;
887
- /**
888
- * Defines list of Color gamut types.
889
- */
890
- var ColorGamut;
891
- (function (ColorGamut) {
892
- /**
893
- * sRGB standard which has same color primaries of REC.709 or BT.709 standard
894
- */
895
- ColorGamut["SRGB"] = "srgb";
896
- /**
897
- * DCI P3 Color Space color gamut
898
- */
899
- ColorGamut["P3"] = "p3";
900
- /**
901
- * ITU-R Recommendation BT.2020 (REC.2020) color gamut.
902
- */
903
- ColorGamut["REC_2020"] = "rec2020";
904
- })(ColorGamut = exports.ColorGamut || (exports.ColorGamut = {}));
905
- ;
906
- /**
907
- * Defines list of display Transfer Functions
908
- */
909
- var TransferFunction;
910
- (function (TransferFunction) {
911
- /**
912
- * sRGB standard transfer function.
913
- */
914
- TransferFunction["SRGB"] = "srgb";
915
- /**
916
- * Perceptual Quantizer transfer function.
917
- */
918
- TransferFunction["PQ"] = "pq";
919
- /**
920
- * Hybrid Log Gamma transfer function.
921
- */
922
- TransferFunction["HLG"] = "hlg";
923
- })(TransferFunction = exports.TransferFunction || (exports.TransferFunction = {}));
924
- ;
925
- /**
926
- * Defines all possible low latency mode (LLM) states that could be supported by a display.
927
- */
928
- var LlmState;
929
- (function (LlmState) {
930
- /**
931
- * LLM state Auto - display subsystem is free to choose any LLM state.
932
- */
933
- LlmState[LlmState["LLM_AUTO"] = 1] = "LLM_AUTO";
934
- /**
935
- * LLM state ON - display subsystem is instructed to enable LLM unconditionally and allows it to enable
936
- * one of the supported low latency modes.
937
- */
938
- LlmState[LlmState["LLM_ON"] = 2] = "LLM_ON";
939
- /**
940
- * LLM state OFF - display subsystem is instructed to disable LLM unconditionally.
941
- */
942
- LlmState[LlmState["LLM_OFF"] = 3] = "LLM_OFF";
943
- })(LlmState = exports.LlmState || (exports.LlmState = {}));
944
- ;
945
- /**
946
- * Defines all possible HDCP levels that could be supported by a display.
947
- */
948
- var HdcpLevel;
949
- (function (HdcpLevel) {
950
- /**
951
- * Invalid HDCP level
952
- */
953
- HdcpLevel[HdcpLevel["INVALID"] = 1] = "INVALID";
954
- /**
955
- * HDCP level Version 1.0
956
- */
957
- HdcpLevel[HdcpLevel["V_1_0"] = 2] = "V_1_0";
958
- /**
959
- * HDCP level Version 2.0
960
- */
961
- HdcpLevel[HdcpLevel["V_2_0"] = 3] = "V_2_0";
962
- /**
963
- * HDCP level Version 2.1
964
- */
965
- HdcpLevel[HdcpLevel["V_2_1"] = 4] = "V_2_1";
966
- /**
967
- * HDCP level Version 2.2
968
- */
969
- HdcpLevel[HdcpLevel["V_2_2"] = 5] = "V_2_2";
970
- /**
971
- * HDCP level Version 2.3
972
- */
973
- HdcpLevel[HdcpLevel["V_2_3"] = 6] = "V_2_3";
974
- /**
975
- * HDCP level Version 2.4
976
- */
977
- HdcpLevel[HdcpLevel["V_2_4"] = 7] = "V_2_4";
978
- })(HdcpLevel = exports.HdcpLevel || (exports.HdcpLevel = {}));
979
- ;
980
- /**
981
- * Buffer Pixel Format specifies the memory layout and bits used to store the
982
- * data within the buffer.
983
- */
984
- var BufferPixelFormat;
985
- (function (BufferPixelFormat) {
986
- /**
987
- * Buffer format is unknown or customized format.
988
- */
989
- BufferPixelFormat["UNKNOWN"] = "UNKNOWN";
990
- BufferPixelFormat["YUYV"] = "YUYV";
991
- BufferPixelFormat["YVU420"] = "YV12";
992
- BufferPixelFormat["NV12"] = "NV12";
993
- BufferPixelFormat["YUV420"] = "YU12";
994
- BufferPixelFormat["FLEX_YCbCr_420_888"] = "9999";
995
- BufferPixelFormat["FLEX_YCbCr_420_101010"] = "8888";
996
- BufferPixelFormat["UYVY"] = "UYVY";
997
- BufferPixelFormat["RGB888"] = "RG24";
998
- BufferPixelFormat["ARGB8888"] = "AR24";
999
- })(BufferPixelFormat = exports.BufferPixelFormat || (exports.BufferPixelFormat = {}));
1000
- ;
1001
- ;
1002
- },"4cc680f1586dfc15e935",[]);
1003
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1004
- "use strict";
1005
-
1006
- var __importDefault = this && this.__importDefault || function (mod) {
1007
- return mod && mod.__esModule ? mod : {
1008
- "default": mod
1009
- };
1010
- };
1011
- Object.defineProperty(exports, "__esModule", {
1012
- value: true
1013
- });
1014
- exports.DisplayManager = undefined;
1015
- var AmazonGraphicsTurboModule_1 = __importDefault(_$$_REQUIRE(_dependencyMap[0]));
1016
- if (!AmazonGraphicsTurboModule_1.default) {
1017
- throw new Error(`AmazonGraphicsTurboModule turbo-module is null.`);
1018
- }
1019
- /**
1020
- * Display Manager Listener callback cancellation is handled through
1021
- * this Subscription object retuned after calling {@link DisplayController#addListener}
1022
- */
1023
- var DisplayManagerListenerSubscription = /*#__PURE__*/function () {
1024
- function DisplayManagerListenerSubscription(token) {
1025
- _$$_REQUIRE(_dependencyMap[1])(this, DisplayManagerListenerSubscription);
1026
- this.token = token;
1027
- }
1028
- /**
1029
- * Unsubscribes the listener.
1030
- */
1031
- return _$$_REQUIRE(_dependencyMap[2])(DisplayManagerListenerSubscription, [{
1032
- key: "unsubscribe",
1033
- value: function unsubscribe() {
1034
- AmazonGraphicsTurboModule_1.default.removeDisplayManagerListener(this.token);
1035
- }
1036
- }]);
1037
- }();
1038
- /**
1039
- * DisplayManager provides APIs to change the display configuration/settings.
1040
- * Clients require the application privilege "com.amazon.graphics.privilege.display.manager"
1041
- * to invoke APIs of this class.
1042
- */
1043
- var DisplayManager = /*#__PURE__*/function () {
1044
- function DisplayManager() {
1045
- _$$_REQUIRE(_dependencyMap[1])(this, DisplayManager);
1046
- }
1047
- /**
1048
- * Request Display Server to switch to a certain color depth.
1049
- * This API requires the client to have "com.amazon.graphics.privilege.display.manager"
1050
- * application privilege.
1051
- * @param colorDepth Requested new color depth.
1052
- */
1053
- return _$$_REQUIRE(_dependencyMap[2])(DisplayManager, null, [{
1054
- key: "setColorDepth",
1055
- value: function setColorDepth(colorDepth) {
1056
- AmazonGraphicsTurboModule_1.default.setColorDepth(colorDepth);
1057
- }
1058
- /**
1059
- * Requests Display Server to switch to the supplied color space e.g. RGB or YUV etc.
1060
- * This API requires the client to have "com.amazon.graphics.privilege.display.manager"
1061
- * application privilege.
1062
- * @param colorSpace Requested new color space.
1063
- */
1064
- }, {
1065
- key: "setColorSpace",
1066
- value: function setColorSpace(colorSpace) {
1067
- AmazonGraphicsTurboModule_1.default.setColorSpace(colorSpace);
1068
- }
1069
- /**
1070
- * Enable or disable HDR mode.
1071
- * This API requires the client to have "com.amazon.graphics.privilege.display.manager"
1072
- * application privilege.
1073
- * @param mode Requested HDR mode.
1074
- */
1075
- }, {
1076
- key: "setHdrMode",
1077
- value: function setHdrMode(hdrMode) {
1078
- AmazonGraphicsTurboModule_1.default.setHdrMode(hdrMode);
1079
- }
1080
- /**
1081
- * Enable or disable Low latency mode.
1082
- * This API requires the client to have "com.amazon.graphics.privilege.display.manager"
1083
- * application privilege.
1084
- * @param state Requested latency mode.
1085
- */
1086
- }, {
1087
- key: "setLowLatencyModeState",
1088
- value: function setLowLatencyModeState(llmState) {
1089
- AmazonGraphicsTurboModule_1.default.setLowLatencyModeState(llmState);
1090
- }
1091
- /**
1092
- * Set the MRR state of the display. MRR is a feature which allows clients to request
1093
- * alternate refresh rate which might be more appropriate for their content.
1094
- * This is a global MRR state for a display and controls if applications can request display server
1095
- * to switch to one of the other supported refresh rates which closely matches original content frame rate.
1096
- * This API requires the client to have "com.amazon.graphics.privilege.display.manager"
1097
- * application privilege.
1098
- * @param state MRR state being requested to be used for this display.
1099
- */
1100
- }, {
1101
- key: "setMultipleRefreshRateState",
1102
- value: function setMultipleRefreshRateState(mrrState) {
1103
- AmazonGraphicsTurboModule_1.default.setMultipleRefreshRateState(mrrState);
1104
- }
1105
- /**
1106
- * Request the display to switch to a new config.
1107
- * {@link IDisplayListener.onConfigChange} will be called upon successful completion.
1108
- * This API requires the client to have "com.amazon.graphics.privilege.display.manager"
1109
- * application privilege.
1110
- * @param displayConfig The new requested display config.
1111
- */
1112
- }, {
1113
- key: "requestConfigChange",
1114
- value: function requestConfigChange(displayConfig, refreshRateInMillihertz) {
1115
- return AmazonGraphicsTurboModule_1.default.requestConfigChange(displayConfig, refreshRateInMillihertz);
1116
- }
1117
- /**
1118
- * Request the display to switch to a new config automatically. In this mode, display server selects
1119
- * the most appropriate config dynamically based on various factors. IDisplayListener.onConfigChange
1120
- * will still be called upon a successful config switch. Please note, calling enableAutoConfigSwitch(true)
1121
- * would override previous requestConfigChange() call.
1122
- * The default state is "true".
1123
- * This API requires the client to have "com.amazon.graphics.privilege.display.manager" application privilege.
1124
- * @param enable If true, display subsystem would choose appropriate config automatically.
1125
- */
1126
- }, {
1127
- key: "enableAutoConfigSwitch",
1128
- value: function enableAutoConfigSwitch(enable) {
1129
- AmazonGraphicsTurboModule_1.default.enableAutoConfigSwitch(enable);
1130
- }
1131
- /**
1132
- * Requests display server to adjust the visible area of the display to
1133
- * ensure content is not lost beyond the screen's physical borders. The API takes the
1134
- * widths of the four borders or margins as a percentage of width or height.
1135
- * This API requires the client to have "com.amazon.graphics.privilege.display.manager"
1136
- * application privilege.
1137
- * @param leftBorderAsPercentageWidth The left border as percentage of width.
1138
- * @param topBorderAsPercentageOfHeight The top border as percentage of
1139
- * height.
1140
- * @param rightBorderAsPercentageOfWidth The right border as percentage of
1141
- * width.
1142
- * @param bottomBorderAsPercentageOfHeight The bottom border as percentage of
1143
- * height.
1144
- */
1145
- }, {
1146
- key: "setOverscanBorder",
1147
- value: function setOverscanBorder(leftBorderAsPercentageOfWidth, topBorderAsPercentageOfHeight, rightBorderAsPercentageOfWidth, bottomBorderAsPercentageOfHeight) {
1148
- return AmazonGraphicsTurboModule_1.default.setOverscanBorder(leftBorderAsPercentageOfWidth, topBorderAsPercentageOfHeight, rightBorderAsPercentageOfWidth, bottomBorderAsPercentageOfHeight);
1149
- }
1150
- /**
1151
- * Adds display manager listener object {@link IDisplayManagerListener} to receive
1152
- * callbacks when display manager properties change.
1153
- * It returns a {@link ISubscription} object, which is used to unsubscribe the listener
1154
- * from receiving events through {@link ISubscription.unsubscribe()}.
1155
- * @param listener IDisplayManagerListener interface
1156
- * @return ISubscription object related to this listener @see DisplayManagerListenerSubscription
1157
- */
1158
- }, {
1159
- key: "addListener",
1160
- value: function addListener(listener) {
1161
- var token = AmazonGraphicsTurboModule_1.default.addDisplayManagerListener(listener.onCommitSuccess, listener.onCommitFailure);
1162
- return new DisplayManagerListenerSubscription(token);
1163
- }
1164
- /**
1165
- * Request the display manager to commit all pending states.
1166
- * Please note, this function has to be called for any changes to be applied.
1167
- * This API will only update the pending states and it will actually try to apply all the pending
1168
- * states change requests made since last commitStates() call.
1169
- * The benefit of having a single commit call is that fact that clients can apply multiple dependent states
1170
- * together on display hardware.
1171
- * Client can know the result of the commit request through {@link IDisplayManagerListener}.
1172
- * This API requires the client to have "com.amazon.graphics.privilege.display.manager" application privilege.
1173
- * @return commit id which can be used to track the commit status.
1174
- */
1175
- }, {
1176
- key: "commitStates",
1177
- value: function commitStates() {
1178
- return AmazonGraphicsTurboModule_1.default.commitStates();
1179
- }
1180
- }]);
1181
- }();
1182
- exports.DisplayManager = DisplayManager;
1183
- exports.default = DisplayManager;
1184
- },"1abcf9d7f48516798bb3",["3e5595d7eebf5472db10","cb664999166f9660a878","68819e29ebee24bb0e88"]);
1185
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1186
- "use strict";
1187
-
1188
- /*
1189
- * Copyright (c) 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1190
- *
1191
- * PROPRIETARY/CONFIDENTIAL
1192
- *
1193
- * Use is subject to license terms.
1194
- */
1195
- Object.defineProperty(exports, "__esModule", {
1196
- value: true
1197
- });
1198
- //@ts-ignore
1199
-
1200
- // prettier-ignore
1201
- exports.default = _$$_REQUIRE(_dependencyMap[0]).TurboModuleRegistry.getEnforcing('AmazonGraphicsTurboModule');
1202
- },"3e5595d7eebf5472db10",["8a35a86b7946c72e0207"]);
1203
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1204
- "use strict";
1205
-
1206
- /**
1207
- * Copyright (c) 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1208
- *
1209
- * PROPRIETARY/CONFIDENTIAL
1210
- *
1211
- * Use is subject to license terms.
1212
- *
1213
- */
1214
- Object.defineProperty(exports, "__esModule", {
1215
- value: true
1216
- });
1217
- exports.TurboModuleRegistry = undefined;
1218
- exports.TurboModuleRegistry = _$$_REQUIRE(_dependencyMap[0]);
1219
- },"8a35a86b7946c72e0207",["33d6b98d6e39f6b0a8f9"]);
1220
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1221
- "use strict";
1222
-
1223
- /**
1224
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1225
- *
1226
- * This source code is licensed under the MIT license found in the
1227
- * LICENSE file in the root directory of this source tree.
1228
- *
1229
- * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its
1230
- * affiliates. All rights reserved.
1231
- *
1232
- * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO
1233
- * LICENSE TERMS.
1234
- *
1235
- * Amazon modifications are indicated by [amznmod_* comments].
1236
- */
1237
- Object.defineProperty(exports, "__esModule", {
1238
- value: true
1239
- });
1240
- exports.getEnforcing = exports.get = undefined;
1241
- var turboModuleProxy = global.__turboModuleProxy;
1242
- function requireModule(name) {
1243
- if (turboModuleProxy != null) {
1244
- return turboModuleProxy(name);
1245
- }
1246
- return null;
1247
- }
1248
- function get(name) {
1249
- return requireModule(name);
1250
- }
1251
- exports.get = get;
1252
- function getEnforcing(name) {
1253
- var module = requireModule(name);
1254
- (0, _$$_REQUIRE(_dependencyMap[0]).default)(module != null, `TurboModuleRegistry.getEnforcing(...): '${name}' could not be found. ` + 'Verify that a module by this name is registered in the native binary.');
1255
- return module;
1256
- }
1257
- exports.getEnforcing = getEnforcing;
1258
- },"33d6b98d6e39f6b0a8f9",["8d9475a2cb77b53e450d"]);
1259
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1260
- /**
1261
- * Copyright (c) 2013-present, Facebook, Inc.
1262
- *
1263
- * This source code is licensed under the MIT license found in the
1264
- * LICENSE file in the root directory of this source tree.
1265
- *
1266
- * Portions of this file are copyright (c) 2023 Amazon.com, Inc. or its
1267
- * affiliates. All rights reserved.
1268
- *
1269
- * PORTIONS OF THIS FILE ARE AMAZON PROPRIETARY/CONFIDENTIAL. USE IS SUBJECT TO
1270
- * LICENSE TERMS.
1271
- *
1272
- * Amazon modifications are indicated by [amznmod_* comments].
1273
- */
1274
- /**
1275
- * amznmod_tmapi: Migrated to typescript
1276
- */
1277
- 'use strict';
1278
-
1279
- Object.defineProperty(exports, "__esModule", {
1280
- value: true
1281
- });
1282
- /**
1283
- * Use invariant() to assert state which your program assumes to be true.
1284
- *
1285
- * Provide sprintf-style format (only %s is supported) and arguments
1286
- * to provide information about what broke and what you were
1287
- * expecting.
1288
- *
1289
- * The invariant message will be stripped in production, but the invariant
1290
- * will remain to ensure logic does not differ in production.
1291
- */
1292
- var NODE_ENV = "production";
1293
- var invariant = function invariant(condition, format) {
1294
- for (var _len = arguments.length, extraArgs = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
1295
- extraArgs[_key - 2] = arguments[_key];
1296
- }
1297
- if (!condition) {
1298
- var error;
1299
- if (format === undefined) {
1300
- error = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
1301
- } else {
1302
- var argIndex = 0;
1303
- error = new Error(format.replace(/%s/g, function () {
1304
- return extraArgs[argIndex++];
1305
- }));
1306
- error.name = 'Invariant Violation';
1307
- }
1308
- // @ts-ignore `framesToPop` is not part of Error type but something Meta (and maybe RN) uses.
1309
- error.framesToPop = 1; // we don't care about invariant's own frame
1310
- throw error;
1311
- }
1312
- };
1313
- exports.default = invariant;
1314
- },"8d9475a2cb77b53e450d",[]);
1315
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1316
- function _classCallCheck(a, n) {
1317
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
1318
- }
1319
- module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
1320
- },"cb664999166f9660a878",[]);
1321
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1322
- function _defineProperties(e, r) {
1323
- for (var t = 0; t < r.length; t++) {
1324
- var o = r[t];
1325
- o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _$$_REQUIRE(_dependencyMap[0])(o.key), o);
1326
- }
1327
- }
1328
- function _createClass(e, r, t) {
1329
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
1330
- writable: false
1331
- }), e;
1332
- }
1333
- module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
1334
- },"68819e29ebee24bb0e88",["cbba112244d360ffda7a"]);
1335
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1336
- function toPropertyKey(t) {
1337
- var i = _$$_REQUIRE(_dependencyMap[0])(t, "string");
1338
- return "symbol" == _$$_REQUIRE(_dependencyMap[1])["default"](i) ? i : i + "";
1339
- }
1340
- module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
1341
- },"cbba112244d360ffda7a",["ad82d340d0b5dc5f0801","e08c69ed06cf526909e3"]);
1342
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1343
- function toPrimitive(t, r) {
1344
- if ("object" != _$$_REQUIRE(_dependencyMap[0])["default"](t) || !t) return t;
1345
- var e = t[Symbol.toPrimitive];
1346
- if (undefined !== e) {
1347
- var i = e.call(t, r || "default");
1348
- if ("object" != _$$_REQUIRE(_dependencyMap[0])["default"](i)) return i;
1349
- throw new TypeError("@@toPrimitive must return a primitive value.");
1350
- }
1351
- return ("string" === r ? String : Number)(t);
1352
- }
1353
- module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
1354
- },"ad82d340d0b5dc5f0801",["e08c69ed06cf526909e3"]);
1355
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1356
- function _typeof(o) {
1357
- "@babel/helpers - typeof";
1358
-
1359
- return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
1360
- return typeof o;
1361
- } : function (o) {
1362
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
1363
- }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
1364
- }
1365
- module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
1366
- },"e08c69ed06cf526909e3",[]);
1367
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1368
- "use strict";
1369
-
1370
- var __importDefault = this && this.__importDefault || function (mod) {
1371
- return mod && mod.__esModule ? mod : {
1372
- "default": mod
1373
- };
1374
- };
1375
- Object.defineProperty(exports, "__esModule", {
1376
- value: true
1377
- });
1378
- exports.Display = undefined;
1379
- /*
1380
- * Copyright (c) 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
1381
- *
1382
- * PROPRIETARY/CONFIDENTIAL
1383
- *
1384
- * Use is subject to license terms.
1385
- */
1386
-
1387
- var AmazonGraphicsTurboModule_1 = __importDefault(_$$_REQUIRE(_dependencyMap[0]));
1388
- if (!AmazonGraphicsTurboModule_1.default) {
1389
- throw new Error(`AmazonGraphicsTurboModule turbo-module is null.`);
1390
- }
1391
- /**
1392
- * Display Listener callback cancellation is handled through
1393
- * Subscription object returned after calling
1394
- * {@link DisplayController.addListener}.
1395
- */
1396
- var DisplayListenerSubscription = /*#__PURE__*/function () {
1397
- function DisplayListenerSubscription(token) {
1398
- _$$_REQUIRE(_dependencyMap[1])(this, DisplayListenerSubscription);
1399
- this.token = token;
1400
- }
1401
- /**
1402
- * Unsubscribes the listener.
1403
- */
1404
- return _$$_REQUIRE(_dependencyMap[2])(DisplayListenerSubscription, [{
1405
- key: "unsubscribe",
1406
- value: function unsubscribe() {
1407
- AmazonGraphicsTurboModule_1.default.removeDisplayListener(this.token);
1408
- }
1409
- }]);
1410
- }();
1411
- /**
1412
- * Class that retrieves properties of the primary display.
1413
- * Note only primary display is supported by this turbomodule.
1414
- */
1415
- var Display = /*#__PURE__*/function () {
1416
- function Display() {
1417
- _$$_REQUIRE(_dependencyMap[1])(this, Display);
1418
- }
1419
- /**
1420
- * Query the display connector name.
1421
- * @return The name of the display connector (not the panel name).
1422
- */
1423
- return _$$_REQUIRE(_dependencyMap[2])(Display, null, [{
1424
- key: "getName",
1425
- value: function getName() {
1426
- return AmazonGraphicsTurboModule_1.default.getName();
1427
- }
1428
- /**
1429
- * Get current color depth.
1430
- * @return color depth.
1431
- */
1432
- }, {
1433
- key: "getColorDepth",
1434
- value: function getColorDepth() {
1435
- return AmazonGraphicsTurboModule_1.default.getColorDepth();
1436
- }
1437
- /**
1438
- * Get current color space.
1439
- * @return color space.
1440
- */
1441
- }, {
1442
- key: "getColorSpace",
1443
- value: function getColorSpace() {
1444
- return AmazonGraphicsTurboModule_1.default.getColorSpace();
1445
- }
1446
- /**
1447
- * Get current HDR mode.
1448
- * @return HDR mode.
1449
- */
1450
- }, {
1451
- key: "getHdrMode",
1452
- value: function getHdrMode() {
1453
- return AmazonGraphicsTurboModule_1.default.getHdrMode();
1454
- }
1455
- /**
1456
- * Query the current Low latency mode state of the display.
1457
- * @return Low latency mode state being used for the display.
1458
- */
1459
- }, {
1460
- key: "getLowLatencyModeState",
1461
- value: function getLowLatencyModeState() {
1462
- return AmazonGraphicsTurboModule_1.default.getLowLatencyModeState();
1463
- }
1464
- /**
1465
- * Query if any kind of display low latency mode is supported for this display.
1466
- * @return true if supported otherwise false
1467
- */
1468
- }, {
1469
- key: "isLowLatencyModeSupported",
1470
- value: function isLowLatencyModeSupported() {
1471
- return AmazonGraphicsTurboModule_1.default.isLowLatencyModeSupported();
1472
- }
1473
- /**
1474
- * Query the Multiple Refresh Rate (MRR) state for this display.
1475
- * It allows clients to request alternate refresh rate which might be more
1476
- * appropriate for their content.
1477
- * @return MRR state being used for the display.
1478
- */
1479
- }, {
1480
- key: "isMultipleRefreshRateEnabled",
1481
- value: function isMultipleRefreshRateEnabled() {
1482
- return AmazonGraphicsTurboModule_1.default.isMultipleRefreshRateEnabled();
1483
- }
1484
- /**
1485
- * Query the current vertical refresh rate in mHz (millihertz) for this display
1486
- * @return Returns current refresh rate for this display in mHz.
1487
- * If the current refresh rate changes, {@link IDisplayListener.onRefreshRateChange}
1488
- * will be called.
1489
- */
1490
- }, {
1491
- key: "getCurrentRefreshRateInMillihertz",
1492
- value: function getCurrentRefreshRateInMillihertz() {
1493
- return AmazonGraphicsTurboModule_1.default.getCurrentRefreshRateInMillihertz();
1494
- }
1495
- /**
1496
- * Query the current HDCP (High-bandwidth Digital Content Protection) level for this display.
1497
- * @return Returns current HDCP level for this display
1498
- * @see HdcpLevel
1499
- */
1500
- }, {
1501
- key: "getCurrentHdcpLevel",
1502
- value: function getCurrentHdcpLevel() {
1503
- return AmazonGraphicsTurboModule_1.default.getCurrentHdcpLevel();
1504
- }
1505
- /**
1506
- * Query the list of all supported configs for this display.
1507
- * @return Returns list of all supported configs for this display.
1508
- */
1509
- }, {
1510
- key: "getAllSupportedConfigs",
1511
- value: function getAllSupportedConfigs() {
1512
- return AmazonGraphicsTurboModule_1.default.getAllSupportedConfigs();
1513
- }
1514
- /**
1515
- * Query the current config for this display.
1516
- * @return Returns current config
1517
- * @see IDisplayConfig
1518
- */
1519
- }, {
1520
- key: "getCurrentConfig",
1521
- value: function getCurrentConfig() {
1522
- return AmazonGraphicsTurboModule_1.default.getCurrentConfig();
1523
- }
1524
- /**
1525
- * Query if auto config switch is enabled.
1526
- * @return true, if auto config switch is enabled, false otherwise
1527
- * @see IDisplayConfig
1528
- */
1529
- }, {
1530
- key: "isAutoConfigSwitchEnabled",
1531
- value: function isAutoConfigSwitchEnabled() {
1532
- return AmazonGraphicsTurboModule_1.default.isAutoConfigSwitchEnabled();
1533
- }
1534
- /**
1535
- * Query for allowed color spaces which are obtained based on
1536
- * the connected display/TV capabilities and the device capabilities.
1537
- * If the resolution, the refresh rate or the HDR setting changes then
1538
- * clients are expected to query this API again to get updated allowed color spaces.
1539
- * @returns {ColorSpace[]} An array of ColorSpace values representing the allowed color spaces
1540
- * {@link DisplayManager.setColorSpace()}
1541
- */
1542
- }, {
1543
- key: "getAllowedColorSpaces",
1544
- value: function getAllowedColorSpaces() {
1545
- return AmazonGraphicsTurboModule_1.default.getAllowedColorSpaces();
1546
- }
1547
- /**
1548
- * Query for allowed color depths for given color space, which are obtained based on
1549
- * the connected display/TV capabilities and the device capabilities.
1550
- * If the resolution, the refresh rate or the HDR setting changes then
1551
- * clients are expected to query this API again to get updated allowed color depth.
1552
- * @param {ColorSpace} colorSpace - the color space for which allowed color depths are queried.
1553
- * @returns {ColorDepth[]} An array of ColorDepth values available for the specified color space
1554
- * {@link DisplayManager.setColorDepth()}
1555
- */
1556
- }, {
1557
- key: "getAllowedColorDepths",
1558
- value: function getAllowedColorDepths(colorSpace) {
1559
- return AmazonGraphicsTurboModule_1.default.getAllowedColorDepths(colorSpace);
1560
- }
1561
- /**
1562
- * Returns the current overscan border values of the display.
1563
- * The border value (left, top, right and bottom) represent the fraction of
1564
- * the width or height of the display that acts like a margin for the visible
1565
- * region on the display.
1566
- * @return The current overscan border configuration.
1567
- * @throws DeviceError if the display device is not in active state
1568
- * @see IOverscanBorder
1569
- */
1570
- }, {
1571
- key: "getOverscanBorder",
1572
- value: function getOverscanBorder() {
1573
- return AmazonGraphicsTurboModule_1.default.getOverscanBorder();
1574
- }
1575
- /**
1576
- * Check if the display sink port where this display source device is connected is active or not.
1577
- * A display sink (e.g. TV or monitor) may have multiple display ports. The port where this source
1578
- * device is connected may be inactive even if display source (this device) is powered ON.
1579
- * @return Returns true if display sink is active.
1580
- */
1581
- }, {
1582
- key: "isSinkActive",
1583
- value: function isSinkActive() {
1584
- return AmazonGraphicsTurboModule_1.default.isSinkActive();
1585
- }
1586
- /**
1587
- * Adds display listener object {@link IDisplayListener} to receive
1588
- * callbacks when display properties change. It returns a
1589
- * {@link ISubscription} object, which is used to unsubscribe the listener
1590
- * from receiving events through {@link ISubscription.unsubscribe()}.
1591
- * @param listener IDisplayListener interface
1592
- * @return ISubscription object related to this listener @see DisplayListenerSubscription
1593
- */
1594
- }, {
1595
- key: "addDisplayListener",
1596
- value: function addDisplayListener(listener) {
1597
- var token = AmazonGraphicsTurboModule_1.default.addDisplayListener(listener.onConfigChange, listener.onRefreshRateChange, listener.onColorDepthChange, listener.onColorSpaceChange, listener.onHdcpLevelChange, listener.onAutoConfigSwitchStateChange, listener.onMultipleRefreshRateStateChange, listener.onLowLatencyModeStateChange, listener.onHdrModeChange);
1598
- return new DisplayListenerSubscription(token);
1599
- }
1600
- /**
1601
- * Adds display listener object {@link IDisplayListener} to receive
1602
- * callbacks when display properties change. It returns a
1603
- * {@link ISubscription} object, which is used to unsubscribe the listener
1604
- * from receiving events through {@link ISubscription.unsubscribe()}.
1605
- * @param listener IDisplayListener interface
1606
- * @return ISubscription object related to this listener @see DisplayListenerSubscription
1607
- */
1608
- }, {
1609
- key: "addDisplayListener2",
1610
- value: function addDisplayListener2(listener) {
1611
- var token = AmazonGraphicsTurboModule_1.default.addDisplayListener2(listener.onConfigChange, listener.onRefreshRateChange, listener.onColorDepthChange, listener.onColorSpaceChange, listener.onHdcpLevelChange, listener.onAutoConfigSwitchStateChange, listener.onMultipleRefreshRateStateChange, listener.onLowLatencyModeStateChange, listener.onHdrModeChange, listener.onSinkStateChange || function () {}); // Provide a no-op function if onSinkStateChange is undefined
1612
- return new DisplayListenerSubscription(token);
1613
- }
1614
- /**
1615
- * Below APIs are just wrapper APIs and does not have direct 1:1 mapping
1616
- * with native APIs.
1617
- */
1618
- /**
1619
- * Check if display supports HDR (High Definition Range) or not.
1620
- */
1621
- }, {
1622
- key: "isHDRSupported",
1623
- value: function isHDRSupported() {
1624
- var displayConfigList = AmazonGraphicsTurboModule_1.default.getAllSupportedConfigs();
1625
- for (var displayConfig of displayConfigList) {
1626
- for (var hdrType of displayConfig.supportedHdrType) {
1627
- if (hdrType !== _$$_REQUIRE(_dependencyMap[3]).HdrType.NONE) {
1628
- // Found a HDR type which is either HDR10, HDR10+, Dolby Vision or HLG
1629
- // and all these HDR types support BT.2020 color gamut.
1630
- return true;
1631
- }
1632
- }
1633
- }
1634
- return false;
1635
- }
1636
- /**
1637
- * Check if the display supports BT.2020 / Rec.2020 colorimetry standard.
1638
- */
1639
- }, {
1640
- key: "isBT2020ColorimetrySupported",
1641
- value: function isBT2020ColorimetrySupported() {
1642
- // Any of the HDR types (HDR10, HDR10+, Dolby Vision, HLG) support BT.2020 color gamut.
1643
- return this.isHDRSupported();
1644
- }
1645
- /**
1646
- * Query the supported transfer functions by the display.
1647
- */
1648
- }, {
1649
- key: "getTransferFunctions",
1650
- value: function getTransferFunctions() {
1651
- var transferFunctionList = [_$$_REQUIRE(_dependencyMap[3]).TransferFunction.SRGB];
1652
- var displayConfigList = AmazonGraphicsTurboModule_1.default.getAllSupportedConfigs();
1653
- for (var displayConfig of displayConfigList) {
1654
- for (var hdrType of displayConfig.supportedHdrType) {
1655
- if (hdrType === _$$_REQUIRE(_dependencyMap[3]).HdrType.HLG) {
1656
- transferFunctionList.push(_$$_REQUIRE(_dependencyMap[3]).TransferFunction.HLG);
1657
- } else if (hdrType !== _$$_REQUIRE(_dependencyMap[3]).HdrType.NONE) {
1658
- // HDR10 / HDR10+ / Dolby Vision
1659
- transferFunctionList.push(_$$_REQUIRE(_dependencyMap[3]).TransferFunction.PQ);
1660
- }
1661
- }
1662
- }
1663
- return transferFunctionList;
1664
- }
1665
- }]);
1666
- }();
1667
- exports.Display = Display;
1668
- exports.default = Display;
1669
- },"ac675029e949aab3f4ec",["3e5595d7eebf5472db10","cb664999166f9660a878","68819e29ebee24bb0e88","b8567ef2eb3c077dadc8"]);
1670
- __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
1671
- "use strict";
1672
-
1673
- var __importDefault = this && this.__importDefault || function (mod) {
1674
- return mod && mod.__esModule ? mod : {
1675
- "default": mod
1676
- };
1677
- };
1678
- Object.defineProperty(exports, "__esModule", {
1679
- value: true
1680
- });
1681
- exports.DisplayController = undefined;
1682
- var AmazonGraphicsTurboModule_1 = __importDefault(_$$_REQUIRE(_dependencyMap[0]));
1683
- if (!AmazonGraphicsTurboModule_1.default) {
1684
- throw new Error(`AmazonGraphicsTurboModule turbo-module is null.`);
1685
- }
1686
- /**
1687
- * Display Controller Listener callback cancellation is handled through
1688
- * this Subscription object retuned after calling {@link DisplayController#addListener}
1689
- */
1690
- var DisplayControllerListenerSubscription = /*#__PURE__*/function () {
1691
- function DisplayControllerListenerSubscription(token) {
1692
- _$$_REQUIRE(_dependencyMap[1])(this, DisplayControllerListenerSubscription);
1693
- this.token = token;
1694
- }
1695
- /**
1696
- * Unsubscribes the listener.
1697
- */
1698
- return _$$_REQUIRE(_dependencyMap[2])(DisplayControllerListenerSubscription, [{
1699
- key: "unsubscribe",
1700
- value: function unsubscribe() {
1701
- AmazonGraphicsTurboModule_1.default.removeDisplayControllerListener(this.token);
1702
- }
1703
- }]);
1704
- }();
1705
- /**
1706
- * DisplayController specific operations are done through this
1707
- * class abstraction.
1708
- */
1709
- var DisplayController = /*#__PURE__*/function () {
1710
- function DisplayController() {
1711
- _$$_REQUIRE(_dependencyMap[1])(this, DisplayController);
1712
- }
1713
- /**
1714
- * Adds display controller listener object {@link IDisplayControllerListener}
1715
- * to receive callbacks when primary display is added (connected) or removed (disconnected).
1716
- * It returns a {@link ISubscription} object, which is used to unsubscribe
1717
- * the listener from receiving the events through {@link ISubscription.unsubscribe}.
1718
- *
1719
- * @param listener IDisplayControllerListener object to listen for display
1720
- * controller events.
1721
- * @return ISubscription object corresponding to the listener @see DisplayControllerListenerSubscription
1722
- */
1723
- return _$$_REQUIRE(_dependencyMap[2])(DisplayController, null, [{
1724
- key: "addListener",
1725
- value: function addListener(listener) {
1726
- var token = AmazonGraphicsTurboModule_1.default.addDisplayControllerListener(listener.onAddDisplay, listener.onRemoveDisplay);
1727
- return new DisplayControllerListenerSubscription(token);
1728
- }
1729
- /**
1730
- * Check if primary display is connected to the device and ready to use.
1731
- * @return return true if display is connected, false otherwise.
1732
- */
1733
- }, {
1734
- key: "isPrimaryDisplayConnected",
1735
- value: function isPrimaryDisplayConnected() {
1736
- return AmazonGraphicsTurboModule_1.default.isPrimaryDisplayConnected();
1737
- }
1738
- }]);
1739
- }();
1740
- exports.DisplayController = DisplayController;
1741
- exports.default = DisplayController;
1742
- },"80ca0e817a58b3f128e0",["3e5595d7eebf5472db10","cb664999166f9660a878","68819e29ebee24bb0e88"]);