@colijnit/inphoto 301.1.6 → 301.1.7
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 +548 -189
- package/fesm2022/colijnit-inphoto.mjs.map +1 -1
- package/index.d.ts +127 -4
- package/lib/component/image-to-room/style/_layout.scss +22 -0
- package/lib/component/image-to-room/style/_material-definition.scss +10 -0
- package/lib/component/image-to-room/style/_theme.scss +12 -0
- package/lib/component/image-to-room/style/material.scss +3 -0
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -126,6 +126,94 @@ declare class ArticleConfiguration {
|
|
|
126
126
|
placement2D: Image2DPlacement;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
declare enum WallSource {
|
|
130
|
+
Inferred = "inferred",
|
|
131
|
+
Reconstructed = "reconstructed"
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
declare enum OpeningType {
|
|
135
|
+
Window = "window",
|
|
136
|
+
Door = "door"
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
declare class RoomCoordinateSystem {
|
|
140
|
+
handedness: string;
|
|
141
|
+
upAxis: string;
|
|
142
|
+
forwardAxis: string;
|
|
143
|
+
rightAxis: string;
|
|
144
|
+
origin: string;
|
|
145
|
+
static fromJson(json: any): RoomCoordinateSystem;
|
|
146
|
+
}
|
|
147
|
+
declare class RoomSceneMetadata {
|
|
148
|
+
units: string;
|
|
149
|
+
coordinateSystem: RoomCoordinateSystem;
|
|
150
|
+
floorLeveled: boolean;
|
|
151
|
+
ceilingHeight: number;
|
|
152
|
+
static fromJson(json: any): RoomSceneMetadata;
|
|
153
|
+
}
|
|
154
|
+
declare class RoomCameraPose {
|
|
155
|
+
location: Vector3;
|
|
156
|
+
forward: Vector3;
|
|
157
|
+
up: Vector3;
|
|
158
|
+
right: Vector3;
|
|
159
|
+
static fromJson(json: any): RoomCameraPose;
|
|
160
|
+
}
|
|
161
|
+
declare class RoomCamera {
|
|
162
|
+
pose: RoomCameraPose;
|
|
163
|
+
intrinsics: Vector3[];
|
|
164
|
+
imageWidth: number;
|
|
165
|
+
imageHeight: number;
|
|
166
|
+
fovHorizontal: number;
|
|
167
|
+
fovVertical: number;
|
|
168
|
+
static fromJson(json: any): RoomCamera;
|
|
169
|
+
}
|
|
170
|
+
declare class RoomCorner {
|
|
171
|
+
id: string;
|
|
172
|
+
position: Vector3;
|
|
173
|
+
static fromJson(json: any): RoomCorner;
|
|
174
|
+
}
|
|
175
|
+
declare class RoomFloor {
|
|
176
|
+
polygon: Vector3[];
|
|
177
|
+
normal: Vector3;
|
|
178
|
+
static fromJson(json: any): RoomFloor;
|
|
179
|
+
}
|
|
180
|
+
declare class RoomWall {
|
|
181
|
+
id: string;
|
|
182
|
+
corner1Id: string;
|
|
183
|
+
corner2Id: string;
|
|
184
|
+
height: number;
|
|
185
|
+
polygon: Vector3[];
|
|
186
|
+
normal: Vector3;
|
|
187
|
+
source: WallSource;
|
|
188
|
+
heightReconstructed: number;
|
|
189
|
+
static fromJson(json: any): RoomWall;
|
|
190
|
+
}
|
|
191
|
+
declare class RoomImageBoundingBox {
|
|
192
|
+
x1: number;
|
|
193
|
+
y1: number;
|
|
194
|
+
x2: number;
|
|
195
|
+
y2: number;
|
|
196
|
+
static fromJson(json: number[]): RoomImageBoundingBox;
|
|
197
|
+
}
|
|
198
|
+
declare class RoomOpening {
|
|
199
|
+
id: string;
|
|
200
|
+
type: OpeningType;
|
|
201
|
+
wallId: string;
|
|
202
|
+
polygon: Vector3[];
|
|
203
|
+
imageBoundingBox: RoomImageBoundingBox;
|
|
204
|
+
static fromJson(json: any): RoomOpening;
|
|
205
|
+
}
|
|
206
|
+
declare class RoomSceneResponse {
|
|
207
|
+
image: string;
|
|
208
|
+
metadata: RoomSceneMetadata;
|
|
209
|
+
camera: RoomCamera;
|
|
210
|
+
corners: RoomCorner[];
|
|
211
|
+
floor: RoomFloor;
|
|
212
|
+
walls: RoomWall[];
|
|
213
|
+
openings: RoomOpening[];
|
|
214
|
+
static fromJson(json: any): RoomSceneResponse;
|
|
215
|
+
}
|
|
216
|
+
|
|
129
217
|
declare class InphotoEventService {
|
|
130
218
|
onProcessRoomReceived: Subject<SceneBuildObject>;
|
|
131
219
|
openCatalog: Subject<boolean>;
|
|
@@ -136,6 +224,7 @@ declare class InphotoEventService {
|
|
|
136
224
|
updateCanvasMaskColor: Subject<boolean>;
|
|
137
225
|
clearMarkedCanvas: Subject<void>;
|
|
138
226
|
onGeneratedImageReceived: Subject<void>;
|
|
227
|
+
onRoomDataFromImageReceived: Subject<RoomSceneResponse>;
|
|
139
228
|
static ɵfac: i0.ɵɵFactoryDeclaration<InphotoEventService, never>;
|
|
140
229
|
static ɵprov: i0.ɵɵInjectableDeclaration<InphotoEventService>;
|
|
141
230
|
}
|
|
@@ -255,6 +344,7 @@ declare class InPhotoConnectorAdapterService implements OnDestroy {
|
|
|
255
344
|
mainUrl: string;
|
|
256
345
|
mainSchema: string;
|
|
257
346
|
mainVersion: string;
|
|
347
|
+
private readonly _interval;
|
|
258
348
|
get connector(): Configurator;
|
|
259
349
|
get articleApi(): Articles;
|
|
260
350
|
get mainApi(): MainApi;
|
|
@@ -294,9 +384,18 @@ declare class InPhotoConnectorAdapterService implements OnDestroy {
|
|
|
294
384
|
getDecorationStyles(showLoader?: boolean): Promise<DataServiceResponseData>;
|
|
295
385
|
getObjectBasedSegmentation(image: string, showLoader?: boolean): Promise<DataServiceResponseData>;
|
|
296
386
|
inPhotoGenerate(image: string, prompt: string): Promise<DataServiceResponseData>;
|
|
387
|
+
/**
|
|
388
|
+
*
|
|
389
|
+
* Unreal / HDH call to get better room data
|
|
390
|
+
*
|
|
391
|
+
* */
|
|
392
|
+
getRoomDataFromImage(image: string, skipInpainting: boolean): Promise<RoomSceneResponse>;
|
|
393
|
+
uploadImageForUnreal(image: string, skipInpainting?: boolean): Promise<string>;
|
|
394
|
+
handleProcessRoomJob(jobId: string): Promise<any>;
|
|
297
395
|
private _handleRoomData;
|
|
298
396
|
private _processRoom;
|
|
299
397
|
private _getJobStatus;
|
|
398
|
+
private _handleJobStatusResponse;
|
|
300
399
|
/**
|
|
301
400
|
*
|
|
302
401
|
* This function should be temp.
|
|
@@ -357,6 +456,7 @@ declare class InPhotoConnectorService {
|
|
|
357
456
|
*
|
|
358
457
|
* */
|
|
359
458
|
uploadRoomImage(image: string, skipInpainting?: boolean): Promise<SceneBuildObject>;
|
|
459
|
+
getRoomDataFromImage(image: string, skipInpainting?: boolean): Promise<RoomSceneResponse>;
|
|
360
460
|
processDecorateImage(canvasImage: string, style: EnhanceStyle): Promise<DecorateResponse>;
|
|
361
461
|
processEmptyRoom(canvasImage: string): Promise<CreatedImageResponse>;
|
|
362
462
|
prepareSegmentation(image: string): Promise<SegmentationBaseObject>;
|
|
@@ -753,6 +853,7 @@ declare class ImageUpload implements OnDestroy {
|
|
|
753
853
|
readonly icons: typeof Icon;
|
|
754
854
|
showClass(): boolean;
|
|
755
855
|
multiUpload: boolean;
|
|
856
|
+
useDragAndDrop: boolean;
|
|
756
857
|
set supportedFiles(value: FileTypes[]);
|
|
757
858
|
get supportedFiles(): FileTypes[];
|
|
758
859
|
set compactMode(value: boolean);
|
|
@@ -776,7 +877,7 @@ declare class ImageUpload implements OnDestroy {
|
|
|
776
877
|
private _handleSetSupportedFiles;
|
|
777
878
|
private _setAcceptAttr;
|
|
778
879
|
static ɵfac: i0.ɵɵFactoryDeclaration<ImageUpload, never>;
|
|
779
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ImageUpload, "co-image-upload", never, { "multiUpload": { "alias": "multiUpload"; "required": false; }; "supportedFiles": { "alias": "supportedFiles"; "required": false; }; "compactMode": { "alias": "compactMode"; "required": false; }; }, { "uploadedFiles": "uploadedFiles"; }, never, never, false, never>;
|
|
880
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImageUpload, "co-image-upload", never, { "multiUpload": { "alias": "multiUpload"; "required": false; }; "useDragAndDrop": { "alias": "useDragAndDrop"; "required": false; }; "supportedFiles": { "alias": "supportedFiles"; "required": false; }; "compactMode": { "alias": "compactMode"; "required": false; }; }, { "uploadedFiles": "uploadedFiles"; }, never, never, false, never>;
|
|
780
881
|
}
|
|
781
882
|
|
|
782
883
|
declare class ImageUploadModule {
|
|
@@ -1891,6 +1992,27 @@ declare class UploadStartingImageModule {
|
|
|
1891
1992
|
static ɵinj: i0.ɵɵInjectorDeclaration<UploadStartingImageModule>;
|
|
1892
1993
|
}
|
|
1893
1994
|
|
|
1995
|
+
declare class ImageToRoomComponent {
|
|
1996
|
+
private _connectorService;
|
|
1997
|
+
readonly FileTypes: typeof FileTypes;
|
|
1998
|
+
showClass(): boolean;
|
|
1999
|
+
skipInpainting: boolean;
|
|
2000
|
+
useDragAndDrop: boolean;
|
|
2001
|
+
onRoomSceneResponseReceived: EventEmitter<RoomSceneResponse>;
|
|
2002
|
+
showLoader: boolean;
|
|
2003
|
+
loadingTexts: string[];
|
|
2004
|
+
constructor(_connectorService: InPhotoConnectorService);
|
|
2005
|
+
handleImageUpload(files: File[]): Promise<void>;
|
|
2006
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImageToRoomComponent, never>;
|
|
2007
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ImageToRoomComponent, "co-image-to-room", never, { "skipInpainting": { "alias": "skipInpainting"; "required": false; }; "useDragAndDrop": { "alias": "useDragAndDrop"; "required": false; }; }, { "onRoomSceneResponseReceived": "onRoomSceneResponseReceived"; }, never, never, false, never>;
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
declare class ImageToRoomModule {
|
|
2011
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImageToRoomModule, never>;
|
|
2012
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ImageToRoomModule, [typeof ImageToRoomComponent], [typeof ImageUploadModule, typeof ProcessLoaderModule], [typeof ImageToRoomComponent]>;
|
|
2013
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ImageToRoomModule>;
|
|
2014
|
+
}
|
|
2015
|
+
|
|
1894
2016
|
declare class AppInitializerService {
|
|
1895
2017
|
private _settingsService;
|
|
1896
2018
|
private _connectorService;
|
|
@@ -1913,6 +2035,7 @@ declare class InPhotoComponent implements OnDestroy {
|
|
|
1913
2035
|
set settings(input: any);
|
|
1914
2036
|
set image(value: string);
|
|
1915
2037
|
debug: boolean;
|
|
2038
|
+
imageToRoom: boolean;
|
|
1916
2039
|
set useMockRoomData(value: boolean);
|
|
1917
2040
|
showImageUpload: boolean;
|
|
1918
2041
|
showImagePrepare: boolean;
|
|
@@ -1944,7 +2067,7 @@ declare class InPhotoComponent implements OnDestroy {
|
|
|
1944
2067
|
closeReadyToOpen(): void;
|
|
1945
2068
|
handleOpenCatalog(is2D?: boolean): void;
|
|
1946
2069
|
static ɵfac: i0.ɵɵFactoryDeclaration<InPhotoComponent, never>;
|
|
1947
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InPhotoComponent, "co-inphoto", never, { "settings": { "alias": "settings"; "required": false; }; "image": { "alias": "image"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "useMockRoomData": { "alias": "useMockRoomData"; "required": false; }; }, {}, never, never, false, never>;
|
|
2070
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InPhotoComponent, "co-inphoto", never, { "settings": { "alias": "settings"; "required": false; }; "image": { "alias": "image"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "imageToRoom": { "alias": "imageToRoom"; "required": false; }; "useMockRoomData": { "alias": "useMockRoomData"; "required": false; }; }, {}, never, never, false, never>;
|
|
1948
2071
|
}
|
|
1949
2072
|
|
|
1950
2073
|
declare enum SegmentationType {
|
|
@@ -2047,8 +2170,8 @@ declare class SideBarMenuModule {
|
|
|
2047
2170
|
|
|
2048
2171
|
declare class InPhotoModule {
|
|
2049
2172
|
static ɵfac: i0.ɵɵFactoryDeclaration<InPhotoModule, never>;
|
|
2050
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<InPhotoModule, [typeof InPhotoComponent], [typeof UploadStartingImageModule, typeof ErrorDialogModule, typeof ProcessLoaderModule, typeof PrepareStartingImageModule, typeof InphotoThreedsceneModule, typeof PhotoEditorModule, typeof EditCanvasModule, typeof SegmentInpaintModule, typeof SideBarMenuModule, typeof InphotoCatalogModule], [typeof InPhotoComponent]>;
|
|
2173
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<InPhotoModule, [typeof InPhotoComponent], [typeof UploadStartingImageModule, typeof ErrorDialogModule, typeof ProcessLoaderModule, typeof PrepareStartingImageModule, typeof InphotoThreedsceneModule, typeof PhotoEditorModule, typeof EditCanvasModule, typeof SegmentInpaintModule, typeof SideBarMenuModule, typeof InphotoCatalogModule, typeof ImageToRoomModule], [typeof InPhotoComponent]>;
|
|
2051
2174
|
static ɵinj: i0.ɵɵInjectorDeclaration<InPhotoModule>;
|
|
2052
2175
|
}
|
|
2053
2176
|
|
|
2054
|
-
export { EditCanvasComponent, EditCanvasModule, ErrorDialogComponent, ErrorDialogModule, ImageEnhancer, ImageEnhancerModule, ImageEnhancerStyleComponent, ImageEnhancerStyleModule, ImageEnhancerUploadComponent, ImageEnhancerUploadModule, ImageHistoryComponent, ImageHistoryModule, ImageHistoryTileComponent, ImageHistoryTileModule, ImageUpload, ImageUploadModule, InPhotoComponent, InPhotoConnectorService, InPhotoModule, InphotoCatalogComponent, InphotoCatalogModule, InphotoSettingsService, InphotoThreedSceneComponent, InphotoThreedsceneModule, PhotoEditorComponent, PhotoEditorModule, PrepareStartingImageComponent, PrepareStartingImageModule, ProcessLoaderComponent, ProcessLoaderModule, UploadStartingImageComponent, UploadStartingImageModule };
|
|
2177
|
+
export { EditCanvasComponent, EditCanvasModule, ErrorDialogComponent, ErrorDialogModule, ImageEnhancer, ImageEnhancerModule, ImageEnhancerStyleComponent, ImageEnhancerStyleModule, ImageEnhancerUploadComponent, ImageEnhancerUploadModule, ImageHistoryComponent, ImageHistoryModule, ImageHistoryTileComponent, ImageHistoryTileModule, ImageToRoomComponent, ImageToRoomModule, ImageUpload, ImageUploadModule, InPhotoComponent, InPhotoConnectorService, InPhotoModule, InphotoCatalogComponent, InphotoCatalogModule, InphotoSettingsService, InphotoThreedSceneComponent, InphotoThreedsceneModule, PhotoEditorComponent, PhotoEditorModule, PrepareStartingImageComponent, PrepareStartingImageModule, ProcessLoaderComponent, ProcessLoaderModule, RoomCamera, RoomCameraPose, RoomCoordinateSystem, RoomCorner, RoomFloor, RoomImageBoundingBox, RoomOpening, RoomSceneMetadata, RoomSceneResponse, RoomWall, UploadStartingImageComponent, UploadStartingImageModule };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@use '../../../style' as cfg;
|
|
2
|
+
|
|
3
|
+
@include cfg.export-module('co-image-to-room-layout') {
|
|
4
|
+
.co-image-to-room {
|
|
5
|
+
|
|
6
|
+
.image-to-room-container {
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
align-items: center;
|
|
10
|
+
width: var(--co-inphoto-image-to-room-full-size);
|
|
11
|
+
height: var(--co-inphoto-image-to-room-full-size);
|
|
12
|
+
min-height: var(--co-inphoto-image-to-room-min-height);
|
|
13
|
+
padding: var(--co-inphoto-image-to-room-padding);
|
|
14
|
+
box-sizing: var(--co-inphoto-image-to-room-box-sizing);
|
|
15
|
+
|
|
16
|
+
.co-image-upload {
|
|
17
|
+
width: var(--co-inphoto-image-to-room-full-size);
|
|
18
|
+
max-width: var(--co-inphoto-image-to-room-upload-max-width);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
.co-image-to-room {
|
|
2
|
+
--co-inphoto-image-to-room-font-family: var(--co-inphoto-font-family);
|
|
3
|
+
--co-inphoto-image-to-room-font-size-text: var(--co-inphoto-font-size-text);
|
|
4
|
+
--co-inphoto-image-to-room-background: #eee;
|
|
5
|
+
--co-inphoto-image-to-room-full-size: 100%;
|
|
6
|
+
--co-inphoto-image-to-room-min-height: 100vh;
|
|
7
|
+
--co-inphoto-image-to-room-padding: 25px;
|
|
8
|
+
--co-inphoto-image-to-room-box-sizing: border-box;
|
|
9
|
+
--co-inphoto-image-to-room-upload-max-width: 500px;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@use '../../../style' as cfg;
|
|
2
|
+
|
|
3
|
+
@include cfg.export-module('co-image-to-room-theme') {
|
|
4
|
+
.co-image-to-room {
|
|
5
|
+
font-family: var(--co-inphoto-image-to-room-font-family);
|
|
6
|
+
font-size: var(--co-inphoto-image-to-room-font-size-text);
|
|
7
|
+
|
|
8
|
+
.image-to-room-container {
|
|
9
|
+
background-color: var(--co-inphoto-image-to-room-background);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colijnit/inphoto",
|
|
3
|
-
"version": "301.1.
|
|
3
|
+
"version": "301.1.7",
|
|
4
4
|
"description": "Colijn IT inphoto module for Angular 20",
|
|
5
5
|
"repository": "npm/npm",
|
|
6
6
|
"author": "Colijn IT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@colijnit/articleapi": ">=301.1.5 < 302",
|
|
15
15
|
"@colijnit/catalog": ">=301.1.7 < 302",
|
|
16
16
|
"@colijnit/configurator": ">=301.1.7 < 302",
|
|
17
|
-
"@colijnit/configuratorapi": ">=301.1.
|
|
17
|
+
"@colijnit/configuratorapi": ">=301.1.5 < 302",
|
|
18
18
|
"@colijnit/corecomponents_v12": ">=301.1.5 < 302",
|
|
19
19
|
"@colijnit/ioneconnector": ">=301.1.1 < 302",
|
|
20
20
|
"@colijnit/mainapi": ">=301.1.7 < 302",
|