@unsetsoft/ryunixjs 0.5.7 → 0.5.9-nightly.1
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/README.md +1 -1
- package/dist/Ryunix.js +15 -4
- package/package.json +1 -1
- package/src/lib/workers.js +11 -0
package/README.md
CHANGED
package/dist/Ryunix.js
CHANGED
|
@@ -523,7 +523,7 @@
|
|
|
523
523
|
* @param elements - an array of elements representing the new children to be rendered in the current
|
|
524
524
|
* fiber's subtree
|
|
525
525
|
*/
|
|
526
|
-
const reconcileChildren = (wipFiber, elements) => {
|
|
526
|
+
const reconcileChildren$1 = (wipFiber, elements) => {
|
|
527
527
|
let index = 0;
|
|
528
528
|
let oldFiber = wipFiber.alternate && wipFiber.alternate.child;
|
|
529
529
|
let prevSibling;
|
|
@@ -576,7 +576,7 @@
|
|
|
576
576
|
|
|
577
577
|
var Reconciler = /*#__PURE__*/Object.freeze({
|
|
578
578
|
__proto__: null,
|
|
579
|
-
reconcileChildren: reconcileChildren
|
|
579
|
+
reconcileChildren: reconcileChildren$1
|
|
580
580
|
});
|
|
581
581
|
|
|
582
582
|
/**
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
// Normal function component returns single root node
|
|
600
600
|
childArr = [children];
|
|
601
601
|
}
|
|
602
|
-
reconcileChildren(fiber, childArr);
|
|
602
|
+
reconcileChildren$1(fiber, childArr);
|
|
603
603
|
};
|
|
604
604
|
|
|
605
605
|
/**
|
|
@@ -612,7 +612,7 @@
|
|
|
612
612
|
if (!fiber.dom) {
|
|
613
613
|
fiber.dom = createDom(fiber);
|
|
614
614
|
}
|
|
615
|
-
reconcileChildren(fiber, fiber.props.children);
|
|
615
|
+
reconcileChildren$1(fiber, fiber.props.children);
|
|
616
616
|
};
|
|
617
617
|
|
|
618
618
|
var Components = /*#__PURE__*/Object.freeze({
|
|
@@ -664,6 +664,12 @@
|
|
|
664
664
|
} else {
|
|
665
665
|
updateHostComponent(fiber);
|
|
666
666
|
}
|
|
667
|
+
|
|
668
|
+
//TODO: TEST
|
|
669
|
+
|
|
670
|
+
const elements = renderRouteElements();
|
|
671
|
+
reconcileChildren(fiber, elements);
|
|
672
|
+
|
|
667
673
|
if (fiber.child) {
|
|
668
674
|
return fiber.child
|
|
669
675
|
}
|
|
@@ -677,6 +683,11 @@
|
|
|
677
683
|
return undefined
|
|
678
684
|
};
|
|
679
685
|
|
|
686
|
+
const renderRouteElements = (fiber) => {
|
|
687
|
+
return routes.find((route) => route.path === vars.wipRoot.props.location)
|
|
688
|
+
.component
|
|
689
|
+
};
|
|
690
|
+
|
|
680
691
|
var Workers = /*#__PURE__*/Object.freeze({
|
|
681
692
|
__proto__: null,
|
|
682
693
|
performUnitOfWork: performUnitOfWork,
|
package/package.json
CHANGED
package/src/lib/workers.js
CHANGED
|
@@ -45,6 +45,12 @@ const performUnitOfWork = (fiber) => {
|
|
|
45
45
|
} else {
|
|
46
46
|
updateHostComponent(fiber)
|
|
47
47
|
}
|
|
48
|
+
|
|
49
|
+
//TODO: TEST
|
|
50
|
+
|
|
51
|
+
const elements = renderRouteElements(fiber)
|
|
52
|
+
reconcileChildren(fiber, elements)
|
|
53
|
+
|
|
48
54
|
if (fiber.child) {
|
|
49
55
|
return fiber.child
|
|
50
56
|
}
|
|
@@ -58,4 +64,9 @@ const performUnitOfWork = (fiber) => {
|
|
|
58
64
|
return undefined
|
|
59
65
|
}
|
|
60
66
|
|
|
67
|
+
const renderRouteElements = (fiber) => {
|
|
68
|
+
return routes.find((route) => route.path === vars.wipRoot.props.location)
|
|
69
|
+
.component
|
|
70
|
+
}
|
|
71
|
+
|
|
61
72
|
export { performUnitOfWork, workLoop }
|