@lolyjs/core 0.1.0-alpha.6 → 0.1.0-alpha.8
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/dist/cli.cjs.map +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +22 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +39 -2
- package/dist/index.d.ts +39 -2
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime.cjs +46 -23
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.d.mts +49 -3
- package/dist/runtime.d.ts +49 -3
- package/dist/runtime.js +46 -19
- package/dist/runtime.js.map +1 -1
- package/package.json +4 -2
- package/dist/bootstrap-BiCQmSkx.d.mts +0 -50
- package/dist/bootstrap-BiCQmSkx.d.ts +0 -50
package/dist/index.cjs
CHANGED
|
@@ -5141,6 +5141,11 @@ var import_react2 = require("react");
|
|
|
5141
5141
|
// modules/runtime/client/RouterView.tsx
|
|
5142
5142
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
5143
5143
|
function RouterView({ state }) {
|
|
5144
|
+
console.log("[loly:RouterView] Rendering", {
|
|
5145
|
+
url: state.url,
|
|
5146
|
+
hasRoute: !!state.route,
|
|
5147
|
+
hasComponents: !!state.components
|
|
5148
|
+
});
|
|
5144
5149
|
if (!state.route) {
|
|
5145
5150
|
if (state.components === null) {
|
|
5146
5151
|
return null;
|
|
@@ -5152,6 +5157,11 @@ function RouterView({ state }) {
|
|
|
5152
5157
|
}
|
|
5153
5158
|
const { Page, layouts } = state.components;
|
|
5154
5159
|
const { params, props } = state;
|
|
5160
|
+
console.log("[loly:RouterView] Creating page element", {
|
|
5161
|
+
hasPage: !!Page,
|
|
5162
|
+
layoutsCount: layouts.length,
|
|
5163
|
+
paramsKeys: Object.keys(params)
|
|
5164
|
+
});
|
|
5155
5165
|
let element = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Page, { params, ...props });
|
|
5156
5166
|
const layoutChain = layouts.slice().reverse();
|
|
5157
5167
|
for (const Layout of layoutChain) {
|
|
@@ -5622,6 +5632,10 @@ function AppShell({
|
|
|
5622
5632
|
notFoundRoute,
|
|
5623
5633
|
errorRoute
|
|
5624
5634
|
}) {
|
|
5635
|
+
console.log("[loly:AppShell] Component rendering", {
|
|
5636
|
+
url: initialState.url,
|
|
5637
|
+
hasRoute: !!initialState.route
|
|
5638
|
+
});
|
|
5625
5639
|
const [state, setState] = (0, import_react2.useState)(initialState);
|
|
5626
5640
|
const handlersRef = (0, import_react2.useRef)({
|
|
5627
5641
|
setState,
|
|
@@ -5630,6 +5644,11 @@ function AppShell({
|
|
|
5630
5644
|
errorRoute
|
|
5631
5645
|
});
|
|
5632
5646
|
(0, import_react2.useEffect)(() => {
|
|
5647
|
+
console.log("[loly:AppShell] Updating handlersRef", {
|
|
5648
|
+
routesCount: routes.length,
|
|
5649
|
+
hasNotFound: !!notFoundRoute,
|
|
5650
|
+
hasError: !!errorRoute
|
|
5651
|
+
});
|
|
5633
5652
|
handlersRef.current = {
|
|
5634
5653
|
setState,
|
|
5635
5654
|
routes,
|
|
@@ -5638,7 +5657,8 @@ function AppShell({
|
|
|
5638
5657
|
};
|
|
5639
5658
|
}, [routes, notFoundRoute, errorRoute]);
|
|
5640
5659
|
(0, import_react2.useEffect)(() => {
|
|
5641
|
-
|
|
5660
|
+
const effectId = Math.random().toString(36).substring(7);
|
|
5661
|
+
console.log("[loly:AppShell] Setting up event listeners", { effectId });
|
|
5642
5662
|
let isMounted = true;
|
|
5643
5663
|
let listenerCount = 0;
|
|
5644
5664
|
async function handleNavigate(nextUrl, options) {
|
|
@@ -5661,6 +5681,7 @@ function AppShell({
|
|
|
5661
5681
|
});
|
|
5662
5682
|
return () => {
|
|
5663
5683
|
console.log("[loly:AppShell] Cleaning up event listeners", {
|
|
5684
|
+
effectId,
|
|
5664
5685
|
wasMounted: isMounted,
|
|
5665
5686
|
listenersToRemove: listenerCount
|
|
5666
5687
|
});
|