@vobs/router 1.2.1 → 1.3.0

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/debug.cjs CHANGED
@@ -1,9 +1,32 @@
1
- 'use strict';
2
-
1
+ var __VOBS_CJS_FILE_URL = require("url").pathToFileURL(__filename).href;
2
+ "use strict";
3
3
  var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
7
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5
21
 
6
22
  // packages/router/src/debug.ts
23
+ var debug_exports = {};
24
+ __export(debug_exports, {
25
+ createRouterDebugId: () => createRouterDebugId,
26
+ emitRouterDebug: () => emitRouterDebug,
27
+ subscribeRouterDebug: () => subscribeRouterDebug
28
+ });
29
+ module.exports = __toCommonJS(debug_exports);
7
30
  var listeners = /* @__PURE__ */ new Set();
8
31
  var nextRouterId = 1;
9
32
  function createRouterDebugId() {
@@ -25,9 +48,10 @@ function emitRouterDebug(routerId, type, payload, context) {
25
48
  }
26
49
  }
27
50
  __name(emitRouterDebug, "emitRouterDebug");
28
-
29
- exports.createRouterDebugId = createRouterDebugId;
30
- exports.emitRouterDebug = emitRouterDebug;
31
- exports.subscribeRouterDebug = subscribeRouterDebug;
32
- //# sourceMappingURL=debug.cjs.map
51
+ // Annotate the CommonJS export names for ESM import in node:
52
+ 0 && (module.exports = {
53
+ createRouterDebugId,
54
+ emitRouterDebug,
55
+ subscribeRouterDebug
56
+ });
33
57
  //# sourceMappingURL=debug.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/debug.ts"],"names":[],"mappings":";;;;;;AAkBA,IAAM,SAAA,uBAAgB,GAAA,EAAyB;AAC/C,IAAI,YAAA,GAAe,CAAA;AAEZ,SAAS,mBAAA,GAA8B;AAC5C,EAAA,OAAO,UAAU,YAAA,EAAc,CAAA,CAAA;AACjC;AAFgB,MAAA,CAAA,mBAAA,EAAA,qBAAA,CAAA;AAIT,SAAS,qBAAqB,QAAA,EAA2C;AAC9E,EAAA,SAAA,CAAU,IAAI,QAAQ,CAAA;AACtB,EAAA,OAAO,MAAM,SAAA,CAAU,MAAA,CAAO,QAAQ,CAAA;AACxC;AAHgB,MAAA,CAAA,oBAAA,EAAA,sBAAA,CAAA;AAKT,SAAS,eAAA,CACd,QAAA,EACA,IAAA,EACA,OAAA,EACA,OAAA,EACM;AACN,EAAA,MAAM,KAAA,GAA0B,EAAE,QAAA,EAAU,IAAA,EAAM,SAAS,OAAA,EAAQ;AACnE,EAAA,KAAA,MAAW,QAAA,IAAY,CAAC,GAAG,SAAS,CAAA,EAAG;AACrC,IAAA,IAAI;AAAE,MAAA,QAAA,CAAS,KAAK,CAAA;AAAA,IAAE,CAAA,CAAA,MAAQ;AAAA,IAA+C;AAAA,EAC/E;AACF;AAVgB,MAAA,CAAA,eAAA,EAAA,iBAAA,CAAA","file":"debug.cjs","sourcesContent":["import type { RuntimeDebugContext } from '@vobs/runtime'\n\nexport type RouterDebugEventType =\n | 'navigation:start'\n | 'navigation:end'\n | 'route:update'\n | 'data-request'\n | 'error'\n\nexport interface RouterDebugEvent {\n readonly routerId: string\n readonly type: RouterDebugEventType\n readonly payload: unknown\n readonly context?: RuntimeDebugContext\n}\n\ntype RouterDebugListener = (event: RouterDebugEvent) => void\n\nconst listeners = new Set<RouterDebugListener>()\nlet nextRouterId = 1\n\nexport function createRouterDebugId(): string {\n return `router-${nextRouterId++}`\n}\n\nexport function subscribeRouterDebug(listener: RouterDebugListener): () => void {\n listeners.add(listener)\n return () => listeners.delete(listener)\n}\n\nexport function emitRouterDebug(\n routerId: string,\n type: RouterDebugEventType,\n payload: unknown,\n context?: RuntimeDebugContext\n): void {\n const event: RouterDebugEvent = { routerId, type, payload, context }\n for (const listener of [...listeners]) {\n try { listener(event) } catch { /* diagnostics must not affect navigation */ }\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/debug.ts"],"sourcesContent":["import type { RuntimeDebugContext } from '@vobs/runtime'\n\nexport type RouterDebugEventType =\n | 'navigation:start'\n | 'navigation:end'\n | 'route:update'\n | 'data-request'\n | 'error'\n\nexport interface RouterDebugEvent {\n readonly routerId: string\n readonly type: RouterDebugEventType\n readonly payload: unknown\n readonly context?: RuntimeDebugContext\n}\n\ntype RouterDebugListener = (event: RouterDebugEvent) => void\n\nconst listeners = new Set<RouterDebugListener>()\nlet nextRouterId = 1\n\nexport function createRouterDebugId(): string {\n return `router-${nextRouterId++}`\n}\n\nexport function subscribeRouterDebug(listener: RouterDebugListener): () => void {\n listeners.add(listener)\n return () => listeners.delete(listener)\n}\n\nexport function emitRouterDebug(\n routerId: string,\n type: RouterDebugEventType,\n payload: unknown,\n context?: RuntimeDebugContext\n): void {\n const event: RouterDebugEvent = { routerId, type, payload, context }\n for (const listener of [...listeners]) {\n try { listener(event) } catch { /* diagnostics must not affect navigation */ }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBA,IAAM,YAAY,oBAAI,IAAyB;AAC/C,IAAI,eAAe;AAEZ,SAAS,sBAA8B;AAC5C,SAAO,UAAU,cAAc;AACjC;AAFgB;AAIT,SAAS,qBAAqB,UAA2C;AAC9E,YAAU,IAAI,QAAQ;AACtB,SAAO,MAAM,UAAU,OAAO,QAAQ;AACxC;AAHgB;AAKT,SAAS,gBACd,UACA,MACA,SACA,SACM;AACN,QAAM,QAA0B,EAAE,UAAU,MAAM,SAAS,QAAQ;AACnE,aAAW,YAAY,CAAC,GAAG,SAAS,GAAG;AACrC,QAAI;AAAE,eAAS,KAAK;AAAA,IAAE,QAAQ;AAAA,IAA+C;AAAA,EAC/E;AACF;AAVgB;","names":[]}
package/dist/debug.js CHANGED
@@ -23,7 +23,9 @@ function emitRouterDebug(routerId, type, payload, context) {
23
23
  }
24
24
  }
25
25
  __name(emitRouterDebug, "emitRouterDebug");
26
-
27
- export { createRouterDebugId, emitRouterDebug, subscribeRouterDebug };
28
- //# sourceMappingURL=debug.js.map
26
+ export {
27
+ createRouterDebugId,
28
+ emitRouterDebug,
29
+ subscribeRouterDebug
30
+ };
29
31
  //# sourceMappingURL=debug.js.map
package/dist/debug.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/debug.ts"],"names":[],"mappings":";;;;AAkBA,IAAM,SAAA,uBAAgB,GAAA,EAAyB;AAC/C,IAAI,YAAA,GAAe,CAAA;AAEZ,SAAS,mBAAA,GAA8B;AAC5C,EAAA,OAAO,UAAU,YAAA,EAAc,CAAA,CAAA;AACjC;AAFgB,MAAA,CAAA,mBAAA,EAAA,qBAAA,CAAA;AAIT,SAAS,qBAAqB,QAAA,EAA2C;AAC9E,EAAA,SAAA,CAAU,IAAI,QAAQ,CAAA;AACtB,EAAA,OAAO,MAAM,SAAA,CAAU,MAAA,CAAO,QAAQ,CAAA;AACxC;AAHgB,MAAA,CAAA,oBAAA,EAAA,sBAAA,CAAA;AAKT,SAAS,eAAA,CACd,QAAA,EACA,IAAA,EACA,OAAA,EACA,OAAA,EACM;AACN,EAAA,MAAM,KAAA,GAA0B,EAAE,QAAA,EAAU,IAAA,EAAM,SAAS,OAAA,EAAQ;AACnE,EAAA,KAAA,MAAW,QAAA,IAAY,CAAC,GAAG,SAAS,CAAA,EAAG;AACrC,IAAA,IAAI;AAAE,MAAA,QAAA,CAAS,KAAK,CAAA;AAAA,IAAE,CAAA,CAAA,MAAQ;AAAA,IAA+C;AAAA,EAC/E;AACF;AAVgB,MAAA,CAAA,eAAA,EAAA,iBAAA,CAAA","file":"debug.js","sourcesContent":["import type { RuntimeDebugContext } from '@vobs/runtime'\n\nexport type RouterDebugEventType =\n | 'navigation:start'\n | 'navigation:end'\n | 'route:update'\n | 'data-request'\n | 'error'\n\nexport interface RouterDebugEvent {\n readonly routerId: string\n readonly type: RouterDebugEventType\n readonly payload: unknown\n readonly context?: RuntimeDebugContext\n}\n\ntype RouterDebugListener = (event: RouterDebugEvent) => void\n\nconst listeners = new Set<RouterDebugListener>()\nlet nextRouterId = 1\n\nexport function createRouterDebugId(): string {\n return `router-${nextRouterId++}`\n}\n\nexport function subscribeRouterDebug(listener: RouterDebugListener): () => void {\n listeners.add(listener)\n return () => listeners.delete(listener)\n}\n\nexport function emitRouterDebug(\n routerId: string,\n type: RouterDebugEventType,\n payload: unknown,\n context?: RuntimeDebugContext\n): void {\n const event: RouterDebugEvent = { routerId, type, payload, context }\n for (const listener of [...listeners]) {\n try { listener(event) } catch { /* diagnostics must not affect navigation */ }\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/debug.ts"],"sourcesContent":["import type { RuntimeDebugContext } from '@vobs/runtime'\n\nexport type RouterDebugEventType =\n | 'navigation:start'\n | 'navigation:end'\n | 'route:update'\n | 'data-request'\n | 'error'\n\nexport interface RouterDebugEvent {\n readonly routerId: string\n readonly type: RouterDebugEventType\n readonly payload: unknown\n readonly context?: RuntimeDebugContext\n}\n\ntype RouterDebugListener = (event: RouterDebugEvent) => void\n\nconst listeners = new Set<RouterDebugListener>()\nlet nextRouterId = 1\n\nexport function createRouterDebugId(): string {\n return `router-${nextRouterId++}`\n}\n\nexport function subscribeRouterDebug(listener: RouterDebugListener): () => void {\n listeners.add(listener)\n return () => listeners.delete(listener)\n}\n\nexport function emitRouterDebug(\n routerId: string,\n type: RouterDebugEventType,\n payload: unknown,\n context?: RuntimeDebugContext\n): void {\n const event: RouterDebugEvent = { routerId, type, payload, context }\n for (const listener of [...listeners]) {\n try { listener(event) } catch { /* diagnostics must not affect navigation */ }\n }\n}\n"],"mappings":";;;;AAkBA,IAAM,YAAY,oBAAI,IAAyB;AAC/C,IAAI,eAAe;AAEZ,SAAS,sBAA8B;AAC5C,SAAO,UAAU,cAAc;AACjC;AAFgB;AAIT,SAAS,qBAAqB,UAA2C;AAC9E,YAAU,IAAI,QAAQ;AACtB,SAAO,MAAM,UAAU,OAAO,QAAQ;AACxC;AAHgB;AAKT,SAAS,gBACd,UACA,MACA,SACA,SACM;AACN,QAAM,QAA0B,EAAE,UAAU,MAAM,SAAS,QAAQ;AACnE,aAAW,YAAY,CAAC,GAAG,SAAS,GAAG;AACrC,QAAI;AAAE,eAAS,KAAK;AAAA,IAAE,QAAQ;AAAA,IAA+C;AAAA,EAC/E;AACF;AAVgB;","names":[]}