@walkeros/explorer 4.8.0 → 4.9.0-next-1791925945414
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/CHANGELOG.md +19 -0
- package/dist/design/components/index.cjs +473 -258
- package/dist/design/components/index.cjs.map +1 -1
- package/dist/design/components/index.d.cts +45 -1
- package/dist/design/components/index.d.ts +45 -1
- package/dist/design/components/index.mjs +463 -250
- package/dist/design/components/index.mjs.map +1 -1
- package/dist/design/index.cjs +2 -0
- package/dist/design/index.cjs.map +1 -1
- package/dist/design/index.d.cts +6 -1
- package/dist/design/index.d.ts +6 -1
- package/dist/design/index.mjs +2 -0
- package/dist/design/index.mjs.map +1 -1
- package/dist/design/tailwind.css +1 -0
- package/dist/design/tokens.css +2 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +341 -45
- package/package.json +7 -7
|
@@ -337,13 +337,10 @@ function Card({
|
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
// src/design/components/atoms/InstallCommand.tsx
|
|
340
|
-
import {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
useState
|
|
345
|
-
} from "react";
|
|
346
|
-
import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
340
|
+
import { useId } from "react";
|
|
341
|
+
|
|
342
|
+
// src/design/components/atoms/useCopy.ts
|
|
343
|
+
import { useEffect, useRef, useState } from "react";
|
|
347
344
|
var CONFIRM_MS = 1400;
|
|
348
345
|
async function copyText(text) {
|
|
349
346
|
try {
|
|
@@ -353,13 +350,7 @@ async function copyText(text) {
|
|
|
353
350
|
return false;
|
|
354
351
|
}
|
|
355
352
|
}
|
|
356
|
-
function
|
|
357
|
-
command = "npm i -g @walkeros/cli",
|
|
358
|
-
className,
|
|
359
|
-
"aria-describedby": describedBy,
|
|
360
|
-
...rest
|
|
361
|
-
}) {
|
|
362
|
-
const hintId = useId();
|
|
353
|
+
function useCopy() {
|
|
363
354
|
const [state, setState] = useState("idle");
|
|
364
355
|
const mounted = useRef(true);
|
|
365
356
|
const timer = useRef(void 0);
|
|
@@ -370,13 +361,31 @@ function InstallCommand({
|
|
|
370
361
|
clearTimeout(timer.current);
|
|
371
362
|
};
|
|
372
363
|
}, []);
|
|
373
|
-
const copy = async () => {
|
|
374
|
-
const copied = await copyText(
|
|
364
|
+
const copy = async (text) => {
|
|
365
|
+
const copied = await copyText(text);
|
|
375
366
|
if (!mounted.current) return;
|
|
376
367
|
clearTimeout(timer.current);
|
|
377
368
|
setState(copied ? "done" : "failed");
|
|
378
369
|
if (copied) timer.current = setTimeout(() => setState("idle"), CONFIRM_MS);
|
|
379
370
|
};
|
|
371
|
+
return [
|
|
372
|
+
state,
|
|
373
|
+
(text) => {
|
|
374
|
+
void copy(text);
|
|
375
|
+
}
|
|
376
|
+
];
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// src/design/components/atoms/InstallCommand.tsx
|
|
380
|
+
import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
381
|
+
function InstallCommand({
|
|
382
|
+
command = "npm i -g @walkeros/cli",
|
|
383
|
+
className,
|
|
384
|
+
"aria-describedby": describedBy,
|
|
385
|
+
...rest
|
|
386
|
+
}) {
|
|
387
|
+
const hintId = useId();
|
|
388
|
+
const [state, copy] = useCopy();
|
|
380
389
|
return /* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
381
390
|
/* @__PURE__ */ jsxs6(
|
|
382
391
|
"button",
|
|
@@ -385,9 +394,7 @@ function InstallCommand({
|
|
|
385
394
|
"aria-describedby": describedBy ? `${hintId} ${describedBy}` : hintId,
|
|
386
395
|
type: "button",
|
|
387
396
|
className: cx("elb-cmd", className),
|
|
388
|
-
onClick: () =>
|
|
389
|
-
void copy();
|
|
390
|
-
},
|
|
397
|
+
onClick: () => copy(command),
|
|
391
398
|
children: [
|
|
392
399
|
/* @__PURE__ */ jsxs6("span", { children: [
|
|
393
400
|
/* @__PURE__ */ jsxs6("span", { className: "elb-cmd__prompt", "aria-hidden": "true", children: [
|
|
@@ -740,8 +747,233 @@ function BrowserFrame({
|
|
|
740
747
|
] });
|
|
741
748
|
}
|
|
742
749
|
|
|
750
|
+
// src/design/components/molecules/EventLog.tsx
|
|
751
|
+
import {
|
|
752
|
+
Fragment as Fragment8,
|
|
753
|
+
useState as useState2
|
|
754
|
+
} from "react";
|
|
755
|
+
|
|
756
|
+
// src/design/components/atoms/CodeTokens.tsx
|
|
757
|
+
import { Fragment as Fragment7, jsx as jsx21 } from "react/jsx-runtime";
|
|
758
|
+
function CodeTokens({
|
|
759
|
+
tokens,
|
|
760
|
+
active = false
|
|
761
|
+
}) {
|
|
762
|
+
return /* @__PURE__ */ jsx21(Fragment7, { children: tokens.map((token, index) => /* @__PURE__ */ jsx21(
|
|
763
|
+
"span",
|
|
764
|
+
{
|
|
765
|
+
className: cx(
|
|
766
|
+
"elb-viz-tok",
|
|
767
|
+
`elb-viz-tok--${token.kind}`,
|
|
768
|
+
active && token.mark && `elb-viz-tok--mark-${token.mark}`
|
|
769
|
+
),
|
|
770
|
+
children: token.t
|
|
771
|
+
},
|
|
772
|
+
index
|
|
773
|
+
)) });
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
// src/design/components/codeTokens.ts
|
|
777
|
+
function tok(t, kind, mark) {
|
|
778
|
+
return mark ? { t, kind, mark } : { t, kind };
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
// src/design/components/molecules/EventLog.tsx
|
|
782
|
+
import { Fragment as Fragment9, jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
783
|
+
var SECTIONS = [
|
|
784
|
+
"data",
|
|
785
|
+
"context",
|
|
786
|
+
"globals",
|
|
787
|
+
"consent",
|
|
788
|
+
"user",
|
|
789
|
+
"nested"
|
|
790
|
+
];
|
|
791
|
+
var VIEWS = [
|
|
792
|
+
["fields", "Fields"],
|
|
793
|
+
["json", "JSON"]
|
|
794
|
+
];
|
|
795
|
+
var COPY = {
|
|
796
|
+
idle: { label: "Copy", icon: "copy" },
|
|
797
|
+
done: { label: "Copied", icon: "check" },
|
|
798
|
+
failed: { label: "Copy failed", icon: "warning" }
|
|
799
|
+
};
|
|
800
|
+
var isGroup = (value) => typeof value === "object" && value !== null;
|
|
801
|
+
function timeOf(timestamp) {
|
|
802
|
+
if (typeof timestamp !== "number") return null;
|
|
803
|
+
const date = new Date(timestamp);
|
|
804
|
+
if (Number.isNaN(date.getTime())) return null;
|
|
805
|
+
const clock = [date.getHours(), date.getMinutes(), date.getSeconds()].map((part) => String(part).padStart(2, "0")).join(":");
|
|
806
|
+
return { iso: date.toISOString(), clock };
|
|
807
|
+
}
|
|
808
|
+
function valueToken(value) {
|
|
809
|
+
if (typeof value === "string") return tok(value, "str");
|
|
810
|
+
if (typeof value === "number" || typeof value === "boolean")
|
|
811
|
+
return tok(String(value), "num");
|
|
812
|
+
return tok(String(JSON.stringify(value)), "text");
|
|
813
|
+
}
|
|
814
|
+
function fieldRows(section, group) {
|
|
815
|
+
return Object.entries(group).map(([key, value]) => {
|
|
816
|
+
if (section === "context" && Array.isArray(value) && value.length === 2)
|
|
817
|
+
return { key, value: valueToken(value[0]), sub: `order ${value[1]}` };
|
|
818
|
+
if (section === "consent" && typeof value === "boolean")
|
|
819
|
+
return { key, value: tok(value ? "granted" : "denied", "str") };
|
|
820
|
+
return { key, value: valueToken(value) };
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
var JSON_TOKEN = /("(?:[^"\\]|\\.)*")(\s*:)?|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|\b(?:true|false|null)\b|[{}[\],]/g;
|
|
824
|
+
function jsonTokens(line) {
|
|
825
|
+
const tokens = [];
|
|
826
|
+
let last = 0;
|
|
827
|
+
for (const match of line.matchAll(JSON_TOKEN)) {
|
|
828
|
+
const [text, quoted, colon] = match;
|
|
829
|
+
const at = match.index ?? 0;
|
|
830
|
+
if (at > last) tokens.push(tok(line.slice(last, at), "text"));
|
|
831
|
+
if (quoted && colon) tokens.push(tok(quoted, "key"), tok(colon, "punct"));
|
|
832
|
+
else if (quoted) tokens.push(tok(quoted, "str"));
|
|
833
|
+
else tokens.push(tok(text, /^[{}[\],]$/.test(text) ? "punct" : "num"));
|
|
834
|
+
last = at + text.length;
|
|
835
|
+
}
|
|
836
|
+
if (last < line.length) tokens.push(tok(line.slice(last), "text"));
|
|
837
|
+
return tokens;
|
|
838
|
+
}
|
|
839
|
+
function EventName({ event }) {
|
|
840
|
+
const { name, entity, action } = event;
|
|
841
|
+
if (!entity || !action || name !== `${entity} ${action}`) return /* @__PURE__ */ jsx22(Fragment9, { children: name });
|
|
842
|
+
return /* @__PURE__ */ jsxs16(Fragment9, { children: [
|
|
843
|
+
/* @__PURE__ */ jsx22("span", { className: "elb-event-log__entity", children: entity }),
|
|
844
|
+
" ",
|
|
845
|
+
/* @__PURE__ */ jsx22("span", { className: "elb-event-log__action", children: action })
|
|
846
|
+
] });
|
|
847
|
+
}
|
|
848
|
+
function Fields({ event }) {
|
|
849
|
+
const fields = new Map(Object.entries(event));
|
|
850
|
+
return /* @__PURE__ */ jsx22("div", { className: "elb-event-log__sections", children: SECTIONS.map((section) => {
|
|
851
|
+
const group = fields.get(section);
|
|
852
|
+
const rows = isGroup(group) ? fieldRows(section, group) : [];
|
|
853
|
+
if (rows.length === 0 && section !== "consent") return null;
|
|
854
|
+
return /* @__PURE__ */ jsxs16("div", { className: "elb-event-log__section", children: [
|
|
855
|
+
/* @__PURE__ */ jsx22("span", { className: "elb-event-log__label", children: section }),
|
|
856
|
+
rows.length === 0 ? /* @__PURE__ */ jsx22("span", { className: "elb-event-log__field elb-event-log__sub", children: "none" }) : /* @__PURE__ */ jsx22("dl", { className: "elb-event-log__fields", children: rows.map(({ key, value, sub }) => /* @__PURE__ */ jsxs16("div", { className: "elb-event-log__field", children: [
|
|
857
|
+
/* @__PURE__ */ jsx22("dt", { children: /* @__PURE__ */ jsx22(CodeTokens, { tokens: [tok(key, "key")] }) }),
|
|
858
|
+
/* @__PURE__ */ jsxs16("dd", { children: [
|
|
859
|
+
/* @__PURE__ */ jsx22(CodeTokens, { tokens: [value] }),
|
|
860
|
+
sub && /* @__PURE__ */ jsx22("span", { className: "elb-event-log__sub", children: sub })
|
|
861
|
+
] })
|
|
862
|
+
] }, key)) })
|
|
863
|
+
] }, section);
|
|
864
|
+
}) });
|
|
865
|
+
}
|
|
866
|
+
function Json({ text }) {
|
|
867
|
+
return /* @__PURE__ */ jsx22("div", { className: "elb-event-log__json", children: text.split("\n").map((line, index) => /* @__PURE__ */ jsxs16(Fragment8, { children: [
|
|
868
|
+
/* @__PURE__ */ jsx22(CodeTokens, { tokens: jsonTokens(line) }),
|
|
869
|
+
"\n"
|
|
870
|
+
] }, index)) });
|
|
871
|
+
}
|
|
872
|
+
function EventLog({
|
|
873
|
+
records,
|
|
874
|
+
selectedSeq,
|
|
875
|
+
onSelect,
|
|
876
|
+
onClear,
|
|
877
|
+
emptyText = "Click, scroll or load something tagged on the page and its events show up here.",
|
|
878
|
+
className,
|
|
879
|
+
...rest
|
|
880
|
+
}) {
|
|
881
|
+
const [view, setView] = useState2("fields");
|
|
882
|
+
const [copyState, copy] = useCopy();
|
|
883
|
+
const newest = records[records.length - 1];
|
|
884
|
+
const selected = records.find((record) => record.seq === selectedSeq) ?? newest;
|
|
885
|
+
const json = selected ? JSON.stringify(selected.event, null, 2) : "";
|
|
886
|
+
return /* @__PURE__ */ jsxs16("div", { ...rest, className: cx("elb-event-log", className), children: [
|
|
887
|
+
/* @__PURE__ */ jsxs16("div", { className: "elb-event-log__bar", children: [
|
|
888
|
+
/* @__PURE__ */ jsx22("span", { className: "elb-event-log__title", children: "Events" }),
|
|
889
|
+
/* @__PURE__ */ jsx22("span", { className: "elb-event-log__count", children: records.length }),
|
|
890
|
+
onClear && records.length > 0 && /* @__PURE__ */ jsx22(
|
|
891
|
+
Button,
|
|
892
|
+
{
|
|
893
|
+
variant: "secondary",
|
|
894
|
+
className: "elb-event-log__button elb-event-log__clear",
|
|
895
|
+
onClick: onClear,
|
|
896
|
+
children: "Clear"
|
|
897
|
+
}
|
|
898
|
+
)
|
|
899
|
+
] }),
|
|
900
|
+
selected === void 0 || newest === void 0 ? /* @__PURE__ */ jsxs16("div", { className: "elb-event-log__empty", children: [
|
|
901
|
+
/* @__PURE__ */ jsx22("p", { className: "elb-event-log__empty-title", children: "No events yet" }),
|
|
902
|
+
/* @__PURE__ */ jsx22("p", { className: "elb-event-log__empty-text", children: emptyText })
|
|
903
|
+
] }) : /* @__PURE__ */ jsxs16("div", { className: "elb-event-log__body", children: [
|
|
904
|
+
/* @__PURE__ */ jsx22("ul", { className: "elb-event-log__list", children: [...records].reverse().map(({ seq, event }) => {
|
|
905
|
+
const time = timeOf(event.timestamp);
|
|
906
|
+
return /* @__PURE__ */ jsx22("li", { children: /* @__PURE__ */ jsxs16(
|
|
907
|
+
"button",
|
|
908
|
+
{
|
|
909
|
+
type: "button",
|
|
910
|
+
className: "elb-event-log__row",
|
|
911
|
+
"aria-pressed": seq === selected.seq,
|
|
912
|
+
disabled: !onSelect,
|
|
913
|
+
onClick: () => onSelect?.(seq === newest.seq ? null : seq),
|
|
914
|
+
children: [
|
|
915
|
+
/* @__PURE__ */ jsxs16("span", { className: "elb-event-log__seq", children: [
|
|
916
|
+
"#",
|
|
917
|
+
seq
|
|
918
|
+
] }),
|
|
919
|
+
/* @__PURE__ */ jsx22("span", { className: "elb-event-log__name", children: /* @__PURE__ */ jsx22(EventName, { event }) }),
|
|
920
|
+
event.trigger && /* @__PURE__ */ jsx22(InlineCode, { className: "elb-event-log__trigger", children: event.trigger }),
|
|
921
|
+
time && /* @__PURE__ */ jsx22("time", { className: "elb-event-log__time", dateTime: time.iso, children: time.clock })
|
|
922
|
+
]
|
|
923
|
+
}
|
|
924
|
+
) }, seq);
|
|
925
|
+
}) }),
|
|
926
|
+
/* @__PURE__ */ jsxs16("div", { className: "elb-event-log__detail", "data-theme": "dark", children: [
|
|
927
|
+
/* @__PURE__ */ jsxs16("div", { className: "elb-event-log__head", children: [
|
|
928
|
+
/* @__PURE__ */ jsxs16("div", { className: "elb-event-log__summary", children: [
|
|
929
|
+
/* @__PURE__ */ jsx22("span", { className: "elb-event-log__detail-name", children: /* @__PURE__ */ jsx22(EventName, { event: selected.event }) }),
|
|
930
|
+
/* @__PURE__ */ jsx22("span", { className: "elb-event-log__meta", children: [
|
|
931
|
+
`#${selected.seq}`,
|
|
932
|
+
selected.event.trigger,
|
|
933
|
+
timeOf(selected.event.timestamp)?.clock
|
|
934
|
+
].filter(Boolean).join(" \xB7 ") })
|
|
935
|
+
] }),
|
|
936
|
+
/* @__PURE__ */ jsx22(
|
|
937
|
+
"div",
|
|
938
|
+
{
|
|
939
|
+
className: "elb-event-log__views",
|
|
940
|
+
role: "group",
|
|
941
|
+
"aria-label": "View",
|
|
942
|
+
children: VIEWS.map(([id, label]) => /* @__PURE__ */ jsx22(
|
|
943
|
+
"button",
|
|
944
|
+
{
|
|
945
|
+
type: "button",
|
|
946
|
+
className: "elb-event-log__view",
|
|
947
|
+
"aria-pressed": view === id,
|
|
948
|
+
onClick: () => setView(id),
|
|
949
|
+
children: label
|
|
950
|
+
},
|
|
951
|
+
id
|
|
952
|
+
))
|
|
953
|
+
}
|
|
954
|
+
),
|
|
955
|
+
/* @__PURE__ */ jsxs16(
|
|
956
|
+
Button,
|
|
957
|
+
{
|
|
958
|
+
variant: "secondary",
|
|
959
|
+
className: "elb-event-log__button",
|
|
960
|
+
onClick: () => copy(json),
|
|
961
|
+
children: [
|
|
962
|
+
/* @__PURE__ */ jsx22(Icon, { name: COPY[copyState].icon, size: 12 }),
|
|
963
|
+
COPY[copyState].label
|
|
964
|
+
]
|
|
965
|
+
}
|
|
966
|
+
),
|
|
967
|
+
/* @__PURE__ */ jsx22("span", { className: "elb-event-log__status", role: "status", children: copyState === "idle" ? "" : COPY[copyState].label })
|
|
968
|
+
] }),
|
|
969
|
+
view === "fields" ? /* @__PURE__ */ jsx22(Fields, { event: selected.event }) : /* @__PURE__ */ jsx22(Json, { text: json })
|
|
970
|
+
] })
|
|
971
|
+
] })
|
|
972
|
+
] });
|
|
973
|
+
}
|
|
974
|
+
|
|
743
975
|
// src/design/components/molecules/QuickstartSteps.tsx
|
|
744
|
-
import { jsx as
|
|
976
|
+
import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
745
977
|
var ARROWS = [
|
|
746
978
|
{
|
|
747
979
|
kind: "wave",
|
|
@@ -759,12 +991,12 @@ var ARROWS = [
|
|
|
759
991
|
}
|
|
760
992
|
];
|
|
761
993
|
function Arrow({ kind, paths }) {
|
|
762
|
-
return /* @__PURE__ */
|
|
994
|
+
return /* @__PURE__ */ jsx23(
|
|
763
995
|
"li",
|
|
764
996
|
{
|
|
765
997
|
className: cx("elb-quickstart__arrow", `elb-quickstart__arrow--${kind}`),
|
|
766
998
|
"aria-hidden": "true",
|
|
767
|
-
children: /* @__PURE__ */
|
|
999
|
+
children: /* @__PURE__ */ jsx23(
|
|
768
1000
|
"svg",
|
|
769
1001
|
{
|
|
770
1002
|
width: "76",
|
|
@@ -775,7 +1007,7 @@ function Arrow({ kind, paths }) {
|
|
|
775
1007
|
strokeWidth: "2.2",
|
|
776
1008
|
strokeLinecap: "round",
|
|
777
1009
|
strokeLinejoin: "round",
|
|
778
|
-
children: paths.map((d) => /* @__PURE__ */
|
|
1010
|
+
children: paths.map((d) => /* @__PURE__ */ jsx23("path", { d }, d))
|
|
779
1011
|
}
|
|
780
1012
|
)
|
|
781
1013
|
}
|
|
@@ -787,18 +1019,18 @@ function QuickstartSteps({
|
|
|
787
1019
|
className,
|
|
788
1020
|
...rest
|
|
789
1021
|
}) {
|
|
790
|
-
return /* @__PURE__ */
|
|
791
|
-
/* @__PURE__ */
|
|
792
|
-
const item = /* @__PURE__ */
|
|
793
|
-
/* @__PURE__ */
|
|
794
|
-
/* @__PURE__ */
|
|
795
|
-
/* @__PURE__ */
|
|
1022
|
+
return /* @__PURE__ */ jsxs17("div", { ...rest, className: cx("elb-quickstart", className), children: [
|
|
1023
|
+
/* @__PURE__ */ jsx23("ol", { className: "elb-quickstart__steps", children: steps.flatMap((step, index) => {
|
|
1024
|
+
const item = /* @__PURE__ */ jsxs17("li", { className: "elb-quickstart__step", children: [
|
|
1025
|
+
/* @__PURE__ */ jsxs17("div", { className: "elb-quickstart__head", children: [
|
|
1026
|
+
/* @__PURE__ */ jsx23("span", { className: "elb-quickstart__num", "aria-hidden": "true", children: index + 1 }),
|
|
1027
|
+
/* @__PURE__ */ jsx23("h3", { className: "elb-quickstart__title", children: step.title })
|
|
796
1028
|
] }),
|
|
797
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ jsx23("p", { className: "elb-quickstart__copy", children: step.text })
|
|
798
1030
|
] }, step.title);
|
|
799
1031
|
return index < steps.length - 1 ? [
|
|
800
1032
|
item,
|
|
801
|
-
/* @__PURE__ */
|
|
1033
|
+
/* @__PURE__ */ jsx23(
|
|
802
1034
|
Arrow,
|
|
803
1035
|
{
|
|
804
1036
|
...ARROWS[index % ARROWS.length]
|
|
@@ -812,14 +1044,14 @@ function QuickstartSteps({
|
|
|
812
1044
|
}
|
|
813
1045
|
|
|
814
1046
|
// src/design/components/layout/Section.tsx
|
|
815
|
-
import { jsx as
|
|
1047
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
816
1048
|
function Section({
|
|
817
1049
|
children,
|
|
818
1050
|
tone = "default",
|
|
819
1051
|
className,
|
|
820
1052
|
...rest
|
|
821
1053
|
}) {
|
|
822
|
-
return /* @__PURE__ */
|
|
1054
|
+
return /* @__PURE__ */ jsx24(
|
|
823
1055
|
"section",
|
|
824
1056
|
{
|
|
825
1057
|
...rest,
|
|
@@ -828,13 +1060,13 @@ function Section({
|
|
|
828
1060
|
tone === "alt" && "elb-section--alt",
|
|
829
1061
|
className
|
|
830
1062
|
),
|
|
831
|
-
children: /* @__PURE__ */
|
|
1063
|
+
children: /* @__PURE__ */ jsx24("div", { className: "elb-section__inner", children })
|
|
832
1064
|
}
|
|
833
1065
|
);
|
|
834
1066
|
}
|
|
835
1067
|
|
|
836
1068
|
// src/design/components/layout/CardGrid.tsx
|
|
837
|
-
import { jsx as
|
|
1069
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
838
1070
|
function CardGrid({
|
|
839
1071
|
children,
|
|
840
1072
|
min,
|
|
@@ -842,7 +1074,7 @@ function CardGrid({
|
|
|
842
1074
|
className,
|
|
843
1075
|
...rest
|
|
844
1076
|
}) {
|
|
845
|
-
return /* @__PURE__ */
|
|
1077
|
+
return /* @__PURE__ */ jsx25(
|
|
846
1078
|
"div",
|
|
847
1079
|
{
|
|
848
1080
|
...rest,
|
|
@@ -858,7 +1090,7 @@ function CardGrid({
|
|
|
858
1090
|
}
|
|
859
1091
|
|
|
860
1092
|
// src/design/components/layout/Split.tsx
|
|
861
|
-
import { jsx as
|
|
1093
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
862
1094
|
function Split({
|
|
863
1095
|
start,
|
|
864
1096
|
end,
|
|
@@ -866,7 +1098,7 @@ function Split({
|
|
|
866
1098
|
className,
|
|
867
1099
|
...rest
|
|
868
1100
|
}) {
|
|
869
|
-
return /* @__PURE__ */
|
|
1101
|
+
return /* @__PURE__ */ jsxs18(
|
|
870
1102
|
"div",
|
|
871
1103
|
{
|
|
872
1104
|
...rest,
|
|
@@ -876,15 +1108,15 @@ function Split({
|
|
|
876
1108
|
className
|
|
877
1109
|
),
|
|
878
1110
|
children: [
|
|
879
|
-
/* @__PURE__ */
|
|
880
|
-
/* @__PURE__ */
|
|
1111
|
+
/* @__PURE__ */ jsx26("div", { className: "elb-split__start", children: start }),
|
|
1112
|
+
/* @__PURE__ */ jsx26("div", { className: "elb-split__end", children: end })
|
|
881
1113
|
]
|
|
882
1114
|
}
|
|
883
1115
|
);
|
|
884
1116
|
}
|
|
885
1117
|
|
|
886
1118
|
// src/design/components/layout/Cluster.tsx
|
|
887
|
-
import { jsx as
|
|
1119
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
888
1120
|
function Cluster({
|
|
889
1121
|
children,
|
|
890
1122
|
gap = "actions",
|
|
@@ -893,7 +1125,7 @@ function Cluster({
|
|
|
893
1125
|
className,
|
|
894
1126
|
...rest
|
|
895
1127
|
}) {
|
|
896
|
-
return /* @__PURE__ */
|
|
1128
|
+
return /* @__PURE__ */ jsx27(
|
|
897
1129
|
"div",
|
|
898
1130
|
{
|
|
899
1131
|
...rest,
|
|
@@ -910,7 +1142,7 @@ function Cluster({
|
|
|
910
1142
|
}
|
|
911
1143
|
|
|
912
1144
|
// src/design/components/layout/Hero.tsx
|
|
913
|
-
import { jsx as
|
|
1145
|
+
import { jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
914
1146
|
function Hero({
|
|
915
1147
|
eyebrow,
|
|
916
1148
|
title,
|
|
@@ -922,8 +1154,8 @@ function Hero({
|
|
|
922
1154
|
className,
|
|
923
1155
|
...rest
|
|
924
1156
|
}) {
|
|
925
|
-
return /* @__PURE__ */
|
|
926
|
-
/* @__PURE__ */
|
|
1157
|
+
return /* @__PURE__ */ jsx28("section", { ...rest, className: cx("elb-hero", className), children: /* @__PURE__ */ jsxs19("div", { className: "elb-hero__inner", children: [
|
|
1158
|
+
/* @__PURE__ */ jsx28(
|
|
927
1159
|
SectionHeading,
|
|
928
1160
|
{
|
|
929
1161
|
level: 1,
|
|
@@ -933,14 +1165,14 @@ function Hero({
|
|
|
933
1165
|
lead
|
|
934
1166
|
}
|
|
935
1167
|
),
|
|
936
|
-
/* @__PURE__ */
|
|
937
|
-
proof !== void 0 && /* @__PURE__ */
|
|
938
|
-
children !== void 0 && /* @__PURE__ */
|
|
1168
|
+
/* @__PURE__ */ jsx28("div", { className: "elb-hero__actions", children: actions }),
|
|
1169
|
+
proof !== void 0 && /* @__PURE__ */ jsx28("div", { className: "elb-hero__proof", children: proof }),
|
|
1170
|
+
children !== void 0 && /* @__PURE__ */ jsx28("div", { className: "elb-hero__demo", children })
|
|
939
1171
|
] }) });
|
|
940
1172
|
}
|
|
941
1173
|
|
|
942
1174
|
// src/design/components/viz/DestinationMappingViz.tsx
|
|
943
|
-
import { useState as
|
|
1175
|
+
import { useState as useState3 } from "react";
|
|
944
1176
|
|
|
945
1177
|
// src/design/components/viz/data/destination-mapping.ts
|
|
946
1178
|
var GENERATED_ID = "\u2026";
|
|
@@ -1307,58 +1539,6 @@ var MAPPING_EVENTS = [
|
|
|
1307
1539
|
}
|
|
1308
1540
|
];
|
|
1309
1541
|
|
|
1310
|
-
// src/design/components/viz/parts/CodeTokens.tsx
|
|
1311
|
-
import { Fragment as Fragment7, jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1312
|
-
function CodeTokens({
|
|
1313
|
-
tokens,
|
|
1314
|
-
active = false
|
|
1315
|
-
}) {
|
|
1316
|
-
return /* @__PURE__ */ jsx27(Fragment7, { children: tokens.map((token, index) => /* @__PURE__ */ jsx27(
|
|
1317
|
-
"span",
|
|
1318
|
-
{
|
|
1319
|
-
className: cx(
|
|
1320
|
-
"elb-viz-tok",
|
|
1321
|
-
`elb-viz-tok--${token.kind}`,
|
|
1322
|
-
active && token.mark && `elb-viz-tok--mark-${token.mark}`
|
|
1323
|
-
),
|
|
1324
|
-
children: token.t
|
|
1325
|
-
},
|
|
1326
|
-
index
|
|
1327
|
-
)) });
|
|
1328
|
-
}
|
|
1329
|
-
function CodeLine({ number, bar, className, children }) {
|
|
1330
|
-
return /* @__PURE__ */ jsxs19("div", { className: cx("elb-viz-line", className), children: [
|
|
1331
|
-
/* @__PURE__ */ jsx27(
|
|
1332
|
-
"span",
|
|
1333
|
-
{
|
|
1334
|
-
className: cx("elb-viz-line__bar", bar && `elb-viz-line__bar--${bar}`),
|
|
1335
|
-
"aria-hidden": "true"
|
|
1336
|
-
}
|
|
1337
|
-
),
|
|
1338
|
-
number !== void 0 && /* @__PURE__ */ jsx27("span", { className: "elb-viz-line__number", children: number }),
|
|
1339
|
-
/* @__PURE__ */ jsx27("span", { className: "elb-viz-line__code", children })
|
|
1340
|
-
] });
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
// src/design/components/viz/parts/tokens.ts
|
|
1344
|
-
function tok(t, kind, mark) {
|
|
1345
|
-
return mark ? { t, kind, mark } : { t, kind };
|
|
1346
|
-
}
|
|
1347
|
-
function typedLength(tokens) {
|
|
1348
|
-
return tokens.reduce((length, token) => length + token.t.length, 0);
|
|
1349
|
-
}
|
|
1350
|
-
function truncate(tokens, n) {
|
|
1351
|
-
const out = [];
|
|
1352
|
-
let left = n;
|
|
1353
|
-
for (const token of tokens) {
|
|
1354
|
-
if (left <= 0) break;
|
|
1355
|
-
const t = token.t.slice(0, left);
|
|
1356
|
-
out.push({ ...token, t });
|
|
1357
|
-
left -= t.length;
|
|
1358
|
-
}
|
|
1359
|
-
return out;
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
1542
|
// src/design/components/viz/parts/format.ts
|
|
1363
1543
|
var ELIDED = "{\u2026}";
|
|
1364
1544
|
function isRecord(value) {
|
|
@@ -1446,38 +1626,38 @@ function tokenizeCode(line, highlight) {
|
|
|
1446
1626
|
}
|
|
1447
1627
|
|
|
1448
1628
|
// src/design/components/viz/parts/VizFrame.tsx
|
|
1449
|
-
import { jsx as
|
|
1629
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1450
1630
|
function VizFrame({
|
|
1451
1631
|
variant,
|
|
1452
1632
|
children,
|
|
1453
1633
|
className,
|
|
1454
1634
|
...rest
|
|
1455
1635
|
}) {
|
|
1456
|
-
return /* @__PURE__ */
|
|
1636
|
+
return /* @__PURE__ */ jsx29(
|
|
1457
1637
|
"div",
|
|
1458
1638
|
{
|
|
1459
1639
|
...rest,
|
|
1460
1640
|
"data-theme": "dark",
|
|
1461
1641
|
className: cx("elb-viz", `elb-viz--${variant}`, className),
|
|
1462
|
-
children: /* @__PURE__ */
|
|
1642
|
+
children: /* @__PURE__ */ jsx29("div", { className: "elb-viz__body", children })
|
|
1463
1643
|
}
|
|
1464
1644
|
);
|
|
1465
1645
|
}
|
|
1466
1646
|
|
|
1467
1647
|
// src/design/components/viz/DestinationMappingViz.tsx
|
|
1468
|
-
import { jsx as
|
|
1648
|
+
import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1469
1649
|
function DestinationMappingViz({
|
|
1470
1650
|
initialEvent = 0,
|
|
1471
1651
|
caption = MAPPING_CAPTION,
|
|
1472
1652
|
...rest
|
|
1473
1653
|
}) {
|
|
1474
|
-
const [index, setIndex] =
|
|
1654
|
+
const [index, setIndex] = useState3(initialEvent);
|
|
1475
1655
|
const event = MAPPING_EVENTS[index];
|
|
1476
1656
|
const name = `${event.entity} ${event.action}`;
|
|
1477
|
-
return /* @__PURE__ */
|
|
1657
|
+
return /* @__PURE__ */ jsx30(VizFrame, { ...rest, variant: "mapping", children: /* @__PURE__ */ jsxs20("div", { className: "elb-viz-mapping", children: [
|
|
1478
1658
|
/* @__PURE__ */ jsxs20("div", { className: "elb-viz-mapping__pick", children: [
|
|
1479
|
-
/* @__PURE__ */
|
|
1480
|
-
/* @__PURE__ */
|
|
1659
|
+
/* @__PURE__ */ jsx30("div", { className: "elb-viz-mapping__label", children: "Pick an event" }),
|
|
1660
|
+
/* @__PURE__ */ jsx30("div", { className: "elb-viz-mapping__chips", children: MAPPING_EVENTS.map((item, position) => /* @__PURE__ */ jsxs20(
|
|
1481
1661
|
"button",
|
|
1482
1662
|
{
|
|
1483
1663
|
type: "button",
|
|
@@ -1489,21 +1669,21 @@ function DestinationMappingViz({
|
|
|
1489
1669
|
),
|
|
1490
1670
|
onClick: () => setIndex(position),
|
|
1491
1671
|
children: [
|
|
1492
|
-
/* @__PURE__ */
|
|
1493
|
-
/* @__PURE__ */
|
|
1672
|
+
/* @__PURE__ */ jsx30("span", { className: "elb-viz-mapping__chip-entity", children: item.entity }),
|
|
1673
|
+
/* @__PURE__ */ jsx30("span", { className: "elb-viz-mapping__chip-action", children: item.action })
|
|
1494
1674
|
]
|
|
1495
1675
|
},
|
|
1496
1676
|
`${item.entity} ${item.action}`
|
|
1497
1677
|
)) })
|
|
1498
1678
|
] }),
|
|
1499
|
-
/* @__PURE__ */
|
|
1679
|
+
/* @__PURE__ */ jsx30("div", { className: "elb-viz-mapping__event", children: /* @__PURE__ */ jsx30(CodeTokens, { tokens: tokenizeCode(formatElb(event), name), active: true }) }),
|
|
1500
1680
|
/* @__PURE__ */ jsxs20("div", { className: "elb-viz-mapping__body", children: [
|
|
1501
|
-
/* @__PURE__ */
|
|
1502
|
-
/* @__PURE__ */
|
|
1503
|
-
/* @__PURE__ */
|
|
1681
|
+
/* @__PURE__ */ jsx30("div", { className: "elb-viz-mapping__comment", children: "// same event, four destinations, zero app code touched" }),
|
|
1682
|
+
/* @__PURE__ */ jsx30("div", { className: "elb-viz-mapping__cards", children: event.destinations.map((destination) => /* @__PURE__ */ jsxs20("div", { className: "elb-viz-mapping__card", children: [
|
|
1683
|
+
/* @__PURE__ */ jsx30("span", { className: "elb-viz-mapping__name", children: destination.label }),
|
|
1504
1684
|
/* @__PURE__ */ jsxs20("div", { className: "elb-viz-mapping__row", children: [
|
|
1505
|
-
/* @__PURE__ */
|
|
1506
|
-
/* @__PURE__ */
|
|
1685
|
+
/* @__PURE__ */ jsx30("span", { className: "elb-viz-mapping__tag", children: "mapping" }),
|
|
1686
|
+
/* @__PURE__ */ jsx30("span", { className: "elb-viz-mapping__rule", children: /* @__PURE__ */ jsx30(
|
|
1507
1687
|
CodeTokens,
|
|
1508
1688
|
{
|
|
1509
1689
|
tokens: tokenizeCode(
|
|
@@ -1519,8 +1699,8 @@ function DestinationMappingViz({
|
|
|
1519
1699
|
) })
|
|
1520
1700
|
] }),
|
|
1521
1701
|
/* @__PURE__ */ jsxs20("div", { className: "elb-viz-mapping__row elb-viz-mapping__row--sends", children: [
|
|
1522
|
-
/* @__PURE__ */
|
|
1523
|
-
/* @__PURE__ */
|
|
1702
|
+
/* @__PURE__ */ jsx30("span", { className: "elb-viz-mapping__tag", children: "sends" }),
|
|
1703
|
+
/* @__PURE__ */ jsx30("div", { className: "elb-viz-mapping__calls", children: destination.calls.flatMap((call) => formatCall(call)).map((line, position) => /* @__PURE__ */ jsx30("div", { className: "elb-viz-mapping__line", children: /* @__PURE__ */ jsx30(
|
|
1524
1704
|
CodeTokens,
|
|
1525
1705
|
{
|
|
1526
1706
|
tokens: tokenizeCode(line, destination.rule.name),
|
|
@@ -1530,12 +1710,12 @@ function DestinationMappingViz({
|
|
|
1530
1710
|
] })
|
|
1531
1711
|
] }, destination.id)) })
|
|
1532
1712
|
] }),
|
|
1533
|
-
caption !== "" && /* @__PURE__ */
|
|
1713
|
+
caption !== "" && /* @__PURE__ */ jsx30("p", { className: "elb-viz-mapping__caption", children: caption })
|
|
1534
1714
|
] }) });
|
|
1535
1715
|
}
|
|
1536
1716
|
|
|
1537
1717
|
// src/design/components/viz/HeroTaggingViz.tsx
|
|
1538
|
-
import { useEffect as useEffect3, useRef as useRef2, useState as
|
|
1718
|
+
import { useEffect as useEffect3, useRef as useRef2, useState as useState5 } from "react";
|
|
1539
1719
|
|
|
1540
1720
|
// src/design/components/viz/parts/timeline.ts
|
|
1541
1721
|
function clamp(x) {
|
|
@@ -1545,6 +1725,22 @@ function ease(x) {
|
|
|
1545
1725
|
return x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2;
|
|
1546
1726
|
}
|
|
1547
1727
|
|
|
1728
|
+
// src/design/components/viz/parts/tokens.ts
|
|
1729
|
+
function typedLength(tokens) {
|
|
1730
|
+
return tokens.reduce((length, token) => length + token.t.length, 0);
|
|
1731
|
+
}
|
|
1732
|
+
function truncate(tokens, n) {
|
|
1733
|
+
const out = [];
|
|
1734
|
+
let left = n;
|
|
1735
|
+
for (const token of tokens) {
|
|
1736
|
+
if (left <= 0) break;
|
|
1737
|
+
const t = token.t.slice(0, left);
|
|
1738
|
+
out.push({ ...token, t });
|
|
1739
|
+
left -= t.length;
|
|
1740
|
+
}
|
|
1741
|
+
return out;
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1548
1744
|
// src/design/components/viz/data/hero.ts
|
|
1549
1745
|
var HERO_ARTICLES = [
|
|
1550
1746
|
{ kicker: "Tech", title: "Return of the Bug", thumb: "bug" },
|
|
@@ -1805,8 +2001,24 @@ function heroFrame(t) {
|
|
|
1805
2001
|
};
|
|
1806
2002
|
}
|
|
1807
2003
|
|
|
2004
|
+
// src/design/components/viz/parts/CodeLine.tsx
|
|
2005
|
+
import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2006
|
+
function CodeLine({ number, bar, className, children }) {
|
|
2007
|
+
return /* @__PURE__ */ jsxs21("div", { className: cx("elb-viz-line", className), children: [
|
|
2008
|
+
/* @__PURE__ */ jsx31(
|
|
2009
|
+
"span",
|
|
2010
|
+
{
|
|
2011
|
+
className: cx("elb-viz-line__bar", bar && `elb-viz-line__bar--${bar}`),
|
|
2012
|
+
"aria-hidden": "true"
|
|
2013
|
+
}
|
|
2014
|
+
),
|
|
2015
|
+
number !== void 0 && /* @__PURE__ */ jsx31("span", { className: "elb-viz-line__number", children: number }),
|
|
2016
|
+
/* @__PURE__ */ jsx31("span", { className: "elb-viz-line__code", children })
|
|
2017
|
+
] });
|
|
2018
|
+
}
|
|
2019
|
+
|
|
1808
2020
|
// src/design/components/viz/parts/EventsTable.tsx
|
|
1809
|
-
import { Fragment as
|
|
2021
|
+
import { Fragment as Fragment10 } from "react";
|
|
1810
2022
|
|
|
1811
2023
|
// src/design/components/viz/parts/style.ts
|
|
1812
2024
|
function vizStyle(vars) {
|
|
@@ -1815,38 +2027,38 @@ function vizStyle(vars) {
|
|
|
1815
2027
|
}
|
|
1816
2028
|
|
|
1817
2029
|
// src/design/components/viz/parts/EventsTable.tsx
|
|
1818
|
-
import { jsx as
|
|
2030
|
+
import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1819
2031
|
var SKELETON_ROWS = 6;
|
|
1820
2032
|
function EventsTable({ rows }) {
|
|
1821
2033
|
const skeletons = Math.max(0, SKELETON_ROWS - rows.length);
|
|
1822
|
-
return /* @__PURE__ */
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
-
/* @__PURE__ */
|
|
1825
|
-
/* @__PURE__ */
|
|
2034
|
+
return /* @__PURE__ */ jsxs22("div", { className: "elb-viz-table", children: [
|
|
2035
|
+
/* @__PURE__ */ jsxs22("div", { className: "elb-viz-table__head", children: [
|
|
2036
|
+
/* @__PURE__ */ jsxs22("span", { className: "elb-viz-table__query", children: [
|
|
2037
|
+
/* @__PURE__ */ jsx32("span", { className: "elb-viz-table__keyword", children: "SELECT" }),
|
|
1826
2038
|
" *",
|
|
1827
2039
|
" ",
|
|
1828
|
-
/* @__PURE__ */
|
|
2040
|
+
/* @__PURE__ */ jsx32("span", { className: "elb-viz-table__keyword", children: "FROM" }),
|
|
1829
2041
|
" ",
|
|
1830
|
-
/* @__PURE__ */
|
|
2042
|
+
/* @__PURE__ */ jsx32("span", { className: "elb-viz-table__source", children: "walkerOS.events" })
|
|
1831
2043
|
] }),
|
|
1832
|
-
/* @__PURE__ */
|
|
1833
|
-
/* @__PURE__ */
|
|
2044
|
+
/* @__PURE__ */ jsxs22("span", { className: "elb-viz-table__live", children: [
|
|
2045
|
+
/* @__PURE__ */ jsx32("span", { className: "elb-viz-table__dot", "aria-hidden": "true" }),
|
|
1834
2046
|
"live"
|
|
1835
2047
|
] })
|
|
1836
2048
|
] }),
|
|
1837
|
-
/* @__PURE__ */
|
|
1838
|
-
/* @__PURE__ */
|
|
1839
|
-
/* @__PURE__ */
|
|
1840
|
-
/* @__PURE__ */
|
|
2049
|
+
/* @__PURE__ */ jsx32("div", { className: "elb-viz-table__body", children: /* @__PURE__ */ jsx32("div", { className: "elb-viz-table__scroll", children: /* @__PURE__ */ jsxs22("div", { className: "elb-viz-table__rows", children: [
|
|
2050
|
+
/* @__PURE__ */ jsxs22("div", { className: "elb-viz-table__row elb-viz-table__row--header", children: [
|
|
2051
|
+
/* @__PURE__ */ jsx32("span", { className: "elb-viz-table__cell elb-viz-table__cell--n", children: "Row" }),
|
|
2052
|
+
/* @__PURE__ */ jsxs22("span", { className: "elb-viz-table__cell", children: [
|
|
1841
2053
|
"name",
|
|
1842
|
-
/* @__PURE__ */
|
|
2054
|
+
/* @__PURE__ */ jsx32("span", { className: "elb-viz-table__type", children: "STRING" })
|
|
1843
2055
|
] }),
|
|
1844
|
-
/* @__PURE__ */
|
|
2056
|
+
/* @__PURE__ */ jsxs22("span", { className: "elb-viz-table__cell", children: [
|
|
1845
2057
|
"data",
|
|
1846
|
-
/* @__PURE__ */
|
|
2058
|
+
/* @__PURE__ */ jsx32("span", { className: "elb-viz-table__type", children: "JSON" })
|
|
1847
2059
|
] })
|
|
1848
2060
|
] }),
|
|
1849
|
-
rows.map((row, index) => /* @__PURE__ */
|
|
2061
|
+
rows.map((row, index) => /* @__PURE__ */ jsxs22(
|
|
1850
2062
|
"div",
|
|
1851
2063
|
{
|
|
1852
2064
|
className: "elb-viz-table__row elb-viz-table__row--event",
|
|
@@ -1856,15 +2068,15 @@ function EventsTable({ rows }) {
|
|
|
1856
2068
|
"--elb-viz-row-shift": (1 - ease(clamp(row.age / 500))) * -80
|
|
1857
2069
|
}),
|
|
1858
2070
|
children: [
|
|
1859
|
-
/* @__PURE__ */
|
|
1860
|
-
/* @__PURE__ */
|
|
1861
|
-
/* @__PURE__ */
|
|
2071
|
+
/* @__PURE__ */ jsx32("span", { className: "elb-viz-table__cell elb-viz-table__cell--n", children: index + 1 }),
|
|
2072
|
+
/* @__PURE__ */ jsx32("span", { className: "elb-viz-table__cell", children: row.name }),
|
|
2073
|
+
/* @__PURE__ */ jsxs22("span", { className: "elb-viz-table__cell elb-viz-table__json", children: [
|
|
1862
2074
|
"{",
|
|
1863
|
-
Object.entries(row.data).map(([key, value], position) => /* @__PURE__ */
|
|
2075
|
+
Object.entries(row.data).map(([key, value], position) => /* @__PURE__ */ jsxs22(Fragment10, { children: [
|
|
1864
2076
|
position === 0 ? '"' : ',"',
|
|
1865
|
-
/* @__PURE__ */
|
|
2077
|
+
/* @__PURE__ */ jsx32("span", { className: "elb-viz-table__json-key", children: key }),
|
|
1866
2078
|
'":"',
|
|
1867
|
-
/* @__PURE__ */
|
|
2079
|
+
/* @__PURE__ */ jsx32("span", { className: "elb-viz-table__json-value", children: value }),
|
|
1868
2080
|
'"'
|
|
1869
2081
|
] }, key)),
|
|
1870
2082
|
"}"
|
|
@@ -1873,15 +2085,15 @@ function EventsTable({ rows }) {
|
|
|
1873
2085
|
},
|
|
1874
2086
|
row.key
|
|
1875
2087
|
)),
|
|
1876
|
-
Array.from({ length: skeletons }, (_, index) => /* @__PURE__ */
|
|
2088
|
+
Array.from({ length: skeletons }, (_, index) => /* @__PURE__ */ jsxs22(
|
|
1877
2089
|
"div",
|
|
1878
2090
|
{
|
|
1879
2091
|
className: "elb-viz-table__row elb-viz-table__row--skeleton",
|
|
1880
2092
|
"aria-hidden": "true",
|
|
1881
2093
|
children: [
|
|
1882
|
-
/* @__PURE__ */
|
|
1883
|
-
/* @__PURE__ */
|
|
1884
|
-
/* @__PURE__ */
|
|
2094
|
+
/* @__PURE__ */ jsx32("span", { className: "elb-viz-table__cell elb-viz-table__cell--n", children: rows.length + index + 1 }),
|
|
2095
|
+
/* @__PURE__ */ jsx32("span", { className: "elb-viz-table__cell", children: /* @__PURE__ */ jsx32("span", { className: "elb-viz-table__bar" }) }),
|
|
2096
|
+
/* @__PURE__ */ jsx32("span", { className: "elb-viz-table__cell", children: /* @__PURE__ */ jsx32("span", { className: "elb-viz-table__bar" }) })
|
|
1885
2097
|
]
|
|
1886
2098
|
},
|
|
1887
2099
|
`skeleton-${index}`
|
|
@@ -1891,10 +2103,10 @@ function EventsTable({ rows }) {
|
|
|
1891
2103
|
}
|
|
1892
2104
|
|
|
1893
2105
|
// src/design/components/viz/parts/hooks.ts
|
|
1894
|
-
import { useEffect as useEffect2, useState as
|
|
2106
|
+
import { useEffect as useEffect2, useState as useState4 } from "react";
|
|
1895
2107
|
var REDUCED_MOTION = "(prefers-reduced-motion: reduce)";
|
|
1896
2108
|
function useInView(ref, threshold) {
|
|
1897
|
-
const [inView, setInView] =
|
|
2109
|
+
const [inView, setInView] = useState4(false);
|
|
1898
2110
|
useEffect2(() => {
|
|
1899
2111
|
const element = ref.current;
|
|
1900
2112
|
if (!element || typeof IntersectionObserver === "undefined") {
|
|
@@ -1917,7 +2129,7 @@ function useInView(ref, threshold) {
|
|
|
1917
2129
|
return inView;
|
|
1918
2130
|
}
|
|
1919
2131
|
function useReducedMotion() {
|
|
1920
|
-
const [reduced, setReduced] =
|
|
2132
|
+
const [reduced, setReduced] = useState4(false);
|
|
1921
2133
|
useEffect2(() => {
|
|
1922
2134
|
if (typeof window.matchMedia !== "function") return void 0;
|
|
1923
2135
|
const media = window.matchMedia(REDUCED_MOTION);
|
|
@@ -1930,14 +2142,14 @@ function useReducedMotion() {
|
|
|
1930
2142
|
}
|
|
1931
2143
|
|
|
1932
2144
|
// src/design/components/viz/parts/Pill.tsx
|
|
1933
|
-
import { jsx as
|
|
2145
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1934
2146
|
function Pill({
|
|
1935
2147
|
part,
|
|
1936
2148
|
variant = "solid",
|
|
1937
2149
|
className,
|
|
1938
2150
|
children
|
|
1939
2151
|
}) {
|
|
1940
|
-
return /* @__PURE__ */
|
|
2152
|
+
return /* @__PURE__ */ jsx33(
|
|
1941
2153
|
"span",
|
|
1942
2154
|
{
|
|
1943
2155
|
className: cx(
|
|
@@ -1952,7 +2164,7 @@ function Pill({
|
|
|
1952
2164
|
}
|
|
1953
2165
|
|
|
1954
2166
|
// src/design/components/viz/parts/Thumb.tsx
|
|
1955
|
-
import { Fragment as
|
|
2167
|
+
import { Fragment as Fragment11, jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1956
2168
|
var BUG_LINES = [
|
|
1957
2169
|
"M36 46 L28 42",
|
|
1958
2170
|
"M35 54 L27 56",
|
|
@@ -1970,9 +2182,9 @@ var BUG_SPOTS = [
|
|
|
1970
2182
|
[67, 56, 2.8]
|
|
1971
2183
|
];
|
|
1972
2184
|
function Bug() {
|
|
1973
|
-
return /* @__PURE__ */
|
|
1974
|
-
/* @__PURE__ */
|
|
1975
|
-
/* @__PURE__ */
|
|
2185
|
+
return /* @__PURE__ */ jsxs23(Fragment11, { children: [
|
|
2186
|
+
/* @__PURE__ */ jsx34("rect", { className: "elb-viz-thumb__ground", width: 112, height: 86 }),
|
|
2187
|
+
/* @__PURE__ */ jsx34(
|
|
1976
2188
|
"ellipse",
|
|
1977
2189
|
{
|
|
1978
2190
|
className: "elb-viz-thumb__shadow",
|
|
@@ -1982,18 +2194,18 @@ function Bug() {
|
|
|
1982
2194
|
ry: 6
|
|
1983
2195
|
}
|
|
1984
2196
|
),
|
|
1985
|
-
/* @__PURE__ */
|
|
2197
|
+
/* @__PURE__ */ jsx34(
|
|
1986
2198
|
"g",
|
|
1987
2199
|
{
|
|
1988
2200
|
className: "elb-viz-thumb__legs",
|
|
1989
2201
|
strokeWidth: 2.4,
|
|
1990
2202
|
strokeLinecap: "round",
|
|
1991
|
-
children: BUG_LINES.map((d) => /* @__PURE__ */
|
|
2203
|
+
children: BUG_LINES.map((d) => /* @__PURE__ */ jsx34("path", { d }, d))
|
|
1992
2204
|
}
|
|
1993
2205
|
),
|
|
1994
|
-
/* @__PURE__ */
|
|
1995
|
-
/* @__PURE__ */
|
|
1996
|
-
/* @__PURE__ */
|
|
2206
|
+
/* @__PURE__ */ jsx34("circle", { className: "elb-viz-thumb__ink", cx: 42, cy: 16, r: 2 }),
|
|
2207
|
+
/* @__PURE__ */ jsx34("circle", { className: "elb-viz-thumb__ink", cx: 70, cy: 16, r: 2 }),
|
|
2208
|
+
/* @__PURE__ */ jsx34(
|
|
1997
2209
|
"ellipse",
|
|
1998
2210
|
{
|
|
1999
2211
|
className: "elb-viz-thumb__ink",
|
|
@@ -2003,9 +2215,9 @@ function Bug() {
|
|
|
2003
2215
|
ry: 7.5
|
|
2004
2216
|
}
|
|
2005
2217
|
),
|
|
2006
|
-
/* @__PURE__ */
|
|
2007
|
-
/* @__PURE__ */
|
|
2008
|
-
/* @__PURE__ */
|
|
2218
|
+
/* @__PURE__ */ jsx34("circle", { className: "elb-viz-thumb__eye", cx: 52, cy: 29, r: 1.6 }),
|
|
2219
|
+
/* @__PURE__ */ jsx34("circle", { className: "elb-viz-thumb__eye", cx: 60, cy: 29, r: 1.6 }),
|
|
2220
|
+
/* @__PURE__ */ jsx34(
|
|
2009
2221
|
"ellipse",
|
|
2010
2222
|
{
|
|
2011
2223
|
className: "elb-viz-thumb__shell",
|
|
@@ -2015,8 +2227,8 @@ function Bug() {
|
|
|
2015
2227
|
ry: 18
|
|
2016
2228
|
}
|
|
2017
2229
|
),
|
|
2018
|
-
/* @__PURE__ */
|
|
2019
|
-
BUG_SPOTS.map(([x, y, r]) => /* @__PURE__ */
|
|
2230
|
+
/* @__PURE__ */ jsx34("path", { className: "elb-viz-thumb__seam", d: "M56 33 L56 68", strokeWidth: 2 }),
|
|
2231
|
+
BUG_SPOTS.map(([x, y, r]) => /* @__PURE__ */ jsx34(
|
|
2020
2232
|
"circle",
|
|
2021
2233
|
{
|
|
2022
2234
|
className: "elb-viz-thumb__ink",
|
|
@@ -2026,7 +2238,7 @@ function Bug() {
|
|
|
2026
2238
|
},
|
|
2027
2239
|
`${x}-${y}`
|
|
2028
2240
|
)),
|
|
2029
|
-
/* @__PURE__ */
|
|
2241
|
+
/* @__PURE__ */ jsx34(
|
|
2030
2242
|
"path",
|
|
2031
2243
|
{
|
|
2032
2244
|
className: "elb-viz-thumb__shine",
|
|
@@ -2038,9 +2250,9 @@ function Bug() {
|
|
|
2038
2250
|
] });
|
|
2039
2251
|
}
|
|
2040
2252
|
function Tech() {
|
|
2041
|
-
return /* @__PURE__ */
|
|
2042
|
-
/* @__PURE__ */
|
|
2043
|
-
/* @__PURE__ */
|
|
2253
|
+
return /* @__PURE__ */ jsxs23(Fragment11, { children: [
|
|
2254
|
+
/* @__PURE__ */ jsx34("rect", { className: "elb-viz-thumb__ground", width: 112, height: 86 }),
|
|
2255
|
+
/* @__PURE__ */ jsx34(
|
|
2044
2256
|
"rect",
|
|
2045
2257
|
{
|
|
2046
2258
|
className: "elb-viz-thumb__badge",
|
|
@@ -2051,8 +2263,8 @@ function Tech() {
|
|
|
2051
2263
|
rx: 8
|
|
2052
2264
|
}
|
|
2053
2265
|
),
|
|
2054
|
-
/* @__PURE__ */
|
|
2055
|
-
/* @__PURE__ */
|
|
2266
|
+
/* @__PURE__ */ jsx34("circle", { className: "elb-viz-thumb__dot", cx: 47, cy: 52, r: 3.2 }),
|
|
2267
|
+
/* @__PURE__ */ jsx34(
|
|
2056
2268
|
"path",
|
|
2057
2269
|
{
|
|
2058
2270
|
className: "elb-viz-thumb__wave",
|
|
@@ -2061,7 +2273,7 @@ function Tech() {
|
|
|
2061
2273
|
strokeLinecap: "round"
|
|
2062
2274
|
}
|
|
2063
2275
|
),
|
|
2064
|
-
/* @__PURE__ */
|
|
2276
|
+
/* @__PURE__ */ jsx34(
|
|
2065
2277
|
"path",
|
|
2066
2278
|
{
|
|
2067
2279
|
className: "elb-viz-thumb__wave",
|
|
@@ -2073,9 +2285,9 @@ function Tech() {
|
|
|
2073
2285
|
] });
|
|
2074
2286
|
}
|
|
2075
2287
|
function Food() {
|
|
2076
|
-
return /* @__PURE__ */
|
|
2077
|
-
/* @__PURE__ */
|
|
2078
|
-
/* @__PURE__ */
|
|
2288
|
+
return /* @__PURE__ */ jsxs23(Fragment11, { children: [
|
|
2289
|
+
/* @__PURE__ */ jsx34("rect", { className: "elb-viz-thumb__ground", width: 112, height: 86 }),
|
|
2290
|
+
/* @__PURE__ */ jsx34(
|
|
2079
2291
|
"ellipse",
|
|
2080
2292
|
{
|
|
2081
2293
|
className: "elb-viz-thumb__plate",
|
|
@@ -2085,7 +2297,7 @@ function Food() {
|
|
|
2085
2297
|
ry: 10
|
|
2086
2298
|
}
|
|
2087
2299
|
),
|
|
2088
|
-
/* @__PURE__ */
|
|
2300
|
+
/* @__PURE__ */ jsx34(
|
|
2089
2301
|
"ellipse",
|
|
2090
2302
|
{
|
|
2091
2303
|
className: "elb-viz-thumb__loaf",
|
|
@@ -2095,7 +2307,7 @@ function Food() {
|
|
|
2095
2307
|
ry: 19
|
|
2096
2308
|
}
|
|
2097
2309
|
),
|
|
2098
|
-
/* @__PURE__ */
|
|
2310
|
+
/* @__PURE__ */ jsx34(
|
|
2099
2311
|
"ellipse",
|
|
2100
2312
|
{
|
|
2101
2313
|
className: "elb-viz-thumb__crust",
|
|
@@ -2105,7 +2317,7 @@ function Food() {
|
|
|
2105
2317
|
ry: 13
|
|
2106
2318
|
}
|
|
2107
2319
|
),
|
|
2108
|
-
/* @__PURE__ */
|
|
2320
|
+
/* @__PURE__ */ jsx34(
|
|
2109
2321
|
"path",
|
|
2110
2322
|
{
|
|
2111
2323
|
className: "elb-viz-thumb__score",
|
|
@@ -2114,7 +2326,7 @@ function Food() {
|
|
|
2114
2326
|
strokeLinecap: "round"
|
|
2115
2327
|
}
|
|
2116
2328
|
),
|
|
2117
|
-
/* @__PURE__ */
|
|
2329
|
+
/* @__PURE__ */ jsx34(
|
|
2118
2330
|
"path",
|
|
2119
2331
|
{
|
|
2120
2332
|
className: "elb-viz-thumb__score",
|
|
@@ -2126,7 +2338,7 @@ function Food() {
|
|
|
2126
2338
|
] });
|
|
2127
2339
|
}
|
|
2128
2340
|
function Thumb({ kind }) {
|
|
2129
|
-
return /* @__PURE__ */
|
|
2341
|
+
return /* @__PURE__ */ jsx34(
|
|
2130
2342
|
"svg",
|
|
2131
2343
|
{
|
|
2132
2344
|
className: cx("elb-viz-thumb", `elb-viz-thumb--${kind}`),
|
|
@@ -2134,13 +2346,13 @@ function Thumb({ kind }) {
|
|
|
2134
2346
|
preserveAspectRatio: "xMidYMid slice",
|
|
2135
2347
|
"aria-hidden": "true",
|
|
2136
2348
|
focusable: "false",
|
|
2137
|
-
children: kind === "bug" ? /* @__PURE__ */
|
|
2349
|
+
children: kind === "bug" ? /* @__PURE__ */ jsx34(Bug, {}) : kind === "tech" ? /* @__PURE__ */ jsx34(Tech, {}) : /* @__PURE__ */ jsx34(Food, {})
|
|
2138
2350
|
}
|
|
2139
2351
|
);
|
|
2140
2352
|
}
|
|
2141
2353
|
|
|
2142
2354
|
// src/design/components/viz/HeroTaggingViz.tsx
|
|
2143
|
-
import { Fragment as
|
|
2355
|
+
import { Fragment as Fragment12, jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2144
2356
|
var MAX_STEP = 64;
|
|
2145
2357
|
function HeroTaggingViz({
|
|
2146
2358
|
playing = true,
|
|
@@ -2151,7 +2363,7 @@ function HeroTaggingViz({
|
|
|
2151
2363
|
const paneRef = useRef2(null);
|
|
2152
2364
|
const inView = useInView(paneRef, 0);
|
|
2153
2365
|
const reduced = useReducedMotion();
|
|
2154
|
-
const [time, setTime] =
|
|
2366
|
+
const [time, setTime] = useState5(startAt);
|
|
2155
2367
|
const animate = playing && inView && !reduced;
|
|
2156
2368
|
useEffect3(() => {
|
|
2157
2369
|
if (!animate) return void 0;
|
|
@@ -2167,22 +2379,22 @@ function HeroTaggingViz({
|
|
|
2167
2379
|
return () => cancelAnimationFrame(frame);
|
|
2168
2380
|
}, [animate, speed]);
|
|
2169
2381
|
const { article, lines, fade: fade2, caretOn, card, cursor, rows } = heroFrame(time);
|
|
2170
|
-
return /* @__PURE__ */
|
|
2171
|
-
/* @__PURE__ */
|
|
2172
|
-
/* @__PURE__ */
|
|
2173
|
-
/* @__PURE__ */
|
|
2174
|
-
/* @__PURE__ */
|
|
2175
|
-
/* @__PURE__ */
|
|
2176
|
-
/* @__PURE__ */
|
|
2382
|
+
return /* @__PURE__ */ jsx35(VizFrame, { ...rest, variant: "hero", children: /* @__PURE__ */ jsxs24("div", { className: "elb-viz-hero", children: [
|
|
2383
|
+
/* @__PURE__ */ jsxs24("div", { ref: paneRef, className: "elb-viz-hero__pane", children: [
|
|
2384
|
+
/* @__PURE__ */ jsxs24("div", { className: "elb-viz-hero__bar", children: [
|
|
2385
|
+
/* @__PURE__ */ jsxs24("span", { className: "elb-viz-hero__dots", "aria-hidden": "true", children: [
|
|
2386
|
+
/* @__PURE__ */ jsx35("span", {}),
|
|
2387
|
+
/* @__PURE__ */ jsx35("span", {}),
|
|
2388
|
+
/* @__PURE__ */ jsx35("span", {})
|
|
2177
2389
|
] }),
|
|
2178
|
-
/* @__PURE__ */
|
|
2390
|
+
/* @__PURE__ */ jsx35("span", { className: "elb-viz-hero__file", children: "ArticleTeaser.html" })
|
|
2179
2391
|
] }),
|
|
2180
|
-
/* @__PURE__ */
|
|
2392
|
+
/* @__PURE__ */ jsx35(
|
|
2181
2393
|
"div",
|
|
2182
2394
|
{
|
|
2183
2395
|
className: "elb-viz-hero__code",
|
|
2184
2396
|
style: vizStyle({ "--elb-viz-fade": fade2 }),
|
|
2185
|
-
children: lines.map((line) => /* @__PURE__ */
|
|
2397
|
+
children: lines.map((line) => /* @__PURE__ */ jsx35(
|
|
2186
2398
|
CodeLine,
|
|
2187
2399
|
{
|
|
2188
2400
|
number: line.n,
|
|
@@ -2191,23 +2403,23 @@ function HeroTaggingViz({
|
|
|
2191
2403
|
"elb-viz-hero__line",
|
|
2192
2404
|
line.on && "elb-viz-hero__line--on"
|
|
2193
2405
|
),
|
|
2194
|
-
children: line.caret === null ? /* @__PURE__ */
|
|
2195
|
-
/* @__PURE__ */
|
|
2196
|
-
/* @__PURE__ */
|
|
2406
|
+
children: line.caret === null ? /* @__PURE__ */ jsx35(CodeTokens, { tokens: line.tokens }) : /* @__PURE__ */ jsxs24(Fragment12, { children: [
|
|
2407
|
+
/* @__PURE__ */ jsx35(CodeTokens, { tokens: line.tokens.slice(0, line.caret) }),
|
|
2408
|
+
/* @__PURE__ */ jsx35(
|
|
2197
2409
|
"span",
|
|
2198
2410
|
{
|
|
2199
2411
|
className: "elb-viz-caret",
|
|
2200
2412
|
style: vizStyle({ "--elb-viz-caret": caretOn ? 1 : 0 })
|
|
2201
2413
|
}
|
|
2202
2414
|
),
|
|
2203
|
-
/* @__PURE__ */
|
|
2415
|
+
/* @__PURE__ */ jsx35(CodeTokens, { tokens: line.tokens.slice(line.caret) })
|
|
2204
2416
|
] })
|
|
2205
2417
|
},
|
|
2206
2418
|
line.id
|
|
2207
2419
|
))
|
|
2208
2420
|
}
|
|
2209
2421
|
),
|
|
2210
|
-
/* @__PURE__ */
|
|
2422
|
+
/* @__PURE__ */ jsx35("div", { className: "elb-viz-hero__stage", children: /* @__PURE__ */ jsxs24(
|
|
2211
2423
|
"div",
|
|
2212
2424
|
{
|
|
2213
2425
|
className: cx(
|
|
@@ -2219,13 +2431,13 @@ function HeroTaggingViz({
|
|
|
2219
2431
|
"--elb-viz-card-offset": card.offset
|
|
2220
2432
|
}),
|
|
2221
2433
|
children: [
|
|
2222
|
-
/* @__PURE__ */
|
|
2223
|
-
card.entity && /* @__PURE__ */
|
|
2224
|
-
card.impression && /* @__PURE__ */
|
|
2434
|
+
/* @__PURE__ */ jsxs24("div", { className: "elb-viz-hero__pills", children: [
|
|
2435
|
+
card.entity && /* @__PURE__ */ jsx35(Pill, { part: "entity", children: "article" }),
|
|
2436
|
+
card.impression && /* @__PURE__ */ jsx35(Pill, { part: "action", children: "impression" })
|
|
2225
2437
|
] }),
|
|
2226
|
-
/* @__PURE__ */
|
|
2227
|
-
/* @__PURE__ */
|
|
2228
|
-
/* @__PURE__ */
|
|
2438
|
+
/* @__PURE__ */ jsx35("div", { className: "elb-viz-hero__thumb", children: /* @__PURE__ */ jsx35(Thumb, { kind: article.thumb }) }),
|
|
2439
|
+
/* @__PURE__ */ jsxs24("div", { className: "elb-viz-hero__text", children: [
|
|
2440
|
+
/* @__PURE__ */ jsx35(
|
|
2229
2441
|
"span",
|
|
2230
2442
|
{
|
|
2231
2443
|
className: cx(
|
|
@@ -2235,7 +2447,7 @@ function HeroTaggingViz({
|
|
|
2235
2447
|
children: article.kicker
|
|
2236
2448
|
}
|
|
2237
2449
|
),
|
|
2238
|
-
/* @__PURE__ */
|
|
2450
|
+
/* @__PURE__ */ jsx35("span", { className: "elb-viz-hero__title", children: /* @__PURE__ */ jsx35(
|
|
2239
2451
|
"span",
|
|
2240
2452
|
{
|
|
2241
2453
|
className: cx(
|
|
@@ -2245,7 +2457,7 @@ function HeroTaggingViz({
|
|
|
2245
2457
|
children: article.title
|
|
2246
2458
|
}
|
|
2247
2459
|
) }),
|
|
2248
|
-
/* @__PURE__ */
|
|
2460
|
+
/* @__PURE__ */ jsx35("div", { className: "elb-viz-hero__foot", children: /* @__PURE__ */ jsxs24(
|
|
2249
2461
|
"span",
|
|
2250
2462
|
{
|
|
2251
2463
|
className: cx(
|
|
@@ -2254,7 +2466,7 @@ function HeroTaggingViz({
|
|
|
2254
2466
|
),
|
|
2255
2467
|
children: [
|
|
2256
2468
|
"Open \u2192",
|
|
2257
|
-
/* @__PURE__ */
|
|
2469
|
+
/* @__PURE__ */ jsxs24(
|
|
2258
2470
|
"span",
|
|
2259
2471
|
{
|
|
2260
2472
|
className: "elb-viz-hero__cursor",
|
|
@@ -2268,8 +2480,8 @@ function HeroTaggingViz({
|
|
|
2268
2480
|
"--elb-viz-press": cursor.pressed ? 0.8 : 1
|
|
2269
2481
|
}),
|
|
2270
2482
|
children: [
|
|
2271
|
-
/* @__PURE__ */
|
|
2272
|
-
/* @__PURE__ */
|
|
2483
|
+
/* @__PURE__ */ jsx35("span", { className: "elb-viz-hero__ring" }),
|
|
2484
|
+
/* @__PURE__ */ jsx35("span", { className: "elb-viz-hero__pointer" })
|
|
2273
2485
|
]
|
|
2274
2486
|
}
|
|
2275
2487
|
)
|
|
@@ -2281,12 +2493,12 @@ function HeroTaggingViz({
|
|
|
2281
2493
|
}
|
|
2282
2494
|
) })
|
|
2283
2495
|
] }),
|
|
2284
|
-
/* @__PURE__ */
|
|
2496
|
+
/* @__PURE__ */ jsx35(EventsTable, { rows })
|
|
2285
2497
|
] }) });
|
|
2286
2498
|
}
|
|
2287
2499
|
|
|
2288
2500
|
// src/design/components/viz/ArticleTeaserTracking.tsx
|
|
2289
|
-
import { useEffect as useEffect4, useRef as useRef3, useState as
|
|
2501
|
+
import { useEffect as useEffect4, useRef as useRef3, useState as useState6 } from "react";
|
|
2290
2502
|
|
|
2291
2503
|
// src/design/components/viz/data/article-teaser.ts
|
|
2292
2504
|
var TEASER_ENTITY = "article";
|
|
@@ -2549,7 +2761,7 @@ function teaserAdvance(n) {
|
|
|
2549
2761
|
}
|
|
2550
2762
|
|
|
2551
2763
|
// src/design/components/viz/ArticleTeaserTracking.tsx
|
|
2552
|
-
import { jsx as
|
|
2764
|
+
import { jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2553
2765
|
var FIRST_DELAY = 800;
|
|
2554
2766
|
var JUMP_DELAY = 250;
|
|
2555
2767
|
var SCROLL_DELAY = 400;
|
|
@@ -2562,7 +2774,7 @@ function TeaserCard({
|
|
|
2562
2774
|
seen,
|
|
2563
2775
|
ahead
|
|
2564
2776
|
}) {
|
|
2565
|
-
return /* @__PURE__ */
|
|
2777
|
+
return /* @__PURE__ */ jsxs25(
|
|
2566
2778
|
"div",
|
|
2567
2779
|
{
|
|
2568
2780
|
className: cx(
|
|
@@ -2571,9 +2783,9 @@ function TeaserCard({
|
|
|
2571
2783
|
ahead && "elb-viz-teaser__card--ahead"
|
|
2572
2784
|
),
|
|
2573
2785
|
children: [
|
|
2574
|
-
/* @__PURE__ */
|
|
2575
|
-
/* @__PURE__ */
|
|
2576
|
-
/* @__PURE__ */
|
|
2786
|
+
/* @__PURE__ */ jsxs25("span", { className: "elb-viz-teaser__pills", children: [
|
|
2787
|
+
/* @__PURE__ */ jsx36(Pill, { part: "entity", className: fade(seen.has("entity")), children: TEASER_ENTITY }),
|
|
2788
|
+
/* @__PURE__ */ jsx36(
|
|
2577
2789
|
Pill,
|
|
2578
2790
|
{
|
|
2579
2791
|
part: "property",
|
|
@@ -2583,14 +2795,14 @@ function TeaserCard({
|
|
|
2583
2795
|
}
|
|
2584
2796
|
)
|
|
2585
2797
|
] }),
|
|
2586
|
-
/* @__PURE__ */
|
|
2798
|
+
/* @__PURE__ */ jsx36(
|
|
2587
2799
|
PhotoPlaceholder,
|
|
2588
2800
|
{
|
|
2589
2801
|
tone: "viz",
|
|
2590
2802
|
className: cx("elb-viz-teaser__photo", fade(seen.has("image")))
|
|
2591
2803
|
}
|
|
2592
2804
|
),
|
|
2593
|
-
/* @__PURE__ */
|
|
2805
|
+
/* @__PURE__ */ jsx36(
|
|
2594
2806
|
"span",
|
|
2595
2807
|
{
|
|
2596
2808
|
className: cx(
|
|
@@ -2601,7 +2813,7 @@ function TeaserCard({
|
|
|
2601
2813
|
children: article.kicker
|
|
2602
2814
|
}
|
|
2603
2815
|
),
|
|
2604
|
-
/* @__PURE__ */
|
|
2816
|
+
/* @__PURE__ */ jsx36(
|
|
2605
2817
|
"span",
|
|
2606
2818
|
{
|
|
2607
2819
|
className: cx(
|
|
@@ -2612,7 +2824,7 @@ function TeaserCard({
|
|
|
2612
2824
|
children: article.title
|
|
2613
2825
|
}
|
|
2614
2826
|
),
|
|
2615
|
-
/* @__PURE__ */
|
|
2827
|
+
/* @__PURE__ */ jsx36(
|
|
2616
2828
|
"span",
|
|
2617
2829
|
{
|
|
2618
2830
|
className: cx(
|
|
@@ -2636,7 +2848,7 @@ function TeaserGroup({
|
|
|
2636
2848
|
const globalsOn = seen.has(page.globalsEffect);
|
|
2637
2849
|
const listOn = seen.has(page.listEffect);
|
|
2638
2850
|
const reached = page.step <= current;
|
|
2639
|
-
return /* @__PURE__ */
|
|
2851
|
+
return /* @__PURE__ */ jsxs25(
|
|
2640
2852
|
"div",
|
|
2641
2853
|
{
|
|
2642
2854
|
className: cx(
|
|
@@ -2645,7 +2857,7 @@ function TeaserGroup({
|
|
|
2645
2857
|
!reached && !lead && "elb-viz-teaser__page--ahead"
|
|
2646
2858
|
),
|
|
2647
2859
|
children: [
|
|
2648
|
-
/* @__PURE__ */
|
|
2860
|
+
/* @__PURE__ */ jsx36("span", { className: "elb-viz-teaser__page-pill", children: /* @__PURE__ */ jsx36(
|
|
2649
2861
|
Pill,
|
|
2650
2862
|
{
|
|
2651
2863
|
part: "globals",
|
|
@@ -2653,7 +2865,7 @@ function TeaserGroup({
|
|
|
2653
2865
|
children: `pagetype:${page.pagetype}`
|
|
2654
2866
|
}
|
|
2655
2867
|
) }),
|
|
2656
|
-
/* @__PURE__ */
|
|
2868
|
+
/* @__PURE__ */ jsxs25(
|
|
2657
2869
|
"div",
|
|
2658
2870
|
{
|
|
2659
2871
|
className: cx(
|
|
@@ -2661,14 +2873,14 @@ function TeaserGroup({
|
|
|
2661
2873
|
listOn && "elb-viz-teaser__list--on"
|
|
2662
2874
|
),
|
|
2663
2875
|
children: [
|
|
2664
|
-
/* @__PURE__ */
|
|
2665
|
-
/* @__PURE__ */
|
|
2666
|
-
/* @__PURE__ */
|
|
2667
|
-
page.heading !== void 0 && /* @__PURE__ */
|
|
2876
|
+
/* @__PURE__ */ jsxs25("div", { className: cx("elb-viz-teaser__list-head", fade(listOn)), children: [
|
|
2877
|
+
/* @__PURE__ */ jsxs25("span", { className: "elb-viz-teaser__list-label", children: [
|
|
2878
|
+
/* @__PURE__ */ jsx36("span", { className: "elb-viz-teaser__list-name", children: page.header }),
|
|
2879
|
+
page.heading !== void 0 && /* @__PURE__ */ jsx36("span", { className: "elb-viz-teaser__list-heading", children: page.heading })
|
|
2668
2880
|
] }),
|
|
2669
|
-
/* @__PURE__ */
|
|
2881
|
+
/* @__PURE__ */ jsx36(Pill, { part: "context", children: `list:${page.list}` })
|
|
2670
2882
|
] }),
|
|
2671
|
-
/* @__PURE__ */
|
|
2883
|
+
/* @__PURE__ */ jsx36("div", { className: "elb-viz-teaser__cards", children: page.articles.map((article, index) => /* @__PURE__ */ jsx36(
|
|
2672
2884
|
TeaserCard,
|
|
2673
2885
|
{
|
|
2674
2886
|
article,
|
|
@@ -2694,11 +2906,11 @@ function ArticleTeaserTracking({
|
|
|
2694
2906
|
const codeRef = useRef3(null);
|
|
2695
2907
|
const inView = useInView(codeRef, 0.35);
|
|
2696
2908
|
const reduced = useReducedMotion();
|
|
2697
|
-
const [shown, setShown] =
|
|
2909
|
+
const [shown, setShown] = useState6(
|
|
2698
2910
|
() => initialStep ? teaserStepEnd(initialStep) : 0
|
|
2699
2911
|
);
|
|
2700
|
-
const [delay, setDelay] =
|
|
2701
|
-
const [pinned, setPinned] =
|
|
2912
|
+
const [delay, setDelay] = useState6(FIRST_DELAY);
|
|
2913
|
+
const [pinned, setPinned] = useState6(null);
|
|
2702
2914
|
const playing = autoplay && inView && !reduced;
|
|
2703
2915
|
const end = pinned === null ? TEASER_ITEMS.length : teaserStepEnd(pinned);
|
|
2704
2916
|
useEffect4(() => {
|
|
@@ -2763,15 +2975,15 @@ function ArticleTeaserTracking({
|
|
|
2763
2975
|
separated && "elb-viz-teaser__file--separated"
|
|
2764
2976
|
);
|
|
2765
2977
|
separated = true;
|
|
2766
|
-
return /* @__PURE__ */
|
|
2767
|
-
/* @__PURE__ */
|
|
2768
|
-
/* @__PURE__ */
|
|
2978
|
+
return /* @__PURE__ */ jsx36("div", { "data-line": index, className: lineClass, children: /* @__PURE__ */ jsxs25("div", { className: fileClass, children: [
|
|
2979
|
+
/* @__PURE__ */ jsx36("span", { className: "elb-viz-teaser__file-name", children: item.name }),
|
|
2980
|
+
/* @__PURE__ */ jsx36("span", { className: "elb-viz-teaser__file-level", children: item.level })
|
|
2769
2981
|
] }) }, index);
|
|
2770
2982
|
}
|
|
2771
2983
|
lineNumber += 1;
|
|
2772
2984
|
const reached = index < count;
|
|
2773
2985
|
const isCurrent = index === count - 1 && item.effect !== void 0;
|
|
2774
|
-
return /* @__PURE__ */
|
|
2986
|
+
return /* @__PURE__ */ jsx36("div", { "data-line": index, className: lineClass, children: /* @__PURE__ */ jsx36(
|
|
2775
2987
|
CodeLine,
|
|
2776
2988
|
{
|
|
2777
2989
|
number: lineNumber,
|
|
@@ -2780,13 +2992,13 @@ function ArticleTeaserTracking({
|
|
|
2780
2992
|
"elb-viz-teaser__code",
|
|
2781
2993
|
isCurrent && `elb-viz-teaser__code--current-${item.part ?? "plain"}`
|
|
2782
2994
|
),
|
|
2783
|
-
children: /* @__PURE__ */
|
|
2995
|
+
children: /* @__PURE__ */ jsx36(CodeTokens, { tokens: item.tokens, active: reached })
|
|
2784
2996
|
}
|
|
2785
2997
|
) }, index);
|
|
2786
2998
|
});
|
|
2787
|
-
return /* @__PURE__ */
|
|
2788
|
-
/* @__PURE__ */
|
|
2789
|
-
/* @__PURE__ */
|
|
2999
|
+
return /* @__PURE__ */ jsx36(VizFrame, { ...rest, variant: "teaser", children: /* @__PURE__ */ jsxs25("div", { className: "elb-viz-teaser", children: [
|
|
3000
|
+
/* @__PURE__ */ jsxs25("div", { className: "elb-viz-teaser__header", children: [
|
|
3001
|
+
/* @__PURE__ */ jsx36("div", { className: "elb-viz-teaser__steps", children: TEASER_STEPS.map(({ step, label }) => /* @__PURE__ */ jsxs25(
|
|
2790
3002
|
"button",
|
|
2791
3003
|
{
|
|
2792
3004
|
type: "button",
|
|
@@ -2799,18 +3011,18 @@ function ArticleTeaserTracking({
|
|
|
2799
3011
|
),
|
|
2800
3012
|
onClick: () => jump(step),
|
|
2801
3013
|
children: [
|
|
2802
|
-
/* @__PURE__ */
|
|
2803
|
-
/* @__PURE__ */
|
|
3014
|
+
/* @__PURE__ */ jsx36("span", { className: "elb-viz-teaser__step-number", children: step }),
|
|
3015
|
+
/* @__PURE__ */ jsx36("span", { children: label })
|
|
2804
3016
|
]
|
|
2805
3017
|
},
|
|
2806
3018
|
step
|
|
2807
3019
|
)) }),
|
|
2808
|
-
/* @__PURE__ */
|
|
3020
|
+
/* @__PURE__ */ jsx36("div", { className: "elb-viz-teaser__legend", children: /* @__PURE__ */ jsx36(EventLegend, {}) })
|
|
2809
3021
|
] }),
|
|
2810
|
-
/* @__PURE__ */
|
|
2811
|
-
/* @__PURE__ */
|
|
2812
|
-
/* @__PURE__ */
|
|
2813
|
-
/* @__PURE__ */
|
|
3022
|
+
/* @__PURE__ */ jsx36("p", { className: "elb-viz-teaser__caption", children: TEASER_CAPTIONS[current] }),
|
|
3023
|
+
/* @__PURE__ */ jsxs25("div", { className: "elb-viz-teaser__body", children: [
|
|
3024
|
+
/* @__PURE__ */ jsx36("div", { className: "elb-viz-teaser__pane", children: /* @__PURE__ */ jsx36("div", { ref: codeRef, className: "elb-viz-teaser__scroll", children: lines }) }),
|
|
3025
|
+
/* @__PURE__ */ jsx36("div", { className: "elb-viz-teaser__pages", children: TEASER_PAGE_IDS.map((id, index) => /* @__PURE__ */ jsx36(
|
|
2814
3026
|
TeaserGroup,
|
|
2815
3027
|
{
|
|
2816
3028
|
page: TEASER_PAGES[id],
|
|
@@ -2834,6 +3046,7 @@ export {
|
|
|
2834
3046
|
Cluster,
|
|
2835
3047
|
DestinationMappingViz,
|
|
2836
3048
|
EventLegend,
|
|
3049
|
+
EventLog,
|
|
2837
3050
|
Eyebrow,
|
|
2838
3051
|
FaqItem,
|
|
2839
3052
|
FeatureItem,
|