@colijnit/inphoto 301.1.2 → 301.1.3
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/fesm2022/colijnit-inphoto.mjs +514 -322
- package/fesm2022/colijnit-inphoto.mjs.map +1 -1
- package/index.d.ts +27 -5
- package/lib/component/edit-canvas/style/_layout.scss +16 -1
- package/lib/component/edit-canvas/style/_theme.scss +0 -1
- package/lib/component/photo-editor/style/_layout.scss +8 -0
- package/lib/component/photo-editor/style/_material-definition.scss +4 -1
- package/lib/component/photo-editor/style/_theme.scss +1 -1
- package/lib/component/prepare-starting-image/style/_layout.scss +15 -11
- package/lib/component/prepare-starting-image/style/_material-definition.scss +6 -4
- package/lib/component/prepare-starting-image/style/_theme.scss +5 -2
- package/lib/component/process-loader/style/_layout.scss +2 -1
- package/lib/component/process-loader/style/_material-definition.scss +0 -1
- package/lib/component/segment-inpaint/style/_layout.scss +2 -0
- package/lib/component/segment-inpaint/style/_material-definition.scss +1 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -570,6 +570,8 @@ declare class EditCanvasComponent implements AfterViewInit {
|
|
|
570
570
|
private _appEventService;
|
|
571
571
|
readonly icons: typeof Icon;
|
|
572
572
|
showClass(): boolean;
|
|
573
|
+
fitToContainerClass(): boolean;
|
|
574
|
+
onResize(): void;
|
|
573
575
|
canvas: ElementRef<HTMLCanvasElement>;
|
|
574
576
|
canvasContainer: ElementRef<HTMLDivElement>;
|
|
575
577
|
set image(value: string);
|
|
@@ -599,6 +601,7 @@ declare class EditCanvasComponent implements AfterViewInit {
|
|
|
599
601
|
hoveredObjectLabel: string | null;
|
|
600
602
|
hoveredLabelX: number;
|
|
601
603
|
hoveredLabelY: number;
|
|
604
|
+
fitToContainer: boolean;
|
|
602
605
|
private _backgroundImage;
|
|
603
606
|
private _maskLayers;
|
|
604
607
|
private _currentStroke;
|
|
@@ -1319,11 +1322,14 @@ declare class PrepareStartingImageComponent implements OnDestroy {
|
|
|
1319
1322
|
private _connectorService;
|
|
1320
1323
|
private _dataService;
|
|
1321
1324
|
private _errorService;
|
|
1325
|
+
private _eventService;
|
|
1322
1326
|
private _changeDetection;
|
|
1323
1327
|
readonly icons: typeof Icon;
|
|
1324
1328
|
readonly redesignMode: typeof RedesignMode;
|
|
1325
1329
|
showClass(): boolean;
|
|
1326
|
-
image: string;
|
|
1330
|
+
set image(value: string);
|
|
1331
|
+
get image(): string;
|
|
1332
|
+
get canvasImage(): string;
|
|
1327
1333
|
cancelClick: EventEmitter<void>;
|
|
1328
1334
|
startSegmentation: EventEmitter<string>;
|
|
1329
1335
|
imageReady: EventEmitter<string>;
|
|
@@ -1335,14 +1341,26 @@ declare class PrepareStartingImageComponent implements OnDestroy {
|
|
|
1335
1341
|
showInputError: boolean;
|
|
1336
1342
|
showAILoader: boolean;
|
|
1337
1343
|
loadingAIgenerationTexts: string[];
|
|
1344
|
+
canvasErase: boolean;
|
|
1345
|
+
dragMode: boolean;
|
|
1346
|
+
brushSize: number;
|
|
1347
|
+
private _image;
|
|
1348
|
+
private _canvasImage;
|
|
1338
1349
|
private _subs;
|
|
1339
|
-
constructor(iconService: InphotoIconCacheService, _connectorService: InPhotoConnectorService, _dataService: InphotoDataService, _errorService: ErrorService, _changeDetection: ChangeDetectorRef);
|
|
1350
|
+
constructor(iconService: InphotoIconCacheService, _connectorService: InPhotoConnectorService, _dataService: InphotoDataService, _errorService: ErrorService, _eventService: InphotoEventService, _changeDetection: ChangeDetectorRef);
|
|
1340
1351
|
ngOnDestroy(): void;
|
|
1341
1352
|
handleCancelClick(): void;
|
|
1353
|
+
toggleEraseMode(state: boolean): void;
|
|
1354
|
+
toggleDragMode(value: boolean): void;
|
|
1355
|
+
handleChangeBrushSize(size: number): void;
|
|
1356
|
+
handleUpdateCanvasImage(image: string): void;
|
|
1357
|
+
handleSetImageFromHistory(image: string): void;
|
|
1342
1358
|
handleGenerateClicked(): void;
|
|
1343
|
-
handleClearAllObjectsAndStart3D(): void;
|
|
1344
|
-
handleSelectToClearObjects(): void;
|
|
1359
|
+
handleClearAllObjectsAndStart3D(image?: string): void;
|
|
1360
|
+
handleSelectToClearObjects(image?: string): void;
|
|
1345
1361
|
handleContinueToAI(mode: RedesignMode): void;
|
|
1362
|
+
private _addStartingImageToHistory;
|
|
1363
|
+
private _addToHistory;
|
|
1346
1364
|
private _handleError;
|
|
1347
1365
|
static ɵfac: i0.ɵɵFactoryDeclaration<PrepareStartingImageComponent, never>;
|
|
1348
1366
|
static ɵcmp: i0.ɵɵComponentDeclaration<PrepareStartingImageComponent, "co-prepare-starting-image", never, { "image": { "alias": "image"; "required": false; }; }, { "cancelClick": "cancelClick"; "startSegmentation": "startSegmentation"; "imageReady": "imageReady"; "continueToAI": "continueToAI"; }, never, never, false, never>;
|
|
@@ -1350,7 +1368,7 @@ declare class PrepareStartingImageComponent implements OnDestroy {
|
|
|
1350
1368
|
|
|
1351
1369
|
declare class PrepareStartingImageModule {
|
|
1352
1370
|
static ɵfac: i0.ɵɵFactoryDeclaration<PrepareStartingImageModule, never>;
|
|
1353
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PrepareStartingImageModule, [typeof PrepareStartingImageComponent], [typeof EditCanvasModule, typeof i2.ButtonModule, typeof PipeModule, typeof i2.IconModule, typeof ProcessLoaderModule, typeof StepTileModule, typeof HeaderModule, typeof SidePanelModule, typeof AiPromptModule], [typeof PrepareStartingImageComponent]>;
|
|
1371
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PrepareStartingImageModule, [typeof PrepareStartingImageComponent], [typeof EditCanvasModule, typeof ImageHistoryModule, typeof CanvasToolBarModule, typeof i7.DragDropModule, typeof i2.ButtonModule, typeof PipeModule, typeof i2.IconModule, typeof ProcessLoaderModule, typeof StepTileModule, typeof HeaderModule, typeof SidePanelModule, typeof AiPromptModule], [typeof PrepareStartingImageComponent]>;
|
|
1354
1372
|
static ɵinj: i0.ɵɵInjectorDeclaration<PrepareStartingImageModule>;
|
|
1355
1373
|
}
|
|
1356
1374
|
|
|
@@ -1573,6 +1591,7 @@ declare class InphotoThreedSceneComponent implements AfterViewInit, OnDestroy {
|
|
|
1573
1591
|
readonly icons: typeof Icon;
|
|
1574
1592
|
readonly RedesignMode: typeof RedesignMode;
|
|
1575
1593
|
showClass(): boolean;
|
|
1594
|
+
onResize(): void;
|
|
1576
1595
|
container: ElementRef<HTMLDivElement>;
|
|
1577
1596
|
sceneContainer: ElementRef<HTMLDivElement>;
|
|
1578
1597
|
imageOverlayComponent: Image2DPlacementComponent;
|
|
@@ -1616,6 +1635,7 @@ declare class InphotoThreedSceneComponent implements AfterViewInit, OnDestroy {
|
|
|
1616
1635
|
private _subs;
|
|
1617
1636
|
private _pendingImageArticleConfiguration;
|
|
1618
1637
|
private _pendingImageIsReconfigure;
|
|
1638
|
+
private _backgroundSize;
|
|
1619
1639
|
constructor(iconService: InphotoIconCacheService, objectsService: InphotoItemService, _interactionService: InphotoInteractionService, _sceneService: InphotoSceneService, _appEventService: InphotoEventService, _settingsService: InphotoSettingsService, _configuringService: ConfiguringService, _configuratorEventService: ConfiguratorEventService, _cdk: ChangeDetectorRef, _renderConnectorService: RenderConnectorService, _renderService: RenderService, _renderEventService: RenderEventService, _errorService: ErrorService, _inphotoHudService: InphotoHudService);
|
|
1620
1640
|
ngAfterViewInit(): void;
|
|
1621
1641
|
ngOnDestroy(): void;
|
|
@@ -1643,6 +1663,8 @@ declare class InphotoThreedSceneComponent implements AfterViewInit, OnDestroy {
|
|
|
1643
1663
|
private _getMarkersForMeshType;
|
|
1644
1664
|
private _getMeshesByType;
|
|
1645
1665
|
private _worldPositionToContainerPixel;
|
|
1666
|
+
private _applyBackgroundSize;
|
|
1667
|
+
private _getViewportFittedSize;
|
|
1646
1668
|
private _updateOverlayCanvasRect;
|
|
1647
1669
|
private _getOverlayCanvasForMerge;
|
|
1648
1670
|
private _addArticleToScene;
|
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
align-items: flex-start;
|
|
16
16
|
|
|
17
17
|
.canvas-frame {
|
|
18
|
-
display:
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
19
20
|
padding: var(--co-inphoto-edit-canvas-frame-padding);
|
|
20
21
|
margin: var(--co-inphoto-edit-canvas-frame-margin);
|
|
21
22
|
position: var(--co-inphoto-edit-canvas-position-relative);
|
|
23
|
+
width: 100%;
|
|
22
24
|
|
|
23
25
|
canvas {
|
|
24
26
|
display: block;
|
|
@@ -71,5 +73,18 @@
|
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
75
|
}
|
|
76
|
+
|
|
77
|
+
&.fit-to-container {
|
|
78
|
+
display: block;
|
|
79
|
+
height: var(--co-inphoto-edit-canvas-full-size);
|
|
80
|
+
|
|
81
|
+
.edit-canvas-container {
|
|
82
|
+
height: var(--co-inphoto-edit-canvas-full-size);
|
|
83
|
+
|
|
84
|
+
.canvas-container {
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
74
89
|
}
|
|
75
90
|
}
|
|
@@ -14,7 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
.photo-editor-canvas {
|
|
16
16
|
width: var(--co-inphoto-left-container-width);
|
|
17
|
+
height: var(--co-inphoto-photo-editor-canvas-height);
|
|
18
|
+
display: grid;
|
|
19
|
+
grid-template-rows: var(--co-inphoto-photo-editor-canvas-rows);
|
|
17
20
|
|
|
21
|
+
.photo-editor-canvas-area {
|
|
22
|
+
position: var(--co-inphoto-photo-editor-position-relative);
|
|
23
|
+
min-height: var(--co-inphoto-photo-editor-zero);
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
18
26
|
|
|
19
27
|
.photo-editor-bottom {
|
|
20
28
|
padding: var(--co-inphoto-photo-editor-bottom-padding);
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
--co-inphoto-photo-editor-font-family: var(--co-inphoto-font-family);
|
|
4
4
|
--co-inphoto-photo-editor-position-relative: relative;
|
|
5
5
|
--co-inphoto-photo-editor-full-size: 100%;
|
|
6
|
+
--co-inphoto-photo-editor-zero: 0;
|
|
7
|
+
--co-inphoto-photo-editor-canvas-height: 100vh;
|
|
8
|
+
--co-inphoto-photo-editor-canvas-rows: minmax(0, 1fr) auto; /* canvas takes what the history row leaves */
|
|
6
9
|
--co-inphoto-photo-editor-bottom-padding: 10px;
|
|
7
|
-
--co-inphoto-photo-editor-bottom-margin:
|
|
10
|
+
--co-inphoto-photo-editor-bottom-margin: 2px 20px 10px;
|
|
8
11
|
--co-inphoto-photo-editor-upload-height: 100vh;
|
|
9
12
|
--co-inphoto-photo-editor-upload-width: 100vw;
|
|
10
13
|
--co-inphoto-photo-editor-button-container-padding: 20px;
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
font-size: var(--co-inphoto-photo-editor-font-size-text);
|
|
7
7
|
|
|
8
8
|
.photo-editor-canvas {
|
|
9
|
+
background: var(--co-inphoto-background-white);
|
|
9
10
|
.photo-editor-bottom {
|
|
10
|
-
background: var(--co-inphoto-background-white);
|
|
11
11
|
box-shadow: var(--co-inphoto-container-box-shadow);
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -9,20 +9,24 @@
|
|
|
9
9
|
min-height: var(--co-inphoto-prepare-starting-image-min-height);
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
.prepare-image-
|
|
12
|
+
.prepare-image-canvas {
|
|
13
13
|
width: var(--co-inphoto-left-container-width);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
height: var(--co-inphoto-prepare-starting-image-canvas-height);
|
|
15
|
+
display: grid;
|
|
16
|
+
grid-template-rows: var(--co-inphoto-prepare-starting-image-canvas-rows);
|
|
17
17
|
|
|
18
|
-
.prepare-image-
|
|
19
|
-
|
|
18
|
+
.prepare-image-canvas-area {
|
|
19
|
+
position: var(--co-inphoto-prepare-starting-image-canvas-position);
|
|
20
|
+
min-height: var(--co-inphoto-prepare-starting-image-zero);
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.prepare-image-bottom {
|
|
25
|
+
padding: var(--co-inphoto-prepare-starting-image-bottom-padding);
|
|
26
|
+
margin: var(--co-inphoto-prepare-starting-image-bottom-margin);
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
20
29
|
|
|
21
|
-
img {
|
|
22
|
-
display: block;
|
|
23
|
-
max-width: var(--co-inphoto-prepare-starting-image-preview-max-width);
|
|
24
|
-
height: var(--co-inphoto-prepare-starting-image-image-height);
|
|
25
|
-
}
|
|
26
30
|
}
|
|
27
31
|
}
|
|
28
32
|
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
--co-inphoto-prepare-starting-image-icon-background: #FFF7ED;
|
|
5
5
|
--co-inphoto-prepare-starting-image-full-width: 100%;
|
|
6
6
|
--co-inphoto-prepare-starting-image-min-height: 100vh;
|
|
7
|
-
--co-inphoto-prepare-starting-image-
|
|
8
|
-
--co-inphoto-prepare-starting-image-
|
|
9
|
-
--co-inphoto-prepare-starting-image-
|
|
10
|
-
--co-inphoto-prepare-starting-image-
|
|
7
|
+
--co-inphoto-prepare-starting-image-canvas-position: relative;
|
|
8
|
+
--co-inphoto-prepare-starting-image-canvas-height: 100vh;
|
|
9
|
+
--co-inphoto-prepare-starting-image-canvas-rows: minmax(0, 1fr) auto; /* canvas takes what the history row leaves */
|
|
10
|
+
--co-inphoto-prepare-starting-image-zero: 0;
|
|
11
|
+
--co-inphoto-prepare-starting-image-bottom-padding: 10px;
|
|
12
|
+
--co-inphoto-prepare-starting-image-bottom-margin: 2px 20px 10px;
|
|
11
13
|
--co-inphoto-prepare-starting-image-gap: 16px;
|
|
12
14
|
--co-inphoto-prepare-starting-image-side-panel-prompt-padding: 20px 0;
|
|
13
15
|
--co-inphoto-prepare-starting-image-tiles-columns: repeat(2, 1fr);
|
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
font-size: var(--co-inphoto-prepare-starting-image-font-size-text);
|
|
7
7
|
|
|
8
8
|
.prepare-starting-image-container {
|
|
9
|
-
.prepare-image-
|
|
10
|
-
|
|
9
|
+
.prepare-image-canvas {
|
|
10
|
+
background: var(--co-inphoto-background-white);
|
|
11
|
+
.prepare-image-bottom {
|
|
12
|
+
box-shadow: var(--co-inphoto-container-box-shadow);
|
|
13
|
+
}
|
|
11
14
|
}
|
|
12
15
|
|
|
13
16
|
.prepare-starting-image-dialog {
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
.loading-text-track {
|
|
45
45
|
display: flex;
|
|
46
46
|
flex-direction: column;
|
|
47
|
-
|
|
47
|
+
// Built here and not in _material-definition: var(--active) must resolve on the track, where it is set
|
|
48
|
+
transform: translateY(calc(var(--active, 0) * var(--co-inphoto-process-loader-text-item-height) * -1));
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
.loading-text-item {
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
--co-inphoto-process-loader-carousel-margin-top: 30px;
|
|
16
16
|
--co-inphoto-process-loader-carousel-width: 450px;
|
|
17
17
|
--co-inphoto-process-loader-text-item-height: 60px;
|
|
18
|
-
--co-inphoto-process-loader-track-transform: translateY(calc(var(--active, 0) * var(--co-inphoto-process-loader-text-item-height) * -1));
|
|
19
18
|
--co-inphoto-process-loader-track-transition: transform 0.5s ease-in-out;
|
|
20
19
|
--co-inphoto-process-loader-track-transition-none: none;
|
|
21
20
|
--co-inphoto-process-loader-dots-size: 1.5em;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
--co-inphoto-segment-inpaint-full-size: 100%;
|
|
5
5
|
--co-inphoto-segment-inpaint-zero: 0;
|
|
6
6
|
--co-inphoto-segment-inpaint-position-relative: relative;
|
|
7
|
+
--co-inphoto-segment-inpaint-canvas-height: 100vh;
|
|
7
8
|
--co-inphoto-segment-inpaint-tile-group-gap: 16px;
|
|
8
9
|
--co-inphoto-segment-inpaint-tile-group-flex: 1;
|
|
9
10
|
--co-inphoto-segment-inpaint-tile-image-size: 100%;
|