@orangelogic/design-system 4.57.0 → 4.59.0
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/library/chunks/{asset-link-format.DFFHzlDh.js → asset-link-format.zO0t0oA3.js} +37 -11
- package/library/chunks/{block-width.BPsewZ8l.js → block-width.Dbc3rT3Y.js} +2 -2
- package/library/chunks/{config-manager.IMu4B2T8.js → config-manager.BfkCA0F3.js} +2 -2
- package/library/chunks/{cropper.BRsN8h2t.js → cropper.CNmQt-sa.js} +10 -12
- package/library/components/asset-link-format.js +1 -1
- package/library/components/cropper.js +1 -1
- package/library/components/molecules.js +1 -1
- package/library/components/organisms.js +1 -1
- package/library/components/types.js +2998 -2974
- package/library/package.json +1 -1
- package/library/packages/molecules/src/cropper/react/ReactCrop/ReactCrop.d.ts +1 -1
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +10 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-crop/asset-link-format-crop.d.ts +8 -0
- package/library/packages/organisms/src/asset-link-format/components/asset-link-format-resize/asset-link-format-resize.d.ts +7 -0
- package/library/packages/organisms/src/downloader/data/core/worker/utilities/FilePathFixer.d.ts +5 -1
- package/package.json +1 -1
package/library/package.json
CHANGED
|
@@ -129,7 +129,7 @@ export declare class ReactCrop extends PureComponent<ReactCropProps, ReactCropSt
|
|
|
129
129
|
width: string;
|
|
130
130
|
} | undefined;
|
|
131
131
|
dragCrop(): PixelCrop;
|
|
132
|
-
getPointRegion(box: Rectangle
|
|
132
|
+
getPointRegion(box: Rectangle): XYOrds;
|
|
133
133
|
resolveMinDimensions(box: Rectangle, aspect: number, minWidth?: number, minHeight?: number): number[];
|
|
134
134
|
resizeCrop(): PixelCrop;
|
|
135
135
|
renderCropSelection(): import('react/jsx-runtime').JSX.Element | undefined;
|
|
@@ -69,6 +69,11 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
69
69
|
* extension fallback in asset-transformation-dialog.
|
|
70
70
|
*/
|
|
71
71
|
private static getTransformExtension;
|
|
72
|
+
/**
|
|
73
|
+
* The pixel size of a `ratioWidth`:`ratioHeight` resize of a `maxWidth` x `maxHeight` image: the largest
|
|
74
|
+
* box of the ratio inside it, as a pixel resize stops at the image size, and at least 1px a side.
|
|
75
|
+
*/
|
|
76
|
+
private static fitRatioResizeSize;
|
|
72
77
|
/**
|
|
73
78
|
* Keep the last value for each type, at that type's first position.
|
|
74
79
|
*/
|
|
@@ -532,6 +537,11 @@ export default class CxAssetLinkFormat extends CortexElement {
|
|
|
532
537
|
private onCropChanged;
|
|
533
538
|
private onCropApply;
|
|
534
539
|
private applyCropTransformation;
|
|
540
|
+
/**
|
|
541
|
+
* The pixel size a typed resize ratio previews. With an image, the largest box of the ratio inside it, as
|
|
542
|
+
* Apply resizes to. Without one only the ratio is saved, so it is sized over the last pixel height.
|
|
543
|
+
*/
|
|
544
|
+
private getRatioResizePreviewSize;
|
|
535
545
|
private onResizeChange;
|
|
536
546
|
private onResizeApply;
|
|
537
547
|
private onRotationChange;
|
|
@@ -257,6 +257,14 @@ export default class CxAssetLinkFormatCrop extends CortexElement {
|
|
|
257
257
|
* turns a larger number into `max` as it is typed. Ratio values and an unknown (0) max have no cap.
|
|
258
258
|
*/
|
|
259
259
|
private getSizeMaskBlocks;
|
|
260
|
+
/**
|
|
261
|
+
* An unlinked ratio, kept between 1:`maxHeight` and `maxWidth`:1 so the largest box of it inside the max
|
|
262
|
+
* size has at least 1px a side; past that, the box rounds to 0px on a side and the cropper has no frame to
|
|
263
|
+
* draw. As with a pixel size, the typed side stops at its max (`sideMax` times the other side: 29999922:1
|
|
264
|
+
* in 1000x800 gives 1000:1), and the other side then stops at `otherSideMax` times the typed one (lowering
|
|
265
|
+
* one side of 800000:800000 to 1 gives 1:800). An unknown max leaves both sides as they are.
|
|
266
|
+
*/
|
|
267
|
+
private fitRatioSides;
|
|
260
268
|
render(): TemplateResult;
|
|
261
269
|
}
|
|
262
270
|
declare global {
|
|
@@ -158,6 +158,13 @@ export default class CxAssetLinkFormatResize extends CortexElement {
|
|
|
158
158
|
*/
|
|
159
159
|
private onHideDetails;
|
|
160
160
|
private handleAspectRatioClick;
|
|
161
|
+
/**
|
|
162
|
+
* An unlinked ratio, kept between 1:`maxHeight` and `maxWidth`:1 so the image resized to it keeps at least
|
|
163
|
+
* 1px a side. As with a pixel size, the typed side stops at its max (`sideMax` times the other side:
|
|
164
|
+
* 29999922:1 in 1000x800 gives 1000:1), and the other side then stops at `otherSideMax` times the typed one
|
|
165
|
+
* (lowering one side of 800000:800000 to 1 gives 1:800). An unknown max (0 or Infinity) leaves both as they are.
|
|
166
|
+
*/
|
|
167
|
+
private fitRatioSides;
|
|
161
168
|
render(): TemplateResult;
|
|
162
169
|
}
|
|
163
170
|
declare global {
|
package/library/packages/organisms/src/downloader/data/core/worker/utilities/FilePathFixer.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export declare class FilePathFixer {
|
|
|
10
10
|
truncateAll: Set<string>;
|
|
11
11
|
};
|
|
12
12
|
constructor(storage: IStorage, userPromptService: IUserPromptService, logger: ILogger);
|
|
13
|
+
private static pathKey;
|
|
14
|
+
static getTakenPaths(files: DownloadFile[], filesToFix: DownloadFile[]): Set<string>;
|
|
15
|
+
private isTaken;
|
|
13
16
|
shouldFixPath(file: DownloadFile): Promise<boolean>;
|
|
14
17
|
/**
|
|
15
18
|
* Checks if a file path contains any invalid characters
|
|
@@ -22,5 +25,6 @@ export declare class FilePathFixer {
|
|
|
22
25
|
*/
|
|
23
26
|
sanitizeFilePath(filePath: string, replacement?: string): string;
|
|
24
27
|
private truncatePath;
|
|
25
|
-
|
|
28
|
+
/** @param takenPaths from getTakenPaths; the path given to this file is added to it */
|
|
29
|
+
tryFixPath(file: DownloadFile, invalidPaths: string[], takenPaths: Set<string>): Promise<void>;
|
|
26
30
|
}
|