@phnx-labs/artifacts-cli 0.9.2 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.3 — 2026-10-09
4
+
5
+ - **The share bar, redrawn in the Rush design system.** Every shared page and asset
6
+ viewer now opens with `handle / title` (the title in Jost), "Updated 2h ago", the view
7
+ count, a neutral visibility chip and a Copy link button for every reader. "Made with
8
+ <agent>" is gone. The owner's visibility menu is a glass sheet with a check on the
9
+ current level and arrow-key navigation; saving shows beside the chip, and a refused
10
+ change explains itself under it. A video share carries its transcript status in the
11
+ bar: a pulse while it runs, "No transcript" linking to Retry, or "Transcript" jumping to
12
+ the rail. The bar is 46 px tall (was 38).
13
+ - **The video page follows the same system:** Inter and Jost, zinc on glass, no blue accent,
14
+ a white Retry pill, and the job's error shown as a sentence.
15
+ - **The share Worker serves the bar's faces** at `/__fonts/inter.woff2` and
16
+ `/__fonts/jost.woff2`, so a shared page never calls a third-party font host. Jost
17
+ (SIL OFL 1.1) is added to `fonts/`.
18
+
3
19
  ## 0.9.2 — 2026-10-09
4
20
 
5
21
  - **The header's session chip opens the session (PHNX-4312).** It reads "Open session"
@@ -801,17 +801,22 @@ function renderMediaPanels(pathname, media, opts) {
801
801
  let panels = '';
802
802
  if (!ready) {
803
803
  const failed = media.state === 'failed';
804
- const heading = failed
805
- ? 'Transcript and summary failed'
804
+ const badge = failed
805
+ ? 'No transcript'
806
806
  : (media.stage === 'summary' ? 'Summarizing…' : media.stage === 'listing' ? 'Finalizing…' : 'Transcribing…');
807
+ const heading = failed
808
+ ? 'The transcript could not be made'
809
+ : 'The transcript, chapters and summary are on the way';
810
+ // The job's error is a lower-case clause; show it as a sentence.
811
+ const reason = media.error ? String(media.error).trim().replace(/[.\\s]+$/, '') : '';
807
812
  const detail = failed
808
- ? (media.error ? escapeHtml(media.error) : 'Media processing failed.')
809
- : 'The transcript, captions and summary appear here when processing finishes. This page refreshes on its own.';
810
- panels = '<section class="mv-card mv-status' + (failed ? ' mv-failed' : '') + '" role="status">' +
811
- (failed ? '' : '<span class="mv-spin" aria-hidden="true"></span>') +
812
- '<div><h2>' + heading + '</h2><p data-mv-note>' + detail + '</p>' +
813
+ ? (reason ? escapeHtml(reason.charAt(0).toUpperCase() + reason.slice(1)) + '.' : 'Processing stopped before it finished.')
814
+ : 'They appear here when processing finishes. This page refreshes on its own.';
815
+ panels = '<section class="mv-card mv-status' + (failed ? ' mv-failed' : '') + '" id="mv-status" role="status">' +
816
+ '<span class="mv-badge"><span class="mv-dot" aria-hidden="true"></span>' + badge + '</span>' +
817
+ '<h2>' + heading + '</h2><p data-mv-note>' + detail + '</p>' +
813
818
  (failed && opts.canRetry ? '<button type="button" class="mv-retry" data-mv-retry>Retry</button>' : '') +
814
- '</div></section>';
819
+ '</section>';
815
820
  } else {
816
821
  panels = '<section class="mv-card"><h1>' + escapeHtml(summary.title) + '</h1><p class="mv-summary">' + escapeHtml(summary.summary) + '</p></section>' +
817
822
  (summary.chapters.length ? '<section class="mv-card"><h2>Chapters</h2><ol class="mv-list">' +
@@ -822,7 +827,7 @@ function renderMediaPanels(pathname, media, opts) {
822
827
  }
823
828
 
824
829
  const rail = ready
825
- ? '<aside class="mv-rail" aria-label="Transcript"><div class="mv-rail-head"><h2>Transcript</h2>' +
830
+ ? '<aside class="mv-rail" id="mv-transcript" aria-label="Transcript"><div class="mv-rail-head"><h2>Transcript</h2>' +
826
831
  '<input type="search" data-mv-search placeholder="Search the transcript" aria-label="Search the transcript"><span class="mv-count" data-mv-count></span></div>' +
827
832
  '<ol class="mv-lines" data-mv-lines>' + (transcript.length ? transcript.map(function (line) {
828
833
  return '<li class="mv-line" data-mv-line data-mv-seek="' + line.start + '">' +
@@ -838,37 +843,50 @@ function renderMediaPanels(pathname, media, opts) {
838
843
  }
839
844
 
840
845
  var MEDIA_VIEWER_CSS =
841
- 'html,body{margin:0;background:#0f0f11;color:#e8e8e8;font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,system-ui,sans-serif}' +
846
+ // rush/DESIGN.md on the video page: Inter body and Jost headings (the bar's
847
+ // faces, served from /__fonts/), zinc text on white-alpha glass over void,
848
+ // no blue accent. The one primary action on the page is the bar's Copy link,
849
+ // or Retry when the job failed.
850
+ 'html,body{margin:0;background:#09090b;color:#e4e4e7;font:14px/1.55 "ash-inter",Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,system-ui,sans-serif;-webkit-font-smoothing:antialiased}' +
842
851
  '.mv{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:20px;max-width:1440px;margin:0 auto;padding:20px;box-sizing:border-box}' +
843
852
  '.mv.mv-solo{grid-template-columns:minmax(0,1fr);max-width:1100px}' +
844
853
  '@media(max-width:980px){.mv{grid-template-columns:minmax(0,1fr)}}' +
854
+ '@media(max-width:560px){.mv{padding:16px}}' +
845
855
  '.mv-main{min-width:0;display:flex;flex-direction:column;gap:16px}' +
846
- '.mv video{width:100%;max-height:68vh;background:#000;border-radius:10px;display:block}' +
847
- '.mv-strip{position:relative;height:14px;margin-top:-8px;background:#1b1b21;border-radius:7px;cursor:pointer;overflow:hidden}' +
848
- '.mv-fill{position:absolute;left:0;top:0;bottom:0;width:0;background:rgba(91,157,255,.28)}' +
849
- '.mv-tick{position:absolute;top:2px;bottom:2px;width:4px;margin-left:-2px;padding:0;border:0;border-radius:2px;background:#5b9dff;cursor:pointer}' +
850
- '.mv-tick:hover,.mv-tick:focus-visible{background:#a3c6ff;outline:none}' +
851
- '.mv-card{background:#151519;border:1px solid #24242b;border-radius:12px;padding:16px 18px}' +
852
- '.mv-card h1{font-size:20px;margin:0 0 8px;color:#fff}.mv-card h2{font-size:12px;margin:0 0 10px;text-transform:uppercase;letter-spacing:.07em;color:#8b919c}' +
853
- '.mv-summary{margin:0;color:#d3d7de}.mv-empty{margin:0;color:#7c8290}' +
856
+ '.mv video{width:100%;max-height:68vh;background:#000;border-radius:12px;display:block}' +
857
+ '.mv-strip{position:relative;height:14px;margin-top:-8px;background:rgba(255,255,255,.05);border-radius:7px;cursor:pointer;overflow:hidden}' +
858
+ '.mv-fill{position:absolute;left:0;top:0;bottom:0;width:0;background:rgba(255,255,255,.14)}' +
859
+ '.mv-tick{position:absolute;top:2px;bottom:2px;width:4px;margin-left:-2px;padding:0;border:0;border-radius:2px;background:rgba(255,255,255,.55);cursor:pointer}' +
860
+ '.mv-tick:hover,.mv-tick:focus-visible{background:#fafafa;outline:none}' +
861
+ '.mv-card{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:16px 18px}' +
862
+ '.mv-card h1{font:500 22px/1.25 "ash-jost",Jost,"ash-inter",system-ui,sans-serif;margin:0 0 8px;color:#fafafa;text-wrap:balance}' +
863
+ '.mv-card h2{font-size:11px;font-weight:500;margin:0 0 10px;text-transform:uppercase;letter-spacing:.12em;color:#a1a1aa}' +
864
+ '.mv-summary{margin:0;color:#d4d4d8;max-width:72ch}.mv-empty{margin:0;color:#a1a1aa}' +
854
865
  '.mv-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.mv-list li{display:flex;gap:10px;align-items:baseline}' +
855
- '.mv-ts{flex:none;font:12px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;color:#7fb0ff;text-decoration:none;background:rgba(91,157,255,.1);padding:1px 6px;border-radius:5px}' +
856
- '.mv-ts:hover{background:rgba(91,157,255,.22)}' +
857
- '.mv-status{display:flex;gap:14px;align-items:flex-start}.mv-status h2{color:#e8e8e8;font-size:15px;text-transform:none;letter-spacing:0}.mv-status p{margin:0;color:#aab0ba}' +
858
- '.mv-failed{border-color:#5c2b2b}.mv-failed h2{color:#ff8a8a}' +
859
- '.mv-spin{flex:none;width:18px;height:18px;margin-top:2px;border:2px solid rgba(255,255,255,.2);border-top-color:#5b9dff;border-radius:50%;animation:mv-sp .8s linear infinite}' +
860
- '@keyframes mv-sp{to{transform:rotate(360deg)}}' +
861
- '.mv-retry{margin-top:12px;background:#5b9dff;color:#0b0b0c;border:0;border-radius:8px;padding:7px 16px;font:inherit;font-weight:600;cursor:pointer}.mv-retry:disabled{opacity:.5;cursor:default}' +
862
- '.mv-rail{position:sticky;top:58px;align-self:start;height:calc(100vh - 78px);display:flex;flex-direction:column;background:#151519;border:1px solid #24242b;border-radius:12px;overflow:hidden}' +
866
+ '.mv-ts{flex:none;font:500 12px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;font-variant-numeric:tabular-nums;color:#e4e4e7;text-decoration:none;background:rgba(255,255,255,.06);padding:1px 6px;border-radius:5px}' +
867
+ '.mv-ts:hover{background:rgba(255,255,255,.12)}' +
868
+ '.mv-status{display:flex;flex-direction:column;align-items:flex-start;gap:8px}' +
869
+ '.mv-status h2{font:500 18px/1.3 "ash-jost",Jost,"ash-inter",system-ui,sans-serif;text-transform:none;letter-spacing:0;color:#fafafa;margin:0;text-wrap:balance}' +
870
+ '.mv-status p{margin:0;color:#a1a1aa;max-width:68ch}' +
871
+ '.mv-badge{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:999px;font-size:11.5px;font-weight:600;background:rgba(245,158,11,.18);color:#fde68a}' +
872
+ '.mv-dot{width:6px;height:6px;border-radius:50%;background:#fbbf24;animation:mv-pulse 2s cubic-bezier(.4,0,.6,1) infinite}' +
873
+ '.mv-failed .mv-badge{background:rgba(244,63,94,.18);color:#fecdd3}.mv-failed .mv-dot{background:#fb7185;animation:none}' +
874
+ '@keyframes mv-pulse{0%,100%{opacity:1}50%{opacity:.4}}' +
875
+ '.mv-retry{margin-top:4px;height:30px;padding:0 16px;background:#fafafa;color:#09090b;border:0;border-radius:999px;font:inherit;font-size:13px;font-weight:600;cursor:pointer;box-shadow:0 6px 18px -8px rgba(255,255,255,.35)}' +
876
+ '.mv-retry:hover{background:#fff}.mv-retry:focus-visible{outline:2px solid #c9a962;outline-offset:2px}.mv-retry:disabled{opacity:.5;cursor:default}' +
877
+ '.mv-rail{position:sticky;top:66px;align-self:start;height:calc(100vh - 86px);display:flex;flex-direction:column;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:16px;overflow:hidden;scroll-margin-top:66px}' +
863
878
  '@media(max-width:980px){.mv-rail{position:static;height:60vh}}' +
864
- '.mv-rail-head{padding:14px 14px 10px;border-bottom:1px solid #24242b}.mv-rail-head h2{font-size:12px;margin:0 0 8px;text-transform:uppercase;letter-spacing:.07em;color:#8b919c}' +
865
- '.mv-rail-head input{width:100%;box-sizing:border-box;background:#0f0f11;border:1px solid #2c2c34;border-radius:8px;color:#e8e8e8;padding:7px 10px;font:inherit}' +
866
- '.mv-count{display:block;min-height:16px;margin-top:4px;font-size:12px;color:#8b919c}' +
879
+ '.mv-status{scroll-margin-top:66px}' +
880
+ '.mv-rail-head{padding:14px 14px 10px;border-bottom:1px solid rgba(255,255,255,.08)}.mv-rail-head h2{font-size:11px;font-weight:500;margin:0 0 8px;text-transform:uppercase;letter-spacing:.12em;color:#a1a1aa}' +
881
+ '.mv-rail-head input{width:100%;box-sizing:border-box;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.1);border-radius:10px;color:#fafafa;padding:7px 10px;font:inherit}' +
882
+ '.mv-rail-head input:focus{outline:none;border-color:rgba(255,255,255,.24)}' +
883
+ '.mv-count{display:block;min-height:16px;margin-top:4px;font-size:12px;color:#a1a1aa}' +
867
884
  '.mv-lines{list-style:none;margin:0;padding:6px 0;overflow-y:auto;flex:1}' +
868
- '.mv-line{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;padding:7px 14px;border-left:3px solid transparent;cursor:pointer}' +
869
- '.mv-line:hover{background:rgba(255,255,255,.03)}.mv-line.on{background:rgba(91,157,255,.12);border-left-color:#5b9dff}' +
870
- '.mv-line .mv-ts{grid-row:span 2;align-self:start}.mv-spk{font-size:11px;font-weight:600}.mv-txt{grid-column:2;color:#d3d7de}' +
871
- '.mv-spk0{color:#7fb0ff}.mv-spk1{color:#f5a54a}.mv-spk2{color:#5fd39a}.mv-spk3{color:#d58cff}.mv-spk4{color:#ff8a8a}.mv-spk5{color:#e5d36a}' +
872
- '.mv-line mark{background:rgba(245,158,11,.4);color:#fff;border-radius:2px}';
885
+ '.mv-line{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;padding:7px 14px;border-left:2px solid transparent;cursor:pointer}' +
886
+ '.mv-line:hover{background:rgba(255,255,255,.03)}.mv-line.on{background:rgba(255,255,255,.06);border-left-color:rgba(255,255,255,.6)}' +
887
+ '.mv-line .mv-ts{grid-row:span 2;align-self:start}.mv-spk{font-size:11px;font-weight:600}.mv-txt{grid-column:2;color:#d4d4d8}' +
888
+ '.mv-spk0{color:#93c5fd}.mv-spk1{color:#fcd34d}.mv-spk2{color:#6ee7b7}.mv-spk3{color:#d8b4fe}.mv-spk4{color:#fda4af}.mv-spk5{color:#bef264}' +
889
+ '.mv-line mark{background:rgba(201,169,98,.35);color:#fff;border-radius:2px}' +
890
+ '@media(prefers-reduced-motion:reduce){.mv-dot{animation:none}}';
873
891
  `;
874
892
  //# sourceMappingURL=worker-media-template.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"worker-media-template.js","sourceRoot":"","sources":["../../../src/lib/share/worker-media-template.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,2BAA2B,EAC3B,iBAAiB,EACjB,QAAQ,EACR,YAAY,GACb,MAAM,iBAAiB,CAAC;AAEzB,6EAA6E;AAC7E,8EAA8E;AAC9E,gFAAgF;AAChF,iFAAiF;AACjF,0EAA0E;AAC1E,EAAE;AACF,uDAAuD;AACvD,4CAA4C;AAC5C,2EAA2E;AAC3E,EAAE;AACF,6EAA6E;AAC7E,0EAA0E;AAC1E,+EAA+E;AAC/E,wEAAwE;AACxE,4EAA4E;AAC5E,8EAA8E;AAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA20BnH,CAAC"}
1
+ {"version":3,"file":"worker-media-template.js","sourceRoot":"","sources":["../../../src/lib/share/worker-media-template.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,2BAA2B,EAC3B,iBAAiB,EACjB,QAAQ,EACR,YAAY,GACb,MAAM,iBAAiB,CAAC;AAEzB,6EAA6E;AAC7E,8EAA8E;AAC9E,gFAAgF;AAChF,iFAAiF;AACjF,0EAA0E;AAC1E,EAAE;AACF,uDAAuD;AACvD,4CAA4C;AAC5C,2EAA2E;AAC3E,EAAE;AACF,6EAA6E;AAC7E,0EAA0E;AAC1E,+EAA+E;AAC/E,wEAAwE;AACxE,4EAA4E;AAC5E,8EAA8E;AAC9E,mFAAmF;AACnF,iEAAiE;AACjE,kCAAkC;AAClC,MAAM,CAAC,MAAM,yBAAyB,GAAG;oCACL,2BAA2B;qBAC1C,YAAY;iBAChB,QAAQ;mBACN,UAAU;2BACF,kBAAkB;8BACf,qBAAqB;yBAC1B,gBAAgB;8BACX,qBAAqB;wBAC3B,IAAI,CAAC,SAAS,CAAC,uBAAuB,GAAG,cAAc,GAAG,IAAI,GAAG,iBAAiB,GAAG,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA61BnH,CAAC"}
@@ -29,7 +29,7 @@ export function renderWorkerBundle() {
29
29
  // compiled module: workerd deliberately forbids runtime code generation,
30
30
  // so esbuild's `binary` loader produces a bundle that works in Node but
31
31
  // throws "Wasm code generation disallowed by embedder" in Cloudflare.
32
- loader: { '.wasm': 'copy', '.woff': 'binary' },
32
+ loader: { '.wasm': 'copy', '.woff': 'binary', '.woff2': 'binary' },
33
33
  });
34
34
  const script = result.outputFiles.find((output) => output.path.endsWith('.js'));
35
35
  if (!script)
@@ -64,7 +64,7 @@ export function renderWorkerScript() {
64
64
  target: 'es2022',
65
65
  write: false,
66
66
  minify: true,
67
- loader: { '.wasm': 'binary', '.woff': 'binary' },
67
+ loader: { '.wasm': 'binary', '.woff': 'binary', '.woff2': 'binary' },
68
68
  });
69
69
  const output = result.outputFiles[0];
70
70
  if (!output)
@@ -83,6 +83,8 @@ import resvgWasm from '@resvg/resvg-wasm/index_bg.wasm';
83
83
  import interRegular from '@fontsource/inter/files/inter-latin-400-normal.woff';
84
84
  import interBold from '@fontsource/inter/files/inter-latin-700-normal.woff';
85
85
  import jetbrainsMono from '@fontsource/jetbrains-mono/files/jetbrains-mono-latin-600-normal.woff';
86
+ import barInter from '../../../fonts/InterVariable.woff2';
87
+ import barJost from '../../../fonts/Jost-wght.woff2';
86
88
 
87
89
  // GENERATED by agents-cli agents share setup — do not edit here; edit
88
90
  // src/lib/share/worker-template.ts and re-run setup.
@@ -108,6 +110,9 @@ export default {
108
110
  // and the signed callback. Both 404 unless the media keys are bound.
109
111
  if (path === '__media/source') return handleMediaSource(request, env, url);
110
112
  if (path === '__media/callback') return handleMediaCallback(request, env, url, ctx);
113
+ // The share bar's two faces (Inter, Jost), served from this origin so a
114
+ // shared page never calls a third-party font host.
115
+ if ((request.method === 'GET' || request.method === 'HEAD') && BAR_FONTS[path]) return handleFont(request, path);
111
116
  if ((request.method === 'GET' || request.method === 'HEAD') && firstSeg.startsWith('__')) {
112
117
  return new Response('not found', { status: 404, headers: { 'content-type': 'text/plain' } });
113
118
  }
@@ -1196,113 +1201,133 @@ function escapeHtml(s) {
1196
1201
  .replace(/"/g, '&quot;');
1197
1202
  }
1198
1203
 
1199
- // The attribution bar: a slim strip prepended to every served HTML page that
1200
- // makes the object's stamped metadata visible — who shared it, what made it,
1201
- // when, and (the whole point) a color-coded VISIBILITY cue Google-Drive style.
1202
- // All values come from customMetadata; nothing new is stamped at publish time,
1203
- // so this is a pure Worker change deployable with 'agents artifacts share update'.
1204
+ // The attribution bar: a slim glass strip fixed to the top of every served HTML
1205
+ // page and asset viewer. It names the share (sharer / title), says when it last
1206
+ // changed, shows a VISIBILITY cue Google-Drive style, and offers Copy link. A
1207
+ // video with a media job adds its transcript status. All values come from
1208
+ // customMetadata and the serve path; nothing new is stamped at publish time.
1209
+ // Type and colour follow rush/DESIGN.md (Inter body, Jost display, zinc on dark
1210
+ // glass, one white primary pill); the faces are served from this origin at
1211
+ // /__fonts/ so a shared page never calls a third-party font host.
1204
1212
  var VIS_ICON = {
1205
- me: '<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2"><rect x="4" y="11" width="16" height="9" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/></svg>',
1206
- org: '<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 21h18M6 21V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v17M14 9h4a1 1 0 0 1 1 1v11"/></svg>',
1207
- unlisted: '<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2"><path d="M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1"/><path d="M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1"/></svg>',
1208
- public: '<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a15 15 0 0 1 0 18M12 3a15 15 0 0 0 0 18"/></svg>',
1213
+ me: '<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="4" y="11" width="16" height="9" rx="2"/><path d="M8 11V8a4 4 0 0 1 8 0v3"/></svg>',
1214
+ org: '<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M3 21h18M6 21V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v17M14 9h4a1 1 0 0 1 1 1v11"/></svg>',
1215
+ unlisted: '<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1"/><path d="M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1"/></svg>',
1216
+ public: '<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a15 15 0 0 1 0 18M12 3a15 15 0 0 0 0 18"/></svg>',
1209
1217
  };
1210
1218
 
1211
- // Eye glyph for the view-count stat; caret for the owner's interactive chip.
1212
- var STAT_EYE_ICON = '<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2"><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>';
1213
- var CARET_ICON = '<svg class="ash-caret" viewBox="0 0 24 24" width="11" height="11" fill="none" stroke="currentColor" stroke-width="2.4"><path d="m6 9 6 6 6-6"/></svg>';
1214
-
1215
- // The owner-only browser script that turns the visibility chip into a live
1216
- // control. Self-contained IIFE, namespaced under .agents-share-bar; injected only
1217
- // when the viewer owns the namespace. It reads the current level and each level's
1218
- // icon/color/label straight from the rendered menu DOM (no embedded config), then
1219
- // PATCHes the SAME in-place edit route the CLI uses — method PATCH, JSON body
1220
- // { visibility } — with credentials:'include' so the viewer's __share cookie /
1221
- // Phoenix identity rides. Optimistic: flip the chip + spinner, then a green check
1222
- // on 2xx or revert + the server's error text on failure (an org-on-public-inbox
1219
+ // Eye glyph for the view count; caret for the owner's chip; link and check for
1220
+ // Copy link and the selected menu row.
1221
+ var STAT_EYE_ICON = '<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/></svg>';
1222
+ var CARET_ICON = '<svg class="ash-caret" viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2"><path d="m6 9 6 6 6-6"/></svg>';
1223
+ var LINK_ICON = '<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1"/><path d="M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1"/></svg>';
1224
+ var CHECK_ICON = '<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2"><path d="m5 12 5 5 9-10"/></svg>';
1225
+
1226
+ // Copy link, for every viewer. It copies the share URL without view-only query
1227
+ // parameters, keeping only a protected page's key (k) so the link still opens.
1228
+ // The label answers on the button itself ("Copied") and returns after 1.4 s.
1229
+ var ASH_COPY_JS = '(function(){' +
1230
+ 'var btn = document.querySelector(".agents-share-bar [data-ash-copy]");' +
1231
+ 'if(!btn) return;' +
1232
+ 'var label = btn.querySelector("[data-ash-copy-label]");' +
1233
+ 'var icon = btn.querySelector("[data-ash-copy-ic]");' +
1234
+ 'var idle = icon ? icon.innerHTML : "";' +
1235
+ 'var timer = 0;' +
1236
+ 'function link(){ var k = new URLSearchParams(location.search).get("k"); return location.origin + location.pathname + (k ? "?k=" + encodeURIComponent(k) : ""); }' +
1237
+ 'function fallback(text){ var t = document.createElement("textarea"); t.value = text; t.setAttribute("readonly", ""); t.style.position = "fixed"; t.style.opacity = "0"; document.body.appendChild(t); t.select(); var ok = false; try { ok = document.execCommand("copy"); } catch (e) {} t.remove(); return ok; }' +
1238
+ 'function show(ok){ clearTimeout(timer); btn.classList.toggle("ash-done", ok); if(label) label.textContent = ok ? "Copied" : "Copy failed"; if(icon && ok) icon.innerHTML = ' + JSON.stringify(CHECK_ICON) + '; timer = setTimeout(function(){ btn.classList.remove("ash-done"); if(label) label.textContent = "Copy link"; if(icon) icon.innerHTML = idle; }, 1400); }' +
1239
+ 'btn.addEventListener("click", function(){ var text = link(); if(navigator.clipboard && navigator.clipboard.writeText){ navigator.clipboard.writeText(text).then(function(){ show(true); }, function(){ show(fallback(text)); }); } else { show(fallback(text)); } });' +
1240
+ '})();';
1241
+
1242
+ // The owner-only script that turns the visibility chip into a live control. It
1243
+ // reads each level's icon, colour and label from the rendered menu DOM (no
1244
+ // embedded config), then PATCHes the SAME in-place edit route the CLI uses,
1245
+ // method PATCH, JSON body { visibility }, with credentials:'include' so the
1246
+ // viewer's __share cookie / Phoenix identity rides. Optimistic: the chip flips
1247
+ // and "Saving…" shows beside it, then "Saved"; on failure the chip reverts and
1248
+ // the server's error text shows in a note under the chip (an org-on-public-inbox
1223
1249
  // 400 surfaces verbatim). The share page sets no CSP, so inline JS is fine.
1224
- var ASH_OWNER_JS = \`(function(){
1225
- var root = document.querySelector('.agents-share-bar');
1226
- if(!root) return;
1227
- var chip = root.querySelector('[data-ash-chip]');
1228
- var menu = root.querySelector('[data-ash-menu]');
1229
- var toast = root.querySelector('[data-ash-toast]');
1230
- if(!chip || !menu || !toast) return;
1231
- var labelEl = chip.querySelector('[data-ash-label]');
1232
- var chipIc = chip.querySelector('[data-ash-chip-ic]');
1233
- var busy = false;
1234
- function opts(){ return menu.querySelectorAll('[data-ash-opt]'); }
1235
- function currentKey(){ var s = menu.querySelector('.ash-opt.ash-sel'); return s ? s.getAttribute('data-ash-opt') : ''; }
1236
- function labelFor(key){ var a = opts(); for(var i=0;i<a.length;i++){ if(a[i].getAttribute('data-ash-opt')===key){ var b = a[i].querySelector('b'); return b ? b.textContent : key; } } return key; }
1237
- function open(){ menu.classList.add('ash-open'); menu.setAttribute('aria-hidden','false'); }
1238
- function close(){ menu.classList.remove('ash-open'); menu.setAttribute('aria-hidden','true'); }
1239
- chip.addEventListener('click', function(e){ e.stopPropagation(); if(menu.classList.contains('ash-open')) close(); else open(); });
1240
- menu.addEventListener('click', function(e){ e.stopPropagation(); });
1241
- document.addEventListener('click', close);
1242
- document.addEventListener('keydown', function(e){ if(e.key==='Escape') close(); });
1243
- function draw(key){
1244
- var sel = null, a = opts();
1245
- for(var i=0;i<a.length;i++){ var on = a[i].getAttribute('data-ash-opt')===key; a[i].classList.toggle('ash-sel', on); if(on) sel = a[i]; }
1246
- if(!sel) return;
1247
- var ic = sel.querySelector('.ash-opt-ic');
1248
- var color = ic ? ic.style.color : '';
1249
- if(color){ chip.style.color = color; chip.style.borderColor = color + '66'; }
1250
- if(chipIc && ic) chipIc.innerHTML = ic.innerHTML;
1251
- var b = sel.querySelector('b');
1252
- if(labelEl && b) labelEl.textContent = b.textContent;
1253
- }
1254
- function say(inner, cls){ toast.innerHTML = inner; toast.className = 'ash-toast ash-show' + (cls ? ' ' + cls : ''); }
1255
- function fade(ms){ setTimeout(function(){ toast.className = 'ash-toast'; }, ms); }
1256
- function pick(key){
1257
- close();
1258
- var prev = currentKey();
1259
- if(busy || !key || key===prev) return;
1260
- busy = true;
1261
- draw(key);
1262
- var name = labelFor(key);
1263
- say('<span class="ash-spin"></span> Saving…');
1264
- fetch(location.pathname, { method:'PATCH', credentials:'include', headers:{'content-type':'application/json'}, body: JSON.stringify({ visibility: key }) })
1265
- .then(function(res){ return res.json().then(function(j){ return { ok: res.ok, status: res.status, body: j }; }, function(){ return { ok: res.ok, status: res.status, body: {} }; }); })
1266
- .then(function(r){
1267
- busy = false;
1268
- if(r.ok){ say('<span class="ash-ok">\\u2713</span> Now ' + name, 'ash-good'); fade(1600); }
1269
- else {
1270
- draw(prev);
1271
- var msg = (r.body && r.body.error) ? String(r.body.error) : ('Could not update (HTTP ' + r.status + ')');
1272
- say('<span class="ash-err">\\u2715</span> ' + msg.replace(/[<>&]/g, ' '), 'ash-bad');
1273
- fade(4000);
1274
- }
1275
- }, function(){ busy = false; draw(prev); say('<span class="ash-err">\\u2715</span> Network error \\u2014 not saved', 'ash-bad'); fade(4000); });
1276
- }
1277
- var a = opts();
1278
- for(var i=0;i<a.length;i++){ (function(el){ el.addEventListener('click', function(e){ e.stopPropagation(); pick(el.getAttribute('data-ash-opt')); }); })(a[i]); }
1279
- })();\`;
1280
-
1250
+ var ASH_OWNER_JS = '(function(){' +
1251
+ 'var root = document.querySelector(".agents-share-bar");' +
1252
+ 'if(!root) return;' +
1253
+ 'var chip = root.querySelector("[data-ash-chip]");' +
1254
+ 'var menu = root.querySelector("[data-ash-menu]");' +
1255
+ 'var save = root.querySelector("[data-ash-save]");' +
1256
+ 'var note = root.querySelector("[data-ash-note]");' +
1257
+ 'if(!chip || !menu || !save || !note) return;' +
1258
+ 'var labelEl = chip.querySelector("[data-ash-label]");' +
1259
+ 'var chipIc = chip.querySelector("[data-ash-cic]");' +
1260
+ 'var busy = false, saveTimer = 0, noteTimer = 0;' +
1261
+ 'function opts(){ return menu.querySelectorAll("[data-ash-opt]"); }' +
1262
+ 'function currentKey(){ var s = menu.querySelector("[aria-checked=true]"); return s ? s.getAttribute("data-ash-opt") : ""; }' +
1263
+ 'function isOpen(){ return menu.classList.contains("ash-open"); }' +
1264
+ 'function open(){ menu.classList.add("ash-open"); menu.setAttribute("aria-hidden","false"); chip.setAttribute("aria-expanded","true"); var s = menu.querySelector("[aria-checked=true]") || opts()[0]; if(s) s.focus(); }' +
1265
+ 'function close(back){ if(!isOpen()) return; menu.classList.remove("ash-open"); menu.setAttribute("aria-hidden","true"); chip.setAttribute("aria-expanded","false"); if(back) chip.focus(); }' +
1266
+ 'chip.addEventListener("click", function(e){ e.stopPropagation(); if(isOpen()) close(true); else open(); });' +
1267
+ 'menu.addEventListener("click", function(e){ e.stopPropagation(); });' +
1268
+ 'document.addEventListener("click", function(){ close(false); });' +
1269
+ 'document.addEventListener("keydown", function(e){ if(e.key==="Escape") close(true); });' +
1270
+ 'menu.addEventListener("keydown", function(e){ if(e.key!=="ArrowDown" && e.key!=="ArrowUp") return; e.preventDefault(); var a = Array.prototype.slice.call(opts()); var i = a.indexOf(document.activeElement); var n = a[(i + (e.key==="ArrowDown" ? 1 : a.length - 1)) % a.length]; if(n) n.focus(); });' +
1271
+ 'function draw(key){' +
1272
+ 'var sel = null, a = opts();' +
1273
+ 'for(var i=0;i<a.length;i++){ var on = a[i].getAttribute("data-ash-opt")===key; a[i].setAttribute("aria-checked", on ? "true" : "false"); if(on) sel = a[i]; }' +
1274
+ 'if(!sel) return;' +
1275
+ 'var ic = sel.querySelector(".ash-oic");' +
1276
+ 'if(chipIc && ic){ chipIc.innerHTML = ic.innerHTML; chipIc.style.color = ic.style.color; }' +
1277
+ 'var b = sel.querySelector("b");' +
1278
+ 'if(labelEl && b){ labelEl.textContent = b.textContent; chip.setAttribute("title", b.textContent); }' +
1279
+ '}' +
1280
+ 'function status(html, cls){ clearTimeout(saveTimer); save.innerHTML = html; save.className = "ash-save" + (html ? " ash-on" : "") + (cls ? " " + cls : ""); }' +
1281
+ 'function fail(msg){ status("", ""); clearTimeout(noteTimer); note.textContent = msg; note.classList.add("ash-on"); noteTimer = setTimeout(function(){ note.classList.remove("ash-on"); }, 5000); }' +
1282
+ 'function pick(key){' +
1283
+ 'close(true);' +
1284
+ 'var prev = currentKey();' +
1285
+ 'if(busy || !key || key===prev) return;' +
1286
+ 'busy = true;' +
1287
+ 'draw(key);' +
1288
+ 'note.classList.remove("ash-on");' +
1289
+ 'status("<span class=ash-spin></span>Saving…", "");' +
1290
+ 'fetch(location.pathname, { method:"PATCH", credentials:"include", headers:{"content-type":"application/json"}, body: JSON.stringify({ visibility: key }) })' +
1291
+ '.then(function(res){ return res.json().then(function(j){ return { ok: res.ok, status: res.status, body: j }; }, function(){ return { ok: res.ok, status: res.status, body: {} }; }); })' +
1292
+ '.then(function(r){' +
1293
+ 'busy = false;' +
1294
+ 'if(r.ok){ status(' + JSON.stringify(CHECK_ICON) + ' + "Saved", "ash-ok"); saveTimer = setTimeout(function(){ status("", ""); }, 1600); return; }' +
1295
+ 'draw(prev);' +
1296
+ 'fail((r.body && r.body.error) ? String(r.body.error) : ("Not saved: the server answered " + r.status + "."));' +
1297
+ '}, function(){ busy = false; draw(prev); fail("Not saved: the network request failed. Try again."); });' +
1298
+ '}' +
1299
+ 'var a = opts();' +
1300
+ 'for(var i=0;i<a.length;i++){ (function(el){ el.addEventListener("click", function(e){ e.stopPropagation(); pick(el.getAttribute("data-ash-opt")); }); })(a[i]); }' +
1301
+ '})();';
1302
+
1303
+ // Each level's semantic hue lives on its icon only; the chip itself is neutral
1304
+ // glass, so the bar never reads as an alert.
1281
1305
  function visibilityChip(visibility, orgDomain) {
1282
- if (visibility === 'me') return { icon: VIS_ICON.me, label: 'Only you', color: '#f59e0b' };
1283
- if (visibility === 'org') return { icon: VIS_ICON.org, label: 'Anyone at ' + escapeHtml(orgDomain || 'your organization'), color: '#5b9dff' };
1284
- if (visibility === 'private') return { icon: VIS_ICON.me, label: 'Protected (link + key)', color: '#f59e0b' };
1285
- if (visibility === 'unlisted') return { icon: VIS_ICON.unlisted, label: 'Unlisted', color: '#9aa0a6' };
1286
- return { icon: VIS_ICON.public, label: 'Public', color: '#30a46c' };
1306
+ if (visibility === 'me') return { icon: VIS_ICON.me, label: 'Only you', color: '#fbbf24' };
1307
+ if (visibility === 'org') return { icon: VIS_ICON.org, label: 'Anyone at ' + escapeHtml(orgDomain || 'your organization'), color: '#93c5fd' };
1308
+ if (visibility === 'private') return { icon: VIS_ICON.me, label: 'Protected (link + key)', color: '#fbbf24' };
1309
+ if (visibility === 'unlisted') return { icon: VIS_ICON.unlisted, label: 'Unlisted', color: '#a1a1aa' };
1310
+ return { icon: VIS_ICON.public, label: 'Public', color: '#34d399' };
1287
1311
  }
1288
1312
 
1289
1313
  // A deterministic hue (0-359) from the handle, so a given sharer always gets the
1290
- // same initials-circle colour without any stored palette.
1314
+ // same initials colour without any stored palette.
1291
1315
  function avatarHue(s) {
1292
1316
  var h = 0;
1293
1317
  for (var i = 0; i < s.length; i++) h = (h * 31 + s.charCodeAt(i)) % 360;
1294
1318
  return h;
1295
1319
  }
1296
1320
 
1297
- // The avatar slot is ALWAYS rendered: a coloured initials circle derived from the
1298
- // handle. When the object carries an avatar URL (a Gravatar the CLI stamps at
1299
- // publish, or any future hosted photo), a real img is layered on top; onerror
1300
- // removes it so the initials underneath show through when the photo 404s. There
1301
- // is no CSP on the share page, so the inline onerror fallback is honoured.
1321
+ // The avatar slot is ALWAYS rendered: a coloured initials tile derived from the
1322
+ // handle, rounded like the product marks (size x 0.225), never a circle. When the
1323
+ // object carries an avatar URL (a Gravatar the CLI stamps at publish, or any
1324
+ // future hosted photo), a real img is layered on top; onerror removes it so the
1325
+ // initials underneath show through when the photo 404s. There is no CSP on the
1326
+ // share page, so the inline onerror fallback is honoured.
1302
1327
  function renderAvatar(handle, avatarUrl) {
1303
1328
  var h = (handle || '').trim();
1304
1329
  var initial = escapeHtml((h.charAt(0) || '?').toUpperCase());
1305
- var bg = 'hsl(' + avatarHue(h) + ',48%,42%)';
1330
+ var bg = 'hsl(' + avatarHue(h) + ',38%,38%)';
1306
1331
  var inner = '<span class="ash-av-i">' + initial + '</span>';
1307
1332
  if (avatarUrl) {
1308
1333
  inner += '<img class="ash-av-img" src="' + escapeHtml(avatarUrl) + '" alt="" loading="lazy" ' +
@@ -1311,9 +1336,8 @@ function renderAvatar(handle, avatarUrl) {
1311
1336
  return '<span class="ash-avatar" style="background:' + bg + ' !important" aria-hidden="true">' + inner + '</span>';
1312
1337
  }
1313
1338
 
1314
- // A compact relative time for the "last updated" stat: "just now", "2h ago",
1315
- // "3d ago", or an ISO date once past ~30 days. Accepts a Date or a parseable
1316
- // string (R2's obj.uploaded is a Date).
1339
+ // A compact relative time: "just now", "2h ago", "3d ago", or an ISO date once
1340
+ // past ~30 days. Accepts a Date or a parseable string (R2's obj.uploaded is a Date).
1317
1341
  function relativeTime(when) {
1318
1342
  var then = when instanceof Date ? when.getTime() : Date.parse(when);
1319
1343
  if (!then || isNaN(then)) return '';
@@ -1327,146 +1351,212 @@ function relativeTime(when) {
1327
1351
  return new Date(then).toISOString().slice(0, 10);
1328
1352
  }
1329
1353
 
1330
- // The four visibility levels the owner can pick, in menu order. Descriptions
1331
- // mirror the approved mockup. org always appears — a public-inbox owner still
1332
- // sees it and lets the server's 400 drive the failure message (never a hidden
1333
- // client-side rule). orgDomain is the owner's own email domain when known.
1354
+ // The four visibility levels the owner can pick, in menu order. org always
1355
+ // appears: a public-inbox owner still sees it and the server's 400 drives the
1356
+ // failure message (never a hidden client-side rule). orgDomain is the owner's
1357
+ // own email domain when known.
1334
1358
  function visibilityLevels(orgDomain) {
1335
1359
  return [
1336
- { key: 'public', label: 'Public', color: '#30a46c', icon: VIS_ICON.public, desc: 'Anyone with the link · preview card · listed in your gallery' },
1337
- { key: 'unlisted', label: 'Unlisted', color: '#9aa0a6', icon: VIS_ICON.unlisted, desc: 'Anyone with the link · no card · hidden from your gallery' },
1338
- { key: 'me', label: 'Only you', color: '#f59e0b', icon: VIS_ICON.me, desc: 'Sign-in required · only your account can open it' },
1339
- { key: 'org', label: 'Anyone at ' + escapeHtml(orgDomain || 'your org'), color: '#5b9dff', icon: VIS_ICON.org, desc: 'Anyone signed in with a ' + escapeHtml(orgDomain || 'workspace-domain') + ' account' },
1360
+ { key: 'public', label: 'Public', color: '#34d399', icon: VIS_ICON.public, desc: 'Anyone with the link. Shows a preview card and appears in your gallery.' },
1361
+ { key: 'unlisted', label: 'Unlisted', color: '#a1a1aa', icon: VIS_ICON.unlisted, desc: 'Anyone with the link. No preview card, hidden from your gallery.' },
1362
+ { key: 'me', label: 'Only you', color: '#fbbf24', icon: VIS_ICON.me, desc: 'Opens only when you are signed in.' },
1363
+ { key: 'org', label: 'Anyone at ' + escapeHtml(orgDomain || 'your org'), color: '#93c5fd', icon: VIS_ICON.org, desc: 'Anyone signed in with a ' + escapeHtml(orgDomain || 'workspace-domain') + ' account.' },
1340
1364
  ];
1341
1365
  }
1342
1366
 
1343
1367
  function renderVisibilityMenu(current, orgDomain) {
1344
1368
  var rows = visibilityLevels(orgDomain).map(function (l) {
1345
- return '<button type="button" class="ash-opt' + (l.key === current ? ' ash-sel' : '') + '" data-ash-opt="' + l.key + '" role="menuitemradio" aria-checked="' + (l.key === current ? 'true' : 'false') + '">' +
1346
- '<span class="ash-opt-ic" style="color:' + l.color + '">' + l.icon + '</span>' +
1369
+ var on = l.key === current;
1370
+ return '<button type="button" class="ash-opt" data-ash-opt="' + l.key + '" role="menuitemradio" aria-checked="' + (on ? 'true' : 'false') + '">' +
1371
+ '<span class="ash-oic" style="color:' + l.color + '">' + l.icon + '</span>' +
1347
1372
  '<span class="ash-opt-t"><b>' + l.label + '</b><span>' + l.desc + '</span></span>' +
1348
- '<span class="ash-rd"></span></button>';
1373
+ '<span class="ash-chk">' + CHECK_ICON + '</span></button>';
1349
1374
  }).join('');
1350
- return '<div class="ash-menu" data-ash-menu role="menu" aria-hidden="true"><h4>Who can see this</h4>' + rows + '</div>';
1375
+ return '<div class="ash-menu" data-ash-menu role="menu" aria-label="Who can open this" aria-hidden="true"><h4>Who can open this</h4>' + rows + '</div>';
1376
+ }
1377
+
1378
+ // The transcript status of a video share, in the bar: a pulsing dot while the
1379
+ // media job runs (the bar's only motion), a rose pill when it failed, and a
1380
+ // link to the transcript when it is ready. Retry stays on the page's status
1381
+ // panel, the one control that starts a job.
1382
+ function renderMediaPill(media) {
1383
+ if (!media) return '';
1384
+ if (media.state === 'ready') {
1385
+ return '<a class="ash-job ash-job-ready" href="#mv-transcript"><span class="ash-jdot"></span><span class="ash-jtxt">Transcript</span></a>';
1386
+ }
1387
+ if (media.state === 'failed') {
1388
+ return '<a class="ash-job ash-job-fail" href="#mv-status" title="The transcript could not be made"><span class="ash-jdot"></span><span class="ash-jtxt">No transcript</span></a>';
1389
+ }
1390
+ var doing = media.stage === 'summary' ? 'Summarizing' : media.stage === 'listing' ? 'Finalizing' : 'Transcribing';
1391
+ return '<span class="ash-job ash-job-run" role="status"><span class="ash-jdot"></span><span class="ash-jtxt">' + doing + '</span></span>';
1351
1392
  }
1352
1393
 
1353
1394
  function renderOwnerScript() {
1354
1395
  return '<script>' + ASH_OWNER_JS + '</script>';
1355
1396
  }
1356
1397
 
1357
- // opts: { isOwner, ownerDomain, views, uploaded } — all optional. isOwner turns
1358
- // the visibility chip into a live control (inline dropdown, Variation A) and
1359
- // injects the owner-only CSS/JS; views/uploaded render the right-side stats
1360
- // cluster. With no opts the bar is exactly today's static strip.
1398
+ var ASH_KIND_LABEL = { video: 'Video', image: 'Image', audio: 'Audio', pdf: 'PDF' };
1399
+
1400
+ // opts: { isOwner, ownerDomain, views, uploaded, title, kind, media } — all
1401
+ // optional. isOwner turns the visibility chip into a live control and injects
1402
+ // the owner-only CSS/JS. title overrides the stored label (a video's summary
1403
+ // title); kind tags a non-HTML asset; media adds the transcript status.
1361
1404
  function renderAttributionBar(meta, handle, opts) {
1362
1405
  var o = opts || {};
1363
1406
  var cm = meta || {};
1364
1407
  var visibility = cm.visibility || 'public';
1365
1408
  var chip = visibilityChip(visibility, cm.org_domain);
1366
1409
  var avatar = renderAvatar(handle, cm.avatar);
1367
- var left = '';
1368
- // The handle is already the public URL namespace, so surfacing it leaks nothing new.
1369
- if (handle) left += 'Shared by <strong>' + escapeHtml(handle) + '</strong>';
1370
- if (cm.agent) left += (left ? '<span class="ash-dot">·</span>' : '') + 'Made with ' + escapeHtml(cm.agent);
1371
-
1372
- // Stats cluster (👁 <n> views · updated <rel>) — right side, left of the chip.
1373
- var stats = '';
1374
- var statBits = '';
1375
- if (o.views != null) {
1376
- statBits += STAT_EYE_ICON + '<b>' + escapeHtml(String(o.views)) + '</b> ' + (Number(o.views) === 1 ? 'view' : 'views');
1377
- }
1378
- if (o.uploaded) {
1379
- var rel = relativeTime(o.uploaded);
1380
- if (rel) statBits += (statBits ? '<span class="ash-statsep">·</span>' : '') + 'updated <b>' + escapeHtml(rel) + '</b>';
1381
- }
1382
- if (statBits) stats = '<span class="ash-stats" title="page stats">' + statBits + '</span>';
1383
1410
 
1384
- // The visibility chip: an interactive control for the owner, a static cue for
1385
- // everyone else (unchanged from today).
1386
- var chipHtml;
1387
- var menu = '';
1388
- var script = '';
1411
+ // Who and what: the handle (already the public URL namespace, so surfacing it
1412
+ // leaks nothing new) and the share's name.
1413
+ var title = o.title || cm.label || '';
1414
+ var id = '';
1415
+ if (handle) id += '<span class="ash-handle">' + escapeHtml(handle) + '</span>';
1416
+ if (handle && title) id += '<span class="ash-slash">/</span>';
1417
+ if (title) id += '<span class="ash-title" title="' + escapeHtml(title) + '">' + escapeHtml(title) + '</span>';
1418
+ var kind = o.kind && ASH_KIND_LABEL[o.kind] ? '<span class="ash-kind">' + ASH_KIND_LABEL[o.kind] + '</span>' : '';
1419
+
1420
+ // When: the object's upload time as "2h ago", else the stamped date.
1421
+ var when = o.uploaded ? relativeTime(o.uploaded) : '';
1422
+ var whenTitle = cm.date || (o.uploaded instanceof Date ? o.uploaded.toISOString() : '');
1423
+ var meta1 = '';
1424
+ if (when) meta1 = '<span class="ash-meta ash-when" title="' + escapeHtml(whenTitle) + '">Updated <b>' + escapeHtml(when) + '</b></span>';
1425
+ else if (cm.date) meta1 = '<span class="ash-meta ash-when">' + escapeHtml(cm.date) + '</span>';
1426
+ var views = o.views != null
1427
+ ? '<span class="ash-meta ash-views" title="Views">' + STAT_EYE_ICON + '<b>' + escapeHtml(String(o.views)) + '</b><span class="ash-vw">' + (Number(o.views) === 1 ? 'view' : 'views') + '</span></span>'
1428
+ : '';
1429
+
1430
+ // The visibility chip: a live control for the owner, a static cue otherwise.
1431
+ var chipInner = '<span class="ash-cic" data-ash-cic style="color:' + chip.color + '">' + chip.icon + '</span><span class="ash-clbl" data-ash-label>' + chip.label + '</span>';
1432
+ var chipHtml, menu = '', script = '', ownerBits = '';
1389
1433
  if (o.isOwner) {
1390
- chipHtml = '<span class="ash-chip ash-chip-own" data-ash-chip tabindex="0" role="button" aria-haspopup="menu" ' +
1391
- 'style="color:' + chip.color + ';border-color:' + chip.color + '66">' +
1392
- '<span data-ash-chip-ic>' + chip.icon + '</span><span data-ash-label>' + chip.label + '</span>' + CARET_ICON + '</span>';
1434
+ chipHtml = '<button type="button" class="ash-chip ash-chip-own" data-ash-chip aria-haspopup="menu" aria-expanded="false" title="' + chip.label + '">' + chipInner + CARET_ICON + '</button>';
1393
1435
  menu = renderVisibilityMenu(visibility, o.ownerDomain);
1394
1436
  script = renderOwnerScript();
1437
+ ownerBits = '<span class="ash-save" data-ash-save aria-live="polite"></span>';
1395
1438
  } else {
1396
- chipHtml = '<span class="ash-chip" style="color:' + chip.color + ';border-color:' + chip.color + '66">' + chip.icon + '<span>' + chip.label + '</span></span>';
1439
+ chipHtml = '<span class="ash-chip" title="' + chip.label + '">' + chipInner + '</span>';
1397
1440
  }
1398
1441
 
1399
- var right = stats + chipHtml;
1400
- if (cm.date) right += '<span class="ash-date">' + escapeHtml(cm.date) + '</span>';
1442
+ var copy = '<button type="button" class="ash-copy" data-ash-copy aria-label="Copy link"><span class="ash-cpi" data-ash-copy-ic>' + LINK_ICON + '</span><span class="ash-cpl" data-ash-copy-label>Copy link</span></button>';
1443
+
1401
1444
  // The load-bearing background + base colour ride an INLINE style so the host
1402
1445
  // page's own CSS can never wash the bar out (inline beats a page stylesheet);
1403
1446
  // the rest is a namespaced style block with !important on every colour so a
1404
1447
  // broad page rule (span selector to black, etc.) cannot make the text vanish.
1405
- // FIXED, full-viewport-width chrome (not sticky-inside-body — that inherited the
1406
- // page's max-width/margins and rendered as a floating box). html padding-top
1407
- // pushes the whole page down by the bar's height; flex-wrap:nowrap + ellipsis on
1408
- // the left keeps the bar exactly one line tall so the push height stays correct.
1448
+ // FIXED, full-viewport-width chrome; html padding-top pushes the page down by
1449
+ // the bar's height, and nowrap + ellipsis on the title keep the bar one line.
1409
1450
  return '<div class="agents-share-bar" role="contentinfo" aria-label="Sharing details" ' +
1410
- 'style="background:#0b0b0c !important;color:#e8e8e8 !important">' +
1411
- '<style>' +
1412
- 'html{padding-top:38px !important}' +
1413
- // The review rail (collab.ts) is fixed to the viewport top on desktop; start
1414
- // it below this bar so its header and Close button stay reachable. Below
1415
- // 981px it is a bottom sheet and needs nothing.
1416
- '@media(min-width:981px){.collab-rail{top:38px !important;height:calc(100vh - 38px) !important}}' +
1417
- '.agents-share-bar{all:initial;position:fixed !important;top:0 !important;left:0 !important;right:0 !important;width:100% !important;z-index:2147483647 !important;box-sizing:border-box;display:flex !important;align-items:center;gap:12px;flex-wrap:nowrap;' +
1418
- 'padding:8px 16px !important;background:#0b0b0c !important;color:#e8e8e8 !important;border-bottom:1px solid #23232a !important;box-shadow:0 1px 3px rgba(0,0,0,.35) !important;' +
1419
- 'font:13px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,system-ui,sans-serif !important}' +
1420
- '.agents-share-bar *{box-sizing:border-box;font-family:inherit}' +
1421
- '.agents-share-bar .ash-avatar{flex:none;position:relative;width:26px;height:26px;border-radius:50% !important;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;color:#fff !important;font-weight:600;font-size:12px;line-height:1;box-shadow:inset 0 0 0 1px rgba(255,255,255,.14)}' +
1422
- '.agents-share-bar .ash-av-i{color:#fff !important}' +
1423
- '.agents-share-bar .ash-av-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50% !important}' +
1424
- '.agents-share-bar .ash-left{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#cfd3d9 !important}' +
1425
- '.agents-share-bar strong{color:#fff !important;font-weight:600}' +
1426
- '.agents-share-bar .ash-dot{opacity:.4;margin:0 4px}' +
1427
- '.agents-share-bar .ash-right{flex:none;display:flex;align-items:center;gap:12px}' +
1428
- '.agents-share-bar .ash-date{color:#9096a0 !important}' +
1429
- '.agents-share-bar .ash-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;border:1px solid;font-weight:600;font-size:12px;white-space:nowrap}' +
1430
- '.agents-share-bar .ash-chip svg{flex:none;vertical-align:middle}' +
1431
- '.agents-share-bar .ash-stats{display:inline-flex;align-items:center;gap:5px;color:#9aa0a6 !important;font-size:12px;white-space:nowrap}' +
1432
- '.agents-share-bar .ash-stats b{color:#c9ced6 !important;font-weight:600}' +
1433
- '.agents-share-bar .ash-stats svg{flex:none;opacity:.85}' +
1434
- '.agents-share-bar .ash-statsep{opacity:.35;margin:0 3px}' +
1435
- (o.isOwner ? OWNER_BAR_CSS : '') +
1436
- '</style>' +
1437
- avatar +
1438
- '<span class="ash-left">' + left + '</span>' +
1439
- '<span class="ash-right">' + right + '</span>' +
1440
- menu +
1441
- (o.isOwner ? '<div class="ash-toast" data-ash-toast></div>' : '') +
1451
+ 'style="background:rgba(9,9,11,.92) !important;color:#e4e4e7 !important">' +
1452
+ '<style>' + ASH_FONT_CSS + ASH_BAR_CSS + (o.isOwner ? OWNER_BAR_CSS : '') + '</style>' +
1453
+ '<span class="ash-who">' + avatar + '<span class="ash-id">' + id + '</span>' + kind + '</span>' +
1454
+ '<span class="ash-right">' + meta1 + views + renderMediaPill(o.media) + ownerBits +
1455
+ '<span class="ash-vis">' + chipHtml + menu + (o.isOwner ? '<span class="ash-note" data-ash-note role="alert"></span>' : '') + '</span>' +
1456
+ copy +
1457
+ '</span>' +
1442
1458
  '</div>' +
1459
+ '<script>' + ASH_COPY_JS + '</script>' +
1443
1460
  script;
1444
1461
  }
1445
1462
 
1446
- // Owner-only chip/menu/toast styling, added to the bar's <style> only when the
1447
- // viewer owns the namespace. Namespaced under .agents-share-bar with !important
1448
- // so the host page's CSS can't wash it out; z-index rides the bar's own stacking.
1463
+ // The bar's faces, served by this Worker (handleFont). Bar-private family names
1464
+ // so a page's own Inter or Jost is never replaced.
1465
+ var ASH_FONT_CSS =
1466
+ '@font-face{font-family:"ash-inter";src:url(/__fonts/inter.woff2) format("woff2");font-weight:100 900;font-style:normal;font-display:swap}' +
1467
+ '@font-face{font-family:"ash-jost";src:url(/__fonts/jost.woff2) format("woff2");font-weight:100 900;font-style:normal;font-display:swap}';
1468
+
1469
+ var ASH_BAR_HEIGHT = 46;
1470
+
1471
+ var ASH_BAR_CSS =
1472
+ 'html{padding-top:' + ASH_BAR_HEIGHT + 'px !important}' +
1473
+ // The review rail (collab.ts) is fixed to the viewport top on desktop; start
1474
+ // it below this bar so its header and Close button stay reachable. Below
1475
+ // 981px it is a bottom sheet and needs nothing.
1476
+ '@media(min-width:981px){.collab-rail{top:' + ASH_BAR_HEIGHT + 'px !important;height:calc(100vh - ' + ASH_BAR_HEIGHT + 'px) !important}}' +
1477
+ '.agents-share-bar{all:initial;position:fixed !important;top:0 !important;left:0 !important;right:0 !important;width:100% !important;height:' + ASH_BAR_HEIGHT + 'px;z-index:2147483647 !important;box-sizing:border-box;display:flex !important;align-items:center;gap:12px;padding:0 14px;' +
1478
+ '-webkit-backdrop-filter:blur(28px) saturate(1.3);backdrop-filter:blur(28px) saturate(1.3);border-bottom:1px solid rgba(255,255,255,.07) !important;box-shadow:0 10px 30px -18px rgba(0,0,0,.8);' +
1479
+ 'font:13px/1.2 "ash-inter",Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,system-ui,sans-serif !important;-webkit-font-smoothing:antialiased}' +
1480
+ '.agents-share-bar *{box-sizing:border-box;font-family:inherit;letter-spacing:normal;text-transform:none}' +
1481
+ '.agents-share-bar svg{flex:none;display:block}' +
1482
+ '.agents-share-bar button{margin:0;font:inherit;-webkit-appearance:none;appearance:none}' +
1483
+ '.agents-share-bar button:focus-visible,.agents-share-bar a:focus-visible{outline:2px solid #c9a962 !important;outline-offset:2px}' +
1484
+ '.agents-share-bar .ash-who{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:10px}' +
1485
+ '.agents-share-bar .ash-avatar{flex:none;position:relative;width:26px;height:26px;border-radius:6px !important;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;color:#fff !important;font-weight:600;font-size:12px;line-height:1;box-shadow:inset 0 0 0 1px rgba(255,255,255,.14)}' +
1486
+ '.agents-share-bar .ash-av-i{color:#fff !important}' +
1487
+ '.agents-share-bar .ash-av-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:6px !important}' +
1488
+ '.agents-share-bar .ash-id{display:flex;align-items:baseline;gap:7px;min-width:0;white-space:nowrap}' +
1489
+ '.agents-share-bar .ash-handle{flex:none;color:#a1a1aa !important;font-weight:500}' +
1490
+ '.agents-share-bar .ash-slash{flex:none;color:#52525b !important}' +
1491
+ '.agents-share-bar .ash-title{min-width:0;overflow:hidden;text-overflow:ellipsis;color:#fafafa !important;font:500 15px/1.2 "ash-jost",Jost,"ash-inter",system-ui,sans-serif !important}' +
1492
+ '.agents-share-bar .ash-kind{flex:none;color:#a1a1aa !important;background:rgba(255,255,255,.06) !important;border-radius:5px;padding:4px 6px;font-size:10.5px;font-weight:500;line-height:1;letter-spacing:.06em;text-transform:uppercase}' +
1493
+ '.agents-share-bar .ash-right{flex:none;display:flex;align-items:center;gap:10px}' +
1494
+ '.agents-share-bar .ash-meta{display:inline-flex;align-items:center;gap:5px;color:#a1a1aa !important;font-size:12px;white-space:nowrap}' +
1495
+ '.agents-share-bar .ash-meta b{color:#e4e4e7 !important;font-weight:500;font-variant-numeric:tabular-nums}' +
1496
+ '.agents-share-bar .ash-views{padding-left:10px;border-left:1px solid rgba(255,255,255,.08)}' +
1497
+ '.agents-share-bar .ash-views svg{opacity:.8}' +
1498
+ '.agents-share-bar .ash-job{display:inline-flex;align-items:center;gap:7px;height:26px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:500;white-space:nowrap;text-decoration:none !important;background:rgba(255,255,255,.06) !important;color:#e4e4e7 !important}' +
1499
+ '.agents-share-bar .ash-jdot{width:6px;height:6px;border-radius:50%;flex:none}' +
1500
+ '.agents-share-bar .ash-job-run .ash-jdot{background:#fbbf24;animation:ash-pulse 2s cubic-bezier(.4,0,.6,1) infinite}' +
1501
+ '.agents-share-bar .ash-job-ready .ash-jdot{background:#34d399}' +
1502
+ '.agents-share-bar a.ash-job:hover{background:rgba(255,255,255,.1) !important}' +
1503
+ '.agents-share-bar .ash-job-fail{background:rgba(244,63,94,.18) !important;color:#fecdd3 !important}' +
1504
+ '.agents-share-bar a.ash-job-fail:hover{background:rgba(244,63,94,.26) !important}' +
1505
+ '.agents-share-bar .ash-job-fail .ash-jdot{background:#fb7185}' +
1506
+ '@keyframes ash-pulse{0%,100%{opacity:1}50%{opacity:.4}}' +
1507
+ '.agents-share-bar .ash-vis{position:relative;display:inline-flex}' +
1508
+ '.agents-share-bar .ash-chip{display:inline-flex;align-items:center;gap:7px;height:28px;padding:0 10px 0 9px;border-radius:999px;border:1px solid rgba(255,255,255,.1) !important;background:rgba(255,255,255,.05) !important;color:#e4e4e7 !important;font-size:12.5px;font-weight:500;white-space:nowrap}' +
1509
+ '.agents-share-bar .ash-cic{display:inline-flex}' +
1510
+ '.agents-share-bar .ash-copy{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 12px;border:0;border-radius:999px;cursor:pointer;background:#fafafa !important;color:#09090b !important;font-size:12.5px;font-weight:600;white-space:nowrap;box-shadow:0 6px 18px -8px rgba(255,255,255,.35);transition:background .15s cubic-bezier(.22,1,.36,1),color .15s cubic-bezier(.22,1,.36,1)}' +
1511
+ '.agents-share-bar .ash-copy:hover{background:#fff !important}' +
1512
+ '.agents-share-bar .ash-copy.ash-done{background:rgba(16,185,129,.18) !important;color:#a7f3d0 !important;box-shadow:none}' +
1513
+ '.agents-share-bar .ash-cpi{display:inline-flex}' +
1514
+ '@media(max-width:760px){.agents-share-bar .ash-when,.agents-share-bar .ash-vw{display:none}.agents-share-bar .ash-views{padding-left:0;border-left:0}}' +
1515
+ '@media(max-width:560px){.agents-share-bar{gap:8px;padding:0 10px}' +
1516
+ '.agents-share-bar .ash-handle,.agents-share-bar .ash-slash,.agents-share-bar .ash-kind,.agents-share-bar .ash-views,.agents-share-bar .ash-jtxt,.agents-share-bar .ash-clbl,.agents-share-bar .ash-caret{display:none}' +
1517
+ '.agents-share-bar .ash-chip{width:28px;padding:0;justify-content:center}.agents-share-bar .ash-copy{padding:0 10px}.agents-share-bar .ash-job{padding:0 10px}}' +
1518
+ '@media(prefers-reduced-motion:reduce){.agents-share-bar *{animation:none !important;transition:none !important}}';
1519
+
1520
+ // Owner-only chip/menu/status styling, added to the bar's <style> only when the
1521
+ // viewer owns the namespace. The menu is a glass sheet under the chip.
1449
1522
  var OWNER_BAR_CSS =
1450
- '.agents-share-bar .ash-chip-own{cursor:pointer;transition:background .12s}' +
1451
- '.agents-share-bar .ash-chip-own:hover{background:rgba(255,255,255,.06)}' +
1452
- '.agents-share-bar .ash-caret{opacity:.6;margin-left:1px;flex:none}' +
1453
- '.agents-share-bar .ash-menu{position:absolute !important;top:calc(100% + 6px);right:12px;min-width:286px;max-width:calc(100vw - 24px);background:#151517 !important;border:1px solid #2a2a30 !important;border-radius:12px;box-shadow:0 12px 34px rgba(0,0,0,.5);padding:6px;z-index:2147483647;display:none;text-align:left}' +
1454
- '.agents-share-bar .ash-menu.ash-open{display:block}' +
1455
- '.agents-share-bar .ash-menu h4{margin:6px 8px 8px;font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:#7c8290 !important;font-weight:700}' +
1456
- '.agents-share-bar .ash-opt{display:flex;width:100%;text-align:left;align-items:flex-start;gap:10px;padding:8px;border:0;background:none;border-radius:8px;cursor:pointer;color:#e8e8e8 !important;font:inherit;font-size:13px}' +
1457
- '.agents-share-bar .ash-opt:hover{background:rgba(255,255,255,.05)}' +
1458
- '.agents-share-bar .ash-opt-ic{flex:none;width:26px;height:26px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,.06)}' +
1459
- '.agents-share-bar .ash-opt-t{flex:1;min-width:0}' +
1460
- '.agents-share-bar .ash-opt-t b{display:block;font-size:13px;font-weight:600;color:#f0f1f3 !important}' +
1461
- '.agents-share-bar .ash-opt-t span{display:block;font-size:11.5px;color:#9096a0 !important;line-height:1.35;margin-top:1px;white-space:normal}' +
1462
- '.agents-share-bar .ash-rd{flex:none;width:16px;height:16px;border-radius:50%;border:2px solid #4a4f59;margin-top:3px}' +
1463
- '.agents-share-bar .ash-opt.ash-sel .ash-rd{border-color:#5b9dff;background:radial-gradient(circle at center,#5b9dff 0 5px,transparent 6px)}' +
1464
- '.agents-share-bar .ash-toast{position:absolute !important;top:calc(100% + 6px);right:12px;max-width:calc(100vw - 24px);background:#151517 !important;border:1px solid #2a2a30 !important;color:#e8e8e8 !important;font-size:12px;padding:7px 12px;border-radius:9px;display:none;align-items:center;gap:7px;z-index:2147483647}' +
1465
- '.agents-share-bar .ash-toast.ash-show{display:inline-flex}' +
1466
- '.agents-share-bar .ash-spin{width:12px;height:12px;border:2px solid rgba(255,255,255,.25);border-top-color:#fff;border-radius:50%;animation:ash-sp .6s linear infinite;display:inline-block;flex:none}' +
1523
+ '.agents-share-bar .ash-chip-own{cursor:pointer;transition:background .15s cubic-bezier(.22,1,.36,1),border-color .15s cubic-bezier(.22,1,.36,1)}' +
1524
+ '.agents-share-bar .ash-chip-own:hover{background:rgba(255,255,255,.09) !important;border-color:rgba(255,255,255,.16) !important}' +
1525
+ '.agents-share-bar .ash-caret{opacity:.55;transition:transform .2s cubic-bezier(.22,1,.36,1)}' +
1526
+ '.agents-share-bar .ash-chip-own[aria-expanded="true"] .ash-caret{transform:rotate(180deg)}' +
1527
+ '.agents-share-bar .ash-menu{position:absolute !important;top:calc(100% + 8px);right:0;width:300px;max-width:calc(100vw - 20px);padding:6px;border-radius:16px;z-index:2147483647;text-align:left;' +
1528
+ 'background:rgba(18,18,21,.95) !important;-webkit-backdrop-filter:blur(28px) saturate(1.3);backdrop-filter:blur(28px) saturate(1.3);border:1px solid rgba(255,255,255,.1) !important;box-shadow:0 24px 60px -12px rgba(0,0,0,.75);' +
1529
+ 'visibility:hidden;opacity:0;transform:translateY(-4px);transition:opacity .18s cubic-bezier(.22,1,.36,1),transform .18s cubic-bezier(.22,1,.36,1),visibility 0s linear .18s}' +
1530
+ '.agents-share-bar .ash-menu.ash-open{visibility:visible;opacity:1;transform:none;transition-delay:0s}' +
1531
+ '.agents-share-bar .ash-menu h4{margin:6px 10px;font-size:10.5px;font-weight:500;line-height:1;letter-spacing:.12em;text-transform:uppercase;color:#71717a !important}' +
1532
+ '.agents-share-bar .ash-opt{display:grid;grid-template-columns:28px 1fr 16px;gap:10px;align-items:start;width:100%;padding:9px 10px;border:0;border-radius:11px;background:none !important;text-align:left;cursor:pointer;color:#e4e4e7 !important;transition:background .15s cubic-bezier(.22,1,.36,1)}' +
1533
+ '.agents-share-bar .ash-opt:hover,.agents-share-bar .ash-opt:focus-visible{background:rgba(255,255,255,.05) !important}' +
1534
+ '.agents-share-bar .ash-opt[aria-checked="true"]{background:rgba(255,255,255,.07) !important}' +
1535
+ '.agents-share-bar .ash-oic{width:28px;height:28px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,.05) !important}' +
1536
+ '.agents-share-bar .ash-opt-t{min-width:0}' +
1537
+ '.agents-share-bar .ash-opt-t b{display:block;font-size:13px;font-weight:500;line-height:1.3;color:#fafafa !important}' +
1538
+ '.agents-share-bar .ash-opt-t span{display:block;margin-top:2px;font-size:11.5px;line-height:1.4;color:#a1a1aa !important;white-space:normal}' +
1539
+ '.agents-share-bar .ash-chk{margin-top:6px;color:#fafafa !important;opacity:0;transition:opacity .15s cubic-bezier(.22,1,.36,1)}' +
1540
+ '.agents-share-bar .ash-opt[aria-checked="true"] .ash-chk{opacity:1}' +
1541
+ '.agents-share-bar .ash-save{display:none;align-items:center;gap:6px;font-size:12px;color:#a1a1aa !important;white-space:nowrap}' +
1542
+ '.agents-share-bar .ash-save.ash-on{display:inline-flex}' +
1543
+ '.agents-share-bar .ash-save.ash-ok{color:#34d399 !important}' +
1544
+ '.agents-share-bar .ash-spin{width:11px;height:11px;border:1.5px solid rgba(255,255,255,.2);border-top-color:#fafafa;border-radius:50%;animation:ash-sp .7s linear infinite;display:inline-block;flex:none}' +
1467
1545
  '@keyframes ash-sp{to{transform:rotate(360deg)}}' +
1468
- '.agents-share-bar .ash-ok{color:#30a46c;font-weight:700}' +
1469
- '.agents-share-bar .ash-err{color:#ff6b6b;font-weight:700}';
1546
+ '.agents-share-bar .ash-note{position:absolute !important;top:calc(100% + 8px);right:0;width:max-content;max-width:min(320px,calc(100vw - 20px));padding:9px 12px;border-radius:12px;font-size:12px;line-height:1.4;white-space:normal;' +
1547
+ 'background:rgba(18,18,21,.95) !important;border:1px solid rgba(244,63,94,.35) !important;color:#fecdd3 !important;box-shadow:0 24px 60px -12px rgba(0,0,0,.75);display:none}' +
1548
+ '.agents-share-bar .ash-note.ash-on{display:block}';
1549
+
1550
+ var BAR_FONTS = { '__fonts/inter.woff2': barInter, '__fonts/jost.woff2': barJost };
1551
+
1552
+ function handleFont(request, path) {
1553
+ var headers = {
1554
+ 'content-type': 'font/woff2',
1555
+ 'cache-control': 'public, max-age=604800',
1556
+ 'access-control-allow-origin': '*',
1557
+ };
1558
+ return new Response(request.method === 'HEAD' ? null : BAR_FONTS[path], { status: 200, headers: headers });
1559
+ }
1470
1560
 
1471
1561
  function injectAttributionBar(html, meta, handle, opts) {
1472
1562
  var bar = renderAttributionBar(meta, handle, opts);
@@ -1505,30 +1595,37 @@ function renderAssetViewer(pathname, kind, meta, handle, opts) {
1505
1595
  var rawUrl = escapeHtml(pathname + '?raw=1');
1506
1596
  var name = '';
1507
1597
  try { name = decodeURIComponent(pathname.split('/').pop() || 'file'); } catch (e) { name = pathname.split('/').pop() || 'file'; }
1508
- var bar = renderAttributionBar(meta, handle, opts);
1509
- if (kind === 'video' && opts && opts.media) {
1510
- var title = opts.media.summary && opts.media.summary.title ? opts.media.summary.title : name;
1598
+ var o = opts || {};
1599
+ var media = kind === 'video' ? o.media : null;
1600
+ var summaryTitle = media && media.summary && media.summary.title ? media.summary.title : '';
1601
+ var bar = renderAttributionBar(meta, handle, Object.assign({}, o, {
1602
+ title: summaryTitle || (meta && meta.label) || name,
1603
+ kind: kind,
1604
+ media: media,
1605
+ }));
1606
+ if (media) {
1607
+ var title = summaryTitle || name;
1511
1608
  return '<!doctype html><html><head><meta charset="utf-8">' +
1512
1609
  '<meta name="viewport" content="width=device-width,initial-scale=1">' +
1513
1610
  '<title>' + escapeHtml(title) + '</title>' +
1514
1611
  '<style>' + MEDIA_VIEWER_CSS + '</style></head><body>' + bar +
1515
1612
  renderMediaPanels(pathname, opts.media, { canRetry: !!opts.canRetry }) + '</body></html>';
1516
1613
  }
1517
- var media = '';
1518
- if (kind === 'image') media = '<img src="' + rawUrl + '" alt="' + escapeHtml(name) + '">';
1519
- else if (kind === 'video') media = '<video src="' + rawUrl + '" controls playsinline></video>';
1520
- else if (kind === 'audio') media = '<audio src="' + rawUrl + '" controls></audio>';
1521
- else if (kind === 'pdf') media = '<iframe src="' + rawUrl + '" title="' + escapeHtml(name) + '"></iframe>';
1614
+ var asset = '';
1615
+ if (kind === 'image') asset = '<img src="' + rawUrl + '" alt="' + escapeHtml(name) + '">';
1616
+ else if (kind === 'video') asset = '<video src="' + rawUrl + '" controls playsinline></video>';
1617
+ else if (kind === 'audio') asset = '<audio src="' + rawUrl + '" controls></audio>';
1618
+ else if (kind === 'pdf') asset = '<iframe src="' + rawUrl + '" title="' + escapeHtml(name) + '"></iframe>';
1522
1619
  return '<!doctype html><html><head><meta charset="utf-8">' +
1523
1620
  '<meta name="viewport" content="width=device-width,initial-scale=1">' +
1524
1621
  '<title>' + escapeHtml(name) + '</title>' +
1525
- '<style>html,body{margin:0;background:#0f0f11}' +
1526
- 'body{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box}' +
1622
+ '<style>html,body{margin:0;background:#09090b}' +
1623
+ 'body{min-height:calc(100vh - 46px);display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box}' +
1527
1624
  '.ashv{max-width:100%;max-height:calc(100vh - 90px);display:flex;align-items:center;justify-content:center}' +
1528
1625
  '.ashv img,.ashv video{max-width:100%;max-height:calc(100vh - 90px);display:block;border-radius:8px;box-shadow:0 10px 40px rgba(0,0,0,.5)}' +
1529
1626
  '.ashv audio{width:min(90vw,560px)}' +
1530
1627
  '.ashv iframe{width:min(94vw,1000px);height:calc(100vh - 90px);border:0;border-radius:8px;background:#fff}' +
1531
- '</style></head><body>' + bar + '<div class="ashv">' + media + '</div></body></html>';
1628
+ '</style></head><body>' + bar + '<div class="ashv">' + asset + '</div></body></html>';
1532
1629
  }
1533
1630
 
1534
1631
  // --- Hosted review threads (PHNX-3835) ---------------------------------------
@@ -1 +1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Copyright 2020 The Jost Project Authors (https://github.com/indestructible-type/Jost) Jost-Italic[wght].ttf: Copyright 2020 The Jost Project Authors (https://github.com/indestructible-type/Jost)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ http://scripts.sil.org/OFL
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file
package/fonts/README.md CHANGED
@@ -7,10 +7,17 @@ JetBrains Mono instead of hoping the viewing machine has them installed.
7
7
  |---|---|---|---|
8
8
  | `InterVariable.woff2` | Inter | latin variable (`wght`) | SIL OFL 1.1 — `Inter-OFL.txt` |
9
9
  | `JetBrainsMono-wght.woff2` | JetBrains Mono | latin variable (`wght`) | SIL OFL 1.1 — `JetBrainsMono-OFL.txt` |
10
+ | `Jost-wght.woff2` | Jost | latin variable (`wght`) | SIL OFL 1.1 — `Jost-OFL.txt` |
10
11
 
11
- Latin-only variable cuts from [fontsource](https://fontsource.org/) 5.2.8, same
12
- families as [rsms/inter](https://github.com/rsms/inter) and
13
- [JetBrains/JetBrainsMono](https://github.com/JetBrains/JetBrainsMono).
12
+ Latin-only variable cuts from [fontsource](https://fontsource.org/) (Inter and
13
+ JetBrains Mono 5.2.8, Jost 5.3.0), same families as
14
+ [rsms/inter](https://github.com/rsms/inter),
15
+ [JetBrains/JetBrainsMono](https://github.com/JetBrains/JetBrainsMono) and
16
+ [indestructible-type/Jost](https://github.com/indestructible-type/Jost).
14
17
 
15
18
  `src/lib/fonts.ts` inlines these when `DESIGN.md` names the family and does not
16
19
  supply a resolvable `fonts.files` path. A project face still wins.
20
+
21
+ The share Worker also bundles `InterVariable.woff2` and `Jost-wght.woff2` and
22
+ serves them at `/__fonts/inter.woff2` and `/__fonts/jost.woff2` for the share
23
+ bar and the video page, so a shared page never calls a third-party font host.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phnx-labs/artifacts-cli",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "Your coding agent writes Markdown; artifacts turns it into one polished HTML page you can read, mark up and share as a link.",
5
5
  "homepage": "https://artifacts-cli.sh",
6
6
  "repository": {