@spotpatch/runtime 1.15.4 → 1.15.5

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/dist/index.cjs CHANGED
@@ -1771,7 +1771,7 @@ var AGENT_PANEL_STYLES = `
1771
1771
  overflow: hidden;
1772
1772
  border: 1px solid var(--spotpatch-border-subtle);
1773
1773
  border-radius: var(--spotpatch-radius-card);
1774
- background: rgb(255 255 255 / 2.5%);
1774
+ background: var(--spotpatch-bg-raised);
1775
1775
  }
1776
1776
  .spotpatch-agent-head {
1777
1777
  display: flex;
@@ -1779,17 +1779,17 @@ var AGENT_PANEL_STYLES = `
1779
1779
  justify-content: space-between;
1780
1780
  gap: 10px;
1781
1781
  padding: 10px 12px;
1782
- border-bottom: 1px solid rgb(255 255 255 / 7%);
1782
+ border-bottom: 1px solid var(--spotpatch-border-subtle);
1783
1783
  }
1784
- .spotpatch-agent-title { color: #eef0f5; font-size: 13px; font-weight: 650; }
1784
+ .spotpatch-agent-title { font-size: 13px; font-weight: 620; }
1785
1785
  .spotpatch-agent-badge {
1786
- border: 1px solid rgb(129 112 247 / 24%);
1787
- border-radius: 999px;
1788
- padding: 3px 7px;
1789
- color: #c5cafa;
1790
- background: rgb(109 93 246 / 9%);
1791
- font-size: 10px;
1792
- font-weight: 650;
1786
+ border: 1px solid var(--spotpatch-accent-line);
1787
+ border-radius: var(--spotpatch-radius-pill);
1788
+ padding: 2px 8px;
1789
+ color: var(--spotpatch-accent-soft);
1790
+ background: var(--spotpatch-accent-tint);
1791
+ font-size: 11px;
1792
+ font-weight: 600;
1793
1793
  }
1794
1794
  .spotpatch-agent-setup { padding: 12px; }
1795
1795
  .spotpatch-agent-selectors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@@ -1799,71 +1799,71 @@ var AGENT_PANEL_STYLES = `
1799
1799
  box-sizing: border-box;
1800
1800
  width: 100%;
1801
1801
  min-width: 0;
1802
- min-height: 34px;
1802
+ min-height: 36px;
1803
1803
  margin-top: 4px;
1804
1804
  border: 1px solid var(--spotpatch-border);
1805
- border-radius: 8px;
1806
- padding: 7px 32px 7px 9px;
1807
- color: #e8ebf2;
1808
- color-scheme: dark;
1809
- background: linear-gradient(180deg, rgb(255 255 255 / 4%), rgb(255 255 255 / 2%));
1810
- font-size: 12px;
1805
+ border-radius: var(--spotpatch-radius-sm);
1806
+ padding: 7px 32px 7px 10px;
1807
+ color: var(--spotpatch-text);
1808
+ background: var(--spotpatch-bg-input);
1809
+ font-size: 12.5px;
1811
1810
  font-weight: 560;
1812
1811
  line-height: 1.35;
1813
1812
  outline: none;
1814
- transition: 160ms ease;
1813
+ transition:
1814
+ border-color var(--spotpatch-duration-fast) ease,
1815
+ box-shadow var(--spotpatch-duration-fast) ease;
1815
1816
  }
1816
- .spotpatch-agent select:hover { border-color: rgb(148 163 184 / 38%); background-color: rgb(255 255 255 / 5%); }
1817
- .spotpatch-agent select:focus-visible { border-color: rgb(139 124 247 / 76%); box-shadow: 0 0 0 3px rgb(109 93 246 / 18%); }
1818
- .spotpatch-agent select option { min-height: 42px; color: #e8ebf2; background: #10151e; }
1817
+ .spotpatch-agent select:hover { border-color: var(--spotpatch-border-strong); }
1818
+ .spotpatch-agent select:focus-visible { border-color: var(--spotpatch-accent-line); box-shadow: 0 0 0 3px var(--spotpatch-accent-tint); }
1819
+ .spotpatch-agent select option { min-height: 42px; color: var(--spotpatch-text); background: var(--spotpatch-bg-raised); }
1819
1820
  @supports (appearance: base-select) {
1820
1821
  .spotpatch-agent select,
1821
1822
  ::picker(select) { appearance: base-select; }
1822
- .spotpatch-agent select { padding: 7px 9px; }
1823
+ .spotpatch-agent select { padding: 7px 10px; }
1823
1824
  .spotpatch-agent select::picker-icon {
1824
- color: #9da6b5;
1825
- transition: rotate 180ms cubic-bezier(.2, .8, .2, 1);
1825
+ color: var(--spotpatch-text-muted);
1826
+ transition: rotate var(--spotpatch-duration-base) var(--spotpatch-ease-out);
1826
1827
  }
1827
- .spotpatch-agent select:open::picker-icon { rotate: 180deg; color: #c4b5fd; }
1828
+ .spotpatch-agent select:open::picker-icon { rotate: 180deg; color: var(--spotpatch-accent-soft); }
1828
1829
  .spotpatch-agent select::picker(select) {
1829
- top: calc(anchor(bottom) + 7px);
1830
+ top: calc(anchor(bottom) + 6px);
1830
1831
  left: anchor(left);
1831
1832
  width: anchor-size(width);
1832
1833
  max-height: min(280px, 40vh);
1833
1834
  margin: 0;
1834
1835
  overflow: auto;
1835
- border: 1px solid rgb(139 124 247 / 28%);
1836
- border-radius: 12px;
1837
- padding: 6px;
1838
- background: #10151e;
1839
- box-shadow: 0 18px 50px rgb(0 0 0 / 38%);
1836
+ border: 1px solid var(--spotpatch-border);
1837
+ border-radius: var(--spotpatch-radius-card);
1838
+ padding: 5px;
1839
+ background: var(--spotpatch-bg-raised);
1840
+ box-shadow: var(--spotpatch-shadow-panel);
1840
1841
  opacity: 1;
1841
1842
  transform: translateY(0) scale(1);
1842
- transition: opacity 150ms ease, transform 180ms cubic-bezier(.2, .8, .2, 1), overlay 180ms allow-discrete, display 180ms allow-discrete;
1843
+ transition:
1844
+ opacity var(--spotpatch-duration-fast) ease,
1845
+ transform var(--spotpatch-duration-base) var(--spotpatch-ease-out),
1846
+ overlay var(--spotpatch-duration-base) allow-discrete,
1847
+ display var(--spotpatch-duration-base) allow-discrete;
1843
1848
  }
1844
1849
  @starting-style {
1845
1850
  .spotpatch-agent select::picker(select):popover-open {
1846
1851
  opacity: 0;
1847
- transform: translateY(-5px) scale(.985);
1852
+ transform: translateY(-5px) scale(.98);
1848
1853
  }
1849
1854
  }
1850
1855
  .spotpatch-agent select option {
1851
- min-height: 42px;
1852
- border-radius: 8px;
1853
- padding: 10px 12px;
1854
- color: #dfe4ee;
1856
+ min-height: 40px;
1857
+ border-radius: var(--spotpatch-radius-sm);
1858
+ padding: 9px 11px;
1859
+ color: var(--spotpatch-text-secondary);
1855
1860
  background: transparent;
1856
1861
  cursor: pointer;
1857
1862
  }
1858
1863
  .spotpatch-agent select option:hover,
1859
- .spotpatch-agent select option:focus { color: #fff; background: rgb(109 93 246 / 16%); }
1860
- .spotpatch-agent select option:checked { color: #fff; background: rgb(109 93 246 / 24%); }
1861
- .spotpatch-agent select option::checkmark { color: #8b7cf7; }
1862
- }
1863
- .spotpatch-agent select:focus-visible,
1864
- .spotpatch-consent input:focus-visible {
1865
- outline: 2px solid #8b7cf7;
1866
- outline-offset: 2px;
1864
+ .spotpatch-agent select option:focus { color: var(--spotpatch-text); background: var(--spotpatch-hover); }
1865
+ .spotpatch-agent select option:checked { color: var(--spotpatch-text); background: var(--spotpatch-accent-tint); }
1866
+ .spotpatch-agent select option::checkmark { color: var(--spotpatch-accent-soft); }
1867
1867
  }
1868
1868
  .spotpatch-consent {
1869
1869
  display: flex;
@@ -1872,26 +1872,21 @@ var AGENT_PANEL_STYLES = `
1872
1872
  margin-top: 10px;
1873
1873
  color: var(--spotpatch-text-secondary);
1874
1874
  cursor: pointer;
1875
- font-size: 11.5px;
1875
+ font-size: 12px;
1876
1876
  line-height: 1.5;
1877
1877
  }
1878
1878
  .spotpatch-consent input { width: 14px; height: 14px; flex: none; margin: 2px 0 0; accent-color: var(--spotpatch-accent); }
1879
- .spotpatch-trusted-consent {
1880
- border: 1px solid rgb(251 191 36 / 20%);
1881
- border-radius: 10px;
1882
- padding: 9px 10px;
1883
- color: #e5e7eb;
1884
- background: rgb(120 53 15 / 10%);
1885
- }
1879
+ .spotpatch-trusted-consent,
1886
1880
  .spotpatch-workspace-consent {
1887
- margin-top: 9px;
1888
- border: 1px solid rgb(251 191 36 / 18%);
1889
- border-radius: 10px;
1881
+ border: 1px solid var(--spotpatch-warning-line);
1882
+ border-radius: var(--spotpatch-radius-md);
1890
1883
  padding: 9px 10px;
1891
- background: rgb(120 53 15 / 9%);
1884
+ background: var(--spotpatch-warning-tint);
1892
1885
  }
1893
- .spotpatch-workspace-consent strong { display: block; color: #fde68a; font-size: 11.5px; font-weight: 620; }
1894
- .spotpatch-workspace-consent small { display: block; margin-top: 2px; color: #aeb6c4; font-size: 10.5px; line-height: 1.45; }
1886
+ .spotpatch-trusted-consent { color: var(--spotpatch-text); }
1887
+ .spotpatch-workspace-consent { margin-top: 9px; }
1888
+ .spotpatch-workspace-consent strong { display: block; color: var(--spotpatch-warning-text); font-size: 12px; font-weight: 600; }
1889
+ .spotpatch-workspace-consent small { display: block; margin-top: 2px; color: var(--spotpatch-text-secondary); font-size: 11px; line-height: 1.45; }
1895
1890
  .spotpatch-agent-health-list { display: grid; gap: 6px; margin-top: 10px; }
1896
1891
  .spotpatch-agent-workspace,
1897
1892
  .spotpatch-agent-capability {
@@ -1899,83 +1894,85 @@ var AGENT_PANEL_STYLES = `
1899
1894
  align-items: center;
1900
1895
  gap: 8px;
1901
1896
  margin: 0;
1902
- color: #929bab;
1903
- font-size: 11px;
1897
+ color: var(--spotpatch-text-secondary);
1898
+ font-size: 11.5px;
1904
1899
  }
1900
+ .spotpatch-agent-workspace::before,
1905
1901
  .spotpatch-agent-capability::before {
1906
1902
  width: 6px;
1907
1903
  height: 6px;
1908
1904
  flex: none;
1909
- border-radius: 999px;
1910
- background: #64748b;
1911
- content: "";
1912
- }
1913
- .spotpatch-agent-capability[data-state="probing"]::before { background: var(--spotpatch-warning); }
1914
- .spotpatch-agent-capability[data-state="ready"] { color: #a7f3d0; }
1915
- .spotpatch-agent-capability[data-state="ready"]::before { background: var(--spotpatch-success); }
1916
- .spotpatch-agent-capability[data-state="error"] { color: #fecaca; }
1917
- .spotpatch-agent-capability[data-state="error"]::before { background: var(--spotpatch-danger); }
1918
- .spotpatch-agent-workspace::before {
1919
- width: 6px;
1920
- height: 6px;
1921
- flex: none;
1922
- border-radius: 999px;
1923
- background: #64748b;
1905
+ border-radius: 50%;
1906
+ background: var(--spotpatch-text-muted);
1924
1907
  content: "";
1925
1908
  }
1909
+ .spotpatch-agent-capability[data-state="probing"]::before,
1926
1910
  .spotpatch-agent-workspace[data-state="checking"]::before { background: var(--spotpatch-warning); }
1927
- .spotpatch-agent-workspace[data-state="ready"] { color: #a7f3d0; }
1911
+ .spotpatch-agent-capability[data-state="ready"],
1912
+ .spotpatch-agent-workspace[data-state="ready"] { color: var(--spotpatch-success-text); }
1913
+ .spotpatch-agent-capability[data-state="ready"]::before,
1928
1914
  .spotpatch-agent-workspace[data-state="ready"]::before { background: var(--spotpatch-success); }
1929
- .spotpatch-agent-workspace[data-state="consent-required"] { color: #fde68a; }
1930
- .spotpatch-agent-workspace[data-state="consent-required"]::before { background: #fbbf24; }
1931
- .spotpatch-agent-workspace[data-state="blocked"] { color: #fecaca; }
1915
+ .spotpatch-agent-workspace[data-state="consent-required"] { color: var(--spotpatch-warning-text); }
1916
+ .spotpatch-agent-workspace[data-state="consent-required"]::before { background: var(--spotpatch-warning); }
1917
+ .spotpatch-agent-capability[data-state="error"],
1918
+ .spotpatch-agent-workspace[data-state="blocked"] { color: var(--spotpatch-danger-text); }
1919
+ .spotpatch-agent-capability[data-state="error"]::before,
1932
1920
  .spotpatch-agent-workspace[data-state="blocked"]::before { background: var(--spotpatch-danger); }
1933
1921
  .spotpatch-agent-job { padding: 12px; }
1934
1922
  .spotpatch-agent-job-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
1935
- .spotpatch-agent-model { min-width: 0; overflow: hidden; color: #d6dafe; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
1923
+ .spotpatch-agent-model { min-width: 0; overflow: hidden; font-size: 13px; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }
1936
1924
  .spotpatch-agent-status {
1937
1925
  flex: none;
1938
- border-radius: 999px;
1939
- padding: 3px 7px;
1940
- color: #bae6fd;
1941
- background: rgb(14 116 144 / 20%);
1926
+ border-radius: var(--spotpatch-radius-pill);
1927
+ padding: 3px 8px;
1928
+ color: var(--spotpatch-cyan-text);
1929
+ background: var(--spotpatch-cyan-tint);
1942
1930
  font-size: 11px;
1943
- font-weight: 650;
1931
+ font-weight: 600;
1944
1932
  }
1945
- .spotpatch-agent-phase { margin: 12px 0 0; color: #e2e5ec; font-size: 13px; line-height: 1.55; }
1933
+ .spotpatch-agent-phase { margin: 12px 0 0; font-size: 13px; line-height: 1.55; }
1946
1934
  .spotpatch-agent-error {
1947
1935
  margin: 9px 0 0;
1948
- border: 1px solid rgb(251 113 133 / 22%);
1949
- border-radius: 9px;
1936
+ border: 1px solid var(--spotpatch-danger-line);
1937
+ border-radius: var(--spotpatch-radius-md);
1950
1938
  padding: 9px 10px;
1951
- color: #fecaca;
1952
- background: rgb(127 29 29 / 14%);
1939
+ color: var(--spotpatch-danger-text);
1940
+ background: var(--spotpatch-danger-tint);
1953
1941
  font-size: 12px;
1954
1942
  }
1955
1943
  .spotpatch-agent-activity { display: grid; gap: 5px; margin: 9px 0 0; padding: 0; list-style: none; }
1956
- .spotpatch-agent-activity li { display: flex; gap: 8px; color: #929bab; font: 11.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
1957
- .spotpatch-agent-activity li::before { color: #64748b; content: "•"; }
1958
- .spotpatch-agent-activity li[data-state="active"]::before { color: #fbbf24; }
1959
- .spotpatch-agent-activity li[data-state="success"]::before { color: #34d399; }
1960
- .spotpatch-agent-activity li[data-state="failure"]::before { color: #fb7185; }
1961
- .spotpatch-agent-result { margin-top: 11px; border-top: 1px solid rgb(148 163 184 / 10%); padding-top: 10px; }
1962
- .spotpatch-agent-summary { margin: 0; color: #dce1eb; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
1944
+ .spotpatch-agent-activity li { display: flex; gap: 8px; color: var(--spotpatch-text-secondary); font: 11.5px/1.55 var(--spotpatch-font-mono); }
1945
+ .spotpatch-agent-activity li::before { color: var(--spotpatch-text-muted); content: "•"; }
1946
+ .spotpatch-agent-activity li[data-state="active"]::before { color: var(--spotpatch-warning); }
1947
+ .spotpatch-agent-activity li[data-state="success"]::before { color: var(--spotpatch-success); }
1948
+ .spotpatch-agent-activity li[data-state="failure"]::before { color: var(--spotpatch-danger); }
1949
+ .spotpatch-agent-result { margin-top: 12px; border-top: 1px solid var(--spotpatch-border-subtle); padding-top: 10px; }
1950
+ .spotpatch-agent-summary { margin: 0; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
1963
1951
  .spotpatch-agent-files { display: grid; gap: 4px; margin: 9px 0 0; padding: 0; list-style: none; }
1964
- .spotpatch-agent-files li { color: #bbc2f7; font: 11.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
1952
+ .spotpatch-agent-files li { color: var(--spotpatch-accent-soft); font: 11.5px/1.5 var(--spotpatch-font-mono); overflow-wrap: anywhere; }
1965
1953
  .spotpatch-agent-checks { display: grid; gap: 5px; margin-top: 9px; }
1966
- .spotpatch-agent-checks details { border: 1px solid rgb(148 163 184 / 12%); border-radius: 8px; background: rgb(2 6 23 / 30%); }
1967
- .spotpatch-agent-checks summary { padding: 9px 10px; color: #cbd0db; cursor: pointer; font-size: 11.5px; }
1968
- .spotpatch-agent-checks pre { max-height: 140px; margin: 0; overflow: auto; border-top: 1px solid rgb(255 255 255 / 7%); padding: 10px; color: #929bab; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
1954
+ .spotpatch-agent-checks details { border: 1px solid var(--spotpatch-border-subtle); border-radius: var(--spotpatch-radius-sm); background: var(--spotpatch-bg-input); }
1955
+ .spotpatch-agent-checks summary { padding: 9px 10px; color: var(--spotpatch-text-secondary); cursor: pointer; font-size: 12px; }
1956
+ .spotpatch-agent-checks pre {
1957
+ max-height: 140px;
1958
+ margin: 0;
1959
+ overflow: auto;
1960
+ border-top: 1px solid var(--spotpatch-border-subtle);
1961
+ padding: 10px;
1962
+ color: var(--spotpatch-text-secondary);
1963
+ font: 11px/1.55 var(--spotpatch-font-mono);
1964
+ white-space: pre-wrap;
1965
+ }
1969
1966
  .spotpatch-agent-diff {
1970
1967
  max-height: 300px;
1971
1968
  margin: 9px 0 0;
1972
1969
  overflow: auto;
1973
- border: 1px solid rgb(129 140 248 / 18%);
1974
- border-radius: 9px;
1975
- padding: 8px;
1976
- color: #cbd5e1;
1977
- background: rgb(2 6 23 / 66%);
1978
- font: 11.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
1970
+ border: 1px solid var(--spotpatch-border-subtle);
1971
+ border-radius: var(--spotpatch-radius-md);
1972
+ padding: 8px 10px;
1973
+ color: var(--spotpatch-text);
1974
+ background: var(--spotpatch-bg-input);
1975
+ font: 11.5px/1.6 var(--spotpatch-font-mono);
1979
1976
  overflow-wrap: normal;
1980
1977
  white-space: pre;
1981
1978
  user-select: text;
@@ -2546,6 +2543,113 @@ function getDataFlowExtension(target2 = globalThis) {
2546
2543
  return target2[DATA_FLOW_EXTENSION_KEY];
2547
2544
  }
2548
2545
 
2546
+ // src/ui/theme.ts
2547
+ var THEME_STYLES = `
2548
+ :host {
2549
+ all: initial;
2550
+ color-scheme: dark;
2551
+
2552
+ --spotpatch-bg: #0c0d12;
2553
+ --spotpatch-bg-raised: #14161d;
2554
+ --spotpatch-bg-active: #1b1e28;
2555
+ --spotpatch-bg-input: #08090d;
2556
+ --spotpatch-border-subtle: rgb(255 255 255 / 7%);
2557
+ --spotpatch-border: rgb(255 255 255 / 11%);
2558
+ --spotpatch-border-strong: rgb(255 255 255 / 20%);
2559
+ --spotpatch-hover: rgb(255 255 255 / 5%);
2560
+
2561
+ --spotpatch-text: #f4f5f7;
2562
+ --spotpatch-text-secondary: #a7acb8;
2563
+ --spotpatch-text-muted: #737987;
2564
+ --spotpatch-text-on-accent: #ffffff;
2565
+
2566
+ --spotpatch-accent: #7c4dff;
2567
+ --spotpatch-accent-strong: #6d35ff;
2568
+ --spotpatch-accent-soft: #c4b3ff;
2569
+ --spotpatch-accent-cyan: #00d9e9;
2570
+ --spotpatch-accent-blue: #168eff;
2571
+ --spotpatch-success: #45d483;
2572
+ --spotpatch-warning: #f4b860;
2573
+ --spotpatch-danger: #ff6b7a;
2574
+
2575
+ --spotpatch-accent-tint: color-mix(in srgb, var(--spotpatch-accent) 16%, transparent);
2576
+ --spotpatch-accent-line: color-mix(in srgb, var(--spotpatch-accent) 48%, transparent);
2577
+ --spotpatch-cyan-text: color-mix(in srgb, var(--spotpatch-accent-cyan) 70%, var(--spotpatch-text));
2578
+ --spotpatch-cyan-tint: color-mix(in srgb, var(--spotpatch-accent-cyan) 10%, transparent);
2579
+ --spotpatch-cyan-line: color-mix(in srgb, var(--spotpatch-accent-cyan) 30%, transparent);
2580
+ --spotpatch-success-text: color-mix(in srgb, var(--spotpatch-success) 72%, var(--spotpatch-text));
2581
+ --spotpatch-success-tint: color-mix(in srgb, var(--spotpatch-success) 12%, transparent);
2582
+ --spotpatch-warning-text: color-mix(in srgb, var(--spotpatch-warning) 78%, var(--spotpatch-text));
2583
+ --spotpatch-warning-tint: color-mix(in srgb, var(--spotpatch-warning) 11%, transparent);
2584
+ --spotpatch-warning-line: color-mix(in srgb, var(--spotpatch-warning) 30%, transparent);
2585
+ --spotpatch-danger-text: color-mix(in srgb, var(--spotpatch-danger) 72%, var(--spotpatch-text));
2586
+ --spotpatch-danger-tint: color-mix(in srgb, var(--spotpatch-danger) 11%, transparent);
2587
+ --spotpatch-danger-line: color-mix(in srgb, var(--spotpatch-danger) 30%, transparent);
2588
+
2589
+ --spotpatch-primary-fill: linear-gradient(135deg, var(--spotpatch-accent), var(--spotpatch-accent-strong));
2590
+ --spotpatch-brand-line: linear-gradient(90deg, var(--spotpatch-accent), var(--spotpatch-accent-blue), var(--spotpatch-accent-cyan));
2591
+ --spotpatch-surface-fill:
2592
+ linear-gradient(180deg, rgb(255 255 255 / 3.5%), transparent 30%),
2593
+ var(--spotpatch-bg);
2594
+ --spotpatch-scrim: rgb(3 3 8 / 72%);
2595
+
2596
+ --spotpatch-shadow-float: 0 18px 44px rgb(6 8 18 / 30%), 0 2px 8px rgb(6 8 18 / 18%);
2597
+ --spotpatch-shadow-panel: 0 28px 70px rgb(6 8 18 / 42%), 0 4px 14px rgb(6 8 18 / 22%);
2598
+ --spotpatch-shadow-inset: inset 0 1px 0 rgb(255 255 255 / 7%);
2599
+ --spotpatch-shadow-accent: 0 10px 26px -10px color-mix(in srgb, var(--spotpatch-accent-strong) 80%, transparent);
2600
+
2601
+ --spotpatch-radius-xs: 6px;
2602
+ --spotpatch-radius-sm: 8px;
2603
+ --spotpatch-radius-md: 10px;
2604
+ --spotpatch-radius-card: 12px;
2605
+ --spotpatch-radius-panel: 20px;
2606
+ --spotpatch-radius-pill: 999px;
2607
+
2608
+ --spotpatch-ease-out: cubic-bezier(.16, 1, .3, 1);
2609
+ --spotpatch-ease-spring: cubic-bezier(.34, 1.36, .64, 1);
2610
+ --spotpatch-ease-standard: cubic-bezier(.2, 0, 0, 1);
2611
+ --spotpatch-duration-fast: 140ms;
2612
+ --spotpatch-duration-base: 220ms;
2613
+ --spotpatch-duration-slow: 420ms;
2614
+
2615
+ --spotpatch-font-sans: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
2616
+ --spotpatch-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
2617
+
2618
+ color: var(--spotpatch-text);
2619
+ font-family: var(--spotpatch-font-sans);
2620
+ font-size: 14px;
2621
+ line-height: 1.5;
2622
+ -webkit-font-smoothing: antialiased;
2623
+ }
2624
+ [hidden] { display: none !important; }
2625
+ button, textarea, select, input { font: inherit; }
2626
+ :focus-visible {
2627
+ outline: 2px solid var(--spotpatch-accent-soft);
2628
+ outline-offset: 2px;
2629
+ }
2630
+ * {
2631
+ scrollbar-color: var(--spotpatch-border-strong) transparent;
2632
+ scrollbar-width: thin;
2633
+ }
2634
+ @keyframes spotpatch-enter {
2635
+ from { opacity: 0; filter: blur(3px); transform: translate3d(0, 6px, 0); }
2636
+ }
2637
+ @keyframes spotpatch-pop {
2638
+ from { opacity: 0; transform: scale(.94); }
2639
+ }
2640
+ @media (prefers-reduced-motion: reduce) {
2641
+ *, *::before, *::after {
2642
+ animation-duration: .01ms !important;
2643
+ animation-iteration-count: 1 !important;
2644
+ transition-duration: .01ms !important;
2645
+ }
2646
+ }
2647
+ `;
2648
+ var THEME_MOTION_COLORS = Object.freeze({
2649
+ dispatchGlowRest: "0 0 0 0 rgb(124 77 255 / 0%)",
2650
+ dispatchGlow: "0 0 0 4px rgb(124 77 255 / 22%)"
2651
+ });
2652
+
2549
2653
  // src/ui/external-handoff-contract.ts
2550
2654
  var EXTERNAL_HANDOFF_EXTENSION_KEY = /* @__PURE__ */ Symbol.for("spotpatch.external-handoff.v1");
2551
2655
  function getExternalHandoffExtension() {
@@ -3713,67 +3817,102 @@ function resolveStyleNonce(document) {
3713
3817
  function createStyles(document) {
3714
3818
  const style = document.createElement("style");
3715
3819
  style.textContent = `
3716
- :host {
3717
- all: initial;
3718
- --spotpatch-bg: #0e0e12;
3719
- --spotpatch-bg-raised: #17171c;
3720
- --spotpatch-bg-active: #1c1c22;
3721
- --spotpatch-bg-input: #0b0b0f;
3722
- --spotpatch-border: #2a2a32;
3723
- --spotpatch-border-subtle: #232329;
3724
- --spotpatch-text: #f2f2f5;
3725
- --spotpatch-text-secondary: #96969f;
3726
- --spotpatch-text-muted: #686872;
3727
- --spotpatch-accent: #8b7bff;
3728
- --spotpatch-accent-strong: #6a5ce8;
3729
- --spotpatch-accent-cyan: #52a8ff;
3730
- --spotpatch-danger: #fb7185;
3731
- --spotpatch-success: #34d399;
3732
- --spotpatch-warning: #f59e0b;
3733
- --spotpatch-text-on-accent: #0b0b12;
3734
- --spotpatch-radius-card: 10px;
3735
- color: var(--spotpatch-text);
3736
- font-family: Inter, "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
3737
- font-size: 14px;
3738
- line-height: 1.5;
3739
- }
3740
- [hidden] { display: none !important; }
3741
- button, textarea, select { font: inherit; }
3820
+ ${THEME_STYLES}
3742
3821
  .spotpatch-floating-surface {
3743
3822
  position: fixed;
3744
3823
  right: ${String(FLOATING_SURFACE_LAYOUT.desktopInset)}px;
3745
3824
  bottom: ${String(FLOATING_SURFACE_LAYOUT.desktopInset)}px;
3746
3825
  z-index: ${String(UI_Z_INDEX.controls)};
3826
+ box-sizing: border-box;
3827
+ overflow: hidden;
3747
3828
  isolation: isolate;
3829
+ border: 1px solid var(--spotpatch-border);
3830
+ background: var(--spotpatch-surface-fill);
3831
+ box-shadow: var(--spotpatch-shadow-float), var(--spotpatch-shadow-inset);
3832
+ transform-origin: 100% 100%;
3748
3833
  }
3749
- .spotpatch-highlight {
3834
+ .spotpatch-floating-surface[data-scene="pill"],
3835
+ .spotpatch-floating-surface[data-scene="capturing"] {
3836
+ width: max-content;
3837
+ border-radius: var(--spotpatch-radius-pill);
3838
+ }
3839
+ .spotpatch-floating-surface[data-scene="planner"] {
3840
+ border-radius: var(--spotpatch-radius-panel);
3841
+ box-shadow: var(--spotpatch-shadow-panel), var(--spotpatch-shadow-inset);
3842
+ }
3843
+
3844
+ .spotpatch-trigger {
3845
+ display: inline-flex;
3846
+ min-height: 44px;
3847
+ align-items: center;
3848
+ gap: 10px;
3849
+ border: 0;
3850
+ border-radius: var(--spotpatch-radius-pill);
3851
+ padding: 0 18px 0 16px;
3852
+ color: var(--spotpatch-text);
3853
+ background: transparent;
3854
+ cursor: pointer;
3855
+ font-size: 13.5px;
3856
+ font-weight: 620;
3857
+ letter-spacing: -.005em;
3858
+ touch-action: none;
3859
+ user-select: none;
3860
+ transition: background var(--spotpatch-duration-fast) ease;
3861
+ }
3862
+ .spotpatch-trigger::before {
3863
+ width: 8px;
3864
+ height: 8px;
3865
+ border-radius: 50%;
3866
+ background: var(--spotpatch-accent);
3867
+ box-shadow: 0 0 0 4px var(--spotpatch-accent-tint);
3868
+ content: "";
3869
+ transition: background var(--spotpatch-duration-base) ease;
3870
+ }
3871
+ .spotpatch-trigger:hover { background: var(--spotpatch-hover); }
3872
+ .spotpatch-trigger[aria-pressed="true"]::before {
3873
+ background: var(--spotpatch-accent-cyan);
3874
+ animation: spotpatch-trigger-pulse 1.6s var(--spotpatch-ease-standard) infinite;
3875
+ }
3876
+ .spotpatch-trigger[data-dragging="true"] { cursor: grabbing; }
3877
+ @keyframes spotpatch-trigger-pulse {
3878
+ 0% { box-shadow: 0 0 0 0 var(--spotpatch-cyan-line); }
3879
+ 100% { box-shadow: 0 0 0 9px transparent; }
3880
+ }
3881
+
3882
+ .spotpatch-highlight,
3883
+ .spotpatch-selection-highlight {
3750
3884
  position: fixed;
3751
3885
  top: 0;
3752
3886
  left: 0;
3753
- z-index: ${String(UI_Z_INDEX.highlight)};
3754
3887
  box-sizing: border-box;
3755
- border: 2px solid var(--spotpatch-accent);
3756
- border-radius: 6px;
3757
- background: rgb(109 93 246 / 8%);
3758
- box-shadow: inset 0 0 0 1px rgb(255 255 255 / 22%), 0 0 0 1px rgb(109 93 246 / 10%);
3888
+ border-radius: var(--spotpatch-radius-xs);
3759
3889
  pointer-events: none;
3760
3890
  }
3761
- .spotpatch-highlight-label {
3891
+ .spotpatch-highlight {
3892
+ z-index: ${String(UI_Z_INDEX.highlight)};
3893
+ border: 1.5px solid var(--spotpatch-accent);
3894
+ background: var(--spotpatch-accent-tint);
3895
+ box-shadow: 0 0 0 4px color-mix(in srgb, var(--spotpatch-accent) 12%, transparent);
3896
+ transition:
3897
+ transform var(--spotpatch-duration-fast) var(--spotpatch-ease-out),
3898
+ width var(--spotpatch-duration-fast) var(--spotpatch-ease-out),
3899
+ height var(--spotpatch-duration-fast) var(--spotpatch-ease-out);
3900
+ }
3901
+ .spotpatch-highlight-label,
3902
+ .spotpatch-selection-highlight > span {
3762
3903
  position: absolute;
3763
- top: -30px;
3764
- left: -2px;
3765
- max-width: min(380px, 80vw);
3904
+ bottom: calc(100% + 6px);
3905
+ left: -1.5px;
3766
3906
  overflow: hidden;
3767
- border: 1px solid rgb(255 255 255 / 14%);
3768
- border-radius: 8px 8px 8px 3px;
3769
- padding: 6px 10px;
3770
- color: #fff;
3771
- background: #5546dc;
3772
- box-shadow: 0 8px 20px rgb(49 46 129 / 22%);
3773
- font: 650 12px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
3907
+ border-radius: var(--spotpatch-radius-xs);
3908
+ padding: 4px 8px;
3909
+ color: var(--spotpatch-text-on-accent);
3910
+ background: var(--spotpatch-accent-strong);
3911
+ font: 600 11px/1.3 var(--spotpatch-font-mono);
3774
3912
  text-overflow: ellipsis;
3775
3913
  white-space: nowrap;
3776
3914
  }
3915
+ .spotpatch-highlight-label { max-width: min(380px, 80vw); }
3777
3916
  .spotpatch-selection-highlights {
3778
3917
  position: fixed;
3779
3918
  inset: 0;
@@ -3781,37 +3920,27 @@ function createStyles(document) {
3781
3920
  pointer-events: none;
3782
3921
  }
3783
3922
  .spotpatch-selection-highlight {
3784
- position: fixed;
3785
- top: 0;
3786
- left: 0;
3787
- box-sizing: border-box;
3788
- border: 2px solid var(--spotpatch-accent-cyan);
3789
- border-radius: 6px;
3790
- background: rgb(8 182 214 / 5%);
3791
- box-shadow: inset 0 0 0 1px rgb(255 255 255 / 16%);
3923
+ border: 1.5px solid var(--spotpatch-accent-cyan);
3924
+ background: var(--spotpatch-cyan-tint);
3792
3925
  }
3793
3926
  .spotpatch-selection-highlight[data-active="true"] {
3794
- border-color: #7768f7;
3795
- background: rgb(109 93 246 / 8%);
3796
- box-shadow: inset 0 0 0 1px rgb(255 255 255 / 20%);
3927
+ border-color: var(--spotpatch-accent);
3928
+ background: var(--spotpatch-accent-tint);
3929
+ box-shadow: 0 0 0 4px color-mix(in srgb, var(--spotpatch-accent) 12%, transparent);
3930
+ }
3931
+ .spotpatch-selection-highlight[data-entering="true"] {
3932
+ animation: spotpatch-pop var(--spotpatch-duration-base) var(--spotpatch-ease-spring) both;
3797
3933
  }
3798
3934
  .spotpatch-selection-highlight > span {
3799
- position: absolute;
3800
- top: -24px;
3801
- left: -2px;
3802
3935
  max-width: min(300px, 70vw);
3803
- overflow: hidden;
3804
- border-radius: 7px 7px 7px 2px;
3805
- padding: 4px 8px;
3806
- color: #ecfeff;
3807
- background: rgb(14 67 82 / 96%);
3808
- font: 650 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
3809
- text-overflow: ellipsis;
3810
- white-space: nowrap;
3936
+ color: var(--spotpatch-bg);
3937
+ background: var(--spotpatch-accent-cyan);
3811
3938
  }
3812
3939
  .spotpatch-selection-highlight[data-active="true"] > span {
3813
- background: #5546dc;
3940
+ color: var(--spotpatch-text-on-accent);
3941
+ background: var(--spotpatch-accent-strong);
3814
3942
  }
3943
+
3815
3944
  .spotpatch-dialog {
3816
3945
  position: relative;
3817
3946
  box-sizing: border-box;
@@ -3819,18 +3948,14 @@ function createStyles(document) {
3819
3948
  outline: none;
3820
3949
  }
3821
3950
  .spotpatch-shell {
3822
- position: relative;
3823
- z-index: 1;
3824
3951
  display: flex;
3825
3952
  box-sizing: border-box;
3826
3953
  max-height: min(${String(FLOATING_SURFACE_LAYOUT.workbenchMaxHeight)}px, calc(100vh - ${String(FLOATING_SURFACE_LAYOUT.desktopInset * 2)}px));
3827
3954
  overflow: hidden;
3828
3955
  flex-direction: column;
3829
3956
  }
3830
- .spotpatch-header {
3831
- position: relative;
3832
- padding: 0 18px 14px;
3833
- }
3957
+
3958
+ .spotpatch-header { padding: 0 18px 16px; }
3834
3959
  .spotpatch-header[data-spotpatch-drag-handle] { cursor: grab; touch-action: none; user-select: none; }
3835
3960
  .spotpatch-header[data-dragging="true"] { cursor: grabbing; }
3836
3961
  .spotpatch-header button,
@@ -3840,133 +3965,115 @@ function createStyles(document) {
3840
3965
  align-items: center;
3841
3966
  justify-content: space-between;
3842
3967
  gap: 12px;
3843
- margin: 0 -18px 18px;
3844
- padding: 14px 18px 13px;
3968
+ margin: 0 -18px 16px;
3969
+ padding: 12px 14px 12px 18px;
3845
3970
  border-bottom: 1px solid var(--spotpatch-border-subtle);
3846
3971
  }
3847
- .spotpatch-brand {
3848
- display: inline-flex;
3849
- align-items: center;
3850
- gap: 10px;
3851
- min-width: 0;
3852
- color: #f8fafc;
3853
- }
3854
- .spotpatch-brand-mark {
3855
- width: 30px;
3856
- height: 30px;
3857
- flex: none;
3858
- filter: drop-shadow(0 6px 12px rgb(76 29 149 / 22%));
3859
- }
3972
+ .spotpatch-brand { display: inline-flex; min-width: 0; align-items: center; gap: 10px; }
3973
+ .spotpatch-brand-mark { width: 28px; height: 28px; flex: none; }
3860
3974
  .spotpatch-brand-copy { display: grid; min-width: 0; gap: 1px; }
3861
- .spotpatch-header-controls {
3862
- display: inline-flex;
3863
- align-items: center;
3864
- gap: 6px;
3865
- flex: none;
3866
- }
3975
+ .spotpatch-brand-name { font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; }
3976
+ .spotpatch-brand-context { color: var(--spotpatch-text-muted); font-size: 11px; font-weight: 520; }
3977
+ .spotpatch-header-controls { display: inline-flex; flex: none; align-items: center; gap: 2px; }
3867
3978
  .spotpatch-repository,
3868
3979
  .spotpatch-locale,
3869
3980
  .spotpatch-reset-position,
3870
3981
  .spotpatch-close {
3871
- height: 27px;
3872
- border: 1px solid rgb(255 255 255 / 11%);
3873
- border-radius: 7px;
3874
- background: transparent;
3875
- }
3876
- .spotpatch-repository {
3877
- display: inline-flex;
3878
- align-items: center;
3879
- padding: 0 9px;
3880
- color: var(--spotpatch-text-secondary);
3881
- font-size: 11px;
3882
- font-weight: 680;
3883
- text-decoration: none;
3884
- }
3885
- .spotpatch-locale {
3886
- min-width: 34px;
3887
- padding: 0 8px;
3888
- color: #c5cad5;
3889
- cursor: pointer;
3890
- font-size: 12px;
3891
- font-weight: 650;
3892
- }
3893
- .spotpatch-reset-position {
3894
3982
  display: inline-grid;
3895
- width: 27px;
3896
- padding: 0;
3897
- place-items: center;
3898
- color: #c5cad5;
3899
- cursor: pointer;
3900
- font-size: 15px;
3901
- line-height: 1;
3902
- }
3903
- .spotpatch-close {
3904
- display: inline-grid;
3905
- width: 27px;
3906
- padding: 0;
3983
+ box-sizing: border-box;
3984
+ min-width: 28px;
3985
+ height: 28px;
3907
3986
  place-items: center;
3908
- color: #9da5b4;
3909
- cursor: pointer;
3910
- font-size: 15px;
3987
+ border: 0;
3988
+ border-radius: var(--spotpatch-radius-sm);
3989
+ padding: 0 7px;
3990
+ color: var(--spotpatch-text-muted);
3991
+ background: transparent;
3992
+ font-size: 12px;
3993
+ font-weight: 600;
3911
3994
  line-height: 1;
3912
- transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
3995
+ text-decoration: none;
3996
+ transition:
3997
+ color var(--spotpatch-duration-fast) ease,
3998
+ background var(--spotpatch-duration-fast) ease;
3913
3999
  }
3914
- .spotpatch-close:hover,
4000
+ .spotpatch-reset-position,
4001
+ .spotpatch-close { padding: 0; font-size: 15px; }
4002
+ .spotpatch-reset-position svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.5; }
4003
+ .spotpatch-repository:hover,
3915
4004
  .spotpatch-locale:hover,
3916
4005
  .spotpatch-reset-position:hover,
3917
- .spotpatch-repository:hover { border-color: rgb(129 112 247 / 45%); color: #fff; background: rgb(109 93 246 / 10%); }
4006
+ .spotpatch-close:hover { color: var(--spotpatch-text); background: var(--spotpatch-hover); }
4007
+
4008
+ .spotpatch-title {
4009
+ margin: 0;
4010
+ font-size: 17px;
4011
+ font-weight: 650;
4012
+ letter-spacing: -.02em;
4013
+ line-height: 1.3;
4014
+ }
4015
+ .spotpatch-subtitle {
4016
+ max-width: 400px;
4017
+ margin: 4px 0 0;
4018
+ color: var(--spotpatch-text-secondary);
4019
+ font-size: 12.5px;
4020
+ line-height: 1.55;
4021
+ }
3918
4022
  .spotpatch-target-row {
3919
4023
  display: flex;
3920
- align-items: center;
3921
- gap: 8px;
3922
4024
  min-width: 0;
4025
+ align-items: center;
4026
+ gap: 10px;
3923
4027
  margin-top: 14px;
3924
4028
  }
3925
4029
  .spotpatch-target-label {
3926
4030
  min-width: 0;
3927
4031
  overflow: hidden;
3928
- border: 1px solid rgb(129 112 247 / 24%);
3929
- border-radius: 999px;
3930
- padding: 4px 10px;
3931
- color: #cdd2ff;
3932
- background: rgb(109 93 246 / 10%);
3933
- font: 600 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
4032
+ border: 1px solid var(--spotpatch-accent-line);
4033
+ border-radius: var(--spotpatch-radius-pill);
4034
+ padding: 3px 10px;
4035
+ color: var(--spotpatch-accent-soft);
4036
+ background: var(--spotpatch-accent-tint);
4037
+ font: 600 11px/1.4 var(--spotpatch-font-mono);
3934
4038
  text-overflow: ellipsis;
3935
4039
  white-space: nowrap;
3936
4040
  }
3937
4041
  .spotpatch-context-state {
3938
4042
  display: inline-flex;
4043
+ flex: none;
3939
4044
  align-items: center;
3940
4045
  gap: 6px;
3941
- flex: none;
3942
- color: #a5adba;
3943
- font-size: 11px;
4046
+ color: var(--spotpatch-warning-text);
4047
+ font-size: 11.5px;
3944
4048
  white-space: nowrap;
3945
4049
  }
3946
4050
  .spotpatch-context-state::before {
3947
4051
  width: 6px;
3948
4052
  height: 6px;
3949
- border-radius: 999px;
3950
- background: #f59e0b;
4053
+ border-radius: 50%;
4054
+ background: var(--spotpatch-warning);
3951
4055
  content: "";
3952
4056
  }
4057
+ .spotpatch-context-state[data-state="loading"]::before {
4058
+ animation: spotpatch-dot-breathe 1.4s ease-in-out infinite;
4059
+ }
3953
4060
  .spotpatch-context-state[data-state="ready"],
3954
- .spotpatch-editor-feedback[data-state="success"] { color: #9fe3c4; }
4061
+ .spotpatch-editor-feedback[data-state="success"] { color: var(--spotpatch-success-text); }
3955
4062
  .spotpatch-context-state[data-state="ready"]::before,
3956
- .spotpatch-editor-feedback[data-state="success"]::before { background: #34d399; }
4063
+ .spotpatch-editor-feedback[data-state="success"]::before { background: var(--spotpatch-success); }
3957
4064
  .spotpatch-context-state[data-state="warning"],
3958
- .spotpatch-editor-feedback[data-state="error"] { color: #fecaca; }
4065
+ .spotpatch-editor-feedback[data-state="error"] { color: var(--spotpatch-danger-text); }
3959
4066
  .spotpatch-context-state[data-state="warning"]::before,
3960
- .spotpatch-editor-feedback[data-state="error"]::before { background: #fb7185; }
4067
+ .spotpatch-editor-feedback[data-state="error"]::before { background: var(--spotpatch-danger); }
4068
+ @keyframes spotpatch-dot-breathe {
4069
+ 50% { opacity: .35; }
4070
+ }
4071
+
3961
4072
  .spotpatch-body {
3962
4073
  min-height: 0;
3963
4074
  overflow: auto;
3964
- padding: 0 18px 14px;
3965
- scrollbar-color: rgb(100 116 139 / 50%) transparent;
3966
- scrollbar-width: thin;
3967
- }
3968
- .spotpatch-targets {
3969
- margin: 0;
4075
+ overscroll-behavior: contain;
4076
+ padding: 0 18px 16px;
3970
4077
  }
3971
4078
  .spotpatch-targets-heading {
3972
4079
  display: flex;
@@ -3974,71 +4081,73 @@ function createStyles(document) {
3974
4081
  justify-content: space-between;
3975
4082
  gap: 10px;
3976
4083
  margin-bottom: 8px;
3977
- color: var(--spotpatch-text-secondary);
4084
+ color: var(--spotpatch-text-muted);
3978
4085
  font-size: 11px;
3979
- font-weight: 650;
3980
- letter-spacing: .04em;
4086
+ font-weight: 600;
4087
+ letter-spacing: .06em;
3981
4088
  text-transform: uppercase;
3982
4089
  }
3983
4090
  .spotpatch-targets-meta {
3984
4091
  display: flex;
4092
+ min-width: 0;
3985
4093
  align-items: center;
3986
4094
  gap: 8px;
3987
- min-width: 0;
3988
4095
  letter-spacing: 0;
3989
4096
  text-transform: none;
3990
4097
  }
3991
- .spotpatch-target-complete { color: var(--spotpatch-text-muted); font-size: 11px; font-weight: 560; }
3992
- .spotpatch-target-budget {
3993
- color: var(--spotpatch-text-muted);
3994
- font: 550 10.5px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
3995
- }
4098
+ .spotpatch-target-budget { font: 500 11px/1.4 var(--spotpatch-font-mono); }
3996
4099
  .spotpatch-target-budget[data-state="ready"] { display: none; }
3997
- .spotpatch-target-budget[data-state="over"] { color: #fda4af; }
4100
+ .spotpatch-target-budget[data-state="over"] { color: var(--spotpatch-danger-text); }
3998
4101
  .spotpatch-target-count {
3999
4102
  margin-left: auto;
4000
- border-radius: 999px;
4001
- padding: 3px 8px;
4002
4103
  color: var(--spotpatch-text-muted);
4003
- font: 600 10.5px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
4104
+ font: 500 11px/1.4 var(--spotpatch-font-mono);
4004
4105
  }
4005
4106
  .spotpatch-target-progress {
4006
- height: 3px;
4007
- margin-bottom: 13px;
4107
+ height: 2px;
4108
+ margin-bottom: 12px;
4008
4109
  overflow: hidden;
4009
- border-radius: 999px;
4110
+ border-radius: var(--spotpatch-radius-pill);
4010
4111
  background: var(--spotpatch-border-subtle);
4011
4112
  }
4012
4113
  .spotpatch-target-progress-fill {
4013
4114
  width: 0;
4014
4115
  height: 100%;
4015
4116
  border-radius: inherit;
4016
- background: linear-gradient(90deg, var(--spotpatch-accent), var(--spotpatch-accent-cyan));
4017
- transition: width 180ms ease;
4117
+ background: var(--spotpatch-brand-line);
4118
+ transition: width var(--spotpatch-duration-slow) var(--spotpatch-ease-out);
4018
4119
  }
4019
4120
  .spotpatch-target-list {
4020
4121
  display: grid;
4021
4122
  gap: 8px;
4022
4123
  max-height: min(340px, 48vh);
4023
4124
  overflow: auto;
4024
- padding-right: 2px;
4125
+ padding: 2px;
4126
+ margin: -2px;
4025
4127
  }
4128
+
4026
4129
  .spotpatch-target-item {
4027
4130
  overflow: hidden;
4028
4131
  border: 1px solid var(--spotpatch-border-subtle);
4029
4132
  border-radius: var(--spotpatch-radius-card);
4030
4133
  background: var(--spotpatch-bg-raised);
4031
- transition: border-color 150ms ease, background 150ms ease;
4134
+ transition:
4135
+ border-color var(--spotpatch-duration-base) ease,
4136
+ background var(--spotpatch-duration-base) ease,
4137
+ box-shadow var(--spotpatch-duration-base) ease;
4032
4138
  }
4033
4139
  .spotpatch-target-item[data-active="true"] {
4034
- border-color: rgb(139 123 255 / 34%);
4140
+ border-color: var(--spotpatch-accent-line);
4035
4141
  background: var(--spotpatch-bg-active);
4036
- box-shadow: 0 0 0 3px rgb(139 123 255 / 10%);
4142
+ box-shadow: 0 0 0 3px var(--spotpatch-accent-tint);
4143
+ }
4144
+ .spotpatch-target-item[data-entering="true"] {
4145
+ animation: spotpatch-enter var(--spotpatch-duration-slow) var(--spotpatch-ease-out) both;
4037
4146
  }
4038
4147
  .spotpatch-target-summary {
4039
4148
  display: grid;
4040
- grid-template-columns: minmax(0, 1fr) 28px 28px;
4041
- align-items: stretch;
4149
+ grid-template-columns: minmax(0, 1fr) 30px 30px;
4150
+ align-items: center;
4042
4151
  gap: 2px;
4043
4152
  padding: 4px;
4044
4153
  }
@@ -4046,27 +4155,31 @@ function createStyles(document) {
4046
4155
  display: grid;
4047
4156
  grid-template-columns: 24px minmax(0, 1fr) auto;
4048
4157
  align-items: center;
4049
- gap: 9px;
4158
+ gap: 10px;
4050
4159
  min-width: 0;
4051
4160
  border: 0;
4052
- border-radius: 8px;
4053
- padding: 8px;
4161
+ border-radius: var(--spotpatch-radius-sm);
4162
+ padding: 7px 8px;
4054
4163
  color: inherit;
4055
4164
  background: transparent;
4056
4165
  cursor: pointer;
4057
4166
  text-align: left;
4167
+ transition: background var(--spotpatch-duration-fast) ease;
4058
4168
  }
4059
- .spotpatch-target-select:hover { background: rgb(255 255 255 / 3.5%); }
4169
+ .spotpatch-target-select:hover { background: var(--spotpatch-hover); }
4060
4170
  .spotpatch-target-index {
4061
4171
  display: inline-grid;
4062
- width: 22px;
4063
- height: 22px;
4172
+ width: 24px;
4173
+ height: 24px;
4064
4174
  place-items: center;
4065
- border: 1px solid rgb(68 202 224 / 25%);
4066
- border-radius: 6px;
4175
+ border-radius: var(--spotpatch-radius-xs);
4067
4176
  color: var(--spotpatch-text-secondary);
4068
- background: var(--spotpatch-bg);
4069
- font: 650 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
4177
+ background: var(--spotpatch-hover);
4178
+ font: 600 11px/1 var(--spotpatch-font-mono);
4179
+ }
4180
+ [data-active="true"] .spotpatch-target-index {
4181
+ color: var(--spotpatch-text-on-accent);
4182
+ background: var(--spotpatch-accent-strong);
4070
4183
  }
4071
4184
  .spotpatch-target-copy { min-width: 0; }
4072
4185
  .spotpatch-target-name,
@@ -4076,37 +4189,49 @@ function createStyles(document) {
4076
4189
  text-overflow: ellipsis;
4077
4190
  white-space: nowrap;
4078
4191
  }
4079
- .spotpatch-target-name { color: #f2f2f5; font-size: 13px; font-weight: 650; }
4080
- .spotpatch-target-source { margin-top: 1px; color: var(--spotpatch-text-muted); font: 500 10.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
4192
+ .spotpatch-target-name { font-size: 13px; font-weight: 620; }
4193
+ .spotpatch-target-source {
4194
+ margin-top: 1px;
4195
+ color: var(--spotpatch-text-muted);
4196
+ font: 500 11px/1.4 var(--spotpatch-font-mono);
4197
+ }
4081
4198
  .spotpatch-target-state {
4082
- border-radius: 999px;
4199
+ border-radius: var(--spotpatch-radius-pill);
4083
4200
  padding: 3px 8px;
4084
- color: #a7f3d0;
4085
- background: rgb(16 185 129 / 9%);
4086
- font-size: 10.5px;
4087
- font-weight: 650;
4201
+ color: var(--spotpatch-success-text);
4202
+ background: var(--spotpatch-success-tint);
4203
+ font-size: 11px;
4204
+ font-weight: 600;
4088
4205
  white-space: nowrap;
4089
4206
  }
4090
- .spotpatch-target-state[data-complete="false"] { color: #f5c97a; background: rgb(245 158 11 / 9%); }
4207
+ .spotpatch-target-state[data-complete="false"] {
4208
+ color: var(--spotpatch-warning-text);
4209
+ background: var(--spotpatch-warning-tint);
4210
+ }
4091
4211
  .spotpatch-target-open,
4092
4212
  .spotpatch-target-remove {
4093
4213
  display: inline-grid;
4094
- width: 28px;
4095
- height: 100%;
4096
- min-height: 34px;
4097
- padding: 0;
4214
+ width: 30px;
4215
+ height: 30px;
4098
4216
  place-items: center;
4099
- border: 1px solid transparent;
4100
- border-radius: 7px;
4101
- color: #7f899a;
4217
+ border: 0;
4218
+ border-radius: var(--spotpatch-radius-sm);
4219
+ padding: 0;
4220
+ color: var(--spotpatch-text-muted);
4102
4221
  background: transparent;
4103
4222
  cursor: pointer;
4104
- }
4105
- .spotpatch-target-open { color: #79d9e7; }
4106
- .spotpatch-target-open:hover:not(:disabled) { border-color: rgb(68 202 224 / 30%); color: #c8f7ff; background: rgb(8 145 178 / 11%); }
4107
- .spotpatch-target-remove:hover:not(:disabled) { border-color: rgb(251 113 133 / 24%); color: #fda4af; background: rgb(127 29 29 / 12%); }
4223
+ transition:
4224
+ color var(--spotpatch-duration-fast) ease,
4225
+ background var(--spotpatch-duration-fast) ease;
4226
+ }
4227
+ .spotpatch-target-open:hover:not(:disabled) { color: var(--spotpatch-cyan-text); background: var(--spotpatch-cyan-tint); }
4228
+ .spotpatch-target-remove:hover:not(:disabled) { color: var(--spotpatch-danger-text); background: var(--spotpatch-danger-tint); }
4229
+ .spotpatch-target-open:disabled,
4230
+ .spotpatch-target-remove:disabled { cursor: not-allowed; opacity: .35; }
4231
+
4108
4232
  .spotpatch-target-editor {
4109
- padding: 0 12px 12px;
4233
+ display: block;
4234
+ padding: 2px 12px 12px;
4110
4235
  }
4111
4236
  .spotpatch-target-editor-head {
4112
4237
  display: flex;
@@ -4115,179 +4240,178 @@ function createStyles(document) {
4115
4240
  gap: 12px;
4116
4241
  margin-bottom: 6px;
4117
4242
  }
4118
- .spotpatch-target-editor-label { color: var(--spotpatch-text-secondary); font-size: 11px; font-weight: 650; }
4119
- .spotpatch-target-editor-count { color: var(--spotpatch-text-muted); font: 500 10.5px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
4243
+ .spotpatch-target-editor-label { color: var(--spotpatch-text-secondary); font-size: 11.5px; font-weight: 600; }
4244
+ .spotpatch-target-editor-count { color: var(--spotpatch-text-muted); font: 500 11px/1.3 var(--spotpatch-font-mono); }
4120
4245
  .spotpatch-target-editor textarea {
4246
+ display: block;
4121
4247
  box-sizing: border-box;
4122
4248
  width: 100%;
4123
- min-height: 74px;
4249
+ min-height: 76px;
4124
4250
  resize: vertical;
4125
4251
  border: 1px solid var(--spotpatch-border);
4126
- border-radius: 7px;
4127
- padding: 9px 10px;
4128
- color: #f8fafc;
4129
- caret-color: #8b7cf7;
4252
+ border-radius: var(--spotpatch-radius-md);
4253
+ padding: 10px 12px;
4254
+ color: var(--spotpatch-text);
4255
+ caret-color: var(--spotpatch-accent-soft);
4130
4256
  background: var(--spotpatch-bg-input);
4131
- font-size: 12.5px;
4257
+ font-size: 13px;
4132
4258
  line-height: 1.55;
4133
4259
  outline: none;
4134
- transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
4260
+ transition:
4261
+ border-color var(--spotpatch-duration-fast) ease,
4262
+ box-shadow var(--spotpatch-duration-fast) ease;
4135
4263
  }
4136
- .spotpatch-target-editor textarea::placeholder { color: #687284; }
4137
- .spotpatch-target-editor textarea:hover { border-color: rgb(139 124 247 / 34%); }
4264
+ .spotpatch-target-editor textarea::placeholder { color: var(--spotpatch-text-muted); }
4265
+ .spotpatch-target-editor textarea:hover { border-color: var(--spotpatch-border-strong); }
4138
4266
  .spotpatch-target-editor textarea:focus {
4139
- border-color: rgb(139 124 247 / 68%);
4140
- background: rgb(3 7 18 / 65%);
4141
- box-shadow: 0 0 0 2px rgb(109 93 246 / 10%);
4267
+ border-color: var(--spotpatch-accent-line);
4268
+ box-shadow: 0 0 0 3px var(--spotpatch-accent-tint);
4142
4269
  }
4270
+
4143
4271
  .spotpatch-diagnostics {
4144
4272
  margin-top: 10px;
4145
4273
  overflow: hidden;
4146
- border: 1px solid rgb(255 255 255 / 8%);
4147
- border-radius: 9px;
4148
- background: rgb(255 255 255 / 2.5%);
4274
+ border: 1px solid var(--spotpatch-border-subtle);
4275
+ border-radius: var(--spotpatch-radius-md);
4149
4276
  }
4150
4277
  .spotpatch-diagnostics > summary {
4151
4278
  display: flex;
4152
4279
  align-items: center;
4153
4280
  gap: 8px;
4154
- padding: 9px 11px;
4155
- color: #bfc5d0;
4281
+ padding: 9px 12px;
4282
+ color: var(--spotpatch-text-secondary);
4156
4283
  cursor: pointer;
4157
- font-size: 11px;
4158
- font-weight: 650;
4284
+ font-size: 11.5px;
4285
+ font-weight: 600;
4159
4286
  list-style: none;
4160
4287
  user-select: none;
4161
4288
  }
4162
4289
  .spotpatch-diagnostics > summary::-webkit-details-marker { display: none; }
4163
4290
  .spotpatch-diagnostics > summary::before {
4164
- color: #778193;
4291
+ color: var(--spotpatch-text-muted);
4165
4292
  content: "›";
4166
4293
  font-size: 16px;
4167
4294
  line-height: 1;
4168
- transform: rotate(0deg);
4169
- transition: transform 150ms ease;
4295
+ transition: transform var(--spotpatch-duration-base) var(--spotpatch-ease-out);
4170
4296
  }
4171
4297
  .spotpatch-diagnostics[open] > summary::before { transform: rotate(90deg); }
4172
4298
  .spotpatch-source-peek {
4173
4299
  min-width: 0;
4174
- overflow: hidden;
4175
4300
  margin-left: auto;
4176
- color: #64748b;
4177
- font: 500 10.5px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
4301
+ overflow: hidden;
4302
+ color: var(--spotpatch-text-muted);
4303
+ font: 500 11px/1.3 var(--spotpatch-font-mono);
4178
4304
  text-overflow: ellipsis;
4179
4305
  white-space: nowrap;
4180
4306
  }
4181
- .spotpatch-summary {
4182
- max-height: 170px;
4307
+ .spotpatch-summary,
4308
+ .spotpatch-prompt {
4183
4309
  margin: 0;
4184
4310
  overflow: auto;
4185
- border-top: 1px solid rgb(255 255 255 / 7%);
4186
- padding: 10px 11px 11px;
4187
- color: #9ca5b5;
4188
- font: 10.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
4189
4311
  overflow-wrap: anywhere;
4190
4312
  white-space: pre-wrap;
4191
4313
  user-select: text;
4314
+ font: 11px/1.6 var(--spotpatch-font-mono);
4315
+ }
4316
+ .spotpatch-summary {
4317
+ max-height: 170px;
4318
+ border-top: 1px solid var(--spotpatch-border-subtle);
4319
+ padding: 10px 12px 12px;
4320
+ color: var(--spotpatch-text-secondary);
4192
4321
  }
4193
4322
  .spotpatch-prompt {
4194
4323
  max-height: min(500px, 60vh);
4195
- margin: 0;
4196
- overflow: auto;
4197
- border: 1px solid rgb(255 255 255 / 9%);
4198
- border-radius: 9px;
4199
- padding: 11px;
4200
- color: #d8ddeb;
4201
- background: rgb(3 7 18 / 55%);
4202
- font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
4203
- overflow-wrap: anywhere;
4204
- white-space: pre-wrap;
4205
- user-select: text;
4324
+ border: 1px solid var(--spotpatch-border-subtle);
4325
+ border-radius: var(--spotpatch-radius-md);
4326
+ padding: 12px;
4327
+ color: var(--spotpatch-text);
4328
+ background: var(--spotpatch-bg-input);
4206
4329
  }
4330
+
4207
4331
  .spotpatch-actions {
4208
4332
  display: grid;
4209
4333
  gap: 8px;
4210
- padding: 10px 18px 14px;
4211
- border-top: 1px solid rgb(255 255 255 / 8%);
4212
- background: rgb(8 8 12 / 86%);
4213
- }
4214
- .spotpatch-editor-feedback {
4215
- white-space: normal;
4334
+ border-top: 1px solid var(--spotpatch-border-subtle);
4335
+ padding: 12px 18px 16px;
4216
4336
  }
4337
+ .spotpatch-editor-feedback { white-space: normal; }
4217
4338
  .spotpatch-secondary-actions,
4218
- .spotpatch-primary-actions {
4219
- display: flex;
4220
- align-items: center;
4221
- gap: 7px;
4222
- }
4223
- .spotpatch-secondary-actions { min-height: 30px; }
4339
+ .spotpatch-primary-actions { display: flex; align-items: center; gap: 8px; }
4340
+ .spotpatch-secondary-actions { gap: 2px; margin: 0 -8px; }
4224
4341
  .spotpatch-actions button {
4225
4342
  display: inline-flex;
4226
- min-height: 34px;
4343
+ min-height: 36px;
4227
4344
  align-items: center;
4228
4345
  justify-content: center;
4229
- border: 1px solid rgb(255 255 255 / 10%);
4230
- border-radius: 9px;
4231
- padding: 7px 11px;
4232
- color: var(--spotpatch-text-secondary);
4233
- background: rgb(255 255 255 / 4%);
4346
+ gap: 6px;
4347
+ border: 1px solid var(--spotpatch-border);
4348
+ border-radius: var(--spotpatch-radius-md);
4349
+ padding: 0 12px;
4350
+ color: var(--spotpatch-text);
4351
+ background: var(--spotpatch-bg-raised);
4234
4352
  cursor: pointer;
4235
- font-size: 12px;
4236
- font-weight: 650;
4237
- transition: border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
4353
+ font-size: 12.5px;
4354
+ font-weight: 600;
4355
+ white-space: nowrap;
4356
+ transition:
4357
+ border-color var(--spotpatch-duration-fast) ease,
4358
+ background var(--spotpatch-duration-fast) ease,
4359
+ box-shadow var(--spotpatch-duration-base) ease,
4360
+ transform var(--spotpatch-duration-fast) ease;
4238
4361
  }
4239
4362
  .spotpatch-actions button:hover:not(:disabled) {
4240
- border-color: rgb(139 124 247 / 45%);
4241
- color: #fff;
4242
- transform: translateY(-1px);
4363
+ border-color: var(--spotpatch-border-strong);
4364
+ background: var(--spotpatch-bg-active);
4243
4365
  }
4366
+ .spotpatch-actions button:active:not(:disabled) { transform: scale(.98); }
4244
4367
  .spotpatch-actions .spotpatch-primary {
4245
- min-width: 138px;
4368
+ min-width: 140px;
4246
4369
  flex: 1;
4247
4370
  border-color: transparent;
4248
4371
  color: var(--spotpatch-text-on-accent);
4249
- background: linear-gradient(135deg, var(--spotpatch-accent), var(--spotpatch-accent-strong));
4250
- box-shadow: 0 8px 20px -8px rgb(139 123 255 / 55%);
4372
+ background: var(--spotpatch-primary-fill);
4373
+ box-shadow: var(--spotpatch-shadow-accent), var(--spotpatch-shadow-inset);
4251
4374
  }
4252
- .spotpatch-actions .spotpatch-primary:hover:not(:disabled) { color: var(--spotpatch-text-on-accent); filter: brightness(1.08); }
4253
- .spotpatch-actions .spotpatch-primary::after { margin-left: 8px; content: "↗"; font-size: 12px; }
4375
+ .spotpatch-actions .spotpatch-primary:hover:not(:disabled) {
4376
+ border-color: transparent;
4377
+ background: var(--spotpatch-primary-fill);
4378
+ filter: brightness(1.1);
4379
+ }
4380
+ .spotpatch-actions .spotpatch-primary::after { content: "↗"; font-size: 12px; opacity: .8; }
4254
4381
  .spotpatch-actions .spotpatch-secondary-action {
4255
4382
  min-height: 30px;
4256
- border-style: dashed;
4257
- padding: 5px 10px;
4258
- color: var(--spotpatch-text-muted);
4383
+ border-color: transparent;
4384
+ padding: 0 8px;
4385
+ color: var(--spotpatch-text-secondary);
4259
4386
  background: transparent;
4260
- font-size: 11px;
4387
+ font-size: 12px;
4388
+ font-weight: 550;
4389
+ }
4390
+ .spotpatch-actions .spotpatch-secondary-action:hover:not(:disabled) {
4391
+ border-color: transparent;
4392
+ color: var(--spotpatch-text);
4393
+ background: var(--spotpatch-hover);
4261
4394
  }
4262
4395
  .spotpatch-actions .spotpatch-icon-action {
4263
- width: 34px;
4264
- min-width: 34px;
4396
+ width: 36px;
4397
+ min-width: 36px;
4265
4398
  padding: 0;
4266
4399
  font-size: 0;
4267
4400
  }
4268
4401
  .spotpatch-actions .spotpatch-icon-action::before {
4269
4402
  color: var(--spotpatch-text-secondary);
4270
4403
  content: attr(data-compact-icon);
4271
- font-size: 18px;
4404
+ font-size: 17px;
4272
4405
  font-weight: 400;
4273
4406
  line-height: 1;
4274
4407
  }
4275
- .spotpatch-actions button:disabled { cursor: not-allowed; opacity: .4; transform: none; }
4276
- .spotpatch-actions button:focus-visible,
4277
- .spotpatch-repository:focus-visible,
4278
- .spotpatch-target-open:focus-visible,
4279
- .spotpatch-target-remove:focus-visible,
4280
- .spotpatch-close:focus-visible,
4281
- .spotpatch-reset-position:focus-visible,
4282
- .spotpatch-trigger:focus-visible,
4283
- .spotpatch-target-select:focus-visible,
4284
- .spotpatch-target-editor textarea:focus-visible,
4285
- .spotpatch-locale:focus-visible,
4286
- .spotpatch-prompt:focus-visible,
4287
- .spotpatch-diagnostics > summary:focus-visible {
4288
- outline: 2px solid #8b7cf7;
4289
- outline-offset: 2px;
4408
+ .spotpatch-actions button:disabled {
4409
+ box-shadow: none;
4410
+ cursor: not-allowed;
4411
+ filter: none;
4412
+ opacity: .4;
4290
4413
  }
4414
+
4291
4415
  .spotpatch-live {
4292
4416
  position: absolute;
4293
4417
  width: 1px;
@@ -4297,16 +4421,11 @@ function createStyles(document) {
4297
4421
  clip-path: inset(50%);
4298
4422
  white-space: nowrap;
4299
4423
  }
4300
- @media (prefers-reduced-motion: reduce) {
4301
- .spotpatch-trigger,
4302
- .spotpatch-actions button,
4303
- .spotpatch-diagnostics > summary::before { transition: none; }
4304
- }
4305
4424
  @media (max-width: 520px) {
4306
4425
  .spotpatch-dialog { width: calc(100vw - 16px); }
4307
4426
  .spotpatch-shell { max-height: calc(100dvh - 16px); }
4308
- .spotpatch-header, .spotpatch-body { padding-left: 14px; padding-right: 14px; }
4309
- .spotpatch-brand-row { margin-right: -14px; margin-left: -14px; padding-right: 14px; padding-left: 14px; }
4427
+ .spotpatch-header, .spotpatch-body { padding-right: 14px; padding-left: 14px; }
4428
+ .spotpatch-brand-row { margin-right: -14px; margin-left: -14px; padding-right: 10px; padding-left: 14px; }
4310
4429
  .spotpatch-actions { padding-right: 14px; padding-left: 14px; }
4311
4430
  .spotpatch-target-select { grid-template-columns: 24px minmax(0, 1fr); }
4312
4431
  .spotpatch-target-state { display: none; }
@@ -4316,6 +4435,19 @@ function createStyles(document) {
4316
4435
  `;
4317
4436
  return style;
4318
4437
  }
4438
+ function createResetPositionIcon(document) {
4439
+ const namespace = "http://www.w3.org/2000/svg";
4440
+ const icon = document.createElementNS(namespace, "svg");
4441
+ icon.setAttribute("viewBox", "0 0 16 16");
4442
+ icon.setAttribute("aria-hidden", "true");
4443
+ const path = document.createElementNS(namespace, "path");
4444
+ path.setAttribute(
4445
+ "d",
4446
+ "M8 1.5v3M8 11.5v3M1.5 8h3M11.5 8h3M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
4447
+ );
4448
+ icon.append(path);
4449
+ return icon;
4450
+ }
4319
4451
  function summaryLine(summary, prefix) {
4320
4452
  const line = summary.split("\n").find((candidate) => candidate.startsWith(`${prefix}: `));
4321
4453
  return line?.slice(prefix.length + 2).trim();
@@ -4446,7 +4578,8 @@ function createRuntimeView(document, shortcut, ai = Object.freeze({ enabled: fal
4446
4578
  repositoryLink.target = "_blank";
4447
4579
  repositoryLink.rel = "noopener noreferrer";
4448
4580
  const localeButton = createButton(document, "", "spotpatch-locale");
4449
- const resetPositionButton = createButton(document, "⌖", "spotpatch-reset-position");
4581
+ const resetPositionButton = createButton(document, "", "spotpatch-reset-position");
4582
+ resetPositionButton.append(createResetPositionIcon(document));
4450
4583
  const closeButton = createButton(document, "×", "spotpatch-close");
4451
4584
  headerControls.append(repositoryLink, localeButton, resetPositionButton, closeButton);
4452
4585
  brandRow.append(brand, headerControls);
@@ -4673,6 +4806,8 @@ function createRuntimeView(document, shortcut, ai = Object.freeze({ enabled: fal
4673
4806
  let editingEnabled = true;
4674
4807
  let currentTargets = [];
4675
4808
  let currentMaximum = 0;
4809
+ let renderedTargetIds = /* @__PURE__ */ new Set();
4810
+ let renderedHighlightIds = /* @__PURE__ */ new Set();
4676
4811
  let currentEditorFeedbackState = "idle";
4677
4812
  let currentDataFlowState = Object.freeze({
4678
4813
  component: Object.freeze({
@@ -4977,6 +5112,8 @@ function createRuntimeView(document, shortcut, ai = Object.freeze({ enabled: fal
4977
5112
  const selectionEnd = focusedInstruction?.selectionEnd;
4978
5113
  currentTargets = targets.map((target2) => Object.freeze({ ...target2 }));
4979
5114
  currentMaximum = maximum;
5115
+ const previousTargetIds = renderedTargetIds;
5116
+ renderedTargetIds = new Set(targets.map((target2) => target2.id));
4980
5117
  targetList.replaceChildren();
4981
5118
  const completeCount = targets.filter(
4982
5119
  (target2) => target2.instruction.trim().length > 0
@@ -5009,6 +5146,7 @@ function createRuntimeView(document, shortcut, ai = Object.freeze({ enabled: fal
5009
5146
  item.dataset.active = String(target2.active);
5010
5147
  item.dataset.status = target2.status;
5011
5148
  item.dataset.targetId = target2.id;
5149
+ item.dataset.entering = String(!previousTargetIds.has(target2.id));
5012
5150
  const targetSummary = createMarkedElement(document, "div");
5013
5151
  targetSummary.className = "spotpatch-target-summary";
5014
5152
  const select = createButton(document, "", "spotpatch-target-select");
@@ -5131,11 +5269,14 @@ function createRuntimeView(document, shortcut, ai = Object.freeze({ enabled: fal
5131
5269
  );
5132
5270
  }
5133
5271
  function showSelectionHighlights(targets) {
5272
+ const previousHighlightIds = renderedHighlightIds;
5273
+ renderedHighlightIds = new Set(targets.map((target2) => target2.id));
5134
5274
  selectionHighlights.replaceChildren();
5135
5275
  for (const [index, target2] of targets.entries()) {
5136
5276
  const box = createMarkedElement(document, "div");
5137
5277
  box.className = "spotpatch-selection-highlight";
5138
5278
  box.dataset.targetId = target2.id;
5279
+ box.dataset.entering = String(!previousHighlightIds.has(target2.id));
5139
5280
  box.dataset.active = String(target2.active);
5140
5281
  box.style.transform = `translate(${String(target2.rect.x)}px, ${String(target2.rect.y)}px)`;
5141
5282
  box.style.width = `${String(target2.rect.width)}px`;