@brett_lamy/ui 5.15.0 → 5.16.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.
Files changed (121) hide show
  1. package/dist/components/call-stack.d.ts +26 -0
  2. package/dist/components/call-stack.d.ts.map +1 -0
  3. package/dist/components/call-stack.js +236 -0
  4. package/dist/components/code-editor-window.d.ts +191 -0
  5. package/dist/components/code-editor-window.d.ts.map +1 -0
  6. package/dist/components/code-editor-window.js +1474 -0
  7. package/dist/components/code-editor.d.ts +213 -0
  8. package/dist/components/code-editor.d.ts.map +1 -0
  9. package/dist/components/code-editor.js +484 -0
  10. package/dist/components/debug-toolbar.d.ts +13 -0
  11. package/dist/components/debug-toolbar.d.ts.map +1 -0
  12. package/dist/components/debug-toolbar.js +85 -0
  13. package/dist/components/file-upload.d.ts +1 -1
  14. package/dist/components/file-upload.d.ts.map +1 -1
  15. package/dist/components/file-upload.js +1 -1
  16. package/dist/components/filter-input.d.ts +1 -1
  17. package/dist/components/filter-input.d.ts.map +1 -1
  18. package/dist/components/filter-input.js +1 -1
  19. package/dist/components/filter.d.ts +1 -1
  20. package/dist/components/filter.d.ts.map +1 -1
  21. package/dist/components/filter.js +1 -1
  22. package/dist/components/log-list.d.ts +95 -0
  23. package/dist/components/log-list.d.ts.map +1 -0
  24. package/dist/components/log-list.js +549 -0
  25. package/dist/components/object-tree.d.ts +30 -0
  26. package/dist/components/object-tree.d.ts.map +1 -0
  27. package/dist/components/object-tree.js +415 -0
  28. package/dist/components/object-value.d.ts +13 -0
  29. package/dist/components/object-value.d.ts.map +1 -0
  30. package/dist/components/object-value.js +69 -0
  31. package/dist/components/request-table.d.ts +78 -0
  32. package/dist/components/request-table.d.ts.map +1 -0
  33. package/dist/components/request-table.js +697 -0
  34. package/dist/components/spreadsheet.d.ts +1 -1
  35. package/dist/components/spreadsheet.d.ts.map +1 -1
  36. package/dist/components/spreadsheet.js +1 -1
  37. package/dist/components/syntax-highlighting.d.ts +45 -77
  38. package/dist/components/syntax-highlighting.d.ts.map +1 -1
  39. package/dist/components/syntax-highlighting.js +36 -275
  40. package/dist/components/terminal.d.ts +62 -0
  41. package/dist/components/terminal.d.ts.map +1 -0
  42. package/dist/components/terminal.js +172 -0
  43. package/dist/components/trace-timeline.d.ts +97 -0
  44. package/dist/components/trace-timeline.d.ts.map +1 -0
  45. package/dist/components/trace-timeline.js +850 -0
  46. package/dist/components/tree.d.ts.map +1 -1
  47. package/dist/components/tree.js +99 -91
  48. package/dist/components/video-preview.d.ts +1 -1
  49. package/dist/components/video-preview.d.ts.map +1 -1
  50. package/dist/components/video-preview.js +1 -1
  51. package/dist/components/video-timeline.d.ts +1 -1
  52. package/dist/components/video-timeline.d.ts.map +1 -1
  53. package/dist/components/video-timeline.js +1 -1
  54. package/dist/components/workspace.d.ts.map +1 -1
  55. package/dist/components/workspace.js +1 -1
  56. package/dist/index.css +1 -1
  57. package/dist/index.d.ts +47 -11
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +120 -100
  60. package/dist/lib/call-stack-model.d.ts +75 -0
  61. package/dist/lib/call-stack-model.d.ts.map +1 -0
  62. package/dist/lib/call-stack-model.js +114 -0
  63. package/dist/lib/code-document.d.ts +229 -0
  64. package/dist/lib/code-document.d.ts.map +1 -0
  65. package/dist/lib/code-document.js +727 -0
  66. package/dist/lib/code-editor-gpu.d.ts +9 -0
  67. package/dist/lib/code-editor-gpu.d.ts.map +1 -0
  68. package/dist/lib/code-editor-gpu.js +23 -0
  69. package/dist/lib/code-editor-model.d.ts +371 -0
  70. package/dist/lib/code-editor-model.d.ts.map +1 -0
  71. package/dist/lib/code-editor-model.js +1105 -0
  72. package/dist/lib/{file-upload.d.ts → file-upload-model.d.ts} +1 -1
  73. package/dist/lib/file-upload-model.d.ts.map +1 -0
  74. package/dist/lib/{file-upload.js → file-upload-model.js} +1 -1
  75. package/dist/lib/{filter.d.ts → filter-model.d.ts} +1 -1
  76. package/dist/lib/filter-model.d.ts.map +1 -0
  77. package/dist/lib/{filter.js → filter-model.js} +1 -1
  78. package/dist/lib/filter-query.d.ts +1 -1
  79. package/dist/lib/filter-query.d.ts.map +1 -1
  80. package/dist/lib/filter-query.js +1 -1
  81. package/dist/lib/log-list-model.d.ts +132 -0
  82. package/dist/lib/log-list-model.d.ts.map +1 -0
  83. package/dist/lib/log-list-model.js +214 -0
  84. package/dist/lib/log-list-window.d.ts +121 -0
  85. package/dist/lib/log-list-window.d.ts.map +1 -0
  86. package/dist/lib/log-list-window.js +245 -0
  87. package/dist/lib/object-tree-model.d.ts +162 -0
  88. package/dist/lib/object-tree-model.d.ts.map +1 -0
  89. package/dist/lib/object-tree-model.js +347 -0
  90. package/dist/lib/object-tree-value.d.ts +139 -0
  91. package/dist/lib/object-tree-value.d.ts.map +1 -0
  92. package/dist/lib/object-tree-value.js +410 -0
  93. package/dist/lib/request-table-model.d.ts +85 -0
  94. package/dist/lib/request-table-model.d.ts.map +1 -0
  95. package/dist/lib/request-table-model.js +105 -0
  96. package/dist/lib/{spreadsheet.d.ts → spreadsheet-model.d.ts} +1 -1
  97. package/dist/lib/spreadsheet-model.d.ts.map +1 -0
  98. package/dist/lib/{spreadsheet.js → spreadsheet-model.js} +1 -1
  99. package/dist/lib/syntax.d.ts +19 -7
  100. package/dist/lib/syntax.d.ts.map +1 -1
  101. package/dist/lib/syntax.js +54 -50
  102. package/dist/lib/terminal-line.d.ts +155 -0
  103. package/dist/lib/terminal-line.d.ts.map +1 -0
  104. package/dist/lib/terminal-line.js +463 -0
  105. package/dist/lib/trace-timeline-draw.d.ts +109 -0
  106. package/dist/lib/trace-timeline-draw.d.ts.map +1 -0
  107. package/dist/lib/trace-timeline-draw.js +252 -0
  108. package/dist/lib/trace-timeline-model.d.ts +324 -0
  109. package/dist/lib/trace-timeline-model.d.ts.map +1 -0
  110. package/dist/lib/trace-timeline-model.js +510 -0
  111. package/dist/lib/video-render.d.ts +1 -1
  112. package/dist/lib/video-render.d.ts.map +1 -1
  113. package/dist/lib/video-render.js +1 -1
  114. package/dist/lib/{video-timeline.d.ts → video-timeline-model.d.ts} +1 -1
  115. package/dist/lib/video-timeline-model.d.ts.map +1 -0
  116. package/dist/lib/{video-timeline.js → video-timeline-model.js} +1 -1
  117. package/package.json +5 -1
  118. package/dist/lib/file-upload.d.ts.map +0 -1
  119. package/dist/lib/filter.d.ts.map +0 -1
  120. package/dist/lib/spreadsheet.d.ts.map +0 -1
  121. package/dist/lib/video-timeline.d.ts.map +0 -1
@@ -184,4 +184,4 @@ export declare function useFileUpload(options?: UseFileUploadOptions): FileUploa
184
184
  * wherever object URLs aren't available (server render, tests without `URL.createObjectURL`).
185
185
  */
186
186
  export declare function useFilePreview(file: Blob | undefined, enabled?: boolean): string | undefined;
187
- //# sourceMappingURL=file-upload.d.ts.map
187
+ //# sourceMappingURL=file-upload-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-upload-model.d.ts","sourceRoot":"","sources":["../../src/lib/file-upload-model.ts"],"names":[],"mappings":"AAGA,OAAO,EAAuC,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAkB3F,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;AAChF,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAEtG,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;IACX,qFAAqF;IACrF,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,mCAAmC;IACnC,GAAG,CAAC,EAAE,MAAM,CA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AED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,4GAA4G;IAC5G,GAAG,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,KAAK;QAAE,KAAK,EAAE,UAAU,EAAE,CAAC;QAAC,QAAQ,EAAE,UAAU,EAAE,CAAA;KAAE,CAAC;IAC7F,kEAAkE;IAClE,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,gEAAgE;IAChE,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,uDAAuD;IACvD,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,0FAA0F;IAC1F,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,6CAA6C;IAC7C,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACnC,sCAAsC;IACtC,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;CACvE;AAID,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,eAAe,CAoLjF;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,EAAE,OAAO,UAAO,GAAG,MAAM,GAAG,SAAS,CAczF"}
@@ -2,7 +2,7 @@
2
2
  import { formatBytes as e } from "./format-bytes.js";
3
3
  import { useCallback as t, useEffect as n, useMemo as r, useRef as i, useState as a } from "react";
4
4
  import { isDirectoryDropItem as o, isFileDropItem as s } from "react-aria-components";
5
- //#region src/lib/file-upload.ts
5
+ //#region src/lib/file-upload-model.ts
6
6
  function c(e) {
7
7
  return e ? (typeof e == "string" ? e.split(",") : e).map((e) => e.trim().toLowerCase()).filter(Boolean) : [];
8
8
  }
@@ -117,4 +117,4 @@ export declare function serializeFilters(filters: readonly Filter[]): string;
117
117
  * field's kind does not offer, or a value of the wrong shape is dropped (never thrown). New ids are generated.
118
118
  */
119
119
  export declare function parseFilters(text: string, schema: readonly FilterField[]): Filter[];
120
- //# sourceMappingURL=filter.d.ts.map
120
+ //# sourceMappingURL=filter-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-model.d.ts","sourceRoot":"","sources":["../../src/lib/filter-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAmBvC,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE3F,MAAM,WAAW,YAAY;IAC3B,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,IAAI,EAAE,UAAU,CAAC;IACjB,+FAA+F;IAC/F,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAID,MAAM,MAAM,cAAc,GACtB,IAAI,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,GAC5C,cAAc,GAAG,cAAc,GAAG,eAAe,GACjD,UAAU,GAAG,cAAc,GAC3B,QAAQ,GAAG,OAAO,GAAG,aAAa,GAClC,IAA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O,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAKnE;AAeD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,EAAE,CA2BnF"}
@@ -1,4 +1,4 @@
1
- //#region src/lib/filter.ts
1
+ //#region src/lib/filter-model.ts
2
2
  var e = {
3
3
  select: [
4
4
  "is",
@@ -1,4 +1,4 @@
1
- import { DateValue, Filter, FilterField, FilterOption } from './filter';
1
+ import { DateValue, Filter, FilterField, FilterOption } from './filter-model';
2
2
  import { Clause, Schema, Weights } from './gpu-query';
3
3
  /** The gpu-query schema for a set of fields, and the way back from a schema name to the field. */
4
4
  export interface QuerySchema {
@@ -1 +1 @@
1
- {"version":3,"file":"filter-query.d.ts","sourceRoot":"","sources":["../../src/lib/filter-query.ts"],"names":[],"mappings":"AAEA,OAAO,EAAgB,KAAK,SAAS,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAuB,KAAK,YAAY,EAAqB,MAAM,cAAc,CAAC;AACtJ,OAAO,EAAwB,KAAK,MAAM,EAAc,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AA8B3G,kGAAkG;AAClG,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CAClC;AAiBD,oIAAoI;AACpI,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,CAwB5E;AAYD,wHAAwH;AACxH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,YAAY,EAAE,GAAG;IAAE,MAAM,CAAC,EAAE,YAAY,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,CAmBzH;AAqBD,iHAAiH;AACjH,wBAAgB,aAAa,CAAC,GAAG,EAAE,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
2
+ import { createFilter as e } from "./filter-model.js";
3
3
  import { stem as t, withinOneEdit as n } from "./gpu-query/schema.js";
4
4
  import { loadModel as r, parseWith as i } from "./gpu-query/index.js";
5
5
  import { useCallback as a, useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
@@ -0,0 +1,132 @@
1
+ import { ReactNode } from 'react';
2
+ export type RowId = string | number;
3
+ export type LogLevel = 'log' | 'info' | 'warn' | 'error' | 'debug';
4
+ /** Most severe first: the order to show level filters in. */
5
+ export declare const LOG_LEVELS: readonly LogLevel[];
6
+ /** A console's level as one of the five: `warning` is `warn`, `assert` is `error`, `trace` is `debug`, and anything
7
+ * else (`group`, a typo) is `log`. */
8
+ export declare function normalizeLogLevel(level: string | undefined): LogLevel;
9
+ export interface LogRow {
10
+ id: RowId;
11
+ /** `log` (default), `info`, `warn`, `error` or `debug`; other console names are mapped by `normalizeLogLevel`. */
12
+ level?: LogLevel | (string & {});
13
+ /** When it was logged, in ms from the start. Rows without one belong with the row before them. */
14
+ time?: number;
15
+ /** Where it came from, like `app.js:42`. */
16
+ source?: ReactNode;
17
+ /** A string, or any node for rich values. Nodes must keep their state outside: a row unmounts when it scrolls away. */
18
+ message: ReactNode;
19
+ /** How many times it repeated, shown as a badge above 1. */
20
+ count?: number;
21
+ /** The row as plain text, for copying. Without one the text is read out of `message`. */
22
+ text?: string;
23
+ /** More to show when the row is expanded, like a stack trace. */
24
+ detail?: ReactNode;
25
+ }
26
+ export type LogLevelCounts = Record<LogLevel | 'total', number>;
27
+ /** How many rows there are of each level. */
28
+ export declare function countLogLevels(rows: readonly Pick<LogRow, 'level'>[]): LogLevelCounts;
29
+ /** `m:ss.mmm`, or `h:mm:ss.mmm` from an hour up. */
30
+ export declare function formatLogTime(ms: number): string;
31
+ /** The text in a node: strings and numbers, through elements' children. A value drawn by a component with no text
32
+ * children has none, which is what a row's `text` is for. */
33
+ export declare function nodeText(node: ReactNode): string;
34
+ /** A row as one piece of text: `0:01.204 [warn] The message (app.js:42)`, then its detail on the lines after. */
35
+ export declare function logRowText(row: LogRow, formatTime?: (ms: number) => string): string;
36
+ /** Every row's height, measured or estimated, in a Fenwick tree over a typed array. Reading a row's offset, finding the
37
+ * row at an offset and changing a height are O(log n); so 100,000 rows have no per-row object, and a measurement
38
+ * doesn't walk the rows above it. Heights of 0 aren't stored: `set` ignores them (a hidden row has no height to learn). */
39
+ export declare class RowHeights {
40
+ count: number;
41
+ estimate: number;
42
+ private capacity;
43
+ private tree;
44
+ private values;
45
+ private known;
46
+ private knownSum;
47
+ private knownCount;
48
+ private sum;
49
+ private top;
50
+ constructor(count?: number, estimate?: number);
51
+ /** Forgets every measurement: all rows are `estimate` tall. */
52
+ reset(count: number, estimate?: number): void;
53
+ /** A longer or shorter list with the same first rows: what's measured stays, new rows are `estimate` tall. */
54
+ resize(count: number): void;
55
+ /** The new estimate for every row not measured yet. O(n), so only when the estimate was well off. */
56
+ rebase(estimate: number): void;
57
+ /** The average of what's been measured, or the estimate before anything has. */
58
+ get average(): number;
59
+ get measured(): number;
60
+ /** The height of all the rows. */
61
+ get total(): number;
62
+ get(index: number): number;
63
+ isMeasured(index: number): boolean;
64
+ /** Records a row's real height. Returns whether anything changed. */
65
+ set(index: number, height: number): boolean;
66
+ /** The top of a row: the height of the rows before it. `offsetOf(count)` is the total. */
67
+ offsetOf(index: number): number;
68
+ /** The row at an offset: the last whose top is at or above it, within 0…count-1 (0 when there are none). */
69
+ indexAt(offset: number): number;
70
+ private add;
71
+ private allocate;
72
+ private rebuild;
73
+ }
74
+ export interface RowRange {
75
+ start: number;
76
+ /** One past the last. */
77
+ end: number;
78
+ }
79
+ /** The rows that touch the view from `top` for `view` px, with `overscan` px more on each side. */
80
+ export declare function rowRange(heights: RowHeights, top: number, view: number, overscan: number): RowRange;
81
+ export type RowsChange = 'same' | 'append' | 'truncate' | 'replace';
82
+ /** What a new `rows` did, read from its ends in O(1): a log growing or being cut back keeps what was measured, and
83
+ * anything else (a filter, a sort) starts over. Compares ids, as a host can rebuild its row objects on every tick. */
84
+ export declare function rowsChange(prev: readonly {
85
+ id: RowId;
86
+ }[], next: readonly {
87
+ id: RowId;
88
+ }[]): RowsChange;
89
+ /** A row's index by id. It reads no further than it has to, and an appended list carries on from where it got to, so a
90
+ * log growing under a selection doesn't rebuild a map of 100,000 ids. */
91
+ export declare class RowIdIndex {
92
+ private rows;
93
+ private map;
94
+ private built;
95
+ update(rows: readonly {
96
+ id: RowId;
97
+ }[], change: RowsChange): void;
98
+ /** The row's index, or -1. */
99
+ indexOf(id: RowId): number;
100
+ }
101
+ /** Finds the first row after a time, on a running maximum of the rows' times: it's sorted whatever order the rows are
102
+ * in, so a late row among earlier ones, or a row with no time, can't throw off the binary search. */
103
+ export declare class RowTimes {
104
+ private rows;
105
+ private peaks;
106
+ private built;
107
+ update(rows: readonly {
108
+ time?: number;
109
+ }[], change: RowsChange): void;
110
+ /** The first row logged after `time`, or the row count when none was. */
111
+ firstAfter(time: number): number;
112
+ }
113
+ export interface FollowInput {
114
+ /** Where the marker is, from the top of the rows. */
115
+ y: number;
116
+ /** The scroll position. */
117
+ top: number;
118
+ /** How much of the rows can be seen. */
119
+ view: number;
120
+ /** The height of all the rows. */
121
+ total: number;
122
+ /** How far in from each edge the marker is kept, as a share of the view. */
123
+ band?: number;
124
+ }
125
+ /** Where to scroll to keep a marker in view. It doesn't scroll while the marker is inside the band; just past it, it
126
+ * moves only as far as it must, so the marker rides the edge of the band and rows go by it; and when the marker has
127
+ * gone somewhere out of sight, a seek, it centers it. */
128
+ export declare function followTop({ y, top, view, total, band }: FollowInput): number;
129
+ /** The row a navigation key moves to from `index` (-1 when none is active yet), or null for any other key.
130
+ * `page` is the row a viewport further on in that direction. */
131
+ export declare function rowKeyTarget(key: string, index: number, count: number, page: (direction: 1 | -1) => number): number | null;
132
+ //# sourceMappingURL=log-list-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-list-model.d.ts","sourceRoot":"","sources":["../../src/lib/log-list-model.ts"],"names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M,CAAC;IACZ,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;0DAE0D;AAC1D,wBAAgB,SAAS,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAW,EAAE,EAAE,WAAW,GAAG,MAAM,CAKnF;AAID;iEACiE;AACjE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,CAY1H"}
@@ -0,0 +1,214 @@
1
+ //#region src/lib/log-list-model.ts
2
+ var e = [
3
+ "error",
4
+ "warn",
5
+ "info",
6
+ "log",
7
+ "debug"
8
+ ];
9
+ function t(e) {
10
+ switch (e?.toLowerCase()) {
11
+ case "warn":
12
+ case "warning": return "warn";
13
+ case "error":
14
+ case "assert": return "error";
15
+ case "info": return "info";
16
+ case "debug":
17
+ case "trace": return "debug";
18
+ default: return "log";
19
+ }
20
+ }
21
+ function n(e) {
22
+ let n = {
23
+ total: e.length,
24
+ error: 0,
25
+ warn: 0,
26
+ info: 0,
27
+ log: 0,
28
+ debug: 0
29
+ };
30
+ for (let r of e) n[t(r.level)]++;
31
+ return n;
32
+ }
33
+ function r(e) {
34
+ if (!Number.isFinite(e)) return "";
35
+ let t = e < 0 ? "-" : "", n = Math.round(Math.abs(e)), r = n % 1e3, i = Math.floor(n / 1e3) % 60, a = Math.floor(n / 6e4) % 60, o = Math.floor(n / 36e5), s = `${String(i).padStart(2, "0")}.${String(r).padStart(3, "0")}`;
36
+ return o ? `${t}${o}:${String(a).padStart(2, "0")}:${s}` : `${t}${a}:${s}`;
37
+ }
38
+ function i(e) {
39
+ return typeof e == "string" ? e : typeof e == "number" || typeof e == "bigint" ? String(e) : !e || typeof e != "object" ? "" : Array.isArray(e) ? e.map(i).join("") : "props" in e ? i(e.props.children) : "";
40
+ }
41
+ function a(e, n = r) {
42
+ let a = e.time === void 0 ? "" : `${n(e.time)} `, o = i(e.source), s = e.detail == null ? "" : `\n${i(e.detail)}`;
43
+ return `${a}[${t(e.level)}] ${e.text ?? i(e.message)}${o ? ` (${o})` : ""}${s}`;
44
+ }
45
+ var o = class {
46
+ count = 0;
47
+ estimate;
48
+ capacity = 0;
49
+ tree = /* @__PURE__ */ new Float64Array(1);
50
+ values = /* @__PURE__ */ new Float32Array();
51
+ known = /* @__PURE__ */ new Uint8Array();
52
+ knownSum = 0;
53
+ knownCount = 0;
54
+ sum = 0;
55
+ top = 1;
56
+ constructor(e = 0, t = 24) {
57
+ this.estimate = t, this.reset(e);
58
+ }
59
+ reset(e, t = this.estimate) {
60
+ this.estimate = t, this.allocate(Math.max(e, this.capacity >= e && this.capacity <= e * 4 ? this.capacity : e)), this.values.fill(0), this.values.fill(t, 0, e), this.known.fill(0), this.knownSum = 0, this.knownCount = 0, this.count = e, this.rebuild();
61
+ }
62
+ resize(e) {
63
+ if (e === this.count) return;
64
+ if (e > this.capacity) {
65
+ let t = this.values, n = this.known;
66
+ this.allocate(Math.max(e, this.capacity * 2)), this.values.set(t), this.known.set(n), this.values.fill(this.estimate, this.count, e), this.count = e, this.rebuild();
67
+ return;
68
+ }
69
+ let t = Math.abs(e - this.count) * 32 < this.capacity;
70
+ for (let n = e; n < this.count; n++) this.known[n] && (this.knownSum -= this.values[n], this.knownCount--, this.known[n] = 0), t && this.add(n, -this.values[n]), this.values[n] = 0;
71
+ for (let n = this.count; n < e; n++) this.values[n] = this.estimate, t && this.add(n, this.values[n]);
72
+ this.count = e, t || this.rebuild();
73
+ }
74
+ rebase(e) {
75
+ this.estimate = e;
76
+ for (let t = 0; t < this.count; t++) this.known[t] || (this.values[t] = e);
77
+ this.rebuild();
78
+ }
79
+ get average() {
80
+ return this.knownCount ? this.knownSum / this.knownCount : this.estimate;
81
+ }
82
+ get measured() {
83
+ return this.knownCount;
84
+ }
85
+ get total() {
86
+ return this.sum;
87
+ }
88
+ get(e) {
89
+ return this.values[e] ?? 0;
90
+ }
91
+ isMeasured(e) {
92
+ return !!this.known[e];
93
+ }
94
+ set(e, t) {
95
+ if (e < 0 || e >= this.count || t <= 0) return !1;
96
+ let n = this.values[e];
97
+ return this.known[e] ? this.knownSum -= n : (this.known[e] = 1, this.knownCount++), this.knownSum += t, n !== t && (this.values[e] = t, this.add(e, this.values[e] - n), !0);
98
+ }
99
+ offsetOf(e) {
100
+ let t = 0;
101
+ for (let n = Math.min(e, this.count); n > 0; n -= n & -n) t += this.tree[n];
102
+ return t;
103
+ }
104
+ indexAt(e) {
105
+ if (e <= 0 || !this.count) return 0;
106
+ let t = 0, n = e;
107
+ for (let e = this.top; e > 0; e >>= 1) {
108
+ let r = t + e;
109
+ r <= this.capacity && this.tree[r] <= n && (t = r, n -= this.tree[r]);
110
+ }
111
+ return Math.min(t, this.count - 1);
112
+ }
113
+ add(e, t) {
114
+ this.sum += t;
115
+ for (let n = e + 1; n <= this.capacity; n += n & -n) this.tree[n] += t;
116
+ }
117
+ allocate(e) {
118
+ if (e === this.capacity && this.values.length) return;
119
+ this.capacity = e, this.values = new Float32Array(e), this.known = new Uint8Array(e), this.tree = new Float64Array(e + 1);
120
+ let t = 1;
121
+ for (; t * 2 <= e;) t *= 2;
122
+ this.top = t;
123
+ }
124
+ rebuild() {
125
+ let { tree: e, values: t, capacity: n } = this;
126
+ e.fill(0);
127
+ let r = 0;
128
+ for (let i = 1; i <= n; i++) {
129
+ r += t[i - 1], e[i] += t[i - 1];
130
+ let a = i + (i & -i);
131
+ a <= n && (e[a] += e[i]);
132
+ }
133
+ this.sum = r;
134
+ }
135
+ };
136
+ function s(e, t, n, r) {
137
+ return e.count ? {
138
+ start: e.indexAt(t - r),
139
+ end: Math.min(e.count, e.indexAt(t + n + r) + 1)
140
+ } : {
141
+ start: 0,
142
+ end: 0
143
+ };
144
+ }
145
+ function c(e, t) {
146
+ if (e === t) return "same";
147
+ if (!e.length) return t.length ? "append" : "same";
148
+ if (!t.length) return "truncate";
149
+ let n = Math.min(e.length, t.length);
150
+ return e[0].id !== t[0].id || e[n - 1].id !== t[n - 1].id ? "replace" : t.length > e.length ? "append" : t.length < e.length ? "truncate" : "same";
151
+ }
152
+ var l = class {
153
+ rows = [];
154
+ map = /* @__PURE__ */ new Map();
155
+ built = 0;
156
+ update(e, t) {
157
+ t === "replace" ? (this.map.clear(), this.built = 0) : t === "truncate" && (this.built = Math.min(this.built, e.length)), this.rows = e;
158
+ }
159
+ indexOf(e) {
160
+ let t = this.map.get(e);
161
+ if (t !== void 0 && this.rows[t]?.id === e) return t;
162
+ for (; this.built < this.rows.length;) {
163
+ let t = this.built++, n = this.rows[t].id;
164
+ if (this.map.set(n, t), n === e) return t;
165
+ }
166
+ return -1;
167
+ }
168
+ }, u = class {
169
+ rows = [];
170
+ peaks = /* @__PURE__ */ new Float64Array();
171
+ built = 0;
172
+ update(e, t) {
173
+ if (t === "replace" ? this.built = 0 : t === "truncate" && (this.built = Math.min(this.built, e.length)), e.length > this.peaks.length) {
174
+ let t = new Float64Array(Math.max(e.length, this.peaks.length * 2));
175
+ t.set(this.peaks.subarray(0, this.built)), this.peaks = t;
176
+ }
177
+ this.rows = e;
178
+ }
179
+ firstAfter(e) {
180
+ let { rows: t, peaks: n } = this, r = this.built ? n[this.built - 1] : -Infinity;
181
+ for (let e = this.built; e < t.length; e++) {
182
+ let i = t[e].time;
183
+ i !== void 0 && i > r && (r = i), n[e] = r;
184
+ }
185
+ this.built = t.length;
186
+ let i = 0, a = t.length;
187
+ for (; i < a;) {
188
+ let t = i + a >> 1;
189
+ n[t] > e ? a = t : i = t + 1;
190
+ }
191
+ return i;
192
+ }
193
+ };
194
+ function d({ y: e, top: t, view: n, total: r, band: i = .15 }) {
195
+ let a = n * i;
196
+ if (e >= t + a && e <= t + n - a) return t;
197
+ let o = e < t - n || e > t + 2 * n ? e - n / 2 : e < t + a ? e - a : e - n + a;
198
+ return Math.max(0, Math.min(Math.max(0, r - n), o));
199
+ }
200
+ function f(e, t, n, r) {
201
+ if (!n) return null;
202
+ let i = n - 1;
203
+ switch (e) {
204
+ case "ArrowDown": return Math.min(i, t + 1);
205
+ case "ArrowUp": return t < 0 ? 0 : Math.max(0, t - 1);
206
+ case "Home": return 0;
207
+ case "End": return i;
208
+ case "PageDown": return Math.min(i, Math.max(t + 1, r(1)));
209
+ case "PageUp": return Math.max(0, Math.min(t < 0 ? 0 : t - 1, r(-1)));
210
+ default: return null;
211
+ }
212
+ }
213
+ //#endregion
214
+ export { e as LOG_LEVELS, o as RowHeights, l as RowIdIndex, u as RowTimes, n as countLogLevels, d as followTop, r as formatLogTime, a as logRowText, i as nodeText, t as normalizeLogLevel, f as rowKeyTarget, s as rowRange, c as rowsChange };
@@ -0,0 +1,121 @@
1
+ import { KeyboardEvent } from 'react';
2
+ import { RowHeights, RowIdIndex, RowId, RowRange } from './log-list-model';
3
+ /** Whether a click on a row is a press of the row: not one on a control inside it, or the end of a drag to select text. */
4
+ export declare function isRowPress(e: {
5
+ target: EventTarget;
6
+ currentTarget: EventTarget;
7
+ }): boolean;
8
+ /** The elements inside `root` that Tab stops on. */
9
+ export declare function tabbablesIn(root: Element): HTMLElement[];
10
+ /** A grid is one tab stop: Tab goes through the active row's own controls and then out of the grid, rather than through
11
+ * every mounted row's. `e.currentTarget` is the grid, the element with the keydown handler and the tab stop. */
12
+ export declare function tabThroughGrid(e: KeyboardEvent<HTMLElement>, activeRow: HTMLElement | undefined): void;
13
+ /** Where in the view `scrollToIndex` puts a row. `nearest` moves only if it's out of view. */
14
+ export type RowAlign = 'start' | 'center' | 'end' | 'nearest';
15
+ /** How a range change renders. `sync`: right now, in a browser event of ours. `micro`: as soon as the caller is done, for
16
+ * a public method a host may call from anywhere, an effect included, where `flushSync` isn't allowed. `effect`: left to
17
+ * the commit that's running, in a layout effect, where a state update flushes before paint anyway. */
18
+ export type RowFlush = 'sync' | 'micro' | 'effect';
19
+ export interface RowWindowOptions {
20
+ /** A row's height until it's measured. */
21
+ estimate: number;
22
+ /** Px of rows mounted beyond the view on each side. */
23
+ overscan?: number;
24
+ /** Measure rows. Off, every row is `estimate` tall: nothing is read from the DOM. */
25
+ measure?: boolean;
26
+ }
27
+ export declare class RowWindow<T extends {
28
+ id: RowId;
29
+ } = {
30
+ id: RowId;
31
+ }> {
32
+ readonly heights: RowHeights;
33
+ readonly ids: RowIdIndex;
34
+ rows: readonly T[];
35
+ range: RowRange;
36
+ overscan: number;
37
+ measure: boolean;
38
+ /** Px of the scroller's view hidden under something sticky, like a header. */
39
+ insetTop: number;
40
+ /** The part's setter for the rows to render. */
41
+ onRange: (range: RowRange) => void;
42
+ /** Heights or places changed, so anything placed by a row's offset should move too. */
43
+ onLayout: () => void;
44
+ /** The scroll position changed. `byUser` is false for this class's own scrolling. */
45
+ onScroll: (byUser: boolean) => void;
46
+ /** The view's width changed, with the old width. */
47
+ onWidth: (width: number, before: number) => void;
48
+ /** Applies what the part sets imperatively on a row. Called for each row as it mounts or moves to a new index. */
49
+ decorate: ((el: HTMLElement, index: number) => void) | null;
50
+ private scroller;
51
+ private sizer;
52
+ private mounted;
53
+ private placed;
54
+ private observer;
55
+ private observed;
56
+ private top;
57
+ private expected;
58
+ private viewHeight;
59
+ private viewWidth;
60
+ private drawnTotal;
61
+ private pin;
62
+ private pinFrame;
63
+ private frame;
64
+ private hidden;
65
+ constructor({ estimate, overscan, measure }: RowWindowOptions);
66
+ /** The scroll position. */
67
+ get scrollTop(): number;
68
+ /** How much of the rows can be seen. */
69
+ get view(): number;
70
+ /** The scroller's own height, header included. */
71
+ get height(): number;
72
+ /** The last scroll position there is, with whatever comes after the rows. */
73
+ get endTop(): number;
74
+ /** The mounted row at an index. */
75
+ elementAt(index: number): HTMLElement | undefined;
76
+ /** Every mounted row. */
77
+ get elements(): ReadonlyMap<number, HTMLElement>;
78
+ /** A row's index in `rows`, for a render: the render that brings new rows is ahead of this window, which hears of them
79
+ * in its layout effect, so it looks through them itself. */
80
+ indexIn(rows: readonly T[], id: RowId): number;
81
+ /** The row an element is in, or -1. */
82
+ indexFrom(target: EventTarget | null): number;
83
+ /** Whether a row can be seen, even in part. */
84
+ isVisible(index: number): boolean;
85
+ /** Starts on a scroller and the sizer inside it, whose direct children are the rows. Returns the undo. */
86
+ attach(scroller: HTMLElement, sizer: HTMLElement): () => void;
87
+ /** The part's new `rows`, in a layout effect. A log that grew or was cut back keeps its measurements. Anything else
88
+ * starts over, with the scroll position kept on the row at the top of the view (or the next that survived). */
89
+ setRows(next: readonly T[]): void;
90
+ /** Every row is now this tall, keeping the row at the top of the view there. For a part with no measuring. */
91
+ setFixedHeight(height: number): void;
92
+ /** Forgets every measured height, as they no longer hold (the layout changed), keeping the top row where it is. */
93
+ invalidate(): void;
94
+ /** After each commit of the part, in a layout effect: finds the rows, measures them and puts them in place. */
95
+ sync(): void;
96
+ /** Runs `decorate` again on every mounted row. */
97
+ decorateAll(): void;
98
+ /** Scrolls a row into view. It holds that place while the rows around it get measured, until the user scrolls. */
99
+ scrollToIndex(index: number, align?: RowAlign, flush?: RowFlush): void;
100
+ /** Scrolls to wherever `target` says, and goes back there if heights change as the rows around it mount: for the next
101
+ * two frames, or until the user scrolls. After that a change of height holds the row at the top of the view, like any
102
+ * other. It's counted in frames and not in time, as a busy machine must still land in the same place. */
103
+ scrollWith(target: () => number, flush?: RowFlush): void;
104
+ /** Scrolls sideways (the part's own keyboard, as a grid has no column of its own to focus). */
105
+ scrollLeftBy(delta: number): void;
106
+ private topFor;
107
+ private anchor;
108
+ private setTop;
109
+ /** Takes the position from the scroller (the browser clamps it, and a shorter list can move it) as its own doing. */
110
+ private readTop;
111
+ private readView;
112
+ private drawTotal;
113
+ private place;
114
+ /** After heights changed: a better estimate if this one was well off, and the view back on the row it was on. */
115
+ private settle;
116
+ /** Asks for a new range once what's mounted no longer reaches half the overscan past the view. */
117
+ private refreshRange;
118
+ private handleScroll;
119
+ private handleResize;
120
+ }
121
+ //# sourceMappingURL=log-list-window.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log-list-window.d.ts","sourceRoot":"","sources":["../../src/lib/log-list-window.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EACL,UAAU,EAAE,UAAU,EAAwB,KAAK,KAAK,EAAE,KAAK,QAAQ,EACxE,MAAM,sBAAsB,CAAC;AAqB9B,2HAA2H;AAC3H,wBAAgB,UAAU,CAAC,CAAC,EAAE;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,aAAa,EAAE,WAAW,CAAA;CAAE,GAAG,OAAO,CAI1F;AAED,oDAAoD;AACpD,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,EAAE,CAGxD;AAED;iHACiH;AACjH,wBAAgB,cAAc,CAAC,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,EAAE,SAAS,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI,CAiBtG;AAID,8FAA8F;AAC9F,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAE9D;;uGAEuG;AACvG,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEnD,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,SAAS,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE;IAC5D,QAAQ,CAAC,OAAO,EAAE,U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