@walkeros/explorer 4.8.0 → 4.8.1-next-1792019907609
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 +21 -0
- package/dist/design/components/index.cjs +484 -265
- 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 +474 -257
- 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
|
@@ -31,6 +31,7 @@ __export(components_exports, {
|
|
|
31
31
|
Cluster: () => Cluster,
|
|
32
32
|
DestinationMappingViz: () => DestinationMappingViz,
|
|
33
33
|
EventLegend: () => EventLegend,
|
|
34
|
+
EventLog: () => EventLog,
|
|
34
35
|
Eyebrow: () => Eyebrow,
|
|
35
36
|
FaqItem: () => FaqItem,
|
|
36
37
|
FeatureItem: () => FeatureItem,
|
|
@@ -390,8 +391,10 @@ function Card({
|
|
|
390
391
|
}
|
|
391
392
|
|
|
392
393
|
// src/design/components/atoms/InstallCommand.tsx
|
|
394
|
+
var import_react2 = require("react");
|
|
395
|
+
|
|
396
|
+
// src/design/components/atoms/useCopy.ts
|
|
393
397
|
var import_react = require("react");
|
|
394
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
395
398
|
var CONFIRM_MS = 1400;
|
|
396
399
|
async function copyText(text) {
|
|
397
400
|
try {
|
|
@@ -401,13 +404,7 @@ async function copyText(text) {
|
|
|
401
404
|
return false;
|
|
402
405
|
}
|
|
403
406
|
}
|
|
404
|
-
function
|
|
405
|
-
command = "npm i -g @walkeros/cli",
|
|
406
|
-
className,
|
|
407
|
-
"aria-describedby": describedBy,
|
|
408
|
-
...rest
|
|
409
|
-
}) {
|
|
410
|
-
const hintId = (0, import_react.useId)();
|
|
407
|
+
function useCopy() {
|
|
411
408
|
const [state, setState] = (0, import_react.useState)("idle");
|
|
412
409
|
const mounted = (0, import_react.useRef)(true);
|
|
413
410
|
const timer = (0, import_react.useRef)(void 0);
|
|
@@ -418,13 +415,31 @@ function InstallCommand({
|
|
|
418
415
|
clearTimeout(timer.current);
|
|
419
416
|
};
|
|
420
417
|
}, []);
|
|
421
|
-
const copy = async () => {
|
|
422
|
-
const copied = await copyText(
|
|
418
|
+
const copy = async (text) => {
|
|
419
|
+
const copied = await copyText(text);
|
|
423
420
|
if (!mounted.current) return;
|
|
424
421
|
clearTimeout(timer.current);
|
|
425
422
|
setState(copied ? "done" : "failed");
|
|
426
423
|
if (copied) timer.current = setTimeout(() => setState("idle"), CONFIRM_MS);
|
|
427
424
|
};
|
|
425
|
+
return [
|
|
426
|
+
state,
|
|
427
|
+
(text) => {
|
|
428
|
+
void copy(text);
|
|
429
|
+
}
|
|
430
|
+
];
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// src/design/components/atoms/InstallCommand.tsx
|
|
434
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
435
|
+
function InstallCommand({
|
|
436
|
+
command = "npm i -g @walkeros/cli",
|
|
437
|
+
className,
|
|
438
|
+
"aria-describedby": describedBy,
|
|
439
|
+
...rest
|
|
440
|
+
}) {
|
|
441
|
+
const hintId = (0, import_react2.useId)();
|
|
442
|
+
const [state, copy] = useCopy();
|
|
428
443
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
429
444
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
430
445
|
"button",
|
|
@@ -433,9 +448,7 @@ function InstallCommand({
|
|
|
433
448
|
"aria-describedby": describedBy ? `${hintId} ${describedBy}` : hintId,
|
|
434
449
|
type: "button",
|
|
435
450
|
className: cx("elb-cmd", className),
|
|
436
|
-
onClick: () =>
|
|
437
|
-
void copy();
|
|
438
|
-
},
|
|
451
|
+
onClick: () => copy(command),
|
|
439
452
|
children: [
|
|
440
453
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { children: [
|
|
441
454
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "elb-cmd__prompt", "aria-hidden": "true", children: [
|
|
@@ -609,7 +622,7 @@ function FeatureItem({
|
|
|
609
622
|
}
|
|
610
623
|
|
|
611
624
|
// src/design/components/molecules/FaqItem.tsx
|
|
612
|
-
var
|
|
625
|
+
var import_react3 = require("react");
|
|
613
626
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
614
627
|
function FaqItem({
|
|
615
628
|
question,
|
|
@@ -621,7 +634,7 @@ function FaqItem({
|
|
|
621
634
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("details", { ...rest, className: cx("elb-faq", className), children: [
|
|
622
635
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("summary", { className: "elb-faq__question", children: question }),
|
|
623
636
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "elb-faq__answer", children: parts.map(
|
|
624
|
-
(part, index) => typeof part === "string" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: part }, index) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
637
|
+
(part, index) => typeof part === "string" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { children: part }, index) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react3.Fragment, { children: part }, index)
|
|
625
638
|
) })
|
|
626
639
|
] });
|
|
627
640
|
}
|
|
@@ -786,8 +799,230 @@ function BrowserFrame({
|
|
|
786
799
|
] });
|
|
787
800
|
}
|
|
788
801
|
|
|
789
|
-
// src/design/components/molecules/
|
|
802
|
+
// src/design/components/molecules/EventLog.tsx
|
|
803
|
+
var import_react4 = require("react");
|
|
804
|
+
|
|
805
|
+
// src/design/components/atoms/CodeTokens.tsx
|
|
790
806
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
807
|
+
function CodeTokens({
|
|
808
|
+
tokens,
|
|
809
|
+
active = false
|
|
810
|
+
}) {
|
|
811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, { children: tokens.map((token, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
812
|
+
"span",
|
|
813
|
+
{
|
|
814
|
+
className: cx(
|
|
815
|
+
"elb-viz-tok",
|
|
816
|
+
`elb-viz-tok--${token.kind}`,
|
|
817
|
+
active && token.mark && `elb-viz-tok--mark-${token.mark}`
|
|
818
|
+
),
|
|
819
|
+
children: token.t
|
|
820
|
+
},
|
|
821
|
+
index
|
|
822
|
+
)) });
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
// src/design/components/codeTokens.ts
|
|
826
|
+
function tok(t, kind, mark) {
|
|
827
|
+
return mark ? { t, kind, mark } : { t, kind };
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
// src/design/components/molecules/EventLog.tsx
|
|
831
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
832
|
+
var SECTIONS = [
|
|
833
|
+
"data",
|
|
834
|
+
"context",
|
|
835
|
+
"globals",
|
|
836
|
+
"consent",
|
|
837
|
+
"user",
|
|
838
|
+
"nested"
|
|
839
|
+
];
|
|
840
|
+
var VIEWS = [
|
|
841
|
+
["fields", "Fields"],
|
|
842
|
+
["json", "JSON"]
|
|
843
|
+
];
|
|
844
|
+
var COPY = {
|
|
845
|
+
idle: { label: "Copy", icon: "copy" },
|
|
846
|
+
done: { label: "Copied", icon: "check" },
|
|
847
|
+
failed: { label: "Copy failed", icon: "warning" }
|
|
848
|
+
};
|
|
849
|
+
var isGroup = (value) => typeof value === "object" && value !== null;
|
|
850
|
+
function timeOf(timestamp) {
|
|
851
|
+
if (typeof timestamp !== "number") return null;
|
|
852
|
+
const date = new Date(timestamp);
|
|
853
|
+
if (Number.isNaN(date.getTime())) return null;
|
|
854
|
+
const clock = [date.getHours(), date.getMinutes(), date.getSeconds()].map((part) => String(part).padStart(2, "0")).join(":");
|
|
855
|
+
return { iso: date.toISOString(), clock };
|
|
856
|
+
}
|
|
857
|
+
function valueToken(value) {
|
|
858
|
+
if (typeof value === "string") return tok(value, "str");
|
|
859
|
+
if (typeof value === "number" || typeof value === "boolean")
|
|
860
|
+
return tok(String(value), "num");
|
|
861
|
+
return tok(String(JSON.stringify(value)), "text");
|
|
862
|
+
}
|
|
863
|
+
function fieldRows(section, group) {
|
|
864
|
+
return Object.entries(group).map(([key, value]) => {
|
|
865
|
+
if (section === "context" && Array.isArray(value) && value.length === 2)
|
|
866
|
+
return { key, value: valueToken(value[0]), sub: `order ${value[1]}` };
|
|
867
|
+
if (section === "consent" && typeof value === "boolean")
|
|
868
|
+
return { key, value: tok(value ? "granted" : "denied", "str") };
|
|
869
|
+
return { key, value: valueToken(value) };
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
var JSON_TOKEN = /("(?:[^"\\]|\\.)*")(\s*:)?|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?|\b(?:true|false|null)\b|[{}[\],]/g;
|
|
873
|
+
function jsonTokens(line) {
|
|
874
|
+
const tokens = [];
|
|
875
|
+
let last = 0;
|
|
876
|
+
for (const match of line.matchAll(JSON_TOKEN)) {
|
|
877
|
+
const [text, quoted, colon] = match;
|
|
878
|
+
const at = match.index ?? 0;
|
|
879
|
+
if (at > last) tokens.push(tok(line.slice(last, at), "text"));
|
|
880
|
+
if (quoted && colon) tokens.push(tok(quoted, "key"), tok(colon, "punct"));
|
|
881
|
+
else if (quoted) tokens.push(tok(quoted, "str"));
|
|
882
|
+
else tokens.push(tok(text, /^[{}[\],]$/.test(text) ? "punct" : "num"));
|
|
883
|
+
last = at + text.length;
|
|
884
|
+
}
|
|
885
|
+
if (last < line.length) tokens.push(tok(line.slice(last), "text"));
|
|
886
|
+
return tokens;
|
|
887
|
+
}
|
|
888
|
+
function EventName({ event }) {
|
|
889
|
+
const { name, entity, action } = event;
|
|
890
|
+
if (!entity || !action || name !== `${entity} ${action}`) return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_jsx_runtime22.Fragment, { children: name });
|
|
891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|
|
892
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "elb-event-log__entity", children: entity }),
|
|
893
|
+
" ",
|
|
894
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "elb-event-log__action", children: action })
|
|
895
|
+
] });
|
|
896
|
+
}
|
|
897
|
+
function Fields({ event }) {
|
|
898
|
+
const fields = new Map(Object.entries(event));
|
|
899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "elb-event-log__sections", children: SECTIONS.map((section) => {
|
|
900
|
+
const group = fields.get(section);
|
|
901
|
+
const rows = isGroup(group) ? fieldRows(section, group) : [];
|
|
902
|
+
if (rows.length === 0 && section !== "consent") return null;
|
|
903
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "elb-event-log__section", children: [
|
|
904
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "elb-event-log__label", children: section }),
|
|
905
|
+
rows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "elb-event-log__field elb-event-log__sub", children: "none" }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("dl", { className: "elb-event-log__fields", children: rows.map(({ key, value, sub }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "elb-event-log__field", children: [
|
|
906
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("dt", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CodeTokens, { tokens: [tok(key, "key")] }) }),
|
|
907
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("dd", { children: [
|
|
908
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CodeTokens, { tokens: [value] }),
|
|
909
|
+
sub && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "elb-event-log__sub", children: sub })
|
|
910
|
+
] })
|
|
911
|
+
] }, key)) })
|
|
912
|
+
] }, section);
|
|
913
|
+
}) });
|
|
914
|
+
}
|
|
915
|
+
function Json({ text }) {
|
|
916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "elb-event-log__json", children: text.split("\n").map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react4.Fragment, { children: [
|
|
917
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CodeTokens, { tokens: jsonTokens(line) }),
|
|
918
|
+
"\n"
|
|
919
|
+
] }, index)) });
|
|
920
|
+
}
|
|
921
|
+
function EventLog({
|
|
922
|
+
records,
|
|
923
|
+
selectedSeq,
|
|
924
|
+
onSelect,
|
|
925
|
+
onClear,
|
|
926
|
+
emptyText = "Click, scroll or load something tagged on the page and its events show up here.",
|
|
927
|
+
className,
|
|
928
|
+
...rest
|
|
929
|
+
}) {
|
|
930
|
+
const [view, setView] = (0, import_react4.useState)("fields");
|
|
931
|
+
const [copyState, copy] = useCopy();
|
|
932
|
+
const newest = records[records.length - 1];
|
|
933
|
+
const selected = records.find((record) => record.seq === selectedSeq) ?? newest;
|
|
934
|
+
const json = selected ? JSON.stringify(selected.event, null, 2) : "";
|
|
935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { ...rest, className: cx("elb-event-log", className), children: [
|
|
936
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "elb-event-log__bar", children: [
|
|
937
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "elb-event-log__title", children: "Events" }),
|
|
938
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "elb-event-log__count", children: records.length }),
|
|
939
|
+
onClear && records.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
940
|
+
Button,
|
|
941
|
+
{
|
|
942
|
+
variant: "secondary",
|
|
943
|
+
className: "elb-event-log__button elb-event-log__clear",
|
|
944
|
+
onClick: onClear,
|
|
945
|
+
children: "Clear"
|
|
946
|
+
}
|
|
947
|
+
)
|
|
948
|
+
] }),
|
|
949
|
+
selected === void 0 || newest === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "elb-event-log__empty", children: [
|
|
950
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "elb-event-log__empty-title", children: "No events yet" }),
|
|
951
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "elb-event-log__empty-text", children: emptyText })
|
|
952
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "elb-event-log__body", children: [
|
|
953
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("ul", { className: "elb-event-log__list", children: [...records].reverse().map(({ seq, event }) => {
|
|
954
|
+
const time = timeOf(event.timestamp);
|
|
955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
956
|
+
"button",
|
|
957
|
+
{
|
|
958
|
+
type: "button",
|
|
959
|
+
className: "elb-event-log__row",
|
|
960
|
+
"aria-pressed": seq === selected.seq,
|
|
961
|
+
disabled: !onSelect,
|
|
962
|
+
onClick: () => onSelect?.(seq === newest.seq ? null : seq),
|
|
963
|
+
children: [
|
|
964
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("span", { className: "elb-event-log__seq", children: [
|
|
965
|
+
"#",
|
|
966
|
+
seq
|
|
967
|
+
] }),
|
|
968
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "elb-event-log__name", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(EventName, { event }) }),
|
|
969
|
+
event.trigger && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(InlineCode, { className: "elb-event-log__trigger", children: event.trigger }),
|
|
970
|
+
time && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("time", { className: "elb-event-log__time", dateTime: time.iso, children: time.clock })
|
|
971
|
+
]
|
|
972
|
+
}
|
|
973
|
+
) }, seq);
|
|
974
|
+
}) }),
|
|
975
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "elb-event-log__detail", "data-theme": "dark", children: [
|
|
976
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "elb-event-log__head", children: [
|
|
977
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "elb-event-log__summary", children: [
|
|
978
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "elb-event-log__detail-name", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(EventName, { event: selected.event }) }),
|
|
979
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "elb-event-log__meta", children: [
|
|
980
|
+
`#${selected.seq}`,
|
|
981
|
+
selected.event.trigger,
|
|
982
|
+
timeOf(selected.event.timestamp)?.clock
|
|
983
|
+
].filter(Boolean).join(" \xB7 ") })
|
|
984
|
+
] }),
|
|
985
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
986
|
+
"div",
|
|
987
|
+
{
|
|
988
|
+
className: "elb-event-log__views",
|
|
989
|
+
role: "group",
|
|
990
|
+
"aria-label": "View",
|
|
991
|
+
children: VIEWS.map(([id, label]) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
992
|
+
"button",
|
|
993
|
+
{
|
|
994
|
+
type: "button",
|
|
995
|
+
className: "elb-event-log__view",
|
|
996
|
+
"aria-pressed": view === id,
|
|
997
|
+
onClick: () => setView(id),
|
|
998
|
+
children: label
|
|
999
|
+
},
|
|
1000
|
+
id
|
|
1001
|
+
))
|
|
1002
|
+
}
|
|
1003
|
+
),
|
|
1004
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1005
|
+
Button,
|
|
1006
|
+
{
|
|
1007
|
+
variant: "secondary",
|
|
1008
|
+
className: "elb-event-log__button",
|
|
1009
|
+
onClick: () => copy(json),
|
|
1010
|
+
children: [
|
|
1011
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon, { name: COPY[copyState].icon, size: 12 }),
|
|
1012
|
+
COPY[copyState].label
|
|
1013
|
+
]
|
|
1014
|
+
}
|
|
1015
|
+
),
|
|
1016
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "elb-event-log__status", role: "status", children: copyState === "idle" ? "" : COPY[copyState].label })
|
|
1017
|
+
] }),
|
|
1018
|
+
view === "fields" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Fields, { event: selected.event }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Json, { text: json })
|
|
1019
|
+
] })
|
|
1020
|
+
] })
|
|
1021
|
+
] });
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
// src/design/components/molecules/QuickstartSteps.tsx
|
|
1025
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
791
1026
|
var ARROWS = [
|
|
792
1027
|
{
|
|
793
1028
|
kind: "wave",
|
|
@@ -805,12 +1040,12 @@ var ARROWS = [
|
|
|
805
1040
|
}
|
|
806
1041
|
];
|
|
807
1042
|
function Arrow({ kind, paths }) {
|
|
808
|
-
return /* @__PURE__ */ (0,
|
|
1043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
809
1044
|
"li",
|
|
810
1045
|
{
|
|
811
1046
|
className: cx("elb-quickstart__arrow", `elb-quickstart__arrow--${kind}`),
|
|
812
1047
|
"aria-hidden": "true",
|
|
813
|
-
children: /* @__PURE__ */ (0,
|
|
1048
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
814
1049
|
"svg",
|
|
815
1050
|
{
|
|
816
1051
|
width: "76",
|
|
@@ -821,7 +1056,7 @@ function Arrow({ kind, paths }) {
|
|
|
821
1056
|
strokeWidth: "2.2",
|
|
822
1057
|
strokeLinecap: "round",
|
|
823
1058
|
strokeLinejoin: "round",
|
|
824
|
-
children: paths.map((d) => /* @__PURE__ */ (0,
|
|
1059
|
+
children: paths.map((d) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d }, d))
|
|
825
1060
|
}
|
|
826
1061
|
)
|
|
827
1062
|
}
|
|
@@ -833,18 +1068,18 @@ function QuickstartSteps({
|
|
|
833
1068
|
className,
|
|
834
1069
|
...rest
|
|
835
1070
|
}) {
|
|
836
|
-
return /* @__PURE__ */ (0,
|
|
837
|
-
/* @__PURE__ */ (0,
|
|
838
|
-
const item = /* @__PURE__ */ (0,
|
|
839
|
-
/* @__PURE__ */ (0,
|
|
840
|
-
/* @__PURE__ */ (0,
|
|
841
|
-
/* @__PURE__ */ (0,
|
|
1071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { ...rest, className: cx("elb-quickstart", className), children: [
|
|
1072
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("ol", { className: "elb-quickstart__steps", children: steps.flatMap((step, index) => {
|
|
1073
|
+
const item = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("li", { className: "elb-quickstart__step", children: [
|
|
1074
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "elb-quickstart__head", children: [
|
|
1075
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "elb-quickstart__num", "aria-hidden": "true", children: index + 1 }),
|
|
1076
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h3", { className: "elb-quickstart__title", children: step.title })
|
|
842
1077
|
] }),
|
|
843
|
-
/* @__PURE__ */ (0,
|
|
1078
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "elb-quickstart__copy", children: step.text })
|
|
844
1079
|
] }, step.title);
|
|
845
1080
|
return index < steps.length - 1 ? [
|
|
846
1081
|
item,
|
|
847
|
-
/* @__PURE__ */ (0,
|
|
1082
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
848
1083
|
Arrow,
|
|
849
1084
|
{
|
|
850
1085
|
...ARROWS[index % ARROWS.length]
|
|
@@ -858,14 +1093,14 @@ function QuickstartSteps({
|
|
|
858
1093
|
}
|
|
859
1094
|
|
|
860
1095
|
// src/design/components/layout/Section.tsx
|
|
861
|
-
var
|
|
1096
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
862
1097
|
function Section({
|
|
863
1098
|
children,
|
|
864
1099
|
tone = "default",
|
|
865
1100
|
className,
|
|
866
1101
|
...rest
|
|
867
1102
|
}) {
|
|
868
|
-
return /* @__PURE__ */ (0,
|
|
1103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
869
1104
|
"section",
|
|
870
1105
|
{
|
|
871
1106
|
...rest,
|
|
@@ -874,13 +1109,13 @@ function Section({
|
|
|
874
1109
|
tone === "alt" && "elb-section--alt",
|
|
875
1110
|
className
|
|
876
1111
|
),
|
|
877
|
-
children: /* @__PURE__ */ (0,
|
|
1112
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "elb-section__inner", children })
|
|
878
1113
|
}
|
|
879
1114
|
);
|
|
880
1115
|
}
|
|
881
1116
|
|
|
882
1117
|
// src/design/components/layout/CardGrid.tsx
|
|
883
|
-
var
|
|
1118
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
884
1119
|
function CardGrid({
|
|
885
1120
|
children,
|
|
886
1121
|
min,
|
|
@@ -888,7 +1123,7 @@ function CardGrid({
|
|
|
888
1123
|
className,
|
|
889
1124
|
...rest
|
|
890
1125
|
}) {
|
|
891
|
-
return /* @__PURE__ */ (0,
|
|
1126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
892
1127
|
"div",
|
|
893
1128
|
{
|
|
894
1129
|
...rest,
|
|
@@ -904,7 +1139,7 @@ function CardGrid({
|
|
|
904
1139
|
}
|
|
905
1140
|
|
|
906
1141
|
// src/design/components/layout/Split.tsx
|
|
907
|
-
var
|
|
1142
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
908
1143
|
function Split({
|
|
909
1144
|
start,
|
|
910
1145
|
end,
|
|
@@ -912,7 +1147,7 @@ function Split({
|
|
|
912
1147
|
className,
|
|
913
1148
|
...rest
|
|
914
1149
|
}) {
|
|
915
|
-
return /* @__PURE__ */ (0,
|
|
1150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
916
1151
|
"div",
|
|
917
1152
|
{
|
|
918
1153
|
...rest,
|
|
@@ -922,15 +1157,15 @@ function Split({
|
|
|
922
1157
|
className
|
|
923
1158
|
),
|
|
924
1159
|
children: [
|
|
925
|
-
/* @__PURE__ */ (0,
|
|
926
|
-
/* @__PURE__ */ (0,
|
|
1160
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "elb-split__start", children: start }),
|
|
1161
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "elb-split__end", children: end })
|
|
927
1162
|
]
|
|
928
1163
|
}
|
|
929
1164
|
);
|
|
930
1165
|
}
|
|
931
1166
|
|
|
932
1167
|
// src/design/components/layout/Cluster.tsx
|
|
933
|
-
var
|
|
1168
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
934
1169
|
function Cluster({
|
|
935
1170
|
children,
|
|
936
1171
|
gap = "actions",
|
|
@@ -939,7 +1174,7 @@ function Cluster({
|
|
|
939
1174
|
className,
|
|
940
1175
|
...rest
|
|
941
1176
|
}) {
|
|
942
|
-
return /* @__PURE__ */ (0,
|
|
1177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
943
1178
|
"div",
|
|
944
1179
|
{
|
|
945
1180
|
...rest,
|
|
@@ -956,7 +1191,7 @@ function Cluster({
|
|
|
956
1191
|
}
|
|
957
1192
|
|
|
958
1193
|
// src/design/components/layout/Hero.tsx
|
|
959
|
-
var
|
|
1194
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
960
1195
|
function Hero({
|
|
961
1196
|
eyebrow,
|
|
962
1197
|
title,
|
|
@@ -968,8 +1203,8 @@ function Hero({
|
|
|
968
1203
|
className,
|
|
969
1204
|
...rest
|
|
970
1205
|
}) {
|
|
971
|
-
return /* @__PURE__ */ (0,
|
|
972
|
-
/* @__PURE__ */ (0,
|
|
1206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("section", { ...rest, className: cx("elb-hero", className), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "elb-hero__inner", children: [
|
|
1207
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
973
1208
|
SectionHeading,
|
|
974
1209
|
{
|
|
975
1210
|
level: 1,
|
|
@@ -979,14 +1214,14 @@ function Hero({
|
|
|
979
1214
|
lead
|
|
980
1215
|
}
|
|
981
1216
|
),
|
|
982
|
-
/* @__PURE__ */ (0,
|
|
983
|
-
proof !== void 0 && /* @__PURE__ */ (0,
|
|
984
|
-
children !== void 0 && /* @__PURE__ */ (0,
|
|
1217
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "elb-hero__actions", children: actions }),
|
|
1218
|
+
proof !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "elb-hero__proof", children: proof }),
|
|
1219
|
+
children !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "elb-hero__demo", children })
|
|
985
1220
|
] }) });
|
|
986
1221
|
}
|
|
987
1222
|
|
|
988
1223
|
// src/design/components/viz/DestinationMappingViz.tsx
|
|
989
|
-
var
|
|
1224
|
+
var import_react5 = require("react");
|
|
990
1225
|
|
|
991
1226
|
// src/design/components/viz/data/destination-mapping.ts
|
|
992
1227
|
var GENERATED_ID = "\u2026";
|
|
@@ -1353,58 +1588,6 @@ var MAPPING_EVENTS = [
|
|
|
1353
1588
|
}
|
|
1354
1589
|
];
|
|
1355
1590
|
|
|
1356
|
-
// src/design/components/viz/parts/CodeTokens.tsx
|
|
1357
|
-
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1358
|
-
function CodeTokens({
|
|
1359
|
-
tokens,
|
|
1360
|
-
active = false
|
|
1361
|
-
}) {
|
|
1362
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children: tokens.map((token, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1363
|
-
"span",
|
|
1364
|
-
{
|
|
1365
|
-
className: cx(
|
|
1366
|
-
"elb-viz-tok",
|
|
1367
|
-
`elb-viz-tok--${token.kind}`,
|
|
1368
|
-
active && token.mark && `elb-viz-tok--mark-${token.mark}`
|
|
1369
|
-
),
|
|
1370
|
-
children: token.t
|
|
1371
|
-
},
|
|
1372
|
-
index
|
|
1373
|
-
)) });
|
|
1374
|
-
}
|
|
1375
|
-
function CodeLine({ number, bar, className, children }) {
|
|
1376
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: cx("elb-viz-line", className), children: [
|
|
1377
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1378
|
-
"span",
|
|
1379
|
-
{
|
|
1380
|
-
className: cx("elb-viz-line__bar", bar && `elb-viz-line__bar--${bar}`),
|
|
1381
|
-
"aria-hidden": "true"
|
|
1382
|
-
}
|
|
1383
|
-
),
|
|
1384
|
-
number !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "elb-viz-line__number", children: number }),
|
|
1385
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "elb-viz-line__code", children })
|
|
1386
|
-
] });
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
// src/design/components/viz/parts/tokens.ts
|
|
1390
|
-
function tok(t, kind, mark) {
|
|
1391
|
-
return mark ? { t, kind, mark } : { t, kind };
|
|
1392
|
-
}
|
|
1393
|
-
function typedLength(tokens) {
|
|
1394
|
-
return tokens.reduce((length, token) => length + token.t.length, 0);
|
|
1395
|
-
}
|
|
1396
|
-
function truncate(tokens, n) {
|
|
1397
|
-
const out = [];
|
|
1398
|
-
let left = n;
|
|
1399
|
-
for (const token of tokens) {
|
|
1400
|
-
if (left <= 0) break;
|
|
1401
|
-
const t = token.t.slice(0, left);
|
|
1402
|
-
out.push({ ...token, t });
|
|
1403
|
-
left -= t.length;
|
|
1404
|
-
}
|
|
1405
|
-
return out;
|
|
1406
|
-
}
|
|
1407
|
-
|
|
1408
1591
|
// src/design/components/viz/parts/format.ts
|
|
1409
1592
|
var ELIDED = "{\u2026}";
|
|
1410
1593
|
function isRecord(value) {
|
|
@@ -1456,13 +1639,17 @@ function formatCall(record) {
|
|
|
1456
1639
|
];
|
|
1457
1640
|
}
|
|
1458
1641
|
function formatElb(event) {
|
|
1459
|
-
const
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1642
|
+
const fields = [
|
|
1643
|
+
`name: ${literal(`${event.entity} ${event.action}`)}`,
|
|
1644
|
+
`data: ${literal(event.data)}`
|
|
1645
|
+
];
|
|
1646
|
+
if (event.nested?.length) {
|
|
1647
|
+
const nested = event.nested.map(
|
|
1648
|
+
(entity) => `{ entity: ${literal(entity.entity)}, \u2026 }`
|
|
1649
|
+
);
|
|
1650
|
+
fields.push(`nested: [${nested.join(", ")}]`);
|
|
1651
|
+
}
|
|
1652
|
+
return `elb({ ${fields.join(", ")} })`;
|
|
1466
1653
|
}
|
|
1467
1654
|
var TOKEN = /"[^"]*"|'[^']*'|\d+(?:\.\d+)?|[A-Za-z_]\w*|\s+|./g;
|
|
1468
1655
|
var CALLS = /^(?:gtag|fbq|elb|ttq|track|amplitude|revenue|Revenue|set[A-Z]\w*)$/;
|
|
@@ -1492,38 +1679,38 @@ function tokenizeCode(line, highlight) {
|
|
|
1492
1679
|
}
|
|
1493
1680
|
|
|
1494
1681
|
// src/design/components/viz/parts/VizFrame.tsx
|
|
1495
|
-
var
|
|
1682
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1496
1683
|
function VizFrame({
|
|
1497
1684
|
variant,
|
|
1498
1685
|
children,
|
|
1499
1686
|
className,
|
|
1500
1687
|
...rest
|
|
1501
1688
|
}) {
|
|
1502
|
-
return /* @__PURE__ */ (0,
|
|
1689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1503
1690
|
"div",
|
|
1504
1691
|
{
|
|
1505
1692
|
...rest,
|
|
1506
1693
|
"data-theme": "dark",
|
|
1507
1694
|
className: cx("elb-viz", `elb-viz--${variant}`, className),
|
|
1508
|
-
children: /* @__PURE__ */ (0,
|
|
1695
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "elb-viz__body", children })
|
|
1509
1696
|
}
|
|
1510
1697
|
);
|
|
1511
1698
|
}
|
|
1512
1699
|
|
|
1513
1700
|
// src/design/components/viz/DestinationMappingViz.tsx
|
|
1514
|
-
var
|
|
1701
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1515
1702
|
function DestinationMappingViz({
|
|
1516
1703
|
initialEvent = 0,
|
|
1517
1704
|
caption = MAPPING_CAPTION,
|
|
1518
1705
|
...rest
|
|
1519
1706
|
}) {
|
|
1520
|
-
const [index, setIndex] = (0,
|
|
1707
|
+
const [index, setIndex] = (0, import_react5.useState)(initialEvent);
|
|
1521
1708
|
const event = MAPPING_EVENTS[index];
|
|
1522
1709
|
const name = `${event.entity} ${event.action}`;
|
|
1523
|
-
return /* @__PURE__ */ (0,
|
|
1524
|
-
/* @__PURE__ */ (0,
|
|
1525
|
-
/* @__PURE__ */ (0,
|
|
1526
|
-
/* @__PURE__ */ (0,
|
|
1710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(VizFrame, { ...rest, variant: "mapping", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "elb-viz-mapping", children: [
|
|
1711
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "elb-viz-mapping__pick", children: [
|
|
1712
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "elb-viz-mapping__label", children: "Pick an event" }),
|
|
1713
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "elb-viz-mapping__chips", children: MAPPING_EVENTS.map((item, position) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
1527
1714
|
"button",
|
|
1528
1715
|
{
|
|
1529
1716
|
type: "button",
|
|
@@ -1535,21 +1722,21 @@ function DestinationMappingViz({
|
|
|
1535
1722
|
),
|
|
1536
1723
|
onClick: () => setIndex(position),
|
|
1537
1724
|
children: [
|
|
1538
|
-
/* @__PURE__ */ (0,
|
|
1539
|
-
/* @__PURE__ */ (0,
|
|
1725
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "elb-viz-mapping__chip-entity", children: item.entity }),
|
|
1726
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "elb-viz-mapping__chip-action", children: item.action })
|
|
1540
1727
|
]
|
|
1541
1728
|
},
|
|
1542
1729
|
`${item.entity} ${item.action}`
|
|
1543
1730
|
)) })
|
|
1544
1731
|
] }),
|
|
1545
|
-
/* @__PURE__ */ (0,
|
|
1546
|
-
/* @__PURE__ */ (0,
|
|
1547
|
-
/* @__PURE__ */ (0,
|
|
1548
|
-
/* @__PURE__ */ (0,
|
|
1549
|
-
/* @__PURE__ */ (0,
|
|
1550
|
-
/* @__PURE__ */ (0,
|
|
1551
|
-
/* @__PURE__ */ (0,
|
|
1552
|
-
/* @__PURE__ */ (0,
|
|
1732
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "elb-viz-mapping__event", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(CodeTokens, { tokens: tokenizeCode(formatElb(event), name), active: true }) }),
|
|
1733
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "elb-viz-mapping__body", children: [
|
|
1734
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "elb-viz-mapping__comment", children: "// same event, four destinations, zero app code touched" }),
|
|
1735
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "elb-viz-mapping__cards", children: event.destinations.map((destination) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "elb-viz-mapping__card", children: [
|
|
1736
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "elb-viz-mapping__name", children: destination.label }),
|
|
1737
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "elb-viz-mapping__row", children: [
|
|
1738
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "elb-viz-mapping__tag", children: "mapping" }),
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "elb-viz-mapping__rule", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1553
1740
|
CodeTokens,
|
|
1554
1741
|
{
|
|
1555
1742
|
tokens: tokenizeCode(
|
|
@@ -1564,9 +1751,9 @@ function DestinationMappingViz({
|
|
|
1564
1751
|
}
|
|
1565
1752
|
) })
|
|
1566
1753
|
] }),
|
|
1567
|
-
/* @__PURE__ */ (0,
|
|
1568
|
-
/* @__PURE__ */ (0,
|
|
1569
|
-
/* @__PURE__ */ (0,
|
|
1754
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "elb-viz-mapping__row elb-viz-mapping__row--sends", children: [
|
|
1755
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "elb-viz-mapping__tag", children: "sends" }),
|
|
1756
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "elb-viz-mapping__calls", children: destination.calls.flatMap((call) => formatCall(call)).map((line, position) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "elb-viz-mapping__line", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1570
1757
|
CodeTokens,
|
|
1571
1758
|
{
|
|
1572
1759
|
tokens: tokenizeCode(line, destination.rule.name),
|
|
@@ -1576,12 +1763,12 @@ function DestinationMappingViz({
|
|
|
1576
1763
|
] })
|
|
1577
1764
|
] }, destination.id)) })
|
|
1578
1765
|
] }),
|
|
1579
|
-
caption !== "" && /* @__PURE__ */ (0,
|
|
1766
|
+
caption !== "" && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "elb-viz-mapping__caption", children: caption })
|
|
1580
1767
|
] }) });
|
|
1581
1768
|
}
|
|
1582
1769
|
|
|
1583
1770
|
// src/design/components/viz/HeroTaggingViz.tsx
|
|
1584
|
-
var
|
|
1771
|
+
var import_react8 = require("react");
|
|
1585
1772
|
|
|
1586
1773
|
// src/design/components/viz/parts/timeline.ts
|
|
1587
1774
|
function clamp(x) {
|
|
@@ -1591,6 +1778,22 @@ function ease(x) {
|
|
|
1591
1778
|
return x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2;
|
|
1592
1779
|
}
|
|
1593
1780
|
|
|
1781
|
+
// src/design/components/viz/parts/tokens.ts
|
|
1782
|
+
function typedLength(tokens) {
|
|
1783
|
+
return tokens.reduce((length, token) => length + token.t.length, 0);
|
|
1784
|
+
}
|
|
1785
|
+
function truncate(tokens, n) {
|
|
1786
|
+
const out = [];
|
|
1787
|
+
let left = n;
|
|
1788
|
+
for (const token of tokens) {
|
|
1789
|
+
if (left <= 0) break;
|
|
1790
|
+
const t = token.t.slice(0, left);
|
|
1791
|
+
out.push({ ...token, t });
|
|
1792
|
+
left -= t.length;
|
|
1793
|
+
}
|
|
1794
|
+
return out;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1594
1797
|
// src/design/components/viz/data/hero.ts
|
|
1595
1798
|
var HERO_ARTICLES = [
|
|
1596
1799
|
{ kicker: "Tech", title: "Return of the Bug", thumb: "bug" },
|
|
@@ -1851,8 +2054,24 @@ function heroFrame(t) {
|
|
|
1851
2054
|
};
|
|
1852
2055
|
}
|
|
1853
2056
|
|
|
2057
|
+
// src/design/components/viz/parts/CodeLine.tsx
|
|
2058
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2059
|
+
function CodeLine({ number, bar, className, children }) {
|
|
2060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cx("elb-viz-line", className), children: [
|
|
2061
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2062
|
+
"span",
|
|
2063
|
+
{
|
|
2064
|
+
className: cx("elb-viz-line__bar", bar && `elb-viz-line__bar--${bar}`),
|
|
2065
|
+
"aria-hidden": "true"
|
|
2066
|
+
}
|
|
2067
|
+
),
|
|
2068
|
+
number !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "elb-viz-line__number", children: number }),
|
|
2069
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "elb-viz-line__code", children })
|
|
2070
|
+
] });
|
|
2071
|
+
}
|
|
2072
|
+
|
|
1854
2073
|
// src/design/components/viz/parts/EventsTable.tsx
|
|
1855
|
-
var
|
|
2074
|
+
var import_react6 = require("react");
|
|
1856
2075
|
|
|
1857
2076
|
// src/design/components/viz/parts/style.ts
|
|
1858
2077
|
function vizStyle(vars) {
|
|
@@ -1861,38 +2080,38 @@ function vizStyle(vars) {
|
|
|
1861
2080
|
}
|
|
1862
2081
|
|
|
1863
2082
|
// src/design/components/viz/parts/EventsTable.tsx
|
|
1864
|
-
var
|
|
2083
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
1865
2084
|
var SKELETON_ROWS = 6;
|
|
1866
2085
|
function EventsTable({ rows }) {
|
|
1867
2086
|
const skeletons = Math.max(0, SKELETON_ROWS - rows.length);
|
|
1868
|
-
return /* @__PURE__ */ (0,
|
|
1869
|
-
/* @__PURE__ */ (0,
|
|
1870
|
-
/* @__PURE__ */ (0,
|
|
1871
|
-
/* @__PURE__ */ (0,
|
|
2087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "elb-viz-table", children: [
|
|
2088
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "elb-viz-table__head", children: [
|
|
2089
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "elb-viz-table__query", children: [
|
|
2090
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__keyword", children: "SELECT" }),
|
|
1872
2091
|
" *",
|
|
1873
2092
|
" ",
|
|
1874
|
-
/* @__PURE__ */ (0,
|
|
2093
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__keyword", children: "FROM" }),
|
|
1875
2094
|
" ",
|
|
1876
|
-
/* @__PURE__ */ (0,
|
|
2095
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__source", children: "walkerOS.events" })
|
|
1877
2096
|
] }),
|
|
1878
|
-
/* @__PURE__ */ (0,
|
|
1879
|
-
/* @__PURE__ */ (0,
|
|
2097
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "elb-viz-table__live", children: [
|
|
2098
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__dot", "aria-hidden": "true" }),
|
|
1880
2099
|
"live"
|
|
1881
2100
|
] })
|
|
1882
2101
|
] }),
|
|
1883
|
-
/* @__PURE__ */ (0,
|
|
1884
|
-
/* @__PURE__ */ (0,
|
|
1885
|
-
/* @__PURE__ */ (0,
|
|
1886
|
-
/* @__PURE__ */ (0,
|
|
2102
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "elb-viz-table__body", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "elb-viz-table__scroll", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "elb-viz-table__rows", children: [
|
|
2103
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "elb-viz-table__row elb-viz-table__row--header", children: [
|
|
2104
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__cell elb-viz-table__cell--n", children: "Row" }),
|
|
2105
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "elb-viz-table__cell", children: [
|
|
1887
2106
|
"name",
|
|
1888
|
-
/* @__PURE__ */ (0,
|
|
2107
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__type", children: "STRING" })
|
|
1889
2108
|
] }),
|
|
1890
|
-
/* @__PURE__ */ (0,
|
|
2109
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "elb-viz-table__cell", children: [
|
|
1891
2110
|
"data",
|
|
1892
|
-
/* @__PURE__ */ (0,
|
|
2111
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__type", children: "JSON" })
|
|
1893
2112
|
] })
|
|
1894
2113
|
] }),
|
|
1895
|
-
rows.map((row, index) => /* @__PURE__ */ (0,
|
|
2114
|
+
rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1896
2115
|
"div",
|
|
1897
2116
|
{
|
|
1898
2117
|
className: "elb-viz-table__row elb-viz-table__row--event",
|
|
@@ -1902,15 +2121,15 @@ function EventsTable({ rows }) {
|
|
|
1902
2121
|
"--elb-viz-row-shift": (1 - ease(clamp(row.age / 500))) * -80
|
|
1903
2122
|
}),
|
|
1904
2123
|
children: [
|
|
1905
|
-
/* @__PURE__ */ (0,
|
|
1906
|
-
/* @__PURE__ */ (0,
|
|
1907
|
-
/* @__PURE__ */ (0,
|
|
2124
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__cell elb-viz-table__cell--n", children: index + 1 }),
|
|
2125
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__cell", children: row.name }),
|
|
2126
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "elb-viz-table__cell elb-viz-table__json", children: [
|
|
1908
2127
|
"{",
|
|
1909
|
-
Object.entries(row.data).map(([key, value], position) => /* @__PURE__ */ (0,
|
|
2128
|
+
Object.entries(row.data).map(([key, value], position) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react6.Fragment, { children: [
|
|
1910
2129
|
position === 0 ? '"' : ',"',
|
|
1911
|
-
/* @__PURE__ */ (0,
|
|
2130
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__json-key", children: key }),
|
|
1912
2131
|
'":"',
|
|
1913
|
-
/* @__PURE__ */ (0,
|
|
2132
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__json-value", children: value }),
|
|
1914
2133
|
'"'
|
|
1915
2134
|
] }, key)),
|
|
1916
2135
|
"}"
|
|
@@ -1919,15 +2138,15 @@ function EventsTable({ rows }) {
|
|
|
1919
2138
|
},
|
|
1920
2139
|
row.key
|
|
1921
2140
|
)),
|
|
1922
|
-
Array.from({ length: skeletons }, (_, index) => /* @__PURE__ */ (0,
|
|
2141
|
+
Array.from({ length: skeletons }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
1923
2142
|
"div",
|
|
1924
2143
|
{
|
|
1925
2144
|
className: "elb-viz-table__row elb-viz-table__row--skeleton",
|
|
1926
2145
|
"aria-hidden": "true",
|
|
1927
2146
|
children: [
|
|
1928
|
-
/* @__PURE__ */ (0,
|
|
1929
|
-
/* @__PURE__ */ (0,
|
|
1930
|
-
/* @__PURE__ */ (0,
|
|
2147
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__cell elb-viz-table__cell--n", children: rows.length + index + 1 }),
|
|
2148
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__cell", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__bar" }) }),
|
|
2149
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__cell", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "elb-viz-table__bar" }) })
|
|
1931
2150
|
]
|
|
1932
2151
|
},
|
|
1933
2152
|
`skeleton-${index}`
|
|
@@ -1937,11 +2156,11 @@ function EventsTable({ rows }) {
|
|
|
1937
2156
|
}
|
|
1938
2157
|
|
|
1939
2158
|
// src/design/components/viz/parts/hooks.ts
|
|
1940
|
-
var
|
|
2159
|
+
var import_react7 = require("react");
|
|
1941
2160
|
var REDUCED_MOTION = "(prefers-reduced-motion: reduce)";
|
|
1942
2161
|
function useInView(ref, threshold) {
|
|
1943
|
-
const [inView, setInView] = (0,
|
|
1944
|
-
(0,
|
|
2162
|
+
const [inView, setInView] = (0, import_react7.useState)(false);
|
|
2163
|
+
(0, import_react7.useEffect)(() => {
|
|
1945
2164
|
const element = ref.current;
|
|
1946
2165
|
if (!element || typeof IntersectionObserver === "undefined") {
|
|
1947
2166
|
setInView(true);
|
|
@@ -1963,8 +2182,8 @@ function useInView(ref, threshold) {
|
|
|
1963
2182
|
return inView;
|
|
1964
2183
|
}
|
|
1965
2184
|
function useReducedMotion() {
|
|
1966
|
-
const [reduced, setReduced] = (0,
|
|
1967
|
-
(0,
|
|
2185
|
+
const [reduced, setReduced] = (0, import_react7.useState)(false);
|
|
2186
|
+
(0, import_react7.useEffect)(() => {
|
|
1968
2187
|
if (typeof window.matchMedia !== "function") return void 0;
|
|
1969
2188
|
const media = window.matchMedia(REDUCED_MOTION);
|
|
1970
2189
|
const update = () => setReduced(media.matches);
|
|
@@ -1976,14 +2195,14 @@ function useReducedMotion() {
|
|
|
1976
2195
|
}
|
|
1977
2196
|
|
|
1978
2197
|
// src/design/components/viz/parts/Pill.tsx
|
|
1979
|
-
var
|
|
2198
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
1980
2199
|
function Pill({
|
|
1981
2200
|
part,
|
|
1982
2201
|
variant = "solid",
|
|
1983
2202
|
className,
|
|
1984
2203
|
children
|
|
1985
2204
|
}) {
|
|
1986
|
-
return /* @__PURE__ */ (0,
|
|
2205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1987
2206
|
"span",
|
|
1988
2207
|
{
|
|
1989
2208
|
className: cx(
|
|
@@ -1998,7 +2217,7 @@ function Pill({
|
|
|
1998
2217
|
}
|
|
1999
2218
|
|
|
2000
2219
|
// src/design/components/viz/parts/Thumb.tsx
|
|
2001
|
-
var
|
|
2220
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2002
2221
|
var BUG_LINES = [
|
|
2003
2222
|
"M36 46 L28 42",
|
|
2004
2223
|
"M35 54 L27 56",
|
|
@@ -2016,9 +2235,9 @@ var BUG_SPOTS = [
|
|
|
2016
2235
|
[67, 56, 2.8]
|
|
2017
2236
|
];
|
|
2018
2237
|
function Bug() {
|
|
2019
|
-
return /* @__PURE__ */ (0,
|
|
2020
|
-
/* @__PURE__ */ (0,
|
|
2021
|
-
/* @__PURE__ */ (0,
|
|
2238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
2239
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("rect", { className: "elb-viz-thumb__ground", width: 112, height: 86 }),
|
|
2240
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2022
2241
|
"ellipse",
|
|
2023
2242
|
{
|
|
2024
2243
|
className: "elb-viz-thumb__shadow",
|
|
@@ -2028,18 +2247,18 @@ function Bug() {
|
|
|
2028
2247
|
ry: 6
|
|
2029
2248
|
}
|
|
2030
2249
|
),
|
|
2031
|
-
/* @__PURE__ */ (0,
|
|
2250
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2032
2251
|
"g",
|
|
2033
2252
|
{
|
|
2034
2253
|
className: "elb-viz-thumb__legs",
|
|
2035
2254
|
strokeWidth: 2.4,
|
|
2036
2255
|
strokeLinecap: "round",
|
|
2037
|
-
children: BUG_LINES.map((d) => /* @__PURE__ */ (0,
|
|
2256
|
+
children: BUG_LINES.map((d) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("path", { d }, d))
|
|
2038
2257
|
}
|
|
2039
2258
|
),
|
|
2040
|
-
/* @__PURE__ */ (0,
|
|
2041
|
-
/* @__PURE__ */ (0,
|
|
2042
|
-
/* @__PURE__ */ (0,
|
|
2259
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("circle", { className: "elb-viz-thumb__ink", cx: 42, cy: 16, r: 2 }),
|
|
2260
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("circle", { className: "elb-viz-thumb__ink", cx: 70, cy: 16, r: 2 }),
|
|
2261
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2043
2262
|
"ellipse",
|
|
2044
2263
|
{
|
|
2045
2264
|
className: "elb-viz-thumb__ink",
|
|
@@ -2049,9 +2268,9 @@ function Bug() {
|
|
|
2049
2268
|
ry: 7.5
|
|
2050
2269
|
}
|
|
2051
2270
|
),
|
|
2052
|
-
/* @__PURE__ */ (0,
|
|
2053
|
-
/* @__PURE__ */ (0,
|
|
2054
|
-
/* @__PURE__ */ (0,
|
|
2271
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("circle", { className: "elb-viz-thumb__eye", cx: 52, cy: 29, r: 1.6 }),
|
|
2272
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("circle", { className: "elb-viz-thumb__eye", cx: 60, cy: 29, r: 1.6 }),
|
|
2273
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2055
2274
|
"ellipse",
|
|
2056
2275
|
{
|
|
2057
2276
|
className: "elb-viz-thumb__shell",
|
|
@@ -2061,8 +2280,8 @@ function Bug() {
|
|
|
2061
2280
|
ry: 18
|
|
2062
2281
|
}
|
|
2063
2282
|
),
|
|
2064
|
-
/* @__PURE__ */ (0,
|
|
2065
|
-
BUG_SPOTS.map(([x, y, r]) => /* @__PURE__ */ (0,
|
|
2283
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("path", { className: "elb-viz-thumb__seam", d: "M56 33 L56 68", strokeWidth: 2 }),
|
|
2284
|
+
BUG_SPOTS.map(([x, y, r]) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2066
2285
|
"circle",
|
|
2067
2286
|
{
|
|
2068
2287
|
className: "elb-viz-thumb__ink",
|
|
@@ -2072,7 +2291,7 @@ function Bug() {
|
|
|
2072
2291
|
},
|
|
2073
2292
|
`${x}-${y}`
|
|
2074
2293
|
)),
|
|
2075
|
-
/* @__PURE__ */ (0,
|
|
2294
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2076
2295
|
"path",
|
|
2077
2296
|
{
|
|
2078
2297
|
className: "elb-viz-thumb__shine",
|
|
@@ -2084,9 +2303,9 @@ function Bug() {
|
|
|
2084
2303
|
] });
|
|
2085
2304
|
}
|
|
2086
2305
|
function Tech() {
|
|
2087
|
-
return /* @__PURE__ */ (0,
|
|
2088
|
-
/* @__PURE__ */ (0,
|
|
2089
|
-
/* @__PURE__ */ (0,
|
|
2306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
2307
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("rect", { className: "elb-viz-thumb__ground", width: 112, height: 86 }),
|
|
2308
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2090
2309
|
"rect",
|
|
2091
2310
|
{
|
|
2092
2311
|
className: "elb-viz-thumb__badge",
|
|
@@ -2097,8 +2316,8 @@ function Tech() {
|
|
|
2097
2316
|
rx: 8
|
|
2098
2317
|
}
|
|
2099
2318
|
),
|
|
2100
|
-
/* @__PURE__ */ (0,
|
|
2101
|
-
/* @__PURE__ */ (0,
|
|
2319
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("circle", { className: "elb-viz-thumb__dot", cx: 47, cy: 52, r: 3.2 }),
|
|
2320
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2102
2321
|
"path",
|
|
2103
2322
|
{
|
|
2104
2323
|
className: "elb-viz-thumb__wave",
|
|
@@ -2107,7 +2326,7 @@ function Tech() {
|
|
|
2107
2326
|
strokeLinecap: "round"
|
|
2108
2327
|
}
|
|
2109
2328
|
),
|
|
2110
|
-
/* @__PURE__ */ (0,
|
|
2329
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2111
2330
|
"path",
|
|
2112
2331
|
{
|
|
2113
2332
|
className: "elb-viz-thumb__wave",
|
|
@@ -2119,9 +2338,9 @@ function Tech() {
|
|
|
2119
2338
|
] });
|
|
2120
2339
|
}
|
|
2121
2340
|
function Food() {
|
|
2122
|
-
return /* @__PURE__ */ (0,
|
|
2123
|
-
/* @__PURE__ */ (0,
|
|
2124
|
-
/* @__PURE__ */ (0,
|
|
2341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
2342
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("rect", { className: "elb-viz-thumb__ground", width: 112, height: 86 }),
|
|
2343
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2125
2344
|
"ellipse",
|
|
2126
2345
|
{
|
|
2127
2346
|
className: "elb-viz-thumb__plate",
|
|
@@ -2131,7 +2350,7 @@ function Food() {
|
|
|
2131
2350
|
ry: 10
|
|
2132
2351
|
}
|
|
2133
2352
|
),
|
|
2134
|
-
/* @__PURE__ */ (0,
|
|
2353
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2135
2354
|
"ellipse",
|
|
2136
2355
|
{
|
|
2137
2356
|
className: "elb-viz-thumb__loaf",
|
|
@@ -2141,7 +2360,7 @@ function Food() {
|
|
|
2141
2360
|
ry: 19
|
|
2142
2361
|
}
|
|
2143
2362
|
),
|
|
2144
|
-
/* @__PURE__ */ (0,
|
|
2363
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2145
2364
|
"ellipse",
|
|
2146
2365
|
{
|
|
2147
2366
|
className: "elb-viz-thumb__crust",
|
|
@@ -2151,7 +2370,7 @@ function Food() {
|
|
|
2151
2370
|
ry: 13
|
|
2152
2371
|
}
|
|
2153
2372
|
),
|
|
2154
|
-
/* @__PURE__ */ (0,
|
|
2373
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2155
2374
|
"path",
|
|
2156
2375
|
{
|
|
2157
2376
|
className: "elb-viz-thumb__score",
|
|
@@ -2160,7 +2379,7 @@ function Food() {
|
|
|
2160
2379
|
strokeLinecap: "round"
|
|
2161
2380
|
}
|
|
2162
2381
|
),
|
|
2163
|
-
/* @__PURE__ */ (0,
|
|
2382
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2164
2383
|
"path",
|
|
2165
2384
|
{
|
|
2166
2385
|
className: "elb-viz-thumb__score",
|
|
@@ -2172,7 +2391,7 @@ function Food() {
|
|
|
2172
2391
|
] });
|
|
2173
2392
|
}
|
|
2174
2393
|
function Thumb({ kind }) {
|
|
2175
|
-
return /* @__PURE__ */ (0,
|
|
2394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2176
2395
|
"svg",
|
|
2177
2396
|
{
|
|
2178
2397
|
className: cx("elb-viz-thumb", `elb-viz-thumb--${kind}`),
|
|
@@ -2180,13 +2399,13 @@ function Thumb({ kind }) {
|
|
|
2180
2399
|
preserveAspectRatio: "xMidYMid slice",
|
|
2181
2400
|
"aria-hidden": "true",
|
|
2182
2401
|
focusable: "false",
|
|
2183
|
-
children: kind === "bug" ? /* @__PURE__ */ (0,
|
|
2402
|
+
children: kind === "bug" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Bug, {}) : kind === "tech" ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Tech, {}) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Food, {})
|
|
2184
2403
|
}
|
|
2185
2404
|
);
|
|
2186
2405
|
}
|
|
2187
2406
|
|
|
2188
2407
|
// src/design/components/viz/HeroTaggingViz.tsx
|
|
2189
|
-
var
|
|
2408
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2190
2409
|
var MAX_STEP = 64;
|
|
2191
2410
|
function HeroTaggingViz({
|
|
2192
2411
|
playing = true,
|
|
@@ -2194,12 +2413,12 @@ function HeroTaggingViz({
|
|
|
2194
2413
|
startAt = HERO_START,
|
|
2195
2414
|
...rest
|
|
2196
2415
|
}) {
|
|
2197
|
-
const paneRef = (0,
|
|
2416
|
+
const paneRef = (0, import_react8.useRef)(null);
|
|
2198
2417
|
const inView = useInView(paneRef, 0);
|
|
2199
2418
|
const reduced = useReducedMotion();
|
|
2200
|
-
const [time, setTime] = (0,
|
|
2419
|
+
const [time, setTime] = (0, import_react8.useState)(startAt);
|
|
2201
2420
|
const animate = playing && inView && !reduced;
|
|
2202
|
-
(0,
|
|
2421
|
+
(0, import_react8.useEffect)(() => {
|
|
2203
2422
|
if (!animate) return void 0;
|
|
2204
2423
|
let frame = 0;
|
|
2205
2424
|
let last = performance.now();
|
|
@@ -2213,22 +2432,22 @@ function HeroTaggingViz({
|
|
|
2213
2432
|
return () => cancelAnimationFrame(frame);
|
|
2214
2433
|
}, [animate, speed]);
|
|
2215
2434
|
const { article, lines, fade: fade2, caretOn, card, cursor, rows } = heroFrame(time);
|
|
2216
|
-
return /* @__PURE__ */ (0,
|
|
2217
|
-
/* @__PURE__ */ (0,
|
|
2218
|
-
/* @__PURE__ */ (0,
|
|
2219
|
-
/* @__PURE__ */ (0,
|
|
2220
|
-
/* @__PURE__ */ (0,
|
|
2221
|
-
/* @__PURE__ */ (0,
|
|
2222
|
-
/* @__PURE__ */ (0,
|
|
2435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(VizFrame, { ...rest, variant: "hero", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "elb-viz-hero", children: [
|
|
2436
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { ref: paneRef, className: "elb-viz-hero__pane", children: [
|
|
2437
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "elb-viz-hero__bar", children: [
|
|
2438
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "elb-viz-hero__dots", "aria-hidden": "true", children: [
|
|
2439
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", {}),
|
|
2440
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", {}),
|
|
2441
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", {})
|
|
2223
2442
|
] }),
|
|
2224
|
-
/* @__PURE__ */ (0,
|
|
2443
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "elb-viz-hero__file", children: "ArticleTeaser.html" })
|
|
2225
2444
|
] }),
|
|
2226
|
-
/* @__PURE__ */ (0,
|
|
2445
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2227
2446
|
"div",
|
|
2228
2447
|
{
|
|
2229
2448
|
className: "elb-viz-hero__code",
|
|
2230
2449
|
style: vizStyle({ "--elb-viz-fade": fade2 }),
|
|
2231
|
-
children: lines.map((line) => /* @__PURE__ */ (0,
|
|
2450
|
+
children: lines.map((line) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2232
2451
|
CodeLine,
|
|
2233
2452
|
{
|
|
2234
2453
|
number: line.n,
|
|
@@ -2237,23 +2456,23 @@ function HeroTaggingViz({
|
|
|
2237
2456
|
"elb-viz-hero__line",
|
|
2238
2457
|
line.on && "elb-viz-hero__line--on"
|
|
2239
2458
|
),
|
|
2240
|
-
children: line.caret === null ? /* @__PURE__ */ (0,
|
|
2241
|
-
/* @__PURE__ */ (0,
|
|
2242
|
-
/* @__PURE__ */ (0,
|
|
2459
|
+
children: line.caret === null ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CodeTokens, { tokens: line.tokens }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
2460
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CodeTokens, { tokens: line.tokens.slice(0, line.caret) }),
|
|
2461
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2243
2462
|
"span",
|
|
2244
2463
|
{
|
|
2245
2464
|
className: "elb-viz-caret",
|
|
2246
2465
|
style: vizStyle({ "--elb-viz-caret": caretOn ? 1 : 0 })
|
|
2247
2466
|
}
|
|
2248
2467
|
),
|
|
2249
|
-
/* @__PURE__ */ (0,
|
|
2468
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CodeTokens, { tokens: line.tokens.slice(line.caret) })
|
|
2250
2469
|
] })
|
|
2251
2470
|
},
|
|
2252
2471
|
line.id
|
|
2253
2472
|
))
|
|
2254
2473
|
}
|
|
2255
2474
|
),
|
|
2256
|
-
/* @__PURE__ */ (0,
|
|
2475
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "elb-viz-hero__stage", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2257
2476
|
"div",
|
|
2258
2477
|
{
|
|
2259
2478
|
className: cx(
|
|
@@ -2265,13 +2484,13 @@ function HeroTaggingViz({
|
|
|
2265
2484
|
"--elb-viz-card-offset": card.offset
|
|
2266
2485
|
}),
|
|
2267
2486
|
children: [
|
|
2268
|
-
/* @__PURE__ */ (0,
|
|
2269
|
-
card.entity && /* @__PURE__ */ (0,
|
|
2270
|
-
card.impression && /* @__PURE__ */ (0,
|
|
2487
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "elb-viz-hero__pills", children: [
|
|
2488
|
+
card.entity && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Pill, { part: "entity", children: "article" }),
|
|
2489
|
+
card.impression && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Pill, { part: "action", children: "impression" })
|
|
2271
2490
|
] }),
|
|
2272
|
-
/* @__PURE__ */ (0,
|
|
2273
|
-
/* @__PURE__ */ (0,
|
|
2274
|
-
/* @__PURE__ */ (0,
|
|
2491
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "elb-viz-hero__thumb", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Thumb, { kind: article.thumb }) }),
|
|
2492
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "elb-viz-hero__text", children: [
|
|
2493
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2275
2494
|
"span",
|
|
2276
2495
|
{
|
|
2277
2496
|
className: cx(
|
|
@@ -2281,7 +2500,7 @@ function HeroTaggingViz({
|
|
|
2281
2500
|
children: article.kicker
|
|
2282
2501
|
}
|
|
2283
2502
|
),
|
|
2284
|
-
/* @__PURE__ */ (0,
|
|
2503
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "elb-viz-hero__title", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2285
2504
|
"span",
|
|
2286
2505
|
{
|
|
2287
2506
|
className: cx(
|
|
@@ -2291,7 +2510,7 @@ function HeroTaggingViz({
|
|
|
2291
2510
|
children: article.title
|
|
2292
2511
|
}
|
|
2293
2512
|
) }),
|
|
2294
|
-
/* @__PURE__ */ (0,
|
|
2513
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "elb-viz-hero__foot", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2295
2514
|
"span",
|
|
2296
2515
|
{
|
|
2297
2516
|
className: cx(
|
|
@@ -2300,7 +2519,7 @@ function HeroTaggingViz({
|
|
|
2300
2519
|
),
|
|
2301
2520
|
children: [
|
|
2302
2521
|
"Open \u2192",
|
|
2303
|
-
/* @__PURE__ */ (0,
|
|
2522
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2304
2523
|
"span",
|
|
2305
2524
|
{
|
|
2306
2525
|
className: "elb-viz-hero__cursor",
|
|
@@ -2314,8 +2533,8 @@ function HeroTaggingViz({
|
|
|
2314
2533
|
"--elb-viz-press": cursor.pressed ? 0.8 : 1
|
|
2315
2534
|
}),
|
|
2316
2535
|
children: [
|
|
2317
|
-
/* @__PURE__ */ (0,
|
|
2318
|
-
/* @__PURE__ */ (0,
|
|
2536
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "elb-viz-hero__ring" }),
|
|
2537
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "elb-viz-hero__pointer" })
|
|
2319
2538
|
]
|
|
2320
2539
|
}
|
|
2321
2540
|
)
|
|
@@ -2327,12 +2546,12 @@ function HeroTaggingViz({
|
|
|
2327
2546
|
}
|
|
2328
2547
|
) })
|
|
2329
2548
|
] }),
|
|
2330
|
-
/* @__PURE__ */ (0,
|
|
2549
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(EventsTable, { rows })
|
|
2331
2550
|
] }) });
|
|
2332
2551
|
}
|
|
2333
2552
|
|
|
2334
2553
|
// src/design/components/viz/ArticleTeaserTracking.tsx
|
|
2335
|
-
var
|
|
2554
|
+
var import_react9 = require("react");
|
|
2336
2555
|
|
|
2337
2556
|
// src/design/components/viz/data/article-teaser.ts
|
|
2338
2557
|
var TEASER_ENTITY = "article";
|
|
@@ -2595,7 +2814,7 @@ function teaserAdvance(n) {
|
|
|
2595
2814
|
}
|
|
2596
2815
|
|
|
2597
2816
|
// src/design/components/viz/ArticleTeaserTracking.tsx
|
|
2598
|
-
var
|
|
2817
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2599
2818
|
var FIRST_DELAY = 800;
|
|
2600
2819
|
var JUMP_DELAY = 250;
|
|
2601
2820
|
var SCROLL_DELAY = 400;
|
|
@@ -2608,7 +2827,7 @@ function TeaserCard({
|
|
|
2608
2827
|
seen,
|
|
2609
2828
|
ahead
|
|
2610
2829
|
}) {
|
|
2611
|
-
return /* @__PURE__ */ (0,
|
|
2830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2612
2831
|
"div",
|
|
2613
2832
|
{
|
|
2614
2833
|
className: cx(
|
|
@@ -2617,9 +2836,9 @@ function TeaserCard({
|
|
|
2617
2836
|
ahead && "elb-viz-teaser__card--ahead"
|
|
2618
2837
|
),
|
|
2619
2838
|
children: [
|
|
2620
|
-
/* @__PURE__ */ (0,
|
|
2621
|
-
/* @__PURE__ */ (0,
|
|
2622
|
-
/* @__PURE__ */ (0,
|
|
2839
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "elb-viz-teaser__pills", children: [
|
|
2840
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Pill, { part: "entity", className: fade(seen.has("entity")), children: TEASER_ENTITY }),
|
|
2841
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2623
2842
|
Pill,
|
|
2624
2843
|
{
|
|
2625
2844
|
part: "property",
|
|
@@ -2629,14 +2848,14 @@ function TeaserCard({
|
|
|
2629
2848
|
}
|
|
2630
2849
|
)
|
|
2631
2850
|
] }),
|
|
2632
|
-
/* @__PURE__ */ (0,
|
|
2851
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2633
2852
|
PhotoPlaceholder,
|
|
2634
2853
|
{
|
|
2635
2854
|
tone: "viz",
|
|
2636
2855
|
className: cx("elb-viz-teaser__photo", fade(seen.has("image")))
|
|
2637
2856
|
}
|
|
2638
2857
|
),
|
|
2639
|
-
/* @__PURE__ */ (0,
|
|
2858
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2640
2859
|
"span",
|
|
2641
2860
|
{
|
|
2642
2861
|
className: cx(
|
|
@@ -2647,7 +2866,7 @@ function TeaserCard({
|
|
|
2647
2866
|
children: article.kicker
|
|
2648
2867
|
}
|
|
2649
2868
|
),
|
|
2650
|
-
/* @__PURE__ */ (0,
|
|
2869
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2651
2870
|
"span",
|
|
2652
2871
|
{
|
|
2653
2872
|
className: cx(
|
|
@@ -2658,7 +2877,7 @@ function TeaserCard({
|
|
|
2658
2877
|
children: article.title
|
|
2659
2878
|
}
|
|
2660
2879
|
),
|
|
2661
|
-
/* @__PURE__ */ (0,
|
|
2880
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2662
2881
|
"span",
|
|
2663
2882
|
{
|
|
2664
2883
|
className: cx(
|
|
@@ -2682,7 +2901,7 @@ function TeaserGroup({
|
|
|
2682
2901
|
const globalsOn = seen.has(page.globalsEffect);
|
|
2683
2902
|
const listOn = seen.has(page.listEffect);
|
|
2684
2903
|
const reached = page.step <= current;
|
|
2685
|
-
return /* @__PURE__ */ (0,
|
|
2904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2686
2905
|
"div",
|
|
2687
2906
|
{
|
|
2688
2907
|
className: cx(
|
|
@@ -2691,7 +2910,7 @@ function TeaserGroup({
|
|
|
2691
2910
|
!reached && !lead && "elb-viz-teaser__page--ahead"
|
|
2692
2911
|
),
|
|
2693
2912
|
children: [
|
|
2694
|
-
/* @__PURE__ */ (0,
|
|
2913
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "elb-viz-teaser__page-pill", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2695
2914
|
Pill,
|
|
2696
2915
|
{
|
|
2697
2916
|
part: "globals",
|
|
@@ -2699,7 +2918,7 @@ function TeaserGroup({
|
|
|
2699
2918
|
children: `pagetype:${page.pagetype}`
|
|
2700
2919
|
}
|
|
2701
2920
|
) }),
|
|
2702
|
-
/* @__PURE__ */ (0,
|
|
2921
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2703
2922
|
"div",
|
|
2704
2923
|
{
|
|
2705
2924
|
className: cx(
|
|
@@ -2707,14 +2926,14 @@ function TeaserGroup({
|
|
|
2707
2926
|
listOn && "elb-viz-teaser__list--on"
|
|
2708
2927
|
),
|
|
2709
2928
|
children: [
|
|
2710
|
-
/* @__PURE__ */ (0,
|
|
2711
|
-
/* @__PURE__ */ (0,
|
|
2712
|
-
/* @__PURE__ */ (0,
|
|
2713
|
-
page.heading !== void 0 && /* @__PURE__ */ (0,
|
|
2929
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: cx("elb-viz-teaser__list-head", fade(listOn)), children: [
|
|
2930
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "elb-viz-teaser__list-label", children: [
|
|
2931
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "elb-viz-teaser__list-name", children: page.header }),
|
|
2932
|
+
page.heading !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "elb-viz-teaser__list-heading", children: page.heading })
|
|
2714
2933
|
] }),
|
|
2715
|
-
/* @__PURE__ */ (0,
|
|
2934
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Pill, { part: "context", children: `list:${page.list}` })
|
|
2716
2935
|
] }),
|
|
2717
|
-
/* @__PURE__ */ (0,
|
|
2936
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "elb-viz-teaser__cards", children: page.articles.map((article, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2718
2937
|
TeaserCard,
|
|
2719
2938
|
{
|
|
2720
2939
|
article,
|
|
@@ -2737,20 +2956,20 @@ function ArticleTeaserTracking({
|
|
|
2737
2956
|
initialStep,
|
|
2738
2957
|
...rest
|
|
2739
2958
|
}) {
|
|
2740
|
-
const codeRef = (0,
|
|
2959
|
+
const codeRef = (0, import_react9.useRef)(null);
|
|
2741
2960
|
const inView = useInView(codeRef, 0.35);
|
|
2742
2961
|
const reduced = useReducedMotion();
|
|
2743
|
-
const [shown, setShown] = (0,
|
|
2962
|
+
const [shown, setShown] = (0, import_react9.useState)(
|
|
2744
2963
|
() => initialStep ? teaserStepEnd(initialStep) : 0
|
|
2745
2964
|
);
|
|
2746
|
-
const [delay, setDelay] = (0,
|
|
2747
|
-
const [pinned, setPinned] = (0,
|
|
2965
|
+
const [delay, setDelay] = (0, import_react9.useState)(FIRST_DELAY);
|
|
2966
|
+
const [pinned, setPinned] = (0, import_react9.useState)(null);
|
|
2748
2967
|
const playing = autoplay && inView && !reduced;
|
|
2749
2968
|
const end = pinned === null ? TEASER_ITEMS.length : teaserStepEnd(pinned);
|
|
2750
|
-
(0,
|
|
2969
|
+
(0, import_react9.useEffect)(() => {
|
|
2751
2970
|
if (reduced) setShown(TEASER_ITEMS.length);
|
|
2752
2971
|
}, [reduced]);
|
|
2753
|
-
(0,
|
|
2972
|
+
(0, import_react9.useEffect)(() => {
|
|
2754
2973
|
if (!playing || delay === null) return void 0;
|
|
2755
2974
|
const timer = setTimeout(() => {
|
|
2756
2975
|
const advance = teaserAdvance(shown);
|
|
@@ -2763,7 +2982,7 @@ function ArticleTeaserTracking({
|
|
|
2763
2982
|
}, delay / speed);
|
|
2764
2983
|
return () => clearTimeout(timer);
|
|
2765
2984
|
}, [playing, delay, shown, speed, end]);
|
|
2766
|
-
(0,
|
|
2985
|
+
(0, import_react9.useEffect)(() => {
|
|
2767
2986
|
const pane = codeRef.current;
|
|
2768
2987
|
if (!pane || shown === 0 || typeof pane.scrollTo !== "function")
|
|
2769
2988
|
return void 0;
|
|
@@ -2809,15 +3028,15 @@ function ArticleTeaserTracking({
|
|
|
2809
3028
|
separated && "elb-viz-teaser__file--separated"
|
|
2810
3029
|
);
|
|
2811
3030
|
separated = true;
|
|
2812
|
-
return /* @__PURE__ */ (0,
|
|
2813
|
-
/* @__PURE__ */ (0,
|
|
2814
|
-
/* @__PURE__ */ (0,
|
|
3031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { "data-line": index, className: lineClass, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: fileClass, children: [
|
|
3032
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "elb-viz-teaser__file-name", children: item.name }),
|
|
3033
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "elb-viz-teaser__file-level", children: item.level })
|
|
2815
3034
|
] }) }, index);
|
|
2816
3035
|
}
|
|
2817
3036
|
lineNumber += 1;
|
|
2818
3037
|
const reached = index < count;
|
|
2819
3038
|
const isCurrent = index === count - 1 && item.effect !== void 0;
|
|
2820
|
-
return /* @__PURE__ */ (0,
|
|
3039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { "data-line": index, className: lineClass, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2821
3040
|
CodeLine,
|
|
2822
3041
|
{
|
|
2823
3042
|
number: lineNumber,
|
|
@@ -2826,13 +3045,13 @@ function ArticleTeaserTracking({
|
|
|
2826
3045
|
"elb-viz-teaser__code",
|
|
2827
3046
|
isCurrent && `elb-viz-teaser__code--current-${item.part ?? "plain"}`
|
|
2828
3047
|
),
|
|
2829
|
-
children: /* @__PURE__ */ (0,
|
|
3048
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(CodeTokens, { tokens: item.tokens, active: reached })
|
|
2830
3049
|
}
|
|
2831
3050
|
) }, index);
|
|
2832
3051
|
});
|
|
2833
|
-
return /* @__PURE__ */ (0,
|
|
2834
|
-
/* @__PURE__ */ (0,
|
|
2835
|
-
/* @__PURE__ */ (0,
|
|
3052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(VizFrame, { ...rest, variant: "teaser", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "elb-viz-teaser", children: [
|
|
3053
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "elb-viz-teaser__header", children: [
|
|
3054
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "elb-viz-teaser__steps", children: TEASER_STEPS.map(({ step, label }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2836
3055
|
"button",
|
|
2837
3056
|
{
|
|
2838
3057
|
type: "button",
|
|
@@ -2845,18 +3064,18 @@ function ArticleTeaserTracking({
|
|
|
2845
3064
|
),
|
|
2846
3065
|
onClick: () => jump(step),
|
|
2847
3066
|
children: [
|
|
2848
|
-
/* @__PURE__ */ (0,
|
|
2849
|
-
/* @__PURE__ */ (0,
|
|
3067
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "elb-viz-teaser__step-number", children: step }),
|
|
3068
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: label })
|
|
2850
3069
|
]
|
|
2851
3070
|
},
|
|
2852
3071
|
step
|
|
2853
3072
|
)) }),
|
|
2854
|
-
/* @__PURE__ */ (0,
|
|
3073
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "elb-viz-teaser__legend", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(EventLegend, {}) })
|
|
2855
3074
|
] }),
|
|
2856
|
-
/* @__PURE__ */ (0,
|
|
2857
|
-
/* @__PURE__ */ (0,
|
|
2858
|
-
/* @__PURE__ */ (0,
|
|
2859
|
-
/* @__PURE__ */ (0,
|
|
3075
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "elb-viz-teaser__caption", children: TEASER_CAPTIONS[current] }),
|
|
3076
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "elb-viz-teaser__body", children: [
|
|
3077
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "elb-viz-teaser__pane", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { ref: codeRef, className: "elb-viz-teaser__scroll", children: lines }) }),
|
|
3078
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "elb-viz-teaser__pages", children: TEASER_PAGE_IDS.map((id, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2860
3079
|
TeaserGroup,
|
|
2861
3080
|
{
|
|
2862
3081
|
page: TEASER_PAGES[id],
|