This commit is contained in:
lalBi94
2023-03-05 13:23:23 +01:00
commit 7bc56c09b5
14034 changed files with 1834369 additions and 0 deletions

26
node_modules/riot/esm/api/component.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
/* Riot WIP, @license MIT */
import compose from 'cumpa';
import { createComponentFromWrapper } from '../core/create-component-from-wrapper.js';
/**
* Helper method to create component without relying on the registered ones
* @param {Object} implementation - component implementation
* @returns {Function} function that will allow you to mount a riot component on a DOM node
*/
function component(implementation) {
return function (el, props, _temp) {
let {
slots,
attributes,
parentScope
} = _temp === void 0 ? {} : _temp;
return compose(c => c.mount(el, parentScope), c => c({
props,
slots,
attributes
}), createComponentFromWrapper)(implementation);
};
}
export { component };