cayo 0.9.6 → 0.9.7
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.
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
const json = JSON.stringify($$restProps);
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
|
-
<div data-cayo-id={name ? `${name}-${hash()}` : ''} data-cayo-props={json}
|
|
23
|
-
<slot/>
|
|
22
|
+
<div data-cayo-id={name ? `${name}-${hash()}` : ''} data-cayo-props={json}>
|
|
23
|
+
<slot/>
|
|
24
|
+
</div>
|
|
24
25
|
|
package/package.json
CHANGED
package/test/src/index.js
CHANGED
|
@@ -5,7 +5,13 @@ const cb = (node) => {
|
|
|
5
5
|
console.log(node);
|
|
6
6
|
return node;
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
function replaceContents ( node ) {
|
|
10
|
+
node.innerHTML = '';
|
|
11
|
+
return node;
|
|
12
|
+
}
|
|
13
|
+
|
|
8
14
|
import { default as renderComponents } from './cayo-runtime.js';
|
|
9
15
|
document.addEventListener('DOMContentLoaded', () => {
|
|
10
|
-
renderComponents(
|
|
16
|
+
renderComponents(replaceContents);
|
|
11
17
|
});
|
|
@@ -16,6 +16,8 @@ I'm index howdy ok<br>
|
|
|
16
16
|
<a href="/hey/" class="red">Hey</a>
|
|
17
17
|
<a href="/some/page/" class="red">Some</a>
|
|
18
18
|
|
|
19
|
+
<Cayo name="Test"><div>Default Content</div></Cayo>
|
|
20
|
+
|
|
19
21
|
<Cayo name="Cool" beans='ayo'>Whaaat</Cayo>
|
|
20
22
|
<Cayo name="Cool" beans='beeeeaaaaasnnss' />
|
|
21
23
|
<Cayo name="Cool" beans='NOT BEANS' />
|