heyiam 0.2.23 → 0.2.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mount.js CHANGED
@@ -23069,12 +23069,19 @@
23069
23069
  const [active, setActive] = (0, import_react3.useState)(null);
23070
23070
  showOverlay = (session) => setActive(session);
23071
23071
  if (!active) return null;
23072
- const projectEl = document.querySelector("[data-session-base-url]");
23072
+ const projectEl = document.querySelector(".heyiam-project");
23073
23073
  const baseUrl = projectEl?.getAttribute("data-session-base-url");
23074
23074
  let sessionPageUrl;
23075
23075
  if (baseUrl) {
23076
23076
  const slug = active.title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, 80) || "untitled";
23077
23077
  sessionPageUrl = `${baseUrl}/${slug}.html`;
23078
+ } else {
23079
+ const username = projectEl?.getAttribute("data-username");
23080
+ const projectSlug = projectEl?.getAttribute("data-project-slug");
23081
+ const sessionSlug = active.slug;
23082
+ if (username && projectSlug && sessionSlug) {
23083
+ sessionPageUrl = `/@${username}/${projectSlug}/${sessionSlug}`;
23084
+ }
23078
23085
  }
23079
23086
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
23080
23087
  SessionOverlay,
@@ -80,7 +80,7 @@ export function renderProject(data, extras) {
80
80
  // Use full session data when available (charts need complete Session objects).
81
81
  // Strip rawLog and turnTimeline — huge, unused by charts, and could break HTML attributes.
82
82
  const chartSessions = (extras?.fullSessions ?? allSessions.map((s) => ({
83
- id: s.token, title: s.title, date: s.recordedAt,
83
+ id: s.token, slug: s.slug, title: s.title, date: s.recordedAt,
84
84
  durationMinutes: s.durationMinutes, turns: s.turns,
85
85
  linesOfCode: s.locChanged, status: 'enhanced',
86
86
  projectName: data.project.title, rawLog: [],
@@ -1,4 +1,4 @@
1
- <div class="heyiam-project" data-render-version="2"{% if sessionBaseUrl %} data-session-base-url="{{ sessionBaseUrl }}"{% endif %}>
1
+ <div class="heyiam-project" data-render-version="2"{% if sessionBaseUrl %} data-session-base-url="{{ sessionBaseUrl }}"{% endif %} data-username="{{ user.username }}" data-project-slug="{{ project.slug }}">
2
2
 
3
3
  {%- comment -%} Title {%- endcomment -%}
4
4
  <h1 class="project-title">{{ project.title }}</h1>
@@ -219,7 +219,11 @@
219
219
 
220
220
  {%- comment -%} Footer {%- endcomment -%}
221
221
  <div class="export-footer">
222
+ {% if sessionBaseUrl %}
222
223
  <span class="export-footer__text">exported from heyi.am</span>
224
+ {% else %}
225
+ <span class="export-footer__text">built with <a href="https://heyiam.com" target="_blank" rel="noopener noreferrer">heyiam.com</a></span>
226
+ {% endif %}
223
227
  </div>
224
228
 
225
229
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heyiam",
3
- "version": "0.2.23",
3
+ "version": "0.2.24",
4
4
  "description": "Turn AI coding sessions into portfolio case studies",
5
5
  "type": "module",
6
6
  "license": "MIT",