streamembed 0.3.1__tar.gz → 0.3.2__tar.gz

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.
Files changed (49) hide show
  1. {streamembed-0.3.1 → streamembed-0.3.2}/PKG-INFO +1 -1
  2. {streamembed-0.3.1 → streamembed-0.3.2}/pyproject.toml +1 -1
  3. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/__init__.py +1 -1
  4. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/static/results.html +144 -79
  5. {streamembed-0.3.1 → streamembed-0.3.2}/.gitignore +0 -0
  6. {streamembed-0.3.1 → streamembed-0.3.2}/.hgignore +0 -0
  7. {streamembed-0.3.1 → streamembed-0.3.2}/LICENSE +0 -0
  8. {streamembed-0.3.1 → streamembed-0.3.2}/NOTICE +0 -0
  9. {streamembed-0.3.1 → streamembed-0.3.2}/PYPI.md +0 -0
  10. {streamembed-0.3.1 → streamembed-0.3.2}/README.md +0 -0
  11. {streamembed-0.3.1 → streamembed-0.3.2}/docs/reference.md +0 -0
  12. {streamembed-0.3.1 → streamembed-0.3.2}/examples/main.py +0 -0
  13. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/__main__.py +0 -0
  14. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/ann.py +0 -0
  15. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/api.py +0 -0
  16. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/capture.py +0 -0
  17. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/cli.py +0 -0
  18. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/config.py +0 -0
  19. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/defaults.toml +0 -0
  20. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/encoder.py +0 -0
  21. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/engine/__init__.py +0 -0
  22. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/engine/config.py +0 -0
  23. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/engine/engine.py +0 -0
  24. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/engine/llm.py +0 -0
  25. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/engine/macs.py +0 -0
  26. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/engine/model.py +0 -0
  27. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/engine/pause.py +0 -0
  28. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/engine/qwen_embedder.py +0 -0
  29. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/engine/spatial.py +0 -0
  30. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/engine/temporal.py +0 -0
  31. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/engine/vit.py +0 -0
  32. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/gate.py +0 -0
  33. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/index.py +0 -0
  34. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/models.py +0 -0
  35. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/queryserver.py +0 -0
  36. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/service.py +0 -0
  37. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/visualize.py +0 -0
  38. {streamembed-0.3.1 → streamembed-0.3.2}/src/streamembed/webui.py +0 -0
  39. {streamembed-0.3.1 → streamembed-0.3.2}/tests/conftest.py +0 -0
  40. {streamembed-0.3.1 → streamembed-0.3.2}/tests/test_api.py +0 -0
  41. {streamembed-0.3.1 → streamembed-0.3.2}/tests/test_config.py +0 -0
  42. {streamembed-0.3.1 → streamembed-0.3.2}/tests/test_defer.py +0 -0
  43. {streamembed-0.3.1 → streamembed-0.3.2}/tests/test_encoder_order.py +0 -0
  44. {streamembed-0.3.1 → streamembed-0.3.2}/tests/test_front.py +0 -0
  45. {streamembed-0.3.1 → streamembed-0.3.2}/tests/test_idle.py +0 -0
  46. {streamembed-0.3.1 → streamembed-0.3.2}/tests/test_models.py +0 -0
  47. {streamembed-0.3.1 → streamembed-0.3.2}/tests/test_pause.py +0 -0
  48. {streamembed-0.3.1 → streamembed-0.3.2}/tests/test_prune.py +0 -0
  49. {streamembed-0.3.1 → streamembed-0.3.2}/tests/test_search_wait.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: streamembed
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Search your own screen history by describing what you saw, from screenshots, on your machine
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "streamembed"
3
- version = "0.3.1"
3
+ version = "0.3.2"
4
4
  description = "Search your own screen history by describing what you saw, from screenshots, on your machine"
5
5
  readme = "PYPI.md"
6
6
  license = "Apache-2.0"
@@ -4,7 +4,7 @@ from .api import (Capture, Result, Results, available_index_types, available_mod
4
4
  from .config import get_config, reset_config, set_config
5
5
  from .service import install_service, service_status, uninstall_service
6
6
 
7
- __version__ = "0.3.1"
7
+ __version__ = "0.3.2"
8
8
  __all__ = ["Capture", "Result", "Results", "available_index_types", "available_models", "build_index_from_directory", "build_index_from_now", "configure", "query_index",
9
9
  "visualize_results", "install_service", "service_status", "uninstall_service", "pause", "resume", "is_paused",
10
10
  "get_config", "set_config", "reset_config"]
@@ -5,68 +5,130 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title>__TITLE__</title>
7
7
  <link rel="icon" href="data:,">
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap">
8
11
  <style>
9
- :root { color-scheme: light dark; --bg: #fbfbfa; --fg: #1d1d1b; --muted: #6b6b66; --line: #deded9; --card: #fff; }
10
- @media (prefers-color-scheme: dark) { :root { --bg: #171716; --fg: #ececea; --muted: #a0a09a; --line: #33332f; --card: #20201e; } }
12
+ :root {
13
+ color-scheme: light dark;
14
+ --bg: #f6f5f2; --bar: #fdfcfa; --fg: #1c1c1a; --muted: #6d6c66; --faint: #9a998f; --line: #e3e1db; --line-strong: #cfccc4;
15
+ --card: #ffffff; --well: #ecebe6; --accent: #2b59c3; --accent-fg: #ffffff; --accent-soft: #e7edfb;
16
+ --shadow: 0 1px 2px rgb(28 28 26 / 6%), 0 4px 14px rgb(28 28 26 / 6%);
17
+ --shadow-up: 0 2px 4px rgb(28 28 26 / 8%), 0 12px 32px rgb(28 28 26 / 12%);
18
+ --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236d6c66' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
19
+ --radius: 10px;
20
+ }
21
+ @media (prefers-color-scheme: dark) {
22
+ :root {
23
+ --bg: #141413; --bar: #1a1a19; --fg: #ecebe7; --muted: #a3a29b; --faint: #77766f; --line: #2c2c29; --line-strong: #3d3d39;
24
+ --card: #1f1f1d; --well: #262624; --accent: #8fb0f7; --accent-fg: #10131a; --accent-soft: #1e2638;
25
+ --shadow: 0 1px 2px rgb(0 0 0 / 30%); --shadow-up: 0 2px 6px rgb(0 0 0 / 40%), 0 14px 36px rgb(0 0 0 / 45%);
26
+ --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a3a29b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
27
+ }
28
+ }
11
29
  * { box-sizing: border-box; }
12
- body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.45 Lato, -apple-system, "Segoe UI", sans-serif; }
13
- header { border-bottom: 1px solid var(--line); padding: 14px 16px; }
14
- header > div { max-width: 1200px; margin: 0 auto; }
15
- .top { display: flex; align-items: flex-start; gap: 12px; }
16
- .top .titles { flex: 1; min-width: 0; }
17
- #q { font-weight: 700; overflow-wrap: anywhere; }
18
- #sub { color: var(--muted); font-size: 13px; }
19
- #lang { font: inherit; font-size: 13px; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; }
20
- #search { display: flex; gap: 8px; margin-bottom: 10px; }
21
- #qbox { flex: 1; min-width: 0; font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; }
22
- #go { font: inherit; color: var(--bg); background: var(--fg); border: 1px solid var(--fg); border-radius: 6px; padding: 7px 14px; cursor: pointer; }
23
- #go:disabled { opacity: .6; cursor: default; }
24
- main { max-width: 1200px; margin: 0 auto; padding: 16px; }
25
- #grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
26
- figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; cursor: zoom-in; }
27
- figure:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
28
- figure img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
29
- figcaption { padding: 8px 10px; font-size: 13px; }
30
- figcaption .when { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
31
- .where { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
32
- #empty { color: var(--muted); }
33
- #dates { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: 13px; color: var(--muted); }
34
- #dates button, #more { font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; }
35
- #dates button { cursor: pointer; }
36
- #dates button[aria-pressed="true"] { border-color: var(--fg); font-weight: 700; }
30
+ body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
31
+ button, input, select { font: inherit; color: inherit; }
32
+ :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
33
+
34
+ /* ---- header: the name, the search box and the language on one line; the question; then the filters */
35
+ header { background: var(--bar); border-bottom: 1px solid var(--line); }
36
+ header > div { max-width: 1320px; margin: 0 auto; padding: 14px 24px 16px; }
37
+ .bar { display: flex; align-items: center; gap: 16px; }
38
+ .brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 15px; white-space: nowrap; }
39
+ .brand svg { display: block; color: var(--accent); }
40
+ .bar .space { flex: 1; }
41
+ #search:not([hidden]) + .space { display: none; }
42
+ #search { flex: 1; display: flex; gap: 8px; max-width: 720px; margin: 0 auto; }
43
+ .qwrap { position: relative; flex: 1; min-width: 0; }
44
+ .qwrap svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
45
+ #qbox { width: 100%; height: 44px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 18px 0 42px; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
46
+ #qbox::placeholder { color: var(--faint); }
47
+ #qbox:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
48
+ #go { height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-weight: 700; cursor: pointer; transition: filter .15s; }
49
+ #go:hover { filter: brightness(1.08); }
50
+ #go:disabled { opacity: .6; cursor: progress; }
51
+ select { appearance: none; -webkit-appearance: none; background: var(--card) var(--chev) no-repeat right 11px center; border: 1px solid var(--line); border-radius: 8px; padding: 5px 30px 5px 11px; font-size: 13px; cursor: pointer; }
52
+ select:hover { border-color: var(--line-strong); }
53
+ .head { margin-top: 18px; }
54
+ #q { font-size: 26px; font-weight: 900; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
55
+ #q:empty { display: none; }
56
+ #sub { color: var(--muted); font-size: 14px; margin-top: 2px; font-variant-numeric: tabular-nums; }
57
+ #q:empty + #sub { font-size: 17px; color: var(--fg); margin-top: 6px; }
58
+ #dates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; }
59
+ #dates button, #more { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
60
+ #dates button:hover, #more:hover { border-color: var(--line-strong); }
61
+ #dates button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
37
62
  #chips { display: contents; }
38
- #chips button.extra { display: none; }
39
- #chips.all button.extra { display: inline-block; }
40
- #more { display: block; margin: 16px auto 0; cursor: pointer; }
41
- #tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: var(--muted); }
42
- #tools label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
43
- #range { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
44
- #tools select { font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; }
63
+ #tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-top: 12px; font-size: 13px; color: var(--muted); }
64
+ #tools label { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
65
+ #range { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
66
+ #tools select { color: var(--fg); }
67
+
68
+ /* ---- the grid of matches: the best one gets a row of its own */
69
+ main { max-width: 1320px; margin: 0 auto; padding: 24px; }
70
+ #empty { color: var(--muted); font-size: 16px; text-align: center; padding: 48px 0; margin: 0; }
71
+ #grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; transition: opacity .2s; }
72
+ body:has(#go:disabled) #grid { opacity: .45; }
73
+ figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s, border-color .2s; }
74
+ figure:hover { box-shadow: var(--shadow-up); transform: translateY(-2px); border-color: var(--line-strong); }
75
+ .pic { position: relative; overflow: hidden; background: var(--well); }
76
+ .pic img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
77
+ figure:hover .pic img { transform: scale(1.045); }
78
+ /* a hint that a card opens the viewer, with the screens before and after it */
79
+ .more { position: absolute; right: 10px; bottom: 10px; padding: 5px 12px; border-radius: 999px; background: rgb(20 20 19 / 78%); color: #fff; font-size: 12px; font-weight: 700; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; pointer-events: none; }
80
+ figure:hover .more, figure:focus-visible .more { opacity: 1; transform: none; }
81
+ @media (hover: none) { .more { opacity: 1; transform: none; } }
82
+ figcaption { padding: 11px 14px 13px; font-size: 13px; min-width: 0; }
83
+ figcaption .when { display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; }
84
+ .when .time { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
85
+ .when .day { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
86
+ .where { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
87
+ #more { display: block; margin: 32px auto 8px; padding: 9px 22px; font-size: 14px; font-weight: 700; }
45
88
 
46
- #viewer { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: #121211; color: #ececea; }
47
- #viewer::backdrop { background: #121211; }
48
- #viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
49
- .vtop { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #2c2c29; min-width: 0; }
89
+ /* ---- the viewer: one screenshot large, the frames around it below */
90
+ #viewer { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: #0f0f0e; color: #ecebe7; }
91
+ #viewer::backdrop { background: #0f0f0e; }
92
+ #viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: fade .18s ease-out; }
93
+ @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
94
+ .vtop { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #262624; min-width: 0; }
50
95
  .vtop .meta { flex: 1; min-width: 0; }
51
- .vtop .when { font-weight: 700; }
52
- .vtop .where { color: #a0a09a; }
53
- .vtop a, .vtop button { color: inherit; background: #20201e; text-decoration: none; padding: 6px 10px; border: 1px solid #3a3a36; border-radius: 6px; font: inherit; font-size: 14px; white-space: nowrap; cursor: pointer; }
54
- .stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 12px 56px; min-height: 0; }
55
- .stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
56
- .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 64px; padding: 0; border: 1px solid #3a3a36; border-radius: 6px; background: rgb(32 32 30 / 80%); color: #ececea; font-size: 22px; cursor: pointer; }
57
- .nav:disabled { opacity: .3; cursor: default; }
58
- .nav.prev { left: 8px; } .nav.next { right: 8px; }
59
- .strip { display: flex; align-items: flex-end; gap: 8px; overflow-x: auto; padding: 10px 16px 14px; border-top: 1px solid #2c2c29; scrollbar-width: thin; }
60
- .tick { flex: 0 0 auto; width: 152px; padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; color: #a0a09a; text-align: left; cursor: pointer; font: inherit; }
61
- .tick img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 4px; background: #20201e; }
62
- .tick span { display: block; font-size: 12px; padding: 3px 2px 0; }
63
- .tick.active { border-color: #ececea; color: #ececea; }
64
- .tick.hit span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #7aa7f5; margin-right: 5px; vertical-align: 1px; }
65
- .gap { flex: 0 0 auto; align-self: stretch; display: flex; align-items: center; color: #8a8a84; font-size: 12px; border-left: 1px dashed #3a3a36; padding-left: 8px; }
96
+ .vtop .when { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
97
+ .vtop .where { color: #9d9c95; font-size: 13px; }
98
+ #vcount { color: #9d9c95; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
99
+ .vtop a, .vtop button { color: inherit; background: #1f1f1d; text-decoration: none; padding: 7px 14px; border: 1px solid #353532; border-radius: 999px; font-size: 13px; white-space: nowrap; cursor: pointer; transition: background .15s; }
100
+ .vtop a:hover, .vtop button:hover { background: #2a2a28; }
101
+ .stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 20px 72px; min-height: 0; }
102
+ .stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; border-radius: 6px; box-shadow: 0 10px 40px rgb(0 0 0 / 50%); }
103
+ .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 0; border: 1px solid #353532; border-radius: 50%; background: rgb(31 31 29 / 85%); color: #ecebe7; font-size: 24px; line-height: 1; cursor: pointer; transition: background .15s; }
104
+ .nav:hover:not(:disabled) { background: #2f2f2c; }
105
+ .nav:disabled { opacity: .25; cursor: default; }
106
+ .nav.prev { left: 16px; } .nav.next { right: 16px; }
107
+ .strip { display: flex; align-items: flex-end; gap: 10px; overflow-x: auto; padding: 12px 20px 16px; border-top: 1px solid #262624; scrollbar-width: thin; scrollbar-color: #3a3a37 transparent; }
108
+ .tick { flex: 0 0 auto; width: 148px; padding: 4px 4px 0; border: 0; background: none; color: #8b8a84; text-align: left; cursor: pointer; opacity: .7; transition: opacity .15s; }
109
+ .tick:hover { opacity: 1; }
110
+ .tick img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 6px; background: #1f1f1d; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
111
+ .tick span { display: block; font-size: 12px; padding: 6px 2px 0; font-variant-numeric: tabular-nums; }
112
+ .tick.active { opacity: 1; color: #ecebe7; }
113
+ .tick.active img { outline-color: #ecebe7; }
114
+ .tick.hit span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #8fb0f7; margin-right: 6px; vertical-align: 1px; }
115
+ .gap { flex: 0 0 auto; align-self: stretch; display: flex; align-items: center; color: #7d7c76; font-size: 12px; border-left: 1px dashed #3a3a37; padding-left: 10px; white-space: nowrap; }
66
116
  html, body { overflow-x: hidden; }
67
117
  [hidden] { display: none !important; }
118
+ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
119
+ @media (max-width: 760px) {
120
+ }
68
121
  @media (max-width: 640px) {
69
- .stage { padding: 8px; } .nav { display: none; } .tick { width: 112px; }
122
+ header > div { padding: 12px 16px 14px; }
123
+ .bar { flex-wrap: wrap; gap: 10px 12px; }
124
+ .bar .space { display: block !important; }
125
+ #search { order: 3; flex: 1 0 100%; }
126
+ #go { padding: 0 16px; }
127
+ #q { font-size: 21px; }
128
+ main { padding: 16px; }
129
+ #grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
130
+ .vtop { padding: 10px 14px; flex-wrap: wrap; } .vtop .meta { flex: 1 0 100%; }
131
+ .stage { padding: 8px; } .nav { display: none; } .tick { width: 108px; }
70
132
  /* the date chips get a row of their own, above From and To, that scrolls sideways */
71
133
  #chips { display: flex; order: -1; flex: 1 0 100%; min-width: 0; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; position: relative; }
72
134
  #dates button { flex: 0 0 auto; white-space: nowrap; }
@@ -75,17 +137,18 @@ html, body { overflow-x: hidden; }
75
137
  </head>
76
138
  <body>
77
139
  <header><div>
78
- <form id="search" hidden><input id="qbox" type="search" autocomplete="off"><button type="submit" id="go"></button></form>
79
- <div class="top">
80
- <div class="titles"><div id="q"></div><div id="sub"></div></div>
140
+ <div class="bar">
141
+ <span class="brand"><svg width="20" height="20" viewBox="0 0 20 20" aria-hidden="true"><rect x="1.5" y="3" width="17" height="12" rx="2.5" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="M7 18h6" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>StreamEmbed</span>
142
+ <form id="search" hidden><span class="qwrap"><svg width="17" height="17" viewBox="0 0 20 20" aria-hidden="true"><circle cx="8.5" cy="8.5" r="6" fill="none" stroke="currentColor" stroke-width="1.8"/><path d="M13 13l5 5" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg><input id="qbox" type="search" autocomplete="off"></span><button type="submit" id="go"></button></form>
143
+ <span class="space"></span>
81
144
  <select id="lang" aria-label="Language">
82
145
  <option value="en">English</option><option value="ko">한국어</option><option value="zh">中文</option>
83
146
  </select>
84
147
  </div>
148
+ <div class="head"><div id="q"></div><div id="sub"></div></div>
85
149
  <div id="dates">
86
150
  <button type="button" id="alldates"></button>
87
151
  <span id="chips"></span>
88
- <button type="button" id="morechips" hidden></button>
89
152
  </div>
90
153
  <div id="tools" hidden>
91
154
  <span id="range"><label><span id="lfrom"></span> <select id="from"></select></label>
@@ -101,6 +164,7 @@ html, body { overflow-x: hidden; }
101
164
  <dialog id="viewer">
102
165
  <div class="vtop">
103
166
  <div class="meta"><div class="when" id="vwhen"></div><div class="where" id="vwhere"></div></div>
167
+ <span id="vcount"></span>
104
168
  <a id="vopen" target="_blank" rel="noopener"></a>
105
169
  <button type="button" id="vclose"></button>
106
170
  </div>
@@ -120,33 +184,33 @@ const $ = (id) => document.getElementById(id);
120
184
  const TEXT = {
121
185
  en: { results: "Results", count: (a, b) => `${a} of ${b} results`, on: (d) => ` on ${d}`, fromTo: (a, b) => ` from ${a} to ${b}`,
122
186
  fromOn: (a) => ` from ${a} on`, upTo: (b) => ` up to ${b}`, searched: (w) => ` · searched ${w}`, to: "to", from: "From", until: "to",
123
- all: "All dates", moreDates: (n) => `${n} more dates`, fewer: "Fewer dates", none: "No results.",
187
+ all: "All dates", none: "No results.",
124
188
  noneHere: (n) => `No results from these dates. All dates shows ${n}.`, more: "Show more", full: "Full size", close: "Close",
125
189
  earlier: "Earlier frame", later: "Later frame", viewer: "Screenshot viewer", match: (s) => `match ${s}`,
126
190
  nearby: (n, m) => `${n} more within ${m} min`, onScreen: (s) => `on screen ${s}`, before: (s) => `${s} before the match`,
127
191
  after: (s) => `${s} after the match`, openMatch: (s) => `Open the match from ${s}`, s: "s", min: "min", h: "h", days: "days",
128
192
  ask: "Describe a screen you saw", go: "Search", searching: "Searching…", failed: (m) => `Search failed: ${m}`,
129
- start: (n) => `Search ${n} screens: describe what you saw.`, screenshot: "Screenshot", language: "Language",
193
+ start: (n) => `Search ${n} screens: describe what you saw.`, screenshot: "Screenshot", seeMore: "See nearby screens", language: "Language",
130
194
  sort: "Sort", byMatch: "Best match", newest: "Newest first", oldest: "Oldest first" },
131
195
  ko: { results: "결과", count: (a, b) => `결과 ${b}개 중 ${a}개`, on: (d) => ` · ${d}`, fromTo: (a, b) => ` · ${a}부터 ${b}까지`,
132
196
  fromOn: (a) => ` · ${a}부터`, upTo: (b) => ` · ${b}까지`, searched: (w) => ` · 검색 기간 ${w}`, to: "~", from: "기간", until: "~",
133
- all: "모든 날짜", moreDates: (n) => `날짜 ${n}개 더`, fewer: "날짜 줄이기", none: "결과가 없어요.",
197
+ all: "모든 날짜", none: "결과가 없어요.",
134
198
  noneHere: (n) => `이 날짜에는 결과가 없어요. 모든 날짜로 보면 ${n}개예요.`, more: "더 보기", full: "원본 크기", close: "닫기",
135
199
  earlier: "이전 화면", later: "다음 화면", viewer: "스크린샷 보기", match: (s) => `일치도 ${s}`,
136
200
  nearby: (n, m) => `${m}분 안에 ${n}개 더`, onScreen: (s) => `${s} 동안 화면에 있음`, before: (s) => `결과보다 ${s} 전`,
137
201
  after: (s) => `결과보다 ${s} 후`, openMatch: (s) => `${s} 결과 열기`, s: "초", min: "분", h: "시간", days: "일",
138
202
  ask: "본 화면을 설명해 주세요", go: "검색", searching: "검색 중…", failed: (m) => `검색 실패: ${m}`,
139
- start: (n) => `화면 ${n}장에서 검색해요. 본 화면을 설명해 주세요.`, screenshot: "스크린샷", language: "언어",
203
+ start: (n) => `화면 ${n}장에서 검색해요. 본 화면을 설명해 주세요.`, screenshot: "스크린샷", seeMore: "앞뒤 화면 보기", language: "언어",
140
204
  sort: "정렬", byMatch: "관련도순", newest: "최신순", oldest: "오래된순" },
141
205
  zh: { results: "结果", count: (a, b) => `共 ${b} 个结果,显示 ${a} 个`, on: (d) => ` · ${d}`, fromTo: (a, b) => ` · ${a} 至 ${b}`,
142
206
  fromOn: (a) => ` · ${a} 起`, upTo: (b) => ` · 至 ${b}`, searched: (w) => ` · 搜索范围 ${w}`, to: "至", from: "日期", until: "至",
143
- all: "全部日期", moreDates: (n) => `另外 ${n} 个日期`, fewer: "收起日期", none: "没有结果。",
207
+ all: "全部日期", none: "没有结果。",
144
208
  noneHere: (n) => `这些日期没有结果。全部日期共有 ${n} 个。`, more: "显示更多", full: "原始大小", close: "关闭",
145
209
  earlier: "上一张", later: "下一张", viewer: "截图查看", match: (s) => `匹配度 ${s}`,
146
210
  nearby: (n, m) => `${m} 分钟内另有 ${n} 个`, onScreen: (s) => `在屏幕上 ${s}`, before: (s) => `比结果早 ${s}`,
147
211
  after: (s) => `比结果晚 ${s}`, openMatch: (s) => `打开 ${s} 的结果`, s: "秒", min: "分钟", h: "小时", days: "天",
148
212
  ask: "描述你看到的画面", go: "搜索", searching: "搜索中…", failed: (m) => `搜索失败:${m}`,
149
- start: (n) => `在 ${n} 张截图中搜索:描述你看到的画面。`, screenshot: "截图", language: "语言",
213
+ start: (n) => `在 ${n} 张截图中搜索:描述你看到的画面。`, screenshot: "截图", seeMore: "查看前后画面", language: "语言",
150
214
  sort: "排序", byMatch: "相关度", newest: "最新优先", oldest: "最早优先" },
151
215
  };
152
216
  const LOCALES = { en: "en-US", ko: "ko-KR", zh: "zh-CN" };
@@ -196,7 +260,7 @@ function windowText(a, b) { // whole days as days ("Nov 6", "Nov 3 to N
196
260
  // the better one's viewer shows the frames around it. fold is null for folder screenshots with no time in their file name, which are
197
261
  // never left out this way.
198
262
  const FOLD_S = 300;
199
- const CHIPS = 7;
263
+ const CHIPS = 5;
200
264
  let CARDS = [], DAYS = [], counts = {};
201
265
  const SORTS = ["match", "new", "old"];
202
266
  let SORT = "match";
@@ -227,18 +291,16 @@ function texts() {
227
291
  $("vopen").textContent = t.full; $("vclose").textContent = t.close; $("viewer").setAttribute("aria-label", t.viewer);
228
292
  $("vprev").setAttribute("aria-label", t.earlier); $("vnext").setAttribute("aria-label", t.later);
229
293
  $("q").textContent = DATA && DATA.query ? `"${DATA.query}"` : LIVE ? "" : t.results;
230
- // one chip per day with results, the CHIPS most recent first; the rest behind a toggle. Results from one day only: no date bar.
294
+ // one chip per day with results, at most the CHIPS most recent; older days are picked with From and To. Results from one day only: no date bar.
231
295
  $("dates").hidden = DAYS.length < 2;
232
- $("chips").replaceChildren(...DAYS.map((k, n) => {
296
+ $("chips").replaceChildren(...DAYS.slice(0, CHIPS).map((k) => {
233
297
  const b = document.createElement("button");
234
298
  b.type = "button"; b.dataset.day = k;
235
- if (n >= CHIPS) b.className = "extra";
236
299
  b.textContent = `${yearDay(k)} (${counts[k]})`;
237
300
  b.title = day(new Date(k + "T12:00").getTime() / 1000);
238
301
  b.onclick = () => { F.from = F.to = k; F.shown = PAGE; render(); };
239
302
  return b;
240
303
  }));
241
- $("morechips").hidden = DAYS.length <= CHIPS;
242
304
  // the range: two lists of the days with results, oldest first; the sort order
243
305
  $("lfrom").textContent = t.from; $("lto").textContent = t.until; $("lsort").textContent = t.sort;
244
306
  const opts = () => DAYS.slice().reverse().map((k) => { const o = document.createElement("option"); o.value = k; o.textContent = yearDay(k); return o; });
@@ -246,8 +308,6 @@ function texts() {
246
308
  const so = $("sort").options; so[0].textContent = t.byMatch; so[1].textContent = t.newest; so[2].textContent = t.oldest;
247
309
  $("tools").hidden = CARDS.length < 2;
248
310
  $("range").hidden = DAYS.length < 2;
249
- const label = () => { $("morechips").textContent = $("chips").classList.contains("all") ? t.fewer : t.moreDates(DAYS.length - CHIPS); };
250
- label(); $("morechips").onclick = () => { $("chips").classList.toggle("all"); label(); };
251
311
  render();
252
312
  }
253
313
 
@@ -279,15 +339,19 @@ function render() {
279
339
 
280
340
  function card(r) {
281
341
  const t = T(), f = r.frames.find((x) => x.id === r.id);
282
- const fig = document.createElement("figure");
283
- const img = document.createElement("img");
342
+ const el = (tag, cls, text) => { const e = document.createElement(tag); if (cls) e.className = cls; if (text != null) e.textContent = text; return e; };
343
+ const fig = el("figure");
344
+ const pic = el("div", "pic"), img = el("img");
284
345
  img.loading = "lazy"; img.src = f.thumb; img.alt = where(f) || t.screenshot;
285
- const cap = document.createElement("figcaption");
286
- const when = document.createElement("div");
287
- when.className = "when"; when.textContent = `${shortDay(f.ts)} · ${hm(f.ts)}`; when.title = t.match(r.score.toFixed(3));
288
- const w = document.createElement("div");
289
- w.className = "where"; w.textContent = where(f); if (f.source) w.title = f.source;
290
- cap.append(when); if (where(f)) cap.append(w); fig.append(img, cap);
346
+ pic.append(img, el("span", "more", t.seeMore));
347
+ const cap = el("figcaption");
348
+ // the time, the day beside it
349
+ const when = el("div", "when");
350
+ when.append(el("span", "time", hm(f.ts)), el("span", "day", shortDay(f.ts)));
351
+ when.title = t.match(r.score.toFixed(3));
352
+ const w = el("div", "where", where(f)); if (f.source) w.title = f.source;
353
+ cap.append(when); if (where(f)) cap.append(w);
354
+ fig.append(pic, cap);
291
355
  fig.tabIndex = 0; fig.setAttribute("role", "button");
292
356
  fig.setAttribute("aria-label", t.openMatch(stamp(f.ts)));
293
357
  fig.onclick = () => open(r);
@@ -402,6 +466,7 @@ function show() {
402
466
  else if (hit) when += ` · ${f.ts < hit.ts ? t.before(span(hit.ts - f.ts)) : t.after(span(f.ts - hit.ts))}`;
403
467
  $("vwhen").textContent = when; $("vwhere").textContent = where(f) || " "; $("vwhere").title = f.source || "";
404
468
  $("vprev").disabled = V.i === 0; $("vnext").disabled = V.i === fr.length - 1;
469
+ $("vcount").textContent = fr.length > 1 ? `${V.i + 1} / ${fr.length}` : "";
405
470
  $("vstrip").querySelectorAll(".tick").forEach((b) => b.classList.toggle("active", Number(b.dataset.k) === V.i));
406
471
  $("vstrip").querySelector(".tick.active")?.scrollIntoView({ block: "nearest", inline: "center" });
407
472
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes