fundus 0.0.2
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/build-CZYFLLvl.js +191 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +1420 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.js +2 -0
- package/dist/core/image-Dqmz8FXS.js +54 -0
- package/dist/core/index.d.ts +499 -0
- package/dist/core/index.js +962 -0
- package/dist/core/reference-graph-CjuHbLDw.d.ts +280 -0
- package/dist/core/testing.d.ts +27 -0
- package/dist/core/testing.js +80 -0
- package/dist/editor/200.html +37 -0
- package/dist/editor/_app/immutable/assets/0.DLhIsYA_.css +1 -0
- package/dist/editor/_app/immutable/assets/2.DIbbW7U1.css +1 -0
- package/dist/editor/_app/immutable/assets/3.C-9vFQ9A.css +1 -0
- package/dist/editor/_app/immutable/assets/4.BS8ElpOV.css +1 -0
- package/dist/editor/_app/immutable/assets/ConfirmDialog.CHEISE-L.css +1 -0
- package/dist/editor/_app/immutable/assets/LibraryContextMenu.CDjCmdV-.css +1 -0
- package/dist/editor/_app/immutable/chunks/BfPE5wdt.js +1 -0
- package/dist/editor/_app/immutable/chunks/Bjy-W4x2.js +81 -0
- package/dist/editor/_app/immutable/chunks/CNRz3sSw.js +3 -0
- package/dist/editor/_app/immutable/chunks/CO4RBJfa.js +1 -0
- package/dist/editor/_app/immutable/chunks/Cx6qtxJg.js +1 -0
- package/dist/editor/_app/immutable/chunks/DjdrdRzT.js +1 -0
- package/dist/editor/_app/immutable/chunks/DjvOiDmq.js +1 -0
- package/dist/editor/_app/immutable/chunks/n7mvYc42.js +5 -0
- package/dist/editor/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/dist/editor/_app/immutable/entry/app.BkqbfI8n.js +2 -0
- package/dist/editor/_app/immutable/entry/start.C8HHOLly.js +1 -0
- package/dist/editor/_app/immutable/nodes/0.xdMI5GEU.js +2 -0
- package/dist/editor/_app/immutable/nodes/1.D9p2tfoJ.js +1 -0
- package/dist/editor/_app/immutable/nodes/2.BrA0Hyzu.js +3 -0
- package/dist/editor/_app/immutable/nodes/3.WO7tZH_d.js +104 -0
- package/dist/editor/_app/immutable/nodes/4.DQtx17aW.js +2 -0
- package/dist/editor/_app/version.json +1 -0
- package/dist/index.d.ts +370 -0
- package/dist/index.js +4 -0
- package/dist/operations-DYM-5KVl.js +1797 -0
- package/dist/runtime/chroma-key-gl.d.ts +23 -0
- package/dist/runtime/chroma-key-gl.js +290 -0
- package/dist/runtime/components/ChromaKeyVideo.svelte +225 -0
- package/dist/runtime/components/Image.svelte +18 -0
- package/dist/runtime/components/Slice.svelte +35 -0
- package/dist/runtime/components/SliceCanvas.svelte +162 -0
- package/dist/runtime/components/SliceDom.svelte +104 -0
- package/dist/runtime/components/Video.svelte +60 -0
- package/dist/runtime/geometry.d.ts +75 -0
- package/dist/runtime/geometry.js +209 -0
- package/dist/runtime/index.d.ts +9 -0
- package/dist/runtime/index.js +9 -0
- package/dist/runtime/kind-handlers.d.ts +46 -0
- package/dist/runtime/kind-handlers.js +86 -0
- package/dist/runtime/manifest.d.ts +60 -0
- package/dist/runtime/manifest.js +117 -0
- package/dist/runtime/observe-border-box-size.d.ts +5 -0
- package/dist/runtime/observe-border-box-size.js +12 -0
- package/dist/runtime/preload-registry.d.ts +26 -0
- package/dist/runtime/preload-registry.js +68 -0
- package/dist/start-Bhnqt9Dc.js +279 -0
- package/dist/start-D2IXOrni.js +2 -0
- package/package.json +65 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import { AssetId, AssetRecord, AssetTypePluginDescriptor, AudioPreset, FundusStateDto, ImagePreset, Library, ManifestEntryData, PatchAssetRequestDto, PatchManifestRequestDto, ValidationIssueDto, VideoPreset } from "#fundus/core";
|
|
2
|
+
|
|
3
|
+
//#region src/config-loader.d.ts
|
|
4
|
+
interface ResolvedPresetPluginConfig {
|
|
5
|
+
presets: Record<string, ImagePreset>;
|
|
6
|
+
}
|
|
7
|
+
interface ResolvedVideoPluginConfig {
|
|
8
|
+
presets: Record<string, VideoPreset>;
|
|
9
|
+
/** Absolute path of the ffmpeg binary to use; null = the bundled `ffmpeg-static`. */
|
|
10
|
+
ffmpegPath: string | null;
|
|
11
|
+
/** Absolute path of the ffprobe binary to use; null = the bundled `ffprobe-static`. */
|
|
12
|
+
ffprobePath: string | null;
|
|
13
|
+
}
|
|
14
|
+
interface ResolvedAudioPluginConfig {
|
|
15
|
+
presets: Record<string, AudioPreset>;
|
|
16
|
+
}
|
|
17
|
+
interface ResolvedFundusConfig {
|
|
18
|
+
/** All paths absolute. */
|
|
19
|
+
rawDir: string;
|
|
20
|
+
proxyDir: string;
|
|
21
|
+
library: string;
|
|
22
|
+
manifestsDir: string;
|
|
23
|
+
/** URL prefix baked into generated proxy `src` values; always ends with '/'. */
|
|
24
|
+
proxyBasePath: string;
|
|
25
|
+
plugins: {
|
|
26
|
+
image: ResolvedPresetPluginConfig;
|
|
27
|
+
slice: ResolvedPresetPluginConfig; /** Shared by video and chroma-key-video through one preset namespace. */
|
|
28
|
+
video: ResolvedVideoPluginConfig;
|
|
29
|
+
audio: ResolvedAudioPluginConfig;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/** Pure resolution step (testable without a config file on disk). */
|
|
33
|
+
declare function resolveConfig(projectRoot: string, value: unknown): ResolvedFundusConfig;
|
|
34
|
+
/** Load `fundus.config.ts` from the host project root. */
|
|
35
|
+
declare function loadConfig(projectRoot: string): Promise<ResolvedFundusConfig>;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/plugins/contract.d.ts
|
|
38
|
+
/** Output metadata of one processed proxy file (absent fields don't apply). */
|
|
39
|
+
interface ProxyOutputInfo {
|
|
40
|
+
/** Intrinsic pixel dimensions; absent for audio proxies. */
|
|
41
|
+
width?: number;
|
|
42
|
+
height?: number;
|
|
43
|
+
/** Media duration; present for video and audio proxies. */
|
|
44
|
+
durationMs?: number;
|
|
45
|
+
}
|
|
46
|
+
/** One delivered asset's current proxy: file identity plus output metadata. */
|
|
47
|
+
interface AssetProxyInfo extends ProxyOutputInfo {
|
|
48
|
+
assetId: string;
|
|
49
|
+
/** Basename, stable across folder moves. */
|
|
50
|
+
fileName: string;
|
|
51
|
+
/** Path relative to proxyDir, mirroring the raw asset's folder. */
|
|
52
|
+
relativePath: string;
|
|
53
|
+
fileSize: number;
|
|
54
|
+
}
|
|
55
|
+
/** The inputs of one processing run: raw file → proxy file. */
|
|
56
|
+
interface ServerProcessingJob<TParameters, TPreset> {
|
|
57
|
+
/** Absolute path of the raw source file. */
|
|
58
|
+
sourcePath: string;
|
|
59
|
+
/** Absolute path the proxy file must be written to. */
|
|
60
|
+
targetPath: string;
|
|
61
|
+
/** The asset's validated parameters. */
|
|
62
|
+
parameters: TParameters;
|
|
63
|
+
/** The resolved preset the parameters name. */
|
|
64
|
+
preset: TPreset;
|
|
65
|
+
config: ResolvedFundusConfig;
|
|
66
|
+
}
|
|
67
|
+
/** The inputs of one manifest-entry build. */
|
|
68
|
+
interface ManifestEntryInput<TParameters> {
|
|
69
|
+
assetId: string;
|
|
70
|
+
/** The asset's validated parameters. */
|
|
71
|
+
parameters: TParameters;
|
|
72
|
+
/** The delivered proxy URL (`proxyBasePath` + proxy relative path). */
|
|
73
|
+
src: string;
|
|
74
|
+
proxy: AssetProxyInfo;
|
|
75
|
+
}
|
|
76
|
+
interface ServerAssetTypePlugin<TParameters = unknown, TPreset = unknown> {
|
|
77
|
+
/** The environment-free half of the plugin (type key, ingestion, validation). */
|
|
78
|
+
descriptor: AssetTypePluginDescriptor<TParameters, unknown>;
|
|
79
|
+
/**
|
|
80
|
+
* The plugin's `plugins.<namespace>` config slice — handed to the
|
|
81
|
+
* descriptor's `defaultParameters` on ingest. Types may share a namespace
|
|
82
|
+
* (chroma-key-video uses the video slice).
|
|
83
|
+
*/
|
|
84
|
+
pluginConfig(config: ResolvedFundusConfig): unknown;
|
|
85
|
+
/** The merged (built-in + host) named presets available to this type. */
|
|
86
|
+
presets(config: ResolvedFundusConfig): Record<string, TPreset>;
|
|
87
|
+
/**
|
|
88
|
+
* The resolved settings of the preset the validated parameters name —
|
|
89
|
+
* these feed the job hash (a preset edit under an unchanged name
|
|
90
|
+
* must rename the proxy). Throws (listing the known names) on a miss.
|
|
91
|
+
*/
|
|
92
|
+
resolvePreset(parameters: TParameters, config: ResolvedFundusConfig): TPreset;
|
|
93
|
+
/** The proxy file extension a resolved preset's output carries. */
|
|
94
|
+
proxyExtension(preset: TPreset): string;
|
|
95
|
+
/**
|
|
96
|
+
* Optional ingest seeding, run right after the raw file is stored: derive
|
|
97
|
+
* better starting parameters than the schema defaults from the actual raw
|
|
98
|
+
* file — the slice plugin seeds insets from the image dimensions and a
|
|
99
|
+
* pixel ratio from a `@2x`-style file-name suffix. Returns the replacement
|
|
100
|
+
* parameters, or undefined to keep the defaults. Omitted = defaults stand.
|
|
101
|
+
*/
|
|
102
|
+
seedIngestParameters?(context: {
|
|
103
|
+
/** Absolute path of the stored raw file. */rawPath: string; /** The stored raw file name (sanitized, unique). */
|
|
104
|
+
rawFileName: string; /** The validated default parameters the record starts with. */
|
|
105
|
+
parameters: TParameters;
|
|
106
|
+
config: ResolvedFundusConfig;
|
|
107
|
+
}): Promise<TParameters | undefined>;
|
|
108
|
+
/** Run the processing job (sharp/ffmpeg): write the proxy, report its metadata. */
|
|
109
|
+
process(job: ServerProcessingJob<TParameters, TPreset>): Promise<ProxyOutputInfo>;
|
|
110
|
+
/** Probe an existing proxy file's output metadata (the up-to-date path). */
|
|
111
|
+
readProxyInfo(proxyPath: string, config: ResolvedFundusConfig): Promise<ProxyOutputInfo>;
|
|
112
|
+
/**
|
|
113
|
+
* Build the generated manifest entry. Reference fields stay
|
|
114
|
+
* `{ $asset }` markers — codegen's generic inline walk resolves them.
|
|
115
|
+
*/
|
|
116
|
+
buildManifestEntry(input: ManifestEntryInput<TParameters>): ManifestEntryData;
|
|
117
|
+
}
|
|
118
|
+
/** The one server-side touch point for a new asset type: type key → plugin. */
|
|
119
|
+
type ServerPluginRegistry = Record<string, ServerAssetTypePlugin>;
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region src/library-store.d.ts
|
|
122
|
+
interface IngestOptions {
|
|
123
|
+
/** Original file name of the upload (sanitized before storing). */
|
|
124
|
+
fileName: string;
|
|
125
|
+
bytes: Uint8Array;
|
|
126
|
+
/** Asset type (must be a known plugin type). */
|
|
127
|
+
type: string;
|
|
128
|
+
/** The chosen asset id (validated; must be unique). */
|
|
129
|
+
id: string;
|
|
130
|
+
/** Registered destination folder; empty string means the implicit root. */
|
|
131
|
+
folder?: string;
|
|
132
|
+
}
|
|
133
|
+
declare class LibraryStore {
|
|
134
|
+
#private;
|
|
135
|
+
constructor(config: ResolvedFundusConfig, registry?: ServerPluginRegistry);
|
|
136
|
+
get config(): ResolvedFundusConfig;
|
|
137
|
+
/** Read + parse the library file; a missing file is an empty library. */
|
|
138
|
+
read(): Promise<Library>;
|
|
139
|
+
/** Deterministically serialize + write the library file. */
|
|
140
|
+
write(library: Library): Promise<void>;
|
|
141
|
+
/**
|
|
142
|
+
* Ingest a new asset: write the raw file into `rawDir` (under a sanitized,
|
|
143
|
+
* non-colliding name), hash its content, and create the library record with
|
|
144
|
+
* the owning plugin's default parameters. Returns the updated library.
|
|
145
|
+
*/
|
|
146
|
+
ingest(options: IngestOptions): Promise<Library>;
|
|
147
|
+
/** Replace an asset's parameters (validated by the owning plugin). */
|
|
148
|
+
updateParameters(id: string, parameters: unknown): Promise<Library>;
|
|
149
|
+
/** Replace an asset's manifest membership (every name must exist). */
|
|
150
|
+
setManifests(id: string, manifests: string[]): Promise<Library>;
|
|
151
|
+
/** Rename an asset id (the raw file keeps its name — ids are the stable key). */
|
|
152
|
+
renameAsset(id: string, newId: string): Promise<Library>;
|
|
153
|
+
/** Move an asset's raw file and current proxies without changing its stable id. */
|
|
154
|
+
moveAsset(id: string, folder: string): Promise<Library>;
|
|
155
|
+
createFolder(path: string): Promise<Library>;
|
|
156
|
+
renameFolder(path: string, newName: string): Promise<Library>;
|
|
157
|
+
/** Move a complete folder subtree below another folder (or the implicit root). */
|
|
158
|
+
moveFolder(path: string, parent: string): Promise<Library>;
|
|
159
|
+
/** Recursively delete a folder and every asset stored below it. */
|
|
160
|
+
deleteFolder(path: string): Promise<{
|
|
161
|
+
library: Library;
|
|
162
|
+
deletedAssetIds: string[];
|
|
163
|
+
}>;
|
|
164
|
+
/** Delete an asset: remove the record, its raw file, and its proxies. */
|
|
165
|
+
deleteAsset(id: string): Promise<Library>;
|
|
166
|
+
/** Delete several assets as one library/file transaction. */
|
|
167
|
+
deleteAssets(ids: string[]): Promise<Library>;
|
|
168
|
+
createManifest(name: string): Promise<Library>;
|
|
169
|
+
/**
|
|
170
|
+
* Set (or clear) a manifest's editor appearance — its color and/or emoji.
|
|
171
|
+
* An `undefined` field is left unchanged; a `null` field clears it. Values
|
|
172
|
+
* are validated against the fixed palettes.
|
|
173
|
+
*/
|
|
174
|
+
setManifestAppearance(name: string, appearance: {
|
|
175
|
+
color?: string | null;
|
|
176
|
+
emoji?: string | null;
|
|
177
|
+
}): Promise<Library>;
|
|
178
|
+
/** Rename a manifest and rewrite every asset's membership to the new name. */
|
|
179
|
+
renameManifest(name: string, newName: string): Promise<Library>;
|
|
180
|
+
/** Delete a manifest and strip it from every asset's membership. */
|
|
181
|
+
deleteManifest(name: string): Promise<Library>;
|
|
182
|
+
/**
|
|
183
|
+
* Structural + referential validation, listed per asset: invalid id, unknown
|
|
184
|
+
* type, dangling raw pointer, invalid parameters, unknown manifest names,
|
|
185
|
+
* and reference errors (dangling target, type mismatch, cycles).
|
|
186
|
+
*/
|
|
187
|
+
validate(library: Library): Promise<ValidationIssueDto[]>;
|
|
188
|
+
syncFolders(library: Library): Promise<void>;
|
|
189
|
+
}
|
|
190
|
+
//#endregion
|
|
191
|
+
//#region src/processing/processor.d.ts
|
|
192
|
+
/** Whether a file name in the proxy directory is (shaped like) a fundus proxy. */
|
|
193
|
+
declare function isProxyFileName(fileName: string): boolean;
|
|
194
|
+
interface ProcessingReport {
|
|
195
|
+
/** Asset ids whose proxy was (re)generated in this run. */
|
|
196
|
+
processed: string[];
|
|
197
|
+
/** Asset ids whose proxy was already current (name check hit). */
|
|
198
|
+
reused: string[];
|
|
199
|
+
/** Orphaned proxy file names removed from the proxy directory. */
|
|
200
|
+
pruned: string[];
|
|
201
|
+
/** Per delivered asset: the current proxy and its output metadata. */
|
|
202
|
+
proxies: Record<string, AssetProxyInfo>;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* The proxy file name an asset's current raw content + parameters demand.
|
|
206
|
+
* Throws when the parameters are invalid or reference an unknown preset.
|
|
207
|
+
*
|
|
208
|
+
* The hash input is the *effective* processing input: the asset's
|
|
209
|
+
* processing-relevant parameters (the plugin-declared subset — entry-only data
|
|
210
|
+
* like chroma-key tuning and references must not rename the proxy)
|
|
211
|
+
* plus the preset's **resolved settings** — parameters only carry the preset
|
|
212
|
+
* *name*, so hashing them alone would keep serving stale proxy bytes after a
|
|
213
|
+
* preset's quality/format is edited in the host config.
|
|
214
|
+
*/
|
|
215
|
+
declare function expectedProxyFileName(assetId: string, record: AssetRecord, config: ResolvedFundusConfig, registry?: ServerPluginRegistry): string;
|
|
216
|
+
/** Expected proxy path relative to proxyDir, mirroring the raw asset folder. */
|
|
217
|
+
declare function expectedProxyRelativePath(assetId: string, record: AssetRecord, config: ResolvedFundusConfig, registry?: ServerPluginRegistry): string;
|
|
218
|
+
/**
|
|
219
|
+
* Output metadata of an existing proxy file, probed per the owning plugin's
|
|
220
|
+
* strategy: image-backed proxies via sharp, media proxies via ffprobe.
|
|
221
|
+
*/
|
|
222
|
+
declare function readProxyOutputInfo(type: string, proxyPath: string, config: ResolvedFundusConfig, registry?: ServerPluginRegistry): Promise<ProxyOutputInfo>;
|
|
223
|
+
/**
|
|
224
|
+
* The delivered set: every explicit or passive member of ≥ 1 manifest —
|
|
225
|
+
* derived by the shared membership computation. Assets outside
|
|
226
|
+
* it are inert.
|
|
227
|
+
*/
|
|
228
|
+
declare function deliveredAssetIds(library: Library, registry?: ServerPluginRegistry): Set<AssetId>;
|
|
229
|
+
/**
|
|
230
|
+
* Ensure every delivered asset's proxy exists (processing stale/missing ones)
|
|
231
|
+
* and prune orphans. Assets outside the delivered set are skipped entirely.
|
|
232
|
+
*/
|
|
233
|
+
declare function processAssets(config: ResolvedFundusConfig, library: Library, registry?: ServerPluginRegistry): Promise<ProcessingReport>;
|
|
234
|
+
//#endregion
|
|
235
|
+
//#region src/processing/ffmpeg.d.ts
|
|
236
|
+
declare function ffmpegBinaryPath(config: ResolvedFundusConfig): string;
|
|
237
|
+
/**
|
|
238
|
+
* Run a toolchain binary with an argument array (never a shell string) and
|
|
239
|
+
* return its stdout. A non-zero exit throws with the stderr tail — ffmpeg
|
|
240
|
+
* writes its diagnostics there.
|
|
241
|
+
*/
|
|
242
|
+
declare function runToolchainBinary(binaryPath: string, commandArguments: string[]): Promise<string>;
|
|
243
|
+
//#endregion
|
|
244
|
+
//#region src/codegen.d.ts
|
|
245
|
+
interface CodegenReport {
|
|
246
|
+
/** Written module file names. */
|
|
247
|
+
written: string[];
|
|
248
|
+
/** Removed module file names (their manifest no longer exists). */
|
|
249
|
+
removed: string[];
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Write one module per manifest and remove generated modules whose manifest is
|
|
253
|
+
* gone. Only files starting with the fundus header are ever removed, so other
|
|
254
|
+
* generated files co-located in the directory stay untouched.
|
|
255
|
+
*/
|
|
256
|
+
declare function generateManifestModules(config: ResolvedFundusConfig, library: Library, proxies: Record<string, AssetProxyInfo>, registry?: ServerPluginRegistry): Promise<CodegenReport>;
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region src/build.d.ts
|
|
259
|
+
interface BuildReport {
|
|
260
|
+
processing: ProcessingReport;
|
|
261
|
+
codegen: CodegenReport;
|
|
262
|
+
}
|
|
263
|
+
declare function runBuild(projectRoot: string, registry?: ServerPluginRegistry): Promise<BuildReport>;
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region src/check.d.ts
|
|
266
|
+
/** One machine-readable check finding (the `--json` failure-list shape, M9). */
|
|
267
|
+
interface CheckFinding {
|
|
268
|
+
/** The failure category. */
|
|
269
|
+
kind: 'validation' | 'proxy-missing' | 'proxy-unresolvable' | 'proxy-orphaned' | 'module-missing' | 'module-out-of-sync' | 'module-stray' | 'module-regeneration-failed' | 'unreachable-asset' | 'raw-hash-drift';
|
|
270
|
+
message: string;
|
|
271
|
+
/** The asset the finding concerns, where applicable. */
|
|
272
|
+
assetId?: string;
|
|
273
|
+
/** The manifest whose generated module the finding concerns, where applicable. */
|
|
274
|
+
manifest?: string;
|
|
275
|
+
/** The concrete file (proxy or generated module), where applicable. */
|
|
276
|
+
fileName?: string;
|
|
277
|
+
}
|
|
278
|
+
/** The human rendering of a finding — `[assetId] message`, as `fundus check` prints it. */
|
|
279
|
+
declare function formatCheckFinding(finding: CheckFinding): string;
|
|
280
|
+
interface CheckReport {
|
|
281
|
+
/** Hard failures — always fatal. */
|
|
282
|
+
errors: CheckFinding[];
|
|
283
|
+
/** Advisory findings — fatal unless the caller allows warnings. */
|
|
284
|
+
warnings: CheckFinding[];
|
|
285
|
+
assetCount: number;
|
|
286
|
+
manifestCount: number;
|
|
287
|
+
}
|
|
288
|
+
declare function runCheck(projectRoot: string, registry?: ServerPluginRegistry): Promise<CheckReport>;
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region src/operations.d.ts
|
|
291
|
+
/** A CLI-facing asset change: parameter patch and/or explicit membership set. */
|
|
292
|
+
interface AssetChangeOptions {
|
|
293
|
+
/** Shallow top-level parameter patch (see mergeParameterPatch). */
|
|
294
|
+
parametersPatch?: unknown;
|
|
295
|
+
/** Replacement for the explicit manifest membership set (declarative). */
|
|
296
|
+
manifests?: string[];
|
|
297
|
+
}
|
|
298
|
+
declare class FundusOperations {
|
|
299
|
+
#private;
|
|
300
|
+
constructor(config: ResolvedFundusConfig, registry?: ServerPluginRegistry);
|
|
301
|
+
get config(): ResolvedFundusConfig;
|
|
302
|
+
get store(): LibraryStore;
|
|
303
|
+
/** Read-only state snapshot (no processing). */
|
|
304
|
+
state(): Promise<FundusStateDto>;
|
|
305
|
+
/**
|
|
306
|
+
* Ingest an upload: store the raw file + record, then let the owning
|
|
307
|
+
* plugin's optional `seedIngestParameters` derive better starting
|
|
308
|
+
* parameters from the stored raw file (slices: insets from the image
|
|
309
|
+
* dimensions, pixel ratio from the file name — the schema default can't
|
|
310
|
+
* know either). The CLI additionally applies a parameter patch and/or an
|
|
311
|
+
* explicit membership set in the same operation; a failing application
|
|
312
|
+
* rolls the whole ingest back, so a failed ingest leaves nothing behind.
|
|
313
|
+
*/
|
|
314
|
+
ingest(options: IngestOptions & AssetChangeOptions): Promise<FundusStateDto>;
|
|
315
|
+
/** Apply a PATCH body: parameters and/or manifests and/or a rename — in that order. */
|
|
316
|
+
patchAsset(id: string, body: PatchAssetRequestDto): Promise<FundusStateDto>;
|
|
317
|
+
moveAsset(id: string, folder: string): Promise<FundusStateDto>;
|
|
318
|
+
/** Move a selected asset set as one editor action and roll back on any failure. */
|
|
319
|
+
moveAssets(assetIds: string[], folder: string): Promise<FundusStateDto>;
|
|
320
|
+
createFolder(path: string): Promise<FundusStateDto>;
|
|
321
|
+
renameFolder(path: string, newName: string): Promise<FundusStateDto>;
|
|
322
|
+
moveFolder(path: string, parent: string): Promise<FundusStateDto>;
|
|
323
|
+
deleteFolder(path: string): Promise<FundusStateDto>;
|
|
324
|
+
/**
|
|
325
|
+
* CLI-facing asset update (M7): shallow-merge a parameter patch and/or
|
|
326
|
+
* replace the explicit manifest membership — validating the *result* before
|
|
327
|
+
* anything is persisted, so a change that would leave the library invalid
|
|
328
|
+
* (dangling or cyclic reference, unknown manifest, invalid parameters) is
|
|
329
|
+
* rejected with nothing written. The REST `patchAsset` keeps the editor's
|
|
330
|
+
* lenient replace semantics.
|
|
331
|
+
*/
|
|
332
|
+
setAsset(id: string, changes: AssetChangeOptions): Promise<FundusStateDto>;
|
|
333
|
+
/**
|
|
334
|
+
* CLI-facing rename (M7): rejects a rename that would break references —
|
|
335
|
+
* a referrer keeps pointing at the old id, so renaming a referenced asset
|
|
336
|
+
* introduces dangling-reference errors. Update the referrers first.
|
|
337
|
+
*/
|
|
338
|
+
renameAsset(id: string, newId: string): Promise<FundusStateDto>;
|
|
339
|
+
/**
|
|
340
|
+
* Delete an asset: the record, its raw file, and its proxies. With
|
|
341
|
+
* `failOnIntroducedIssues` (the CLI), a delete that would break references
|
|
342
|
+
* (the asset is a reference target) is rejected before anything —
|
|
343
|
+
* including the raw file — is removed; the REST route stays lenient.
|
|
344
|
+
*/
|
|
345
|
+
deleteAsset(id: string, options?: {
|
|
346
|
+
failOnIntroducedIssues?: boolean;
|
|
347
|
+
}): Promise<FundusStateDto>;
|
|
348
|
+
/** Delete a selected asset set as one lenient editor mutation. */
|
|
349
|
+
deleteAssets(assetIds: string[]): Promise<FundusStateDto>;
|
|
350
|
+
createManifest(name: string): Promise<FundusStateDto>;
|
|
351
|
+
setManifestAppearance(name: string, appearance: {
|
|
352
|
+
color?: string | null;
|
|
353
|
+
emoji?: string | null;
|
|
354
|
+
}): Promise<FundusStateDto>;
|
|
355
|
+
/** Apply a PATCH body: appearance fields and/or a rename — in that order. */
|
|
356
|
+
patchManifest(name: string, body: PatchManifestRequestDto): Promise<FundusStateDto>;
|
|
357
|
+
/**
|
|
358
|
+
* Rename a manifest: rewrites every asset's membership and replaces the
|
|
359
|
+
* generated module (the old one is pruned as a stray). Host code importing
|
|
360
|
+
* the module must be updated by hand — both the file name and the exported
|
|
361
|
+
* const change with the manifest name.
|
|
362
|
+
*/
|
|
363
|
+
renameManifest(name: string, newName: string): Promise<FundusStateDto>;
|
|
364
|
+
deleteManifest(name: string): Promise<FundusStateDto>;
|
|
365
|
+
}
|
|
366
|
+
//#endregion
|
|
367
|
+
//#region src/start.d.ts
|
|
368
|
+
declare function runStart(projectRoot: string): Promise<void>;
|
|
369
|
+
//#endregion
|
|
370
|
+
export { type AssetChangeOptions, type AssetProxyInfo, type BuildReport, type CheckFinding, type CheckReport, type CodegenReport, FundusOperations, type IngestOptions, LibraryStore, type ProcessingReport, type ProxyOutputInfo, type ResolvedAudioPluginConfig, type ResolvedFundusConfig, type ResolvedPresetPluginConfig, type ResolvedVideoPluginConfig, deliveredAssetIds, expectedProxyFileName, expectedProxyRelativePath, ffmpegBinaryPath, formatCheckFinding, generateManifestModules, isProxyFileName, loadConfig, processAssets, readProxyOutputInfo, resolveConfig, runBuild, runCheck, runStart, runToolchainBinary };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { C as runToolchainBinary, S as ffmpegBinaryPath, T as resolveConfig, a as deliveredAssetIds, c as isProxyFileName, d as readProxyOutputInfo, l as processAssets, m as generateManifestModules, n as LibraryStore, o as expectedProxyFileName, s as expectedProxyRelativePath, t as FundusOperations, w as loadConfig } from "./operations-DYM-5KVl.js";
|
|
2
|
+
import { n as formatCheckFinding, r as runCheck, t as runBuild } from "./build-CZYFLLvl.js";
|
|
3
|
+
import { t as runStart } from "./start-Bhnqt9Dc.js";
|
|
4
|
+
export { FundusOperations, LibraryStore, deliveredAssetIds, expectedProxyFileName, expectedProxyRelativePath, ffmpegBinaryPath, formatCheckFinding, generateManifestModules, isProxyFileName, loadConfig, processAssets, readProxyOutputInfo, resolveConfig, runBuild, runCheck, runStart, runToolchainBinary };
|