@overdoser/react-toolkit 0.12.0 → 0.13.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/AGENTS.md +1 -1
- package/CHANGELOG.md +41 -0
- package/components/Timeline/TraceEventDetails.d.ts +92 -0
- package/components/Timeline/TraceEventDetails.js +181 -0
- package/components/Timeline/TraceTimeline.d.ts +24 -47
- package/components/Timeline/TraceTimeline.js +516 -553
- package/components/Timeline/TraceTimeline.module.scss.js +164 -150
- package/components/Timeline/demoData.d.ts +14 -0
- package/components/Timeline/index.d.ts +5 -1
- package/components/Timeline/timelineCore.d.ts +3 -2
- package/components/Timeline/timelineCore.js +41 -36
- package/components/Timeline/traceEvent.d.ts +128 -0
- package/components/Timeline/traceEvent.js +64 -0
- package/index.css +1 -1
- package/index.d.ts +2 -2
- package/index.js +61 -55
- package/index.layered.css +1 -1
- package/llms.txt +31 -3
- package/manifest.json +50 -2
- package/package.json +1 -1
|
@@ -1,175 +1,189 @@
|
|
|
1
|
-
const
|
|
2
|
-
scroller:
|
|
1
|
+
const o = "crk-scroller-kwWVy", c = "crk-inner-vJ0BK", r = "crk-gridline-pcX-9", e = "crk-nowLine-05lmp", a = "crk-cursorLine-k7KZo", t = "crk-eventLine-znElH", s = "crk-axis--LqeF", i = "crk-axisDivider-gBKss", n = "crk-axisSticky-J-rsF", l = "crk-axisUtc-ySg72", d = "crk-axisViewDate-oRqHL", k = "crk-axisViewTime-bL50a", g = "crk-axisTickLabel-9V7QB", p = "crk-axisDateLabel-QPPf7", y = "crk-axisTickMark-HGAZI", w = "crk-axisSubLabel-mmUpt", h = "crk-axisMinorMark-LmQdS", x = "crk-axisMinorMedium-yyNB-", b = "crk-axisChip-Xr9r0", u = "crk-axisChipEvent-K9r-4", L = "crk-lane-hvtL1", m = "crk-axisLine-ZRK0p", P = "crk-bar-pqjsX", v = "crk-barPending-NsYu7", f = "crk-barDot-ZtYdm", S = "crk-stem-24Ud2", C = "crk-elbow-nQxQZ", T = "crk-chip-vC8yf", B = "crk-chipArrow-pyTpt", E = "crk-chipBadge-Tz11H", H = "crk-chipOp-qkIIM", M = "crk-chipTime-IoXbi", D = "crk-drawerCustom-w5gWa", F = "crk-drawerHead-mfyc3", V = "crk-drawerHeadRow-w-lfX", R = "crk-methodBadge-lfL4x", A = "crk-statusBadge-XiUl9", K = "crk-statusPending-Yg9At", I = "crk-statusError-G7XH8", Q = "crk-statusWarn-iYFhY", G = "crk-drawerRoute-L-hK0", N = "crk-drawerSpacer-f6nIh", X = "crk-fieldList-AvAgH", O = "crk-field-4QFFP", U = "crk-headFields-eHFIf", Z = "crk-bodyHead-IAsVD", q = "crk-fieldLabel-GVRma", J = "crk-fieldValue-OzPQ8", W = "crk-fieldMono-pdJaC", z = "crk-fieldPre-2nolU", Y = "crk-emptyNote-VTNmM", j = "crk-drawerBody-Cx5-E", _ = "crk-drawerSection-Zjpm1", $ = "crk-kvRow-DXfXI", oo = "crk-kvKey-MmSqV", co = "crk-kvKeyQuery-0hpds", ro = "crk-kvVal-PlEQT", eo = "crk-awaiting-FNO2u", ao = "crk-awaitingDot-b4OtX", to = "crk-dockCol-4dgEp", so = "crk-dockColResizer-qUAce", io = "crk-cardFlushRight-QGTEx", no = "crk-dockAside-Q-I1l", lo = "crk-dockHead-kyJbl", ko = "crk-dockTitle-aZfap", go = "crk-dockCount-sTZG3", po = "crk-dockScroll-EbMO5", yo = "crk-dockEmpty-4I13b", wo = "crk-bodyLabel-QeGYK", ho = "crk-payloadCopy-5FM-J", xo = "crk-logEntry-eASJr", bo = "crk-copyStop-aE-Th", uo = "crk-logBody-X2Ftb", Lo = "crk-logEntrySelected-AdHlH", mo = "crk-logEntryFlash-26ElD", Po = "crk-logTop-48t09", vo = "crk-logNum-1-eb7", fo = "crk-badgeSm-vw04n", So = "crk-logPair-i-P-t", Co = "crk-logClock-mrTdy", To = "crk-logOp-qfkTp", Bo = "crk-logPath-eHd2Z", Eo = "crk-logMessage-t7B7v", Ho = "crk-logFields-newk5", Mo = "crk-logPayloadHead-jKUKx", Do = "crk-logPayloadLabel-wteWa", Fo = "crk-logPre-8h-ke", Vo = "crk-rail-IIJaP", Ro = "crk-railBtn-WNtG7", Ao = "crk-railBtnActive-HnV74", Ko = "crk-railGlyphDetails-h8Ip-", Io = "crk-railGlyphLog-auInm", Qo = {
|
|
2
|
+
scroller: o,
|
|
3
3
|
inner: c,
|
|
4
|
-
gridline:
|
|
5
|
-
nowLine:
|
|
6
|
-
cursorLine:
|
|
4
|
+
gridline: r,
|
|
5
|
+
nowLine: e,
|
|
6
|
+
cursorLine: a,
|
|
7
7
|
eventLine: t,
|
|
8
|
-
axis:
|
|
9
|
-
axisDivider:
|
|
8
|
+
axis: s,
|
|
9
|
+
axisDivider: i,
|
|
10
10
|
axisSticky: n,
|
|
11
|
-
axisUtc:
|
|
12
|
-
axisViewDate:
|
|
11
|
+
axisUtc: l,
|
|
12
|
+
axisViewDate: d,
|
|
13
13
|
axisViewTime: k,
|
|
14
14
|
axisTickLabel: g,
|
|
15
15
|
axisDateLabel: p,
|
|
16
16
|
axisTickMark: y,
|
|
17
17
|
axisSubLabel: w,
|
|
18
|
-
axisMinorMark:
|
|
19
|
-
axisMinorMedium:
|
|
18
|
+
axisMinorMark: h,
|
|
19
|
+
axisMinorMedium: x,
|
|
20
20
|
axisChip: b,
|
|
21
|
-
axisChipEvent:
|
|
22
|
-
lane:
|
|
23
|
-
axisLine:
|
|
24
|
-
bar:
|
|
25
|
-
barPending:
|
|
26
|
-
barDot:
|
|
27
|
-
stem:
|
|
28
|
-
elbow:
|
|
29
|
-
chip:
|
|
21
|
+
axisChipEvent: u,
|
|
22
|
+
lane: L,
|
|
23
|
+
axisLine: m,
|
|
24
|
+
bar: P,
|
|
25
|
+
barPending: v,
|
|
26
|
+
barDot: f,
|
|
27
|
+
stem: S,
|
|
28
|
+
elbow: C,
|
|
29
|
+
chip: T,
|
|
30
30
|
chipArrow: B,
|
|
31
|
-
chipBadge:
|
|
32
|
-
chipOp:
|
|
33
|
-
chipTime:
|
|
34
|
-
drawerCustom:
|
|
35
|
-
drawerHead:
|
|
36
|
-
drawerHeadRow:
|
|
37
|
-
methodBadge:
|
|
38
|
-
statusBadge:
|
|
39
|
-
statusPending:
|
|
31
|
+
chipBadge: E,
|
|
32
|
+
chipOp: H,
|
|
33
|
+
chipTime: M,
|
|
34
|
+
drawerCustom: D,
|
|
35
|
+
drawerHead: F,
|
|
36
|
+
drawerHeadRow: V,
|
|
37
|
+
methodBadge: R,
|
|
38
|
+
statusBadge: A,
|
|
39
|
+
statusPending: K,
|
|
40
40
|
statusError: I,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
41
|
+
statusWarn: Q,
|
|
42
|
+
drawerRoute: G,
|
|
43
|
+
drawerSpacer: N,
|
|
44
|
+
fieldList: X,
|
|
45
|
+
field: O,
|
|
46
|
+
headFields: U,
|
|
47
|
+
bodyHead: Z,
|
|
48
|
+
fieldLabel: q,
|
|
49
|
+
fieldValue: J,
|
|
50
|
+
fieldMono: W,
|
|
51
|
+
fieldPre: z,
|
|
52
|
+
emptyNote: Y,
|
|
53
|
+
drawerBody: j,
|
|
54
|
+
drawerSection: _,
|
|
55
|
+
kvRow: $,
|
|
56
|
+
kvKey: oo,
|
|
57
|
+
kvKeyQuery: co,
|
|
58
|
+
kvVal: ro,
|
|
59
|
+
awaiting: eo,
|
|
60
|
+
awaitingDot: ao,
|
|
61
|
+
dockCol: to,
|
|
62
|
+
dockColResizer: so,
|
|
63
|
+
cardFlushRight: io,
|
|
64
|
+
dockAside: no,
|
|
65
|
+
dockHead: lo,
|
|
66
|
+
dockTitle: ko,
|
|
67
|
+
dockCount: go,
|
|
68
|
+
dockScroll: po,
|
|
69
|
+
dockEmpty: yo,
|
|
70
|
+
bodyLabel: wo,
|
|
71
|
+
payloadCopy: ho,
|
|
72
|
+
logEntry: xo,
|
|
73
|
+
copyStop: bo,
|
|
74
|
+
logBody: uo,
|
|
75
|
+
logEntrySelected: Lo,
|
|
76
|
+
logEntryFlash: mo,
|
|
77
|
+
logTop: Po,
|
|
78
|
+
logNum: vo,
|
|
79
|
+
badgeSm: fo,
|
|
80
|
+
logPair: So,
|
|
81
|
+
logClock: Co,
|
|
82
|
+
logOp: To,
|
|
83
|
+
logPath: Bo,
|
|
84
|
+
logMessage: Eo,
|
|
85
|
+
logFields: Ho,
|
|
86
|
+
logPayloadHead: Mo,
|
|
87
|
+
logPayloadLabel: Do,
|
|
88
|
+
logPre: Fo,
|
|
89
|
+
rail: Vo,
|
|
90
|
+
railBtn: Ro,
|
|
91
|
+
railBtnActive: Ao,
|
|
92
|
+
railGlyphDetails: Ko,
|
|
93
|
+
railGlyphLog: Io
|
|
87
94
|
};
|
|
88
95
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
96
|
+
eo as awaiting,
|
|
97
|
+
ao as awaitingDot,
|
|
98
|
+
s as axis,
|
|
92
99
|
b as axisChip,
|
|
93
|
-
|
|
100
|
+
u as axisChipEvent,
|
|
94
101
|
p as axisDateLabel,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
102
|
+
i as axisDivider,
|
|
103
|
+
m as axisLine,
|
|
104
|
+
h as axisMinorMark,
|
|
105
|
+
x as axisMinorMedium,
|
|
99
106
|
n as axisSticky,
|
|
100
107
|
w as axisSubLabel,
|
|
101
108
|
g as axisTickLabel,
|
|
102
109
|
y as axisTickMark,
|
|
103
|
-
|
|
104
|
-
|
|
110
|
+
l as axisUtc,
|
|
111
|
+
d as axisViewDate,
|
|
105
112
|
k as axisViewTime,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
fo as badgeSm,
|
|
114
|
+
P as bar,
|
|
115
|
+
f as barDot,
|
|
116
|
+
v as barPending,
|
|
117
|
+
Z as bodyHead,
|
|
118
|
+
wo as bodyLabel,
|
|
119
|
+
io as cardFlushRight,
|
|
120
|
+
T as chip,
|
|
114
121
|
B as chipArrow,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
Q as drawerUrl,
|
|
139
|
-
f as drawerXrid,
|
|
140
|
-
E as elbow,
|
|
122
|
+
E as chipBadge,
|
|
123
|
+
H as chipOp,
|
|
124
|
+
M as chipTime,
|
|
125
|
+
bo as copyStop,
|
|
126
|
+
a as cursorLine,
|
|
127
|
+
Qo as default,
|
|
128
|
+
no as dockAside,
|
|
129
|
+
to as dockCol,
|
|
130
|
+
so as dockColResizer,
|
|
131
|
+
go as dockCount,
|
|
132
|
+
yo as dockEmpty,
|
|
133
|
+
lo as dockHead,
|
|
134
|
+
po as dockScroll,
|
|
135
|
+
ko as dockTitle,
|
|
136
|
+
j as drawerBody,
|
|
137
|
+
D as drawerCustom,
|
|
138
|
+
F as drawerHead,
|
|
139
|
+
V as drawerHeadRow,
|
|
140
|
+
G as drawerRoute,
|
|
141
|
+
_ as drawerSection,
|
|
142
|
+
N as drawerSpacer,
|
|
143
|
+
C as elbow,
|
|
144
|
+
Y as emptyNote,
|
|
141
145
|
t as eventLine,
|
|
142
|
-
|
|
146
|
+
O as field,
|
|
147
|
+
q as fieldLabel,
|
|
148
|
+
X as fieldList,
|
|
149
|
+
W as fieldMono,
|
|
150
|
+
z as fieldPre,
|
|
151
|
+
J as fieldValue,
|
|
152
|
+
r as gridline,
|
|
153
|
+
U as headFields,
|
|
143
154
|
c as inner,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
155
|
+
oo as kvKey,
|
|
156
|
+
co as kvKeyQuery,
|
|
157
|
+
$ as kvRow,
|
|
158
|
+
ro as kvVal,
|
|
159
|
+
L as lane,
|
|
160
|
+
uo as logBody,
|
|
161
|
+
Co as logClock,
|
|
162
|
+
xo as logEntry,
|
|
163
|
+
mo as logEntryFlash,
|
|
164
|
+
Lo as logEntrySelected,
|
|
165
|
+
Ho as logFields,
|
|
166
|
+
Eo as logMessage,
|
|
167
|
+
vo as logNum,
|
|
168
|
+
To as logOp,
|
|
169
|
+
So as logPair,
|
|
170
|
+
Bo as logPath,
|
|
171
|
+
Mo as logPayloadHead,
|
|
172
|
+
Do as logPayloadLabel,
|
|
173
|
+
Fo as logPre,
|
|
174
|
+
Po as logTop,
|
|
175
|
+
R as methodBadge,
|
|
176
|
+
e as nowLine,
|
|
177
|
+
ho as payloadCopy,
|
|
178
|
+
Vo as rail,
|
|
179
|
+
Ro as railBtn,
|
|
180
|
+
Ao as railBtnActive,
|
|
181
|
+
Ko as railGlyphDetails,
|
|
182
|
+
Io as railGlyphLog,
|
|
183
|
+
o as scroller,
|
|
184
|
+
A as statusBadge,
|
|
172
185
|
I as statusError,
|
|
173
|
-
|
|
174
|
-
|
|
186
|
+
K as statusPending,
|
|
187
|
+
Q as statusWarn,
|
|
188
|
+
S as stem
|
|
175
189
|
};
|
|
@@ -9,6 +9,20 @@ export interface DemoManifest {
|
|
|
9
9
|
events: TraceTimelineEvent[];
|
|
10
10
|
}
|
|
11
11
|
export declare function sampleManifests(): DemoManifest[];
|
|
12
|
+
export interface DemoTrace {
|
|
13
|
+
title: string;
|
|
14
|
+
services: string[];
|
|
15
|
+
events: TraceTimelineEvent[];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Order lifecycle: no HTTP anywhere — every entry is a domain event carrying
|
|
19
|
+
* a message, and some a payload, a level or extra labeled fields.
|
|
20
|
+
*/
|
|
21
|
+
export declare function plainEventTrace(): DemoTrace;
|
|
22
|
+
/** The minimal case: events that carry nothing but a `payload`. */
|
|
23
|
+
export declare function payloadOnlyTrace(): DemoTrace;
|
|
24
|
+
/** Requests and domain events on the same band. */
|
|
25
|
+
export declare function mixedTrace(): DemoTrace;
|
|
12
26
|
export interface SimStep {
|
|
13
27
|
at: number;
|
|
14
28
|
ev: Record<string, unknown>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export type { TimelineSummaryPlacement } from './TimelineShared';
|
|
2
2
|
export type { TimelineWheelZoom } from './useTimeline';
|
|
3
3
|
export { TraceTimeline } from './TraceTimeline';
|
|
4
|
-
export type { TraceTimelineProps, TraceTimelineEvent, TraceTimelineClasses, TraceTimelineDock, TraceTimelineItemContext, } from './TraceTimeline';
|
|
4
|
+
export type { TraceTimelineProps, TraceTimelineEvent, TraceTimelineField, TraceTimelineLevel, TraceTimelineClasses, TraceTimelineDock, TraceTimelineItemContext, } from './TraceTimeline';
|
|
5
|
+
export { TraceEventDetails } from './TraceEventDetails';
|
|
6
|
+
export type { TraceEventDetailsProps, TraceEventDetailsClasses } from './TraceEventDetails';
|
|
7
|
+
export { isRequestEvent, badgeOf, extraFieldsOf } from './traceEvent';
|
|
8
|
+
export type { TraceBadgeTone } from './traceEvent';
|
|
5
9
|
export { HistoryTimeline } from './HistoryTimeline';
|
|
6
10
|
export type { HistoryTimelineProps, HistoryTimelineEvent, HistoryTimelineClasses, HistoryTimelineOrientation, HistoryTimelineSpacing, HistoryTimelineItemContext, } from './HistoryTimeline';
|
|
7
11
|
export { GanttTimeline } from './GanttTimeline';
|
|
@@ -62,9 +62,10 @@ export interface HighlightPart {
|
|
|
62
62
|
export declare function highlightParts(text: unknown, q: string | undefined): HighlightPart[];
|
|
63
63
|
/**
|
|
64
64
|
* Keyword match: case-insensitive AND over whitespace-separated tokens against
|
|
65
|
-
* the JSON serialization of the event.
|
|
65
|
+
* the JSON serialization of the event. Top-level keys in `omit` are excluded
|
|
66
|
+
* from the haystack (hidden plumbing fields shouldn't attract highlights).
|
|
66
67
|
*/
|
|
67
|
-
export declare function eventMatches(ev: unknown, q: string | undefined): boolean;
|
|
68
|
+
export declare function eventMatches(ev: unknown, q: string | undefined, omit?: readonly string[]): boolean;
|
|
68
69
|
/**
|
|
69
70
|
* Fuzzy score for pickers: each token scores by substring position (best) or
|
|
70
71
|
* character subsequence (weak); a token that matches neither zeroes the score.
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
const O = 1e3, U = 6e4, N = 36e5, S = 864e5,
|
|
1
|
+
const O = 1e3, U = 6e4, N = 36e5, S = 864e5, l = (t) => String(t).padStart(2, "0"), A = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
2
2
|
function u(t, e) {
|
|
3
3
|
const n = new Date(t);
|
|
4
|
-
return
|
|
4
|
+
return l(n.getHours()) + ":" + l(n.getMinutes()) + ":" + l(n.getSeconds()) + (e ? "." + String(n.getMilliseconds()).padStart(3, "0") : "");
|
|
5
5
|
}
|
|
6
6
|
function s(t) {
|
|
7
7
|
const e = new Date(t);
|
|
8
8
|
return A[e.getMonth()] + " " + e.getDate();
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function d(t) {
|
|
11
11
|
const e = new Date(t).getFullYear(), n = e !== (/* @__PURE__ */ new Date()).getFullYear();
|
|
12
12
|
return n && Date.now() - t > 2 * 365 * 864e5 ? s(t) + " " + e : s(t) + (n ? " " + e : "") + " · " + u(t);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function h(t, e) {
|
|
15
15
|
const n = new Date(t);
|
|
16
|
-
return
|
|
16
|
+
return l(n.getUTCHours()) + ":" + l(n.getUTCMinutes()) + ":" + l(n.getUTCSeconds()) + (e ? "." + String(n.getUTCMilliseconds()).padStart(3, "0") : "");
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Y(t) {
|
|
19
19
|
const e = new Date(t);
|
|
20
|
-
return e.getUTCFullYear() + "-" +
|
|
20
|
+
return e.getUTCFullYear() + "-" + l(e.getUTCMonth() + 1) + "-" + l(e.getUTCDate());
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
return
|
|
22
|
+
function g(t, e) {
|
|
23
|
+
return Y(t) + "T" + h(t, e) + "Z";
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function C(t) {
|
|
26
26
|
return t == null ? "" : t < 1e3 ? Math.round(t) + "ms" : t < 6e4 ? (t / 1e3).toFixed(t < 10 * 1e3 ? 1 : 0) + "s" : t < 36e5 ? Math.floor(t / 6e4) + "m " + Math.round(t % 6e4 / 1e3) + "s" : t < 2 * 864e5 ? Math.floor(t / 36e5) + "h " + Math.round(t % 36e5 / 6e4) + "m" : t < 365 * 864e5 ? (t / 864e5).toFixed(1) + "d" : (t / (365.25 * 864e5)).toFixed(t < 3650 * 864e5 ? 1 : 0) + "y";
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const D = [
|
|
29
29
|
1,
|
|
30
30
|
2,
|
|
31
31
|
5,
|
|
@@ -112,42 +112,47 @@ const l = [
|
|
|
112
112
|
[91311 * 864e5, [5, 0]],
|
|
113
113
|
[182625 * 864e5, [5, 0]]
|
|
114
114
|
]);
|
|
115
|
-
function
|
|
115
|
+
function M(t) {
|
|
116
116
|
const e = E.get(t) || [4, 0];
|
|
117
117
|
return { parts: e[0], medium: e[1] };
|
|
118
118
|
}
|
|
119
|
-
function T(t, e, n,
|
|
120
|
-
|
|
121
|
-
const
|
|
119
|
+
function T(t, e, n, o) {
|
|
120
|
+
o = o || 88;
|
|
121
|
+
const a = Math.max(1, e - t), r = D.find((f) => f / a * n >= o) || D[D.length - 1], c = [];
|
|
122
122
|
let i = Math.ceil(t / r) * r;
|
|
123
123
|
for (; i <= e; i += r)
|
|
124
|
-
|
|
125
|
-
return { step: r, list:
|
|
124
|
+
c.push({ t: i, label: r >= 864e5 ? s(i) : u(i, r < 1e3) });
|
|
125
|
+
return { step: r, list: c };
|
|
126
126
|
}
|
|
127
127
|
function I(t, e) {
|
|
128
128
|
const n = String(t ?? "");
|
|
129
129
|
if (e = (e || "").trim(), !e) return [{ t: n, hit: !1 }];
|
|
130
|
-
const
|
|
131
|
-
let
|
|
130
|
+
const o = e.toLowerCase(), a = n.toLowerCase(), r = [];
|
|
131
|
+
let c = 0;
|
|
132
132
|
for (; ; ) {
|
|
133
|
-
const i =
|
|
133
|
+
const i = a.indexOf(o, c);
|
|
134
134
|
if (i < 0) {
|
|
135
|
-
|
|
135
|
+
c < n.length && r.push({ t: n.slice(c), hit: !1 });
|
|
136
136
|
break;
|
|
137
137
|
}
|
|
138
|
-
i >
|
|
138
|
+
i > c && r.push({ t: n.slice(c, i), hit: !1 }), r.push({ t: n.slice(i, i + e.length), hit: !0 }), c = i + e.length;
|
|
139
139
|
}
|
|
140
140
|
return r.length ? r : [{ t: n, hit: !1 }];
|
|
141
141
|
}
|
|
142
|
-
function k(t, e) {
|
|
142
|
+
function k(t, e, n) {
|
|
143
143
|
if (e = (e || "").trim(), !e) return !0;
|
|
144
|
-
|
|
144
|
+
if (n?.length && t !== null && typeof t == "object" && !Array.isArray(t)) {
|
|
145
|
+
const a = { ...t };
|
|
146
|
+
for (const r of n) delete a[r];
|
|
147
|
+
t = a;
|
|
148
|
+
}
|
|
149
|
+
let o;
|
|
145
150
|
try {
|
|
146
|
-
|
|
151
|
+
o = JSON.stringify(t).toLowerCase();
|
|
147
152
|
} catch {
|
|
148
|
-
|
|
153
|
+
o = String(t).toLowerCase();
|
|
149
154
|
}
|
|
150
|
-
return e.toLowerCase().split(/\s+/).filter(Boolean).every((a) =>
|
|
155
|
+
return e.toLowerCase().split(/\s+/).filter(Boolean).every((a) => o.includes(a));
|
|
151
156
|
}
|
|
152
157
|
const H = [
|
|
153
158
|
"var(--crk-timeline-1, #0e7568)",
|
|
@@ -160,7 +165,7 @@ const H = [
|
|
|
160
165
|
function R(t, e) {
|
|
161
166
|
return `color-mix(in srgb, ${t} ${e}%, white)`;
|
|
162
167
|
}
|
|
163
|
-
const
|
|
168
|
+
const b = {
|
|
164
169
|
body: "var(--crk-timeline-body, #3b352f)",
|
|
165
170
|
stem: "var(--crk-timeline-stem, #c9c1b5)",
|
|
166
171
|
stemHot: "var(--crk-timeline-stem-hot, #8a8175)",
|
|
@@ -175,19 +180,19 @@ export {
|
|
|
175
180
|
N as HOUR,
|
|
176
181
|
U as MINUTE,
|
|
177
182
|
O as SECOND,
|
|
178
|
-
|
|
183
|
+
D as TICK_STEPS,
|
|
179
184
|
H as TIMELINE_PALETTE_VARS,
|
|
180
|
-
|
|
185
|
+
b as TL_COLORS,
|
|
181
186
|
k as eventMatches,
|
|
182
187
|
u as fmtClock,
|
|
183
|
-
|
|
188
|
+
h as fmtClockUTC,
|
|
184
189
|
s as fmtDate,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
190
|
+
Y as fmtDateISO,
|
|
191
|
+
d as fmtDateTime,
|
|
192
|
+
C as fmtDur,
|
|
193
|
+
g as fmtISO,
|
|
189
194
|
I as highlightParts,
|
|
190
|
-
|
|
195
|
+
M as tickSubdiv,
|
|
191
196
|
T as ticks,
|
|
192
197
|
R as tint
|
|
193
198
|
};
|