@smplrspace/smplr-loader 2.25.3-beta.10 → 2.25.3-beta.13
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/generated/smplr.d.ts +59 -59
- package/dist/index.d.ts +2 -4
- package/dist/types.d.ts +21 -10
- package/package.json +2 -2
|
@@ -805,34 +805,6 @@ declare const ragSwatches: <C extends string>({ categories, colors, nodata, excl
|
|
|
805
805
|
label: string;
|
|
806
806
|
}[];
|
|
807
807
|
|
|
808
|
-
declare interface RenderOptions {
|
|
809
|
-
compass?: boolean
|
|
810
|
-
annotations?: boolean
|
|
811
|
-
skybox?: boolean
|
|
812
|
-
backgroundColor?: string
|
|
813
|
-
filter?: Partial<Filter>
|
|
814
|
-
walls?: {
|
|
815
|
-
render?: boolean
|
|
816
|
-
alpha?: number
|
|
817
|
-
maxHeightCm?: number
|
|
818
|
-
showStructuralWalls?: boolean
|
|
819
|
-
}
|
|
820
|
-
grounds?: {
|
|
821
|
-
render?: boolean
|
|
822
|
-
}
|
|
823
|
-
doors?: boolean
|
|
824
|
-
windows?: boolean
|
|
825
|
-
openings?: boolean
|
|
826
|
-
flip?: boolean
|
|
827
|
-
objects?: boolean
|
|
828
|
-
facade?: boolean
|
|
829
|
-
floorplan?: {
|
|
830
|
-
render?: boolean
|
|
831
|
-
alpha?: number
|
|
832
|
-
elevationInCm?: number
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
|
|
836
808
|
declare interface RoomWithHoles {
|
|
837
809
|
room: SmplrCoord2d[];
|
|
838
810
|
holes: SmplrCoord2d[][];
|
|
@@ -897,7 +869,7 @@ export declare class Space {
|
|
|
897
869
|
private checkOptions;
|
|
898
870
|
private prepareContainer;
|
|
899
871
|
remove: () => void;
|
|
900
|
-
startViewer(options:
|
|
872
|
+
startViewer(options: SpaceViewerOptions): Promise<void>;
|
|
901
873
|
addDataLayer<D extends UnknownData>(dataLayer: DataLayer<D>): DataLayerController<D>;
|
|
902
874
|
getDataLayer<D extends UnknownData>(id: string): DataLayerController<D> | undefined;
|
|
903
875
|
updateDataLayer<D extends UnknownData>(dataLayerUpdates: Partial<DataLayer<D>>): void;
|
|
@@ -927,14 +899,14 @@ export declare class Space {
|
|
|
927
899
|
showUpToLevel(levelIndex: number): void;
|
|
928
900
|
showAllLevels(): void;
|
|
929
901
|
setMode(mode: CameraMode): void;
|
|
930
|
-
updateRenderOptions(options:
|
|
902
|
+
updateRenderOptions(options: SpaceRenderOptions): void;
|
|
931
903
|
hideLevelPicker(): void;
|
|
932
904
|
showLevelPicker(): void;
|
|
933
905
|
hideNavigationButtons(): void;
|
|
934
906
|
showNavigationButtons(): void;
|
|
935
907
|
}
|
|
936
908
|
|
|
937
|
-
declare interface SpaceOptions {
|
|
909
|
+
export declare interface SpaceOptions {
|
|
938
910
|
spaceId: string;
|
|
939
911
|
clientToken: string;
|
|
940
912
|
containerId: string;
|
|
@@ -943,6 +915,60 @@ declare interface SpaceOptions {
|
|
|
943
915
|
internal?: boolean;
|
|
944
916
|
}
|
|
945
917
|
|
|
918
|
+
export declare interface SpaceRenderOptions {
|
|
919
|
+
compass?: boolean
|
|
920
|
+
annotations?: boolean
|
|
921
|
+
skybox?: boolean
|
|
922
|
+
backgroundColor?: string
|
|
923
|
+
filter?: Partial<Filter>
|
|
924
|
+
walls?: {
|
|
925
|
+
render?: boolean
|
|
926
|
+
alpha?: number
|
|
927
|
+
maxHeightCm?: number
|
|
928
|
+
showStructuralWalls?: boolean
|
|
929
|
+
}
|
|
930
|
+
grounds?: {
|
|
931
|
+
render?: boolean
|
|
932
|
+
}
|
|
933
|
+
doors?: boolean
|
|
934
|
+
windows?: boolean
|
|
935
|
+
openings?: boolean
|
|
936
|
+
flip?: boolean
|
|
937
|
+
objects?: boolean
|
|
938
|
+
facade?: boolean
|
|
939
|
+
floorplan?: {
|
|
940
|
+
render?: boolean
|
|
941
|
+
alpha?: number
|
|
942
|
+
elevationInCm?: number
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
export declare interface SpaceViewerOptions {
|
|
947
|
+
mode?: CameraMode;
|
|
948
|
+
preview?: boolean;
|
|
949
|
+
allowModeChange?: boolean;
|
|
950
|
+
cameraPlacement?: OrbitCameraPlacement;
|
|
951
|
+
disableCameraControls?: boolean;
|
|
952
|
+
disableCameraRotation?: boolean;
|
|
953
|
+
autoRotate?: boolean;
|
|
954
|
+
hideNavigationButtons?: boolean;
|
|
955
|
+
hideLevelPicker?: boolean;
|
|
956
|
+
legendPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
957
|
+
compass?: boolean;
|
|
958
|
+
annotations?: boolean;
|
|
959
|
+
renderOptions?: SpaceRenderOptions;
|
|
960
|
+
includeLevels?: number[];
|
|
961
|
+
topShownLevel?: number;
|
|
962
|
+
onReady?: () => void;
|
|
963
|
+
onError?: (errorMessage: string) => void;
|
|
964
|
+
onResize?: (containerRect: DOMRect) => void;
|
|
965
|
+
onVisibleLevelsChanged?: (visibleLevels: number[]) => void;
|
|
966
|
+
onModeChange?: (mode: CameraMode) => void;
|
|
967
|
+
loadingMessage?: string;
|
|
968
|
+
renderingMessage?: string;
|
|
969
|
+
experimentalFacadeBasedPerformance?: boolean;
|
|
970
|
+
}
|
|
971
|
+
|
|
946
972
|
declare interface SphereOptions<D> {
|
|
947
973
|
shape: 'sphere';
|
|
948
974
|
diameter?: number | ((dataElement: PointData & D) => number | {
|
|
@@ -976,33 +1002,7 @@ declare interface Vector3Coord extends Vector2Coord {
|
|
|
976
1002
|
z: number;
|
|
977
1003
|
}
|
|
978
1004
|
|
|
979
|
-
export declare const version = "2.25.3-beta.
|
|
980
|
-
|
|
981
|
-
declare interface ViewerOptions {
|
|
982
|
-
mode?: CameraMode;
|
|
983
|
-
preview?: boolean;
|
|
984
|
-
allowModeChange?: boolean;
|
|
985
|
-
cameraPlacement?: OrbitCameraPlacement;
|
|
986
|
-
disableCameraControls?: boolean;
|
|
987
|
-
disableCameraRotation?: boolean;
|
|
988
|
-
autoRotate?: boolean;
|
|
989
|
-
hideNavigationButtons?: boolean;
|
|
990
|
-
hideLevelPicker?: boolean;
|
|
991
|
-
legendPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
992
|
-
compass?: boolean;
|
|
993
|
-
annotations?: boolean;
|
|
994
|
-
renderOptions?: RenderOptions;
|
|
995
|
-
includeLevels?: number[];
|
|
996
|
-
topShownLevel?: number;
|
|
997
|
-
onReady?: () => void;
|
|
998
|
-
onError?: (errorMessage: string) => void;
|
|
999
|
-
onResize?: (containerRect: DOMRect) => void;
|
|
1000
|
-
onVisibleLevelsChanged?: (visibleLevels: number[]) => void;
|
|
1001
|
-
onModeChange?: (mode: CameraMode) => void;
|
|
1002
|
-
loadingMessage?: string;
|
|
1003
|
-
renderingMessage?: string;
|
|
1004
|
-
experimentalFacadeBasedPerformance?: boolean;
|
|
1005
|
-
}
|
|
1005
|
+
export declare const version = "2.25.3-beta.13";
|
|
1006
1006
|
|
|
1007
1007
|
declare interface ViewerRendererHandle {
|
|
1008
1008
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1016,7 +1016,7 @@ declare interface ViewerRendererHandle {
|
|
|
1016
1016
|
showAllLevels: () => void
|
|
1017
1017
|
getMode: () => CameraMode
|
|
1018
1018
|
setMode: (mode: CameraMode) => void
|
|
1019
|
-
updateRenderOptions: (options:
|
|
1019
|
+
updateRenderOptions: (options: SpaceRenderOptions) => void
|
|
1020
1020
|
setHideLevelPicker: (value: boolean) => void
|
|
1021
1021
|
setHideNavigationButtons: (value: boolean) => void
|
|
1022
1022
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { Smplr } from './types';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
declare type Env = 'prod' | 'dev' | 'local';
|
|
5
|
-
export declare function loadSmplrJs(bundle?: BundleType, env?: Env): Promise<Smplr>;
|
|
2
|
+
export declare function loadSmplrJs(bundle?: 'esm' | 'umd', env?: 'prod' | 'dev' | 'local'): Promise<Smplr>;
|
|
3
|
+
export * from './types';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,16 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
IMPORTANT NOTE
|
|
3
|
+
These types are generated at build time, the last deployed version can be
|
|
4
|
+
copied from https://www.npmjs.com/package/@smplrspace/smplr-loader?activeTab=code
|
|
5
|
+
👉 we use a .d.ts to avoid TS and linting errors on content generated in CI
|
|
6
|
+
*/
|
|
3
7
|
|
|
4
|
-
|
|
8
|
+
/* eslint-disable import/no-unresolved */
|
|
9
|
+
import type { Editor, Map, QueryClient, Space } from './generated/smplr'
|
|
10
|
+
import { Color, toString, version } from './generated/smplr'
|
|
11
|
+
|
|
12
|
+
export * from './generated/smplr'
|
|
13
|
+
/* eslint-enable import/no-unresolved */
|
|
5
14
|
|
|
6
15
|
export interface Smplr {
|
|
7
|
-
version: typeof
|
|
8
|
-
toString: typeof
|
|
9
|
-
Space:
|
|
10
|
-
Map:
|
|
11
|
-
Editor:
|
|
12
|
-
QueryClient:
|
|
13
|
-
Color: typeof
|
|
16
|
+
version: typeof version
|
|
17
|
+
toString: typeof toString
|
|
18
|
+
Space: Space
|
|
19
|
+
Map: Map
|
|
20
|
+
Editor: Editor
|
|
21
|
+
QueryClient: QueryClient
|
|
22
|
+
Color: typeof Color
|
|
14
23
|
}
|
|
15
24
|
|
|
16
25
|
declare global {
|
|
@@ -18,3 +27,5 @@ declare global {
|
|
|
18
27
|
smplr?: Smplr
|
|
19
28
|
}
|
|
20
29
|
}
|
|
30
|
+
|
|
31
|
+
export {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smplrspace/smplr-loader",
|
|
3
|
-
"version": "2.25.3-beta.
|
|
3
|
+
"version": "2.25.3-beta.13",
|
|
4
4
|
"description": "NPM package to load a typed Smplr.js from CDN easily",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "yarn tsc && vite build",
|
|
19
|
+
"build": "yarn tsc && vite build && echo \"export * from './types';\" >> dist/index.d.ts",
|
|
20
20
|
"dev": "echo 'No dev'",
|
|
21
21
|
"serve": "echo 'No serve'",
|
|
22
22
|
"libtest": "echo 'No libtest'",
|