@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.js CHANGED
@@ -15,9 +15,10 @@ import {
15
15
  getExternalHandoffExtension
16
16
  } from "./chunk-TEH2CCO3.js";
17
17
  import {
18
+ THEME_STYLES,
18
19
  createBrandMark,
19
20
  getFloatingSurfaceMotionExtension
20
- } from "./chunk-P7W3F4UA.js";
21
+ } from "./chunk-N4TPX3YF.js";
21
22
  import {
22
23
  FLOATING_SURFACE_LAYOUT,
23
24
  UI_MARKER_ATTRIBUTE,
@@ -1762,7 +1763,7 @@ var AGENT_PANEL_STYLES = `
1762
1763
  overflow: hidden;
1763
1764
  border: 1px solid var(--spotpatch-border-subtle);
1764
1765
  border-radius: var(--spotpatch-radius-card);
1765
- background: rgb(255 255 255 / 2.5%);
1766
+ background: var(--spotpatch-bg-raised);
1766
1767
  }
1767
1768
  .spotpatch-agent-head {
1768
1769
  display: flex;
@@ -1770,17 +1771,17 @@ var AGENT_PANEL_STYLES = `
1770
1771
  justify-content: space-between;
1771
1772
  gap: 10px;
1772
1773
  padding: 10px 12px;
1773
- border-bottom: 1px solid rgb(255 255 255 / 7%);
1774
+ border-bottom: 1px solid var(--spotpatch-border-subtle);
1774
1775
  }
1775
- .spotpatch-agent-title { color: #eef0f5; font-size: 13px; font-weight: 650; }
1776
+ .spotpatch-agent-title { font-size: 13px; font-weight: 620; }
1776
1777
  .spotpatch-agent-badge {
1777
- border: 1px solid rgb(129 112 247 / 24%);
1778
- border-radius: 999px;
1779
- padding: 3px 7px;
1780
- color: #c5cafa;
1781
- background: rgb(109 93 246 / 9%);
1782
- font-size: 10px;
1783
- font-weight: 650;
1778
+ border: 1px solid var(--spotpatch-accent-line);
1779
+ border-radius: var(--spotpatch-radius-pill);
1780
+ padding: 2px 8px;
1781
+ color: var(--spotpatch-accent-soft);
1782
+ background: var(--spotpatch-accent-tint);
1783
+ font-size: 11px;
1784
+ font-weight: 600;
1784
1785
  }
1785
1786
  .spotpatch-agent-setup { padding: 12px; }
1786
1787
  .spotpatch-agent-selectors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@@ -1790,71 +1791,71 @@ var AGENT_PANEL_STYLES = `
1790
1791
  box-sizing: border-box;
1791
1792
  width: 100%;
1792
1793
  min-width: 0;
1793
- min-height: 34px;
1794
+ min-height: 36px;
1794
1795
  margin-top: 4px;
1795
1796
  border: 1px solid var(--spotpatch-border);
1796
- border-radius: 8px;
1797
- padding: 7px 32px 7px 9px;
1798
- color: #e8ebf2;
1799
- color-scheme: dark;
1800
- background: linear-gradient(180deg, rgb(255 255 255 / 4%), rgb(255 255 255 / 2%));
1801
- font-size: 12px;
1797
+ border-radius: var(--spotpatch-radius-sm);
1798
+ padding: 7px 32px 7px 10px;
1799
+ color: var(--spotpatch-text);
1800
+ background: var(--spotpatch-bg-input);
1801
+ font-size: 12.5px;
1802
1802
  font-weight: 560;
1803
1803
  line-height: 1.35;
1804
1804
  outline: none;
1805
- transition: 160ms ease;
1805
+ transition:
1806
+ border-color var(--spotpatch-duration-fast) ease,
1807
+ box-shadow var(--spotpatch-duration-fast) ease;
1806
1808
  }
1807
- .spotpatch-agent select:hover { border-color: rgb(148 163 184 / 38%); background-color: rgb(255 255 255 / 5%); }
1808
- .spotpatch-agent select:focus-visible { border-color: rgb(139 124 247 / 76%); box-shadow: 0 0 0 3px rgb(109 93 246 / 18%); }
1809
- .spotpatch-agent select option { min-height: 42px; color: #e8ebf2; background: #10151e; }
1809
+ .spotpatch-agent select:hover { border-color: var(--spotpatch-border-strong); }
1810
+ .spotpatch-agent select:focus-visible { border-color: var(--spotpatch-accent-line); box-shadow: 0 0 0 3px var(--spotpatch-accent-tint); }
1811
+ .spotpatch-agent select option { min-height: 42px; color: var(--spotpatch-text); background: var(--spotpatch-bg-raised); }
1810
1812
  @supports (appearance: base-select) {
1811
1813
  .spotpatch-agent select,
1812
1814
  ::picker(select) { appearance: base-select; }
1813
- .spotpatch-agent select { padding: 7px 9px; }
1815
+ .spotpatch-agent select { padding: 7px 10px; }
1814
1816
  .spotpatch-agent select::picker-icon {
1815
- color: #9da6b5;
1816
- transition: rotate 180ms cubic-bezier(.2, .8, .2, 1);
1817
+ color: var(--spotpatch-text-muted);
1818
+ transition: rotate var(--spotpatch-duration-base) var(--spotpatch-ease-out);
1817
1819
  }
1818
- .spotpatch-agent select:open::picker-icon { rotate: 180deg; color: #c4b5fd; }
1820
+ .spotpatch-agent select:open::picker-icon { rotate: 180deg; color: var(--spotpatch-accent-soft); }
1819
1821
  .spotpatch-agent select::picker(select) {
1820
- top: calc(anchor(bottom) + 7px);
1822
+ top: calc(anchor(bottom) + 6px);
1821
1823
  left: anchor(left);
1822
1824
  width: anchor-size(width);
1823
1825
  max-height: min(280px, 40vh);
1824
1826
  margin: 0;
1825
1827
  overflow: auto;
1826
- border: 1px solid rgb(139 124 247 / 28%);
1827
- border-radius: 12px;
1828
- padding: 6px;
1829
- background: #10151e;
1830
- box-shadow: 0 18px 50px rgb(0 0 0 / 38%);
1828
+ border: 1px solid var(--spotpatch-border);
1829
+ border-radius: var(--spotpatch-radius-card);
1830
+ padding: 5px;
1831
+ background: var(--spotpatch-bg-raised);
1832
+ box-shadow: var(--spotpatch-shadow-panel);
1831
1833
  opacity: 1;
1832
1834
  transform: translateY(0) scale(1);
1833
- transition: opacity 150ms ease, transform 180ms cubic-bezier(.2, .8, .2, 1), overlay 180ms allow-discrete, display 180ms allow-discrete;
1835
+ transition:
1836
+ opacity var(--spotpatch-duration-fast) ease,
1837
+ transform var(--spotpatch-duration-base) var(--spotpatch-ease-out),
1838
+ overlay var(--spotpatch-duration-base) allow-discrete,
1839
+ display var(--spotpatch-duration-base) allow-discrete;
1834
1840
  }
1835
1841
  @starting-style {
1836
1842
  .spotpatch-agent select::picker(select):popover-open {
1837
1843
  opacity: 0;
1838
- transform: translateY(-5px) scale(.985);
1844
+ transform: translateY(-5px) scale(.98);
1839
1845
  }
1840
1846
  }
1841
1847
  .spotpatch-agent select option {
1842
- min-height: 42px;
1843
- border-radius: 8px;
1844
- padding: 10px 12px;
1845
- color: #dfe4ee;
1848
+ min-height: 40px;
1849
+ border-radius: var(--spotpatch-radius-sm);
1850
+ padding: 9px 11px;
1851
+ color: var(--spotpatch-text-secondary);
1846
1852
  background: transparent;
1847
1853
  cursor: pointer;
1848
1854
  }
1849
1855
  .spotpatch-agent select option:hover,
1850
- .spotpatch-agent select option:focus { color: #fff; background: rgb(109 93 246 / 16%); }
1851
- .spotpatch-agent select option:checked { color: #fff; background: rgb(109 93 246 / 24%); }
1852
- .spotpatch-agent select option::checkmark { color: #8b7cf7; }
1853
- }
1854
- .spotpatch-agent select:focus-visible,
1855
- .spotpatch-consent input:focus-visible {
1856
- outline: 2px solid #8b7cf7;
1857
- outline-offset: 2px;
1856
+ .spotpatch-agent select option:focus { color: var(--spotpatch-text); background: var(--spotpatch-hover); }
1857
+ .spotpatch-agent select option:checked { color: var(--spotpatch-text); background: var(--spotpatch-accent-tint); }
1858
+ .spotpatch-agent select option::checkmark { color: var(--spotpatch-accent-soft); }
1858
1859
  }
1859
1860
  .spotpatch-consent {
1860
1861
  display: flex;
@@ -1863,26 +1864,21 @@ var AGENT_PANEL_STYLES = `
1863
1864
  margin-top: 10px;
1864
1865
  color: var(--spotpatch-text-secondary);
1865
1866
  cursor: pointer;
1866
- font-size: 11.5px;
1867
+ font-size: 12px;
1867
1868
  line-height: 1.5;
1868
1869
  }
1869
1870
  .spotpatch-consent input { width: 14px; height: 14px; flex: none; margin: 2px 0 0; accent-color: var(--spotpatch-accent); }
1870
- .spotpatch-trusted-consent {
1871
- border: 1px solid rgb(251 191 36 / 20%);
1872
- border-radius: 10px;
1873
- padding: 9px 10px;
1874
- color: #e5e7eb;
1875
- background: rgb(120 53 15 / 10%);
1876
- }
1871
+ .spotpatch-trusted-consent,
1877
1872
  .spotpatch-workspace-consent {
1878
- margin-top: 9px;
1879
- border: 1px solid rgb(251 191 36 / 18%);
1880
- border-radius: 10px;
1873
+ border: 1px solid var(--spotpatch-warning-line);
1874
+ border-radius: var(--spotpatch-radius-md);
1881
1875
  padding: 9px 10px;
1882
- background: rgb(120 53 15 / 9%);
1876
+ background: var(--spotpatch-warning-tint);
1883
1877
  }
1884
- .spotpatch-workspace-consent strong { display: block; color: #fde68a; font-size: 11.5px; font-weight: 620; }
1885
- .spotpatch-workspace-consent small { display: block; margin-top: 2px; color: #aeb6c4; font-size: 10.5px; line-height: 1.45; }
1878
+ .spotpatch-trusted-consent { color: var(--spotpatch-text); }
1879
+ .spotpatch-workspace-consent { margin-top: 9px; }
1880
+ .spotpatch-workspace-consent strong { display: block; color: var(--spotpatch-warning-text); font-size: 12px; font-weight: 600; }
1881
+ .spotpatch-workspace-consent small { display: block; margin-top: 2px; color: var(--spotpatch-text-secondary); font-size: 11px; line-height: 1.45; }
1886
1882
  .spotpatch-agent-health-list { display: grid; gap: 6px; margin-top: 10px; }
1887
1883
  .spotpatch-agent-workspace,
1888
1884
  .spotpatch-agent-capability {
@@ -1890,83 +1886,85 @@ var AGENT_PANEL_STYLES = `
1890
1886
  align-items: center;
1891
1887
  gap: 8px;
1892
1888
  margin: 0;
1893
- color: #929bab;
1894
- font-size: 11px;
1889
+ color: var(--spotpatch-text-secondary);
1890
+ font-size: 11.5px;
1895
1891
  }
1892
+ .spotpatch-agent-workspace::before,
1896
1893
  .spotpatch-agent-capability::before {
1897
1894
  width: 6px;
1898
1895
  height: 6px;
1899
1896
  flex: none;
1900
- border-radius: 999px;
1901
- background: #64748b;
1902
- content: "";
1903
- }
1904
- .spotpatch-agent-capability[data-state="probing"]::before { background: var(--spotpatch-warning); }
1905
- .spotpatch-agent-capability[data-state="ready"] { color: #a7f3d0; }
1906
- .spotpatch-agent-capability[data-state="ready"]::before { background: var(--spotpatch-success); }
1907
- .spotpatch-agent-capability[data-state="error"] { color: #fecaca; }
1908
- .spotpatch-agent-capability[data-state="error"]::before { background: var(--spotpatch-danger); }
1909
- .spotpatch-agent-workspace::before {
1910
- width: 6px;
1911
- height: 6px;
1912
- flex: none;
1913
- border-radius: 999px;
1914
- background: #64748b;
1897
+ border-radius: 50%;
1898
+ background: var(--spotpatch-text-muted);
1915
1899
  content: "";
1916
1900
  }
1901
+ .spotpatch-agent-capability[data-state="probing"]::before,
1917
1902
  .spotpatch-agent-workspace[data-state="checking"]::before { background: var(--spotpatch-warning); }
1918
- .spotpatch-agent-workspace[data-state="ready"] { color: #a7f3d0; }
1903
+ .spotpatch-agent-capability[data-state="ready"],
1904
+ .spotpatch-agent-workspace[data-state="ready"] { color: var(--spotpatch-success-text); }
1905
+ .spotpatch-agent-capability[data-state="ready"]::before,
1919
1906
  .spotpatch-agent-workspace[data-state="ready"]::before { background: var(--spotpatch-success); }
1920
- .spotpatch-agent-workspace[data-state="consent-required"] { color: #fde68a; }
1921
- .spotpatch-agent-workspace[data-state="consent-required"]::before { background: #fbbf24; }
1922
- .spotpatch-agent-workspace[data-state="blocked"] { color: #fecaca; }
1907
+ .spotpatch-agent-workspace[data-state="consent-required"] { color: var(--spotpatch-warning-text); }
1908
+ .spotpatch-agent-workspace[data-state="consent-required"]::before { background: var(--spotpatch-warning); }
1909
+ .spotpatch-agent-capability[data-state="error"],
1910
+ .spotpatch-agent-workspace[data-state="blocked"] { color: var(--spotpatch-danger-text); }
1911
+ .spotpatch-agent-capability[data-state="error"]::before,
1923
1912
  .spotpatch-agent-workspace[data-state="blocked"]::before { background: var(--spotpatch-danger); }
1924
1913
  .spotpatch-agent-job { padding: 12px; }
1925
1914
  .spotpatch-agent-job-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
1926
- .spotpatch-agent-model { min-width: 0; overflow: hidden; color: #d6dafe; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
1915
+ .spotpatch-agent-model { min-width: 0; overflow: hidden; font-size: 13px; font-weight: 580; text-overflow: ellipsis; white-space: nowrap; }
1927
1916
  .spotpatch-agent-status {
1928
1917
  flex: none;
1929
- border-radius: 999px;
1930
- padding: 3px 7px;
1931
- color: #bae6fd;
1932
- background: rgb(14 116 144 / 20%);
1918
+ border-radius: var(--spotpatch-radius-pill);
1919
+ padding: 3px 8px;
1920
+ color: var(--spotpatch-cyan-text);
1921
+ background: var(--spotpatch-cyan-tint);
1933
1922
  font-size: 11px;
1934
- font-weight: 650;
1923
+ font-weight: 600;
1935
1924
  }
1936
- .spotpatch-agent-phase { margin: 12px 0 0; color: #e2e5ec; font-size: 13px; line-height: 1.55; }
1925
+ .spotpatch-agent-phase { margin: 12px 0 0; font-size: 13px; line-height: 1.55; }
1937
1926
  .spotpatch-agent-error {
1938
1927
  margin: 9px 0 0;
1939
- border: 1px solid rgb(251 113 133 / 22%);
1940
- border-radius: 9px;
1928
+ border: 1px solid var(--spotpatch-danger-line);
1929
+ border-radius: var(--spotpatch-radius-md);
1941
1930
  padding: 9px 10px;
1942
- color: #fecaca;
1943
- background: rgb(127 29 29 / 14%);
1931
+ color: var(--spotpatch-danger-text);
1932
+ background: var(--spotpatch-danger-tint);
1944
1933
  font-size: 12px;
1945
1934
  }
1946
1935
  .spotpatch-agent-activity { display: grid; gap: 5px; margin: 9px 0 0; padding: 0; list-style: none; }
1947
- .spotpatch-agent-activity li { display: flex; gap: 8px; color: #929bab; font: 11.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
1948
- .spotpatch-agent-activity li::before { color: #64748b; content: "•"; }
1949
- .spotpatch-agent-activity li[data-state="active"]::before { color: #fbbf24; }
1950
- .spotpatch-agent-activity li[data-state="success"]::before { color: #34d399; }
1951
- .spotpatch-agent-activity li[data-state="failure"]::before { color: #fb7185; }
1952
- .spotpatch-agent-result { margin-top: 11px; border-top: 1px solid rgb(148 163 184 / 10%); padding-top: 10px; }
1953
- .spotpatch-agent-summary { margin: 0; color: #dce1eb; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
1936
+ .spotpatch-agent-activity li { display: flex; gap: 8px; color: var(--spotpatch-text-secondary); font: 11.5px/1.55 var(--spotpatch-font-mono); }
1937
+ .spotpatch-agent-activity li::before { color: var(--spotpatch-text-muted); content: "•"; }
1938
+ .spotpatch-agent-activity li[data-state="active"]::before { color: var(--spotpatch-warning); }
1939
+ .spotpatch-agent-activity li[data-state="success"]::before { color: var(--spotpatch-success); }
1940
+ .spotpatch-agent-activity li[data-state="failure"]::before { color: var(--spotpatch-danger); }
1941
+ .spotpatch-agent-result { margin-top: 12px; border-top: 1px solid var(--spotpatch-border-subtle); padding-top: 10px; }
1942
+ .spotpatch-agent-summary { margin: 0; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
1954
1943
  .spotpatch-agent-files { display: grid; gap: 4px; margin: 9px 0 0; padding: 0; list-style: none; }
1955
- .spotpatch-agent-files li { color: #bbc2f7; font: 11.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
1944
+ .spotpatch-agent-files li { color: var(--spotpatch-accent-soft); font: 11.5px/1.5 var(--spotpatch-font-mono); overflow-wrap: anywhere; }
1956
1945
  .spotpatch-agent-checks { display: grid; gap: 5px; margin-top: 9px; }
1957
- .spotpatch-agent-checks details { border: 1px solid rgb(148 163 184 / 12%); border-radius: 8px; background: rgb(2 6 23 / 30%); }
1958
- .spotpatch-agent-checks summary { padding: 9px 10px; color: #cbd0db; cursor: pointer; font-size: 11.5px; }
1959
- .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; }
1946
+ .spotpatch-agent-checks details { border: 1px solid var(--spotpatch-border-subtle); border-radius: var(--spotpatch-radius-sm); background: var(--spotpatch-bg-input); }
1947
+ .spotpatch-agent-checks summary { padding: 9px 10px; color: var(--spotpatch-text-secondary); cursor: pointer; font-size: 12px; }
1948
+ .spotpatch-agent-checks pre {
1949
+ max-height: 140px;
1950
+ margin: 0;
1951
+ overflow: auto;
1952
+ border-top: 1px solid var(--spotpatch-border-subtle);
1953
+ padding: 10px;
1954
+ color: var(--spotpatch-text-secondary);
1955
+ font: 11px/1.55 var(--spotpatch-font-mono);
1956
+ white-space: pre-wrap;
1957
+ }
1960
1958
  .spotpatch-agent-diff {
1961
1959
  max-height: 300px;
1962
1960
  margin: 9px 0 0;
1963
1961
  overflow: auto;
1964
- border: 1px solid rgb(129 140 248 / 18%);
1965
- border-radius: 9px;
1966
- padding: 8px;
1967
- color: #cbd5e1;
1968
- background: rgb(2 6 23 / 66%);
1969
- font: 11.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
1962
+ border: 1px solid var(--spotpatch-border-subtle);
1963
+ border-radius: var(--spotpatch-radius-md);
1964
+ padding: 8px 10px;
1965
+ color: var(--spotpatch-text);
1966
+ background: var(--spotpatch-bg-input);
1967
+ font: 11.5px/1.6 var(--spotpatch-font-mono);
1970
1968
  overflow-wrap: normal;
1971
1969
  white-space: pre;
1972
1970
  user-select: text;
@@ -3583,67 +3581,102 @@ function resolveStyleNonce(document) {
3583
3581
  function createStyles(document) {
3584
3582
  const style = document.createElement("style");
3585
3583
  style.textContent = `
3586
- :host {
3587
- all: initial;
3588
- --spotpatch-bg: #0e0e12;
3589
- --spotpatch-bg-raised: #17171c;
3590
- --spotpatch-bg-active: #1c1c22;
3591
- --spotpatch-bg-input: #0b0b0f;
3592
- --spotpatch-border: #2a2a32;
3593
- --spotpatch-border-subtle: #232329;
3594
- --spotpatch-text: #f2f2f5;
3595
- --spotpatch-text-secondary: #96969f;
3596
- --spotpatch-text-muted: #686872;
3597
- --spotpatch-accent: #8b7bff;
3598
- --spotpatch-accent-strong: #6a5ce8;
3599
- --spotpatch-accent-cyan: #52a8ff;
3600
- --spotpatch-danger: #fb7185;
3601
- --spotpatch-success: #34d399;
3602
- --spotpatch-warning: #f59e0b;
3603
- --spotpatch-text-on-accent: #0b0b12;
3604
- --spotpatch-radius-card: 10px;
3605
- color: var(--spotpatch-text);
3606
- font-family: Inter, "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
3607
- font-size: 14px;
3608
- line-height: 1.5;
3609
- }
3610
- [hidden] { display: none !important; }
3611
- button, textarea, select { font: inherit; }
3584
+ ${THEME_STYLES}
3612
3585
  .spotpatch-floating-surface {
3613
3586
  position: fixed;
3614
3587
  right: ${String(FLOATING_SURFACE_LAYOUT.desktopInset)}px;
3615
3588
  bottom: ${String(FLOATING_SURFACE_LAYOUT.desktopInset)}px;
3616
3589
  z-index: ${String(UI_Z_INDEX.controls)};
3590
+ box-sizing: border-box;
3591
+ overflow: hidden;
3617
3592
  isolation: isolate;
3593
+ border: 1px solid var(--spotpatch-border);
3594
+ background: var(--spotpatch-surface-fill);
3595
+ box-shadow: var(--spotpatch-shadow-float), var(--spotpatch-shadow-inset);
3596
+ transform-origin: 100% 100%;
3618
3597
  }
3619
- .spotpatch-highlight {
3598
+ .spotpatch-floating-surface[data-scene="pill"],
3599
+ .spotpatch-floating-surface[data-scene="capturing"] {
3600
+ width: max-content;
3601
+ border-radius: var(--spotpatch-radius-pill);
3602
+ }
3603
+ .spotpatch-floating-surface[data-scene="planner"] {
3604
+ border-radius: var(--spotpatch-radius-panel);
3605
+ box-shadow: var(--spotpatch-shadow-panel), var(--spotpatch-shadow-inset);
3606
+ }
3607
+
3608
+ .spotpatch-trigger {
3609
+ display: inline-flex;
3610
+ min-height: 44px;
3611
+ align-items: center;
3612
+ gap: 10px;
3613
+ border: 0;
3614
+ border-radius: var(--spotpatch-radius-pill);
3615
+ padding: 0 18px 0 16px;
3616
+ color: var(--spotpatch-text);
3617
+ background: transparent;
3618
+ cursor: pointer;
3619
+ font-size: 13.5px;
3620
+ font-weight: 620;
3621
+ letter-spacing: -.005em;
3622
+ touch-action: none;
3623
+ user-select: none;
3624
+ transition: background var(--spotpatch-duration-fast) ease;
3625
+ }
3626
+ .spotpatch-trigger::before {
3627
+ width: 8px;
3628
+ height: 8px;
3629
+ border-radius: 50%;
3630
+ background: var(--spotpatch-accent);
3631
+ box-shadow: 0 0 0 4px var(--spotpatch-accent-tint);
3632
+ content: "";
3633
+ transition: background var(--spotpatch-duration-base) ease;
3634
+ }
3635
+ .spotpatch-trigger:hover { background: var(--spotpatch-hover); }
3636
+ .spotpatch-trigger[aria-pressed="true"]::before {
3637
+ background: var(--spotpatch-accent-cyan);
3638
+ animation: spotpatch-trigger-pulse 1.6s var(--spotpatch-ease-standard) infinite;
3639
+ }
3640
+ .spotpatch-trigger[data-dragging="true"] { cursor: grabbing; }
3641
+ @keyframes spotpatch-trigger-pulse {
3642
+ 0% { box-shadow: 0 0 0 0 var(--spotpatch-cyan-line); }
3643
+ 100% { box-shadow: 0 0 0 9px transparent; }
3644
+ }
3645
+
3646
+ .spotpatch-highlight,
3647
+ .spotpatch-selection-highlight {
3620
3648
  position: fixed;
3621
3649
  top: 0;
3622
3650
  left: 0;
3623
- z-index: ${String(UI_Z_INDEX.highlight)};
3624
3651
  box-sizing: border-box;
3625
- border: 2px solid var(--spotpatch-accent);
3626
- border-radius: 6px;
3627
- background: rgb(109 93 246 / 8%);
3628
- box-shadow: inset 0 0 0 1px rgb(255 255 255 / 22%), 0 0 0 1px rgb(109 93 246 / 10%);
3652
+ border-radius: var(--spotpatch-radius-xs);
3629
3653
  pointer-events: none;
3630
3654
  }
3631
- .spotpatch-highlight-label {
3655
+ .spotpatch-highlight {
3656
+ z-index: ${String(UI_Z_INDEX.highlight)};
3657
+ border: 1.5px solid var(--spotpatch-accent);
3658
+ background: var(--spotpatch-accent-tint);
3659
+ box-shadow: 0 0 0 4px color-mix(in srgb, var(--spotpatch-accent) 12%, transparent);
3660
+ transition:
3661
+ transform var(--spotpatch-duration-fast) var(--spotpatch-ease-out),
3662
+ width var(--spotpatch-duration-fast) var(--spotpatch-ease-out),
3663
+ height var(--spotpatch-duration-fast) var(--spotpatch-ease-out);
3664
+ }
3665
+ .spotpatch-highlight-label,
3666
+ .spotpatch-selection-highlight > span {
3632
3667
  position: absolute;
3633
- top: -30px;
3634
- left: -2px;
3635
- max-width: min(380px, 80vw);
3668
+ bottom: calc(100% + 6px);
3669
+ left: -1.5px;
3636
3670
  overflow: hidden;
3637
- border: 1px solid rgb(255 255 255 / 14%);
3638
- border-radius: 8px 8px 8px 3px;
3639
- padding: 6px 10px;
3640
- color: #fff;
3641
- background: #5546dc;
3642
- box-shadow: 0 8px 20px rgb(49 46 129 / 22%);
3643
- font: 650 12px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
3671
+ border-radius: var(--spotpatch-radius-xs);
3672
+ padding: 4px 8px;
3673
+ color: var(--spotpatch-text-on-accent);
3674
+ background: var(--spotpatch-accent-strong);
3675
+ font: 600 11px/1.3 var(--spotpatch-font-mono);
3644
3676
  text-overflow: ellipsis;
3645
3677
  white-space: nowrap;
3646
3678
  }
3679
+ .spotpatch-highlight-label { max-width: min(380px, 80vw); }
3647
3680
  .spotpatch-selection-highlights {
3648
3681
  position: fixed;
3649
3682
  inset: 0;
@@ -3651,37 +3684,27 @@ function createStyles(document) {
3651
3684
  pointer-events: none;
3652
3685
  }
3653
3686
  .spotpatch-selection-highlight {
3654
- position: fixed;
3655
- top: 0;
3656
- left: 0;
3657
- box-sizing: border-box;
3658
- border: 2px solid var(--spotpatch-accent-cyan);
3659
- border-radius: 6px;
3660
- background: rgb(8 182 214 / 5%);
3661
- box-shadow: inset 0 0 0 1px rgb(255 255 255 / 16%);
3687
+ border: 1.5px solid var(--spotpatch-accent-cyan);
3688
+ background: var(--spotpatch-cyan-tint);
3662
3689
  }
3663
3690
  .spotpatch-selection-highlight[data-active="true"] {
3664
- border-color: #7768f7;
3665
- background: rgb(109 93 246 / 8%);
3666
- box-shadow: inset 0 0 0 1px rgb(255 255 255 / 20%);
3691
+ border-color: var(--spotpatch-accent);
3692
+ background: var(--spotpatch-accent-tint);
3693
+ box-shadow: 0 0 0 4px color-mix(in srgb, var(--spotpatch-accent) 12%, transparent);
3694
+ }
3695
+ .spotpatch-selection-highlight[data-entering="true"] {
3696
+ animation: spotpatch-pop var(--spotpatch-duration-base) var(--spotpatch-ease-spring) both;
3667
3697
  }
3668
3698
  .spotpatch-selection-highlight > span {
3669
- position: absolute;
3670
- top: -24px;
3671
- left: -2px;
3672
3699
  max-width: min(300px, 70vw);
3673
- overflow: hidden;
3674
- border-radius: 7px 7px 7px 2px;
3675
- padding: 4px 8px;
3676
- color: #ecfeff;
3677
- background: rgb(14 67 82 / 96%);
3678
- font: 650 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
3679
- text-overflow: ellipsis;
3680
- white-space: nowrap;
3700
+ color: var(--spotpatch-bg);
3701
+ background: var(--spotpatch-accent-cyan);
3681
3702
  }
3682
3703
  .spotpatch-selection-highlight[data-active="true"] > span {
3683
- background: #5546dc;
3704
+ color: var(--spotpatch-text-on-accent);
3705
+ background: var(--spotpatch-accent-strong);
3684
3706
  }
3707
+
3685
3708
  .spotpatch-dialog {
3686
3709
  position: relative;
3687
3710
  box-sizing: border-box;
@@ -3689,18 +3712,14 @@ function createStyles(document) {
3689
3712
  outline: none;
3690
3713
  }
3691
3714
  .spotpatch-shell {
3692
- position: relative;
3693
- z-index: 1;
3694
3715
  display: flex;
3695
3716
  box-sizing: border-box;
3696
3717
  max-height: min(${String(FLOATING_SURFACE_LAYOUT.workbenchMaxHeight)}px, calc(100vh - ${String(FLOATING_SURFACE_LAYOUT.desktopInset * 2)}px));
3697
3718
  overflow: hidden;
3698
3719
  flex-direction: column;
3699
3720
  }
3700
- .spotpatch-header {
3701
- position: relative;
3702
- padding: 0 18px 14px;
3703
- }
3721
+
3722
+ .spotpatch-header { padding: 0 18px 16px; }
3704
3723
  .spotpatch-header[data-spotpatch-drag-handle] { cursor: grab; touch-action: none; user-select: none; }
3705
3724
  .spotpatch-header[data-dragging="true"] { cursor: grabbing; }
3706
3725
  .spotpatch-header button,
@@ -3710,133 +3729,115 @@ function createStyles(document) {
3710
3729
  align-items: center;
3711
3730
  justify-content: space-between;
3712
3731
  gap: 12px;
3713
- margin: 0 -18px 18px;
3714
- padding: 14px 18px 13px;
3732
+ margin: 0 -18px 16px;
3733
+ padding: 12px 14px 12px 18px;
3715
3734
  border-bottom: 1px solid var(--spotpatch-border-subtle);
3716
3735
  }
3717
- .spotpatch-brand {
3718
- display: inline-flex;
3719
- align-items: center;
3720
- gap: 10px;
3721
- min-width: 0;
3722
- color: #f8fafc;
3723
- }
3724
- .spotpatch-brand-mark {
3725
- width: 30px;
3726
- height: 30px;
3727
- flex: none;
3728
- filter: drop-shadow(0 6px 12px rgb(76 29 149 / 22%));
3729
- }
3736
+ .spotpatch-brand { display: inline-flex; min-width: 0; align-items: center; gap: 10px; }
3737
+ .spotpatch-brand-mark { width: 28px; height: 28px; flex: none; }
3730
3738
  .spotpatch-brand-copy { display: grid; min-width: 0; gap: 1px; }
3731
- .spotpatch-header-controls {
3732
- display: inline-flex;
3733
- align-items: center;
3734
- gap: 6px;
3735
- flex: none;
3736
- }
3739
+ .spotpatch-brand-name { font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; }
3740
+ .spotpatch-brand-context { color: var(--spotpatch-text-muted); font-size: 11px; font-weight: 520; }
3741
+ .spotpatch-header-controls { display: inline-flex; flex: none; align-items: center; gap: 2px; }
3737
3742
  .spotpatch-repository,
3738
3743
  .spotpatch-locale,
3739
3744
  .spotpatch-reset-position,
3740
- .spotpatch-close {
3741
- height: 27px;
3742
- border: 1px solid rgb(255 255 255 / 11%);
3743
- border-radius: 7px;
3744
- background: transparent;
3745
- }
3746
- .spotpatch-repository {
3747
- display: inline-flex;
3748
- align-items: center;
3749
- padding: 0 9px;
3750
- color: var(--spotpatch-text-secondary);
3751
- font-size: 11px;
3752
- font-weight: 680;
3753
- text-decoration: none;
3754
- }
3755
- .spotpatch-locale {
3756
- min-width: 34px;
3757
- padding: 0 8px;
3758
- color: #c5cad5;
3759
- cursor: pointer;
3760
- font-size: 12px;
3761
- font-weight: 650;
3762
- }
3763
- .spotpatch-reset-position {
3764
- display: inline-grid;
3765
- width: 27px;
3766
- padding: 0;
3767
- place-items: center;
3768
- color: #c5cad5;
3769
- cursor: pointer;
3770
- font-size: 15px;
3771
- line-height: 1;
3772
- }
3773
3745
  .spotpatch-close {
3774
3746
  display: inline-grid;
3775
- width: 27px;
3776
- padding: 0;
3747
+ box-sizing: border-box;
3748
+ min-width: 28px;
3749
+ height: 28px;
3777
3750
  place-items: center;
3778
- color: #9da5b4;
3779
- cursor: pointer;
3780
- font-size: 15px;
3751
+ border: 0;
3752
+ border-radius: var(--spotpatch-radius-sm);
3753
+ padding: 0 7px;
3754
+ color: var(--spotpatch-text-muted);
3755
+ background: transparent;
3756
+ font-size: 12px;
3757
+ font-weight: 600;
3781
3758
  line-height: 1;
3782
- transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
3759
+ text-decoration: none;
3760
+ transition:
3761
+ color var(--spotpatch-duration-fast) ease,
3762
+ background var(--spotpatch-duration-fast) ease;
3783
3763
  }
3784
- .spotpatch-close:hover,
3764
+ .spotpatch-reset-position,
3765
+ .spotpatch-close { padding: 0; font-size: 15px; }
3766
+ .spotpatch-reset-position svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.5; }
3767
+ .spotpatch-repository:hover,
3785
3768
  .spotpatch-locale:hover,
3786
3769
  .spotpatch-reset-position:hover,
3787
- .spotpatch-repository:hover { border-color: rgb(129 112 247 / 45%); color: #fff; background: rgb(109 93 246 / 10%); }
3770
+ .spotpatch-close:hover { color: var(--spotpatch-text); background: var(--spotpatch-hover); }
3771
+
3772
+ .spotpatch-title {
3773
+ margin: 0;
3774
+ font-size: 17px;
3775
+ font-weight: 650;
3776
+ letter-spacing: -.02em;
3777
+ line-height: 1.3;
3778
+ }
3779
+ .spotpatch-subtitle {
3780
+ max-width: 400px;
3781
+ margin: 4px 0 0;
3782
+ color: var(--spotpatch-text-secondary);
3783
+ font-size: 12.5px;
3784
+ line-height: 1.55;
3785
+ }
3788
3786
  .spotpatch-target-row {
3789
3787
  display: flex;
3790
- align-items: center;
3791
- gap: 8px;
3792
3788
  min-width: 0;
3789
+ align-items: center;
3790
+ gap: 10px;
3793
3791
  margin-top: 14px;
3794
3792
  }
3795
3793
  .spotpatch-target-label {
3796
3794
  min-width: 0;
3797
3795
  overflow: hidden;
3798
- border: 1px solid rgb(129 112 247 / 24%);
3799
- border-radius: 999px;
3800
- padding: 4px 10px;
3801
- color: #cdd2ff;
3802
- background: rgb(109 93 246 / 10%);
3803
- font: 600 11px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
3796
+ border: 1px solid var(--spotpatch-accent-line);
3797
+ border-radius: var(--spotpatch-radius-pill);
3798
+ padding: 3px 10px;
3799
+ color: var(--spotpatch-accent-soft);
3800
+ background: var(--spotpatch-accent-tint);
3801
+ font: 600 11px/1.4 var(--spotpatch-font-mono);
3804
3802
  text-overflow: ellipsis;
3805
3803
  white-space: nowrap;
3806
3804
  }
3807
3805
  .spotpatch-context-state {
3808
3806
  display: inline-flex;
3807
+ flex: none;
3809
3808
  align-items: center;
3810
3809
  gap: 6px;
3811
- flex: none;
3812
- color: #a5adba;
3813
- font-size: 11px;
3810
+ color: var(--spotpatch-warning-text);
3811
+ font-size: 11.5px;
3814
3812
  white-space: nowrap;
3815
3813
  }
3816
3814
  .spotpatch-context-state::before {
3817
3815
  width: 6px;
3818
3816
  height: 6px;
3819
- border-radius: 999px;
3820
- background: #f59e0b;
3817
+ border-radius: 50%;
3818
+ background: var(--spotpatch-warning);
3821
3819
  content: "";
3822
3820
  }
3821
+ .spotpatch-context-state[data-state="loading"]::before {
3822
+ animation: spotpatch-dot-breathe 1.4s ease-in-out infinite;
3823
+ }
3823
3824
  .spotpatch-context-state[data-state="ready"],
3824
- .spotpatch-editor-feedback[data-state="success"] { color: #9fe3c4; }
3825
+ .spotpatch-editor-feedback[data-state="success"] { color: var(--spotpatch-success-text); }
3825
3826
  .spotpatch-context-state[data-state="ready"]::before,
3826
- .spotpatch-editor-feedback[data-state="success"]::before { background: #34d399; }
3827
+ .spotpatch-editor-feedback[data-state="success"]::before { background: var(--spotpatch-success); }
3827
3828
  .spotpatch-context-state[data-state="warning"],
3828
- .spotpatch-editor-feedback[data-state="error"] { color: #fecaca; }
3829
+ .spotpatch-editor-feedback[data-state="error"] { color: var(--spotpatch-danger-text); }
3829
3830
  .spotpatch-context-state[data-state="warning"]::before,
3830
- .spotpatch-editor-feedback[data-state="error"]::before { background: #fb7185; }
3831
+ .spotpatch-editor-feedback[data-state="error"]::before { background: var(--spotpatch-danger); }
3832
+ @keyframes spotpatch-dot-breathe {
3833
+ 50% { opacity: .35; }
3834
+ }
3835
+
3831
3836
  .spotpatch-body {
3832
3837
  min-height: 0;
3833
3838
  overflow: auto;
3834
- padding: 0 18px 14px;
3835
- scrollbar-color: rgb(100 116 139 / 50%) transparent;
3836
- scrollbar-width: thin;
3837
- }
3838
- .spotpatch-targets {
3839
- margin: 0;
3839
+ overscroll-behavior: contain;
3840
+ padding: 0 18px 16px;
3840
3841
  }
3841
3842
  .spotpatch-targets-heading {
3842
3843
  display: flex;
@@ -3844,71 +3845,73 @@ function createStyles(document) {
3844
3845
  justify-content: space-between;
3845
3846
  gap: 10px;
3846
3847
  margin-bottom: 8px;
3847
- color: var(--spotpatch-text-secondary);
3848
+ color: var(--spotpatch-text-muted);
3848
3849
  font-size: 11px;
3849
- font-weight: 650;
3850
- letter-spacing: .04em;
3850
+ font-weight: 600;
3851
+ letter-spacing: .06em;
3851
3852
  text-transform: uppercase;
3852
3853
  }
3853
3854
  .spotpatch-targets-meta {
3854
3855
  display: flex;
3856
+ min-width: 0;
3855
3857
  align-items: center;
3856
3858
  gap: 8px;
3857
- min-width: 0;
3858
3859
  letter-spacing: 0;
3859
3860
  text-transform: none;
3860
3861
  }
3861
- .spotpatch-target-complete { color: var(--spotpatch-text-muted); font-size: 11px; font-weight: 560; }
3862
- .spotpatch-target-budget {
3863
- color: var(--spotpatch-text-muted);
3864
- font: 550 10.5px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
3865
- }
3862
+ .spotpatch-target-budget { font: 500 11px/1.4 var(--spotpatch-font-mono); }
3866
3863
  .spotpatch-target-budget[data-state="ready"] { display: none; }
3867
- .spotpatch-target-budget[data-state="over"] { color: #fda4af; }
3864
+ .spotpatch-target-budget[data-state="over"] { color: var(--spotpatch-danger-text); }
3868
3865
  .spotpatch-target-count {
3869
3866
  margin-left: auto;
3870
- border-radius: 999px;
3871
- padding: 3px 8px;
3872
3867
  color: var(--spotpatch-text-muted);
3873
- font: 600 10.5px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
3868
+ font: 500 11px/1.4 var(--spotpatch-font-mono);
3874
3869
  }
3875
3870
  .spotpatch-target-progress {
3876
- height: 3px;
3877
- margin-bottom: 13px;
3871
+ height: 2px;
3872
+ margin-bottom: 12px;
3878
3873
  overflow: hidden;
3879
- border-radius: 999px;
3874
+ border-radius: var(--spotpatch-radius-pill);
3880
3875
  background: var(--spotpatch-border-subtle);
3881
3876
  }
3882
3877
  .spotpatch-target-progress-fill {
3883
3878
  width: 0;
3884
3879
  height: 100%;
3885
3880
  border-radius: inherit;
3886
- background: linear-gradient(90deg, var(--spotpatch-accent), var(--spotpatch-accent-cyan));
3887
- transition: width 180ms ease;
3881
+ background: var(--spotpatch-brand-line);
3882
+ transition: width var(--spotpatch-duration-slow) var(--spotpatch-ease-out);
3888
3883
  }
3889
3884
  .spotpatch-target-list {
3890
3885
  display: grid;
3891
3886
  gap: 8px;
3892
3887
  max-height: min(340px, 48vh);
3893
3888
  overflow: auto;
3894
- padding-right: 2px;
3889
+ padding: 2px;
3890
+ margin: -2px;
3895
3891
  }
3892
+
3896
3893
  .spotpatch-target-item {
3897
3894
  overflow: hidden;
3898
3895
  border: 1px solid var(--spotpatch-border-subtle);
3899
3896
  border-radius: var(--spotpatch-radius-card);
3900
3897
  background: var(--spotpatch-bg-raised);
3901
- transition: border-color 150ms ease, background 150ms ease;
3898
+ transition:
3899
+ border-color var(--spotpatch-duration-base) ease,
3900
+ background var(--spotpatch-duration-base) ease,
3901
+ box-shadow var(--spotpatch-duration-base) ease;
3902
3902
  }
3903
3903
  .spotpatch-target-item[data-active="true"] {
3904
- border-color: rgb(139 123 255 / 34%);
3904
+ border-color: var(--spotpatch-accent-line);
3905
3905
  background: var(--spotpatch-bg-active);
3906
- box-shadow: 0 0 0 3px rgb(139 123 255 / 10%);
3906
+ box-shadow: 0 0 0 3px var(--spotpatch-accent-tint);
3907
+ }
3908
+ .spotpatch-target-item[data-entering="true"] {
3909
+ animation: spotpatch-enter var(--spotpatch-duration-slow) var(--spotpatch-ease-out) both;
3907
3910
  }
3908
3911
  .spotpatch-target-summary {
3909
3912
  display: grid;
3910
- grid-template-columns: minmax(0, 1fr) 28px 28px;
3911
- align-items: stretch;
3913
+ grid-template-columns: minmax(0, 1fr) 30px 30px;
3914
+ align-items: center;
3912
3915
  gap: 2px;
3913
3916
  padding: 4px;
3914
3917
  }
@@ -3916,27 +3919,31 @@ function createStyles(document) {
3916
3919
  display: grid;
3917
3920
  grid-template-columns: 24px minmax(0, 1fr) auto;
3918
3921
  align-items: center;
3919
- gap: 9px;
3922
+ gap: 10px;
3920
3923
  min-width: 0;
3921
3924
  border: 0;
3922
- border-radius: 8px;
3923
- padding: 8px;
3925
+ border-radius: var(--spotpatch-radius-sm);
3926
+ padding: 7px 8px;
3924
3927
  color: inherit;
3925
3928
  background: transparent;
3926
3929
  cursor: pointer;
3927
3930
  text-align: left;
3931
+ transition: background var(--spotpatch-duration-fast) ease;
3928
3932
  }
3929
- .spotpatch-target-select:hover { background: rgb(255 255 255 / 3.5%); }
3933
+ .spotpatch-target-select:hover { background: var(--spotpatch-hover); }
3930
3934
  .spotpatch-target-index {
3931
3935
  display: inline-grid;
3932
- width: 22px;
3933
- height: 22px;
3936
+ width: 24px;
3937
+ height: 24px;
3934
3938
  place-items: center;
3935
- border: 1px solid rgb(68 202 224 / 25%);
3936
- border-radius: 6px;
3939
+ border-radius: var(--spotpatch-radius-xs);
3937
3940
  color: var(--spotpatch-text-secondary);
3938
- background: var(--spotpatch-bg);
3939
- font: 650 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
3941
+ background: var(--spotpatch-hover);
3942
+ font: 600 11px/1 var(--spotpatch-font-mono);
3943
+ }
3944
+ [data-active="true"] .spotpatch-target-index {
3945
+ color: var(--spotpatch-text-on-accent);
3946
+ background: var(--spotpatch-accent-strong);
3940
3947
  }
3941
3948
  .spotpatch-target-copy { min-width: 0; }
3942
3949
  .spotpatch-target-name,
@@ -3946,37 +3953,49 @@ function createStyles(document) {
3946
3953
  text-overflow: ellipsis;
3947
3954
  white-space: nowrap;
3948
3955
  }
3949
- .spotpatch-target-name { color: #f2f2f5; font-size: 13px; font-weight: 650; }
3950
- .spotpatch-target-source { margin-top: 1px; color: var(--spotpatch-text-muted); font: 500 10.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
3956
+ .spotpatch-target-name { font-size: 13px; font-weight: 620; }
3957
+ .spotpatch-target-source {
3958
+ margin-top: 1px;
3959
+ color: var(--spotpatch-text-muted);
3960
+ font: 500 11px/1.4 var(--spotpatch-font-mono);
3961
+ }
3951
3962
  .spotpatch-target-state {
3952
- border-radius: 999px;
3963
+ border-radius: var(--spotpatch-radius-pill);
3953
3964
  padding: 3px 8px;
3954
- color: #a7f3d0;
3955
- background: rgb(16 185 129 / 9%);
3956
- font-size: 10.5px;
3957
- font-weight: 650;
3965
+ color: var(--spotpatch-success-text);
3966
+ background: var(--spotpatch-success-tint);
3967
+ font-size: 11px;
3968
+ font-weight: 600;
3958
3969
  white-space: nowrap;
3959
3970
  }
3960
- .spotpatch-target-state[data-complete="false"] { color: #f5c97a; background: rgb(245 158 11 / 9%); }
3971
+ .spotpatch-target-state[data-complete="false"] {
3972
+ color: var(--spotpatch-warning-text);
3973
+ background: var(--spotpatch-warning-tint);
3974
+ }
3961
3975
  .spotpatch-target-open,
3962
3976
  .spotpatch-target-remove {
3963
3977
  display: inline-grid;
3964
- width: 28px;
3965
- height: 100%;
3966
- min-height: 34px;
3967
- padding: 0;
3978
+ width: 30px;
3979
+ height: 30px;
3968
3980
  place-items: center;
3969
- border: 1px solid transparent;
3970
- border-radius: 7px;
3971
- color: #7f899a;
3981
+ border: 0;
3982
+ border-radius: var(--spotpatch-radius-sm);
3983
+ padding: 0;
3984
+ color: var(--spotpatch-text-muted);
3972
3985
  background: transparent;
3973
3986
  cursor: pointer;
3974
- }
3975
- .spotpatch-target-open { color: #79d9e7; }
3976
- .spotpatch-target-open:hover:not(:disabled) { border-color: rgb(68 202 224 / 30%); color: #c8f7ff; background: rgb(8 145 178 / 11%); }
3977
- .spotpatch-target-remove:hover:not(:disabled) { border-color: rgb(251 113 133 / 24%); color: #fda4af; background: rgb(127 29 29 / 12%); }
3987
+ transition:
3988
+ color var(--spotpatch-duration-fast) ease,
3989
+ background var(--spotpatch-duration-fast) ease;
3990
+ }
3991
+ .spotpatch-target-open:hover:not(:disabled) { color: var(--spotpatch-cyan-text); background: var(--spotpatch-cyan-tint); }
3992
+ .spotpatch-target-remove:hover:not(:disabled) { color: var(--spotpatch-danger-text); background: var(--spotpatch-danger-tint); }
3993
+ .spotpatch-target-open:disabled,
3994
+ .spotpatch-target-remove:disabled { cursor: not-allowed; opacity: .35; }
3995
+
3978
3996
  .spotpatch-target-editor {
3979
- padding: 0 12px 12px;
3997
+ display: block;
3998
+ padding: 2px 12px 12px;
3980
3999
  }
3981
4000
  .spotpatch-target-editor-head {
3982
4001
  display: flex;
@@ -3985,179 +4004,178 @@ function createStyles(document) {
3985
4004
  gap: 12px;
3986
4005
  margin-bottom: 6px;
3987
4006
  }
3988
- .spotpatch-target-editor-label { color: var(--spotpatch-text-secondary); font-size: 11px; font-weight: 650; }
3989
- .spotpatch-target-editor-count { color: var(--spotpatch-text-muted); font: 500 10.5px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
4007
+ .spotpatch-target-editor-label { color: var(--spotpatch-text-secondary); font-size: 11.5px; font-weight: 600; }
4008
+ .spotpatch-target-editor-count { color: var(--spotpatch-text-muted); font: 500 11px/1.3 var(--spotpatch-font-mono); }
3990
4009
  .spotpatch-target-editor textarea {
4010
+ display: block;
3991
4011
  box-sizing: border-box;
3992
4012
  width: 100%;
3993
- min-height: 74px;
4013
+ min-height: 76px;
3994
4014
  resize: vertical;
3995
4015
  border: 1px solid var(--spotpatch-border);
3996
- border-radius: 7px;
3997
- padding: 9px 10px;
3998
- color: #f8fafc;
3999
- caret-color: #8b7cf7;
4016
+ border-radius: var(--spotpatch-radius-md);
4017
+ padding: 10px 12px;
4018
+ color: var(--spotpatch-text);
4019
+ caret-color: var(--spotpatch-accent-soft);
4000
4020
  background: var(--spotpatch-bg-input);
4001
- font-size: 12.5px;
4021
+ font-size: 13px;
4002
4022
  line-height: 1.55;
4003
4023
  outline: none;
4004
- transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
4024
+ transition:
4025
+ border-color var(--spotpatch-duration-fast) ease,
4026
+ box-shadow var(--spotpatch-duration-fast) ease;
4005
4027
  }
4006
- .spotpatch-target-editor textarea::placeholder { color: #687284; }
4007
- .spotpatch-target-editor textarea:hover { border-color: rgb(139 124 247 / 34%); }
4028
+ .spotpatch-target-editor textarea::placeholder { color: var(--spotpatch-text-muted); }
4029
+ .spotpatch-target-editor textarea:hover { border-color: var(--spotpatch-border-strong); }
4008
4030
  .spotpatch-target-editor textarea:focus {
4009
- border-color: rgb(139 124 247 / 68%);
4010
- background: rgb(3 7 18 / 65%);
4011
- box-shadow: 0 0 0 2px rgb(109 93 246 / 10%);
4031
+ border-color: var(--spotpatch-accent-line);
4032
+ box-shadow: 0 0 0 3px var(--spotpatch-accent-tint);
4012
4033
  }
4034
+
4013
4035
  .spotpatch-diagnostics {
4014
4036
  margin-top: 10px;
4015
4037
  overflow: hidden;
4016
- border: 1px solid rgb(255 255 255 / 8%);
4017
- border-radius: 9px;
4018
- background: rgb(255 255 255 / 2.5%);
4038
+ border: 1px solid var(--spotpatch-border-subtle);
4039
+ border-radius: var(--spotpatch-radius-md);
4019
4040
  }
4020
4041
  .spotpatch-diagnostics > summary {
4021
4042
  display: flex;
4022
4043
  align-items: center;
4023
4044
  gap: 8px;
4024
- padding: 9px 11px;
4025
- color: #bfc5d0;
4045
+ padding: 9px 12px;
4046
+ color: var(--spotpatch-text-secondary);
4026
4047
  cursor: pointer;
4027
- font-size: 11px;
4028
- font-weight: 650;
4048
+ font-size: 11.5px;
4049
+ font-weight: 600;
4029
4050
  list-style: none;
4030
4051
  user-select: none;
4031
4052
  }
4032
4053
  .spotpatch-diagnostics > summary::-webkit-details-marker { display: none; }
4033
4054
  .spotpatch-diagnostics > summary::before {
4034
- color: #778193;
4055
+ color: var(--spotpatch-text-muted);
4035
4056
  content: "›";
4036
4057
  font-size: 16px;
4037
4058
  line-height: 1;
4038
- transform: rotate(0deg);
4039
- transition: transform 150ms ease;
4059
+ transition: transform var(--spotpatch-duration-base) var(--spotpatch-ease-out);
4040
4060
  }
4041
4061
  .spotpatch-diagnostics[open] > summary::before { transform: rotate(90deg); }
4042
4062
  .spotpatch-source-peek {
4043
4063
  min-width: 0;
4044
- overflow: hidden;
4045
4064
  margin-left: auto;
4046
- color: #64748b;
4047
- font: 500 10.5px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
4065
+ overflow: hidden;
4066
+ color: var(--spotpatch-text-muted);
4067
+ font: 500 11px/1.3 var(--spotpatch-font-mono);
4048
4068
  text-overflow: ellipsis;
4049
4069
  white-space: nowrap;
4050
4070
  }
4051
- .spotpatch-summary {
4052
- max-height: 170px;
4071
+ .spotpatch-summary,
4072
+ .spotpatch-prompt {
4053
4073
  margin: 0;
4054
4074
  overflow: auto;
4055
- border-top: 1px solid rgb(255 255 255 / 7%);
4056
- padding: 10px 11px 11px;
4057
- color: #9ca5b5;
4058
- font: 10.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
4059
4075
  overflow-wrap: anywhere;
4060
4076
  white-space: pre-wrap;
4061
4077
  user-select: text;
4078
+ font: 11px/1.6 var(--spotpatch-font-mono);
4079
+ }
4080
+ .spotpatch-summary {
4081
+ max-height: 170px;
4082
+ border-top: 1px solid var(--spotpatch-border-subtle);
4083
+ padding: 10px 12px 12px;
4084
+ color: var(--spotpatch-text-secondary);
4062
4085
  }
4063
4086
  .spotpatch-prompt {
4064
4087
  max-height: min(500px, 60vh);
4065
- margin: 0;
4066
- overflow: auto;
4067
- border: 1px solid rgb(255 255 255 / 9%);
4068
- border-radius: 9px;
4069
- padding: 11px;
4070
- color: #d8ddeb;
4071
- background: rgb(3 7 18 / 55%);
4072
- font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
4073
- overflow-wrap: anywhere;
4074
- white-space: pre-wrap;
4075
- user-select: text;
4088
+ border: 1px solid var(--spotpatch-border-subtle);
4089
+ border-radius: var(--spotpatch-radius-md);
4090
+ padding: 12px;
4091
+ color: var(--spotpatch-text);
4092
+ background: var(--spotpatch-bg-input);
4076
4093
  }
4094
+
4077
4095
  .spotpatch-actions {
4078
4096
  display: grid;
4079
4097
  gap: 8px;
4080
- padding: 10px 18px 14px;
4081
- border-top: 1px solid rgb(255 255 255 / 8%);
4082
- background: rgb(8 8 12 / 86%);
4083
- }
4084
- .spotpatch-editor-feedback {
4085
- white-space: normal;
4098
+ border-top: 1px solid var(--spotpatch-border-subtle);
4099
+ padding: 12px 18px 16px;
4086
4100
  }
4101
+ .spotpatch-editor-feedback { white-space: normal; }
4087
4102
  .spotpatch-secondary-actions,
4088
- .spotpatch-primary-actions {
4089
- display: flex;
4090
- align-items: center;
4091
- gap: 7px;
4092
- }
4093
- .spotpatch-secondary-actions { min-height: 30px; }
4103
+ .spotpatch-primary-actions { display: flex; align-items: center; gap: 8px; }
4104
+ .spotpatch-secondary-actions { gap: 2px; margin: 0 -8px; }
4094
4105
  .spotpatch-actions button {
4095
4106
  display: inline-flex;
4096
- min-height: 34px;
4107
+ min-height: 36px;
4097
4108
  align-items: center;
4098
4109
  justify-content: center;
4099
- border: 1px solid rgb(255 255 255 / 10%);
4100
- border-radius: 9px;
4101
- padding: 7px 11px;
4102
- color: var(--spotpatch-text-secondary);
4103
- background: rgb(255 255 255 / 4%);
4110
+ gap: 6px;
4111
+ border: 1px solid var(--spotpatch-border);
4112
+ border-radius: var(--spotpatch-radius-md);
4113
+ padding: 0 12px;
4114
+ color: var(--spotpatch-text);
4115
+ background: var(--spotpatch-bg-raised);
4104
4116
  cursor: pointer;
4105
- font-size: 12px;
4106
- font-weight: 650;
4107
- transition: border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
4117
+ font-size: 12.5px;
4118
+ font-weight: 600;
4119
+ white-space: nowrap;
4120
+ transition:
4121
+ border-color var(--spotpatch-duration-fast) ease,
4122
+ background var(--spotpatch-duration-fast) ease,
4123
+ box-shadow var(--spotpatch-duration-base) ease,
4124
+ transform var(--spotpatch-duration-fast) ease;
4108
4125
  }
4109
4126
  .spotpatch-actions button:hover:not(:disabled) {
4110
- border-color: rgb(139 124 247 / 45%);
4111
- color: #fff;
4112
- transform: translateY(-1px);
4127
+ border-color: var(--spotpatch-border-strong);
4128
+ background: var(--spotpatch-bg-active);
4113
4129
  }
4130
+ .spotpatch-actions button:active:not(:disabled) { transform: scale(.98); }
4114
4131
  .spotpatch-actions .spotpatch-primary {
4115
- min-width: 138px;
4132
+ min-width: 140px;
4116
4133
  flex: 1;
4117
4134
  border-color: transparent;
4118
4135
  color: var(--spotpatch-text-on-accent);
4119
- background: linear-gradient(135deg, var(--spotpatch-accent), var(--spotpatch-accent-strong));
4120
- box-shadow: 0 8px 20px -8px rgb(139 123 255 / 55%);
4136
+ background: var(--spotpatch-primary-fill);
4137
+ box-shadow: var(--spotpatch-shadow-accent), var(--spotpatch-shadow-inset);
4138
+ }
4139
+ .spotpatch-actions .spotpatch-primary:hover:not(:disabled) {
4140
+ border-color: transparent;
4141
+ background: var(--spotpatch-primary-fill);
4142
+ filter: brightness(1.1);
4121
4143
  }
4122
- .spotpatch-actions .spotpatch-primary:hover:not(:disabled) { color: var(--spotpatch-text-on-accent); filter: brightness(1.08); }
4123
- .spotpatch-actions .spotpatch-primary::after { margin-left: 8px; content: "↗"; font-size: 12px; }
4144
+ .spotpatch-actions .spotpatch-primary::after { content: "↗"; font-size: 12px; opacity: .8; }
4124
4145
  .spotpatch-actions .spotpatch-secondary-action {
4125
4146
  min-height: 30px;
4126
- border-style: dashed;
4127
- padding: 5px 10px;
4128
- color: var(--spotpatch-text-muted);
4147
+ border-color: transparent;
4148
+ padding: 0 8px;
4149
+ color: var(--spotpatch-text-secondary);
4129
4150
  background: transparent;
4130
- font-size: 11px;
4151
+ font-size: 12px;
4152
+ font-weight: 550;
4153
+ }
4154
+ .spotpatch-actions .spotpatch-secondary-action:hover:not(:disabled) {
4155
+ border-color: transparent;
4156
+ color: var(--spotpatch-text);
4157
+ background: var(--spotpatch-hover);
4131
4158
  }
4132
4159
  .spotpatch-actions .spotpatch-icon-action {
4133
- width: 34px;
4134
- min-width: 34px;
4160
+ width: 36px;
4161
+ min-width: 36px;
4135
4162
  padding: 0;
4136
4163
  font-size: 0;
4137
4164
  }
4138
4165
  .spotpatch-actions .spotpatch-icon-action::before {
4139
4166
  color: var(--spotpatch-text-secondary);
4140
4167
  content: attr(data-compact-icon);
4141
- font-size: 18px;
4168
+ font-size: 17px;
4142
4169
  font-weight: 400;
4143
4170
  line-height: 1;
4144
4171
  }
4145
- .spotpatch-actions button:disabled { cursor: not-allowed; opacity: .4; transform: none; }
4146
- .spotpatch-actions button:focus-visible,
4147
- .spotpatch-repository:focus-visible,
4148
- .spotpatch-target-open:focus-visible,
4149
- .spotpatch-target-remove:focus-visible,
4150
- .spotpatch-close:focus-visible,
4151
- .spotpatch-reset-position:focus-visible,
4152
- .spotpatch-trigger:focus-visible,
4153
- .spotpatch-target-select:focus-visible,
4154
- .spotpatch-target-editor textarea:focus-visible,
4155
- .spotpatch-locale:focus-visible,
4156
- .spotpatch-prompt:focus-visible,
4157
- .spotpatch-diagnostics > summary:focus-visible {
4158
- outline: 2px solid #8b7cf7;
4159
- outline-offset: 2px;
4172
+ .spotpatch-actions button:disabled {
4173
+ box-shadow: none;
4174
+ cursor: not-allowed;
4175
+ filter: none;
4176
+ opacity: .4;
4160
4177
  }
4178
+
4161
4179
  .spotpatch-live {
4162
4180
  position: absolute;
4163
4181
  width: 1px;
@@ -4167,16 +4185,11 @@ function createStyles(document) {
4167
4185
  clip-path: inset(50%);
4168
4186
  white-space: nowrap;
4169
4187
  }
4170
- @media (prefers-reduced-motion: reduce) {
4171
- .spotpatch-trigger,
4172
- .spotpatch-actions button,
4173
- .spotpatch-diagnostics > summary::before { transition: none; }
4174
- }
4175
4188
  @media (max-width: 520px) {
4176
4189
  .spotpatch-dialog { width: calc(100vw - 16px); }
4177
4190
  .spotpatch-shell { max-height: calc(100dvh - 16px); }
4178
- .spotpatch-header, .spotpatch-body { padding-left: 14px; padding-right: 14px; }
4179
- .spotpatch-brand-row { margin-right: -14px; margin-left: -14px; padding-right: 14px; padding-left: 14px; }
4191
+ .spotpatch-header, .spotpatch-body { padding-right: 14px; padding-left: 14px; }
4192
+ .spotpatch-brand-row { margin-right: -14px; margin-left: -14px; padding-right: 10px; padding-left: 14px; }
4180
4193
  .spotpatch-actions { padding-right: 14px; padding-left: 14px; }
4181
4194
  .spotpatch-target-select { grid-template-columns: 24px minmax(0, 1fr); }
4182
4195
  .spotpatch-target-state { display: none; }
@@ -4186,6 +4199,19 @@ function createStyles(document) {
4186
4199
  `;
4187
4200
  return style;
4188
4201
  }
4202
+ function createResetPositionIcon(document) {
4203
+ const namespace = "http://www.w3.org/2000/svg";
4204
+ const icon = document.createElementNS(namespace, "svg");
4205
+ icon.setAttribute("viewBox", "0 0 16 16");
4206
+ icon.setAttribute("aria-hidden", "true");
4207
+ const path = document.createElementNS(namespace, "path");
4208
+ path.setAttribute(
4209
+ "d",
4210
+ "M8 1.5v3M8 11.5v3M1.5 8h3M11.5 8h3M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
4211
+ );
4212
+ icon.append(path);
4213
+ return icon;
4214
+ }
4189
4215
  function summaryLine(summary, prefix) {
4190
4216
  const line = summary.split("\n").find((candidate) => candidate.startsWith(`${prefix}: `));
4191
4217
  return line?.slice(prefix.length + 2).trim();
@@ -4316,7 +4342,8 @@ function createRuntimeView(document, shortcut, ai = Object.freeze({ enabled: fal
4316
4342
  repositoryLink.target = "_blank";
4317
4343
  repositoryLink.rel = "noopener noreferrer";
4318
4344
  const localeButton = createButton(document, "", "spotpatch-locale");
4319
- const resetPositionButton = createButton(document, "⌖", "spotpatch-reset-position");
4345
+ const resetPositionButton = createButton(document, "", "spotpatch-reset-position");
4346
+ resetPositionButton.append(createResetPositionIcon(document));
4320
4347
  const closeButton = createButton(document, "×", "spotpatch-close");
4321
4348
  headerControls.append(repositoryLink, localeButton, resetPositionButton, closeButton);
4322
4349
  brandRow.append(brand, headerControls);
@@ -4543,6 +4570,8 @@ function createRuntimeView(document, shortcut, ai = Object.freeze({ enabled: fal
4543
4570
  let editingEnabled = true;
4544
4571
  let currentTargets = [];
4545
4572
  let currentMaximum = 0;
4573
+ let renderedTargetIds = /* @__PURE__ */ new Set();
4574
+ let renderedHighlightIds = /* @__PURE__ */ new Set();
4546
4575
  let currentEditorFeedbackState = "idle";
4547
4576
  let currentDataFlowState = Object.freeze({
4548
4577
  component: Object.freeze({
@@ -4847,6 +4876,8 @@ function createRuntimeView(document, shortcut, ai = Object.freeze({ enabled: fal
4847
4876
  const selectionEnd = focusedInstruction?.selectionEnd;
4848
4877
  currentTargets = targets.map((target2) => Object.freeze({ ...target2 }));
4849
4878
  currentMaximum = maximum;
4879
+ const previousTargetIds = renderedTargetIds;
4880
+ renderedTargetIds = new Set(targets.map((target2) => target2.id));
4850
4881
  targetList.replaceChildren();
4851
4882
  const completeCount = targets.filter(
4852
4883
  (target2) => target2.instruction.trim().length > 0
@@ -4879,6 +4910,7 @@ function createRuntimeView(document, shortcut, ai = Object.freeze({ enabled: fal
4879
4910
  item.dataset.active = String(target2.active);
4880
4911
  item.dataset.status = target2.status;
4881
4912
  item.dataset.targetId = target2.id;
4913
+ item.dataset.entering = String(!previousTargetIds.has(target2.id));
4882
4914
  const targetSummary = createMarkedElement(document, "div");
4883
4915
  targetSummary.className = "spotpatch-target-summary";
4884
4916
  const select = createButton(document, "", "spotpatch-target-select");
@@ -5001,11 +5033,14 @@ function createRuntimeView(document, shortcut, ai = Object.freeze({ enabled: fal
5001
5033
  );
5002
5034
  }
5003
5035
  function showSelectionHighlights(targets) {
5036
+ const previousHighlightIds = renderedHighlightIds;
5037
+ renderedHighlightIds = new Set(targets.map((target2) => target2.id));
5004
5038
  selectionHighlights.replaceChildren();
5005
5039
  for (const [index, target2] of targets.entries()) {
5006
5040
  const box = createMarkedElement(document, "div");
5007
5041
  box.className = "spotpatch-selection-highlight";
5008
5042
  box.dataset.targetId = target2.id;
5043
+ box.dataset.entering = String(!previousHighlightIds.has(target2.id));
5009
5044
  box.dataset.active = String(target2.active);
5010
5045
  box.style.transform = `translate(${String(target2.rect.x)}px, ${String(target2.rect.y)}px)`;
5011
5046
  box.style.width = `${String(target2.rect.width)}px`;