frontbacked-svg 5.0.0 → 5.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/main.cjs +211 -86
- package/dist/main.d.cts +7 -4
- package/dist/main.d.ts +7 -4
- package/dist/main.mjs +211 -86
- package/package.json +2 -1
- package/src/base64Image.ts +100 -100
- package/src/cssParser.ts +58 -58
- package/src/filters.ts +225 -225
- package/src/font-utils.ts +192 -204
- package/src/get-default-fields-value.ts +63 -63
- package/src/getSvg.ts +476 -284
- package/src/imageHelper.ts +295 -293
- package/src/imagePassportUtils.ts +699 -717
- package/src/images-processor.ts +179 -186
- package/src/polyfills/DOMParser.ts +27 -27
- package/src/polyfills/File.ts +19 -19
- package/src/polyfills/Image.ts +89 -89
- package/src/svgScaler.ts +178 -178
- package/src/textGenCodeParser.ts +318 -318
- package/src/time.ts +146 -146
- package/src/toolsFunc.ts +78 -78
- package/src/types.ts +176 -176
- package/src/utils.ts +757 -757
- package/src/watermaker.ts +189 -189
package/dist/main.d.cts
CHANGED
|
@@ -209,9 +209,12 @@ declare const fileDocStorageKey: (collectionName: string, id: string) => string;
|
|
|
209
209
|
declare const fileCollectionStorageKey: (collectionName: string) => string;
|
|
210
210
|
declare const isBrowser: () => boolean;
|
|
211
211
|
declare const saveFileFieldFile: (collectionName: string, id: string, fieldName: string, value: string) => void;
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
212
|
+
interface FileFieldsFiles {
|
|
213
|
+
[x: string]: string;
|
|
214
|
+
}
|
|
215
|
+
declare const getFileFieldFile: (collectionName: string, id: string, fieldName: string, fileFieldTypesDefaultFiles?: FileFieldsFiles) => string | null;
|
|
216
|
+
declare const moveFileFieldFile: (collectionName: string, oldId: string, newId: string, fieldName: string, fileFieldTypesDefaultFiles?: FileFieldsFiles) => Promise<void>;
|
|
217
|
+
declare const deleteFileFieldFile: (collectionName: string, id: string, fieldName: string, fileFieldTypesDefaultFiles?: FileFieldsFiles) => Promise<void>;
|
|
215
218
|
declare const deleteDataWithKeyPrefix: (keyPrefix: string) => void;
|
|
216
219
|
declare const setR2Host: (url: string, r2Domain: string) => string;
|
|
217
220
|
|
|
@@ -305,7 +308,7 @@ declare const getTextAreaMaxLength: (textAreaNode: INode, textInput?: string, ta
|
|
|
305
308
|
maxLines: number;
|
|
306
309
|
defaultInputLines: string[];
|
|
307
310
|
};
|
|
308
|
-
declare const getSvg: (storageHost: string, data: FieldsData, templateData: TemplateData, fonts?: FontsMap | null, showWatermark?: boolean | null, width?: number | "max" | null, tempMask?: MaskMap | null) => Promise<string>;
|
|
311
|
+
declare const getSvg: (storageHost: string, data: FieldsData, templateData: TemplateData, fonts?: FontsMap | null, showWatermark?: boolean | null, width?: number | "max" | null, tempMask?: MaskMap | null, fileFieldTypesDefaultFiles?: FileFieldsFiles) => Promise<string>;
|
|
309
312
|
declare const trimId: (name: string) => string;
|
|
310
313
|
declare const splitElementNameWithDirective: (nameWithDirective: string) => {
|
|
311
314
|
name: string;
|
package/dist/main.d.ts
CHANGED
|
@@ -209,9 +209,12 @@ declare const fileDocStorageKey: (collectionName: string, id: string) => string;
|
|
|
209
209
|
declare const fileCollectionStorageKey: (collectionName: string) => string;
|
|
210
210
|
declare const isBrowser: () => boolean;
|
|
211
211
|
declare const saveFileFieldFile: (collectionName: string, id: string, fieldName: string, value: string) => void;
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
212
|
+
interface FileFieldsFiles {
|
|
213
|
+
[x: string]: string;
|
|
214
|
+
}
|
|
215
|
+
declare const getFileFieldFile: (collectionName: string, id: string, fieldName: string, fileFieldTypesDefaultFiles?: FileFieldsFiles) => string | null;
|
|
216
|
+
declare const moveFileFieldFile: (collectionName: string, oldId: string, newId: string, fieldName: string, fileFieldTypesDefaultFiles?: FileFieldsFiles) => Promise<void>;
|
|
217
|
+
declare const deleteFileFieldFile: (collectionName: string, id: string, fieldName: string, fileFieldTypesDefaultFiles?: FileFieldsFiles) => Promise<void>;
|
|
215
218
|
declare const deleteDataWithKeyPrefix: (keyPrefix: string) => void;
|
|
216
219
|
declare const setR2Host: (url: string, r2Domain: string) => string;
|
|
217
220
|
|
|
@@ -305,7 +308,7 @@ declare const getTextAreaMaxLength: (textAreaNode: INode, textInput?: string, ta
|
|
|
305
308
|
maxLines: number;
|
|
306
309
|
defaultInputLines: string[];
|
|
307
310
|
};
|
|
308
|
-
declare const getSvg: (storageHost: string, data: FieldsData, templateData: TemplateData, fonts?: FontsMap | null, showWatermark?: boolean | null, width?: number | "max" | null, tempMask?: MaskMap | null) => Promise<string>;
|
|
311
|
+
declare const getSvg: (storageHost: string, data: FieldsData, templateData: TemplateData, fonts?: FontsMap | null, showWatermark?: boolean | null, width?: number | "max" | null, tempMask?: MaskMap | null, fileFieldTypesDefaultFiles?: FileFieldsFiles) => Promise<string>;
|
|
309
312
|
declare const trimId: (name: string) => string;
|
|
310
313
|
declare const splitElementNameWithDirective: (nameWithDirective: string) => {
|
|
311
314
|
name: string;
|