sample-cross-fx 0.14.23-beta.4124 → 0.14.23
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 +14 -9
- package/app/{index.851526.js → index.e8d08a.js} +39 -13
- package/app/{index.851526.js.map → index.e8d08a.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
|
@@ -89,14 +89,14 @@ declare module "sample-cross-fx" {
|
|
|
89
89
|
* @param Component The component to be rendered.
|
|
90
90
|
* @param defaults Optionally, sets the default values for the expected data.
|
|
91
91
|
*/
|
|
92
|
-
registerExtension<TName>(name: TName extends string ? TName : string, Component:
|
|
92
|
+
registerExtension<TName>(name: TName extends string ? TName : string, Component: AnyExtensionComponent<TName>, defaults?: Partial<ExtensionParams<TName>>): RegistrationDisposer;
|
|
93
93
|
/**
|
|
94
94
|
* Unregisters a global extension component.
|
|
95
95
|
* Only previously registered extension components can be unregistered.
|
|
96
96
|
* @param name The name of the extension slot to unregister from.
|
|
97
97
|
* @param Component The registered extension component to unregister.
|
|
98
98
|
*/
|
|
99
|
-
unregisterExtension<TName>(name: TName extends string ? TName : string, Component:
|
|
99
|
+
unregisterExtension<TName>(name: TName extends string ? TName : string, Component: AnyExtensionComponent<TName>): void;
|
|
100
100
|
/**
|
|
101
101
|
* React component for displaying extensions for a given name.
|
|
102
102
|
* @param props The extension's rendering props.
|
|
@@ -464,14 +464,9 @@ declare module "sample-cross-fx" {
|
|
|
464
464
|
}
|
|
465
465
|
|
|
466
466
|
/**
|
|
467
|
-
*
|
|
467
|
+
* Shorthand for the definition of an extension component.
|
|
468
468
|
*/
|
|
469
|
-
export
|
|
470
|
-
/**
|
|
471
|
-
* The provided parameters for showing the extension.
|
|
472
|
-
*/
|
|
473
|
-
params: T extends keyof PiralExtensionSlotMap ? PiralExtensionSlotMap[T] : T extends string ? any : T;
|
|
474
|
-
}
|
|
469
|
+
export type AnyExtensionComponent<TName> = TName extends keyof PiralExtensionSlotMap ? AnyComponent<ExtensionComponentProps<TName>> : TName extends string ? AnyComponent<ExtensionComponentProps<any>> : AnyComponent<ExtensionComponentProps<TName>>;
|
|
475
470
|
|
|
476
471
|
/**
|
|
477
472
|
* Gives the extension params shape for the given extension slot name.
|
|
@@ -875,6 +870,16 @@ declare module "sample-cross-fx" {
|
|
|
875
870
|
*/
|
|
876
871
|
export interface PiralCustomPageMeta {}
|
|
877
872
|
|
|
873
|
+
/**
|
|
874
|
+
* The props of an extension component.
|
|
875
|
+
*/
|
|
876
|
+
export interface ExtensionComponentProps<T> extends BaseComponentProps {
|
|
877
|
+
/**
|
|
878
|
+
* The provided parameters for showing the extension.
|
|
879
|
+
*/
|
|
880
|
+
params: T extends keyof PiralExtensionSlotMap ? PiralExtensionSlotMap[T] : T extends string ? any : T;
|
|
881
|
+
}
|
|
882
|
+
|
|
878
883
|
/**
|
|
879
884
|
* The mapping of the existing (known) extension slots.
|
|
880
885
|
*/
|
|
@@ -126900,11 +126900,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
126900
126900
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
126901
126901
|
/* harmony export */ "createConverter": () => (/* binding */ createConverter)
|
|
126902
126902
|
/* harmony export */ });
|
|
126903
|
+
/* harmony import */ var solid_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! solid-js/dom */ "../../../node_modules/solid-js/dist/index.js");
|
|
126903
126904
|
/* harmony import */ var solid_js_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! solid-js/dom */ "../../../node_modules/solid-js/dist/dom/index.js");
|
|
126904
|
-
/* harmony import */ var solid_js_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! solid-js/dom */ "../../../node_modules/solid-js/dist/index.js");
|
|
126905
126905
|
/* harmony import */ var _extension__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./extension */ "../../converters/piral-solid/esm/extension.js");
|
|
126906
126906
|
|
|
126907
126907
|
|
|
126908
|
+
|
|
126908
126909
|
function createConverter(config = {}) {
|
|
126909
126910
|
const {
|
|
126910
126911
|
rootName = 'slot'
|
|
@@ -126912,15 +126913,28 @@ function createConverter(config = {}) {
|
|
|
126912
126913
|
const Extension = (0,_extension__WEBPACK_IMPORTED_MODULE_0__.createExtension)(rootName);
|
|
126913
126914
|
|
|
126914
126915
|
const convert = root => ({
|
|
126915
|
-
mount(el, props, context) {
|
|
126916
|
-
|
|
126917
|
-
|
|
126918
|
-
|
|
126916
|
+
mount(el, props, context, locals) {
|
|
126917
|
+
locals.update = (props, context) => {
|
|
126918
|
+
locals.destroy = (0,solid_js_dom__WEBPACK_IMPORTED_MODULE_1__.render)(() => {
|
|
126919
|
+
(0,solid_js__WEBPACK_IMPORTED_MODULE_2__.onCleanup)(() => {
|
|
126920
|
+
el.innerHTML = '';
|
|
126921
|
+
});
|
|
126922
|
+
return (0,solid_js__WEBPACK_IMPORTED_MODULE_2__.createComponent)(root, Object.assign({
|
|
126923
|
+
context
|
|
126924
|
+
}, props));
|
|
126925
|
+
}, el);
|
|
126926
|
+
};
|
|
126927
|
+
|
|
126928
|
+
locals.update(props, context);
|
|
126919
126929
|
},
|
|
126920
126930
|
|
|
126921
|
-
|
|
126922
|
-
|
|
126923
|
-
|
|
126931
|
+
update(el, props, context, locals) {
|
|
126932
|
+
locals.destroy();
|
|
126933
|
+
locals.update(props, context);
|
|
126934
|
+
},
|
|
126935
|
+
|
|
126936
|
+
unmount(el, locals) {
|
|
126937
|
+
locals.destroy();
|
|
126924
126938
|
}
|
|
126925
126939
|
|
|
126926
126940
|
});
|
|
@@ -126982,6 +126996,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
126982
126996
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
126983
126997
|
/* harmony export */ "createExtension": () => (/* binding */ createExtension)
|
|
126984
126998
|
/* harmony export */ });
|
|
126999
|
+
/* harmony import */ var solid_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! solid-js */ "../../../node_modules/solid-js/dist/index.js");
|
|
127000
|
+
|
|
126985
127001
|
function createExtension(rootName) {
|
|
126986
127002
|
return props => {
|
|
126987
127003
|
const element = document.createElement(rootName);
|
|
@@ -126994,6 +127010,16 @@ function createExtension(rootName) {
|
|
|
126994
127010
|
}
|
|
126995
127011
|
}));
|
|
126996
127012
|
}, 0);
|
|
127013
|
+
(0,solid_js__WEBPACK_IMPORTED_MODULE_0__.createEffect)(() => {
|
|
127014
|
+
element.dispatchEvent(new CustomEvent('extension-props-changed', {
|
|
127015
|
+
detail: {
|
|
127016
|
+
name: props.name,
|
|
127017
|
+
empty: props.empty,
|
|
127018
|
+
params: props.params,
|
|
127019
|
+
render: props.render
|
|
127020
|
+
}
|
|
127021
|
+
}));
|
|
127022
|
+
});
|
|
126997
127023
|
return element;
|
|
126998
127024
|
};
|
|
126999
127025
|
}
|
|
@@ -129731,7 +129757,7 @@ function createInstance(config = {}) {
|
|
|
129731
129757
|
const createApi = apiFactory(context, usedPlugins);
|
|
129732
129758
|
const root = createApi({
|
|
129733
129759
|
name: 'root',
|
|
129734
|
-
version: "0.14.23
|
|
129760
|
+
version: "0.14.23" || 0,
|
|
129735
129761
|
spec: ''
|
|
129736
129762
|
});
|
|
129737
129763
|
const options = (0,_helpers__WEBPACK_IMPORTED_MODULE_6__.createPiletOptions)({
|
|
@@ -131731,12 +131757,12 @@ function installPiralDebug(options) {
|
|
|
131731
131757
|
debug: debugApiVersion,
|
|
131732
131758
|
instance: {
|
|
131733
131759
|
name: "sample-cross-fx",
|
|
131734
|
-
version: "0.14.23
|
|
131760
|
+
version: "0.14.23",
|
|
131735
131761
|
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/dom,piral-ng/common,preact,riot,rxjs,vue,zone.js,react,react-dom,react-router,react-router-dom,history,tslib,path-to-regexp,@libre/atom,@dbeining/react-atom"
|
|
131736
131762
|
},
|
|
131737
131763
|
build: {
|
|
131738
|
-
date: "2022-
|
|
131739
|
-
cli: "0.14.
|
|
131764
|
+
date: "2022-05-01T12:50:23.676Z",
|
|
131765
|
+
cli: "0.14.23",
|
|
131740
131766
|
compat: "0.14"
|
|
131741
131767
|
},
|
|
131742
131768
|
pilets: {
|
|
@@ -253997,4 +254023,4 @@ const app = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__.createElement(piral_
|
|
|
253997
254023
|
|
|
253998
254024
|
/******/ })()
|
|
253999
254025
|
;
|
|
254000
|
-
//# sourceMappingURL=index.
|
|
254026
|
+
//# sourceMappingURL=index.e8d08a.js.map
|