@roomle/embedding-lib 5.30.1 → 5.31.0-alpha.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.
Files changed (58) hide show
  1. package/docs/md/web/embedding/CHANGELOG.md +23 -2
  2. package/package.json +1 -1
  3. package/packages/design-system/build-webcomponents.d.ts +5 -0
  4. package/packages/design-system/src/utils/shadow-dom.d.ts +6 -0
  5. package/packages/design-system/src/utils/toggle.d.ts +19 -0
  6. package/packages/embedding-lib/src/examples/homag-intelligence-example.d.ts +11 -0
  7. package/packages/embedding-lib/src/examples/utils/homag-intelligence/drag-in.d.ts +1 -0
  8. package/packages/web-sdk/packages/common-core/src/configurator-kernel-access.d.ts +5 -6
  9. package/packages/web-sdk/packages/common-core/src/services/cache-holder.d.ts +5 -2
  10. package/packages/web-sdk/packages/common-core/src/utils/common-utils.d.ts +37 -0
  11. package/packages/web-sdk/packages/common-core/src/utils/init-data.d.ts +1 -1
  12. package/packages/web-sdk/packages/common-core/src/utils/threejs-utils.d.ts +3 -0
  13. package/packages/web-sdk/packages/common-core/src/view-model/configurator-view-model.d.ts +5 -7
  14. package/packages/web-sdk/packages/common-core/src/webgl/roomle-component-factory.d.ts +1 -1
  15. package/packages/web-sdk/packages/configurator-core/src/services/configurator-ui-callback.d.ts +4 -0
  16. package/packages/web-sdk/packages/configurator-core/src/utils/animation/animation-helper.d.ts +3 -2
  17. package/packages/web-sdk/packages/configurator-core/src/utils/animation/drag-insert-animation.d.ts +2 -2
  18. package/packages/web-sdk/packages/configurator-core/src/utils/dimensioning-helper.d.ts +30 -18
  19. package/packages/web-sdk/packages/configurator-core/src/webgl/configurator-scene-event-handler.d.ts +4 -0
  20. package/packages/web-sdk/packages/configurator-core/src/webgl/configurator-scene-manager.d.ts +0 -3
  21. package/packages/web-sdk/packages/homag-intelligence/__tests__/glue-logic-test.d.ts +1 -0
  22. package/packages/web-sdk/packages/homag-intelligence/src/api.d.ts +4 -3
  23. package/packages/web-sdk/packages/homag-intelligence/src/callbacks.d.ts +1 -1
  24. package/packages/web-sdk/packages/homag-intelligence/src/debug-logging.d.ts +6 -7
  25. package/packages/web-sdk/packages/{planner-core → homag-intelligence}/src/external-object-api.d.ts +26 -10
  26. package/packages/web-sdk/packages/homag-intelligence/src/{emulator.d.ts → glue-logic.d.ts} +12 -13
  27. package/packages/web-sdk/packages/homag-intelligence/src/hi-object-selection.d.ts +2 -2
  28. package/packages/web-sdk/packages/homag-intelligence/src/hi-tag-catalog-callbacks.d.ts +1 -1
  29. package/packages/web-sdk/packages/homag-intelligence/src/homag-intelligence.d.ts +1 -1
  30. package/packages/web-sdk/packages/homag-intelligence/src/orders.d.ts +1 -1
  31. package/packages/web-sdk/packages/planner-core/src/roomle-planner-ui-callback.d.ts +1 -1
  32. package/packages/web-sdk/packages/planner-core/src/roomle-planner.d.ts +21 -22
  33. package/packages/web-sdk/packages/planner-core/src/services/planner-kernel-access.d.ts +10 -6
  34. package/packages/web-sdk/packages/planner-core/src/view-model/plan-view-model.d.ts +1 -1
  35. package/packages/web-sdk/packages/planner-core/src/webgl/planner-element-highlighter.d.ts +1 -0
  36. package/packages/web-sdk/packages/planner-core/src/webgl/planner-scene-event-handler.d.ts +4 -4
  37. package/packages/web-sdk/packages/planner-core/src/webgl/planner-scene-manager.d.ts +10 -5
  38. package/packages/web-sdk/packages/typings/configurator-kernel-container.d.ts +3 -6
  39. package/packages/web-sdk/packages/typings/kernel.d.ts +20 -15
  40. package/packages/web-sdk/packages/typings/planner-kernel-container.d.ts +4 -7
  41. package/packages/web-sdk/packages/typings/planner.d.ts +10 -6
  42. package/src/common/components/flying-menu/FlyingMenuToggles.vue.d.ts +16 -0
  43. package/src/common/components/notifications/MaximumLightNotification.vue.d.ts +8 -0
  44. package/src/common/components/notifications/RenderingLightNotification.vue.d.ts +6 -0
  45. package/src/common/components/parameters/ColorParameter.vue.d.ts +2 -2
  46. package/src/common/components/side-bar/utils/configurator-sidebar-components.d.ts +88 -46
  47. package/src/common/components/utils/-utils/notifications.d.ts +4 -0
  48. package/src/common/composables/use-static-item-parameters.d.ts +1 -1
  49. package/src/configurator/components/addons/PossibleChildren.vue.d.ts +2 -2
  50. package/src/configurator/components/grid-view/GridView.vue.d.ts +2 -2
  51. package/src/configurator/components/parameters/types/MaterialParameter.vue.d.ts +2 -2
  52. package/src/configurator/components/parameters/types/ProductVariant.vue.d.ts +2 -2
  53. package/src/configurator/components/parameters/types/ThumbnailsParameter.vue.d.ts +2 -4
  54. package/src/configurator/embedding/exposed-api.d.ts +10 -1
  55. package/src/configurator/embedding/types.d.ts +3 -0
  56. package/src/planner/components/overlays/rooms/ElementLengthScaling.vue.d.ts +79 -35
  57. package/src/planner/components/overlays/rooms/ParameterSwitch.vue.d.ts +2 -0
  58. /package/packages/web-sdk/packages/{planner-core → homag-intelligence}/src/external-object-api-callbacks.d.ts +0 -0
@@ -1,6 +1,27 @@
1
- ## [5.30.1](https://github.com/roomle-dev/roomle-ui/compare/embedding-lib-v5.30.0...embedding-lib-v5.30.1) (2025-10-22)
1
+ ## [5.31.0-alpha.2](https://github.com/roomle-dev/roomle-ui/compare/embedding-lib-v5.31.0-alpha.1...embedding-lib-v5.31.0-alpha.2) (2025-10-28)
2
+
3
+
4
+ ### Features
5
+
6
+ * change the look and feel of the normal dimensions ([70a4944](https://github.com/roomle-dev/roomle-ui/commit/70a4944068b402c0dcf5311c0d502c6fd756d502))
7
+ * core api - docking preview ([b59ebcb](https://github.com/roomle-dev/roomle-ui/commit/b59ebcb47c245dc08e2c4df1a0eb61ff4a6601be))
8
+ * implement camera-aware dimension line positioning ([4f43eb4](https://github.com/roomle-dev/roomle-ui/commit/4f43eb487bef2ef43384a655f1231f8a1a8c7769))
9
+ * insert item from external catalog on click ([4ea3635](https://github.com/roomle-dev/roomle-ui/commit/4ea3635a8fad46ba08de383320bdee0f8fbfb64d))
10
+ * swap object in plan with item from external catalog ([aff3317](https://github.com/roomle-dev/roomle-ui/commit/aff3317d1129cca74b0693c5642a535ff9904795))
11
+ * **core:** upgrade to version 2.63.0-alpha.5 ([8728856](https://github.com/roomle-dev/roomle-ui/commit/87288561dd628c775b70211c5566008fae77a16c))
12
+ * **core:** upgrade to version 2.63.0-alpha.6 ([4194874](https://github.com/roomle-dev/roomle-ui/commit/4194874530ec7dcef5a15f52a8d76ec125f4cdf2))
2
13
 
3
14
 
4
15
  ### Bug Fixes
5
16
 
6
- * loading of multiple catalogs via init data url ([a8e816e](https://github.com/roomle-dev/roomle-ui/commit/a8e816eb2373830e750cc0f5c878bdb7c062c45d))
17
+ * checked style ([736ff22](https://github.com/roomle-dev/roomle-ui/commit/736ff229985f3648e8cbda733129003aa810a2d4))
18
+ * e2e tests ([84907b4](https://github.com/roomle-dev/roomle-ui/commit/84907b4d7ccdae1f174db714744f6a2973d8ce3b))
19
+ * element length scaling ([4259eec](https://github.com/roomle-dev/roomle-ui/commit/4259eec32f83370f018aca72dc3ff97f80285d52))
20
+ * feedback fixes ([56d4d74](https://github.com/roomle-dev/roomle-ui/commit/56d4d746e529f0d623626c1cc34218f8b4e780db))
21
+ * hide the rotation icon on subcomponents in the planner ([a0e6c31](https://github.com/roomle-dev/roomle-ui/commit/a0e6c31b7bcd02e728b378ef706db0ecad5c79c2))
22
+ * implement catalog management UX feedback ([eef28b4](https://github.com/roomle-dev/roomle-ui/commit/eef28b406a58df1a433d33423de760eb73532e4b))
23
+ * merge conflicts ([8b891dd](https://github.com/roomle-dev/roomle-ui/commit/8b891ddf2c7641eda01eeb459e8cab1051c255c1))
24
+ * remove unneeded comments ([ac8784f](https://github.com/roomle-dev/roomle-ui/commit/ac8784fc643d7c4e2b1ce0c46d225d67846dc67b))
25
+ * replace generic inputs ([30e6acb](https://github.com/roomle-dev/roomle-ui/commit/30e6acbfe22858665606b3f33fcc17411f8ed676))
26
+ * return return null if plan snapshot doesn't exist ([ba6d95c](https://github.com/roomle-dev/roomle-ui/commit/ba6d95c87260ebfa52b9a19368dfba33b08fb103))
27
+ * use possible children component ([162e2e5](https://github.com/roomle-dev/roomle-ui/commit/162e2e505058d3aaeea104482da0cb3cc192e6a3))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomle/embedding-lib",
3
- "version": "5.30.1",
3
+ "version": "5.31.0-alpha.2",
4
4
  "description": "This is a small library which can be used to communicate with the Roomle Configurator",
5
5
  "type": "module",
6
6
  "main": "./roomle-embedding-lib.umd.js",
@@ -0,0 +1,5 @@
1
+
2
+ declare const RadioToggle: import('vue').VueElementConstructor<unknown>;
3
+ declare const RadioOption: import('vue').VueElementConstructor<unknown>;
4
+ declare const BooleanToggle: import('vue').VueElementConstructor<unknown>;
5
+ export { RadioToggle, RadioOption, BooleanToggle };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Checks if an element is inside a Shadow DOM (web component context)
3
+ * @param element - The HTML element to check
4
+ * @returns true if the element is inside a Shadow DOM, false otherwise
5
+ */
6
+ export declare const inShadowDOM: (element: HTMLElement) => boolean;
@@ -0,0 +1,19 @@
1
+ /** Symbol key for providing/injecting radio toggle context */
2
+ export declare const RADIO_TOGGLE_CONTEXT_KEY: unique symbol;
3
+ /** Event name for radio group change events */
4
+ export declare const RADIO_GROUP_CHANGE_EVENT = "rml-ds-radio-group-change";
5
+ /** Detail data structure for radio group change events */
6
+ export interface RadioGroupChangeDetail<T = any> {
7
+ value: T;
8
+ radioName: string;
9
+ sourceInput: HTMLInputElement;
10
+ labelElement: Element | null;
11
+ optionElement: HTMLInputElement;
12
+ }
13
+ /** Custom event type for radio group changes */
14
+ export type RadioGroupChangeEvent<T = any> = CustomEvent<RadioGroupChangeDetail<T>>;
15
+ /**
16
+ * Injects CSS variables for the design system toggle components
17
+ * This function ensures CSS tokens are only injected once into the document head
18
+ */
19
+ export declare const injectCSSVariables: () => void;
@@ -2,8 +2,19 @@ import { Example } from '../example';
2
2
 
3
3
  export default class HomagIntelligenceExample implements Example {
4
4
  private _abortController;
5
+ private _masterDataJson;
6
+ private _groupMap;
7
+ private _uiContainer;
8
+ private _uiMap;
9
+ private _roomDesignerApi;
5
10
  setupHtml(parent: HTMLElement): Promise<void>;
6
11
  closeExample(): Promise<void>;
7
12
  private start;
8
13
  runExample(): Promise<void>;
14
+ private _clearUiELements;
15
+ private _createUiElements;
16
+ private _getThumbnailUrl;
17
+ private _addUiElements;
18
+ private _removeUiElements;
19
+ private _addButton;
9
20
  }
@@ -1,3 +1,4 @@
1
1
  import { RoomDesignerApiType } from './overlay';
2
2
 
3
+ export declare const addClickEventListeners: (roomDesignerApi: RoomDesignerApiType, signal: AbortSignal, element?: HTMLElement | null) => void;
3
4
  export declare const addDragEventListeners: (roomDesignerApi: RoomDesignerApiType, catalogElements: NodeListOf<Element> | Element[], signal: AbortSignal, element?: HTMLElement | null) => void;
@@ -1,11 +1,11 @@
1
1
  import { default as ConfiguratorContext } from './webgl/configurator-context';
2
- import { DebugClient, KernelDockPairToLine, KernelDockPairToPoint, EmscriptenString, KernelAnimation, KernelComponent, KernelParameter, KernelParameterGroup, KernelVector3, PlanObject, VariantsList } from '../../typings/kernel';
2
+ import { DebugClient, KernelDockPairPreview, KernelObjectInformation, EmscriptenString, KernelAnimation, KernelComponent, KernelParameter, KernelParameterGroup, KernelVector3, PlanObject, VariantsList } from '../../typings/kernel';
3
3
  import { default as CommonKernelAccess, KERNEL_TYPE } from './services/common-kernel-access';
4
4
  import { ArticleNumber, ConfigurationHash, ConfigurationString, RapiId, RapiPrice } from '../../typings/rapi-types';
5
5
  import { CommonConfiguratorKernelCallbackI } from './common-configurator-kernel-callback';
6
6
  import { PromiseQueue } from './utils/promise-queue';
7
7
  import { default as InitData } from './utils/init-data';
8
- import { ExternalObjectApiConfiguration } from '../../planner-core/src/external-object-api';
8
+ import { ExternalObjectApiConfiguration } from '../../homag-intelligence/src/external-object-api';
9
9
  import { AnimationLevelType } from '../../configurator-core/src/utils/animation/animation-helper';
10
10
 
11
11
  export interface ConfiguratorKernelCallbackI extends CommonConfiguratorKernelCallbackI {
@@ -14,8 +14,7 @@ export interface ConfiguratorKernelCallbackI extends CommonConfiguratorKernelCal
14
14
  planObjectConfigurationUpdated(planObjectId: number, configuration: ConfigurationString, hash: string, pendingDocking: boolean): void;
15
15
  configurationLoaded(conversationId: number, objectId: number, componentId: number, hash: string, errors: any): void;
16
16
  Editor3dAddDockPreview(componentId: number, previewId: number): void;
17
- Editor3dSetPreviewPointAssociations(dockPairs: KernelDockPairToPoint[], previewId: number): void;
18
- Editor3dSetPreviewLineAssociations(dockLines: KernelDockPairToLine[], previewId: number): void;
17
+ Editor3dSetPreviewAssociations(dockPairs: KernelDockPairPreview[], previewId: number): void;
19
18
  Editor3dPreviewConstructionDone(componentId: number, objectId: number): void;
20
19
  Editor3dPlanObjectConstructionDone(planObjectId: number): void;
21
20
  Editor3dComponentDocked(componentId: number, isRootComponent: boolean, parentObjectRuntimeId: number, componentPosition: KernelVector3, componentRotation: KernelVector3): void;
@@ -106,8 +105,7 @@ export default class ConfiguratorKernelAccess extends CommonKernelAccess {
106
105
  Editor3dSetMaterial(): void;
107
106
  Editor3dLoadMaterial(): void;
108
107
  Editor3dAddDockPreview(componentId: number, previewId: number): void;
109
- Editor3dSetPreviewPointAssociations(dockPairs: KernelDockPairToPoint[], previewId: number): void;
110
- Editor3dSetPreviewLineAssociations(dockLines: KernelDockPairToLine[], previewId: number): void;
108
+ Editor3dSetPreviewAssociations(dockPairs: KernelDockPairPreview[], previewId: number): void;
111
109
  Editor3dPreviewConstructionDone(componentId: number, objectId: number): void;
112
110
  Editor3dTranslateBy(): void;
113
111
  Editor3dRotateBy(): void;
@@ -142,6 +140,7 @@ export default class ConfiguratorKernelAccess extends CommonKernelAccess {
142
140
  createNewSerializedConfiguration(configurationRuntimeId: number): string;
143
141
  getCurrentConfigurationHash(planObjectId: number): ConfigurationHash;
144
142
  isExternalObjectOrComponent(planObjectOrComponentId: number): boolean;
143
+ getComponentOrModuleInformation(planObjectOrComponentId: number): KernelObjectInformation | null;
145
144
  listOfVariants: (_componentId: RapiId, _list: VariantsList) => void;
146
145
  listOfVariantsError(dbId: RapiId, error: string): void;
147
146
  addDebugClient(debugClient: DebugClient): void;
@@ -6,12 +6,15 @@ declare class LightCache {
6
6
  private _scene;
7
7
  availableLights: Light[];
8
8
  activeLights: Map<string, Light>;
9
+ maximumLights: number;
9
10
  private readonly _inactivePosition;
10
- constructor(scene: Scene);
11
+ constructor(scene: Scene, maxAnisotropy: number);
12
+ allowedToSpawnMoreLights(): boolean;
11
13
  addActiveLight(light: Light): void;
12
14
  cacheLight(light: Light): void;
13
15
  getLightFromCache(type: KernelLightSourceType): Light<import('three').LightShadow<import('three').Camera>>;
14
16
  clear(): void;
17
+ private _setMaximumLights;
15
18
  }
16
19
  export default class CacheHolder {
17
20
  private _componentCache;
@@ -23,6 +26,6 @@ export default class CacheHolder {
23
26
  get geometryCache(): Map<string, BufferGeometry>;
24
27
  get materialCache(): Map<string, Material>;
25
28
  clear(): void;
26
- setupLightCache(scene: Scene): void;
29
+ setupLightCache(scene: Scene, maxAnisotropy: number): void;
27
30
  }
28
31
  export {};
@@ -49,6 +49,42 @@ export declare const throttle: <T extends (...args: any[]) => any>(func: T, dela
49
49
  */
50
50
  export declare const callAgainAfter: <T extends (...args: any[]) => any>(func: T, after?: number) => (...funcArgs: Parameters<T>) => void;
51
51
  export declare const debounce: <Params extends any[]>(func: (...args: Params) => any, timeout: number) => (...args: Params) => void;
52
+ /**
53
+ * A generic type for a function.
54
+ */
55
+ type AnyFunction = (...args: any[]) => any;
56
+ /**
57
+ * Creates a debounced function that delays invoking `func` until after `delay`
58
+ * milliseconds have elapsed since the last time the debounced function was
59
+ * invoked with the same key. The debounced function comes with a `cancel`
60
+ * method to cancel delayed `func` invocations and a `flush` method to
61
+ * immediately invoke them.
62
+ *
63
+ * T The type of the function to debounce.
64
+ * @param {T} func The function to debounce.
65
+ * @param {number} delay The number of milliseconds to delay.
66
+ * @param {(...args: Parameters<T>) => unknown} [keyResolver]
67
+ * Optional. A function to resolve the key from the arguments.
68
+ * Defaults to using the first argument as the key.
69
+ * @returns {((...args: Parameters<T>) => void)} The new debounced function.
70
+ */
71
+ export declare const debounceByKey: <T extends AnyFunction>(func: T, delay: number, keyResolver?: (...args: Parameters<T>) => unknown) => (this: ThisParameterType<T>, ...args: Parameters<T>) => void;
72
+ /**
73
+ * Creates a debounced function that delays invoking `func` until after `delay`
74
+ * milliseconds have elapsed since the last time the debounced function was
75
+ * invoked with the same key. All calls made with the same key during the
76
+ * delay period will have their returned promises resolved with the result
77
+ * of the single final invocation.
78
+ *
79
+ * T The type of the function to debounce.
80
+ * @param {T} func The function to debounce. This function can be synchronous or asynchronous.
81
+ * @param {number} delay The number of milliseconds to delay.
82
+ * @param {(...args: Parameters<T>) => unknown} [keyResolver]
83
+ * Optional. A function to resolve the key from the arguments.
84
+ * Defaults to using the first argument as the key.
85
+ * @returns {((...args: Parameters<T>) => Promise<ReturnType<T>>)} The new debounced function.
86
+ */
87
+ export declare const debounceByKeyAsync: <T extends AnyFunction>(func: T, delay: number, keyResolver?: (...args: Parameters<T>) => unknown) => (this: ThisParameterType<T>, ...args: Parameters<T>) => Promise<ReturnType<T>>;
52
88
  export declare const wait: (delay: number) => Promise<void>;
53
89
  export declare const nextTick: () => Promise<void>;
54
90
  export declare const roundWithPrecision: (float: number, precision: number) => number;
@@ -117,3 +153,4 @@ export declare const getIdQueryParam: (urlString: string) => string | null;
117
153
  export declare const isCtrlOrCmd: (event: KeyboardEvent) => boolean;
118
154
  export declare const ctrlOrCmd: (event: KeyboardEvent, checkIfItIsTheOnlyKey?: boolean) => boolean;
119
155
  export declare const runIfNotEmpty: <T extends any[]>(ids: string[], executor: () => Promise<T>) => Promise<T>;
156
+ export {};
@@ -8,7 +8,7 @@ import { DefaultEnvironmentSceneType } from '../webgl/renderer/environment-scene
8
8
  import { CustomShadingParameters, SceneShadingType } from '../webgl/renderer/shading-settings';
9
9
  import { RapiId } from '../../../typings/rapi-types';
10
10
  import { CanvasOffset } from '../common-interfaces';
11
- import { ExternalObjectApiConfiguration } from '../../../planner-core/src/external-object-api';
11
+ import { ExternalObjectApiConfiguration } from '../../../homag-intelligence/src/external-object-api';
12
12
  import { HomagIntelligenceInitData } from '../../../homag-intelligence/src/loader';
13
13
 
14
14
  export declare const DEFAULT_ENV_MAP_INTENSITY = 1.5;
@@ -88,6 +88,9 @@ export declare const createEmptySceneFromCurrent: (currentScene: Scene) => Scene
88
88
  export declare const isBox3InFrustum: (camera: Camera, box3: Box3) => boolean;
89
89
  export type RoomleEventedMesh = Mesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DRoomleEventMap>;
90
90
  export type RoomleEventedObject3D = Object3D<Object3DRoomleEventMap>;
91
+ export interface RoomleEventedObject3DSubComponent extends RoomleEventedObject3D {
92
+ parentComponent?: RoomleEventedObject3D;
93
+ }
91
94
  export type RoomleEventedIntersection = Intersection<RoomleEventedObject3D>;
92
95
  interface InputEventAttatchment {
93
96
  intersection: RoomleEventedIntersection;
@@ -1,6 +1,6 @@
1
1
  import { RoomleComponent, PreviewComponent, PreviewLineComponent, RoomleComponentFactory } from '../../../common-core/src/webgl/roomle-component-factory';
2
2
  import { ConfiguratorKernelCallbackI } from '../configurator-kernel-access';
3
- import { KernelComponent, KernelDockPairToLine, KernelDockPairToPoint, KernelEnum, KernelLightSourceAttributes, KernelMeshAttributes, KernelMeshBuffer, KernelParameter, KernelVector3, PlanObject } from '../../../typings/kernel';
3
+ import { KernelComponent, KernelDockPairPreview, KernelEnum, KernelLightSourceAttributes, KernelMeshAttributes, KernelMeshBuffer, KernelParameter, KernelVector3, PlanObject } from '../../../typings/kernel';
4
4
  import { ConfigurationString } from '../../../typings/rapi-types';
5
5
  import { Context } from '../di/context';
6
6
  import { default as ConfiguratorContext } from '../webgl/configurator-context';
@@ -10,7 +10,6 @@ import { default as MeshGenerator } from '../webgl/mesh-generator';
10
10
  import { default as PlannerKernelAccess } from '../../../planner-core/src/services/planner-kernel-access';
11
11
  import { Box3, Mesh } from 'three';
12
12
  import { AnimationLevelType } from '../../../configurator-core/src/utils/animation/animation-helper';
13
- import { ExternalConfiguration } from '../../../typings/external-objects';
14
13
 
15
14
  export interface ConfiguratorViewModelCallbackI {
16
15
  componentUpdated(component: RoomleComponent, kernelComponent: KernelComponent): void;
@@ -31,6 +30,7 @@ export default class ConfiguratorViewModel implements ConfiguratorKernelCallback
31
30
  protected _configuratorContext: ConfiguratorContext;
32
31
  private _cacheHolder;
33
32
  protected _initData: InitData;
33
+ private _configuratorUiCallbacks;
34
34
  private _listener;
35
35
  private _mergeThreshold;
36
36
  private _componentsToMerge;
@@ -38,7 +38,6 @@ export default class ConfiguratorViewModel implements ConfiguratorKernelCallback
38
38
  private _geometriesMerged;
39
39
  private _subPartObject;
40
40
  private _subPartGuard;
41
- private _externalConfigurations;
42
41
  protected _components: Map<number, RoomleComponent>;
43
42
  private _previews;
44
43
  protected _componentNumberOfPossibleChildren: Map<number, number>;
@@ -53,8 +52,6 @@ export default class ConfiguratorViewModel implements ConfiguratorKernelCallback
53
52
  private _applyMeshUVTransform;
54
53
  updateAnimationParameters(elementId: number | number[], parameters: KernelParameter[]): void;
55
54
  changeAnimationValue(elementId: number, parameterKey: string, value: string, level: number, animationLevel: AnimationLevelType, animate: boolean): void;
56
- saveExternalConfiguration(externalConfiguration: ExternalConfiguration): void;
57
- getExternalConfigurationById(id: string): ExternalConfiguration;
58
55
  getComponentFromRuntimeId(elementId: number): RoomleComponent | null;
59
56
  private _addMeshToSubPart;
60
57
  private _addMeshToComponent;
@@ -90,8 +87,9 @@ export default class ConfiguratorViewModel implements ConfiguratorKernelCallback
90
87
  Editor3dGeometryNotReady(id: number): void;
91
88
  Editor3dPlanObjectConstructionDone(planObjectId: number): void;
92
89
  Editor3dPreviewConstructionDone(componentId: number, _objectId: number): void;
93
- Editor3dSetPreviewLineAssociations(dockLines: KernelDockPairToLine[], previewId: number): void;
94
- Editor3dSetPreviewPointAssociations(dockPairs: KernelDockPairToPoint[], previewId: number): void;
90
+ private _setPreviewLineAssociations;
91
+ Editor3dSetPreviewAssociations(dockPairs: KernelDockPairPreview[], previewId: number): void;
92
+ private _setPreviewPointAssociations;
95
93
  private _addDockPreviewAnimation;
96
94
  componentDeleted(componentId: number): void;
97
95
  componentMetaUpdated(kernelComponent: KernelComponent): void;
@@ -12,7 +12,6 @@ export interface RoomleComponent extends RoomleEventedObject3D {
12
12
  runtimeId: number;
13
13
  parentObjectId: number;
14
14
  isRootComponent: boolean;
15
- isChildPlanObject: boolean;
16
15
  meshes: RoomleEventedMesh[];
17
16
  boundingBox: Box3;
18
17
  boundingBoxMesh: RoomleEventedMesh;
@@ -23,6 +22,7 @@ export interface RoomleComponent extends RoomleEventedObject3D {
23
22
  geometryChanged: boolean;
24
23
  animationValueMap?: AnimationValueMap;
25
24
  get childComponents(): RoomleComponent[];
25
+ get parentComponent(): RoomleComponent | null;
26
26
  replaceMeshes(meshes: Mesh[]): void;
27
27
  addMesh(mesh: Mesh, transform?: Float32Array): void;
28
28
  removeMesh(mesh: Mesh): void;
@@ -299,5 +299,9 @@ export default class ConfiguratorUiCallbacks extends UiCallback implements Confi
299
299
  * is called when the external configuration should be saved
300
300
  */
301
301
  onExternalConfigurationSaved: (configuration: ExternalConfiguration) => void;
302
+ /**
303
+ * Is run when the maximum amount of lights the user's hardware can handle have been spawned into the scene.
304
+ */
305
+ onMaximumLightsReached: (maximumLights: number) => void;
302
306
  constructor(creator: string);
303
307
  }
@@ -3,6 +3,7 @@ import { RoomleComponent } from '../../../../common-core/src/webgl/roomle-compon
3
3
  import { default as PlannerSceneManager } from '../../../../planner-core/src/webgl/planner-scene-manager';
4
4
  import { AnimationKeyAndValue } from './animation-value-map';
5
5
  import { ComponentAnimationTransformation, KernelParameter } from '../../../../typings/kernel';
6
+ import { default as PlannerKernelAccess } from '../../../../planner-core/src/services/planner-kernel-access';
6
7
 
7
8
  export declare const ANIMATION_LEVEL: {
8
9
  readonly COMPONENT: 0;
@@ -11,8 +12,8 @@ export declare const ANIMATION_LEVEL: {
11
12
  };
12
13
  export type AnimationLevelType = (typeof ANIMATION_LEVEL)[keyof typeof ANIMATION_LEVEL];
13
14
  export declare const updateComponentAnimationParameters: (components: RoomleComponent[], parameters: KernelParameter[]) => void;
14
- export declare const getObjectAnimationValue: (component: RoomleComponent, animationName: string, onlyChildObject: boolean) => AnimationKeyAndValue | null;
15
- export declare const changeObjectAnimationValueAndAnimate: (component: RoomleComponent, parameterKey: string, value: string, level: number, animationLevel: AnimationLevelType, animate: boolean, invalidateRenderCallback: () => void) => void;
15
+ export declare const getObjectAnimationValue: (component: RoomleComponent, animationName: string, onlyChildObject: boolean, plannerKernelAccess?: PlannerKernelAccess) => AnimationKeyAndValue | null;
16
+ export declare const changeObjectAnimationValueAndAnimate: (component: RoomleComponent, parameterKey: string, value: string, level: number, animationLevel: AnimationLevelType, animate: boolean, invalidateRenderCallback: () => void, plannerKernelAccess?: PlannerKernelAccess) => void;
16
17
  export declare const hasObjectOpenCloseAnimation: (sceneManager: PlannerSceneManager, planObject: ConfiguratorPlanObjectViewModel) => boolean;
17
18
  export declare const getObjectOpenCloseAnimationValue: (sceneManager: PlannerSceneManager, planObject: ConfiguratorPlanObjectViewModel) => AnimationKeyAndValue | null;
18
19
  export declare const updateChildObjectAnimations: (component: RoomleComponent, childAnimationTransformations?: ComponentAnimationTransformation[]) => void;
@@ -1,5 +1,5 @@
1
1
  import { PreviewComponent, RoomleComponent } from '../../../../common-core/src/webgl/roomle-component-factory';
2
- import { KernelDockPairToPoint } from '../../../../typings/kernel';
2
+ import { KernelDockPairPreview } from '../../../../typings/kernel';
3
3
 
4
4
  export declare class DragInsertAnimation {
5
5
  private _id;
@@ -8,7 +8,7 @@ export declare class DragInsertAnimation {
8
8
  private _displacementTransformation;
9
9
  private _invalidateRenderCallback;
10
10
  private _currentAnimation;
11
- constructor(id: string, previewComponent: PreviewComponent, displacedComponents: RoomleComponent, dockPair: KernelDockPairToPoint, invalidateRenderCallback: () => void);
11
+ constructor(id: string, previewComponent: PreviewComponent, displacedComponents: RoomleComponent, dockPair: KernelDockPairPreview, invalidateRenderCallback: () => void);
12
12
  private _addObjectAnimationTransformations;
13
13
  private _addObjectAnimationValue;
14
14
  startInsert(): void;
@@ -2,47 +2,60 @@ import { Object3D, Scene, Box3, Vector3 } from 'three';
2
2
  import { KernelCube } from '../../../typings/kernel';
3
3
 
4
4
  export declare const DIMENSIONING_GEOMETRY = "dimensioning";
5
+ /**
6
+ * @interface DimensionLabelUIData
7
+ * Defines the structure for a single dimension label's data that will be sent to the UI.
8
+ */
9
+ export interface DimensionLabelUIData {
10
+ id: 'width' | 'height' | 'depth';
11
+ text: string;
12
+ worldPosition: Vector3;
13
+ visible: boolean;
14
+ opacity?: number;
15
+ }
5
16
  export default class DimensioningHelper {
6
17
  _creator_: string;
7
18
  private _unitFormatter;
8
- private _uiScene;
9
19
  private _object;
10
20
  private _objectRotation;
11
21
  private _cameraPosition;
12
22
  private _font;
13
- private _onChange;
23
+ private _onVisibilityChange;
14
24
  private _topDimensions;
15
25
  private _initialized;
16
26
  private _origin;
17
27
  private _dimensions;
18
- private _lineMaterial;
19
- private _planeMaterial;
20
- private _widthLine;
21
- private _heightLine;
22
- private _depthLine;
23
- private _widthText;
24
- private _heightText;
25
- private _depthText;
28
+ private _mainLineMaterial;
29
+ private _widthLineGroup;
30
+ private _heightLineGroup;
31
+ private _depthLineGroup;
26
32
  private _enabled;
27
33
  private _dimensionsVisible;
28
34
  private _dimensionLineGroup;
29
- private _dimensionTextGroup;
35
+ private _onLabelsUpdate;
30
36
  constructor(creator: string);
37
+ private _createLineGroup;
38
+ private _createLineFromConfig;
39
+ private _updateLineGroup;
31
40
  private _loaded;
41
+ onLabelsUpdate(callback: (labels: DimensionLabelUIData[]) => void): void;
32
42
  private _performUpdate;
43
+ private _updateMaterialOpacity;
44
+ private _getCameraDistanceInfo;
33
45
  private _updateWidth;
34
46
  private _updateHeight;
35
47
  private _updateDepth;
48
+ private _getWidthLineConfig;
49
+ private _getDepthLineConfig;
50
+ private _getHeightLineConfig;
51
+ /**
52
+ * Helper to get camera position in the dimension line group's local space
53
+ */
54
+ private _getLocalCameraPosition;
36
55
  updateSize(boxForMeasurement: KernelCube): void;
37
56
  update(force?: boolean): void;
38
57
  addToObject(object: Object3D): void;
39
58
  removeFromObject(object: Object3D): void;
40
- addToUiScene(uiScene: Scene): void;
41
- removeFromUiScene(uiScene: Scene): void;
42
- private _isCameraInsideOrTooClose;
43
- private _getWidthEdge;
44
- private _getDepthEdge;
45
- private _getHeightEdge;
46
59
  onDimensionsVisibilityChanged(handler: (visible: boolean) => void): void;
47
60
  enableTopDimensions(): void;
48
61
  disableTopDimensions(): void;
@@ -56,7 +69,6 @@ export default class DimensioningHelper {
56
69
  moveCameraEnd(position: Vector3): void;
57
70
  clearScene(_scene: Scene): void;
58
71
  setObject(object: Object3D, rotation?: number): void;
59
- setUiScene(uiScene: Scene): void;
60
72
  isInitialized(): Promise<void>;
61
73
  areDimensionsEnabled(): boolean;
62
74
  private _getRotation;
@@ -46,6 +46,7 @@ export default class ConfiguratorSceneEventHandler extends SceneEventHandler<Sce
46
46
  _creator_: string;
47
47
  private _selectionHandler;
48
48
  private _configuratorUiCallbacks;
49
+ private _plannerKernelAccess;
49
50
  private _cameraMoving;
50
51
  private _hoveredComponent;
51
52
  private _hoveredPreview;
@@ -75,6 +76,7 @@ export default class ConfiguratorSceneEventHandler extends SceneEventHandler<Sce
75
76
  private _updatePositionForPreviewLine;
76
77
  private _hoverOffPreviewLine;
77
78
  private _setDragComponentShadow;
79
+ private _isDraggingPossible;
78
80
  private _dragStart;
79
81
  private _drag;
80
82
  private _dragEnd;
@@ -91,4 +93,6 @@ export default class ConfiguratorSceneEventHandler extends SceneEventHandler<Sce
91
93
  setCameraMoving(cameraMoving: boolean): void;
92
94
  setCamera(camera: Camera): void;
93
95
  setObject(object: Object3D): void;
96
+ private _findComponentToBeSelected;
97
+ private isSiblingSelected;
94
98
  }
@@ -21,7 +21,6 @@ import { default as CameraBehaviour } from '../../../common-core/src/cameracontr
21
21
  import { default as CameraBehaviour3d } from '../../../common-core/src/cameracontrol/camera-behaviour-3d';
22
22
  import { default as GlobalInitData } from '../../../common-core/src/utils/global-init-data';
23
23
  import { CancelSelectionReasons } from '../../../typings/planner';
24
- import { ExternalConfiguration } from '../../../typings/external-objects';
25
24
  import { default as UnitFormatter } from '../services/unit-formatter';
26
25
  import { AnimationLevelType } from '../utils/animation/animation-helper';
27
26
 
@@ -53,8 +52,6 @@ export default class ConfiguratorSceneManager extends SceneManager implements Co
53
52
  enableEvents(): void;
54
53
  enableConfiguratorEvents(): void;
55
54
  disableConfiguratorEvents(): void;
56
- saveExternalConfiguration(externalConfiguration: ExternalConfiguration): void;
57
- getExternalConfigurationById(id: string): ExternalConfiguration;
58
55
  protected _getViewModel(): ConfiguratorViewModel;
59
56
  protected _getKernelAccess(): PlannerKernelAccess;
60
57
  private _showDockings;
@@ -1,6 +1,7 @@
1
- import { RoomDesignerRequests } from './emulator';
1
+ import { RoomDesignerRequests } from './glue-logic';
2
2
  import { MasterData, PosGroup } from './model/oc-scripts-domain.model';
3
3
  import { RoomlePlannerType } from '../../typings/external-objects';
4
+ import { LoadExternalObjectOptions } from './external-object-api';
4
5
 
5
6
  export interface ExternalObjectModuleIdMap {
6
7
  originalModuleId: string;
@@ -10,7 +11,7 @@ export declare class RoomDesignerApi implements RoomDesignerRequests {
10
11
  private _roomlePlanner;
11
12
  constructor(roomlePlanner: RoomlePlannerType);
12
13
  loadMasterData(masterData: MasterData): void;
13
- loadPosGroups(posDataJson: PosGroup | PosGroup[], findFreeSpaceInPlan: boolean, verifyArrangement: boolean, mergedGroups?: string[], respondWithPositionInPlan?: boolean, moduleIdMap?: ExternalObjectModuleIdMap[]): Promise<void>;
14
+ loadPosGroups(posDataJson: PosGroup | PosGroup[], options: LoadExternalObjectOptions): Promise<void>;
14
15
  selectGroup(groupId: string): Promise<void>;
15
16
  selectRoot(rootModuleId: string): Promise<void>;
16
17
  selectModule(rootModuleId: string, subModuleId: string): Promise<void>;
@@ -18,7 +19,7 @@ export declare class RoomDesignerApi implements RoomDesignerRequests {
18
19
  deleteGroup(groupId: string): void;
19
20
  deleteRootModule(rootModuleId: string): void;
20
21
  getPosDataOfAllGroups(): Promise<PosGroup[]>;
21
- getRoomInformation(): Promise<import('../../planner-core/src/external-object-api').ExternalRoomInformation>;
22
+ getRoomInformation(): Promise<import('./external-object-api').ExternalRoomInformation>;
22
23
  generatePlanSnapshot(): Promise<{
23
24
  objectId: string;
24
25
  planId: string;
@@ -1,4 +1,4 @@
1
- import { GlueLogic } from './emulator';
1
+ import { GlueLogic } from './glue-logic';
2
2
  import { default as RoomlePlanner } from '../../planner-core/src/roomle-planner';
3
3
 
4
4
  export interface ExternalObjectSegment {
@@ -1,10 +1,10 @@
1
1
  import { HiCallbacks } from '../../../../embedding-lib/src/embedding-lib';
2
- import { GlueLogic, LibraryData, RoomDesignerRequests } from './emulator';
2
+ import { GlueLogic, LibraryData, PlanSnapshot, RoomDesignerRequests } from './glue-logic';
3
3
  import { ExternalObjectGroup } from 'roomle-core-hsc/src/embind/plannerCoreInterface';
4
4
  import { ExternalModuleInformation } from '../../typings/kernel';
5
5
  import { CheckResult, PosGroup, PosSaveData } from './model/oc-scripts-domain.model';
6
- import { ExternalObjectModuleIdMap } from './api';
7
6
  import { HiObjectSelection } from './hi-object-selection';
7
+ import { LoadExternalObjectOptions } from './external-object-api';
8
8
 
9
9
  export declare class GlueLayerRequestDebugLogging implements GlueLogic {
10
10
  private _glueLogic;
@@ -21,15 +21,14 @@ export declare class GlueLayerRequestDebugLogging implements GlueLogic {
21
21
  mergeGroups(targetGroup: ExternalObjectGroup, idsOfGroupsMerged: string | string[], idOfTargetRootModule: string): void;
22
22
  deleteRootModule(remainingGroup: ExternalObjectGroup, rootModuleIdToDelete: string, splitOffGroups: ExternalObjectGroup[]): void;
23
23
  splitRootModuleFromGroup(splitGroup: ExternalObjectGroup, newGroupedRootModules: ExternalObjectGroup[]): void;
24
- duplicateGroup(sourceGroupId: string, duplicatedGroup: ExternalObjectGroup): void;
24
+ duplicateGroup(duplicatedGroup: ExternalObjectGroup): void;
25
25
  modifyAttribute(groupId: string, moduleIdObjects: ExternalModuleInformation[], attributeName: string, value: string): void;
26
- updateAttribute(rootModuleId: string, moduleId: string, attributeId: string, attributeValue: string | boolean): void;
26
+ updateAttribute(rootModuleId: string, moduleId: string | null, attributeId: string, attributeValue: string | boolean): void;
27
27
  getVerifiedAttributeOptions(moduleId: string, attributeIds?: string | string[]): Promise<Record<string, CheckResult> | undefined>;
28
28
  updateAdditionalInfo(rootModuleId: string, additionalInfo: string): void;
29
29
  swapRootModule(groupId: string, rootModuleId: string, articleId: string): void;
30
30
  arrangeRootModulesOfGroup(changedGroup: ExternalObjectGroup): void;
31
31
  changedGroupPlanningSituation(changedGroup: ExternalObjectGroup): void;
32
- deleteGroup(groupId: string): Promise<void>;
33
32
  changedGroup(posDataJson: PosGroup): void;
34
33
  loadedGroup(posDataJson: PosGroup): void;
35
34
  groupsCompletelyLoaded(): void;
@@ -37,7 +36,7 @@ export declare class GlueLayerRequestDebugLogging implements GlueLogic {
37
36
  openCloseGroup(groupId: string): void;
38
37
  newPosDataFromId(id: string): PosGroup | undefined;
39
38
  getGroupDataForOrder(roomlePlannerId?: string): Promise<any>;
40
- savePlanSnapshot(): Promise<any>;
39
+ savePlanSnapshot(): Promise<PlanSnapshot | null>;
41
40
  }
42
41
  export declare class GlueLayerResponseDebugLogging implements RoomDesignerRequests {
43
42
  private _roomDesignerRequests;
@@ -45,7 +44,7 @@ export declare class GlueLayerResponseDebugLogging implements RoomDesignerReques
45
44
  constructor(roomDesignerRequests: RoomDesignerRequests, hiCallbacks: HiCallbacks);
46
45
  private _logResponse;
47
46
  loadMasterData(masterData: any): void;
48
- loadPosGroups(posDataJson: PosGroup | PosGroup[], findFreeSpaceInPlan: boolean, verifyArrangement: boolean, mergedGroups?: string[], respondWithPositionInPlan?: boolean, moduleIdMap?: ExternalObjectModuleIdMap[]): Promise<void>;
47
+ loadPosGroups(posDataJson: PosGroup | PosGroup[], options: LoadExternalObjectOptions): Promise<void>;
49
48
  selectGroup(groupId: string): Promise<void>;
50
49
  selectRoot(rootModuleId: string): Promise<void>;
51
50
  selectModule(rootModuleId: string, subModuleId: string): Promise<void>;