@scayle/storefront-devtools 0.2.0-alpha.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.
Files changed (131) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +222 -0
  3. package/dist/_chunks/clipboard-DrVHc2QA.mjs +61 -0
  4. package/dist/_chunks/diff-DzJ5arJj.mjs +169 -0
  5. package/dist/_chunks/panel-uV5ITqhY.mjs +51 -0
  6. package/dist/_chunks/redact-DmIF-iyk.mjs +96 -0
  7. package/dist/_chunks/useStore-Db8RZW8T.mjs +10 -0
  8. package/dist/group.d.ts +42 -0
  9. package/dist/group.d.ts.map +1 -0
  10. package/dist/index.d.ts +23 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.mjs +178 -0
  13. package/dist/inertia/client/index.d.mts +13 -0
  14. package/dist/inertia/client/index.d.ts +7 -0
  15. package/dist/inertia/client/index.d.ts.map +1 -0
  16. package/dist/inertia/client/index.mjs +694 -0
  17. package/dist/inertia/core/capture.d.ts +15 -0
  18. package/dist/inertia/core/capture.d.ts.map +1 -0
  19. package/dist/inertia/core/correlator.d.ts +91 -0
  20. package/dist/inertia/core/correlator.d.ts.map +1 -0
  21. package/dist/inertia/core/diagnostics.d.ts +10 -0
  22. package/dist/inertia/core/diagnostics.d.ts.map +1 -0
  23. package/dist/inertia/core/diff.d.ts +33 -0
  24. package/dist/inertia/core/diff.d.ts.map +1 -0
  25. package/dist/inertia/core/events-tab.d.ts +20 -0
  26. package/dist/inertia/core/events-tab.d.ts.map +1 -0
  27. package/dist/inertia/core/feature-info.d.ts +14 -0
  28. package/dist/inertia/core/feature-info.d.ts.map +1 -0
  29. package/dist/inertia/core/features.d.ts +27 -0
  30. package/dist/inertia/core/features.d.ts.map +1 -0
  31. package/dist/inertia/core/history-capture.d.ts +15 -0
  32. package/dist/inertia/core/history-capture.d.ts.map +1 -0
  33. package/dist/inertia/core/interceptors.d.ts +69 -0
  34. package/dist/inertia/core/interceptors.d.ts.map +1 -0
  35. package/dist/inertia/core/markdown.d.ts +10 -0
  36. package/dist/inertia/core/markdown.d.ts.map +1 -0
  37. package/dist/inertia/core/network.d.ts +34 -0
  38. package/dist/inertia/core/network.d.ts.map +1 -0
  39. package/dist/inertia/core/protocol.d.ts +38 -0
  40. package/dist/inertia/core/protocol.d.ts.map +1 -0
  41. package/dist/inertia/core/request-tree.d.ts +18 -0
  42. package/dist/inertia/core/request-tree.d.ts.map +1 -0
  43. package/dist/inertia/core/response.d.ts +39 -0
  44. package/dist/inertia/core/response.d.ts.map +1 -0
  45. package/dist/inertia/core/session.d.ts +18 -0
  46. package/dist/inertia/core/session.d.ts.map +1 -0
  47. package/dist/inertia/core/store.d.ts +40 -0
  48. package/dist/inertia/core/store.d.ts.map +1 -0
  49. package/dist/inertia/core/types.d.ts +112 -0
  50. package/dist/inertia/core/types.d.ts.map +1 -0
  51. package/dist/inertia/core/url.d.ts +11 -0
  52. package/dist/inertia/core/url.d.ts.map +1 -0
  53. package/dist/inertia/plugin.d.ts +11 -0
  54. package/dist/inertia/plugin.d.ts.map +1 -0
  55. package/dist/inertia/renderer/index.d.mts +16 -0
  56. package/dist/inertia/renderer/index.mjs +771 -0
  57. package/dist/inject.d.ts +12 -0
  58. package/dist/inject.d.ts.map +1 -0
  59. package/dist/orpc/client/index.d.mts +13 -0
  60. package/dist/orpc/client/index.d.ts +7 -0
  61. package/dist/orpc/client/index.d.ts.map +1 -0
  62. package/dist/orpc/client/index.mjs +502 -0
  63. package/dist/orpc/core/capture.d.ts +32 -0
  64. package/dist/orpc/core/capture.d.ts.map +1 -0
  65. package/dist/orpc/core/classify.d.ts +14 -0
  66. package/dist/orpc/core/classify.d.ts.map +1 -0
  67. package/dist/orpc/core/curl.d.ts +11 -0
  68. package/dist/orpc/core/curl.d.ts.map +1 -0
  69. package/dist/orpc/core/markdown.d.ts +12 -0
  70. package/dist/orpc/core/markdown.d.ts.map +1 -0
  71. package/dist/orpc/core/orpc-error.d.ts +18 -0
  72. package/dist/orpc/core/orpc-error.d.ts.map +1 -0
  73. package/dist/orpc/core/serialize.d.ts +12 -0
  74. package/dist/orpc/core/serialize.d.ts.map +1 -0
  75. package/dist/orpc/core/session.d.ts +15 -0
  76. package/dist/orpc/core/session.d.ts.map +1 -0
  77. package/dist/orpc/core/store.d.ts +50 -0
  78. package/dist/orpc/core/store.d.ts.map +1 -0
  79. package/dist/orpc/core/types.d.ts +67 -0
  80. package/dist/orpc/core/types.d.ts.map +1 -0
  81. package/dist/orpc/core/url.d.ts +12 -0
  82. package/dist/orpc/core/url.d.ts.map +1 -0
  83. package/dist/orpc/plugin.d.ts +10 -0
  84. package/dist/orpc/plugin.d.ts.map +1 -0
  85. package/dist/orpc/renderer/index.d.mts +16 -0
  86. package/dist/orpc/renderer/index.mjs +457 -0
  87. package/dist/resource-center/client/index.mjs +21 -0
  88. package/dist/resource-center/client.d.ts +3 -0
  89. package/dist/resource-center/client.d.ts.map +1 -0
  90. package/dist/resource-center/plugin.d.ts +12 -0
  91. package/dist/resource-center/plugin.d.ts.map +1 -0
  92. package/dist/shared/clipboard.d.ts +9 -0
  93. package/dist/shared/clipboard.d.ts.map +1 -0
  94. package/dist/shared/redact.d.ts +27 -0
  95. package/dist/shared/redact.d.ts.map +1 -0
  96. package/dist/shared/safe-clone.d.ts +46 -0
  97. package/dist/shared/safe-clone.d.ts.map +1 -0
  98. package/dist/shared/session-storage.d.ts +18 -0
  99. package/dist/shared/session-storage.d.ts.map +1 -0
  100. package/dist/shared/use-window-store.d.ts +18 -0
  101. package/dist/shared/use-window-store.d.ts.map +1 -0
  102. package/dist/storefront/plugin.d.ts +9 -0
  103. package/dist/storefront/plugin.d.ts.map +1 -0
  104. package/dist/storefront/renderer/index.d.mts +16 -0
  105. package/dist/storefront/renderer/index.mjs +124 -0
  106. package/dist/vue-devtools/client/index.mjs +4912 -0
  107. package/dist/vue-devtools/client.d.ts +2 -0
  108. package/dist/vue-devtools/client.d.ts.map +1 -0
  109. package/dist/vue-devtools/plugin.d.ts +14 -0
  110. package/dist/vue-devtools/plugin.d.ts.map +1 -0
  111. package/dist/vue-devtools/ui/assets/css-8QJvnqUH.js +1 -0
  112. package/dist/vue-devtools/ui/assets/css-CaJ9TzKE.js +1 -0
  113. package/dist/vue-devtools/ui/assets/diff-woXpYk--.js +1 -0
  114. package/dist/vue-devtools/ui/assets/html-BHDw6EPc.js +1 -0
  115. package/dist/vue-devtools/ui/assets/html-GueGcY0x.js +1 -0
  116. package/dist/vue-devtools/ui/assets/index-Dby9TIQH.js +156 -0
  117. package/dist/vue-devtools/ui/assets/index-sSkqWPzY.css +1 -0
  118. package/dist/vue-devtools/ui/assets/javascript-BzbQS41l.js +1 -0
  119. package/dist/vue-devtools/ui/assets/javascript-Yelw-5ZN.js +1 -0
  120. package/dist/vue-devtools/ui/assets/json-B88Oqtu5.js +1 -0
  121. package/dist/vue-devtools/ui/assets/json-CaljABEy.js +1 -0
  122. package/dist/vue-devtools/ui/assets/shellscript-CLZ0U2zV.js +1 -0
  123. package/dist/vue-devtools/ui/assets/typescript-Utq2Cl8c.js +1 -0
  124. package/dist/vue-devtools/ui/assets/typescript-j_1H8WHN.js +1 -0
  125. package/dist/vue-devtools/ui/assets/vitesse-dark-BZCL-v6S.js +1 -0
  126. package/dist/vue-devtools/ui/assets/vitesse-light-VbXTXTou.js +1 -0
  127. package/dist/vue-devtools/ui/assets/vue-B1Tf5CHw.js +1 -0
  128. package/dist/vue-devtools/ui/assets/vue-html-CGMs_6qn.js +1 -0
  129. package/dist/vue-devtools/ui/assets/yaml-rwi0_p6S.js +1 -0
  130. package/dist/vue-devtools/ui/index.html +13 -0
  131. package/package.json +101 -0
@@ -0,0 +1,91 @@
1
+ import { InertiaPage } from './protocol';
2
+ import { CapturedEvent, RequestRecord } from './types';
3
+ import { NetworkTiming } from './network';
4
+ /**
5
+ * Correlates individual Inertia events into logical `RequestRecord`s.
6
+ *
7
+ * Strategy:
8
+ * - `before`/`start`/`finish` carry `event.detail.visit` with matching
9
+ * properties -> use a visit fingerprint (url + method + only + deferredProps)
10
+ * for correlation.
11
+ * - Other events (navigate, success, etc.) -> correlate via an active visit id.
12
+ * - Prefetch visits: `inertia:before` fires even for cache hits (no real
13
+ * request). Record creation is deferred until `inertia:start` to avoid
14
+ * phantom records.
15
+ *
16
+ * Inertia creates NEW visit objects for each event dispatch, so identity-based
17
+ * (WeakMap) correlation does not work.
18
+ *
19
+ * @see https://inertiajs.com/events
20
+ */
21
+ export declare class Correlator {
22
+ private nextVisitId;
23
+ private records;
24
+ private sortedRecords;
25
+ private maxRecords;
26
+ private fingerprintMap;
27
+ private recordByInertiaVisitId;
28
+ private pendingPrefetch;
29
+ private activeVisitId;
30
+ private lastPage;
31
+ private pendingNetwork;
32
+ private _evictedCount;
33
+ constructor(maxRecords?: number);
34
+ processEvent(event: CapturedEvent): RequestRecord | null;
35
+ getRequests(): RequestRecord[];
36
+ getRequest(visitId: number): RequestRecord | undefined;
37
+ getCurrentPage(): InertiaPage | null;
38
+ get evictedCount(): number;
39
+ hasRequestWithUrl(url: string): boolean;
40
+ processClientVisit(method: 'push' | 'replace', page: InertiaPage, previousPage: InertiaPage): RequestRecord;
41
+ clear(): void;
42
+ linkNetworkTiming(timing: NetworkTiming): RequestRecord | null;
43
+ /**
44
+ * Attaches request headers captured via `onVisitRequest` to the matching
45
+ * record. A no-op if no record with this `inertiaVisitId` exists yet: the
46
+ * interceptor can fire before `inertia:before`'s DOM event listener runs.
47
+ */
48
+ attachRequestHeaders(inertiaVisitId: string, headers: Record<string, string>): RequestRecord | null;
49
+ /**
50
+ * Attaches response headers and parsed response props captured via
51
+ * `onVisitResponse` to the matching record. A no-op if no record with this
52
+ * `inertiaVisitId` exists yet or it has already been evicted.
53
+ */
54
+ attachResponseData(inertiaVisitId: string, response: {
55
+ headers: Record<string, string>;
56
+ props?: Record<string, unknown>;
57
+ }): RequestRecord | null;
58
+ private drainPendingNetwork;
59
+ private findNetworkMatch;
60
+ private networkMatchesVisit;
61
+ private handleBefore;
62
+ private handleStart;
63
+ private handleFinish;
64
+ private handleCancel;
65
+ private handleNavigate;
66
+ private handleBeforeUpdate;
67
+ private handleGenericEvent;
68
+ private createPrefetchRecord;
69
+ private visitFingerprint;
70
+ private pushFingerprint;
71
+ private removeFromFingerprintMap;
72
+ private resolveByFingerprint;
73
+ private resolveByActiveId;
74
+ private insertRecord;
75
+ private evictOldest;
76
+ private removeFromInertiaVisitIdMap;
77
+ private extractVisit;
78
+ private extractVisitOptions;
79
+ private classifyVisitType;
80
+ private extractUrl;
81
+ private isDeferredReload;
82
+ /**
83
+ * Finds the most recent record a child request can nest under: the latest
84
+ * non-deferred, non-prefetch record, optionally restricted to one URL.
85
+ *
86
+ * @param url - When given, only a record with this exact URL matches.
87
+ * @returns The matching `visitId`, or undefined when no record qualifies.
88
+ */
89
+ private findNestingParentVisitId;
90
+ }
91
+ //# sourceMappingURL=correlator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"correlator.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/correlator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EAGd,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAQ9C;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,WAAW,CAAI;IACvB,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,cAAc,CAAmC;IAKzD,OAAO,CAAC,sBAAsB,CAAwC;IACtE,OAAO,CAAC,eAAe,CAKR;IACf,OAAO,CAAC,aAAa,CAAsB;IAC3C,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,cAAc,CAAsB;IAC5C,OAAO,CAAC,aAAa,CAAI;gBAEb,UAAU,SAAM;IAI5B,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,GAAG,IAAI;IAoBxD,WAAW,IAAI,aAAa,EAAE;IAI9B,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAItD,cAAc,IAAI,WAAW,GAAG,IAAI;IAIpC,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAKvC,kBAAkB,CAChB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,IAAI,EAAE,WAAW,EACjB,YAAY,EAAE,WAAW,GACxB,aAAa;IA0BhB,KAAK,IAAI,IAAI;IAYb,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,GAAG,IAAI;IAa9D;;;;OAIG;IACH,oBAAoB,CAClB,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,aAAa,GAAG,IAAI;IASvB;;;;OAIG;IACH,kBAAkB,CAChB,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE;QACR,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC/B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAChC,GACA,aAAa,GAAG,IAAI;IAUvB,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,mBAAmB;IAmB3B,OAAO,CAAC,YAAY;IAuEpB,OAAO,CAAC,WAAW;IAyBnB,OAAO,CAAC,YAAY;IAyCpB,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,cAAc;IA6DtB,OAAO,CAAC,kBAAkB;IA4B1B,OAAO,CAAC,kBAAkB;IAiC1B,OAAO,CAAC,oBAAoB;IAiC5B,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,wBAAwB;IAahC,OAAO,CAAC,oBAAoB;IAoB5B,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,WAAW;IAmBnB,OAAO,CAAC,2BAA2B;IAMnC,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,mBAAmB;IAyC3B,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,gBAAgB;IAIxB;;;;;;OAMG;IACH,OAAO,CAAC,wBAAwB;CAQjC"}
@@ -0,0 +1,10 @@
1
+ import { RequestRecord, Diagnostic } from './types';
2
+ /**
3
+ * Runs every diagnostic rule against a request record and collects the hits.
4
+ * Called by the correlator whenever a record gains new information.
5
+ *
6
+ * @param req - The request record to inspect.
7
+ * @returns The diagnostics that matched, in rule order. Empty when none apply.
8
+ */
9
+ export declare function computeDiagnostics(req: RequestRecord): Diagnostic[];
10
+ //# sourceMappingURL=diagnostics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAsHxD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,aAAa,GAAG,UAAU,EAAE,CASnE"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Computes a structural diff between two values.
3
+ * Returns a tree of `DiffNode` entries describing what changed.
4
+ */
5
+ /** How a single key changed between the old and new value. */
6
+ export type DiffType = 'added' | 'removed' | 'changed' | 'unchanged' | 'nested';
7
+ /** One node in a structural diff tree, keyed by object property or array index. */
8
+ export interface DiffNode {
9
+ type: DiffType;
10
+ key: string;
11
+ oldValue?: unknown;
12
+ newValue?: unknown;
13
+ children?: DiffNode[];
14
+ }
15
+ /**
16
+ * Diffs two objects (typically Inertia page props) into a tree of changes,
17
+ * recursing into plain objects and arrays for element-level detail.
18
+ *
19
+ * @param oldObj - The previous object, or undefined when the prop is new.
20
+ * @param newObj - The current object, or undefined when the prop was removed.
21
+ * @returns One {@link DiffNode} per top-level key, with nested children for
22
+ * recursed objects and arrays.
23
+ */
24
+ export declare function diffProps(oldObj: Record<string, unknown> | undefined, newObj: Record<string, unknown> | undefined): DiffNode[];
25
+ /**
26
+ * Deeply compares two values, tolerant of cycles.
27
+ *
28
+ * @param a - First value.
29
+ * @param b - Second value.
30
+ * @returns True when the values are structurally equal.
31
+ */
32
+ export declare function deepEqual(a: unknown, b: unknown): boolean;
33
+ //# sourceMappingURL=diff.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/diff.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,8DAA8D;AAC9D,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAA;AAE/E,mFAAmF;AACnF,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,QAAQ,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAA;CACtB;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC3C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAC1C,QAAQ,EAAE,CA6CZ;AA0DD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAEzD"}
@@ -0,0 +1,20 @@
1
+ import { CapturedEvent } from '../core/types';
2
+ /** One row in the lifecycle timeline. */
3
+ export interface LifecycleStep {
4
+ /** Event name with the `inertia:` prefix stripped. */
5
+ name: string;
6
+ /** Offset from the first event, formatted like `+12ms`. */
7
+ offset: string;
8
+ /** Terminal classification, when this step ends the visit. */
9
+ terminal?: 'success' | 'error' | 'cancelled';
10
+ }
11
+ /**
12
+ * Builds an ordered lifecycle timeline from a request's captured events.
13
+ * Keeps only the lifecycle events (dropping progress, flash, prefetch noise)
14
+ * and stamps each with its offset from the first captured event.
15
+ *
16
+ * @param events - The request's captured events, in capture order.
17
+ * @returns Ordered lifecycle steps. Empty when there are no events.
18
+ */
19
+ export declare function computeLifecycle(events: CapturedEvent[]): LifecycleStep[];
20
+ //# sourceMappingURL=events-tab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events-tab.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/events-tab.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,yCAAyC;AACzC,MAAM,WAAW,aAAa;IAC5B,sDAAsD;IACtD,IAAI,EAAE,MAAM,CAAA;IACZ,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAA;IACd,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,WAAW,CAAA;CAC7C;AA2BD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE,CA6BzE"}
@@ -0,0 +1,14 @@
1
+ /** Human description and documentation link for an Inertia feature badge. */
2
+ export interface FeatureInfo {
3
+ description: string;
4
+ docsUrl: string;
5
+ }
6
+ /**
7
+ * Looks up the description and documentation link for an Inertia feature type.
8
+ * Used by the feature badges and the markdown exporter.
9
+ *
10
+ * @param type - The `ActiveFeature['type']` value, for example `partial`.
11
+ * @returns The matching {@link FeatureInfo}, or `undefined` for unknown types.
12
+ */
13
+ export declare function getFeatureInfo(type: string): FeatureInfo | undefined;
14
+ //# sourceMappingURL=feature-info.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-info.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/feature-info.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;CAChB;AAyDD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAEpE"}
@@ -0,0 +1,27 @@
1
+ import { InertiaPage } from './protocol';
2
+ import { ActiveFeature, RequestRecord } from './types';
3
+ /**
4
+ * Extracts page-level Inertia features from a page object. These features
5
+ * depend only on page properties (deferred props, merge strategies, encryption,
6
+ * flash, etc.) and do not require a `RequestRecord`.
7
+ *
8
+ * @param page - The Inertia page object to inspect.
9
+ * @returns The features present on the page, in detection order.
10
+ * @see https://inertiajs.com/deferred-props
11
+ * @see https://inertiajs.com/merging-props
12
+ * @see https://inertiajs.com/history-encryption
13
+ */
14
+ export declare function extractPageFeatures(page: InertiaPage): ActiveFeature[];
15
+ /**
16
+ * Extracts active Inertia features from a request record and its page object.
17
+ * Combines request-specific features (partial, prefetch, cached) with
18
+ * page-level features from {@link extractPageFeatures}.
19
+ *
20
+ * @param record - The request record, used for partial/prefetch/cached signals.
21
+ * @param page - The page object resolved for the request.
22
+ * @returns The combined feature list for the request.
23
+ * @see https://inertiajs.com/partial-reloads
24
+ * @see https://inertiajs.com/prefetching
25
+ */
26
+ export declare function extractFeatures(record: RequestRecord, page: InertiaPage): ActiveFeature[];
27
+ //# sourceMappingURL=features.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/features.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAW3D;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,aAAa,EAAE,CAiFtE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,WAAW,GAChB,aAAa,EAAE,CAmBjB"}
@@ -0,0 +1,15 @@
1
+ import { DevToolsStore } from './store';
2
+ import { StopFunction } from './types';
3
+ /**
4
+ * Monkey-patches `history.pushState` and `history.replaceState` to detect
5
+ * client-side visits that bypass the normal Inertia event lifecycle
6
+ * (`router.push`, `router.replace`, `router.replaceProp`, and so on). A
7
+ * pending-server-visit counter suppresses double-counting of server visits,
8
+ * and encrypted history (an ArrayBuffer page) falls back to a deferred check
9
+ * against the store's current page.
10
+ *
11
+ * @param store - The devtools store that receives detected client visits.
12
+ * @returns A function that restores the original history methods.
13
+ */
14
+ export declare function startHistoryCapture(store: DevToolsStore): StopFunction;
15
+ //# sourceMappingURL=history-capture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history-capture.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/history-capture.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAkD3C;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CAsHtE"}
@@ -0,0 +1,69 @@
1
+ import { DevToolsStore } from './store';
2
+ /** The subset of `@inertiajs/core`'s `@internal` interceptor registry this module relies on. */
3
+ export interface InertiaInterceptorRegistry {
4
+ onVisitRequest: (handler: (visit: {
5
+ id: string;
6
+ }, config: {
7
+ headers?: Record<string, unknown>;
8
+ }) => unknown) => () => void;
9
+ onVisitResponse: (handler: (visit: {
10
+ id: string;
11
+ }, response: {
12
+ data: unknown;
13
+ headers?: Record<string, string>;
14
+ }) => unknown) => () => void;
15
+ }
16
+ declare global {
17
+ interface Window {
18
+ __inertia_interceptors__?: InertiaInterceptorRegistry;
19
+ }
20
+ }
21
+ /**
22
+ * Normalizes a header value record to lowercase keys and string values.
23
+ * `HttpRequestConfig.headers` types values as `unknown`, but Inertia only
24
+ * ever sets strings on it in practice.
25
+ *
26
+ * @param headers - The raw header record, keys in whatever case the caller used.
27
+ * @returns A lowercased, stringified copy. Empty when `headers` is absent.
28
+ */
29
+ export declare function normalizeHeaders(headers: Record<string, unknown> | undefined): Record<string, string>;
30
+ /**
31
+ * Extracts the top-level `props` from an Inertia response body.
32
+ *
33
+ * `HttpResponse.data` is documented as the raw response string, but by the
34
+ * time `onVisitResponse` fires, `Response#getPageResponse()` has already
35
+ * parsed it in place into the page object (verified against the real running
36
+ * response: `data` arrives as `{ component, props, url, ... }`, not a JSON
37
+ * string). This accepts either shape, so it keeps working if a future
38
+ * `@inertiajs/core` version calls the interceptor earlier in that pipeline.
39
+ *
40
+ * @param data - The response body, already-parsed or a raw JSON string.
41
+ * @returns The page's `props`, or `undefined` when the body isn't page-shaped
42
+ * (a non-Inertia response, or a parse failure).
43
+ */
44
+ export declare function extractResponseProps(data: unknown): Record<string, unknown> | undefined;
45
+ /**
46
+ * Subscribes to Inertia's `@internal` `window.__inertia_interceptors__`
47
+ * registry to capture the real request/response headers and raw response
48
+ * body per visit, none of which the public DOM CustomEvents expose. Exposed
49
+ * by `createInertiaApp`'s default `dev: import.meta.env.DEV` option, so it is
50
+ * absent (and this becomes a no-op) in a production build or if a host app
51
+ * disables it.
52
+ *
53
+ * The registry doesn't exist yet when this module runs: the devtools client
54
+ * is injected at the *top* of the app's own entry module (`inject.ts`), so it
55
+ * always executes before that entry's own `createInertiaApp(...)` call, which
56
+ * is what creates `window.__inertia_interceptors__` in the first place. This
57
+ * polls briefly until the app's own setup catches up.
58
+ *
59
+ * This registry is `@internal` and undocumented: it may be renamed or
60
+ * removed in a future `@inertiajs/core` release without notice. Every access
61
+ * is guarded so its absence never breaks the devtools, let alone the host
62
+ * app — a version bump just silently loses header/response capture again.
63
+ *
64
+ * @param store - The devtools store that receives captured headers/body.
65
+ * @returns A teardown function that stops polling and unsubscribes both
66
+ * handlers, whichever state capture is currently in.
67
+ */
68
+ export declare function startInterceptorCapture(store: DevToolsStore): () => void;
69
+ //# sourceMappingURL=interceptors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interceptors.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/interceptors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAI5C,gGAAgG;AAChG,MAAM,WAAW,0BAA0B;IACzC,cAAc,EAAE,CACd,OAAO,EAAE,CACP,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EACrB,MAAM,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,KAC1C,OAAO,KACT,MAAM,IAAI,CAAA;IACf,eAAe,EAAE,CACf,OAAO,EAAE,CACP,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,EACrB,QAAQ,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,KAC1D,OAAO,KACT,MAAM,IAAI,CAAA;CAChB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,wBAAwB,CAAC,EAAE,0BAA0B,CAAA;KACtD;CACF;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAC3C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASxB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,OAAO,GACZ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAsBrC;AAoDD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,aAAa,GAAG,MAAM,IAAI,CA0BxE"}
@@ -0,0 +1,10 @@
1
+ import { RequestRecord } from './types';
2
+ /**
3
+ * Formats a request record as markdown for pasting into AI chats, issues, or
4
+ * chat. Includes the raw page JSON so the exact prop values are inspectable.
5
+ *
6
+ * @param request - The request record to format.
7
+ * @returns A markdown document with header, features, error, and page sections.
8
+ */
9
+ export declare function requestToMarkdown(request: RequestRecord): string;
10
+ //# sourceMappingURL=markdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/markdown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AA2D5C;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAkChE"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Network timing capture using `PerformanceObserver`.
3
+ *
4
+ * Observes Resource Timing entries for Inertia requests (matched by URL) instead
5
+ * of monkey-patching XHR/fetch. This is non-invasive and avoids conflicts with
6
+ * other libraries or browser extensions.
7
+ */
8
+ /** Resource Timing data for a single Inertia request. */
9
+ export interface NetworkTiming {
10
+ url: string;
11
+ /** Wall-clock request duration in milliseconds. */
12
+ duration: number;
13
+ /** Request start, on the `performance.now()` timeline (`startTime`). */
14
+ startedAt: number;
15
+ /** Request end, `startTime + duration`. */
16
+ finishedAt: number;
17
+ /** Bytes transferred over the wire. `0` when served from cache. */
18
+ transferSize?: number;
19
+ }
20
+ /** Receives one {@link NetworkTiming} per matched Inertia resource entry. */
21
+ export type NetworkTimingCallback = (timing: NetworkTiming) => void;
22
+ /**
23
+ * Starts observing Resource Timing entries for Inertia requests via
24
+ * `PerformanceObserver`. Non-invasive: it reads the browser's own timing data
25
+ * instead of patching `XMLHttpRequest` or `fetch`.
26
+ *
27
+ * @param isInertiaUrl - Predicate that decides whether a resource URL belongs
28
+ * to an Inertia request.
29
+ * @param onTiming - Called once per matched resource entry.
30
+ * @returns A teardown function that disconnects the observer. A no-op when
31
+ * `PerformanceObserver` is unavailable.
32
+ */
33
+ export declare function startNetworkCapture(isInertiaUrl: (url: string) => boolean, onTiming: NetworkTimingCallback): () => void;
34
+ //# sourceMappingURL=network.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/network.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yDAAyD;AACzD,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAA;IAChB,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAA;IACjB,2CAA2C;IAC3C,UAAU,EAAE,MAAM,CAAA;IAClB,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,6EAA6E;AAC7E,MAAM,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAA;AAEnE;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,EACtC,QAAQ,EAAE,qBAAqB,GAC9B,MAAM,IAAI,CAqCZ"}
@@ -0,0 +1,38 @@
1
+ import { Page } from '@inertiajs/core';
2
+ /**
3
+ * Relaxed version of `@inertiajs/core`'s `Page` type. Uses looser field types
4
+ * for forward compatibility across Inertia versions and to simplify test mocks
5
+ * (core's `Page` requires all fields). Field names track the `Page` interface
6
+ * from `@inertiajs/core` 3.x.
7
+ *
8
+ * @see https://inertiajs.com/the-protocol#the-page-object
9
+ * @see https://github.com/inertiajs/inertia/blob/master/packages/core/types/types.d.ts
10
+ */
11
+ export type InertiaPage = Pick<Page, 'component' | 'url' | 'version' | 'clearHistory' | 'encryptHistory'> & {
12
+ props: Record<string, unknown>;
13
+ deferredProps?: Record<string, string[]>;
14
+ initialDeferredProps?: Record<string, string[]>;
15
+ mergeProps?: string[];
16
+ prependProps?: string[];
17
+ deepMergeProps?: string[];
18
+ matchPropsOn?: string[];
19
+ scrollProps?: Record<string, unknown>;
20
+ flash: Record<string, unknown>;
21
+ onceProps?: Record<string, {
22
+ prop: string;
23
+ expiresAt?: number | null;
24
+ }>;
25
+ rememberedState?: Record<string, unknown>;
26
+ [key: string]: unknown;
27
+ };
28
+ /**
29
+ * Every Inertia DOM event name the capture layer listens for. These are the
30
+ * events from the Inertia 3.x core `GlobalEventsMap`.
31
+ *
32
+ * @see https://inertiajs.com/events
33
+ * @see https://github.com/inertiajs/inertia/blob/master/packages/core/types/events.d.ts
34
+ */
35
+ export declare const INERTIA_DOM_EVENTS: readonly ["inertia:before", "inertia:start", "inertia:progress", "inertia:success", "inertia:error", "inertia:httpException", "inertia:networkError", "inertia:finish", "inertia:cancel", "inertia:beforeUpdate", "inertia:navigate", "inertia:flash", "inertia:prefetching", "inertia:prefetched"];
36
+ /** Union of the Inertia DOM event names in {@link INERTIA_DOM_EVENTS}. */
37
+ export type InertiaEventName = (typeof INERTIA_DOM_EVENTS)[number];
38
+ //# sourceMappingURL=protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAE3C;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,IAAI,EACJ,WAAW,GAAG,KAAK,GAAG,SAAS,GAAG,cAAc,GAAG,gBAAgB,CACpE,GAAG;IACF,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;IACxC,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;IAC/C,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACrC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAAA;IAEvE,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACzC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,qSAerB,CAAA;AAEV,0EAA0E;AAC1E,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { RequestRecord } from '../core/types';
2
+ /** A request row plus its nesting depth for the deferred parent/child view. */
3
+ export interface TreeRow {
4
+ record: RequestRecord;
5
+ depth: number;
6
+ }
7
+ /**
8
+ * Groups a flat request list into a one-level parent/child render list.
9
+ * A record whose `parentVisitId` matches another record in the list nests
10
+ * under that parent at depth 1, placed after it. Records with no parent, or
11
+ * whose parent is not in the list (orphans), render at depth 0. Order is
12
+ * otherwise preserved.
13
+ *
14
+ * @param records - The flat request list, in display order.
15
+ * @returns Ordered rows with a `depth` of 0 (root) or 1 (deferred child).
16
+ */
17
+ export declare function buildTree(records: RequestRecord[]): TreeRow[];
18
+ //# sourceMappingURL=request-tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-tree.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/request-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,+EAA+E;AAC/E,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,aAAa,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAI7D"}
@@ -0,0 +1,39 @@
1
+ import { RequestRecord } from './types';
2
+ /** How a response prop key actually arrived on the wire, for the Response view. */
3
+ export type ResponseArrivalKind = 'full' | 'partial' | 'deferred' | 'merged' | 'prepended' | 'deep-merged';
4
+ /** One prop key the response body actually included, tagged by arrival kind. */
5
+ export interface ResponseEntry {
6
+ key: string;
7
+ value: unknown;
8
+ kind: ResponseArrivalKind;
9
+ }
10
+ /** A key the request's `only` list named but the response body did not include. */
11
+ export interface MissingOnlyEntry {
12
+ key: string;
13
+ }
14
+ /** The Response view's full classification of one request's response. */
15
+ export interface ResponseBreakdown {
16
+ entries: ResponseEntry[];
17
+ missingOnly: MissingOnlyEntry[];
18
+ /** Count of props carried over from the previous page, not part of this response. */
19
+ carriedOverCount: number;
20
+ }
21
+ /**
22
+ * Classifies a request's actual response body into what the Response view
23
+ * shows: each key the response contained (tagged by how it arrived), which
24
+ * `only`-requested keys never showed up, and how many props were carried
25
+ * over from the previous page untouched by this response.
26
+ *
27
+ * Unlike a before/after diff, this never looks at the previous page's props
28
+ * for its main output: `record.responseProps` is the raw wire payload, so a
29
+ * key it doesn't contain genuinely wasn't sent for this request, whether or
30
+ * not the client's merged page still shows it.
31
+ *
32
+ * @param record - The request record. Uses `responseProps` (the parsed wire
33
+ * body), falling back to nothing if the interceptor never captured it.
34
+ * @returns The classified breakdown, or `null` if no response body was
35
+ * captured for this request (for example a cancelled visit, or Inertia's
36
+ * `@internal` interceptor registry wasn't available).
37
+ */
38
+ export declare function classifyResponse(record: RequestRecord): ResponseBreakdown | null;
39
+ //# sourceMappingURL=response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/response.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,mFAAmF;AACnF,MAAM,MAAM,mBAAmB,GAC7B,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,aAAa,CAAA;AAE1E,gFAAgF;AAChF,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,OAAO,CAAA;IACd,IAAI,EAAE,mBAAmB,CAAA;CAC1B;AAED,mFAAmF;AACnF,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,yEAAyE;AACzE,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,aAAa,EAAE,CAAA;IACxB,WAAW,EAAE,gBAAgB,EAAE,CAAA;IAC/B,qFAAqF;IACrF,gBAAgB,EAAE,MAAM,CAAA;CACzB;AAyBD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,aAAa,GACpB,iBAAiB,GAAG,IAAI,CAyB1B"}
@@ -0,0 +1,18 @@
1
+ import { RequestRecord, SessionSnapshot, SessionRequestSummary } from './types';
2
+ /**
3
+ * Converts a full `RequestRecord` to a compact summary.
4
+ */
5
+ export declare function summarizeRequest(req: RequestRecord): SessionRequestSummary;
6
+ /**
7
+ * Saves the current requests to sessionStorage as compact summaries.
8
+ */
9
+ export declare function saveSession(requests: RequestRecord[]): void;
10
+ /**
11
+ * Loads the previous session from sessionStorage; returns null if expired or missing.
12
+ */
13
+ export declare function loadSession(): SessionSnapshot | null;
14
+ /**
15
+ * Clears the persisted session.
16
+ */
17
+ export declare function clearSession(): void;
18
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/session.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAMhB;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,qBAAqB,CAQ1E;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,IAAI,CAK3D;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,eAAe,GAAG,IAAI,CAEpD;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
@@ -0,0 +1,40 @@
1
+ import { InertiaPage, InertiaEventName } from './protocol';
2
+ import { RequestRecord, DevToolsState, SessionRequestSummary } from './types';
3
+ import { NetworkTiming } from './network';
4
+ type Subscriber = (state: DevToolsState) => void;
5
+ /**
6
+ * Central state store for the devtools. Framework-agnostic: exposes a
7
+ * `subscribe()` pattern that any UI can consume.
8
+ */
9
+ export declare class DevToolsStore {
10
+ private correlator;
11
+ private subscribers;
12
+ private nextEventId;
13
+ private tick;
14
+ private _paused;
15
+ private previousSession;
16
+ private saveTimer;
17
+ constructor();
18
+ get requests(): RequestRecord[];
19
+ get currentPage(): InertiaPage | null;
20
+ getRequest(visitId: number): RequestRecord | undefined;
21
+ isInertiaRequestUrl(url: string): boolean;
22
+ get evictedCount(): number;
23
+ get paused(): boolean;
24
+ get previousSessionRequests(): SessionRequestSummary[];
25
+ getState(): DevToolsState;
26
+ captureEvent(name: InertiaEventName, event: Event): void;
27
+ captureNetworkTiming(timing: NetworkTiming): void;
28
+ captureInterceptedRequest(inertiaVisitId: string, headers: Record<string, string>): void;
29
+ captureInterceptedResponse(inertiaVisitId: string, data: {
30
+ headers: Record<string, string>;
31
+ props?: Record<string, unknown>;
32
+ }): void;
33
+ captureClientVisit(method: 'push' | 'replace', page: InertiaPage, previousPage: InertiaPage): void;
34
+ subscribe(fn: Subscriber): () => void;
35
+ setPaused(value: boolean): void;
36
+ clear(): void;
37
+ private notify;
38
+ }
39
+ export {};
40
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/inertia/core/store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAC/D,OAAO,KAAK,EAEV,aAAa,EACb,aAAa,EACb,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAI9C,KAAK,UAAU,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;AAEhD;;;GAGG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,UAAU,CAAY;IAC9B,OAAO,CAAC,WAAW,CAA6B;IAChD,OAAO,CAAC,WAAW,CAAI;IACvB,OAAO,CAAC,IAAI,CAAI;IAChB,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,eAAe,CAAuC;IAC9D,OAAO,CAAC,SAAS,CAA2C;;IAO5D,IAAI,QAAQ,IAAI,aAAa,EAAE,CAO9B;IAED,IAAI,WAAW,IAAI,WAAW,GAAG,IAAI,CAEpC;IAED,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAItD,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIzC,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,IAAI,uBAAuB,IAAI,qBAAqB,EAAE,CAErD;IAED,QAAQ,IAAI,aAAa;IAUzB,YAAY,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAkBxD,oBAAoB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAQjD,yBAAyB,CACvB,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,IAAI;IAQP,0BAA0B,CACxB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GACzE,IAAI;IAQP,kBAAkB,CAChB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,IAAI,EAAE,WAAW,EACjB,YAAY,EAAE,WAAW,GACxB,IAAI;IAQP,SAAS,CAAC,EAAE,EAAE,UAAU,GAAG,MAAM,IAAI;IAOrC,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAK/B,KAAK,IAAI,IAAI;IAQb,OAAO,CAAC,MAAM;CAaf"}