Socket
Socket
Sign inDemoInstall

riot

Package Overview
Dependencies
Maintainers
1
Versions
276
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

riot - npm Package Compare versions

Comparing version 7.1.0 to 9.0.0-rc

esm/_virtual/_babylon.js

10

esm/api/__.js

@@ -1,6 +0,6 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import bindingTypes from '../node_modules/@riotjs/util/binding-types.js';
import { DOM_COMPONENT_INSTANCE_PROPERTY, PARENT_KEY_SYMBOL } from '../node_modules/@riotjs/util/constants.js';
import expressionTypes from '../node_modules/@riotjs/util/expression-types.js';
import { template as create, createBinding as create$1, createExpression as create$4 } from '../node_modules/@riotjs/dom-bindings/dist/esm.dom-bindings.js';
import { template as create, createBinding as create$1, createExpression as create$4 } from '../node_modules/@riotjs/dom-bindings/dist/dom-bindings.js';
import cssManager from '../core/css-manager.js';

@@ -16,10 +16,10 @@

bindingTypes,
expressionTypes
expressionTypes,
},
globals: {
DOM_COMPONENT_INSTANCE_PROPERTY,
PARENT_KEY_SYMBOL
}
PARENT_KEY_SYMBOL,
},
};
export { __ };

@@ -1,3 +0,3 @@

/* Riot v7.1.0, @license MIT */
import compose from '../node_modules/cumpa/index.next.js';
/* Riot v9.0.0-rc, @license MIT */
import compose from '../node_modules/cumpa/index.js';
import { createComponentFromWrapper } from '../core/create-component-from-wrapper.js';

@@ -11,16 +11,10 @@

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);
};
return (el, props, { slots, attributes, parentScope } = {}) =>
compose(
(c) => c.mount(el, parentScope),
(c) => c({ props, slots, attributes }),
createComponentFromWrapper,
)(implementation)
}
export { component };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { isFunction } from '../node_modules/@riotjs/util/checks.js';

@@ -14,6 +14,8 @@ import { PLUGINS_SET } from '../node_modules/@riotjs/util/constants.js';

if (PLUGINS_SET.has(plugin)) panic('This plugin was already installed');
PLUGINS_SET.add(plugin);
return PLUGINS_SET;
return PLUGINS_SET
}
export { install };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import $ from '../node_modules/bianco.query/index.next.js';

@@ -13,5 +13,7 @@ import { mountComponent } from '../core/mount-component.js';

function mount(selector, initialProps, name) {
return $(selector).map(element => mountComponent(element, initialProps, name));
return $(selector).map((element) =>
mountComponent(element, initialProps, name),
)
}
export { mount };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { isFunction } from '../node_modules/@riotjs/util/checks.js';

@@ -12,7 +12,8 @@ import { IS_PURE_SYMBOL } from '../node_modules/@riotjs/util/constants.js';

function pure(func) {
if (!isFunction(func)) panic('riot.pure accepts only arguments of type "function"');
if (!isFunction(func))
panic('riot.pure accepts only arguments of type "function"');
func[IS_PURE_SYMBOL] = true;
return func;
return func
}
export { pure };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { COMPONENTS_IMPLEMENTATION_MAP } from '../node_modules/@riotjs/util/constants.js';

@@ -12,18 +12,14 @@ import { panic } from '../node_modules/@riotjs/util/misc.js';

*/
function register(name, _ref) {
let {
css,
template,
exports
} = _ref;
if (COMPONENTS_IMPLEMENTATION_MAP.has(name)) panic(`The component "${name}" was already registered`);
COMPONENTS_IMPLEMENTATION_MAP.set(name, createComponentFromWrapper({
function register(name, { css, template, exports }) {
if (COMPONENTS_IMPLEMENTATION_MAP.has(name))
panic(`The component "${name}" was already registered`);
COMPONENTS_IMPLEMENTATION_MAP.set(
name,
css,
template,
exports
}));
return COMPONENTS_IMPLEMENTATION_MAP;
createComponentFromWrapper({ name, css, template, exports }),
);
return COMPONENTS_IMPLEMENTATION_MAP
}
export { register };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { PLUGINS_SET } from '../node_modules/@riotjs/util/constants.js';

@@ -12,6 +12,8 @@ import { panic } from '../node_modules/@riotjs/util/misc.js';

if (!PLUGINS_SET.has(plugin)) panic('This plugin was never installed');
PLUGINS_SET.delete(plugin);
return PLUGINS_SET;
return PLUGINS_SET
}
export { uninstall };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import $ from '../node_modules/bianco.query/index.next.js';

@@ -12,10 +12,10 @@ import { DOM_COMPONENT_INSTANCE_PROPERTY } from '../node_modules/@riotjs/util/constants.js';

function unmount(selector, keepRootElement) {
return $(selector).map(element => {
return $(selector).map((element) => {
if (element[DOM_COMPONENT_INSTANCE_PROPERTY]) {
element[DOM_COMPONENT_INSTANCE_PROPERTY].unmount(keepRootElement);
}
return element;
});
return element
})
}
export { unmount };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { COMPONENTS_IMPLEMENTATION_MAP } from '../node_modules/@riotjs/util/constants.js';

@@ -12,8 +12,11 @@ import { panic } from '../node_modules/@riotjs/util/misc.js';

function unregister(name) {
if (!COMPONENTS_IMPLEMENTATION_MAP.has(name)) panic(`The component "${name}" was never registered`);
if (!COMPONENTS_IMPLEMENTATION_MAP.has(name))
panic(`The component "${name}" was never registered`);
COMPONENTS_IMPLEMENTATION_MAP.delete(name);
cssManager.remove(name);
return COMPONENTS_IMPLEMENTATION_MAP;
return COMPONENTS_IMPLEMENTATION_MAP
}
export { unregister };

@@ -1,5 +0,5 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
/** @type {string} current riot version */
const version = 'v7.1.0';
const version = 'v9.0.0-rc';
export { version };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
/**

@@ -8,4 +8,4 @@ * no-op function needed to add the proper types to your component via typescript

/* istanbul ignore next */
const withTypes = component => component;
const withTypes = (component) => component;
export { withTypes };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { IS_DIRECTIVE } from '../node_modules/@riotjs/util/constants.js';

@@ -3,0 +3,0 @@ import { getName } from '../utils/dom.js';

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { DOM_COMPONENT_INSTANCE_PROPERTY } from '../node_modules/@riotjs/util/constants.js';

@@ -10,4 +10,5 @@

*/
const bindDOMNodeToComponentInstance = (node, component) => node[DOM_COMPONENT_INSTANCE_PROPERTY] = component;
const bindDOMNodeToComponentInstance = (node, component) =>
(node[DOM_COMPONENT_INSTANCE_PROPERTY] = component);
export { bindDOMNodeToComponentInstance };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import $ from '../node_modules/bianco.query/index.next.js';

@@ -7,9 +7,9 @@

$(selector) {
return $(selector, this.root)[0];
return $(selector, this.root)[0]
},
$$(selector) {
return $(selector, this.root);
}
return $(selector, this.root)
},
});
export { COMPONENT_DOM_SELECTORS };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { SHOULD_UPDATE_KEY, ON_BEFORE_MOUNT_KEY, ON_MOUNTED_KEY, ON_BEFORE_UPDATE_KEY, ON_UPDATED_KEY, ON_BEFORE_UNMOUNT_KEY, ON_UNMOUNTED_KEY } from '../node_modules/@riotjs/util/constants.js';

@@ -12,5 +12,5 @@ import { noop } from '../node_modules/@riotjs/util/functions.js';

[ON_BEFORE_UNMOUNT_KEY]: noop,
[ON_UNMOUNTED_KEY]: noop
[ON_UNMOUNTED_KEY]: noop,
});
export { COMPONENT_LIFECYCLE_METHODS };

@@ -1,3 +0,3 @@

/* Riot v7.1.0, @license MIT */
import { template as create } from '../node_modules/@riotjs/dom-bindings/dist/esm.dom-bindings.js';
/* Riot v9.0.0-rc, @license MIT */
import { template as create } from '../node_modules/@riotjs/dom-bindings/dist/dom-bindings.js';
import expressionTypes from '../node_modules/@riotjs/util/expression-types.js';

@@ -13,6 +13,15 @@ import bindingTypes from '../node_modules/@riotjs/util/binding-types.js';

*/
function componentTemplateFactory(template, componentWrapper, getChildComponent) {
return template(create, expressionTypes, bindingTypes, getChildComponent);
function componentTemplateFactory(
template,
componentWrapper,
getChildComponent,
) {
return template(
create,
expressionTypes,
bindingTypes,
getChildComponent,
)
}
export { componentTemplateFactory };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { callOrAssign } from '../node_modules/@riotjs/util/functions.js';

@@ -11,5 +11,8 @@

function computeComponentState(oldState, newState) {
return Object.assign({}, oldState, callOrAssign(newState));
return {
...oldState,
...callOrAssign(newState),
}
}
export { computeComponentState };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { DOMattributesToObject } from '../node_modules/@riotjs/util/dom.js';

@@ -11,9 +11,9 @@ import { callOrAssign } from '../node_modules/@riotjs/util/functions.js';

*/
function computeInitialProps(element, initialProps) {
if (initialProps === void 0) {
initialProps = {};
function computeInitialProps(element, initialProps = {}) {
return {
...DOMattributesToObject(element),
...callOrAssign(initialProps),
}
return Object.assign({}, DOMattributesToObject(element), callOrAssign(initialProps));
}
export { computeInitialProps };

@@ -1,4 +0,4 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { createCoreAPIMethods } from './create-core-api-methods.js';
import { createExpression as create$4 } from '../node_modules/@riotjs/dom-bindings/dist/esm.dom-bindings.js';
import { createExpression as create$4 } from '../node_modules/@riotjs/dom-bindings/dist/dom-bindings.js';

@@ -11,16 +11,16 @@ /**

*/
function createAttributeBindings(node, attributes) {
if (attributes === void 0) {
attributes = [];
}
const expressions = attributes.map(a => create$4(node, a));
function createAttributeBindings(node, attributes = []) {
const expressions = attributes.map((a) => create$4(node, a));
const binding = {};
return Object.assign(binding, Object.assign({
expressions
}, createCoreAPIMethods(method => scope => {
expressions.forEach(e => e[method](scope));
return binding;
})));
return Object.assign(binding, {
expressions,
...createCoreAPIMethods((method) => (scope) => {
expressions.forEach((e) => e[method](scope));
return binding
}),
})
}
export { createAttributeBindings };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { IS_PURE_SYMBOL, COMPONENTS_IMPLEMENTATION_MAP } from '../node_modules/@riotjs/util/constants.js';

@@ -16,11 +16,10 @@ import { camelToDashCase } from '../node_modules/@riotjs/util/strings.js';

*/
function createChildrenComponentsObject(components) {
if (components === void 0) {
components = {};
}
return Object.entries(callOrAssign(components)).reduce((acc, _ref) => {
let [key, value] = _ref;
acc[camelToDashCase(key)] = createComponentFromWrapper(value);
return acc;
}, {});
function createChildrenComponentsObject(components = {}) {
return Object.entries(callOrAssign(components)).reduce(
(acc, [key, value]) => {
acc[camelToDashCase(key)] = createComponentFromWrapper(value);
return acc
},
{},
)
}

@@ -33,10 +32,14 @@

*/
const createChildComponentGetter = componentWrapper => {
const childrenComponents = createChildrenComponentsObject(componentWrapper.exports ? componentWrapper.exports.components : {});
return name => {
const createChildComponentGetter = (componentWrapper) => {
const childrenComponents = createChildrenComponentsObject(
componentWrapper.exports ? componentWrapper.exports.components : {},
);
return (name) => {
// improve support for recursive components
if (name === componentWrapper.name) return memoizedCreateComponentFromWrapper(componentWrapper);
if (name === componentWrapper.name)
return memoizedCreateComponentFromWrapper(componentWrapper)
// return the registered components
return childrenComponents[name] || COMPONENTS_IMPLEMENTATION_MAP.get(name);
};
return childrenComponents[name] || COMPONENTS_IMPLEMENTATION_MAP.get(name)
}
};

@@ -61,24 +64,24 @@

function createComponentFromWrapper(componentWrapper) {
const {
css,
template,
exports,
name
} = componentWrapper;
const templateFn = template ? componentTemplateFactory(template, componentWrapper, createChildComponentGetter(componentWrapper)) : MOCKED_TEMPLATE_INTERFACE;
return _ref2 => {
let {
slots,
attributes,
props
} = _ref2;
const { css, template, exports, name } = componentWrapper;
const templateFn = template
? componentTemplateFactory(
template,
componentWrapper,
createChildComponentGetter(componentWrapper),
)
: MOCKED_TEMPLATE_INTERFACE;
return ({ slots, attributes, props }) => {
// pure components rendering will be managed by the end user
if (exports && exports[IS_PURE_SYMBOL]) return createPureComponent(exports, {
slots,
attributes,
props,
css,
template
});
if (exports && exports[IS_PURE_SYMBOL])
return createPureComponent(exports, {
slots,
attributes,
props,
css,
template,
})
const componentAPI = callOrAssign(exports) || {};
const component = instantiateComponent({

@@ -88,8 +91,4 @@ css,

componentAPI,
name
})({
slots,
attributes,
props
});
name,
})({ slots, attributes, props });

@@ -102,14 +101,14 @@ // notice that for the components created via tag binding

mount(element, parentScope, state) {
return component.mount(element, state, parentScope);
return component.mount(element, state, parentScope)
},
update(parentScope, state) {
return component.update(state, parentScope);
return component.update(state, parentScope)
},
unmount(preserveRoot) {
return component.unmount(preserveRoot);
}
};
};
return component.unmount(preserveRoot)
},
}
}
}
export { createComponentFromWrapper };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { MOUNT_METHOD_KEY, UPDATE_METHOD_KEY, UNMOUNT_METHOD_KEY } from '../node_modules/@riotjs/util/constants.js';

@@ -10,8 +10,12 @@

function createCoreAPIMethods(mapFunction) {
return [MOUNT_METHOD_KEY, UPDATE_METHOD_KEY, UNMOUNT_METHOD_KEY].reduce((acc, method) => {
acc[method] = mapFunction(method);
return acc;
}, {});
return [MOUNT_METHOD_KEY, UPDATE_METHOD_KEY, UNMOUNT_METHOD_KEY].reduce(
(acc, method) => {
acc[method] = mapFunction(method);
return acc
},
{},
)
}
export { createCoreAPIMethods };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { MOUNT_METHOD_KEY, IS_PURE_SYMBOL } from '../node_modules/@riotjs/util/constants.js';

@@ -19,21 +19,15 @@ import { panic } from '../node_modules/@riotjs/util/misc.js';

*/
function createPureComponent(pureFactoryFunction, _ref) {
let {
slots,
attributes,
props,
css,
template
} = _ref;
function createPureComponent(
pureFactoryFunction,
{ slots, attributes, props, css, template },
) {
if (template) panic('Pure components can not have html');
if (css) panic('Pure components do not have css');
const component = defineDefaults(pureFactoryFunction({
slots,
attributes,
props
}), PURE_COMPONENT_API);
return createCoreAPIMethods(method => function () {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
const component = defineDefaults(
pureFactoryFunction({ slots, attributes, props }),
PURE_COMPONENT_API,
);
return createCoreAPIMethods((method) => (...args) => {
// intercept the mount calls to bind the DOM node to the pure object created

@@ -47,7 +41,9 @@ // see also https://github.com/riot/riot/issues/2806

}
component[method](...args);
return component;
});
return component
})
}
export { createPureComponent };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import $ from '../node_modules/bianco.query/index.next.js';

@@ -9,3 +9,3 @@ import { set } from '../node_modules/bianco.attr/index.next.js';

// memoized curried function
const getStyleNode = (style => {
const getStyleNode = ((style) => {
return () => {

@@ -15,3 +15,3 @@ // lazy evaluation:

// we return its cached result
if (style) return style;
if (style) return style

@@ -25,4 +25,5 @@ // create a new style element or use an existing one

if (!style.parentNode) document.head.appendChild(style);
return style;
};
return style
}
})();

@@ -46,3 +47,4 @@

}
return this;
return this
},

@@ -56,4 +58,5 @@ /**

getStyleNode().innerHTML = [...CSS_BY_NAME.values()].join('\n');
return this;
return this
},
/**

@@ -69,6 +72,7 @@ * Remove a tag style from the DOM

}
return this;
}
return this
},
};
export { CSS_BY_NAME, STYLE_NODE_SELECTOR, cssManager as default };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { SLOTS_KEY, ROOT_KEY, PROPS_KEY, STATE_KEY } from '../node_modules/@riotjs/util/constants.js';

@@ -7,3 +7,3 @@ import { defineProperties, defineDefaults } from '../node_modules/@riotjs/util/objects.js';

import cssManager from './css-manager.js';
import curry from '../node_modules/curri/index.next.js';
import curry from '../node_modules/curri/index.js';
import { manageComponentLifecycle } from './manage-component-lifecycle.js';

@@ -17,27 +17,28 @@

*/
function instantiateComponent(_ref) {
let {
css,
template,
componentAPI,
name
} = _ref;
function instantiateComponent({ css, template, componentAPI, name }) {
// add the component css into the DOM
if (css && name) cssManager.add(name, css);
return curry(manageComponentLifecycle)(defineProperties(
// set the component defaults without overriding the original component API
defineDefaults(componentAPI, Object.assign({}, COMPONENT_LIFECYCLE_METHODS, {
[PROPS_KEY]: {},
[STATE_KEY]: {}
})), Object.assign({
// defined during the component creation
[SLOTS_KEY]: null,
[ROOT_KEY]: null
}, COMPONENT_DOM_SELECTORS, {
name,
css,
template
})));
return curry(manageComponentLifecycle)(
defineProperties(
// set the component defaults without overriding the original component API
defineDefaults(componentAPI, {
...COMPONENT_LIFECYCLE_METHODS,
[PROPS_KEY]: {},
[STATE_KEY]: {},
}),
{
// defined during the component creation
[SLOTS_KEY]: null,
[ROOT_KEY]: null,
// these properties should not be overriden
...COMPONENT_DOM_SELECTORS,
name,
css,
template,
},
),
)
}
export { instantiateComponent };

@@ -1,4 +0,4 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { isFunction, isObject } from '../node_modules/@riotjs/util/checks.js';
import { PARENT_KEY_SYMBOL, ATTRIBUTES_KEY_SYMBOL, PROPS_KEY, STATE_KEY, TEMPLATE_KEY_SYMBOL, ON_BEFORE_MOUNT_KEY, ON_MOUNTED_KEY, SHOULD_UPDATE_KEY, ON_BEFORE_UPDATE_KEY, IS_COMPONENT_UPDATING, ON_UPDATED_KEY, ON_BEFORE_UNMOUNT_KEY, ON_UNMOUNTED_KEY, IS_PURE_SYMBOL, ROOT_KEY, SLOTS_KEY } from '../node_modules/@riotjs/util/constants.js';
import { IS_PURE_SYMBOL, PARENT_KEY_SYMBOL, ATTRIBUTES_KEY_SYMBOL, PROPS_KEY, STATE_KEY, TEMPLATE_KEY_SYMBOL, ROOT_KEY, SLOTS_KEY, ON_BEFORE_MOUNT_KEY, ON_MOUNTED_KEY, SHOULD_UPDATE_KEY, ON_BEFORE_UPDATE_KEY, IS_COMPONENT_UPDATING, ON_UPDATED_KEY, ON_BEFORE_UNMOUNT_KEY, ON_UNMOUNTED_KEY } from '../node_modules/@riotjs/util/constants.js';
import { autobindMethods } from '../node_modules/@riotjs/util/functions.js';

@@ -21,74 +21,113 @@ import { evaluateAttributeExpressions } from '../node_modules/@riotjs/util/misc.js';

*/
function manageComponentLifecycle(component, _ref) {
let {
slots,
attributes,
props
} = _ref;
return autobindMethods(runPlugins(defineProperties(isObject(component) ? Object.create(component) : component, {
mount(element, state, parentScope) {
if (state === void 0) {
state = {};
}
// any element mounted passing through this function can't be a pure component
defineProperty(element, IS_PURE_SYMBOL, false);
this[PARENT_KEY_SYMBOL] = parentScope;
this[ATTRIBUTES_KEY_SYMBOL] = createAttributeBindings(element, attributes).mount(parentScope);
defineProperty(this, PROPS_KEY, Object.freeze(Object.assign({}, computeInitialProps(element, props), evaluateAttributeExpressions(this[ATTRIBUTES_KEY_SYMBOL].expressions))));
this[STATE_KEY] = computeComponentState(this[STATE_KEY], state);
this[TEMPLATE_KEY_SYMBOL] = this.template.createDOM(element).clone();
function manageComponentLifecycle(
component,
{ slots, attributes, props },
) {
return autobindMethods(
runPlugins(
defineProperties(
isObject(component) ? Object.create(component) : component,
{
mount(element, state = {}, parentScope) {
// any element mounted passing through this function can't be a pure component
defineProperty(element, IS_PURE_SYMBOL, false);
this[PARENT_KEY_SYMBOL] = parentScope;
this[ATTRIBUTES_KEY_SYMBOL] = createAttributeBindings(
element,
attributes,
).mount(parentScope);
// link this object to the DOM node
bindDOMNodeToComponentInstance(element, this);
// add eventually the 'is' attribute
component.name && addCssHook(element, component.name);
defineProperty(
this,
PROPS_KEY,
Object.freeze({
...computeInitialProps(element, props),
...evaluateAttributeExpressions(
this[ATTRIBUTES_KEY_SYMBOL].expressions,
),
}),
);
// define the root element
defineProperty(this, ROOT_KEY, element);
// define the slots array
defineProperty(this, SLOTS_KEY, slots);
this[STATE_KEY] = computeComponentState(this[STATE_KEY], state);
this[TEMPLATE_KEY_SYMBOL] = this.template.createDOM(element).clone();
// before mount lifecycle event
this[ON_BEFORE_MOUNT_KEY](this[PROPS_KEY], this[STATE_KEY]);
// mount the template
this[TEMPLATE_KEY_SYMBOL].mount(element, this, parentScope);
this[ON_MOUNTED_KEY](this[PROPS_KEY], this[STATE_KEY]);
return this;
},
update(state, parentScope) {
if (state === void 0) {
state = {};
}
if (parentScope) {
this[PARENT_KEY_SYMBOL] = parentScope;
this[ATTRIBUTES_KEY_SYMBOL].update(parentScope);
}
const newProps = evaluateAttributeExpressions(this[ATTRIBUTES_KEY_SYMBOL].expressions);
if (this[SHOULD_UPDATE_KEY](newProps, this[PROPS_KEY]) === false) return;
defineProperty(this, PROPS_KEY, Object.freeze(Object.assign({}, this[PROPS_KEY], newProps)));
this[STATE_KEY] = computeComponentState(this[STATE_KEY], state);
this[ON_BEFORE_UPDATE_KEY](this[PROPS_KEY], this[STATE_KEY]);
// link this object to the DOM node
bindDOMNodeToComponentInstance(element, this);
// add eventually the 'is' attribute
component.name && addCssHook(element, component.name);
// avoiding recursive updates
// see also https://github.com/riot/riot/issues/2895
if (!this[IS_COMPONENT_UPDATING]) {
this[IS_COMPONENT_UPDATING] = true;
this[TEMPLATE_KEY_SYMBOL].update(this, this[PARENT_KEY_SYMBOL]);
}
this[ON_UPDATED_KEY](this[PROPS_KEY], this[STATE_KEY]);
this[IS_COMPONENT_UPDATING] = false;
return this;
},
unmount(preserveRoot) {
this[ON_BEFORE_UNMOUNT_KEY](this[PROPS_KEY], this[STATE_KEY]);
this[ATTRIBUTES_KEY_SYMBOL].unmount();
// if the preserveRoot is null the template html will be left untouched
// in that case the DOM cleanup will happen differently from a parent node
this[TEMPLATE_KEY_SYMBOL].unmount(this, this[PARENT_KEY_SYMBOL], preserveRoot === null ? null : !preserveRoot);
this[ON_UNMOUNTED_KEY](this[PROPS_KEY], this[STATE_KEY]);
return this;
}
})), Object.keys(component).filter(prop => isFunction(component[prop])));
// define the root element
defineProperty(this, ROOT_KEY, element);
// define the slots array
defineProperty(this, SLOTS_KEY, slots);
// before mount lifecycle event
this[ON_BEFORE_MOUNT_KEY](this[PROPS_KEY], this[STATE_KEY]);
// mount the template
this[TEMPLATE_KEY_SYMBOL].mount(element, this, parentScope);
this[ON_MOUNTED_KEY](this[PROPS_KEY], this[STATE_KEY]);
return this
},
update(state = {}, parentScope) {
if (parentScope) {
this[PARENT_KEY_SYMBOL] = parentScope;
this[ATTRIBUTES_KEY_SYMBOL].update(parentScope);
}
const newProps = evaluateAttributeExpressions(
this[ATTRIBUTES_KEY_SYMBOL].expressions,
);
if (this[SHOULD_UPDATE_KEY](newProps, this[PROPS_KEY]) === false)
return
defineProperty(
this,
PROPS_KEY,
Object.freeze({
// only root components will merge their initial props with the new ones
// children components will just get them overridden see also https://github.com/riot/riot/issues/2978
...(parentScope ? null : this[PROPS_KEY]),
...newProps,
}),
);
this[STATE_KEY] = computeComponentState(this[STATE_KEY], state);
this[ON_BEFORE_UPDATE_KEY](this[PROPS_KEY], this[STATE_KEY]);
// avoiding recursive updates
// see also https://github.com/riot/riot/issues/2895
if (!this[IS_COMPONENT_UPDATING]) {
this[IS_COMPONENT_UPDATING] = true;
this[TEMPLATE_KEY_SYMBOL].update(this, this[PARENT_KEY_SYMBOL]);
}
this[ON_UPDATED_KEY](this[PROPS_KEY], this[STATE_KEY]);
this[IS_COMPONENT_UPDATING] = false;
return this
},
unmount(preserveRoot) {
this[ON_BEFORE_UNMOUNT_KEY](this[PROPS_KEY], this[STATE_KEY]);
this[ATTRIBUTES_KEY_SYMBOL].unmount();
// if the preserveRoot is null the template html will be left untouched
// in that case the DOM cleanup will happen differently from a parent node
this[TEMPLATE_KEY_SYMBOL].unmount(
this,
this[PARENT_KEY_SYMBOL],
preserveRoot === null ? null : !preserveRoot,
);
this[ON_UNMOUNTED_KEY](this[PROPS_KEY], this[STATE_KEY]);
return this
},
},
),
),
Object.keys(component).filter((prop) => isFunction(component[prop])),
)
}
export { manageComponentLifecycle };

@@ -1,10 +0,11 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { PURE_COMPONENT_API } from './pure-component-api.js';
import { noop } from '../node_modules/@riotjs/util/functions.js';
const MOCKED_TEMPLATE_INTERFACE = Object.assign({}, PURE_COMPONENT_API, {
const MOCKED_TEMPLATE_INTERFACE = {
...PURE_COMPONENT_API,
clone: noop,
createDOM: noop
});
createDOM: noop,
};
export { MOCKED_TEMPLATE_INTERFACE };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { COMPONENTS_IMPLEMENTATION_MAP } from '../node_modules/@riotjs/util/constants.js';

@@ -16,10 +16,13 @@ import { panic } from '../node_modules/@riotjs/util/misc.js';

const name = componentName || getName(element);
if (!COMPONENTS_IMPLEMENTATION_MAP.has(name)) panic(`The component named "${name}" was never registered`);
if (!COMPONENTS_IMPLEMENTATION_MAP.has(name))
panic(`The component named "${name}" was never registered`);
const component = COMPONENTS_IMPLEMENTATION_MAP.get(name)({
props: initialProps,
slots
slots,
});
return component.mount(element);
return component.mount(element)
}
export { mountComponent };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { MOUNT_METHOD_KEY, UPDATE_METHOD_KEY, UNMOUNT_METHOD_KEY } from '../node_modules/@riotjs/util/constants.js';

@@ -8,5 +8,5 @@ import { noop } from '../node_modules/@riotjs/util/functions.js';

[UPDATE_METHOD_KEY]: noop,
[UNMOUNT_METHOD_KEY]: noop
[UNMOUNT_METHOD_KEY]: noop,
});
export { PURE_COMPONENT_API };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { PLUGINS_SET } from '../node_modules/@riotjs/util/constants.js';

@@ -10,5 +10,5 @@

function runPlugins(component) {
return [...PLUGINS_SET].reduce((c, fn) => fn(c) || c, component);
return [...PLUGINS_SET].reduce((c, fn) => fn(c) || c, component)
}
export { runPlugins };

@@ -7,2 +7,3 @@ /* Riot WIP, @license MIT */

const SLOT = 4;
const bindingTypes = {

@@ -13,5 +14,5 @@ EACH,

TAG,
SLOT
SLOT,
};
export { EACH, IF, SIMPLE, SLOT, TAG, bindingTypes as default };

@@ -9,3 +9,3 @@ /* Riot WIP, @license MIT */

function checkType(element, type) {
return typeof element === type;
return typeof element === type
}

@@ -20,3 +20,4 @@

const owner = el.ownerSVGElement;
return !!owner || owner === null;
return !!owner || owner === null
}

@@ -30,3 +31,3 @@

function isTemplate(el) {
return el.tagName.toLowerCase() === 'template';
return el.tagName.toLowerCase() === 'template'
}

@@ -40,3 +41,3 @@

function isFunction(value) {
return checkType(value, 'function');
return checkType(value, 'function')
}

@@ -50,3 +51,3 @@

function isBoolean(value) {
return checkType(value, 'boolean');
return checkType(value, 'boolean')
}

@@ -60,3 +61,3 @@

function isObject(value) {
return !isNil(value) && value.constructor === Object;
return !isNil(value) && value.constructor === Object
}

@@ -70,5 +71,5 @@

function isNil(value) {
return value === null || value === undefined;
return value === null || value === undefined
}
export { checkType, isBoolean, isFunction, isNil, isObject, isSvg, isTemplate };

@@ -12,4 +12,4 @@ /* Riot WIP, @license MIT */

acc[dashToCamelCase(attribute.name)] = attribute.value;
return acc;
}, {});
return acc
}, {})
}

@@ -55,3 +55,3 @@

*/
const removeChild = node => node.remove();
const removeChild = (node) => node.remove();

@@ -64,3 +64,6 @@ /**

*/
const insertBefore = (newNode, refNode) => refNode && refNode.parentNode && refNode.parentNode.insertBefore(newNode, refNode);
const insertBefore = (newNode, refNode) =>
refNode &&
refNode.parentNode &&
refNode.parentNode.insertBefore(newNode, refNode);

@@ -73,4 +76,7 @@ /**

*/
const replaceChild = (newNode, replaced) => replaced && replaced.parentNode && replaced.parentNode.replaceChild(newNode, replaced);
const replaceChild = (newNode, replaced) =>
replaced &&
replaced.parentNode &&
replaced.parentNode.replaceChild(newNode, replaced);
export { DOMattributesToObject, cleanNode, clearChildren, insertBefore, moveChildren, removeChild, replaceChild };

@@ -6,2 +6,3 @@ /* Riot WIP, @license MIT */

const VALUE = 3;
const expressionTypes = {

@@ -11,5 +12,5 @@ ATTRIBUTE,

TEXT,
VALUE
VALUE,
};
export { ATTRIBUTE, EVENT, TEXT, VALUE, expressionTypes as default };

@@ -6,3 +6,3 @@ /* Riot WIP, @license MIT */

function noop() {
return this;
return this
}

@@ -17,6 +17,7 @@

function autobindMethods(source, methods) {
methods.forEach(method => {
methods.forEach((method) => {
source[method] = source[method].bind(source);
});
return source;
return source
}

@@ -30,5 +31,9 @@

function callOrAssign(source) {
return isFunction(source) ? source.prototype && source.prototype.constructor ? new source() : source() : source;
return isFunction(source)
? source.prototype && source.prototype.constructor
? new source()
: source()
: source
}
export { autobindMethods, callOrAssign, noop };

@@ -12,5 +12,3 @@ /* Riot WIP, @license MIT */

function panic(message, cause) {
throw new Error(message, {
cause
});
throw new Error(message, { cause })
}

@@ -25,7 +23,9 @@ /**

const cache = new Map();
const cached = val => {
return cache.has(val) ? cache.get(val) : cache.set(val, fn.call(this, val)) && cache.get(val);
const cached = (val) => {
return cache.has(val)
? cache.get(val)
: cache.set(val, fn.call(this, val)) && cache.get(val)
};
cached.cache = cache;
return cached;
return cached
}

@@ -40,14 +40,15 @@

return attributes.reduce((acc, attribute) => {
const {
value,
type
} = attribute;
const { value, type } = attribute;
switch (true) {
// spread attribute
case !attribute.name && type === ATTRIBUTE:
return Object.assign({}, acc, value);
return {
...acc,
...value,
}
// value attribute
case type === VALUE:
acc.value = attribute.value;
break;
break
// normal attributes

@@ -57,6 +58,7 @@ default:

}
return acc;
}, {});
return acc
}, {})
}
export { evaluateAttributeExpressions, memoize, panic };

@@ -10,16 +10,14 @@ /* Riot WIP, @license MIT */

*/
function defineProperty(source, key, value, options) {
if (options === void 0) {
options = {};
}
function defineProperty(source, key, value, options = {}) {
/* eslint-disable fp/no-mutating-methods */
Object.defineProperty(source, key, Object.assign({
Object.defineProperty(source, key, {
value,
enumerable: false,
writable: false,
configurable: true
}, options));
configurable: true,
...options,
});
/* eslint-enable fp/no-mutating-methods */
return source;
return source
}

@@ -35,7 +33,7 @@

function defineProperties(source, properties, options) {
Object.entries(properties).forEach(_ref => {
let [key, value] = _ref;
Object.entries(properties).forEach(([key, value]) => {
defineProperty(source, key, value, options);
});
return source;
return source
}

@@ -50,9 +48,9 @@

function defineDefaults(source, defaults) {
Object.entries(defaults).forEach(_ref2 => {
let [key, value] = _ref2;
Object.entries(defaults).forEach(([key, value]) => {
if (!source[key]) source[key] = value;
});
return source;
return source
}
export { defineDefaults, defineProperties, defineProperty };

@@ -8,3 +8,3 @@ /* Riot WIP, @license MIT */

function camelToDashCase(string) {
return string.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
return string.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()
}

@@ -18,5 +18,5 @@

function dashToCamelCase(string) {
return string.replace(/-(\w)/g, (_, c) => c.toUpperCase());
return string.replace(/-(\w)/g, (_, c) => c.toUpperCase())
}
export { camelToDashCase, dashToCamelCase };

@@ -23,4 +23,4 @@ /* Riot WIP, @license MIT */

return normalize(domToArray(els).map(el => {
return normalize(names.map(n => el[method](n)));
}));
return normalize(names.map(n => el[method](n)))
}))
}

@@ -52,10 +52,9 @@

function set(els, name, value) {
const attrs = typeof name === 'object' ? name : {
[name]: value
};
const attrs = typeof name === 'object' ? name : { [name]: value };
const props = Object.keys(attrs);
domToArray(els).forEach(el => {
props.forEach(prop => el.setAttribute(prop, attrs[prop]));
});
return els;
return els
}

@@ -84,5 +83,5 @@

function get(els, name) {
return parseNodes(els, name, 'getAttribute');
return parseNodes(els, name, 'getAttribute')
}
export { get, set };

@@ -11,11 +11,17 @@ /* Riot WIP, @license MIT */

// is it a node list?
if (/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(els)) && typeof els.length === 'number') return Array.from(els);else
if (
/^\[object (HTMLCollection|NodeList|Object)\]$/
.test(Object.prototype.toString.call(els))
&& typeof els.length === 'number'
)
return Array.from(els)
else
// if it's a single node
// it will be returned as "array" with one single entry
return [els];
return [els]
}
// this object could be looped out of the box
return els;
return els
}
export { domToArray as default };

@@ -11,5 +11,8 @@ /* Riot WIP, @license MIT */

function $(selector, scope) {
return domToArray(typeof selector === 'string' ? (scope || document).querySelectorAll(selector) : selector);
return domToArray(typeof selector === 'string' ?
(scope || document).querySelectorAll(selector) :
selector
)
}
export { $ as default };

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
export { register } from './api/register.js';

@@ -3,0 +3,0 @@ export { unregister } from './api/unregister.js';

@@ -1,2 +0,2 @@

/* Riot v7.1.0, @license MIT */
/* Riot v9.0.0-rc, @license MIT */
import { IS_DIRECTIVE } from '../node_modules/@riotjs/util/constants.js';

@@ -11,5 +11,5 @@ import { get } from '../node_modules/bianco.attr/index.next.js';

function getName(element) {
return get(element, IS_DIRECTIVE) || element.tagName.toLowerCase();
return get(element, IS_DIRECTIVE) || element.tagName.toLowerCase()
}
export { getName };
{
"name": "riot",
"version": "7.1.0",
"version": "9.0.0-rc",
"description": "Simple and elegant component-based UI library",
"license": "MIT",
"engines": {
"node": ">=12.0.0"
"node": ">=16.0.0"
},

@@ -35,2 +35,15 @@ "repository": "riot/riot",

"module": "esm/riot.js",
"type": "module",
"exports": {
"riot": {
"import": "./esm/riot.js",
"require": "./riot.js",
"types": "./riot.d.ts"
},
"riot+compiler": {
"import": "./esm/riot_compiler.js",
"require": "./riot+compiler.js",
"types": "./riot.d.ts"
}
},
"files": [

@@ -51,36 +64,34 @@ "esm",

"devDependencies": {
"@babel/core": "^7.20.2",
"@babel/preset-env": "^7.20.2",
"@riotjs/babel-preset": "1.0.0",
"@rollup/plugin-commonjs": "^23.0.2",
"@rollup/plugin-node-resolve": "^15.0.1",
"babel-plugin-istanbul": "^6.1.1",
"chai": "^4.3.6",
"core-js": "^3.26.0",
"eslint": "^8.26.0",
"eslint-config-riot": "^3.0.0",
"jsdom": "20.0.2",
"@riotjs/compiler": "^9.0.0",
"@riotjs/dom-bindings": "^9.0.0",
"@riotjs/prettier-config": "^1.0.1",
"@riotjs/util": "^2.2.1",
"@rollup/plugin-commonjs": "^25.0.3",
"@rollup/plugin-node-resolve": "^15.1.0",
"bianco.attr": "^1.1.1",
"bianco.query": "^1.1.4",
"chai": "^4.3.7",
"cumpa": "^2.0.1",
"curri": "^2.0.3",
"eslint": "^8.45.0",
"eslint-config-riot": "^4.0.0",
"eslint-plugin-import": "^2.27.5",
"jsdom": "22.1.0",
"jsdom-global": "3.0.2",
"karma": "^6.4.1",
"karma-chrome-launcher": "^3.1.1",
"karma-coverage": "^2.2.0",
"karma": "^6.4.2",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage": "^2.2.1",
"karma-mocha": "^2.0.1",
"karma-rollup-preprocessor": "^7.0.8",
"karma-sauce-launcher": "^4.3.6",
"mocha": "^10.1.0",
"rollup": "^3.2.5",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-riot": "^6.0.0",
"sinon": "^14.0.1",
"mocha": "^10.2.0",
"prettier": "^2.8.8",
"rollup": "^3.26.2",
"rollup-plugin-istanbul": "^4.0.0",
"rollup-plugin-riot": "^7.0.0",
"sinon": "^15.2.0",
"sinon-chai": "^3.7.0",
"terser": "^5.15.1",
"typescript": "^4.8.4",
"@riotjs/compiler": "^6.4.2",
"@riotjs/dom-bindings": "^6.0.7",
"@riotjs/util": "^2.2.0",
"bianco.attr": "^1.1.1",
"bianco.query": "^1.1.4",
"cumpa": "^1.0.1",
"curri": "^1.0.1"
"terser": "^5.19.0",
"typescript": "^5.1.6"
}
}

@@ -1,2 +0,1 @@

[![Riot logo](https://riot.js.org/img/logo/riot-logo.svg)](https://riot.js.org)

@@ -21,3 +20,2 @@

### Custom components • Concise syntax • Simple API • Tiny Size

@@ -41,3 +39,3 @@

this.state = {
time: props.start
time: props.start,
}

@@ -49,3 +47,3 @@

clearInterval(this.timer)
}
},
}

@@ -79,4 +77,4 @@ </script>

### Performant and predictable
### Performant and predictable
- Absolutely the smallest possible amount of DOM updates and reflows.

@@ -89,4 +87,4 @@ - Fast expressions bindings instead of virtual DOM memory performance issues and drawbacks.

### Close to standards
### Close to standards
- No proprietary event system.

@@ -99,4 +97,4 @@ - Future proof thanks to the javascript module syntax.

### Use your dearest language and tools
### Use your dearest language and tools
- Create components with CoffeeScript, Jade, LiveScript, Typescript, ES6 or [any pre-processor](https://riot.js.org/compiler/#pre-processors) you want.

@@ -106,3 +104,2 @@ - Build with [@riotjs/cli](https://github.com/riot/cli), [webpack](https://github.com/riot/webpack-loader), [Rollup](https://github.com/riot/rollup-plugin-riot), [parcel](https://github.com/riot/parcel-plugin-riot), [Browserify](https://github.com/riot/riotify).

### Powerful and modular ecosystem

@@ -112,14 +109,15 @@

- [@riotjs/cli](https://github.com/riot/cli) - CLI to locally compile your tags to javascript
- [@riotjs/ssr](https://github.com/riot/ssr) - Super simple server side rendering
- [@riotjs/hydrate](https://github.com/riot/hydrate) - Hydration strategy for your SPA
- [@riotjs/route](https://github.com/riot/route) - Isomorphic router
- [@riotjs/lazy](https://github.com/riot/lazy) - Lazy components loader
- [@riotjs/hot-reload](https://github.com/riot/hot-reload) - Live reload plugin
- [@riotjs/compiler](https://github.com/riot/compiler) - Advanced tags compiler
- [@riotjs/parser](https://github.com/riot/parser) - HTML parser
- [@riotjs/dom-bindings](https://github.com/riot/dom-bindings) - Expressions based template engine
- [@riotjs/custom-elements](https://github.com/riot/custom-elements) - native custom elements implementation
- [@riotjs/cli](https://github.com/riot/cli) - CLI to locally compile your tags to javascript
- [@riotjs/ssr](https://github.com/riot/ssr) - Super simple server side rendering
- [@riotjs/hydrate](https://github.com/riot/hydrate) - Hydration strategy for your SPA
- [@riotjs/route](https://github.com/riot/route) - Isomorphic router
- [@riotjs/lazy](https://github.com/riot/lazy) - Lazy components loader
- [@riotjs/hot-reload](https://github.com/riot/hot-reload) - Live reload plugin
- [@riotjs/compiler](https://github.com/riot/compiler) - Advanced tags compiler
- [@riotjs/parser](https://github.com/riot/parser) - HTML parser
- [@riotjs/dom-bindings](https://github.com/riot/dom-bindings) - Expressions based template engine
- [@riotjs/custom-elements](https://github.com/riot/custom-elements) - native custom elements implementation
### CDN hosting
- [unpkg](https://unpkg.com/riot/riot.js)

@@ -144,2 +142,3 @@ - [jsDelivr](https://www.jsdelivr.com/projects/riot)

```
#### 2) Set up your git branch

@@ -171,3 +170,2 @@

### Credits

@@ -226,34 +224,23 @@

[ci-image]:https://img.shields.io/github/workflow/status/riot/riot/test?style=flat-square
[ci-url]:https://github.com/riot/riot/actions
[license-image]:https://img.shields.io/badge/license-MIT-000000.svg?style=flat-square
[license-url]:LICENSE.txt
[npm-version-image]:https://img.shields.io/npm/v/riot.svg?style=flat-square
[npm-downloads-image]:https://img.shields.io/npm/dm/riot.svg?style=flat-square
[npm-url]:https://npmjs.org/package/riot
[coverage-image]:https://img.shields.io/coveralls/riot/riot/dev.svg?style=flat-square
[coverage-url]:https://coveralls.io/r/riot/riot?branch=dev
[saucelabs-image]:https://saucelabs.com/browser-matrix/testsriotjs.svg?1
[saucelabs-url]:https://saucelabs.com/u/testsriotjs
[discord-url]:https://discord.gg/PagXe5Y
[discord-image]:https://img.shields.io/badge/DISCORD-JOIN_CHANNEL_%E2%86%92-7289da.svg?style=flat-square
[slack-ja-image]:https://img.shields.io/badge/SLACK_(ja)-JOIN_CHAT_%E2%86%92-551a8b.svg?style=flat-square
[slack-ja-url]:https://riot-jp-slackin.herokuapp.com/
[codeclimate-image]:https://api.codeclimate.com/v1/badges/b81ddf3c77e8189876da/maintainability
[codeclimate-url]:https://codeclimate.com/github/riot/riot
[donations-campaign-url]:https://pledgie.com/campaigns/31139
[donations-campaign-image]:https://pledgie.com/campaigns/31139.png?skin_name=chrome
[ci-image]: https://img.shields.io/github/actions/workflow/status/riot/riot/test.yml?style=flat-square
[ci-url]: https://github.com/riot/riot/actions
[license-image]: https://img.shields.io/badge/license-MIT-000000.svg?style=flat-square
[license-url]: LICENSE.txt
[npm-version-image]: https://img.shields.io/npm/v/riot.svg?style=flat-square
[npm-downloads-image]: https://img.shields.io/npm/dm/riot.svg?style=flat-square
[npm-url]: https://npmjs.org/package/riot
[coverage-image]: https://img.shields.io/coveralls/riot/riot/dev.svg?style=flat-square
[coverage-url]: https://coveralls.io/r/riot/riot?branch=dev
[saucelabs-image]: https://saucelabs.com/browser-matrix/testsriotjs.svg?1
[saucelabs-url]: https://saucelabs.com/u/testsriotjs
[discord-url]: https://discord.gg/PagXe5Y
[discord-image]: https://img.shields.io/badge/DISCORD-JOIN_CHANNEL_%E2%86%92-7289da.svg?style=flat-square
[slack-ja-image]: https://img.shields.io/badge/SLACK_(ja)-JOIN_CHAT_%E2%86%92-551a8b.svg?style=flat-square
[slack-ja-url]: https://riot-jp-slackin.herokuapp.com/
[codeclimate-image]: https://api.codeclimate.com/v1/badges/b81ddf3c77e8189876da/maintainability
[codeclimate-url]: https://codeclimate.com/github/riot/riot
[donations-campaign-url]: https://pledgie.com/campaigns/31139
[donations-campaign-image]: https://pledgie.com/campaigns/31139.png?skin_name=chrome
[jsdelivr-image]: https://data.jsdelivr.com/v1/package/npm/riot/badge
[jsdelivr-url]: https://www.jsdelivr.com/package/npm/riot
[backer-url]: #backers

@@ -263,8 +250,5 @@ [backer-badge]: https://opencollective.com/riot/backers/badge.svg?color=blue

[sponsor-badge]: https://opencollective.com/riot/sponsors/badge.svg?color=blue
[support-url]: https://opencollective.com/riot#support
[lib-size]: https://img.badgesize.io/https://unpkg.com/riot/riot.min.js?compression=gzip
[backers-image]: https://opencollective.com/riot/backers.svg
[sponsors-image]: https://opencollective.com/riot/sponsors.svg

@@ -7,3 +7,3 @@ import {

ExpressionType,
BindingType
BindingType,
} from '@riotjs/dom-bindings'

@@ -13,3 +13,5 @@

export type RegisteredComponentsMap = Map<string, () => RiotComponent>
export type ComponentEnhancer = <Props = any, State = any>(component: RiotComponent<Props, State>) => RiotComponent<Props, State>
export type ComponentEnhancer = <Props = any, State = any>(
component: RiotComponent<Props, State>,
) => RiotComponent<Props, State>
export type InstalledPluginsSet = Set<ComponentEnhancer>

@@ -20,3 +22,5 @@ export type RiotComponentsMap = {

export type AutobindObjectMethods<Object, This> = {
[K in keyof Object]: Object[K] extends (...args: any) => any ? (this: This, ...args: Parameters<Object[K]>) => ReturnType<Object[K]> : Object[K]
[K in keyof Object]: Object[K] extends (...args: any) => any
? (this: This, ...args: Parameters<Object[K]>) => ReturnType<Object[K]>
: Object[K]
}

@@ -39,7 +43,7 @@

initialState?: State,
parentScope?: object
parentScope?: object,
): RiotComponent<Props, State>
update(
newState?: Partial<State>,
parentScope?: object
parentScope?: object,
): RiotComponent<Props, State>

@@ -66,23 +70,39 @@ unmount(keepRootElement?: boolean): RiotComponent<Props, State>

// The internal attributes will be handled by the framework
export type RiotComponentWithoutInternals<Component extends RiotComponent> = Omit<Component, 'props' | 'root' | 'name' | 'slots' | 'mount' | 'update' | 'unmount' | '$' | '$$'>
export type RiotComponentWithoutInternalsAndInitialState<Component extends RiotComponent> = Omit<RiotComponentWithoutInternals<Component>, 'state'>
export type RiotComponentWithoutInternals<Component extends RiotComponent> =
Omit<
Component,
| 'props'
| 'root'
| 'name'
| 'slots'
| 'mount'
| 'update'
| 'unmount'
| '$'
| '$$'
>
export type RiotComponentWithoutInternalsAndInitialState<
Component extends RiotComponent,
> = Omit<RiotComponentWithoutInternals<Component>, 'state'>
// Riot Pure Component interface that should be used together with riot.pure
export interface RiotPureComponent<Context = object> {
mount(
element: HTMLElement,
context?: Context,
): RiotPureComponent<Context>
update(
context?: Context,
): RiotPureComponent<Context>
mount(element: HTMLElement, context?: Context): RiotPureComponent<Context>
update(context?: Context): RiotPureComponent<Context>
unmount(keepRootElement: boolean): RiotPureComponent<Context>
}
export interface PureComponentFactoryFunction<InitialProps = any, Context = any> {
export interface PureComponentFactoryFunction<
InitialProps = any,
Context = any,
> {
({
slots,
attributes,
props
}: { slots?: SlotBindingData<Context>[], attributes?: AttributeExpressionData<Context>[], props?: InitialProps; }): RiotPureComponent<Context>
slots,
attributes,
props,
}: {
slots?: SlotBindingData<Context>[]
attributes?: AttributeExpressionData<Context>[]
props?: InitialProps
}): RiotPureComponent<Context>
}

@@ -97,6 +117,9 @@

template?(
template: (template: string, bindings?: BindingData<Component>[]) => TemplateChunk<Component>,
template: (
template: string,
bindings?: BindingData<Component>[],
) => TemplateChunk<Component>,
expressionTypes: Record<keyof typeof ExpressionType, number>,
bindingTypes: Record<keyof typeof BindingType, number>,
getComponent: (componentName: string) => any
getComponent: (componentName: string) => any,
): TemplateChunk<Component> | null

@@ -112,15 +135,39 @@ }

// Riot public API
export function register<Props, State>(componentName: string, wrapper: RiotComponentWrapper<RiotComponent<Props, State>>): RegisteredComponentsMap
export function register<Props, State>(
componentName: string,
wrapper: RiotComponentWrapper<RiotComponent<Props, State>>,
): RegisteredComponentsMap
export function unregister(componentName: string): RegisteredComponentsMap
export function mount<Props, State>(selector: string | HTMLElement, initialProps?: Props, componentName?: string): RiotComponent<Props, State>[]
export function unmount(selector: string | HTMLElement, keepRootElement?: boolean): HTMLElement[]
export function mount<Props, State>(
selector: string | HTMLElement,
initialProps?: Props,
componentName?: string,
): RiotComponent<Props, State>[]
export function unmount(
selector: string | HTMLElement,
keepRootElement?: boolean,
): HTMLElement[]
export function install(plugin: ComponentEnhancer): InstalledPluginsSet
export function uninstall(plugin: ComponentEnhancer): InstalledPluginsSet
export function component<Props, State, Component = RiotComponent<Props, State>>(wrapper: RiotComponentWrapper<Component>): (
export function component<
Props,
State,
Component = RiotComponent<Props, State>,
>(
wrapper: RiotComponentWrapper<Component>,
): (
el: HTMLElement,
initialProps?: Props,
meta?: { slots: SlotBindingData[]; attributes: AttributeExpressionData[]; parentScope: any; }
meta?: {
slots: SlotBindingData[]
attributes: AttributeExpressionData[]
parentScope: any
},
) => Component
export function pure<InitialProps = any, Context = any, FactoryFunction = PureComponentFactoryFunction<InitialProps, Context>>(func: FactoryFunction): FactoryFunction
export function pure<
InitialProps = any,
Context = any,
FactoryFunction = PureComponentFactoryFunction<InitialProps, Context>,
>(func: FactoryFunction): FactoryFunction

@@ -130,10 +177,31 @@ export const version: string

// typescript specific methods
export function withTypes<Component extends RiotComponent,
ComponentFactory = RiotComponentFactoryFunction<AutobindObjectMethods<RiotComponentWithoutInternals<Component>, Component>>
>(fn: ComponentFactory): () => Component
export function withTypes<Component extends RiotComponent,
ComponentFactory = RiotComponentFactoryFunction<AutobindObjectMethods<RiotComponentWithoutInternalsAndInitialState<Component>, Component>>
>(fn: ComponentFactory): () => Component
export function withTypes<Component extends RiotComponent, ComponentObjectWithInitialState = RiotComponentWithoutInternals<Component>>(component: AutobindObjectMethods<ComponentObjectWithInitialState, Component>): Component
export function withTypes<Component extends RiotComponent, ComponentObjectWithoutInitialState = RiotComponentWithoutInternalsAndInitialState<Component>>(component: AutobindObjectMethods<ComponentObjectWithoutInitialState, Component>): Component
export function withTypes<
Component extends RiotComponent,
ComponentFactory = RiotComponentFactoryFunction<
AutobindObjectMethods<RiotComponentWithoutInternals<Component>, Component>
>,
>(fn: ComponentFactory): () => Component
export function withTypes<
Component extends RiotComponent,
ComponentFactory = RiotComponentFactoryFunction<
AutobindObjectMethods<
RiotComponentWithoutInternalsAndInitialState<Component>,
Component
>
>,
>(fn: ComponentFactory): () => Component
export function withTypes<
Component extends RiotComponent,
ComponentObjectWithInitialState = RiotComponentWithoutInternals<Component>,
>(
component: AutobindObjectMethods<ComponentObjectWithInitialState, Component>,
): Component
export function withTypes<
Component extends RiotComponent,
ComponentObjectWithoutInitialState = RiotComponentWithoutInternalsAndInitialState<Component>,
>(
component: AutobindObjectMethods<
ComponentObjectWithoutInitialState,
Component
>,
): Component

@@ -1,1 +0,1 @@

var t,e;t=this,e=function(t){"use strict";const e={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};function n(t,e){return typeof t===e}function r(t){const e=t.ownerSVGElement;return!!e||null===e}function s(t){return"template"===t.tagName.toLowerCase()}function o(t){return n(t,"function")}function i(t){return!u(t)&&t.constructor===Object}function u(t){return null==t}const a=new Map,c=Symbol(),l=new Set,h="mount",d="update",p="unmount",m="props",f="slots",b="root",g=Symbol(),v=Symbol(),y=Symbol(),O=Symbol(),j=Symbol();function N(t){return t.replace(/-(\w)/g,((t,e)=>e.toUpperCase()))}function x(t){for(;t.firstChild;)t.removeChild(t.firstChild)}const M=t=>t.remove(),E=(t,e)=>e&&e.parentNode&&e.parentNode.insertBefore(t,e),A={ATTRIBUTE:0,EVENT:1,TEXT:2,VALUE:3};function T(){return this}function w(t){return o(t)?t.prototype&&t.prototype.constructor?new t:t():t}function S(t){const e=new Map,n=n=>(e.has(n)||e.set(n,t.call(this,n)))&&e.get(n);return n.cache=e,n}function C(t){return t.reduce(((t,e)=>{const{value:n,type:r}=e;switch(!0){case!e.name&&0===r:return Object.assign({},t,n);case 3===r:t.value=e.value;break;default:t[N(e.name)]=e.value}return t}),{})}function D(t,e,n,r){return void 0===r&&(r={}),Object.defineProperty(t,e,Object.assign({value:n,enumerable:!1,writable:!1,configurable:!0},r)),t}function k(t,e,n){return Object.entries(e).forEach((e=>{let[r,s]=e;D(t,r,s,n)})),t}function L(t,e){return Object.entries(e).forEach((e=>{let[n,r]=e;t[n]||(t[n]=r)})),t}const U=Object.freeze({[h]:T,[d]:T,[p]:T}),B=Object.assign({},U,{clone:T,createDOM:T}),I=Symbol(),P=Symbol(),_=Symbol(),$={nodes:[],mount(t,e){return this.update(t,e)},update(t,e){const{placeholder:n,nodes:r,childrenMap:s}=this,o=t===_?null:this.evaluate(t),i=o?Array.from(o):[],{newChildrenMap:u,batches:a,futureNodes:c}=function(t,e,n,r){const{condition:s,template:o,childrenMap:i,itemName:u,getKey:a,indexName:c,root:l,isTemplateTag:h}=r,d=new Map,p=[],m=[];return t.forEach(((t,r)=>{const f=function(t,e){let{itemName:n,indexName:r,index:s,item:o}=e;return D(t,n,o),r&&D(t,r,s),t}(Object.create(e),{itemName:u,indexName:c,index:r,item:t}),b=a?a(f):r,g=i.get(b),v=[];if(function(t,e){return!!t&&!t(e)}(s,f))return;const y=!g,O=g?g.template:o.clone(),j=O.el||l.cloneNode(),N=h&&y?function(t){const e=t.dom.cloneNode(!0),{head:n,tail:r}=function(){const t=document.createTextNode(""),e=document.createTextNode("");return t[I]=!0,e[P]=!0,{head:t,tail:e}}();return{avoidDOMInjection:!0,fragment:e,head:n,tail:r,children:[n,...Array.from(e.childNodes),r]}}(O):O.meta;y?p.push((()=>O.mount(j,f,n,N))):p.push((()=>O.update(f,n))),h?v.push(...N.children):v.push(j),i.delete(b),m.push(...v),d.set(b,{nodes:v,template:O,context:f,index:r})})),{newChildrenMap:d,batches:p,futureNodes:m}}(i,t,e,this);return((t,e,n,r)=>{const s=e.length;let o=t.length,i=s,u=0,a=0,c=null;for(;u<o||a<i;)if(o===u){const t=i<s?a?n(e[a-1],-0).nextSibling:n(e[i-a],0):r;for(;a<i;)E(n(e[a++],1),t)}else if(i===a)for(;u<o;)c&&c.has(t[u])||M(n(t[u],-1)),u++;else if(t[u]===e[a])u++,a++;else if(t[o-1]===e[i-1])o--,i--;else if(t[u]===e[i-1]&&e[a]===t[o-1]){const r=n(t[--o],-1).nextSibling;E(n(e[a++],1),n(t[u++],-1).nextSibling),E(n(e[--i],1),r),t[o]=e[i]}else{if(!c){c=new Map;let t=a;for(;t<i;)c.set(e[t],t++)}if(c.has(t[u])){const r=c.get(t[u]);if(a<r&&r<i){let s=u,d=1;for(;++s<o&&s<i&&c.get(t[s])===r+d;)d++;if(d>r-a){const s=n(t[u],0);for(;a<r;)E(n(e[a++],1),s)}else l=n(e[a++],1),(h=n(t[u++],-1))&&h.parentNode&&h.parentNode.replaceChild(l,h)}else u++}else M(n(t[u++],-1))}var l,h})(r,c,function(t,e){return(n,r)=>{if(r<0){const n=t[t.length-1];if(n){const{template:r,nodes:s,context:o}=n;s.pop(),s.length||(t.pop(),r.unmount(o,e,null))}}return n}}(Array.from(s.values()),e),n),a.forEach((t=>t())),this.childrenMap=u,this.nodes=c,this},unmount(t,e){return this.update(_,e),this}},z={mount(t,e){return this.update(t,e)},update(t,e){const n=!!this.evaluate(t),r=!this.value&&n,s=this.value&&!n,o=()=>{const n=this.node.cloneNode();E(n,this.placeholder),this.template=this.template.clone(),this.template.mount(n,t,e)};switch(!0){case r:o();break;case s:this.unmount(t);break;default:n&&this.template.update(t,e)}return this.value=n,this},unmount(t,e){return this.template.unmount(t,e,!0),this}},H="undefined"==typeof Element?{}:Element.prototype,K=S((t=>H.hasOwnProperty(t))),R=/^on/,Y={handleEvent(t){this[t.type](t)}},F=new WeakMap;function V(t){return u(t)?"":t}const q=(t,e)=>{const n=t.childNodes[e];if(n.nodeType===Node.COMMENT_NODE){const e=document.createTextNode("");return t.replaceChild(e,n),e}return n},G={0:function t(e,r,s,u){let{name:a}=r;if(!a)return u&&function(t,e,n){const r=e?Object.keys(e):[];Object.keys(n).filter((t=>!r.includes(t))).forEach((e=>t.removeAttribute(e)))}(e,s,u),void(s&&function(e,n){Object.entries(n).forEach((n=>{let[r,s]=n;return t(e,{name:r},s)}))}(e,s));!K(a)&&(function(t){return n(t,"boolean")}(s)||i(s)||o(s))&&(e[a]=s),function(t){return!t&&0!==t}(s)?e.removeAttribute(a):function(t){return!0===t||["string","number"].includes(typeof t)}(s)&&e.setAttribute(a,function(t,e){return!0===e?t:e}(a,s))},1:function(t,e,n){let{name:r}=e;const s=r.replace(R,""),o=F.get(t)||(t=>{const e=Object.create(Y);return F.set(t,e),e})(t),[i,u]=(t=>Array.isArray(t)?t:[t,!1])(n),a=o[s],c=i&&!a;a&&!i&&t.removeEventListener(s,o),c&&t.addEventListener(s,o,u),o[s]=i},2:function(t,e,n){t.data=V(n)},3:function(t,e,n){t.value=V(n)}},W={mount(t){return this.value=this.evaluate(t),X(this,this.value),this},update(t){const e=this.evaluate(t);return this.value!==e&&(X(this,e),this.value=e),this},unmount(){return 1===this.type&&X(this,null),this}};function X(t,e){return G[t.type](t.node,t,e,t.value)}function Z(t,e){return Object.assign({},W,e,{node:2===e.type?q(t,e.childNodeIndex):t})}const J=(t,e)=>t[y]||e,Q={attributes:[],getTemplateScope(t,e){return function(t,e,n){if(!t||!t.length)return n;const r=t.map((t=>Object.assign({},t,{value:t.evaluate(e)})));return Object.assign(Object.create(n||null),C(r))}(this.attributes,t,e)},mount(t,e){const n=!!t.slots&&t.slots.find((t=>{let{id:e}=t;return e===this.name})),{parentNode:r}=this.node,s=J(t,e);return this.template=n&&ut(n.html,n.bindings).createDOM(r),this.template&&(x(this.node),this.template.mount(this.node,this.getTemplateScope(t,s),s),this.template.children=Array.from(this.node.childNodes)),tt(this.node),M(this.node),this},update(t,e){if(this.template){const n=J(t,e);this.template.update(this.getTemplateScope(t,n),n)}return this},unmount(t,e,n){return this.template&&this.template.unmount(this.getTemplateScope(t,e),null,n),this}};function tt(t){const e=t&&t.firstChild;e&&(E(e,t),tt(t))}function et(t){return t.reduce(((t,e)=>{let{bindings:n}=e;return t.concat(n)}),[])}const nt={mount(t){return this.update(t)},update(t,e){const n=this.evaluate(t);return n&&n===this.name?this.tag.update(t):(this.unmount(t,e,!0),this.name=n,this.tag=(r=this.getComponent(n),void 0===(s=this.slots)&&(s=[]),void 0===(o=this.attributes)&&(o=[]),r?r({slots:s,attributes:o}):ut(function(t){return t.reduce(((t,e)=>t+e.html),"")}(s),[...et(s),{expressions:o.map((t=>Object.assign({type:0},t)))}])),this.tag.mount(this.node,t)),this;var r,s,o},unmount(t,e,n){return this.tag&&this.tag.unmount(n),this}},rt={1:function(t,e){let{evaluate:n,template:r}=e;const s=document.createTextNode("");return E(s,t),M(t),Object.assign({},z,{node:t,evaluate:n,placeholder:s,template:r.createDOM(t)})},2:function(t,e){let{expressions:n}=e;return Object.assign({},(r=n.map((e=>Z(t,e))),["mount","update","unmount"].reduce(((t,e)=>Object.assign({},t,{[e]:t=>r.map((n=>n[e](t)))&&void 0})),{})));var r},0:function(t,e){let{evaluate:n,condition:r,itemName:o,indexName:i,getKey:u,template:a}=e;const c=document.createTextNode(""),l=t.cloneNode();return E(c,t),M(t),Object.assign({},$,{childrenMap:new Map,node:t,root:l,condition:r,evaluate:n,isTemplateTag:s(l),template:a.createDOM(t),getKey:u,indexName:i,itemName:o,placeholder:c})},3:function(t,e){let{evaluate:n,getComponent:r,slots:s,attributes:o}=e;return Object.assign({},nt,{node:t,evaluate:n,slots:s,attributes:o,getComponent:r})},4:function(t,e){let{name:n,attributes:r}=e;return Object.assign({},Q,{attributes:r,node:t,name:n})}};function st(t,e){return t.map((t=>2===t.type?Object.assign({},t,{childNodeIndex:t.childNodeIndex+e}):t))}function ot(t,e,n){const{selector:r,type:s,redundantAttribute:o,expressions:i}=e,u=r?t.querySelector(r):t;o&&u.removeAttribute(o);const a=i||[];return(rt[s]||rt[2])(u,Object.assign({},e,{expressions:n&&!r?st(a,n):a}))}const it={createDOM(t){return this.dom=this.dom||function(t,e){return e&&("string"==typeof e?function(t,e){return r(t)?function(t,e){return e.ownerDocument.importNode((new window.DOMParser).parseFromString(`<svg xmlns="http://www.w3.org/2000/svg">${t}</svg>`,"application/xml").documentElement,!0)}(e,t):function(t,e){const n=s(e)?e:document.createElement("template");return n.innerHTML=t,n.content}(e,t)}(t,e):e)}(t,this.html)||document.createDocumentFragment(),this},mount(t,e,n,o){void 0===o&&(o={}),this.el&&this.unmount(e);const{fragment:i,children:u,avoidDOMInjection:a}=o,{parentNode:c}=u?u[0]:t,l=s(t),h=l?function(t,e,n){const r=Array.from(t.childNodes);return Math.max(r.indexOf(e),r.indexOf(n.head)+1,0)}(c,t,o):null;this.createDOM(t);const d=i||this.dom.cloneNode(!0);return this.el=l?c:t,this.children=l?u||Array.from(d.childNodes):null,!a&&d&&function(t,e){switch(!0){case r(t):!function(t,e){for(;t.firstChild;)e.appendChild(t.firstChild)}(e,t);break;case s(t):t.parentNode.replaceChild(e,t);break;default:t.appendChild(e)}}(t,d),this.bindings=this.bindingsData.map((t=>ot(this.el,t,h))),this.bindings.forEach((t=>t.mount(e,n))),this.meta=o,this},update(t,e){return this.bindings.forEach((n=>n.update(t,e))),this},unmount(t,e,n){void 0===n&&(n=!1);const r=this.el;if(!r)return this;switch(this.bindings.forEach((r=>r.unmount(t,e,n))),!0){case r[g]||null===n:break;case Array.isArray(this.children):!function(t){for(let e=0;e<t.length;e++)M(t[e])}(this.children);break;case!n:x(r);break;case!!n:M(r)}return this.el=null,this},clone(){return Object.assign({},this,{meta:{},el:null})}};function ut(t,e){return void 0===e&&(e=[]),Object.assign({},it,{html:t,bindingsData:e})}const at=(t,e)=>t[c]=e;function ct(t){return[h,d,p].reduce(((e,n)=>(e[n]=t(n),e)),{})}function lt(t){return Array.isArray(t)?t:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(t))&&"number"==typeof t.length?Array.from(t):[t]}function ht(t,e){return lt("string"==typeof t?(e||document).querySelectorAll(t):t)}const dt=Object.freeze({$(t){return ht(t,this.root)[0]},$$(t){return ht(t,this.root)}}),pt=Object.freeze({shouldUpdate:T,onBeforeMount:T,onMounted:T,onBeforeUpdate:T,onUpdated:T,onBeforeUnmount:T,onUnmounted:T}),mt=t=>1===t.length?t[0]:t;function ft(t,e,n){const r="object"==typeof e?e:{[e]:n},s=Object.keys(r);return lt(t).forEach((t=>{s.forEach((e=>t.setAttribute(e,r[e])))})),t}const bt=new Map;var gt;const vt={CSS_BY_NAME:bt,add(t,e){return bt.has(t)||(bt.set(t,e),this.inject()),this},inject(){return(gt||(ft(gt=ht("style[riot]")[0]||document.createElement("style"),"type","text/css"),gt.parentNode||document.head.appendChild(gt),gt)).innerHTML=[...bt.values()].join("\n"),this},remove(t){return bt.has(t)&&(bt.delete(t),this.inject()),this}};function yt(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function(){for(var e=arguments.length,r=Array(e),s=0;s<e;s++)r[s]=arguments[s];return(r=[...n,...r]).length<t.length?yt(t,...r):t(...r)}}function Ot(t){return function(t,e,n){const r=["is"];return mt(lt(t).map((t=>mt(r.map((e=>t.getAttribute(e)))))))}(t)||t.tagName.toLowerCase()}function jt(t,e){return Object.assign({},t,w(e))}function Nt(t,e){let{slots:n,attributes:r,props:s}=e;return u=function(t){return[...l].reduce(((t,e)=>e(t)||t),t)}(k(i(t)?Object.create(t):t,{mount(e,o,i){return void 0===o&&(o={}),D(e,g,!1),this[y]=i,this[O]=function(t,e){void 0===e&&(e=[]);const n=e.map((e=>Z(t,e))),r={};return Object.assign(r,Object.assign({expressions:n},ct((t=>e=>(n.forEach((n=>n[t](e))),r)))))}(e,r).mount(i),D(this,m,Object.freeze(Object.assign({},function(t,e){return void 0===e&&(e={}),Object.assign({},function(t){return Array.from(t.attributes).reduce(((t,e)=>(t[N(e.name)]=e.value,t)),{})}(t),w(e))}(e,s),C(this[O].expressions)))),this.state=jt(this.state,o),this[j]=this.template.createDOM(e).clone(),at(e,this),t.name&&function(t,e){Ot(t)!==e&&ft(t,"is",e)}(e,t.name),D(this,b,e),D(this,f,n),this.onBeforeMount(this.props,this.state),this[j].mount(e,this,i),this.onMounted(this.props,this.state),this},update(t,e){void 0===t&&(t={}),e&&(this[y]=e,this[O].update(e));const n=C(this[O].expressions);if(!1!==this.shouldUpdate(n,this.props))return D(this,m,Object.freeze(Object.assign({},this.props,n))),this.state=jt(this.state,t),this.onBeforeUpdate(this.props,this.state),this[v]||(this[v]=!0,this[j].update(this,this[y])),this.onUpdated(this.props,this.state),this[v]=!1,this},unmount(t){return this.onBeforeUnmount(this.props,this.state),this[O].unmount(),this[j].unmount(this,this[y],null===t?null:!t),this.onUnmounted(this.props,this.state),this}})),Object.keys(t).filter((e=>o(t[e]))).forEach((t=>{u[t]=u[t].bind(u)})),u;var u}function xt(t){let{css:e,template:n,componentAPI:r,name:s}=t;return e&&s&&vt.add(s,e),yt(Nt)(k(L(r,Object.assign({},pt,{[m]:{},state:{}})),Object.assign({[f]:null,[b]:null},dt,{name:s,css:e,template:n})))}const Mt=S(Et);function Et(t){const{css:n,template:r,exports:s,name:o}=t,i=r?function(t,n,r){return t(ut,A,e,r)}(r,0,(t=>{const e=(void 0===(n=t.exports?t.exports.components:{})&&(n={}),Object.entries(w(n)).reduce(((t,e)=>{let[n,r]=e;var s;return t[(s=n,s.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=Et(r),t}),{}));var n;return n=>n===t.name?Mt(t):e[n]||a.get(n)})(t)):B;return t=>{let{slots:e,attributes:u,props:a}=t;if(s&&s[g])return function(t,e){let{slots:n,attributes:r,props:s,css:o,template:i}=e;const u=L(t({slots:n,attributes:r,props:s}),U);return ct((t=>function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];if(t===h){const[t]=n;D(t,g,!0),at(t,u)}return u[t](...n),u}))}(s,{slots:e,attributes:u,props:a,css:n,template:r});const c=w(s)||{},l=xt({css:n,template:i,componentAPI:c,name:o})({slots:e,attributes:u,props:a});return{mount:(t,e,n)=>l.mount(t,n,e),update:(t,e)=>l.update(e,t),unmount:t=>l.unmount(t)}}}const At={cssManager:vt,DOMBindings:{template:ut,createBinding:ot,createExpression:Z,bindingTypes:e,expressionTypes:A},globals:{DOM_COMPONENT_INSTANCE_PROPERTY:c,PARENT_KEY_SYMBOL:y}};t.__=At,t.component=function(t){return function(e,n,r){let{slots:s,attributes:o,parentScope:i}=void 0===r?{}:r;return function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.reduce(((t,e)=>function(){return t(e(...arguments))}))}((t=>t.mount(e,i)),(t=>t({props:n,slots:s,attributes:o})),Et)(t)}},t.install=function(t){return o(t),l.has(t),l.add(t),l},t.mount=function(t,e,n){return ht(t).map((t=>function(t,e,n,r){const s=n||Ot(t);return a.has(s),a.get(s)({props:e,slots:void 0}).mount(t)}(t,e,n)))},t.pure=function(t){return o(t),t[g]=!0,t},t.register=function(t,e){let{css:n,template:r,exports:s}=e;return a.has(t),a.set(t,Et({name:t,css:n,template:r,exports:s})),a},t.uninstall=function(t){return l.has(t),l.delete(t),l},t.unmount=function(t,e){return ht(t).map((t=>(t[c]&&t[c].unmount(e),t)))},t.unregister=function(t){return a.has(t),a.delete(t),vt.remove(t),a},t.version="v7.1.0",t.withTypes=t=>t},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).riot={});
var t,e;t=this,e=function(t){"use strict";const e={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};function n(t,e){return typeof t===e}function r(t){const e=t.ownerSVGElement;return!!e||null===e}function o(t){return"template"===t.tagName.toLowerCase()}function s(t){return n(t,"function")}function i(t){return!u(t)&&t.constructor===Object}function u(t){return null==t}const a=new Map,c=Symbol(),l=new Set,h="is",d="mount",p="update",m="unmount",f="shouldUpdate",b="onBeforeMount",g="onMounted",y="onBeforeUpdate",v="onUpdated",N="onBeforeUnmount",O="onUnmounted",x="props",E="state",M="slots",T="root",j=Symbol(),A=Symbol(),w=Symbol(),S=Symbol(),C=Symbol();function D(t){return t.replace(/-(\w)/g,((t,e)=>e.toUpperCase()))}function k(t){return Array.from(t.attributes).reduce(((t,e)=>(t[D(e.name)]=e.value,t)),{})}function L(t){for(;t.firstChild;)t.removeChild(t.firstChild)}const I=t=>t.remove(),P=(t,e)=>e&&e.parentNode&&e.parentNode.insertBefore(t,e),B=0,_=2,U=3,$={ATTRIBUTE:B,EVENT:1,TEXT:_,VALUE:U};function z(){return this}function H(t){return s(t)?t.prototype&&t.prototype.constructor?new t:t():t}function K(t){const e=new Map,n=n=>(e.has(n)||e.set(n,t.call(this,n)))&&e.get(n);return n.cache=e,n}function R(t){return t.reduce(((t,e)=>{const{value:n,type:r}=e;switch(!0){case!e.name&&r===B:return{...t,...n};case r===U:t.value=e.value;break;default:t[D(e.name)]=e.value}return t}),{})}function Y(t,e,n,r={}){return Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!1,configurable:!0,...r}),t}function F(t,e,n){return Object.entries(e).forEach((([e,r])=>{Y(t,e,r,n)})),t}function V(t,e){return Object.entries(e).forEach((([e,n])=>{t[e]||(t[e]=n)})),t}const q=Object.freeze({[d]:z,[p]:z,[m]:z}),G={...q,clone:z,createDOM:z},W=Symbol(),X=Symbol(),Z=Symbol(),J={nodes:[],mount(t,e){return this.update(t,e)},update(t,e){const{placeholder:n,nodes:r,childrenMap:o}=this,s=t===Z?null:this.evaluate(t),i=s?Array.from(s):[],{newChildrenMap:u,batches:a,futureNodes:c}=function(t,e,n,r){const{condition:o,template:s,childrenMap:i,itemName:u,getKey:a,indexName:c,root:l,isTemplateTag:h}=r,d=new Map,p=[],m=[];return t.forEach(((t,r)=>{const f=function(t,{itemName:e,indexName:n,index:r,item:o}){return Y(t,e,o),n&&Y(t,n,r),t}(Object.create(e),{itemName:u,indexName:c,index:r,item:t}),b=a?a(f):r,g=i.get(b),y=[];if(function(t,e){return!!t&&!t(e)}(o,f))return;const v=!g,N=g?g.template:s.clone(),O=N.el||l.cloneNode(),x=h&&v?function(t){const e=t.dom.cloneNode(!0),{head:n,tail:r}=function(){const t=document.createTextNode(""),e=document.createTextNode("");return t[W]=!0,e[X]=!0,{head:t,tail:e}}();return{avoidDOMInjection:!0,fragment:e,head:n,tail:r,children:[n,...Array.from(e.childNodes),r]}}(N):N.meta;v?p.push((()=>N.mount(O,f,n,x))):p.push((()=>N.update(f,n))),h?y.push(...x.children):y.push(O),i.delete(b),m.push(...y),d.set(b,{nodes:y,template:N,context:f,index:r})})),{newChildrenMap:d,batches:p,futureNodes:m}}(i,t,e,this);return((t,e,n,r)=>{const o=e.length;let s=t.length,i=o,u=0,a=0,c=null;for(;u<s||a<i;)if(s===u){const t=i<o?a?n(e[a-1],-0).nextSibling:n(e[i-a],0):r;for(;a<i;)P(n(e[a++],1),t)}else if(i===a)for(;u<s;)c&&c.has(t[u])||I(n(t[u],-1)),u++;else if(t[u]===e[a])u++,a++;else if(t[s-1]===e[i-1])s--,i--;else if(t[u]===e[i-1]&&e[a]===t[s-1]){const r=n(t[--s],-1).nextSibling;P(n(e[a++],1),n(t[u++],-1).nextSibling),P(n(e[--i],1),r),t[s]=e[i]}else{if(!c){c=new Map;let t=a;for(;t<i;)c.set(e[t],t++)}if(c.has(t[u])){const r=c.get(t[u]);if(a<r&&r<i){let o=u,d=1;for(;++o<s&&o<i&&c.get(t[o])===r+d;)d++;if(d>r-a){const o=n(t[u],0);for(;a<r;)P(n(e[a++],1),o)}else l=n(e[a++],1),(h=n(t[u++],-1))&&h.parentNode&&h.parentNode.replaceChild(l,h)}else u++}else I(n(t[u++],-1))}var l,h})(r,c,function(t,e){return(n,r)=>{if(r<0){const n=t[t.length-1];if(n){const{template:r,nodes:o,context:s}=n;o.pop(),o.length||(t.pop(),r.unmount(s,e,null))}}return n}}(Array.from(o.values()),e),n),a.forEach((t=>t())),this.childrenMap=u,this.nodes=c,this},unmount(t,e){return this.update(Z,e),this}},Q={mount(t,e){return this.update(t,e)},update(t,e){const n=!!this.evaluate(t),r=!this.value&&n,o=this.value&&!n,s=()=>{const n=this.node.cloneNode();P(n,this.placeholder),this.template=this.template.clone(),this.template.mount(n,t,e)};switch(!0){case r:s();break;case o:this.unmount(t);break;default:n&&this.template.update(t,e)}return this.value=n,this},unmount(t,e){return this.template.unmount(t,e,!0),this}},tt="undefined"==typeof Element?{}:Element.prototype,et=K((t=>tt.hasOwnProperty(t))),nt=/^on/,rt={handleEvent(t){this[t.type](t)}},ot=new WeakMap;function st(t){return u(t)?"":t}const it=(t,e)=>{const n=t.childNodes[e];if(n.nodeType===Node.COMMENT_NODE){const e=document.createTextNode("");return t.replaceChild(e,n),e}return n},ut={[B]:function t(e,{name:r,isBoolean:o},u,a){if(!r)return a&&function(t,e,n){const r=e?Object.keys(e):[];Object.keys(n).filter((t=>!r.includes(t))).forEach((e=>t.removeAttribute(e)))}(e,u,a),void(u&&function(e,n){Object.entries(n).forEach((([n,r])=>t(e,{name:n},r)))}(e,u));!et(r)&&(function(t){return n(t,"boolean")}(u)||i(u)||s(u))&&(e[r]=u),function(t){return null==t}(u)?e.removeAttribute(r):function(t){return["string","number","boolean"].includes(typeof t)}(u)&&e.setAttribute(r,function(t,e,n){return!0===e&&n?t:e}(r,u,o))},1:function(t,{name:e},n){const r=e.replace(nt,""),o=ot.get(t)||(t=>{const e=Object.create(rt);return ot.set(t,e),e})(t),[s,i]=(t=>Array.isArray(t)?t:[t,!1])(n),u=o[r],a=s&&!u;u&&!s&&t.removeEventListener(r,o),a&&t.addEventListener(r,o,i),o[r]=s},[_]:function(t,e,n){t.data=st(n)},[U]:function(t,e,n){t.value=st(n)}},at={mount(t){return this.value=this.evaluate(t),ct(this,this.value),this},update(t){const e=this.evaluate(t);return this.value!==e&&(ct(this,e),this.value=e),this},unmount(){return 1===this.type&&ct(this,null),this}};function ct(t,e){return ut[t.type](t.node,t,e,t.value)}function lt(t,e){return{...at,...e,node:e.type===_?it(t,e.childNodeIndex):t}}const ht=(t,e)=>t[w]||e,dt={attributes:[],getTemplateScope(t,e){return function(t,e,n){if(!t||!t.length)return n;const r=t.map((t=>({...t,value:t.evaluate(e)})));return Object.assign(Object.create(n||null),R(r))}(this.attributes,t,e)},mount(t,e){const n=!!t.slots&&t.slots.find((({id:t})=>t===this.name)),{parentNode:r}=this.node,o=ht(t,e);return this.template=n&&Nt(n.html,n.bindings).createDOM(r),this.template&&(L(this.node),this.template.mount(this.node,this.getTemplateScope(t,o),o),this.template.children=Array.from(this.node.childNodes)),pt(this.node),I(this.node),this},update(t,e){if(this.template){const n=ht(t,e);this.template.update(this.getTemplateScope(t,n),n)}return this},unmount(t,e,n){return this.template&&this.template.unmount(this.getTemplateScope(t,e),null,n),this}};function pt(t){const e=t&&t.firstChild;e&&(P(e,t),pt(t))}function mt(t){return t.reduce(((t,{bindings:e})=>t.concat(e)),[])}const ft={mount(t){return this.update(t)},update(t,e){const n=this.evaluate(t);return n&&n===this.name?this.tag.update(t):(this.unmount(t,e,!0),this.name=n,this.tag=function(t,e=[],n=[]){return t?t({slots:e,attributes:n}):Nt(function(t){return t.reduce(((t,e)=>t+e.html),"")}(e),[...mt(e),{expressions:n.map((t=>({type:B,...t})))}])}(this.getComponent(n),this.slots,this.attributes),this.tag.mount(this.node,t)),this},unmount(t,e,n){return this.tag&&this.tag.unmount(n),this}},bt={1:function(t,{evaluate:e,template:n}){const r=document.createTextNode("");return P(r,t),I(t),{...Q,node:t,evaluate:e,placeholder:r,template:n.createDOM(t)}},2:function(t,{expressions:e}){return{...(n=e.map((e=>lt(t,e))),r=["mount","update","unmount"],r.reduce(((t,e)=>({...t,[e]:t=>n.map((n=>n[e](t)))&&void 0})),{}))};var n,r},0:function(t,{evaluate:e,condition:n,itemName:r,indexName:s,getKey:i,template:u}){const a=document.createTextNode(""),c=t.cloneNode();return P(a,t),I(t),{...J,childrenMap:new Map,node:t,root:c,condition:n,evaluate:e,isTemplateTag:o(c),template:u.createDOM(t),getKey:i,indexName:s,itemName:r,placeholder:a}},3:function(t,{evaluate:e,getComponent:n,slots:r,attributes:o}){return{...ft,node:t,evaluate:e,slots:r,attributes:o,getComponent:n}},4:function(t,{name:e,attributes:n}){return{...dt,attributes:n,node:t,name:e}}};function gt(t,e){return t.map((t=>t.type===_?{...t,childNodeIndex:t.childNodeIndex+e}:t))}function yt(t,e,n){const{selector:r,type:o,redundantAttribute:s,expressions:i}=e,u=r?t.querySelector(r):t;s&&u.removeAttribute(s);const a=i||[];return(bt[o]||bt[2])(u,{...e,expressions:n&&!r?gt(a,n):a})}const vt={createDOM(t){return this.dom=this.dom||function(t,e){return e&&("string"==typeof e?function(t,e){return r(t)?function(t,e){return e.ownerDocument.importNode((new window.DOMParser).parseFromString(`<svg xmlns="http://www.w3.org/2000/svg">${t}</svg>`,"application/xml").documentElement,!0)}(e,t):function(t,e){const n=o(e)?e:document.createElement("template");return n.innerHTML=t,n.content}(e,t)}(t,e):e)}(t,this.html)||document.createDocumentFragment(),this},mount(t,e,n,s={}){this.el&&this.unmount(e);const{fragment:i,children:u,avoidDOMInjection:a}=s,{parentNode:c}=u?u[0]:t,l=o(t),h=l?function(t,e,n){const r=Array.from(t.childNodes);return Math.max(r.indexOf(e),r.indexOf(n.head)+1,0)}(c,t,s):null;this.createDOM(t);const d=i||this.dom.cloneNode(!0);return this.el=l?c:t,this.children=l?u||Array.from(d.childNodes):null,!a&&d&&function(t,e){switch(!0){case r(t):!function(t,e){for(;t.firstChild;)e.appendChild(t.firstChild)}(e,t);break;case o(t):t.parentNode.replaceChild(e,t);break;default:t.appendChild(e)}}(t,d),this.bindings=this.bindingsData.map((t=>yt(this.el,t,h))),this.bindings.forEach((t=>t.mount(e,n))),this.meta=s,this},update(t,e){return this.bindings.forEach((n=>n.update(t,e))),this},unmount(t,e,n=!1){const r=this.el;if(!r)return this;switch(this.bindings.forEach((r=>r.unmount(t,e,n))),!0){case r[j]||null===n:break;case Array.isArray(this.children):!function(t){for(let e=0;e<t.length;e++)I(t[e])}(this.children);break;case!n:L(r);break;case!!n:I(r)}return this.el=null,this},clone(){return{...this,meta:{},el:null}}};function Nt(t,e=[]){return{...vt,html:t,bindingsData:e}}const Ot=(t,e)=>t[c]=e;function xt(t){return[d,p,m].reduce(((e,n)=>(e[n]=t(n),e)),{})}function Et(t){return Array.isArray(t)?t:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(t))&&"number"==typeof t.length?Array.from(t):[t]}function Mt(t,e){return Et("string"==typeof t?(e||document).querySelectorAll(t):t)}const Tt=Object.freeze({$(t){return Mt(t,this.root)[0]},$$(t){return Mt(t,this.root)}}),jt=Object.freeze({[f]:z,[b]:z,[g]:z,[y]:z,[v]:z,[N]:z,[O]:z}),At=t=>1===t.length?t[0]:t;function wt(t,e,n){const r="object"==typeof e?e:{[e]:n},o=Object.keys(r);return Et(t).forEach((t=>{o.forEach((e=>t.setAttribute(e,r[e])))})),t}const St=new Map;var Ct;const Dt={CSS_BY_NAME:St,add(t,e){return St.has(t)||(St.set(t,e),this.inject()),this},inject(){return(Ct||(wt(Ct=Mt("style[riot]")[0]||document.createElement("style"),"type","text/css"),Ct.parentNode||document.head.appendChild(Ct),Ct)).innerHTML=[...St.values()].join("\n"),this},remove(t){return St.has(t)&&(St.delete(t),this.inject()),this}};function kt(t,...e){return(...n)=>(n=[...e,...n]).length<t.length?kt(t,...n):t(...n)}function Lt(t){return function(t,e,n){const r="string"==typeof e?[e]:e;return At(Et(t).map((t=>At(r.map((e=>t.getAttribute(e)))))))}(t,h)||t.tagName.toLowerCase()}function It(t,e){return{...t,...H(e)}}function Pt(t,e={}){return{...k(t),...H(e)}}function Bt(t,{slots:e,attributes:n,props:r}){return o=function(t){return[...l].reduce(((t,e)=>e(t)||t),t)}(F(i(t)?Object.create(t):t,{mount(o,s={},i){return Y(o,j,!1),this[w]=i,this[S]=function(t,e=[]){const n=e.map((e=>lt(t,e))),r={};return Object.assign(r,{expressions:n,...xt((t=>e=>(n.forEach((n=>n[t](e))),r)))})}(o,n).mount(i),Y(this,x,Object.freeze({...Pt(o,r),...R(this[S].expressions)})),this[E]=It(this[E],s),this[C]=this.template.createDOM(o).clone(),Ot(o,this),t.name&&function(t,e){Lt(t)!==e&&wt(t,h,e)}(o,t.name),Y(this,T,o),Y(this,M,e),this[b](this[x],this[E]),this[C].mount(o,this,i),this[g](this[x],this[E]),this},update(t={},e){e&&(this[w]=e,this[S].update(e));const n=R(this[S].expressions);if(!1!==this[f](n,this[x]))return Y(this,x,Object.freeze({...e?null:this[x],...n})),this[E]=It(this[E],t),this[y](this[x],this[E]),this[A]||(this[A]=!0,this[C].update(this,this[w])),this[v](this[x],this[E]),this[A]=!1,this},unmount(t){return this[N](this[x],this[E]),this[S].unmount(),this[C].unmount(this,this[w],null===t?null:!t),this[O](this[x],this[E]),this}})),Object.keys(t).filter((e=>s(t[e]))).forEach((t=>{o[t]=o[t].bind(o)})),o;var o}function _t({css:t,template:e,componentAPI:n,name:r}){return t&&r&&Dt.add(r,t),kt(Bt)(F(V(n,{...jt,[x]:{},[E]:{}}),{[M]:null,[T]:null,...Tt,name:r,css:t,template:e}))}const Ut=K($t);function $t(t){const{css:n,template:r,exports:o,name:s}=t,i=r?function(t,n,r){return t(Nt,$,e,r)}(r,0,(t=>{const e=function(t={}){return Object.entries(H(t)).reduce(((t,[e,n])=>{var r;return t[(r=e,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=$t(n),t}),{})}(t.exports?t.exports.components:{});return n=>n===t.name?Ut(t):e[n]||a.get(n)})(t)):G;return({slots:t,attributes:e,props:u})=>{if(o&&o[j])return function(t,{slots:e,attributes:n,props:r,css:o,template:s}){const i=V(t({slots:e,attributes:n,props:r}),q);return xt((t=>(...e)=>{if(t===d){const[t]=e;Y(t,j,!0),Ot(t,i)}return i[t](...e),i}))}(o,{slots:t,attributes:e,props:u,css:n,template:r});const a=H(o)||{},c=_t({css:n,template:i,componentAPI:a,name:s})({slots:t,attributes:e,props:u});return{mount:(t,e,n)=>c.mount(t,n,e),update:(t,e)=>c.update(e,t),unmount:t=>c.unmount(t)}}}const zt={cssManager:Dt,DOMBindings:{template:Nt,createBinding:yt,createExpression:lt,bindingTypes:e,expressionTypes:$},globals:{DOM_COMPONENT_INSTANCE_PROPERTY:c,PARENT_KEY_SYMBOL:w}};t.__=zt,t.component=function(t){return(e,n,{slots:r,attributes:o,parentScope:s}={})=>function(...t){return t.reduce(((t,e)=>(...n)=>t(e(...n))))}((t=>t.mount(e,s)),(t=>t({props:n,slots:r,attributes:o})),$t)(t)},t.install=function(t){return s(t),l.has(t),l.add(t),l},t.mount=function(t,e,n){return Mt(t).map((t=>function(t,e,n,r){const o=n||Lt(t);return a.has(o),a.get(o)({props:e,slots:void 0}).mount(t)}(t,e,n)))},t.pure=function(t){return s(t),t[j]=!0,t},t.register=function(t,{css:e,template:n,exports:r}){return a.has(t),a.set(t,$t({name:t,css:e,template:n,exports:r})),a},t.uninstall=function(t){return l.has(t),l.delete(t),l},t.unmount=function(t,e){return Mt(t).map((t=>(t[c]&&t[c].unmount(e),t)))},t.unregister=function(t){return a.has(t),a.delete(t),Dt.remove(t),a},t.version="v9.0.0-rc",t.withTypes=t=>t},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).riot={});

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc