ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/design-studio-mcp / photoshop-uxp/main.js

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/design-studio-mcp / photoshop-uxp/main.js
DateNot specified in source
RepositoryJanady13/design-studio-mcp
Revisionddff25da7f0ff1835cf273349fa8c71ce09857e4
Branchmain
Path or archive memberphotoshop-uxp/main.js
Original SHA-25646880c4458854cb44cafa0b0a1285dad8af34ad33b9bdee3e695b32e57ef7859
Git blob SHA0c367e9dd625b8fc876501550745a9fa21005c04
Reading-copy SHA-25646880c4458854cb44cafa0b0a1285dad8af34ad33b9bdee3e695b32e57ef7859

Original source ↗

Recovered source transcript

const { entrypoints } = require("uxp"); const photoshop = require("photoshop"); const { app, core } = photoshop; function setStatus(message) { const node = document.getElementById("status"); if (node) node.textContent = message; } function getActiveDocument() { if (!app.documents || app.documents.length === 0) return null; return app.activeDocument; } function refreshDocumentStatus() { const node = document.getElementById("documentStatus"); if (!node) return; const doc = getActiveDocument(); if (!doc) { node.textContent = "No Photoshop document is open."; return; } node.textContent = `${doc.title || doc.name || "Untitled"} — ${doc.width} × ${doc.height}`; } function showLayerNames() { const list = document.getElementById("layers"); const doc = getActiveDocument(); if (!doc) { list.textContent = "Open a Photoshop document first."; setStatus("No active document."); refreshDocumentStatus(); return; } const layers = Array.from(doc.layers || []); if (layers.length === 0) { list.textContent = "This document has no top-level layers."; setStatus("Layer list refreshed."); return; } const sorted = layers .map(layer => ({ name: layer.name, kind: layer.kind })) .sort((a, b) => a.name.localeCompare(b.name)); list.innerHTML = `<ul>${sorted .map(layer => `<li>${escapeHtml(layer.name)}</li>`) .join("")}</ul>`; setStatus(`${sorted.length} top-level layer${sorted.length === 1 ? "" : "s"} found.`); refreshDocumentStatus(); } function escapeHtml(value) { return String(value) .replace(/&/g, "&amp;") .replace(/</g, "&lt;") .replace(/>/g, "&gt;") .replace(/\"/g, "&quot;") .replace(/'/g, "&#039;"); } async function inspectDocument() { const doc = getActiveDocument(); if (!doc) { setStatus("Open a Photoshop document first."); refreshDocumentStatus(); return; } showLayerNames(); setStatus(`Inspected ${doc.title || doc.name || "active document"}.`); } async function createFrameGroup() { const doc = getActiveDocument(); if (!doc) { setStatus("Open a Photoshop document first."); return; } try { await core.executeAsModal(async () => { const group = await doc.createLayerGroup({ name: "FRAME_001" }); if (group) { setStatus("Created FRAME_001 group."); } }, { commandName: "Create Animation Frame Group" }); showLayerNames(); } catch (error) { console.error(error); setStatus(`Could not create frame group: ${error.message}`); } } function wirePanel() { const btnPopulate = document.getElementById("btnPopulate"); const btnInspect = document.getElementById("btnInspect"); const btnFrameGroup = document.getElementById("btnFrameGroup"); if (btnPopulate) btnPopulate.addEventListener("click", showLayerNames); if (btnInspect) btnInspect.addEventListener("click", inspectDocument); if (btnFrameGroup) btnFrameGroup.addEventListener("click", createFrameGroup); refreshDocumentStatus(); showLayerNames(); } entrypoints.setup({ panels: { designStudio: { show() { wirePanel(); } } } });

Search equations, builds, manuscript text, and recovered sources.