2026-05-28 00:58:57 -04:00
|
|
|
// Asset library — v2.1.0
|
|
|
|
|
// Handles: asset grid render, card selection, details panel, tabs, growing poll.
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
|
const Library = {};
|
|
|
|
|
|
2026-05-28 00:58:57 -04:00
|
|
|
Library.state = {
|
|
|
|
|
assets: [],
|
|
|
|
|
growing: [],
|
|
|
|
|
selectedId: null,
|
|
|
|
|
currentTab: 'library', // 'library' | 'growing'
|
|
|
|
|
projects: [],
|
|
|
|
|
selectedProject: 'all',
|
|
|
|
|
searchQuery: '',
|
|
|
|
|
_growingTimer: null,
|
|
|
|
|
_livePolls: {}, // assetId → intervalId (status poll for live → ready)
|
|
|
|
|
_importedAssets: JSON.parse(localStorage.getItem('df.uxp.imported') || '{}'),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// ── Project filter ──────────────────────────────────────────────
|
|
|
|
|
Library.loadProjects = async function () {
|
|
|
|
|
try {
|
|
|
|
|
const projects = await API.listProjects();
|
|
|
|
|
Library.state.projects = projects;
|
|
|
|
|
const sel = document.getElementById('project-filter');
|
|
|
|
|
sel.innerHTML = '<option value="all">All Projects</option>';
|
|
|
|
|
projects.forEach(p => {
|
|
|
|
|
const o = document.createElement('option');
|
|
|
|
|
o.value = p.id; o.textContent = p.name;
|
|
|
|
|
sel.appendChild(o);
|
|
|
|
|
});
|
|
|
|
|
// Also populate export project selects
|
|
|
|
|
['export-proj-select'].forEach(id => {
|
|
|
|
|
const el = document.getElementById(id);
|
|
|
|
|
if (!el) return;
|
|
|
|
|
el.innerHTML = '<option value="">— Select project —</option>';
|
|
|
|
|
projects.forEach(p => {
|
|
|
|
|
const o = document.createElement('option');
|
|
|
|
|
o.value = p.id; o.textContent = p.name;
|
|
|
|
|
el.appendChild(o);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
} catch (e) {
|
|
|
|
|
console.warn('loadProjects:', e.message);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// ── Tab switching ───────────────────────────────────────────────
|
|
|
|
|
Library.switchTab = function (tab) {
|
|
|
|
|
Library.state.currentTab = tab;
|
|
|
|
|
document.getElementById('tab-library').classList.toggle('active', tab === 'library');
|
|
|
|
|
document.getElementById('tab-growing').classList.toggle('active', tab === 'growing');
|
|
|
|
|
document.getElementById('library-container').classList.toggle('hidden', tab !== 'library');
|
|
|
|
|
document.getElementById('growing-container').classList.toggle('hidden', tab !== 'growing');
|
|
|
|
|
Library.hideDetails();
|
|
|
|
|
if (tab === 'library') Library.refresh(Library.state.searchQuery);
|
|
|
|
|
else Library._pollGrowing();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// ── Growing poll ────────────────────────────────────────────────
|
|
|
|
|
Library.startGrowingPoll = function () {
|
|
|
|
|
Library.stopGrowingPoll();
|
|
|
|
|
Library._pollGrowing();
|
|
|
|
|
Library.state._growingTimer = setInterval(Library._pollGrowing, 5000);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Library.stopGrowingPoll = function () {
|
|
|
|
|
if (Library.state._growingTimer) {
|
|
|
|
|
clearInterval(Library.state._growingTimer);
|
|
|
|
|
Library.state._growingTimer = null;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Library._pollGrowing = async function () {
|
|
|
|
|
if (!API.state.connected) return;
|
|
|
|
|
try {
|
|
|
|
|
const data = await API.listAssets(Library.state.searchQuery, Library.state.selectedProject);
|
|
|
|
|
const all = (data && (data.assets || data.rows)) || [];
|
|
|
|
|
Library.state.growing = all.filter(a =>
|
|
|
|
|
a.status === 'live' || a.status === 'ingesting' || a.status === 'processing' ||
|
|
|
|
|
(a.status === 'ready' && Library.state._importedAssets['live:' + a.id])
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const active = Library.state.growing.filter(a =>
|
|
|
|
|
a.status === 'live' || a.status === 'ingesting' || a.status === 'processing'
|
|
|
|
|
).length;
|
|
|
|
|
const badge = document.getElementById('growing-count');
|
|
|
|
|
badge.textContent = active;
|
|
|
|
|
badge.style.display = active > 0 ? 'inline-flex' : 'none';
|
|
|
|
|
|
|
|
|
|
if (Library.state.currentTab === 'growing') {
|
|
|
|
|
Library._renderGrid('growing-grid', Library.state.growing);
|
|
|
|
|
}
|
|
|
|
|
} catch (_) {}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// ── Asset refresh ───────────────────────────────────────────────
|
|
|
|
|
Library.refresh = async function (query) {
|
|
|
|
|
Library.state.searchQuery = query || '';
|
|
|
|
|
const grid = document.getElementById('asset-grid');
|
|
|
|
|
grid.innerHTML = '<div class="empty muted">Loading…</div>';
|
|
|
|
|
try {
|
|
|
|
|
const data = await API.listAssets(Library.state.searchQuery, Library.state.selectedProject);
|
|
|
|
|
Library.state.assets = (data && (data.assets || data.rows)) || [];
|
|
|
|
|
Library._renderGrid('asset-grid', Library.state.assets);
|
|
|
|
|
UI.toast('Loaded ' + Library.state.assets.length + ' assets', 'ok');
|
|
|
|
|
} catch (e) {
|
|
|
|
|
grid.innerHTML = '<div class="empty muted">Error: ' + e.message + '</div>';
|
|
|
|
|
UI.toast('Asset load failed: ' + e.message, 'error');
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// ── Grid render ─────────────────────────────────────────────────
|
|
|
|
|
Library._renderGrid = function (gridId, assets) {
|
|
|
|
|
const grid = document.getElementById(gridId);
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
grid.innerHTML = '';
|
2026-05-28 00:58:57 -04:00
|
|
|
if (!assets.length) {
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
const e = document.createElement('div');
|
|
|
|
|
e.className = 'empty muted';
|
2026-05-28 00:58:57 -04:00
|
|
|
e.textContent = gridId === 'growing-grid' ? 'No growing files' : 'No assets';
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
grid.appendChild(e);
|
|
|
|
|
return;
|
|
|
|
|
}
|
2026-05-28 00:58:57 -04:00
|
|
|
assets.forEach(a => grid.appendChild(Library._makeCard(a)));
|
|
|
|
|
Library._syncActions();
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
};
|
|
|
|
|
|
2026-05-28 00:58:57 -04:00
|
|
|
Library._makeCard = function (asset) {
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
const card = document.createElement('div');
|
|
|
|
|
card.className = 'asset-card';
|
|
|
|
|
if (asset.id === Library.state.selectedId) card.classList.add('selected');
|
|
|
|
|
card.dataset.assetId = asset.id;
|
|
|
|
|
|
2026-05-28 00:58:57 -04:00
|
|
|
// Thumbnail
|
|
|
|
|
const thumbUrl = `${API.state.serverUrl}/api/v1/assets/${asset.id}/thumbnail?redirect=1`;
|
|
|
|
|
const img = document.createElement('img');
|
|
|
|
|
img.className = 'asset-thumb';
|
|
|
|
|
img.alt = asset.display_name || asset.filename || asset.id;
|
|
|
|
|
img.src = thumbUrl;
|
|
|
|
|
img.onerror = () => {
|
|
|
|
|
const p = document.createElement('div');
|
|
|
|
|
p.className = 'asset-thumb-placeholder';
|
|
|
|
|
p.textContent = 'no preview';
|
|
|
|
|
img.replaceWith(p);
|
|
|
|
|
};
|
|
|
|
|
card.appendChild(img);
|
|
|
|
|
|
|
|
|
|
// Status badge
|
|
|
|
|
const status = (asset.status || 'ready').toLowerCase();
|
|
|
|
|
const badge = document.createElement('div');
|
|
|
|
|
badge.className = 'asset-status status-' + status;
|
|
|
|
|
badge.textContent = status.toUpperCase();
|
|
|
|
|
card.appendChild(badge);
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
|
2026-05-28 00:58:57 -04:00
|
|
|
// Info row
|
|
|
|
|
const info = document.createElement('div');
|
|
|
|
|
info.className = 'asset-info';
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
const name = document.createElement('div');
|
|
|
|
|
name.className = 'asset-name';
|
2026-05-28 00:58:57 -04:00
|
|
|
name.title = asset.display_name || asset.filename || asset.id;
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
name.textContent = asset.display_name || asset.filename || asset.id;
|
2026-05-28 00:58:57 -04:00
|
|
|
info.appendChild(name);
|
|
|
|
|
|
|
|
|
|
const meta = document.createElement('div');
|
|
|
|
|
meta.className = 'asset-meta';
|
|
|
|
|
const dur = asset.duration_ms ? UI.formatDuration(asset.duration_ms / 1000) : (status === 'live' ? 'LIVE' : '—');
|
|
|
|
|
const codec = asset.codec || asset.media_type || '';
|
|
|
|
|
meta.textContent = dur + (codec ? ' · ' + codec.toUpperCase() : '');
|
|
|
|
|
info.appendChild(meta);
|
|
|
|
|
card.appendChild(info);
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
|
|
|
|
|
card.addEventListener('click', () => Library.select(asset.id));
|
|
|
|
|
return card;
|
2026-05-28 00:58:57 -04:00
|
|
|
};
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
|
2026-05-28 00:58:57 -04:00
|
|
|
// ── Selection ───────────────────────────────────────────────────
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
Library.select = function (id) {
|
|
|
|
|
Library.state.selectedId = id;
|
2026-05-28 00:58:57 -04:00
|
|
|
// Re-render selection highlight without full refresh
|
|
|
|
|
document.querySelectorAll('.asset-card').forEach(c => {
|
|
|
|
|
c.classList.toggle('selected', c.dataset.assetId === id);
|
|
|
|
|
});
|
|
|
|
|
const asset = Library.selectedAsset();
|
|
|
|
|
if (asset) Library._showDetails(asset);
|
|
|
|
|
Library._syncActions();
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Library.selectedAsset = function () {
|
2026-05-28 00:58:57 -04:00
|
|
|
const all = Library.state.currentTab === 'growing'
|
|
|
|
|
? Library.state.growing : Library.state.assets;
|
|
|
|
|
return all.find(a => a.id === Library.state.selectedId) || null;
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
};
|
|
|
|
|
|
2026-05-28 00:58:57 -04:00
|
|
|
Library.hideDetails = function () {
|
|
|
|
|
Library.state.selectedId = null;
|
|
|
|
|
document.getElementById('details-panel').classList.add('hidden');
|
|
|
|
|
Library._syncActions();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Library._showDetails = function (asset) {
|
|
|
|
|
const p = document.getElementById('details-panel');
|
|
|
|
|
p.classList.remove('hidden');
|
|
|
|
|
document.getElementById('d-filename').textContent = asset.display_name || asset.filename || '—';
|
|
|
|
|
document.getElementById('d-codec').textContent = asset.codec || asset.media_type || '—';
|
|
|
|
|
document.getElementById('d-res').textContent = asset.resolution || '—';
|
|
|
|
|
document.getElementById('d-fps').textContent = asset.fps ? asset.fps + ' fps' : '—';
|
|
|
|
|
document.getElementById('d-dur').textContent = asset.duration_ms ? UI.formatDuration(asset.duration_ms / 1000) : '—';
|
|
|
|
|
document.getElementById('d-size').textContent = asset.file_size ? UI.formatBytes(Number(asset.file_size)) : '—';
|
|
|
|
|
const tagsEl = document.getElementById('d-tags');
|
|
|
|
|
tagsEl.innerHTML = '';
|
|
|
|
|
const tags = asset.tags || [];
|
|
|
|
|
if (tags.length) {
|
|
|
|
|
tags.forEach(t => {
|
|
|
|
|
const s = document.createElement('span');
|
|
|
|
|
s.className = 'tag'; s.textContent = t;
|
|
|
|
|
tagsEl.appendChild(s);
|
|
|
|
|
});
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
} else {
|
2026-05-28 00:58:57 -04:00
|
|
|
tagsEl.innerHTML = '<span class="muted">—</span>';
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2026-05-28 00:58:57 -04:00
|
|
|
Library._syncActions = function () {
|
|
|
|
|
const sel = Library.selectedAsset();
|
|
|
|
|
const live = sel && sel.status === 'live';
|
|
|
|
|
const ready = sel && sel.status === 'ready';
|
|
|
|
|
const hasLiveImport = sel && !!Library.state._importedAssets['live:' + sel.id];
|
|
|
|
|
|
|
|
|
|
_btn('import-proxy-btn').disabled = !sel || live;
|
|
|
|
|
_btn('import-hires-btn').disabled = !sel || live || !sel.original_s3_key;
|
|
|
|
|
_btn('mount-live-btn').disabled = !sel || !live;
|
|
|
|
|
_btn('relink-btn').disabled = !(ready && hasLiveImport);
|
|
|
|
|
_btn('import-all-btn').disabled = Library.state.currentTab !== 'library';
|
|
|
|
|
_btn('export-timeline-btn').disabled = false; // available once connected
|
|
|
|
|
_btn('export-conform-btn').disabled = false;
|
|
|
|
|
_btn('fetch-relink-btn').disabled = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function _btn(id) { return document.getElementById(id) || { disabled: false }; }
|
|
|
|
|
|
|
|
|
|
// ── Import mapping persistence ──────────────────────────────────
|
|
|
|
|
Library.recordImport = function (key, entry) {
|
|
|
|
|
Library.state._importedAssets[key] = entry;
|
|
|
|
|
try { localStorage.setItem('df.uxp.imported', JSON.stringify(Library.state._importedAssets)); } catch (_) {}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Library.getImport = function (key) {
|
|
|
|
|
return Library.state._importedAssets[key] || null;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Library.resolveClipsToAssets = function (clips) {
|
|
|
|
|
return clips.map(clip => {
|
|
|
|
|
const byPath = Library.getImport(clip.filePath);
|
|
|
|
|
const byName = Library.getImport('name:' + clip.fileName);
|
|
|
|
|
const entry = byPath || byName;
|
|
|
|
|
return Object.assign({}, clip, { asset_id: entry ? entry.assetId : null });
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// ── Live status poll (single asset: live → ready) ───────────────
|
|
|
|
|
Library.startLiveStatusPoll = function (assetId) {
|
|
|
|
|
if (Library.state._livePolls[assetId]) return;
|
|
|
|
|
Library.state._livePolls[assetId] = setInterval(async () => {
|
|
|
|
|
try {
|
|
|
|
|
const a = await API.getAsset(assetId);
|
|
|
|
|
if (a.status === 'ready') {
|
|
|
|
|
clearInterval(Library.state._livePolls[assetId]);
|
|
|
|
|
delete Library.state._livePolls[assetId];
|
|
|
|
|
UI.toast('"' + (a.display_name || assetId) + '" finalized — Relink Hi-Res available', 'ok');
|
|
|
|
|
if (Library.state.selectedId === assetId) {
|
|
|
|
|
Library._showDetails(a);
|
|
|
|
|
Library._syncActions();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (_) {}
|
|
|
|
|
}, 5000);
|
feat(premiere-plugin-uxp): v2.0.0 — UXP port replacing CEP for import
CEP `csInterface.evalScript` callback is broken in Premiere Pro 26.0.x —
nothing called from the panel ever returns, so importFiles deadlocks. Adobe's
path forward is UXP. This is the minimum viable port that restores the
Import Proxy / Import Hi-Res workflow.
Scope (v2.0.0):
- Connect to a Dragonflight server (URL + Bearer token; persisted)
- Asset library (search, refresh, grid with thumbnails)
- Import Proxy via streamed download → Project.importFiles
- Import Hi-Res via presigned S3 URL → Project.importFiles
Layout:
manifest.json UXP v5, host=premierepro, minVersion=26.0.0
index.html Panel shell
styles.css Mirrors web UI dark tokens
src/ui.js DOM helpers, toast, progress, formatting
src/api.js HTTP client (Bearer; manual redirect-follow drops auth
when hopping to a different host per UXP security policy)
src/library.js Asset grid render + selection
src/import-flow.js Streaming download (fs.createWriteStream) +
premierepro.Project.importFiles into rootBin
src/main.js Bootstrap, event wiring
build/pack.mjs Packs into .ccx; installs via UnifiedPluginInstallerAgent
Coexists with services/premiere-plugin/ (CEP) — keeps the CEP panel for any
features that still work there while running v2.0.0 for import. Future v2.x
will add live preview, conform, timeline export, settings.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:19:28 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
window.Library = Library;
|
|
|
|
|
})();
|