@askrjs/askr 0.0.7 → 0.0.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/{component-BBGWJdqJ.d.ts → component-DHAn9JxU.d.ts} +1 -1
- package/dist/foundations/index.d.ts +4 -3
- package/dist/foundations/index.js +32 -10
- package/dist/foundations/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +27 -13
- package/dist/index.js.map +1 -1
- package/dist/{jsx-AzPM8gMS.d.ts → jsx-CSWf4VFg.d.ts} +2 -2
- package/dist/jsx-dev-runtime.d.ts +3 -3
- package/dist/jsx-dev-runtime.js.map +1 -1
- package/dist/jsx-runtime.d.ts +3 -3
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/resources/index.d.ts +2 -2
- package/dist/resources/index.js +3 -3
- package/dist/resources/index.js.map +1 -1
- package/dist/router/index.js +23 -6
- package/dist/router/index.js.map +1 -1
- package/dist/ssr/index.d.ts +1 -1
- package/dist/ssr/index.js +20 -6
- package/dist/ssr/index.js.map +1 -1
- package/dist/{types-uOPfcrdz.d.ts → types-DxdosFWx.d.ts} +1 -1
- package/package.json +4 -4
package/dist/router/index.js
CHANGED
|
@@ -324,6 +324,9 @@ function isSchedulerExecuting() {
|
|
|
324
324
|
return globalScheduler.isExecuting();
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
+
// src/common/jsx.ts
|
|
328
|
+
var Fragment = /* @__PURE__ */ Symbol.for("askr.fragment");
|
|
329
|
+
|
|
327
330
|
// src/runtime/context.ts
|
|
328
331
|
var CONTEXT_FRAME_SYMBOL = /* @__PURE__ */ Symbol("__tempoContextFrame__");
|
|
329
332
|
var currentContextFrame = null;
|
|
@@ -340,7 +343,7 @@ function getCurrentContextFrame() {
|
|
|
340
343
|
return currentContextFrame;
|
|
341
344
|
}
|
|
342
345
|
|
|
343
|
-
// src/renderer/diag
|
|
346
|
+
// src/renderer/diag.ts
|
|
344
347
|
function getDiagMap() {
|
|
345
348
|
try {
|
|
346
349
|
const root = globalThis;
|
|
@@ -642,9 +645,6 @@ function isKeyedReorderFastPathEligible(parent, newChildren, oldKeyMap) {
|
|
|
642
645
|
};
|
|
643
646
|
}
|
|
644
647
|
|
|
645
|
-
// src/common/jsx.ts
|
|
646
|
-
var Fragment = /* @__PURE__ */ Symbol.for("askr.fragment");
|
|
647
|
-
|
|
648
648
|
// src/runtime/dev-namespace.ts
|
|
649
649
|
function getDevNamespace() {
|
|
650
650
|
if (process.env.NODE_ENV === "production") return {};
|
|
@@ -1008,6 +1008,20 @@ function removeAllListeners(root) {
|
|
|
1008
1008
|
|
|
1009
1009
|
// src/renderer/dom.ts
|
|
1010
1010
|
var IS_DOM_AVAILABLE = typeof document !== "undefined";
|
|
1011
|
+
var fallbackComponentInstanceId = 0;
|
|
1012
|
+
function nextComponentInstanceId() {
|
|
1013
|
+
const key = "__COMPONENT_INSTANCE_ID";
|
|
1014
|
+
try {
|
|
1015
|
+
__ASKR_incCounter(key);
|
|
1016
|
+
const root = globalThis;
|
|
1017
|
+
const diag = root.__ASKR_DIAG;
|
|
1018
|
+
const n = diag ? diag[key] : void 0;
|
|
1019
|
+
if (typeof n === "number" && Number.isFinite(n)) return `comp-${n}`;
|
|
1020
|
+
} catch {
|
|
1021
|
+
}
|
|
1022
|
+
fallbackComponentInstanceId++;
|
|
1023
|
+
return `comp-${fallbackComponentInstanceId}`;
|
|
1024
|
+
}
|
|
1011
1025
|
function addTrackedListener(el, eventName, handler) {
|
|
1012
1026
|
const wrappedHandler = createWrappedHandler(handler, true);
|
|
1013
1027
|
const options = getPassiveOptions(eventName);
|
|
@@ -1185,7 +1199,7 @@ function createComponentElement(node, type, props) {
|
|
|
1185
1199
|
let childInstance = node.__instance;
|
|
1186
1200
|
if (!childInstance) {
|
|
1187
1201
|
childInstance = createComponentInstance(
|
|
1188
|
-
|
|
1202
|
+
nextComponentInstanceId(),
|
|
1189
1203
|
componentFn,
|
|
1190
1204
|
props || {},
|
|
1191
1205
|
null
|
|
@@ -3169,7 +3183,10 @@ function Link({ href, children }) {
|
|
|
3169
3183
|
|
|
3170
3184
|
// src/foundations/structures/layout.tsx
|
|
3171
3185
|
function layout(Layout) {
|
|
3172
|
-
return (children, props) =>
|
|
3186
|
+
return (children, props) => {
|
|
3187
|
+
const mergedProps = { ...props, children };
|
|
3188
|
+
return Layout(mergedProps);
|
|
3189
|
+
};
|
|
3173
3190
|
}
|
|
3174
3191
|
|
|
3175
3192
|
export { Link, clearRoutes, getRoutes, layout, navigate, route };
|