@hyperframes/studio-server 0.8.77 → 0.8.79

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.
@@ -1,4 +1,4 @@
1
- export { g as PreviewApiAdapter, P as PreviewDocumentStore, n as injectMediaCodecMap, p as injectMediaCodecMapIntoHtml, q as isAutoProxyEnabled, r as proxyEtagSalt, s as resolvePreviewMediaCodecProbeCache } from '../mediaProxyPreview-CIayJ4Y4.js';
1
+ export { k as PreviewApiAdapter, a as PreviewDocumentStore, s as injectMediaCodecMap, t as injectMediaCodecMapIntoHtml, u as isAutoProxyEnabled, v as proxyEtagSalt, w as resolvePreviewMediaCodecProbeCache } from '../mediaProxyPreview-rAYw-Jeh.js';
2
2
  import './mediaCodecMap.js';
3
3
  import '@hyperframes/core';
4
4
  import '@hyperframes/parsers';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Hono } from 'hono';
2
- import { S as StudioApiAdapter, P as PreviewDocumentStore, M as MediaProcessingJobState } from './mediaProxyPreview-CIayJ4Y4.js';
3
- export { D as DEFAULT_HISTORY_ROOT, a as HISTORY_START, H as HistoryEntry, b as HistoryFileChange, c as HistoryListItem, d as HistoryResult, e as HistoryWho, f as HistoryWindow, L as LintResult, g as PreviewApiAdapter, h as ProjectHistory, i as ProjectHistoryOptions, R as RenderJobState, j as ResolvedProject, k as StudioSelectionResponse, l as StudioSelectionSnapshot, m as StudioSelectionTextField, o as openProjectHistory } from './mediaProxyPreview-CIayJ4Y4.js';
2
+ import { S as StudioApiAdapter, P as ProjectHistory, a as PreviewDocumentStore, M as MediaProcessingJobState } from './mediaProxyPreview-rAYw-Jeh.js';
3
+ export { C as ClosedWindow, D as DEFAULT_HISTORY_ROOT, b as HISTORY_START, H as HistoryClosedError, c as HistoryEntry, d as HistoryEntrySide, e as HistoryFileChange, f as HistoryListItem, g as HistoryResult, h as HistoryWho, i as HistoryWindow, L as LintResult, j as MAX_WINDOW_IDLE_MS, k as PreviewApiAdapter, l as ProjectHistoryOptions, R as RenderJobState, m as ResolvedProject, n as StudioSelectionResponse, o as StudioSelectionSnapshot, p as StudioSelectionTextField, U as UNDO_MODES, q as UndoMode, r as openProjectHistory } from './mediaProxyPreview-rAYw-Jeh.js';
4
4
  import { SourceMutationTarget } from './helpers/sourceMutation.js';
5
5
  export { PatchOperation, dedupeClonedCompositionId, findTargetElement, parseSourceDocument, patchElementInHtml, removeElementFromHtml, splitElementInHtml } from './helpers/sourceMutation.js';
6
6
  export { ScreenshotClip, getElementScreenshotClip } from './helpers/screenshotClip.js';
@@ -57,7 +57,18 @@ declare class HistoryBusyError extends Error {
57
57
  constructor(pid: number);
58
58
  }
59
59
 
60
- /** Recursively walk a directory and return relative file paths. */
60
+ type Opened = Promise<ProjectHistory | null>;
61
+ /** A host's histories, one per project folder, opened on first use; a new project at the path gets its own. */
62
+ declare function historyCache(open: (projectDir: string) => Opened): {
63
+ get: (projectDir: string) => Promise<ProjectHistory | null>;
64
+ /** The history if one was opened, without opening it. */
65
+ peek: (projectDir: string) => Opened | undefined;
66
+ forget: (projectDir: string) => boolean;
67
+ closeAll: () => Promise<(void | undefined)[]>;
68
+ };
69
+
70
+ /** Recursively walk a directory and return relative file paths. A subfolder that is unreadable
71
+ * or removed mid-walk is skipped; any other failure, or an unreadable `dir` itself, throws. */
61
72
  declare function walkDir(dir: string, prefix?: string): string[];
62
73
 
63
74
  /** Pins hf-ids into every composition in the project. A host runs it once before it serves or
@@ -98,6 +109,7 @@ declare const PREVIEW_BUNDLE_OPTIONS: {
98
109
  readonly runtime: "placeholder";
99
110
  readonly inlineAssets: false;
100
111
  readonly staticGuard: false;
112
+ readonly sceneParts: true;
101
113
  };
102
114
 
103
115
  /** One built preview document on disk. `salt` names the server build, so new code never reads
@@ -135,7 +147,7 @@ declare function settledFileTag(stat: {
135
147
  * an unlabelled change and reloading the preview on Studio's own edit. Only the
136
148
  * TTL removes a receipt.
137
149
  */
138
- declare function identifyFileWrite(absPath: string, expectedVersion: string): FileWriteReceipt | null;
150
+ declare function identifyFileWrite(filePath: string, expectedVersion: string): FileWriteReceipt | null;
139
151
  /**
140
152
  * @deprecated Renamed to {@link identifyFileWrite}, which despite this alias's
141
153
  * name does NOT consume the receipt: one watcher event fans out to every SSE
@@ -204,4 +216,4 @@ type BackgroundRemovalRender = (options: {
204
216
  }>;
205
217
  declare function createBackgroundRemovalJob(opts: BackgroundRemovalJobOptions, render: BackgroundRemovalRender): MediaProcessingJobState;
206
218
 
207
- export { type AppliedFileMutation, type BackgroundRemovalRender, DELETED_VERSION, type DuplicateElementResult, type FileMutationInput, type FileWriteReceipt, HistoryBusyError, MIME_TYPES, MediaProcessingJobState, PREVIEW_BUNDLE_OPTIONS, SourceMutationTarget, StudioApiAdapter, type ThumbnailOutputDimensions, affectsProjectSignature, applyFileMutations, buildSubCompositionHtml, compositionsAffectedBy, consumeFileWriteReceipt, createBackgroundRemovalJob, createPreviewDocumentStore, createProjectSignature, createStudioApi, duplicateElementInHtml, fileContentVersion, getMimeType, identifyFileWrite, requestSubPath, settledFileTag, stampProjectHfIds, thumbnailDeviceScaleFactor, walkDir };
219
+ export { type AppliedFileMutation, type BackgroundRemovalRender, DELETED_VERSION, type DuplicateElementResult, type FileMutationInput, type FileWriteReceipt, HistoryBusyError, MIME_TYPES, MediaProcessingJobState, PREVIEW_BUNDLE_OPTIONS, ProjectHistory, SourceMutationTarget, StudioApiAdapter, type ThumbnailOutputDimensions, affectsProjectSignature, applyFileMutations, buildSubCompositionHtml, compositionsAffectedBy, consumeFileWriteReceipt, createBackgroundRemovalJob, createPreviewDocumentStore, createProjectSignature, createStudioApi, duplicateElementInHtml, fileContentVersion, getMimeType, historyCache, identifyFileWrite, requestSubPath, settledFileTag, stampProjectHfIds, thumbnailDeviceScaleFactor, walkDir };