@openfairygui/functions 0.2.0-alpha.19 → 0.2.0-alpha.20
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/README.md +7 -2
- package/dist/index.cjs +3 -920
- package/dist/index.d.cts +2 -46
- package/dist/index.d.ts +3 -47
- package/dist/index.js +2 -919
- package/dist/node.cjs +138 -10
- package/dist/node.d.cts +7 -2
- package/dist/node.d.ts +8 -3
- package/dist/node.js +138 -11
- package/dist/{publish-DsPK0SJ1.js → publish-BJ_eelME.js} +1973 -2070
- package/dist/{publish-D7268_u4.cjs → publish-xFWT9Slz.cjs} +1973 -2070
- package/dist/restore-BW2xacB3.cjs +936 -0
- package/dist/{codegen-B8ZM1F4j.d.cts → restore-BeWaJNjR.d.cts} +49 -3
- package/dist/restore-Clk62n0O.js +931 -0
- package/dist/{codegen-CfbDHuFt.d.ts → restore-Dh0-Nvms.d.ts} +50 -4
- package/dist/web.cjs +4 -2
- package/dist/web.d.ts +1 -1
- package/dist/web.js +4 -2
- package/package.json +5 -2
- package/src/adapters/node/restore.ts +187 -0
- package/src/adapters/web/publish.ts +1 -247
- package/src/adapters/web/raster.ts +251 -0
- package/src/atlas/font.ts +95 -0
- package/src/atlas/inputs.ts +515 -0
- package/src/atlas/jta.ts +211 -0
- package/src/atlas/packing.ts +767 -0
- package/src/atlas.ts +23 -1639
- package/src/node.ts +4 -0
- package/src/publish/external-resources.ts +117 -0
- package/src/publish/options.ts +180 -0
- package/src/publish/package-context.ts +608 -0
- package/src/publish/resource-references.ts +210 -0
- package/src/publish.ts +21 -1130
- package/src/restore-internals/font.ts +100 -0
- package/src/restore-internals/movie-clip.ts +104 -0
- package/src/restore-internals/output-transaction.ts +164 -0
- package/src/restore.ts +14 -329
- /package/dist/{atlas-CDn6TirX.d.ts → atlas-C6tbl7nn.d.ts} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as AtlasRasterInput, c as AtlasRasterResolvedBuffer, d as PublishSourceFileSystem, i as AtlasRasterCompositeInput, l as PublishFileSystem, n as atlas, o as AtlasRasterMetadata, r as AtlasRasterBackend, s as AtlasRasterPipeline, t as AtlasOptions, u as PublishOutputFileSystem } from "./atlas-CHsu2Y8i.cjs";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as ExtrasMap, B as ResolvedPublishOptions, C as MaybePromise, D as CliAtlasSettings, E as PluginModule, F as RootProjectSettings, I as publish, L as PublishOptions, M as HasOptionalSrc, N as HasOptionalUrl, O as CliCodeGenerationSettings, P as PublishDependency, R as ResolvePublishOptionsOverrides, S as LoadedPlugin, T as PluginManifest, V as resolvePublishOptions, _ as encodeText, a as RestoreImageExtractor, b as CodeWriter, c as restore, d as CodegenMember, f as CodegenReferencedComponent, g as decodeText, h as buildCodegenClasses, i as RestoreImageExtractInput, j as HasOptionalFont, k as CliPublishSettings, l as AUTO_GENERATED_CODE_MARK, m as ResolvedPackageCodegenPlan, n as RestoreImageCropInput, o as RestoreOptions, p as PublishCodeGenerationOptions, r as RestoreImageCropper, s as RestoreResult, t as RestoreFileSystem, u as CodegenClass, v as publishCodeGeneration, w as Plugin, x as ICodeWriterConfig, y as resolvePackageCodegenPlan, z as ResolvedPublishAtlasOptions } from "./restore-BeWaJNjR.cjs";
|
|
3
3
|
import { ApplyUamTransactionAppDiagnostic, ApplyUamTransactionAppError, ApplyUamTransactionAppInput, ApplyUamTransactionAppResult, applyUamTransactionApp } from "./uam-transaction.cjs";
|
|
4
|
-
import { Document,
|
|
4
|
+
import { Document, Transform } from "@openfairygui/core";
|
|
5
5
|
|
|
6
6
|
//#region src/inspect.d.ts
|
|
7
7
|
/**
|
|
@@ -168,50 +168,6 @@ interface RenameOptions {
|
|
|
168
168
|
*/
|
|
169
169
|
declare function rename(options: RenameOptions): Transform;
|
|
170
170
|
//#endregion
|
|
171
|
-
//#region src/restore.d.ts
|
|
172
|
-
interface RestoreImageCropInput {
|
|
173
|
-
sourcePath: string;
|
|
174
|
-
outputPath: string;
|
|
175
|
-
left: number;
|
|
176
|
-
top: number;
|
|
177
|
-
width: number;
|
|
178
|
-
height: number;
|
|
179
|
-
rotated: boolean;
|
|
180
|
-
offsetX: number;
|
|
181
|
-
offsetY: number;
|
|
182
|
-
expectedWidth: number;
|
|
183
|
-
expectedHeight: number;
|
|
184
|
-
}
|
|
185
|
-
type RestoreImageCropper = (input: RestoreImageCropInput) => Promise<void>;
|
|
186
|
-
type RestoreImageExtractInput = Omit<RestoreImageCropInput, 'outputPath'>;
|
|
187
|
-
type RestoreImageExtractor = (input: RestoreImageExtractInput) => Promise<Uint8Array>;
|
|
188
|
-
interface RestoreResult {
|
|
189
|
-
document: Document;
|
|
190
|
-
projectPath: string;
|
|
191
|
-
warnings: string[];
|
|
192
|
-
}
|
|
193
|
-
interface RestoreFileSystem extends Pick<FileSystem, 'readFile' | 'readFileRaw' | 'writeFile' | 'writeFileRaw' | 'mkdir' | 'exists' | 'join' | 'dirname'> {
|
|
194
|
-
readdir(path: string): Promise<string[]>;
|
|
195
|
-
isFile(path: string): Promise<boolean>;
|
|
196
|
-
resolvePath(path: string): string | Promise<string>;
|
|
197
|
-
rm(path: string, options?: {
|
|
198
|
-
recursive?: boolean;
|
|
199
|
-
force?: boolean;
|
|
200
|
-
}): Promise<void>;
|
|
201
|
-
rename(from: string, to: string): Promise<void>;
|
|
202
|
-
}
|
|
203
|
-
interface RestoreOptions {
|
|
204
|
-
inputDir: string;
|
|
205
|
-
output: string;
|
|
206
|
-
fs: RestoreFileSystem;
|
|
207
|
-
packages?: string[];
|
|
208
|
-
force?: boolean;
|
|
209
|
-
projectType?: number;
|
|
210
|
-
cropImage?: RestoreImageCropper;
|
|
211
|
-
extractImage?: RestoreImageExtractor;
|
|
212
|
-
}
|
|
213
|
-
declare function restore(options: RestoreOptions): Promise<RestoreResult>;
|
|
214
|
-
//#endregion
|
|
215
171
|
//#region src/utils.d.ts
|
|
216
172
|
/**
|
|
217
173
|
* Wraps a transform function, assigning it a name for the transform stack.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as AtlasRasterInput, c as AtlasRasterResolvedBuffer, d as PublishSourceFileSystem, i as AtlasRasterCompositeInput, l as PublishFileSystem, n as atlas, o as AtlasRasterMetadata, r as AtlasRasterBackend, s as AtlasRasterPipeline, t as AtlasOptions, u as PublishOutputFileSystem } from "./atlas-
|
|
2
|
-
import { A as
|
|
1
|
+
import { a as AtlasRasterInput, c as AtlasRasterResolvedBuffer, d as PublishSourceFileSystem, i as AtlasRasterCompositeInput, l as PublishFileSystem, n as atlas, o as AtlasRasterMetadata, r as AtlasRasterBackend, s as AtlasRasterPipeline, t as AtlasOptions, u as PublishOutputFileSystem } from "./atlas-C6tbl7nn.js";
|
|
2
|
+
import { A as ExtrasMap, B as ResolvedPublishOptions, C as MaybePromise, D as CliAtlasSettings, E as PluginModule, F as RootProjectSettings, I as publish, L as PublishOptions, M as HasOptionalSrc, N as HasOptionalUrl, O as CliCodeGenerationSettings, P as PublishDependency, R as ResolvePublishOptionsOverrides, S as LoadedPlugin, T as PluginManifest, V as resolvePublishOptions, _ as encodeText, a as RestoreImageExtractor, b as CodeWriter, c as restore, d as CodegenMember, f as CodegenReferencedComponent, g as decodeText, h as buildCodegenClasses, i as RestoreImageExtractInput, j as HasOptionalFont, k as CliPublishSettings, l as AUTO_GENERATED_CODE_MARK, m as ResolvedPackageCodegenPlan, n as RestoreImageCropInput, o as RestoreOptions, p as PublishCodeGenerationOptions, r as RestoreImageCropper, s as RestoreResult, t as RestoreFileSystem, u as CodegenClass, v as publishCodeGeneration, w as Plugin, x as ICodeWriterConfig, y as resolvePackageCodegenPlan, z as ResolvedPublishAtlasOptions } from "./restore-Dh0-Nvms.js";
|
|
3
3
|
import { ApplyUamTransactionAppDiagnostic, ApplyUamTransactionAppError, ApplyUamTransactionAppInput, ApplyUamTransactionAppResult, applyUamTransactionApp } from "./uam-transaction.js";
|
|
4
|
-
import { Document,
|
|
4
|
+
import { Document, Transform } from "@openfairygui/core";
|
|
5
5
|
|
|
6
6
|
//#region src/inspect.d.ts
|
|
7
7
|
/**
|
|
@@ -168,50 +168,6 @@ interface RenameOptions {
|
|
|
168
168
|
*/
|
|
169
169
|
declare function rename(options: RenameOptions): Transform;
|
|
170
170
|
//#endregion
|
|
171
|
-
//#region src/restore.d.ts
|
|
172
|
-
interface RestoreImageCropInput {
|
|
173
|
-
sourcePath: string;
|
|
174
|
-
outputPath: string;
|
|
175
|
-
left: number;
|
|
176
|
-
top: number;
|
|
177
|
-
width: number;
|
|
178
|
-
height: number;
|
|
179
|
-
rotated: boolean;
|
|
180
|
-
offsetX: number;
|
|
181
|
-
offsetY: number;
|
|
182
|
-
expectedWidth: number;
|
|
183
|
-
expectedHeight: number;
|
|
184
|
-
}
|
|
185
|
-
type RestoreImageCropper = (input: RestoreImageCropInput) => Promise<void>;
|
|
186
|
-
type RestoreImageExtractInput = Omit<RestoreImageCropInput, 'outputPath'>;
|
|
187
|
-
type RestoreImageExtractor = (input: RestoreImageExtractInput) => Promise<Uint8Array>;
|
|
188
|
-
interface RestoreResult {
|
|
189
|
-
document: Document;
|
|
190
|
-
projectPath: string;
|
|
191
|
-
warnings: string[];
|
|
192
|
-
}
|
|
193
|
-
interface RestoreFileSystem extends Pick<FileSystem, 'readFile' | 'readFileRaw' | 'writeFile' | 'writeFileRaw' | 'mkdir' | 'exists' | 'join' | 'dirname'> {
|
|
194
|
-
readdir(path: string): Promise<string[]>;
|
|
195
|
-
isFile(path: string): Promise<boolean>;
|
|
196
|
-
resolvePath(path: string): string | Promise<string>;
|
|
197
|
-
rm(path: string, options?: {
|
|
198
|
-
recursive?: boolean;
|
|
199
|
-
force?: boolean;
|
|
200
|
-
}): Promise<void>;
|
|
201
|
-
rename(from: string, to: string): Promise<void>;
|
|
202
|
-
}
|
|
203
|
-
interface RestoreOptions {
|
|
204
|
-
inputDir: string;
|
|
205
|
-
output: string;
|
|
206
|
-
fs: RestoreFileSystem;
|
|
207
|
-
packages?: string[];
|
|
208
|
-
force?: boolean;
|
|
209
|
-
projectType?: number;
|
|
210
|
-
cropImage?: RestoreImageCropper;
|
|
211
|
-
extractImage?: RestoreImageExtractor;
|
|
212
|
-
}
|
|
213
|
-
declare function restore(options: RestoreOptions): Promise<RestoreResult>;
|
|
214
|
-
//#endregion
|
|
215
171
|
//#region src/utils.d.ts
|
|
216
172
|
/**
|
|
217
173
|
* Wraps a transform function, assigning it a name for the transform stack.
|