@yschimke/remote-compose-player-cmp 2.14.0 → 2.16.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.
package/dist/rc-cmp-player.js
CHANGED
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
url.searchParams.set('theme', options.theme);
|
|
93
93
|
}
|
|
94
94
|
if (options.lenient) url.searchParams.set('lenient', '1');
|
|
95
|
+
if (options.editableInputs === true) url.searchParams.set('editableInputs', '1');
|
|
95
96
|
if (options.namedValues) url.searchParams.set('namedValues', JSON.stringify(options.namedValues));
|
|
96
97
|
if (options.fontsBase) url.searchParams.set('fontsBase', options.fontsBase);
|
|
97
98
|
if (options.handoffDelayMs != null) {
|
|
@@ -126,6 +127,8 @@
|
|
|
126
127
|
pending = null;
|
|
127
128
|
if (data.state === 'ready') settling.resolve();
|
|
128
129
|
else settling.reject(new Error(data.error || 'the player reported an error'));
|
|
130
|
+
} else if (data.type === 'rc-player-input') {
|
|
131
|
+
if (options.onInput) options.onInput(data);
|
|
129
132
|
} else if (
|
|
130
133
|
options.onEvent &&
|
|
131
134
|
typeof data.type === 'string' &&
|
|
@@ -208,6 +208,8 @@ const js_code = {
|
|
|
208
208
|
'org.khronos.webgl.buffer_$external_prop_getter_1' : (_this) => _this.buffer,
|
|
209
209
|
'org.khronos.webgl.byteOffset_$external_prop_getter' : (_this) => _this.byteOffset,
|
|
210
210
|
'org.khronos.webgl.byteLength_$external_prop_getter_1' : (_this) => _this.byteLength,
|
|
211
|
+
'org.w3c.dom.clipboard.clipboardData_$external_prop_getter' : (_this) => _this.clipboardData,
|
|
212
|
+
'org.w3c.dom.clipboard.ClipboardEvent_$external_class_instanceof' : (x) => x instanceof ClipboardEvent,
|
|
211
213
|
'org.w3c.dom.css.cursor_$external_prop_setter' : (_this, v) => _this.cursor = v,
|
|
212
214
|
'org.w3c.dom.css.display_$external_prop_setter' : (_this, v) => _this.display = v,
|
|
213
215
|
'org.w3c.dom.css.fontSize_$external_prop_getter' : (_this) => _this.fontSize,
|
|
@@ -235,6 +237,9 @@ const js_code = {
|
|
|
235
237
|
'org.w3c.dom.events.shiftKey_$external_prop_getter' : (_this) => _this.shiftKey,
|
|
236
238
|
'org.w3c.dom.events.altKey_$external_prop_getter' : (_this) => _this.altKey,
|
|
237
239
|
'org.w3c.dom.events.metaKey_$external_prop_getter' : (_this) => _this.metaKey,
|
|
240
|
+
'org.w3c.dom.events.repeat_$external_prop_getter' : (_this) => _this.repeat,
|
|
241
|
+
'org.w3c.dom.events.isComposing_$external_prop_getter' : (_this) => _this.isComposing,
|
|
242
|
+
'org.w3c.dom.events.keyCode_$external_prop_getter' : (_this) => _this.keyCode,
|
|
238
243
|
'org.w3c.dom.events.KeyboardEvent_$external_class_instanceof' : (x) => x instanceof KeyboardEvent,
|
|
239
244
|
'org.w3c.dom.events.KeyboardEvent_$external_class_get' : () => KeyboardEvent,
|
|
240
245
|
'org.w3c.dom.events.deltaX_$external_prop_getter' : (_this) => _this.deltaX,
|
|
@@ -250,7 +255,9 @@ const js_code = {
|
|
|
250
255
|
'org.w3c.dom.events.FocusEvent_$external_class_get' : () => FocusEvent,
|
|
251
256
|
'org.w3c.dom.events.addEventListener_$external_fun' : (_this, p0, p1, p2) => _this.addEventListener(p0, p1, p2),
|
|
252
257
|
'org.w3c.dom.events.addEventListener_$external_fun_1' : (_this, p0, p1) => _this.addEventListener(p0, p1),
|
|
258
|
+
'org.w3c.dom.events.addEventListener_$external_fun_2' : (_this, p0, p1) => _this.addEventListener(p0, p1),
|
|
253
259
|
'org.w3c.dom.events.removeEventListener_$external_fun' : (_this, p0, p1) => _this.removeEventListener(p0, p1),
|
|
260
|
+
'org.w3c.dom.events.removeEventListener_$external_fun_1' : (_this, p0, p1) => _this.removeEventListener(p0, p1),
|
|
254
261
|
'org.w3c.dom.events.clientX_$external_prop_getter' : (_this) => _this.clientX,
|
|
255
262
|
'org.w3c.dom.events.clientY_$external_prop_getter' : (_this) => _this.clientY,
|
|
256
263
|
'org.w3c.dom.events.ctrlKey_$external_prop_getter_1' : (_this) => _this.ctrlKey,
|
|
@@ -261,6 +268,12 @@ const js_code = {
|
|
|
261
268
|
'org.w3c.dom.events.buttons_$external_prop_getter' : (_this) => _this.buttons,
|
|
262
269
|
'org.w3c.dom.events.offsetX_$external_prop_getter' : (_this) => _this.offsetX,
|
|
263
270
|
'org.w3c.dom.events.offsetY_$external_prop_getter' : (_this) => _this.offsetY,
|
|
271
|
+
'org.w3c.dom.events.isComposing_$external_prop_getter_1' : (_this) => _this.isComposing,
|
|
272
|
+
'org.w3c.dom.events.InputEvent_$external_class_instanceof' : (x) => x instanceof InputEvent,
|
|
273
|
+
'org.w3c.dom.events.InputEvent_$external_class_get' : () => InputEvent,
|
|
274
|
+
'org.w3c.dom.events.data_$external_prop_getter' : (_this) => _this.data,
|
|
275
|
+
'org.w3c.dom.events.CompositionEvent_$external_class_instanceof' : (x) => x instanceof CompositionEvent,
|
|
276
|
+
'org.w3c.dom.events.CompositionEvent_$external_class_get' : () => CompositionEvent,
|
|
264
277
|
'org.w3c.dom.AddEventListenerOptions_js_code' : (passive, once, capture) => ({ passive: passive, once: once, capture: capture }),
|
|
265
278
|
'org.w3c.dom.ShadowRootInit' : (mode) => ({ mode: mode }),
|
|
266
279
|
'org.w3c.dom.navigator_$external_prop_getter' : (_this) => _this.navigator,
|
|
@@ -271,6 +284,8 @@ const js_code = {
|
|
|
271
284
|
'org.w3c.dom.tabIndex_$external_prop_setter' : (_this, v) => _this.tabIndex = v,
|
|
272
285
|
'org.w3c.dom.innerText_$external_prop_setter' : (_this, v) => _this.innerText = v,
|
|
273
286
|
'org.w3c.dom.click_$external_fun' : (_this, ) => _this.click(),
|
|
287
|
+
'org.w3c.dom.focus_$external_fun' : (_this, ) => _this.focus(),
|
|
288
|
+
'org.w3c.dom.blur_$external_fun' : (_this, ) => _this.blur(),
|
|
274
289
|
'org.w3c.dom.HTMLElement_$external_class_instanceof' : (x) => x instanceof HTMLElement,
|
|
275
290
|
'org.w3c.dom.HTMLElement_$external_class_get' : () => HTMLElement,
|
|
276
291
|
'org.w3c.dom.readyState_$external_prop_getter' : (_this) => _this.readyState,
|
|
@@ -280,6 +295,7 @@ const js_code = {
|
|
|
280
295
|
'org.w3c.dom.hasFocus_$external_fun' : (_this, ) => _this.hasFocus(),
|
|
281
296
|
'org.w3c.dom.getElementById_$external_fun' : (_this, p0) => _this.getElementById(p0),
|
|
282
297
|
'org.w3c.dom.id_$external_prop_setter' : (_this, v) => _this.id = v,
|
|
298
|
+
'org.w3c.dom.classList_$external_prop_getter' : (_this) => _this.classList,
|
|
283
299
|
'org.w3c.dom.shadowRoot_$external_prop_getter' : (_this) => _this.shadowRoot,
|
|
284
300
|
'org.w3c.dom.clientWidth_$external_prop_getter' : (_this) => _this.clientWidth,
|
|
285
301
|
'org.w3c.dom.clientHeight_$external_prop_getter' : (_this) => _this.clientHeight,
|
|
@@ -294,6 +310,7 @@ const js_code = {
|
|
|
294
310
|
'org.w3c.dom.removeChild_$external_fun' : (_this, p0) => _this.removeChild(p0),
|
|
295
311
|
'org.w3c.dom.dropEffect_$external_prop_setter' : (_this, v) => _this.dropEffect = v,
|
|
296
312
|
'org.w3c.dom.setDragImage_$external_fun' : (_this, p0, p1, p2) => _this.setDragImage(p0, p1, p2),
|
|
313
|
+
'org.w3c.dom.getData_$external_fun' : (_this, p0) => _this.getData(p0),
|
|
297
314
|
'org.w3c.dom.setData_$external_fun' : (_this, p0, p1) => _this.setData(p0, p1),
|
|
298
315
|
'org.w3c.dom.width_$external_prop_getter' : (_this) => _this.width,
|
|
299
316
|
'org.w3c.dom.width_$external_prop_setter' : (_this, v) => _this.width = v,
|
|
@@ -317,6 +334,7 @@ const js_code = {
|
|
|
317
334
|
'org.w3c.dom.dataTransfer_$external_prop_getter' : (_this) => _this.dataTransfer,
|
|
318
335
|
'org.w3c.dom.DragEvent_$external_class_instanceof' : (x) => x instanceof DragEvent,
|
|
319
336
|
'org.w3c.dom.DragEvent_$external_class_get' : () => DragEvent,
|
|
337
|
+
'org.w3c.dom.add_$external_fun' : (_this, p0) => _this.add(...p0),
|
|
320
338
|
'org.w3c.dom.Worker_$external_fun' : (p0, p1, isDefault0) => new Worker(p0, isDefault0 ? undefined : p1, ),
|
|
321
339
|
'org.w3c.dom.postMessage_$external_fun' : (_this, p0, p1, isDefault0) => _this.postMessage(p0, isDefault0 ? undefined : p1, ),
|
|
322
340
|
'org.w3c.dom.Worker_$external_class_instanceof' : (x) => x instanceof Worker,
|
|
@@ -407,12 +425,16 @@ const js_code = {
|
|
|
407
425
|
'androidx.compose.ui.text.deref_$external_fun' : (_this, ) => _this.deref(),
|
|
408
426
|
'androidx.compose.ui.text.intl.parseLanguageTagToIntlLocale' : (languageTag) => new Intl.Locale(languageTag),
|
|
409
427
|
'androidx.compose.ui.text.intl._language_$external_prop_getter' : (_this) => _this.language,
|
|
428
|
+
'androidx.compose.ui.text.intl._region_$external_prop_getter' : (_this) => _this.region,
|
|
410
429
|
'androidx.compose.ui.text.intl._baseName_$external_prop_getter' : (_this) => _this.baseName,
|
|
411
430
|
'androidx.lifecycle.WeakRef_$external_fun' : (p0) => new WeakRef(p0),
|
|
412
431
|
'androidx.lifecycle.deref_$external_fun' : (_this, ) => _this.deref(),
|
|
413
432
|
'androidx.compose.ui.internal.weakMap_js_code' : () => (new WeakMap()),
|
|
414
433
|
'androidx.compose.ui.internal.set_$external_fun' : (_this, p0, p1) => _this.set(p0, p1),
|
|
415
434
|
'androidx.compose.ui.internal.get_$external_fun' : (_this, p0) => _this.get(p0),
|
|
435
|
+
'androidx.compose.ui.platform.createClipboardItemWithPlainText' : (text) => [new ClipboardItem({'text/plain': new Blob([text], { type: 'text/plain' })})],
|
|
436
|
+
'androidx.compose.ui.platform.emptyClipboardItems' : () => [new ClipboardItem({'text/plain': new Blob([''], { type: 'text/plain' })})],
|
|
437
|
+
'androidx.compose.ui.platform.invalidClipboardItems' : () => [],
|
|
416
438
|
'androidx.compose.ui.platform.warn' : (text) => { console.warn(text) },
|
|
417
439
|
'androidx.compose.ui.events.withSignal' : (signal) => ({signal: signal}),
|
|
418
440
|
'androidx.compose.ui.events.withSignalAndPassive' : (signal, passive) => ({signal: signal, passive: passive}),
|
|
@@ -421,12 +443,31 @@ const js_code = {
|
|
|
421
443
|
'androidx.compose.ui.internal.focusExt' : (element, _preventScroll) => element.focus({ preventScroll: _preventScroll }),
|
|
422
444
|
'androidx.compose.ui.node.WeakRef_$external_fun' : (p0) => new WeakRef(p0),
|
|
423
445
|
'androidx.compose.ui.node.deref_$external_fun' : (_this, ) => _this.deref(),
|
|
446
|
+
'androidx.compose.ui.platform.setBackingInputBox' : (container, left, top, width, height) => {
|
|
447
|
+
container.style.setProperty("--compose-internal-web-backing-input-left", left);
|
|
448
|
+
container.style.setProperty("--compose-internal-web-backing-input-top", top);
|
|
449
|
+
container.style.setProperty("--compose-internal-web-backing-input-width", width);
|
|
450
|
+
container.style.setProperty("--compose-internal-web-backing-input-height", height)
|
|
451
|
+
},
|
|
424
452
|
'androidx.compose.ui.platform.isVibrationSupported' : () =>
|
|
425
453
|
typeof window !== 'undefined' &&
|
|
426
454
|
window.navigator != null &&
|
|
427
455
|
typeof window.navigator.vibrate === 'function'
|
|
428
456
|
,
|
|
429
457
|
'androidx.compose.ui.platform.vibrate' : (pattern) => { window.navigator.vibrate(pattern) },
|
|
458
|
+
'androidx.compose.ui.platform.isTypedEvent' : (evt) => !evt.metaKey && !evt.ctrlKey && evt.key.charAt(0) === evt.key,
|
|
459
|
+
'androidx.compose.ui.platform.value_$external_prop_setter' : (_this, v) => _this.value = v,
|
|
460
|
+
'androidx.compose.ui.platform.selectionStart_$external_prop_getter' : (_this) => _this.selectionStart,
|
|
461
|
+
'androidx.compose.ui.platform.selectionEnd_$external_prop_getter' : (_this) => _this.selectionEnd,
|
|
462
|
+
'androidx.compose.ui.platform.setSelectionRange_$external_fun' : (_this, p0, p1, p2, isDefault0) => _this.setSelectionRange(p0, p1, isDefault0 ? undefined : p2, ),
|
|
463
|
+
'androidx.compose.ui.platform.data_$external_prop_getter' : (_this) => _this.data,
|
|
464
|
+
'androidx.compose.ui.platform.inputType_$external_prop_getter' : (_this) => _this.inputType,
|
|
465
|
+
'androidx.compose.ui.platform.textRangeStart_$external_prop_getter' : (_this) => _this.textRangeStart,
|
|
466
|
+
'androidx.compose.ui.platform.textRangeStart_$external_prop_setter' : (_this, v) => _this.textRangeStart = v,
|
|
467
|
+
'androidx.compose.ui.platform.textRangeEnd_$external_prop_getter' : (_this) => _this.textRangeEnd,
|
|
468
|
+
'androidx.compose.ui.platform.textRangeEnd_$external_prop_setter' : (_this, v) => _this.textRangeEnd = v,
|
|
469
|
+
'androidx.compose.ui.platform.activeElement_$external_prop_getter' : (_this) => _this.activeElement,
|
|
470
|
+
'androidx.compose.ui.platform.getRootNode_$external_fun' : (_this, ) => _this.getRootNode(),
|
|
430
471
|
'androidx.compose.ui.platform.getW3CClipboard' : () => window.navigator.clipboard,
|
|
431
472
|
'androidx.compose.ui.platform.isSecureContext' : () => window.isSecureContext === true,
|
|
432
473
|
'androidx.compose.ui.platform.isFullClipboardApiSupported' : () => Boolean(
|
|
@@ -437,8 +478,13 @@ const js_code = {
|
|
|
437
478
|
)
|
|
438
479
|
,
|
|
439
480
|
'androidx.compose.ui.platform.isFallbackWriteTextApiAvailable' : () => Boolean(window.navigator.clipboard && window.navigator.clipboard.writeText),
|
|
481
|
+
'androidx.compose.ui.platform.read_$external_fun' : (_this, ) => _this.read(),
|
|
482
|
+
'androidx.compose.ui.platform.write_$external_fun' : (_this, p0) => _this.write(p0),
|
|
483
|
+
'androidx.compose.ui.platform.writeText_$external_fun' : (_this, p0) => _this.writeText(p0),
|
|
440
484
|
'androidx.compose.ui.platform.W3CTemporaryClipboard_$external_class_instanceof' : (x) => x instanceof Clipboard,
|
|
441
485
|
'androidx.compose.ui.platform.W3CTemporaryClipboard_$external_class_get' : () => Clipboard,
|
|
486
|
+
'androidx.compose.ui.platform.types_$external_prop_getter' : (_this) => _this.types,
|
|
487
|
+
'androidx.compose.ui.platform.getType_$external_fun' : (_this, p0) => _this.getType(p0),
|
|
442
488
|
'androidx.compose.ui.platform.isFullWakeLockApiSupported' : () => Boolean(
|
|
443
489
|
window.navigator.wakeLock &&
|
|
444
490
|
typeof(WakeLockSentinel) !== 'undefined'
|
|
@@ -540,6 +586,11 @@ const js_code = {
|
|
|
540
586
|
'kotlinx.datetime.internal.getExceptionMessage' : (jsException) => jsException.message,
|
|
541
587
|
'kotlinx.datetime.internal.getZones' : (rulesProvider) => rulesProvider.getTzdbData().zones,
|
|
542
588
|
'kotlinx.datetime.internal.getLinks' : (rulesProvider) => rulesProvider.getTzdbData().links,
|
|
589
|
+
'androidx.compose.foundation.internal.isClipboardWriteSupported' : () => Boolean(window.navigator.clipboard && (window.navigator.clipboard.write || window.navigator.clipboard.writeText)),
|
|
590
|
+
'androidx.compose.foundation.internal.isClipboardReadSupported' : () => Boolean(window.navigator.clipboard && window.navigator.clipboard.read),
|
|
591
|
+
'androidx.compose.foundation.internal.getTextFromBlob' : (blob) => blob.text(),
|
|
592
|
+
'androidx.compose.foundation.internal.doesJsArrayContainValue' : (jsArray, value) => jsArray.includes(value),
|
|
593
|
+
'androidx.compose.foundation.text.EventListener' : (handler) => (event) => { handler(event) },
|
|
543
594
|
'androidx.compose.foundation.gestures.legacyWheelDeltaX' : (event) => (event.wheelDeltaX == null) ? NaN : event.wheelDeltaX,
|
|
544
595
|
'androidx.compose.foundation.gestures.legacyWheelDeltaY' : (event) => (event.wheelDeltaY == null) ? NaN : event.wheelDeltaY,
|
|
545
596
|
'coil3.decode.blob' : (code) => new Blob([code], { type: 'application/javascript' }),
|
|
@@ -626,6 +677,10 @@ const js_code = {
|
|
|
626
677
|
'io.ktor.client.utils.setObjectField' : (obj, name, value) => obj[name]=value,
|
|
627
678
|
'io.ktor.client.utils.eventAsString' : (event) => JSON.stringify(event, ['message', 'target', 'type', 'isTrusted']),
|
|
628
679
|
'io.ktor.client.utils.toJsArrayImpl' : (x) => new Uint8Array(x),
|
|
680
|
+
'ee.schimke.composeai.rcplayer.wasm.inputJsonString' : (value) => JSON.stringify(value),
|
|
681
|
+
'ee.schimke.composeai.rcplayer.wasm.postInputEvent' : (kind, key, value, action, values) => {
|
|
682
|
+
if (window.__rcPlayerPost) window.__rcPlayerPost({ type: 'rc-player-input', kind: kind, key: key, value: value, action: action, values: JSON.parse(values) });
|
|
683
|
+
},
|
|
629
684
|
'ee.schimke.composeai.rcplayer.wasm.fetchAsBase64' : (url) => fetch(url).then(function (response) {
|
|
630
685
|
if (!response.ok) throw new Error('HTTP ' + response.status);
|
|
631
686
|
return response.arrayBuffer();
|
|
@@ -765,7 +820,10 @@ const js_code = {
|
|
|
765
820
|
'ee.schimke.composeai.rcplayer.wasm.postHostNamedActionFloat' : (name, value) => (document.documentElement.dataset.rcPlayerNamedAction = name, document.documentElement.dataset.rcPlayerNamedActionValue = 'float:' + String(value), window.__rcPlayerPost({ type: 'cp-rc-host-named-action', name: name, valueType: 'float', value: value })),
|
|
766
821
|
'ee.schimke.composeai.rcplayer.wasm.postHostNamedActionInt' : (name, value) => (document.documentElement.dataset.rcPlayerNamedAction = name, document.documentElement.dataset.rcPlayerNamedActionValue = 'int:' + String(value), window.__rcPlayerPost({ type: 'cp-rc-host-named-action', name: name, valueType: 'int', value: value })),
|
|
767
822
|
'ee.schimke.composeai.rcplayer.wasm.postHostNamedActionText' : (name, value) => (document.documentElement.dataset.rcPlayerNamedAction = name, document.documentElement.dataset.rcPlayerNamedActionValue = 'string:' + value, window.__rcPlayerPost({ type: 'cp-rc-host-named-action', name: name, valueType: 'string', value: value })),
|
|
768
|
-
'ee.schimke.composeai.rcplayer.wasm.postHostNamedActionFloatList' : (name, encoded) => (document.documentElement.dataset.rcPlayerNamedAction = name, document.documentElement.dataset.rcPlayerNamedActionValue = 'float-array:' + encoded, window.__rcPlayerPost({ type: 'cp-rc-host-named-action', name: name, valueType: 'float-array', value: encoded === '' ? [] : encoded.split(',').map(Number) }))
|
|
823
|
+
'ee.schimke.composeai.rcplayer.wasm.postHostNamedActionFloatList' : (name, encoded) => (document.documentElement.dataset.rcPlayerNamedAction = name, document.documentElement.dataset.rcPlayerNamedActionValue = 'float-array:' + encoded, window.__rcPlayerPost({ type: 'cp-rc-host-named-action', name: name, valueType: 'float-array', value: encoded === '' ? [] : encoded.split(',').map(Number) })),
|
|
824
|
+
'ee.schimke.composeai.rcplayer.wasm.publishInputCapabilities' : (editable) => {
|
|
825
|
+
window.rcPlayerInputCapabilities = Object.freeze({ components: ['rc:input/text:v1', 'rc:input/choice:v1', 'rc:input/toggle:v1', 'rc:input/number:v1', 'rc:input/range:v1'], editing: editable });
|
|
826
|
+
}
|
|
769
827
|
}
|
|
770
828
|
|
|
771
829
|
const StringConstantsProxy = new Proxy({}, {
|
package/dist/rcPlayer.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yschimke/remote-compose-player-cmp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.0",
|
|
4
4
|
"description": "The Compose Multiplatform / Wasm Remote Compose player, as a drop-in browser bundle. Renders .rc documents in an iframe driven by query parameters and window.rcPlayerLoad.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"remote-compose",
|