malinajs 0.6.59 → 0.6.60
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/compile.js +1 -0
- package/malina.js +2 -1
- package/package.json +1 -1
- package/readme.md +1 -1
- package/runtime.js +13 -1
package/compile.js
CHANGED
|
@@ -3870,6 +3870,7 @@ function processCSS() {
|
|
|
3870
3870
|
}
|
|
3871
3871
|
} else cleanSelectorItems.push(s);
|
|
3872
3872
|
}
|
|
3873
|
+
while(cleanSelectorItems.length && ['WhiteSpace', 'Combinator'].includes(cleanSelectorItems[0].type)) cleanSelectorItems.shift();
|
|
3873
3874
|
while(cleanSelectorItems.length && ['WhiteSpace', 'Combinator'].includes(last(cleanSelectorItems).type)) cleanSelectorItems.pop();
|
|
3874
3875
|
if(!cleanSelectorItems.length || globalBlock) { // fully global?
|
|
3875
3876
|
assert(origin.length);
|
package/malina.js
CHANGED
|
@@ -3871,6 +3871,7 @@
|
|
|
3871
3871
|
}
|
|
3872
3872
|
} else cleanSelectorItems.push(s);
|
|
3873
3873
|
}
|
|
3874
|
+
while(cleanSelectorItems.length && ['WhiteSpace', 'Combinator'].includes(cleanSelectorItems[0].type)) cleanSelectorItems.shift();
|
|
3874
3875
|
while(cleanSelectorItems.length && ['WhiteSpace', 'Combinator'].includes(last(cleanSelectorItems).type)) cleanSelectorItems.pop();
|
|
3875
3876
|
if(!cleanSelectorItems.length || globalBlock) { // fully global?
|
|
3876
3877
|
assert(origin.length);
|
|
@@ -5925,7 +5926,7 @@
|
|
|
5925
5926
|
return {event, fn};
|
|
5926
5927
|
}
|
|
5927
5928
|
|
|
5928
|
-
const version = '0.6.
|
|
5929
|
+
const version = '0.6.60';
|
|
5929
5930
|
|
|
5930
5931
|
|
|
5931
5932
|
async function compile(source, config = {}) {
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
## Malina.js
|
|
3
3
|
|
|
4
|
-
<img align="right" width="200" height="200" src="malinajs2.png" />
|
|
4
|
+
<img align="right" width="200" height="200" src="https://github.com/malinajs/malinajs/raw/master/malinajs2.png" />
|
|
5
5
|
|
|
6
6
|
Malina.js builds your web-application to use it **without framework on frontend side**. Therefore your web-app becomes thinner and faster, and the application itself consist of **vanilla JavaScript**, look at [examples](https://malinajs.github.io/repl/). [TodoMVC example](https://malina-todomvc.surge.sh) **2.7kb** (gzipped) and [source code](https://github.com/malinajs/todomvc)
|
|
7
7
|
|
package/runtime.js
CHANGED
|
@@ -748,6 +748,18 @@ const unwrapProps = (cd, props, fn) => {
|
|
|
748
748
|
}
|
|
749
749
|
};
|
|
750
750
|
|
|
751
|
+
|
|
752
|
+
const mount = (label, component, option) => {
|
|
753
|
+
const app = component(label, option);
|
|
754
|
+
const destroy = () => label.textContent = '';
|
|
755
|
+
|
|
756
|
+
if(app?._d) {
|
|
757
|
+
app._d.push(destroy);
|
|
758
|
+
return app;
|
|
759
|
+
}
|
|
760
|
+
return {destroy};
|
|
761
|
+
};
|
|
762
|
+
|
|
751
763
|
function $$htmlBlock($cd, tag, fn) {
|
|
752
764
|
let lastElement;
|
|
753
765
|
let create = (html) => {
|
|
@@ -947,4 +959,4 @@ function $$eachBlock($parentCD, label, onlyChild, fn, getKey, itemTemplate, bind
|
|
|
947
959
|
}, {ro: true, cmp: $$compareArray});
|
|
948
960
|
}
|
|
949
961
|
|
|
950
|
-
export { $$addEventForComponent, $$awaitBlock, $$cloneDeep, $$compareArray, $$compareDeep, $$deepComparator, $$eachBlock, $$htmlBlock, $$htmlToFragment, $$htmlToFragmentClean, $$ifBlock, $$removeElements, $$removeItem, $ChangeDetector, $base, $context, $digest, $insertElementByOption, $makeEmitter, $onDestroy, $onMount, $readOnlyBase, $tick, $watch, $watchReadOnly, __app_onerror, __bindActionSubscribe, addClass, addEvent, addStyles, attachAnchor, attachSlot, attachSlotBase, attchExportedFragment, autoSubscribe, bindAction, bindAttribute, bindAttributeBase, bindClass, bindInput, bindStyle, bindText, callComponent, cd_onDestroy, childNodes, cloneDeep, configure, createTextNode, current_component, eachDefaultKey, exportFragment, fire, firstChild, getFinalLabel, insertAfter, isArray, isFunction, keyComparator, makeClassResolver, makeComponent, makeExternalProperty, makeSlot, makeSlotStatic, noop, observeProps, prefixPush, removeElementsBetween, setClassToElement, spreadAttributes, svgToFragment, unwrapProps };
|
|
962
|
+
export { $$addEventForComponent, $$awaitBlock, $$cloneDeep, $$compareArray, $$compareDeep, $$deepComparator, $$eachBlock, $$htmlBlock, $$htmlToFragment, $$htmlToFragmentClean, $$ifBlock, $$removeElements, $$removeItem, $ChangeDetector, $base, $context, $digest, $insertElementByOption, $makeEmitter, $onDestroy, $onMount, $readOnlyBase, $tick, $watch, $watchReadOnly, __app_onerror, __bindActionSubscribe, addClass, addEvent, addStyles, attachAnchor, attachSlot, attachSlotBase, attchExportedFragment, autoSubscribe, bindAction, bindAttribute, bindAttributeBase, bindClass, bindInput, bindStyle, bindText, callComponent, cd_onDestroy, childNodes, cloneDeep, configure, createTextNode, current_component, eachDefaultKey, exportFragment, fire, firstChild, getFinalLabel, insertAfter, isArray, isFunction, keyComparator, makeClassResolver, makeComponent, makeExternalProperty, makeSlot, makeSlotStatic, mount, noop, observeProps, prefixPush, removeElementsBetween, setClassToElement, spreadAttributes, svgToFragment, unwrapProps };
|