@quanta-intellect/vessel-browser 0.1.78 → 0.1.81
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.
|
@@ -2295,7 +2295,7 @@ function getAgentPresence(state, currentTime = Date.now()) {
|
|
|
2295
2295
|
}
|
|
2296
2296
|
return "idle";
|
|
2297
2297
|
}
|
|
2298
|
-
var _tmpl$$n = /* @__PURE__ */ template(`<img class=tab-favicon alt>`), _tmpl$2$m = /* @__PURE__ */ template(`<span class=tab-favicon-fallback>`), _tmpl$3$i = /* @__PURE__ */ template(`<div class=tab-bar><div class=tab-list></div><div class=tab-actions><button class=tab-new data-tooltip="New window"data-tooltip-pos=left></button><button class=tab-new data-tooltip="Add active tab to group"data-tooltip-pos=left></button><button class=tab-new data-tooltip="New tab"data-tooltip-pos=left></button><button class="tab-new tab-new-private"data-tooltip="Private window"data-tooltip-pos=left><svg width=12 height=12 viewBox="0 0 16 16"fill=currentColor><path d="M8 1a7 7 0 100 14A7 7 0 008 1zm0 1.5a5.5 5.5 0 110 11 5.5 5.5 0 010-11z">`), _tmpl$4$i = /* @__PURE__ */ template(`<button><span class=tab-group-dot></span><span class=tab-group-name></span><span class=tab-group-count>`), _tmpl$5$e = /* @__PURE__ */ template(`<button class="tab-audio tab-audio-pinned">`), _tmpl$6$d = /* @__PURE__ */ template(`<div role=tab>`), _tmpl$7$c = /* @__PURE__ */ template(`<span class=tab-title>`), _tmpl$8$9 = /* @__PURE__ */ template(`<button class=tab-audio>`), _tmpl$9$
|
|
2298
|
+
var _tmpl$$n = /* @__PURE__ */ template(`<img class=tab-favicon alt>`), _tmpl$2$m = /* @__PURE__ */ template(`<span class=tab-favicon-fallback>`), _tmpl$3$i = /* @__PURE__ */ template(`<div class=tab-bar><div class=tab-list></div><div class=tab-actions><button class=tab-new data-tooltip="New window"data-tooltip-pos=left></button><button class=tab-new data-tooltip="Add active tab to group"data-tooltip-pos=left></button><button class=tab-new data-tooltip="New tab"data-tooltip-pos=left></button><button class="tab-new tab-new-private"data-tooltip="Private window"data-tooltip-pos=left><svg width=12 height=12 viewBox="0 0 16 16"fill=currentColor><path d="M8 1a7 7 0 100 14A7 7 0 008 1zm0 1.5a5.5 5.5 0 110 11 5.5 5.5 0 010-11z">`), _tmpl$4$i = /* @__PURE__ */ template(`<button><span class=tab-group-dot></span><span class=tab-group-name></span><span class=tab-group-count>`), _tmpl$5$e = /* @__PURE__ */ template(`<button class="tab-audio tab-audio-pinned">`), _tmpl$6$d = /* @__PURE__ */ template(`<div role=tab>`), _tmpl$7$c = /* @__PURE__ */ template(`<span class=tab-title>`), _tmpl$8$9 = /* @__PURE__ */ template(`<button class=tab-audio>`), _tmpl$9$7 = /* @__PURE__ */ template(`<button class=tab-close>×`), _tmpl$0$6 = /* @__PURE__ */ template(`<span class=tab-agent-indicator aria-hidden=true title="Agent active on this tab">`), _tmpl$1$6 = /* @__PURE__ */ template(`<span class=tab-loading>`);
|
|
2299
2299
|
const TAB_CLOSE_MS = 200;
|
|
2300
2300
|
function stringToHue(str) {
|
|
2301
2301
|
let hash = 0;
|
|
@@ -2510,7 +2510,7 @@ const TabBar = () => {
|
|
|
2510
2510
|
return _el$15;
|
|
2511
2511
|
}
|
|
2512
2512
|
}), memo(() => memo(() => !!tab.isLoading)() && _tmpl$1$6()), (() => {
|
|
2513
|
-
var _el$16 = _tmpl$9$
|
|
2513
|
+
var _el$16 = _tmpl$9$7();
|
|
2514
2514
|
_el$16.$$click = (e) => {
|
|
2515
2515
|
e.stopPropagation();
|
|
2516
2516
|
handleClose(tab.id);
|
|
@@ -2872,6 +2872,76 @@ function buildPageSnapshotKey(rawUrl) {
|
|
|
2872
2872
|
function matchesPageSnapshotUrl(left, right) {
|
|
2873
2873
|
return buildPageSnapshotKey(left) === buildPageSnapshotKey(right);
|
|
2874
2874
|
}
|
|
2875
|
+
const SECTION_LABELS = {
|
|
2876
|
+
content: "Content",
|
|
2877
|
+
headings: "Headings",
|
|
2878
|
+
title: "Title"
|
|
2879
|
+
};
|
|
2880
|
+
function cleanDiffSummaryText(value) {
|
|
2881
|
+
return value.replace(
|
|
2882
|
+
/```[\s\S]*?```/g,
|
|
2883
|
+
(match) => match.replace(/```[a-z]*\n?/gi, "").replace(/```/g, "")
|
|
2884
|
+
).replace(/!\[([^\]]*)\]\([^)]+\)/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/`([^`]+)`/g, "$1").replace(/(\*\*|__)(.*?)\1/g, "$2").replace(/(\*|_)(.*?)\1/g, "$2").replace(/^\s*>\s?/gm, "").replace(/^#{1,6}\s+/gm, "").replace(/^\s*[-*+]\s+/gm, "").replace(/\s+/g, " ").trim();
|
|
2885
|
+
}
|
|
2886
|
+
function formatDiffSectionLabel(section) {
|
|
2887
|
+
const trimmed = section.trim();
|
|
2888
|
+
const normalized = trimmed.toLowerCase();
|
|
2889
|
+
return SECTION_LABELS[normalized] ?? trimmed;
|
|
2890
|
+
}
|
|
2891
|
+
function parseDiffSummaryParts(summary) {
|
|
2892
|
+
const parts = summary.split(/\s*\|\s*/).map((part) => {
|
|
2893
|
+
const match = part.match(/^([a-z][a-z\s-]*):\s*(.+)$/i);
|
|
2894
|
+
if (!match) {
|
|
2895
|
+
return { text: cleanDiffSummaryText(part) };
|
|
2896
|
+
}
|
|
2897
|
+
return {
|
|
2898
|
+
section: formatDiffSectionLabel(match[1]),
|
|
2899
|
+
text: cleanDiffSummaryText(match[2])
|
|
2900
|
+
};
|
|
2901
|
+
}).filter((part) => part.text.length > 0);
|
|
2902
|
+
return parts.length > 0 ? parts : [{ text: "Change detected." }];
|
|
2903
|
+
}
|
|
2904
|
+
function resolveNow(options) {
|
|
2905
|
+
if (options?.now instanceof Date) return options.now.getTime();
|
|
2906
|
+
return Date.now();
|
|
2907
|
+
}
|
|
2908
|
+
function formatRelativeTime(isoDate, options) {
|
|
2909
|
+
const timestamp = new Date(isoDate).getTime();
|
|
2910
|
+
if (Number.isNaN(timestamp)) return "recently";
|
|
2911
|
+
const now2 = resolveNow(options);
|
|
2912
|
+
if (Number.isNaN(now2)) return "recently";
|
|
2913
|
+
const diff = Math.max(0, now2 - timestamp);
|
|
2914
|
+
const mins = Math.floor(diff / 6e4);
|
|
2915
|
+
if (mins < 1) return "just now";
|
|
2916
|
+
if (mins < 60) return `${mins}m ago`;
|
|
2917
|
+
const hours = Math.floor(mins / 60);
|
|
2918
|
+
if (hours < 24) return `${hours}h ago`;
|
|
2919
|
+
const days = Math.floor(hours / 24);
|
|
2920
|
+
if (days < 7) return `${days}d ago`;
|
|
2921
|
+
return new Date(timestamp).toLocaleDateString();
|
|
2922
|
+
}
|
|
2923
|
+
function formatShortDateTime(isoDate) {
|
|
2924
|
+
const date = new Date(isoDate);
|
|
2925
|
+
if (Number.isNaN(date.getTime())) return "Unknown time";
|
|
2926
|
+
return date.toLocaleString([], {
|
|
2927
|
+
month: "short",
|
|
2928
|
+
day: "numeric",
|
|
2929
|
+
hour: "numeric",
|
|
2930
|
+
minute: "2-digit"
|
|
2931
|
+
});
|
|
2932
|
+
}
|
|
2933
|
+
function formatElapsedTime(startIso, endIso) {
|
|
2934
|
+
const start = new Date(startIso).getTime();
|
|
2935
|
+
const end = new Date(endIso).getTime();
|
|
2936
|
+
if (Number.isNaN(start) || Number.isNaN(end)) return "unknown duration";
|
|
2937
|
+
const elapsedMs = Math.max(0, end - start);
|
|
2938
|
+
const secs = Math.round(elapsedMs / 1e3);
|
|
2939
|
+
if (secs < 60) return `${secs}s`;
|
|
2940
|
+
const mins = Math.round(secs / 60);
|
|
2941
|
+
if (mins < 60) return `${mins}m`;
|
|
2942
|
+
const hours = Math.round(mins / 60);
|
|
2943
|
+
return `${hours}h`;
|
|
2944
|
+
}
|
|
2875
2945
|
const SEARCH_ENGINE_PRESETS = {
|
|
2876
2946
|
duckduckgo: { label: "DuckDuckGo", url: "https://duckduckgo.com/?q=" },
|
|
2877
2947
|
google: { label: "Google", url: "https://www.google.com/search?q=" },
|
|
@@ -2880,7 +2950,7 @@ const SEARCH_ENGINE_PRESETS = {
|
|
|
2880
2950
|
ecosia: { label: "Ecosia", url: "https://www.ecosia.org/search?q=" },
|
|
2881
2951
|
kagi: { label: "Kagi", url: "https://kagi.com/search?q=" }
|
|
2882
2952
|
};
|
|
2883
|
-
var _tmpl$$l = /* @__PURE__ */ template(`<div class=private-badge title="Private Browsing - history and cookies are not saved"><svg width=12 height=12 viewBox="0 0 16 16"fill=currentColor><path d="M8 1a7 7 0 100 14A7 7 0 008 1zm0 1.5a5.5 5.5 0 110 11 5.5 5.5 0 010-11zM5.5 7a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zm3.5 3.5c0-1-1.5-2-2.5-2s-2.5 1-2.5 2"></path></svg><span>Private`), _tmpl$2$k = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z">`), _tmpl$3$h = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z"></path><line x1=2 y1=12 x2=12 y2=2 stroke=currentColor stroke-width=1.5>`), _tmpl$4$h = /* @__PURE__ */ template(`<div class=security-indicator-wrapper><button>`), _tmpl$5$d = /* @__PURE__ */ template(`<div id=address-autocomplete class=autocomplete-dropdown role=listbox>`), _tmpl$6$c = /* @__PURE__ */ template(`<div><span class=agent-status-dot aria-hidden=true></span><span class=agent-status-text>`), _tmpl$7$b = /* @__PURE__ */ template(`<button class="agent-status-badge recent"title="Open the What Changed timeline"style=cursor:pointer;font-size:11px><span class=agent-status-dot aria-hidden=true style=background:#f59e0b></span><span class=agent-status-text>What Changed?`), _tmpl$8$8 = /* @__PURE__ */ template(`<span class=page-diff-burst-meta>Updated <!> times over `), _tmpl$9$
|
|
2953
|
+
var _tmpl$$l = /* @__PURE__ */ template(`<div class=private-badge title="Private Browsing - history and cookies are not saved"><svg width=12 height=12 viewBox="0 0 16 16"fill=currentColor><path d="M8 1a7 7 0 100 14A7 7 0 008 1zm0 1.5a5.5 5.5 0 110 11 5.5 5.5 0 010-11zM5.5 7a1.5 1.5 0 103 0 1.5 1.5 0 00-3 0zm3.5 3.5c0-1-1.5-2-2.5-2s-2.5 1-2.5 2"></path></svg><span>Private`), _tmpl$2$k = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z">`), _tmpl$3$h = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z"></path><line x1=2 y1=12 x2=12 y2=2 stroke=currentColor stroke-width=1.5>`), _tmpl$4$h = /* @__PURE__ */ template(`<div class=security-indicator-wrapper><button>`), _tmpl$5$d = /* @__PURE__ */ template(`<div id=address-autocomplete class=autocomplete-dropdown role=listbox>`), _tmpl$6$c = /* @__PURE__ */ template(`<div><span class=agent-status-dot aria-hidden=true></span><span class=agent-status-text>`), _tmpl$7$b = /* @__PURE__ */ template(`<button class="agent-status-badge recent"title="Open the What Changed timeline"style=cursor:pointer;font-size:11px><span class=agent-status-dot aria-hidden=true style=background:#f59e0b></span><span class=agent-status-text>What Changed?`), _tmpl$8$8 = /* @__PURE__ */ template(`<span class=page-diff-burst-meta>Updated <!> times over `), _tmpl$9$6 = /* @__PURE__ */ template(`<div class=page-diff-burst-history><div class=page-diff-burst-history-label>Recent detections`), _tmpl$0$5 = /* @__PURE__ */ template(`<div class=page-diff-popup><div class=page-diff-popup-header><div class=page-diff-popup-header-copy><span>Compared with your last visit</span><span class=page-diff-burst-meta>Previous snapshot from </span></div><div style=display:flex;gap:8px;align-items:center><button class=nav-btn title="Open the full What Changed timeline"style="height:24px;min-width:auto;padding:0 8px">Timeline</button><button class=page-diff-popup-close>×`), _tmpl$1$5 = /* @__PURE__ */ template(`<svg><path d="M3 3 L11 3 L11 9 Q7 13 3 9 Z"fill=none stroke=currentColor stroke-width=1.2 stroke-linejoin=round></svg>`, false, true, false), _tmpl$10$5 = /* @__PURE__ */ template(`<svg><line x1=2 y1=12 x2=12 y2=2 stroke=currentColor stroke-width=1.4 stroke-linecap=round></svg>`, false, true, false), _tmpl$11$5 = /* @__PURE__ */ template(`<button class=nav-btn data-tooltip="Reader Mode"><svg width=14 height=14 viewBox="0 0 14 14"><rect x=2 y=1 width=10 height=12 rx=1 fill=none stroke=currentColor stroke-width=1.2></rect><line x1=4 y1=4 x2=10 y2=4 stroke=currentColor stroke-width=1></line><line x1=4 y1=6.5 x2=10 y2=6.5 stroke=currentColor stroke-width=1></line><line x1=4 y1=9 x2=8 y2=9 stroke=currentColor stroke-width=1>`), _tmpl$12$5 = /* @__PURE__ */ template(`<button class=nav-btn data-tooltip="Dev Tools"><svg width=14 height=14 viewBox="0 0 14 14"><polyline points="3,5 1,7 3,9"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></polyline><polyline points="11,5 13,7 11,9"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></polyline><line x1=8.5 y1=2 x2=5.5 y2=12 stroke=currentColor stroke-width=1.2 stroke-linecap=round>`), _tmpl$13$4 = /* @__PURE__ */ template(`<span class=nav-btn-badge>`), _tmpl$14$4 = /* @__PURE__ */ template(`<button class="nav-btn nav-btn-sidebar"><svg width=14 height=14 viewBox="0 0 14 14"><rect x=1 y=1 width=12 height=12 rx=1.5 fill=none stroke=currentColor stroke-width=1.2></rect><line x1=9 y1=1 x2=9 y2=13 stroke=currentColor stroke-width=1.2>`), _tmpl$15$4 = /* @__PURE__ */ template(`<button class=nav-btn data-tooltip="Clear Data">`), _tmpl$16$3 = /* @__PURE__ */ template(`<button class=nav-btn data-tooltip=Settings><svg width=14 height=14 viewBox="0 0 14 14"><circle cx=7 cy=7 r=2 fill=none stroke=currentColor stroke-width=1.2></circle><path d="M7 1v2M7 11v2M1 7h2M11 7h2M2.8 2.8l1.4 1.4M9.8 9.8l1.4 1.4M11.2 2.8l-1.4 1.4M4.2 9.8l-1.4 1.4"stroke=currentColor stroke-width=1 stroke-linecap=round>`), _tmpl$17$3 = /* @__PURE__ */ template(`<div class=address-bar><div class=nav-controls><button class=nav-btn data-tooltip=Back><svg width=14 height=14 viewBox="0 0 14 14"><path d="M9 2L4 7l5 5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=nav-btn data-tooltip=Forward><svg width=14 height=14 viewBox="0 0 14 14"><path d="M5 2l5 5-5 5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button><button class=nav-btn data-tooltip=Reload><svg width=14 height=14 viewBox="0 0 14 14"><path d="M2.5 7a4.5 4.5 0 1 1 1 3"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round></path><path d="M2 4v3.5h3.5"fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg></button></div><div class=url-shell><form class=url-form><input class=url-input type=text placeholder="Search or enter URL"autocomplete=off aria-autocomplete=list aria-controls=address-autocomplete></form></div><div class=toolbar-actions><button class=nav-btn><svg width=14 height=14 viewBox="0 0 14 14">`), _tmpl$18$3 = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 14 14"fill=currentColor><path d="M7 1a4 4 0 00-4 4v2H1.5a.5.5 0 00-.5.5v5a.5.5 0 00.5.5h11a.5.5 0 00.5-.5v-5a.5.5 0 00-.5-.5H11V5a4 4 0 00-4-4zm0 1a3 3 0 013 3v2H4V5a3 3 0 013-3z"></path><circle cx=7 cy=8 r=0.8 fill=white>`), _tmpl$19$3 = /* @__PURE__ */ template(`<div role=option><span class=autocomplete-icon></span><span class=autocomplete-text><span class=autocomplete-title></span><span class=autocomplete-url>`), _tmpl$20$2 = /* @__PURE__ */ template(`<div class=page-diff-burst-row><span class=page-diff-burst-time></span><span class=page-diff-burst-summary>`), _tmpl$21$2 = /* @__PURE__ */ template(`<span class=page-diff-burst-summary-section>`), _tmpl$22$2 = /* @__PURE__ */ template(`<span class=page-diff-burst-summary-part><span>`), _tmpl$23$2 = /* @__PURE__ */ template(`<div class=page-diff-snippet><span class=page-diff-snippet-label>Before</span><span class=page-diff-snippet-text>`), _tmpl$24$2 = /* @__PURE__ */ template(`<div class=page-diff-snippet><span class=page-diff-snippet-label>After</span><span class=page-diff-snippet-text>`), _tmpl$25$2 = /* @__PURE__ */ template(`<div class=page-diff-snippets>`), _tmpl$26$2 = /* @__PURE__ */ template(`<div class=page-diff-list-group><span class=page-diff-list-label>Added</span><ul class=page-diff-list>`), _tmpl$27$2 = /* @__PURE__ */ template(`<div class=page-diff-list-group><span class=page-diff-list-label>Removed</span><ul class=page-diff-list>`), _tmpl$28$2 = /* @__PURE__ */ template(`<div><div class=page-diff-item-header><div class=page-diff-badges><span class=page-diff-kind></span><span class=page-diff-section></span></div><span class=page-diff-summary>`), _tmpl$29$2 = /* @__PURE__ */ template(`<li>`);
|
|
2884
2954
|
const AddressBar = (props) => {
|
|
2885
2955
|
const {
|
|
2886
2956
|
activeTab,
|
|
@@ -2915,8 +2985,14 @@ const AddressBar = (props) => {
|
|
|
2915
2985
|
const [selectedIndex, setSelectedIndex] = createSignal(-1);
|
|
2916
2986
|
const [searchEngine, setSearchEngine] = createSignal("duckduckgo");
|
|
2917
2987
|
const [showSecurityPopup, setShowSecurityPopup] = createSignal(false);
|
|
2988
|
+
const [hasEditedAddress, setHasEditedAddress] = createSignal(false);
|
|
2918
2989
|
const now2 = useNow();
|
|
2919
2990
|
let inputRef;
|
|
2991
|
+
let addressBlurTimer = null;
|
|
2992
|
+
let skipNextAddressBlurSync = false;
|
|
2993
|
+
onCleanup(() => {
|
|
2994
|
+
if (addressBlurTimer) clearTimeout(addressBlurTimer);
|
|
2995
|
+
});
|
|
2920
2996
|
const securityState = createMemo(() => {
|
|
2921
2997
|
const tabId = activeTabId2();
|
|
2922
2998
|
return tabId ? getSecurityState(tabId) : void 0;
|
|
@@ -2967,26 +3043,7 @@ const AddressBar = (props) => {
|
|
|
2967
3043
|
}
|
|
2968
3044
|
await window.vessel.ui.openSidebarTab("diff");
|
|
2969
3045
|
};
|
|
2970
|
-
const
|
|
2971
|
-
const diff = Date.now() - new Date(isoDate).getTime();
|
|
2972
|
-
const mins = Math.floor(diff / 6e4);
|
|
2973
|
-
if (mins < 1) return "just now";
|
|
2974
|
-
if (mins < 60) return `${mins}m ago`;
|
|
2975
|
-
const hours = Math.floor(mins / 60);
|
|
2976
|
-
if (hours < 24) return `${hours}h ago`;
|
|
2977
|
-
const days = Math.floor(hours / 24);
|
|
2978
|
-
if (days < 7) return `${days}d ago`;
|
|
2979
|
-
return new Date(isoDate).toLocaleDateString();
|
|
2980
|
-
};
|
|
2981
|
-
const formatElapsed = (startIso, endIso) => {
|
|
2982
|
-
const elapsedMs = Math.max(0, new Date(endIso).getTime() - new Date(startIso).getTime());
|
|
2983
|
-
const secs = Math.round(elapsedMs / 1e3);
|
|
2984
|
-
if (secs < 60) return `${secs}s`;
|
|
2985
|
-
const mins = Math.round(secs / 60);
|
|
2986
|
-
if (mins < 60) return `${mins}m`;
|
|
2987
|
-
const hours = Math.round(mins / 60);
|
|
2988
|
-
return `${hours}h`;
|
|
2989
|
-
};
|
|
3046
|
+
const getChangeKindLabel = (kind) => kind === "added" ? "Added" : kind === "removed" ? "Removed" : "Changed";
|
|
2990
3047
|
createEffect(() => {
|
|
2991
3048
|
if (isPrivateWindow) return;
|
|
2992
3049
|
const unsubscribe2 = window.vessel.pageDiff.onChanged((diff) => {
|
|
@@ -3003,10 +3060,16 @@ const AddressBar = (props) => {
|
|
|
3003
3060
|
}
|
|
3004
3061
|
});
|
|
3005
3062
|
});
|
|
3063
|
+
const syncInputValueFromActiveTab = () => {
|
|
3064
|
+
const tab = activeTab();
|
|
3065
|
+
if (!tab) return;
|
|
3066
|
+
setInputValue(tab.url === "about:blank" ? "" : tab.url);
|
|
3067
|
+
};
|
|
3006
3068
|
createEffect(() => {
|
|
3007
3069
|
const tab = activeTab();
|
|
3008
|
-
|
|
3009
|
-
|
|
3070
|
+
const inputHasFocus = inputRef && document.activeElement === inputRef;
|
|
3071
|
+
if (tab && !hasEditedAddress() && !inputHasFocus) {
|
|
3072
|
+
syncInputValueFromActiveTab();
|
|
3010
3073
|
setShowSuggestions(false);
|
|
3011
3074
|
setSelectedIndex(-1);
|
|
3012
3075
|
}
|
|
@@ -3089,12 +3152,46 @@ const AddressBar = (props) => {
|
|
|
3089
3152
|
cancelled = true;
|
|
3090
3153
|
});
|
|
3091
3154
|
});
|
|
3092
|
-
const
|
|
3093
|
-
|
|
3155
|
+
const clearAddressBlurTimer = () => {
|
|
3156
|
+
if (!addressBlurTimer) return;
|
|
3157
|
+
clearTimeout(addressBlurTimer);
|
|
3158
|
+
addressBlurTimer = null;
|
|
3159
|
+
};
|
|
3160
|
+
const closeAddressSuggestions = () => {
|
|
3094
3161
|
setShowSuggestions(false);
|
|
3095
3162
|
setSelectedIndex(-1);
|
|
3163
|
+
};
|
|
3164
|
+
const commitAddressNavigation = (url) => {
|
|
3165
|
+
clearAddressBlurTimer();
|
|
3166
|
+
setHasEditedAddress(false);
|
|
3167
|
+
skipNextAddressBlurSync = true;
|
|
3096
3168
|
navigate(url);
|
|
3097
3169
|
inputRef?.blur();
|
|
3170
|
+
closeAddressSuggestions();
|
|
3171
|
+
};
|
|
3172
|
+
const cancelAddressEditing = () => {
|
|
3173
|
+
clearAddressBlurTimer();
|
|
3174
|
+
setHasEditedAddress(false);
|
|
3175
|
+
syncInputValueFromActiveTab();
|
|
3176
|
+
inputRef?.blur();
|
|
3177
|
+
closeAddressSuggestions();
|
|
3178
|
+
};
|
|
3179
|
+
const scheduleAddressBlurReset = () => {
|
|
3180
|
+
clearAddressBlurTimer();
|
|
3181
|
+
addressBlurTimer = setTimeout(() => {
|
|
3182
|
+
setHasEditedAddress(false);
|
|
3183
|
+
if (skipNextAddressBlurSync) {
|
|
3184
|
+
skipNextAddressBlurSync = false;
|
|
3185
|
+
} else {
|
|
3186
|
+
syncInputValueFromActiveTab();
|
|
3187
|
+
}
|
|
3188
|
+
closeAddressSuggestions();
|
|
3189
|
+
addressBlurTimer = null;
|
|
3190
|
+
}, 150);
|
|
3191
|
+
};
|
|
3192
|
+
const selectSuggestion = (url) => {
|
|
3193
|
+
setInputValue(url);
|
|
3194
|
+
commitAddressNavigation(url);
|
|
3098
3195
|
};
|
|
3099
3196
|
const handleSubmit = (e) => {
|
|
3100
3197
|
e.preventDefault();
|
|
@@ -3104,11 +3201,7 @@ const AddressBar = (props) => {
|
|
|
3104
3201
|
selectSuggestion(items[idx].url);
|
|
3105
3202
|
} else {
|
|
3106
3203
|
const val = inputValue().trim();
|
|
3107
|
-
if (val)
|
|
3108
|
-
navigate(val);
|
|
3109
|
-
inputRef?.blur();
|
|
3110
|
-
setShowSuggestions(false);
|
|
3111
|
-
}
|
|
3204
|
+
if (val) commitAddressNavigation(val);
|
|
3112
3205
|
}
|
|
3113
3206
|
};
|
|
3114
3207
|
const handleInputKeyDown = (e) => {
|
|
@@ -3128,16 +3221,17 @@ const AddressBar = (props) => {
|
|
|
3128
3221
|
}
|
|
3129
3222
|
} else if (e.key === "Escape") {
|
|
3130
3223
|
if (showSuggestions()) {
|
|
3131
|
-
|
|
3132
|
-
|
|
3224
|
+
syncInputValueFromActiveTab();
|
|
3225
|
+
setHasEditedAddress(false);
|
|
3226
|
+
closeAddressSuggestions();
|
|
3133
3227
|
} else {
|
|
3134
|
-
|
|
3228
|
+
cancelAddressEditing();
|
|
3135
3229
|
}
|
|
3136
3230
|
}
|
|
3137
3231
|
};
|
|
3138
3232
|
const formatSectionLabel = (section) => section === "title" ? "Title" : section === "headings" ? "Headings" : "Content";
|
|
3139
3233
|
return (() => {
|
|
3140
|
-
var _el$ = _tmpl$17$3(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$11 = _el$2.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$
|
|
3234
|
+
var _el$ = _tmpl$17$3(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$11 = _el$2.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$35 = _el$11.nextSibling, _el$36 = _el$35.firstChild, _el$37 = _el$36.firstChild;
|
|
3141
3235
|
addEventListener(_el$3, "click", goBack, true);
|
|
3142
3236
|
addEventListener(_el$4, "click", goForward, true);
|
|
3143
3237
|
addEventListener(_el$5, "click", reload, true);
|
|
@@ -3157,9 +3251,9 @@ const AddressBar = (props) => {
|
|
|
3157
3251
|
insert(_el$8, createComponent(Switch, {
|
|
3158
3252
|
get fallback() {
|
|
3159
3253
|
return (() => {
|
|
3160
|
-
var _el$
|
|
3161
|
-
_el$
|
|
3162
|
-
return _el$
|
|
3254
|
+
var _el$48 = _tmpl$18$3();
|
|
3255
|
+
_el$48.firstChild;
|
|
3256
|
+
return _el$48;
|
|
3163
3257
|
})();
|
|
3164
3258
|
},
|
|
3165
3259
|
get children() {
|
|
@@ -3214,18 +3308,17 @@ const AddressBar = (props) => {
|
|
|
3214
3308
|
}), _el$11);
|
|
3215
3309
|
_el$12.addEventListener("submit", handleSubmit);
|
|
3216
3310
|
_el$13.addEventListener("blur", () => {
|
|
3217
|
-
|
|
3218
|
-
setShowSuggestions(false);
|
|
3219
|
-
setSelectedIndex(-1);
|
|
3220
|
-
}, 150);
|
|
3311
|
+
scheduleAddressBlurReset();
|
|
3221
3312
|
});
|
|
3222
3313
|
_el$13.$$keydown = handleInputKeyDown;
|
|
3223
3314
|
_el$13.addEventListener("focus", (e) => {
|
|
3315
|
+
clearAddressBlurTimer();
|
|
3224
3316
|
e.currentTarget.select();
|
|
3225
3317
|
const query = inputValue().trim();
|
|
3226
3318
|
if (query.length >= 2) setShowSuggestions(true);
|
|
3227
3319
|
});
|
|
3228
3320
|
_el$13.$$input = (e) => {
|
|
3321
|
+
setHasEditedAddress(true);
|
|
3229
3322
|
setInputValue(e.currentTarget.value);
|
|
3230
3323
|
setShowSuggestions(true);
|
|
3231
3324
|
setSelectedIndex(-1);
|
|
@@ -3244,30 +3337,30 @@ const AddressBar = (props) => {
|
|
|
3244
3337
|
return suggestions();
|
|
3245
3338
|
},
|
|
3246
3339
|
children: (item, i) => (() => {
|
|
3247
|
-
var _el$
|
|
3248
|
-
_el$
|
|
3249
|
-
_el$
|
|
3340
|
+
var _el$50 = _tmpl$19$3(), _el$51 = _el$50.firstChild, _el$52 = _el$51.nextSibling, _el$53 = _el$52.firstChild, _el$54 = _el$53.nextSibling;
|
|
3341
|
+
_el$50.addEventListener("mouseenter", () => setSelectedIndex(i()));
|
|
3342
|
+
_el$50.$$mousedown = (e) => {
|
|
3250
3343
|
e.preventDefault();
|
|
3251
3344
|
selectSuggestion(item.url);
|
|
3252
3345
|
};
|
|
3253
|
-
insert(_el$
|
|
3346
|
+
insert(_el$51, (() => {
|
|
3254
3347
|
var _c$ = memo(() => item.source === "bookmark");
|
|
3255
3348
|
return () => _c$() ? "★" : item.source === "search" ? "⌕" : "◌";
|
|
3256
3349
|
})());
|
|
3257
|
-
insert(_el$
|
|
3258
|
-
insert(_el$
|
|
3350
|
+
insert(_el$53, () => item.title || item.url);
|
|
3351
|
+
insert(_el$54, () => item.subtitle || item.url);
|
|
3259
3352
|
createRenderEffect((_p$) => {
|
|
3260
3353
|
var _v$12 = `address-autocomplete-${i()}`, _v$13 = `autocomplete-item ${selectedIndex() === i() ? "selected" : ""}`, _v$14 = selectedIndex() === i();
|
|
3261
|
-
_v$12 !== _p$.e && setAttribute(_el$
|
|
3262
|
-
_v$13 !== _p$.t && className(_el$
|
|
3263
|
-
_v$14 !== _p$.a && setAttribute(_el$
|
|
3354
|
+
_v$12 !== _p$.e && setAttribute(_el$50, "id", _p$.e = _v$12);
|
|
3355
|
+
_v$13 !== _p$.t && className(_el$50, _p$.t = _v$13);
|
|
3356
|
+
_v$14 !== _p$.a && setAttribute(_el$50, "aria-selected", _p$.a = _v$14);
|
|
3264
3357
|
return _p$;
|
|
3265
3358
|
}, {
|
|
3266
3359
|
e: void 0,
|
|
3267
3360
|
t: void 0,
|
|
3268
3361
|
a: void 0
|
|
3269
3362
|
});
|
|
3270
|
-
return _el$
|
|
3363
|
+
return _el$50;
|
|
3271
3364
|
})()
|
|
3272
3365
|
}));
|
|
3273
3366
|
return _el$14;
|
|
@@ -3305,43 +3398,66 @@ const AddressBar = (props) => {
|
|
|
3305
3398
|
return memo(() => !!pageDiff())() && diffExpanded();
|
|
3306
3399
|
},
|
|
3307
3400
|
get children() {
|
|
3308
|
-
var _el$19 = _tmpl$0$5(), _el$20 = _el$19.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$21.firstChild;
|
|
3309
|
-
_el$
|
|
3310
|
-
var _el$
|
|
3311
|
-
insert(_el$
|
|
3401
|
+
var _el$19 = _tmpl$0$5(), _el$20 = _el$19.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling;
|
|
3402
|
+
_el$23.firstChild;
|
|
3403
|
+
var _el$30 = _el$21.nextSibling, _el$31 = _el$30.firstChild, _el$32 = _el$31.nextSibling;
|
|
3404
|
+
insert(_el$23, () => formatRelativeTime(pageDiff().oldSnapshot.capturedAt), null);
|
|
3312
3405
|
insert(_el$21, createComponent(Show, {
|
|
3313
3406
|
get when() {
|
|
3314
3407
|
return memo(() => !!((pageDiff().burstCount || 0) > 1 && pageDiff().firstDetectedAt))() && pageDiff().lastDetectedAt;
|
|
3315
3408
|
},
|
|
3316
3409
|
get children() {
|
|
3317
|
-
var _el$
|
|
3318
|
-
_el$
|
|
3319
|
-
insert(_el$
|
|
3320
|
-
insert(_el$
|
|
3321
|
-
return _el$
|
|
3410
|
+
var _el$25 = _tmpl$8$8(), _el$26 = _el$25.firstChild, _el$29 = _el$26.nextSibling;
|
|
3411
|
+
_el$29.nextSibling;
|
|
3412
|
+
insert(_el$25, () => pageDiff().burstCount, _el$29);
|
|
3413
|
+
insert(_el$25, () => formatElapsedTime(pageDiff().firstDetectedAt, pageDiff().lastDetectedAt), null);
|
|
3414
|
+
return _el$25;
|
|
3322
3415
|
}
|
|
3323
3416
|
}), null);
|
|
3324
|
-
_el$
|
|
3325
|
-
_el$
|
|
3417
|
+
_el$31.$$click = () => void openDiffTimeline();
|
|
3418
|
+
_el$32.$$click = () => setDiffExpanded(false);
|
|
3326
3419
|
insert(_el$19, createComponent(Show, {
|
|
3327
3420
|
get when() {
|
|
3328
3421
|
return memo(() => !!pageDiff().recentBursts?.length)() && (pageDiff().recentBursts?.length || 0) > 1;
|
|
3329
3422
|
},
|
|
3330
3423
|
get children() {
|
|
3331
|
-
var _el$
|
|
3332
|
-
_el$
|
|
3333
|
-
insert(_el$
|
|
3424
|
+
var _el$33 = _tmpl$9$6();
|
|
3425
|
+
_el$33.firstChild;
|
|
3426
|
+
insert(_el$33, createComponent(For, {
|
|
3334
3427
|
get each() {
|
|
3335
3428
|
return pageDiff().recentBursts;
|
|
3336
3429
|
},
|
|
3337
|
-
children: (burst) => (() => {
|
|
3338
|
-
var _el$
|
|
3339
|
-
insert(_el$
|
|
3340
|
-
|
|
3341
|
-
|
|
3430
|
+
children: (burst, i) => (() => {
|
|
3431
|
+
var _el$55 = _tmpl$20$2(), _el$56 = _el$55.firstChild, _el$57 = _el$56.nextSibling;
|
|
3432
|
+
insert(_el$56, (() => {
|
|
3433
|
+
var _c$2 = memo(() => i() === 0);
|
|
3434
|
+
return () => _c$2() ? "Latest" : formatRelativeTime(burst.detectedAt);
|
|
3435
|
+
})());
|
|
3436
|
+
insert(_el$57, createComponent(For, {
|
|
3437
|
+
get each() {
|
|
3438
|
+
return parseDiffSummaryParts(burst.summary);
|
|
3439
|
+
},
|
|
3440
|
+
children: (part) => (() => {
|
|
3441
|
+
var _el$58 = _tmpl$22$2(), _el$60 = _el$58.firstChild;
|
|
3442
|
+
insert(_el$58, createComponent(Show, {
|
|
3443
|
+
get when() {
|
|
3444
|
+
return part.section;
|
|
3445
|
+
},
|
|
3446
|
+
get children() {
|
|
3447
|
+
var _el$59 = _tmpl$21$2();
|
|
3448
|
+
insert(_el$59, () => part.section);
|
|
3449
|
+
return _el$59;
|
|
3450
|
+
}
|
|
3451
|
+
}), _el$60);
|
|
3452
|
+
insert(_el$60, () => part.text);
|
|
3453
|
+
return _el$58;
|
|
3454
|
+
})()
|
|
3455
|
+
}));
|
|
3456
|
+
createRenderEffect(() => _el$55.classList.toggle("latest", !!(i() === 0)));
|
|
3457
|
+
return _el$55;
|
|
3342
3458
|
})()
|
|
3343
3459
|
}), null);
|
|
3344
|
-
return _el$
|
|
3460
|
+
return _el$33;
|
|
3345
3461
|
}
|
|
3346
3462
|
}), null);
|
|
3347
3463
|
insert(_el$19, createComponent(For, {
|
|
@@ -3349,89 +3465,90 @@ const AddressBar = (props) => {
|
|
|
3349
3465
|
return pageDiff().changes;
|
|
3350
3466
|
},
|
|
3351
3467
|
children: (change) => (() => {
|
|
3352
|
-
var _el$
|
|
3353
|
-
insert(_el$
|
|
3354
|
-
insert(_el$
|
|
3355
|
-
insert(_el$
|
|
3468
|
+
var _el$61 = _tmpl$28$2(), _el$62 = _el$61.firstChild, _el$63 = _el$62.firstChild, _el$64 = _el$63.firstChild, _el$65 = _el$64.nextSibling, _el$66 = _el$63.nextSibling;
|
|
3469
|
+
insert(_el$64, () => getChangeKindLabel(change.kind));
|
|
3470
|
+
insert(_el$65, () => formatSectionLabel(change.section));
|
|
3471
|
+
insert(_el$66, () => change.summary);
|
|
3472
|
+
insert(_el$61, createComponent(Show, {
|
|
3356
3473
|
get when() {
|
|
3357
3474
|
return change.before || change.after;
|
|
3358
3475
|
},
|
|
3359
3476
|
get children() {
|
|
3360
|
-
var _el$
|
|
3361
|
-
insert(_el$
|
|
3477
|
+
var _el$67 = _tmpl$25$2();
|
|
3478
|
+
insert(_el$67, createComponent(Show, {
|
|
3362
3479
|
get when() {
|
|
3363
3480
|
return change.before;
|
|
3364
3481
|
},
|
|
3365
3482
|
get children() {
|
|
3366
|
-
var _el$
|
|
3367
|
-
insert(_el$
|
|
3368
|
-
return _el$
|
|
3483
|
+
var _el$68 = _tmpl$23$2(), _el$69 = _el$68.firstChild, _el$70 = _el$69.nextSibling;
|
|
3484
|
+
insert(_el$70, () => change.before);
|
|
3485
|
+
return _el$68;
|
|
3369
3486
|
}
|
|
3370
3487
|
}), null);
|
|
3371
|
-
insert(_el$
|
|
3488
|
+
insert(_el$67, createComponent(Show, {
|
|
3372
3489
|
get when() {
|
|
3373
3490
|
return change.after;
|
|
3374
3491
|
},
|
|
3375
3492
|
get children() {
|
|
3376
|
-
var _el$
|
|
3377
|
-
insert(_el$
|
|
3378
|
-
return _el$
|
|
3493
|
+
var _el$71 = _tmpl$24$2(), _el$72 = _el$71.firstChild, _el$73 = _el$72.nextSibling;
|
|
3494
|
+
insert(_el$73, () => change.after);
|
|
3495
|
+
return _el$71;
|
|
3379
3496
|
}
|
|
3380
3497
|
}), null);
|
|
3381
|
-
return _el$
|
|
3498
|
+
return _el$67;
|
|
3382
3499
|
}
|
|
3383
3500
|
}), null);
|
|
3384
|
-
insert(_el$
|
|
3501
|
+
insert(_el$61, createComponent(Show, {
|
|
3385
3502
|
get when() {
|
|
3386
3503
|
return change.addedItems?.length;
|
|
3387
3504
|
},
|
|
3388
3505
|
get children() {
|
|
3389
|
-
var _el$
|
|
3390
|
-
insert(_el$
|
|
3506
|
+
var _el$74 = _tmpl$26$2(), _el$75 = _el$74.firstChild, _el$76 = _el$75.nextSibling;
|
|
3507
|
+
insert(_el$76, createComponent(For, {
|
|
3391
3508
|
get each() {
|
|
3392
3509
|
return change.addedItems;
|
|
3393
3510
|
},
|
|
3394
3511
|
children: (item) => (() => {
|
|
3395
|
-
var _el$
|
|
3396
|
-
insert(_el$
|
|
3397
|
-
return _el$
|
|
3512
|
+
var _el$80 = _tmpl$29$2();
|
|
3513
|
+
insert(_el$80, item);
|
|
3514
|
+
return _el$80;
|
|
3398
3515
|
})()
|
|
3399
3516
|
}));
|
|
3400
|
-
return _el$
|
|
3517
|
+
return _el$74;
|
|
3401
3518
|
}
|
|
3402
3519
|
}), null);
|
|
3403
|
-
insert(_el$
|
|
3520
|
+
insert(_el$61, createComponent(Show, {
|
|
3404
3521
|
get when() {
|
|
3405
3522
|
return change.removedItems?.length;
|
|
3406
3523
|
},
|
|
3407
3524
|
get children() {
|
|
3408
|
-
var _el$
|
|
3409
|
-
insert(_el$
|
|
3525
|
+
var _el$77 = _tmpl$27$2(), _el$78 = _el$77.firstChild, _el$79 = _el$78.nextSibling;
|
|
3526
|
+
insert(_el$79, createComponent(For, {
|
|
3410
3527
|
get each() {
|
|
3411
3528
|
return change.removedItems;
|
|
3412
3529
|
},
|
|
3413
3530
|
children: (item) => (() => {
|
|
3414
|
-
var _el$
|
|
3415
|
-
insert(_el$
|
|
3416
|
-
return _el$
|
|
3531
|
+
var _el$81 = _tmpl$29$2();
|
|
3532
|
+
insert(_el$81, item);
|
|
3533
|
+
return _el$81;
|
|
3417
3534
|
})()
|
|
3418
3535
|
}));
|
|
3419
|
-
return _el$
|
|
3536
|
+
return _el$77;
|
|
3420
3537
|
}
|
|
3421
3538
|
}), null);
|
|
3422
|
-
createRenderEffect(() => className(_el$
|
|
3423
|
-
return _el$
|
|
3539
|
+
createRenderEffect(() => className(_el$61, `page-diff-item page-diff-${change.kind}`));
|
|
3540
|
+
return _el$61;
|
|
3424
3541
|
})()
|
|
3425
3542
|
}), null);
|
|
3426
3543
|
return _el$19;
|
|
3427
3544
|
}
|
|
3428
|
-
}), _el$
|
|
3429
|
-
_el$
|
|
3545
|
+
}), _el$35);
|
|
3546
|
+
_el$36.$$click = async () => {
|
|
3430
3547
|
const id = activeTabId2();
|
|
3431
3548
|
if (!id) return;
|
|
3432
3549
|
await toggleAdBlock(id);
|
|
3433
3550
|
};
|
|
3434
|
-
insert(_el$
|
|
3551
|
+
insert(_el$37, createComponent(Show, {
|
|
3435
3552
|
get when() {
|
|
3436
3553
|
return activeTab()?.adBlockingEnabled;
|
|
3437
3554
|
},
|
|
@@ -3439,7 +3556,7 @@ const AddressBar = (props) => {
|
|
|
3439
3556
|
return _tmpl$1$5();
|
|
3440
3557
|
}
|
|
3441
3558
|
}), null);
|
|
3442
|
-
insert(_el$
|
|
3559
|
+
insert(_el$37, createComponent(Show, {
|
|
3443
3560
|
get when() {
|
|
3444
3561
|
return !activeTab()?.adBlockingEnabled;
|
|
3445
3562
|
},
|
|
@@ -3447,67 +3564,67 @@ const AddressBar = (props) => {
|
|
|
3447
3564
|
return [_tmpl$1$5(), _tmpl$10$5()];
|
|
3448
3565
|
}
|
|
3449
3566
|
}), null);
|
|
3450
|
-
insert(_el$
|
|
3567
|
+
insert(_el$35, createComponent(Show, {
|
|
3451
3568
|
when: !isPrivateWindow,
|
|
3452
3569
|
get children() {
|
|
3453
|
-
var _el$
|
|
3454
|
-
_el$
|
|
3455
|
-
createRenderEffect(() => _el$
|
|
3456
|
-
return _el$
|
|
3570
|
+
var _el$41 = _tmpl$11$5();
|
|
3571
|
+
_el$41.$$click = () => window.vessel.content.toggleReader();
|
|
3572
|
+
createRenderEffect(() => _el$41.classList.toggle("active", !!activeTab()?.isReaderMode));
|
|
3573
|
+
return _el$41;
|
|
3457
3574
|
}
|
|
3458
3575
|
}), null);
|
|
3459
|
-
insert(_el$
|
|
3576
|
+
insert(_el$35, createComponent(Show, {
|
|
3460
3577
|
when: !isPrivateWindow,
|
|
3461
3578
|
get children() {
|
|
3462
|
-
var _el$
|
|
3463
|
-
addEventListener(_el$
|
|
3464
|
-
createRenderEffect(() => _el$
|
|
3465
|
-
return _el$
|
|
3579
|
+
var _el$42 = _tmpl$12$5();
|
|
3580
|
+
addEventListener(_el$42, "click", toggleDevTools, true);
|
|
3581
|
+
createRenderEffect(() => _el$42.classList.toggle("active", !!devtoolsPanelOpen2()));
|
|
3582
|
+
return _el$42;
|
|
3466
3583
|
}
|
|
3467
3584
|
}), null);
|
|
3468
|
-
insert(_el$
|
|
3585
|
+
insert(_el$35, createComponent(Show, {
|
|
3469
3586
|
when: !isPrivateWindow,
|
|
3470
3587
|
get children() {
|
|
3471
|
-
var _el$
|
|
3472
|
-
_el$
|
|
3473
|
-
addEventListener(_el$
|
|
3474
|
-
insert(_el$
|
|
3588
|
+
var _el$43 = _tmpl$14$4();
|
|
3589
|
+
_el$43.firstChild;
|
|
3590
|
+
addEventListener(_el$43, "click", toggleSidebar, true);
|
|
3591
|
+
insert(_el$43, createComponent(Show, {
|
|
3475
3592
|
get when() {
|
|
3476
3593
|
return pendingApprovalCount() > 0;
|
|
3477
3594
|
},
|
|
3478
3595
|
get children() {
|
|
3479
|
-
var _el$
|
|
3480
|
-
insert(_el$
|
|
3481
|
-
createRenderEffect(() => setAttribute(_el$
|
|
3482
|
-
return _el$
|
|
3596
|
+
var _el$45 = _tmpl$13$4();
|
|
3597
|
+
insert(_el$45, pendingApprovalCount);
|
|
3598
|
+
createRenderEffect(() => setAttribute(_el$45, "aria-label", `${pendingApprovalCount()} pending`));
|
|
3599
|
+
return _el$45;
|
|
3483
3600
|
}
|
|
3484
3601
|
}), null);
|
|
3485
3602
|
createRenderEffect((_p$) => {
|
|
3486
3603
|
var _v$5 = !!(pendingApprovalCount() > 0), _v$6 = pendingApprovalCount() > 0 ? `AI Sidebar — ${pendingApprovalCount()} pending approval${pendingApprovalCount() > 1 ? "s" : ""}` : "AI Sidebar (Ctrl+Shift+L)";
|
|
3487
|
-
_v$5 !== _p$.e && _el$
|
|
3488
|
-
_v$6 !== _p$.t && setAttribute(_el$
|
|
3604
|
+
_v$5 !== _p$.e && _el$43.classList.toggle("has-approvals", _p$.e = _v$5);
|
|
3605
|
+
_v$6 !== _p$.t && setAttribute(_el$43, "title", _p$.t = _v$6);
|
|
3489
3606
|
return _p$;
|
|
3490
3607
|
}, {
|
|
3491
3608
|
e: void 0,
|
|
3492
3609
|
t: void 0
|
|
3493
3610
|
});
|
|
3494
|
-
return _el$
|
|
3611
|
+
return _el$43;
|
|
3495
3612
|
}
|
|
3496
3613
|
}), null);
|
|
3497
|
-
insert(_el$
|
|
3614
|
+
insert(_el$35, createComponent(Show, {
|
|
3498
3615
|
when: !isPrivateWindow,
|
|
3499
3616
|
get children() {
|
|
3500
3617
|
return [(() => {
|
|
3501
|
-
var _el$
|
|
3502
|
-
addEventListener(_el$
|
|
3503
|
-
insert(_el$
|
|
3618
|
+
var _el$46 = _tmpl$15$4();
|
|
3619
|
+
addEventListener(_el$46, "click", props.onClearData, true);
|
|
3620
|
+
insert(_el$46, createComponent(trash_2_default, {
|
|
3504
3621
|
size: 14
|
|
3505
3622
|
}));
|
|
3506
|
-
return _el$45;
|
|
3507
|
-
})(), (() => {
|
|
3508
|
-
var _el$46 = _tmpl$16$3();
|
|
3509
|
-
addEventListener(_el$46, "click", openSettings, true);
|
|
3510
3623
|
return _el$46;
|
|
3624
|
+
})(), (() => {
|
|
3625
|
+
var _el$47 = _tmpl$16$3();
|
|
3626
|
+
addEventListener(_el$47, "click", openSettings, true);
|
|
3627
|
+
return _el$47;
|
|
3511
3628
|
})()];
|
|
3512
3629
|
}
|
|
3513
3630
|
}), null);
|
|
@@ -3517,9 +3634,9 @@ const AddressBar = (props) => {
|
|
|
3517
3634
|
_v$8 !== _p$.t && (_el$4.disabled = _p$.t = _v$8);
|
|
3518
3635
|
_v$9 !== _p$.a && setAttribute(_el$13, "aria-expanded", _p$.a = _v$9);
|
|
3519
3636
|
_v$0 !== _p$.o && setAttribute(_el$13, "aria-activedescendant", _p$.o = _v$0);
|
|
3520
|
-
_v$1 !== _p$.i && _el$
|
|
3521
|
-
_v$10 !== _p$.n && _el$
|
|
3522
|
-
_v$11 !== _p$.s && setAttribute(_el$
|
|
3637
|
+
_v$1 !== _p$.i && _el$36.classList.toggle("active", _p$.i = _v$1);
|
|
3638
|
+
_v$10 !== _p$.n && _el$36.classList.toggle("nav-btn-muted", _p$.n = _v$10);
|
|
3639
|
+
_v$11 !== _p$.s && setAttribute(_el$36, "title", _p$.s = _v$11);
|
|
3523
3640
|
return _p$;
|
|
3524
3641
|
}, {
|
|
3525
3642
|
e: void 0,
|
|
@@ -6421,7 +6538,7 @@ function renderKitPrompt(kit, values) {
|
|
|
6421
6538
|
(_, key) => values[key] ?? ""
|
|
6422
6539
|
);
|
|
6423
6540
|
}
|
|
6424
|
-
var _tmpl$$c = /* @__PURE__ */ template(`<div class=kit-upsell><div class=kit-upsell-icon aria-hidden=true></div><p class=kit-upsell-title>Vessel Premium</p><p class=kit-upsell-body>Automation Kits are a premium feature. Upgrade to unlock pre-built workflows you can launch with one click.</p><button class="agent-primary-button kit-upsell-btn"type=button>Start 7-day free trial — $5.99/mo after`), _tmpl$2$c = /* @__PURE__ */ template(`<div class=kit-list-header><span class=agent-panel-title>Automation Kits <span class=kit-beta-tag>Beta</span></span><div class=kit-list-header-actions><span class=kit-list-count> kits</span><button class=kit-install-btn type=button title="Install a kit from a .kit.json file">+ Install`), _tmpl$3$b = /* @__PURE__ */ template(`<div class=kit-install-error><span></span><button class=kit-install-error-dismiss type=button aria-label=Dismiss>×`), _tmpl$4$b = /* @__PURE__ */ template(`<div class=kit-list>`), _tmpl$5$8 = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Scheduled</span><span class=kit-list-count>`), _tmpl$6$8 = /* @__PURE__ */ template(`<div class=kit-sched-list>`), _tmpl$7$8 = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Recent Activity</span><span class=kit-list-count>`), _tmpl$8$7 = /* @__PURE__ */ template(`<div class=kit-activity-list>`), _tmpl$9$
|
|
6541
|
+
var _tmpl$$c = /* @__PURE__ */ template(`<div class=kit-upsell><div class=kit-upsell-icon aria-hidden=true></div><p class=kit-upsell-title>Vessel Premium</p><p class=kit-upsell-body>Automation Kits are a premium feature. Upgrade to unlock pre-built workflows you can launch with one click.</p><button class="agent-primary-button kit-upsell-btn"type=button>Start 7-day free trial — $5.99/mo after`), _tmpl$2$c = /* @__PURE__ */ template(`<div class=kit-list-header><span class=agent-panel-title>Automation Kits <span class=kit-beta-tag>Beta</span></span><div class=kit-list-header-actions><span class=kit-list-count> kits</span><button class=kit-install-btn type=button title="Install a kit from a .kit.json file">+ Install`), _tmpl$3$b = /* @__PURE__ */ template(`<div class=kit-install-error><span></span><button class=kit-install-error-dismiss type=button aria-label=Dismiss>×`), _tmpl$4$b = /* @__PURE__ */ template(`<div class=kit-list>`), _tmpl$5$8 = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Scheduled</span><span class=kit-list-count>`), _tmpl$6$8 = /* @__PURE__ */ template(`<div class=kit-sched-list>`), _tmpl$7$8 = /* @__PURE__ */ template(`<div class=kit-sched-section><span>Recent Activity</span><span class=kit-list-count>`), _tmpl$8$7 = /* @__PURE__ */ template(`<div class=kit-activity-list>`), _tmpl$9$5 = /* @__PURE__ */ template(`<div class=kit-form-header><button class=kit-back-btn type=button title="Back to kits"><svg width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M9 11L5 7l4-4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round></path></svg>Back</button><div class=kit-form-title>`), _tmpl$0$4 = /* @__PURE__ */ template(`<p class=kit-form-desc>`), _tmpl$1$4 = /* @__PURE__ */ template(`<div class=kit-form-fields>`), _tmpl$10$4 = /* @__PURE__ */ template(`<p class=kit-form-estimate>Estimated run time: ~<!> min`), _tmpl$11$4 = /* @__PURE__ */ template(`<button class="agent-primary-button kit-run-btn"type=button>`), _tmpl$12$4 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Date & time</label><input class=kit-form-input type=datetime-local>`), _tmpl$13$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Time of day</label><input class="kit-form-input kit-schedule-time"type=time>`), _tmpl$14$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Day</label><select class=kit-form-input>`), _tmpl$15$3 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label class=kit-form-label>Time</label><input class="kit-form-input kit-schedule-time"type=time>`), _tmpl$16$2 = /* @__PURE__ */ template(`<p class=kit-schedule-error>`), _tmpl$17$2 = /* @__PURE__ */ template(`<div class=kit-schedule-form><div class=kit-schedule-types></div><p class=kit-schedule-note>Schedules run only while Vessel is open. Missed runs are skipped.</p><button class="agent-primary-button kit-schedule-btn"type=button>`), _tmpl$18$2 = /* @__PURE__ */ template(`<div class=kit-schedule-section><label class=kit-schedule-toggle><input type=checkbox>Schedule for later`), _tmpl$19$2 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Run at</label><input type=datetime-local class="kit-form-input kit-schedule-time">`), _tmpl$20$1 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Day</label><select class="kit-form-input kit-schedule-time">`), _tmpl$21$1 = /* @__PURE__ */ template(`<div class=kit-schedule-row><label>Time</label><input type=time class="kit-form-input kit-schedule-time">`), _tmpl$22$1 = /* @__PURE__ */ template(`<div class=sched-edit-backdrop><div class=sched-edit-panel><div class=sched-edit-header><span class=sched-edit-title>Edit schedule</span><span class=sched-edit-job-name></span></div><div class=kit-schedule-types></div><div class=sched-edit-actions><button class=kit-back-btn type=button>Cancel</button><button class=agent-primary-button type=button>Save`), _tmpl$23$1 = /* @__PURE__ */ template(`<section class=automation-panel>`), _tmpl$24$1 = /* @__PURE__ */ template(`<div class=kit-card-meta>~<!> min`), _tmpl$25$1 = /* @__PURE__ */ template(`<button class=kit-remove-btn type=button>×`), _tmpl$26$1 = /* @__PURE__ */ template(`<div class=kit-card role=button tabindex=0><span class=kit-card-icon aria-hidden=true></span><div class=kit-card-body><div class=kit-card-name></div><div class=kit-card-desc>`), _tmpl$27$1 = /* @__PURE__ */ template(`<svg class=kit-card-caret width=14 height=14 viewBox="0 0 14 14"fill=none aria-hidden=true><path d="M5 3l4 4-4 4"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`), _tmpl$28$1 = /* @__PURE__ */ template(`<div class=kit-sched-next>Next: `), _tmpl$29$1 = /* @__PURE__ */ template(`<div class=sched-context-menu><button class=sched-ctx-item type=button>Edit task</button><button class=sched-ctx-item type=button>Edit schedule</button><div class=sched-ctx-divider></div><button class=sched-ctx-item type=button></button><button class="sched-ctx-item sched-ctx-danger"type=button>Delete`), _tmpl$30$1 = /* @__PURE__ */ template(`<div class=kit-sched-card><span class="kit-card-icon kit-sched-icon"aria-hidden=true></span><div class=kit-sched-body><div class=kit-sched-name></div><div class=kit-sched-meta></div></div><div class=kit-sched-actions><button class=kit-sched-toggle type=button></button><button class=kit-remove-btn type=button title="Delete schedule"aria-label="Delete schedule">×`), _tmpl$31$1 = /* @__PURE__ */ template(`<div class=kit-activity-output>`), _tmpl$32$1 = /* @__PURE__ */ template(`<div class=kit-activity-card><div class=kit-activity-header><div class=kit-activity-title><span class="kit-card-icon kit-sched-icon"aria-hidden=true></span><div class=kit-activity-title-copy><div class=kit-sched-name></div><div class=kit-activity-time></div></div></div><span class=kit-activity-badge>`), _tmpl$33$1 = /* @__PURE__ */ template(`<div class="kit-activity-output kit-activity-placeholder">`), _tmpl$34$1 = /* @__PURE__ */ template(`<span class=kit-form-required aria-hidden=true>*`), _tmpl$35$1 = /* @__PURE__ */ template(`<textarea class=kit-form-textarea rows=3>`), _tmpl$36$1 = /* @__PURE__ */ template(`<p class=kit-form-hint>`), _tmpl$37$1 = /* @__PURE__ */ template(`<div class=kit-form-field><label class=kit-form-label>`), _tmpl$38$1 = /* @__PURE__ */ template(`<input class=kit-form-input>`), _tmpl$39$1 = /* @__PURE__ */ template(`<span class=kit-run-spinner aria-hidden=true>`), _tmpl$40$1 = /* @__PURE__ */ template(`<label class=kit-schedule-type-option><input type=radio name=sched-type>`), _tmpl$41$1 = /* @__PURE__ */ template(`<option>`), _tmpl$42$1 = /* @__PURE__ */ template(`<label class=kit-schedule-type-option><input type=radio name=edit-sched-type>`);
|
|
6425
6542
|
const ICON_MAP = {
|
|
6426
6543
|
BookOpen: book_open_default,
|
|
6427
6544
|
Tag: tag_default,
|
|
@@ -6984,7 +7101,7 @@ const AutomationTab = (props) => {
|
|
|
6984
7101
|
},
|
|
6985
7102
|
get children() {
|
|
6986
7103
|
return [(() => {
|
|
6987
|
-
var _el$23 = _tmpl$9$
|
|
7104
|
+
var _el$23 = _tmpl$9$5(), _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling;
|
|
6988
7105
|
_el$24.$$click = () => {
|
|
6989
7106
|
setSelectedKit(null);
|
|
6990
7107
|
setEditingTaskJobId(null);
|
|
@@ -7260,7 +7377,7 @@ const AutomationTab = (props) => {
|
|
|
7260
7377
|
})();
|
|
7261
7378
|
};
|
|
7262
7379
|
delegateEvents(["click", "input", "keydown", "contextmenu"]);
|
|
7263
|
-
var _tmpl$$b = /* @__PURE__ */ template(`<div class=agent-muted>Loading...`), _tmpl$2$b = /* @__PURE__ */ template(`<div class=agent-muted>`), _tmpl$3$a = /* @__PURE__ */ template(`<div class=agent-muted>No changes detected yet.`), _tmpl$4$a = /* @__PURE__ */ template(`<div class=agent-section-title>
|
|
7380
|
+
var _tmpl$$b = /* @__PURE__ */ template(`<div class=agent-muted>Loading...`), _tmpl$2$b = /* @__PURE__ */ template(`<div class=agent-muted>`), _tmpl$3$a = /* @__PURE__ */ template(`<div class=agent-muted>No changes detected yet.`), _tmpl$4$a = /* @__PURE__ */ template(`<div class=page-diff-timeline-header><div class=agent-section-title>Change history for this page</div><div class=agent-muted>Newest detections are first. Each entry is a saved change burst.`), _tmpl$5$7 = /* @__PURE__ */ template(`<div class=page-diff-history-list>`), _tmpl$6$7 = /* @__PURE__ */ template(`<div class=page-diff-timeline>`), _tmpl$7$7 = /* @__PURE__ */ template(`<div class=page-diff-history-item><div class=page-diff-history-time><span class=page-diff-history-label></span><span></span></div><div class=page-diff-history-card><div class=page-diff-history-summary-list></div><div class=page-diff-history-position>Entry <!> of `), _tmpl$8$6 = /* @__PURE__ */ template(`<span class=page-diff-history-summary-section>`), _tmpl$9$4 = /* @__PURE__ */ template(`<div class=page-diff-history-summary-row><span class=page-diff-history-summary>`);
|
|
7264
7381
|
const PageDiffTimeline = () => {
|
|
7265
7382
|
const {
|
|
7266
7383
|
activeTab
|
|
@@ -7351,18 +7468,35 @@ const PageDiffTimeline = () => {
|
|
|
7351
7468
|
return bursts();
|
|
7352
7469
|
},
|
|
7353
7470
|
children: (burst, i) => (() => {
|
|
7354
|
-
var _el$7 = _tmpl$
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
|
|
7471
|
+
var _el$7 = _tmpl$7$7(), _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$8.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling, _el$12 = _el$11.firstChild, _el$14 = _el$12.nextSibling;
|
|
7472
|
+
_el$14.nextSibling;
|
|
7473
|
+
insert(_el$9, (() => {
|
|
7474
|
+
var _c$ = memo(() => i() === 0);
|
|
7475
|
+
return () => _c$() ? "Latest change" : formatRelativeTime(burst.detectedAt);
|
|
7476
|
+
})());
|
|
7477
|
+
insert(_el$0, () => formatShortDateTime(burst.detectedAt));
|
|
7478
|
+
insert(_el$10, createComponent(For, {
|
|
7479
|
+
get each() {
|
|
7480
|
+
return parseDiffSummaryParts(burst.summary);
|
|
7358
7481
|
},
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7482
|
+
children: (part) => (() => {
|
|
7483
|
+
var _el$15 = _tmpl$9$4(), _el$17 = _el$15.firstChild;
|
|
7484
|
+
insert(_el$15, createComponent(Show, {
|
|
7485
|
+
get when() {
|
|
7486
|
+
return part.section;
|
|
7487
|
+
},
|
|
7488
|
+
get children() {
|
|
7489
|
+
var _el$16 = _tmpl$8$6();
|
|
7490
|
+
insert(_el$16, () => part.section);
|
|
7491
|
+
return _el$16;
|
|
7492
|
+
}
|
|
7493
|
+
}), _el$17);
|
|
7494
|
+
insert(_el$17, () => part.text);
|
|
7495
|
+
return _el$15;
|
|
7496
|
+
})()
|
|
7497
|
+
}));
|
|
7498
|
+
insert(_el$11, () => i() + 1, _el$14);
|
|
7499
|
+
insert(_el$11, () => bursts().length, null);
|
|
7366
7500
|
return _el$7;
|
|
7367
7501
|
})()
|
|
7368
7502
|
}));
|