sample-cross-fx 0.15.13-beta.5560 → 0.15.13-beta.5583
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/app/index.d.ts +1 -1
- package/app/{index.d15ee6.js → index.ec41fb.js} +71 -12
- package/app/{index.d15ee6.js.map → index.ec41fb.js.map} +1 -1
- package/app/index.html +1 -1
- package/app/index.js +1 -1
- package/files.tar +0 -0
- package/files_once.tar +0 -0
- package/package.json +20 -20
package/app/index.d.ts
CHANGED
|
@@ -1166,7 +1166,7 @@ export interface ExtensionRegistration extends BaseRegistration {
|
|
|
1166
1166
|
defaults: any;
|
|
1167
1167
|
}
|
|
1168
1168
|
|
|
1169
|
-
export type BlazorRootConfig = [root: HTMLDivElement, capabilities: Array<string>, applyChanges: (pilet:
|
|
1169
|
+
export type BlazorRootConfig = [root: HTMLDivElement, capabilities: Array<string>, applyChanges: (pilet: PiletApi) => void];
|
|
1170
1170
|
|
|
1171
1171
|
/**
|
|
1172
1172
|
* The context to be transported into the generic components.
|
|
@@ -54249,6 +54249,18 @@ function createConverter(lazy, opts, language, logLevel) {
|
|
|
54249
54249
|
if (typeof language.current === 'string') {
|
|
54250
54250
|
yield (0,_interop__WEBPACK_IMPORTED_MODULE_1__.setLanguage)(language.current);
|
|
54251
54251
|
}
|
|
54252
|
+
if (capabilities.includes('events')) {
|
|
54253
|
+
const eventDispatcher = document.body.dispatchEvent;
|
|
54254
|
+
// listen to all events for forwarding them
|
|
54255
|
+
document.body.dispatchEvent = function (ev) {
|
|
54256
|
+
if (ev.type.startsWith('piral-')) {
|
|
54257
|
+
const type = ev.type.replace('piral-', '');
|
|
54258
|
+
const args = ev.detail.arg;
|
|
54259
|
+
(0,_interop__WEBPACK_IMPORTED_MODULE_1__.processEvent)(type, args);
|
|
54260
|
+
}
|
|
54261
|
+
return eventDispatcher.call(this, ev);
|
|
54262
|
+
};
|
|
54263
|
+
}
|
|
54252
54264
|
if (typeof language.onChange === 'function') {
|
|
54253
54265
|
language.onChange(_interop__WEBPACK_IMPORTED_MODULE_1__.setLanguage);
|
|
54254
54266
|
}
|
|
@@ -54290,7 +54302,29 @@ function createConverter(lazy, opts, language, logLevel) {
|
|
|
54290
54302
|
}
|
|
54291
54303
|
locals.state = 'fresh';
|
|
54292
54304
|
locals.next = noop;
|
|
54293
|
-
locals.dispose = (0,_events__WEBPACK_IMPORTED_MODULE_3__.attachEvents)(el, ev =>
|
|
54305
|
+
locals.dispose = (0,_events__WEBPACK_IMPORTED_MODULE_3__.attachEvents)(el, ev => {
|
|
54306
|
+
ev.stopPropagation();
|
|
54307
|
+
const {
|
|
54308
|
+
target,
|
|
54309
|
+
props
|
|
54310
|
+
} = ev.detail;
|
|
54311
|
+
piral.renderHtmlExtension(target, props);
|
|
54312
|
+
}, ev => {
|
|
54313
|
+
ev.stopPropagation();
|
|
54314
|
+
const {
|
|
54315
|
+
to,
|
|
54316
|
+
state,
|
|
54317
|
+
replace
|
|
54318
|
+
} = ev.detail;
|
|
54319
|
+
replace ? nav.replace(to, state) : nav.push(to, state);
|
|
54320
|
+
}, ev => {
|
|
54321
|
+
ev.stopPropagation();
|
|
54322
|
+
const {
|
|
54323
|
+
type,
|
|
54324
|
+
args
|
|
54325
|
+
} = ev.detail;
|
|
54326
|
+
piral.emit(type, args);
|
|
54327
|
+
});
|
|
54294
54328
|
function mountClassic(config) {
|
|
54295
54329
|
return (0,_interop__WEBPACK_IMPORTED_MODULE_1__.activate)(moduleName, props).then(refId => {
|
|
54296
54330
|
const [root] = config;
|
|
@@ -54322,11 +54356,11 @@ function createConverter(lazy, opts, language, logLevel) {
|
|
|
54322
54356
|
};
|
|
54323
54357
|
});
|
|
54324
54358
|
}
|
|
54325
|
-
(loader || (convert.loader = loader = boot())).then(config => dependency(config).then(() => {
|
|
54359
|
+
(loader || (convert.loader = loader = boot(opts))).then(config => dependency(config).then(() => {
|
|
54326
54360
|
if (locals.state === 'fresh') {
|
|
54327
54361
|
const [_, capabilities, applyChanges] = config;
|
|
54328
54362
|
const fn = capabilities.includes('custom-element') ? mountModern : mountClassic;
|
|
54329
|
-
applyChanges(piral
|
|
54363
|
+
applyChanges(piral);
|
|
54330
54364
|
return fn(config).then(() => {
|
|
54331
54365
|
locals.state = 'mounted';
|
|
54332
54366
|
locals.next(config);
|
|
@@ -54567,6 +54601,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
54567
54601
|
/* harmony export */ "addGlobalEventListeners": () => (/* binding */ addGlobalEventListeners),
|
|
54568
54602
|
/* harmony export */ "attachEvents": () => (/* binding */ attachEvents),
|
|
54569
54603
|
/* harmony export */ "emitNavigateEvent": () => (/* binding */ emitNavigateEvent),
|
|
54604
|
+
/* harmony export */ "emitPiralEvent": () => (/* binding */ emitPiralEvent),
|
|
54570
54605
|
/* harmony export */ "emitRenderEvent": () => (/* binding */ emitRenderEvent),
|
|
54571
54606
|
/* harmony export */ "removeGlobalEventListeners": () => (/* binding */ removeGlobalEventListeners)
|
|
54572
54607
|
/* harmony export */ });
|
|
@@ -54577,7 +54612,8 @@ const eventParents = [];
|
|
|
54577
54612
|
const globalEventNames = ['abort', 'blur', 'change', 'error', 'focus', 'load', 'loadend', 'loadstart', 'mouseenter', 'mouseleave', 'progress', 'reset', 'scroll', 'submit', 'unload', 'DOMNodeInsertedIntoDocument', 'DOMNodeRemovedFromDocument', 'click', 'dblclick', 'mousedown', 'mousemove', 'mouseup'];
|
|
54578
54613
|
const eventNames = {
|
|
54579
54614
|
render: 'render-blazor-extension',
|
|
54580
|
-
navigate: 'navigate-blazor'
|
|
54615
|
+
navigate: 'navigate-blazor',
|
|
54616
|
+
piral: 'piral-blazor'
|
|
54581
54617
|
};
|
|
54582
54618
|
function isRooted(target) {
|
|
54583
54619
|
let parent = target.parentElement;
|
|
@@ -54602,9 +54638,11 @@ function dispatchToRoot(event) {
|
|
|
54602
54638
|
var _a;
|
|
54603
54639
|
(0,_navigation__WEBPACK_IMPORTED_MODULE_0__.isInternalNavigation)(event) && (0,_navigation__WEBPACK_IMPORTED_MODULE_0__.performInternalNavigation)(event);
|
|
54604
54640
|
// the mutation event cannot be cloned (at least in Webkit-based browsers)
|
|
54605
|
-
if (!(event instanceof MutationEvent)) {
|
|
54641
|
+
if (!(event instanceof MutationEvent) && !event.processed) {
|
|
54606
54642
|
const eventClone = new event.constructor(event.type, event);
|
|
54607
54643
|
(_a = document.getElementById(blazorRootId)) === null || _a === void 0 ? void 0 : _a.dispatchEvent(eventClone);
|
|
54644
|
+
// make sure to only process every event once; even though multiple boundaries might be active
|
|
54645
|
+
event.processed = true;
|
|
54608
54646
|
}
|
|
54609
54647
|
}
|
|
54610
54648
|
function emitRenderEvent(source, name, params, sourceRef, fallbackComponent) {
|
|
@@ -54645,6 +54683,15 @@ function emitRenderEvent(source, name, params, sourceRef, fallbackComponent) {
|
|
|
54645
54683
|
});
|
|
54646
54684
|
delayEmit();
|
|
54647
54685
|
}
|
|
54686
|
+
function emitPiralEvent(type, args) {
|
|
54687
|
+
document.body.dispatchEvent(new CustomEvent(eventNames.piral, {
|
|
54688
|
+
bubbles: false,
|
|
54689
|
+
detail: {
|
|
54690
|
+
type,
|
|
54691
|
+
args
|
|
54692
|
+
}
|
|
54693
|
+
}));
|
|
54694
|
+
}
|
|
54648
54695
|
function emitNavigateEvent(source, to, replace = false, state) {
|
|
54649
54696
|
findTarget(source).dispatchEvent(new CustomEvent(eventNames.navigate, {
|
|
54650
54697
|
bubbles: true,
|
|
@@ -54655,14 +54702,20 @@ function emitNavigateEvent(source, to, replace = false, state) {
|
|
|
54655
54702
|
}
|
|
54656
54703
|
}));
|
|
54657
54704
|
}
|
|
54658
|
-
function attachEvents(host, render, navigate) {
|
|
54705
|
+
function attachEvents(host, render, navigate, forward) {
|
|
54659
54706
|
eventParents.push(host);
|
|
54660
54707
|
host.addEventListener(eventNames.render, render, false);
|
|
54661
54708
|
host.addEventListener(eventNames.navigate, navigate, false);
|
|
54709
|
+
if (eventParents.length === 1) {
|
|
54710
|
+
document.body.addEventListener(eventNames.piral, forward, false);
|
|
54711
|
+
}
|
|
54662
54712
|
return () => {
|
|
54663
54713
|
eventParents.splice(eventParents.indexOf(host), 1);
|
|
54664
54714
|
host.removeEventListener(eventNames.render, render, false);
|
|
54665
54715
|
host.removeEventListener(eventNames.navigate, navigate, false);
|
|
54716
|
+
if (eventParents.length === 0) {
|
|
54717
|
+
document.body.removeEventListener(eventNames.piral, forward, false);
|
|
54718
|
+
}
|
|
54666
54719
|
};
|
|
54667
54720
|
}
|
|
54668
54721
|
function addGlobalEventListeners(el) {
|
|
@@ -54694,6 +54747,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
54694
54747
|
/* harmony export */ "loadBlazorPilet": () => (/* binding */ loadBlazorPilet),
|
|
54695
54748
|
/* harmony export */ "loadResource": () => (/* binding */ loadResource),
|
|
54696
54749
|
/* harmony export */ "loadResourceWithSymbol": () => (/* binding */ loadResourceWithSymbol),
|
|
54750
|
+
/* harmony export */ "processEvent": () => (/* binding */ processEvent),
|
|
54697
54751
|
/* harmony export */ "reactivate": () => (/* binding */ reactivate),
|
|
54698
54752
|
/* harmony export */ "setLanguage": () => (/* binding */ setLanguage),
|
|
54699
54753
|
/* harmony export */ "setLogLevel": () => (/* binding */ setLogLevel),
|
|
@@ -54733,7 +54787,8 @@ function createBase() {
|
|
|
54733
54787
|
function prepareForStartup() {
|
|
54734
54788
|
const originalApplyHotReload = window.Blazor._internal.applyHotReload;
|
|
54735
54789
|
const queue = [];
|
|
54736
|
-
const applyChanges =
|
|
54790
|
+
const applyChanges = api => {
|
|
54791
|
+
const pilet = api.meta;
|
|
54737
54792
|
if (pilet.config && pilet.config.blazorHotReload) {
|
|
54738
54793
|
for (const item of queue.splice(0, queue.length)) {
|
|
54739
54794
|
item();
|
|
@@ -54807,6 +54862,9 @@ function addScript(url) {
|
|
|
54807
54862
|
document.body.appendChild(script);
|
|
54808
54863
|
});
|
|
54809
54864
|
}
|
|
54865
|
+
function processEvent(type, args) {
|
|
54866
|
+
return window.DotNet.invokeMethodAsync(coreLib, 'ProcessEvent', type, args);
|
|
54867
|
+
}
|
|
54810
54868
|
function setLogLevel(logLevel) {
|
|
54811
54869
|
return window.DotNet.invokeMethodAsync(coreLib, 'SetLogLevel', logLevel);
|
|
54812
54870
|
}
|
|
@@ -54882,7 +54940,8 @@ function initialize(scriptUrl, publicPath, opts = {}) {
|
|
|
54882
54940
|
script.onload = () => {
|
|
54883
54941
|
Object.assign(window.Blazor, {
|
|
54884
54942
|
emitRenderEvent: _events__WEBPACK_IMPORTED_MODULE_0__.emitRenderEvent,
|
|
54885
|
-
emitNavigateEvent: _events__WEBPACK_IMPORTED_MODULE_0__.emitNavigateEvent
|
|
54943
|
+
emitNavigateEvent: _events__WEBPACK_IMPORTED_MODULE_0__.emitNavigateEvent,
|
|
54944
|
+
emitPiralEvent: _events__WEBPACK_IMPORTED_MODULE_0__.emitPiralEvent
|
|
54886
54945
|
});
|
|
54887
54946
|
startBlazor(opts).then(resolve);
|
|
54888
54947
|
};
|
|
@@ -60702,12 +60761,12 @@ function installPiralDebug(options) {
|
|
|
60702
60761
|
debug: debugApiVersion,
|
|
60703
60762
|
instance: {
|
|
60704
60763
|
name: "sample-cross-fx",
|
|
60705
|
-
version: "0.15.13-beta.
|
|
60764
|
+
version: "0.15.13-beta.5583",
|
|
60706
60765
|
dependencies: "@angular/common,@angular/compiler,@angular/core,@angular/platform-browser,@angular/platform-browser-dynamic,@webcomponents/webcomponentsjs,angular,aurelia-framework,aurelia-templating-binding,aurelia-templating-resources,aurelia-pal-browser,aurelia-event-aggregator,aurelia-history-browser,hyperapp,inferno,inferno-create-element,mithril,lit-element,solid-js,solid-js/web,piral-ng/common,preact,riot,rxjs,vue,zone.js,tslib,react,react-dom,react-router,react-router-dom"
|
|
60707
60766
|
},
|
|
60708
60767
|
build: {
|
|
60709
|
-
date: "2023-05-
|
|
60710
|
-
cli: "0.15.13-beta.
|
|
60768
|
+
date: "2023-05-29T12:55:04.194Z",
|
|
60769
|
+
cli: "0.15.13-beta.5583",
|
|
60711
60770
|
compat: "0.15"
|
|
60712
60771
|
}
|
|
60713
60772
|
};
|
|
@@ -222224,4 +222283,4 @@ root.render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__.createElement(piral
|
|
|
222224
222283
|
|
|
222225
222284
|
/******/ })()
|
|
222226
222285
|
;
|
|
222227
|
-
//# sourceMappingURL=index.
|
|
222286
|
+
//# sourceMappingURL=index.ec41fb.js.map
|