@openglobus/openglobus-react 0.4.4 → 0.4.6

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 (33) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +2616 -2301
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.umd.cjs +63 -63
  5. package/dist/index.umd.cjs.map +1 -1
  6. package/dist/story-assets/amort_left_back.glb +0 -0
  7. package/dist/story-assets/amort_left_front.glb +0 -0
  8. package/dist/story-assets/amort_right_back.glb +0 -0
  9. package/dist/story-assets/amort_right_front.glb +0 -0
  10. package/dist/story-assets/cam0_base.glb +0 -0
  11. package/dist/story-assets/cam0_head.glb +0 -0
  12. package/dist/story-assets/cam0_joint.glb +0 -0
  13. package/dist/story-assets/f22.glb +0 -0
  14. package/dist/story-assets/maxwell_the_cat.glb +0 -0
  15. package/dist/story-assets/rover_base.glb +0 -0
  16. package/dist/story-assets/scaner_base.glb +0 -0
  17. package/dist/story-assets/scaner_head.glb +0 -0
  18. package/dist/story-assets/scaner_joint.glb +0 -0
  19. package/dist/story-assets/scaner_link0.glb +0 -0
  20. package/dist/story-assets/scaner_link1.glb +0 -0
  21. package/dist/story-assets/susp_left_back.glb +0 -0
  22. package/dist/story-assets/susp_left_front.glb +0 -0
  23. package/dist/story-assets/susp_right_back.glb +0 -0
  24. package/dist/story-assets/susp_right_front.glb +0 -0
  25. package/dist/story-assets/wheel_left.glb +0 -0
  26. package/dist/story-assets/wheel_left_front.glb +0 -0
  27. package/dist/story-assets/wheel_right.glb +0 -0
  28. package/dist/types/entity/Entity/Entity.d.ts +8 -4
  29. package/dist/types/entity/Gltf/Gltf.d.ts +13 -0
  30. package/dist/types/entity/Gltf/index.d.ts +1 -0
  31. package/dist/types/entity/index.d.ts +1 -0
  32. package/dist/types/layer/Vector/Vector.d.ts +2 -0
  33. package/package.json +14 -18
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,15 +1,19 @@
1
+ import { Gltf } from '../../index';
2
+ import { Entity as GlobusEntity } from '@openglobus/og';
1
3
  import { IEntityParams } from '@openglobus/og/lib/entity/Entity';
2
4
  import { EventCallback } from '@openglobus/og/lib/Events';
3
5
  import { Billboard, Geometry, GeoObject, Label, Polyline, Strip } from '..';
4
6
  import * as React from "react";
5
- type EntityChildElement = React.ReactElement<typeof Billboard | typeof GeoObject | typeof Label | typeof Polyline | typeof Strip | typeof Geometry>;
7
+ type EntityChildElement = React.ReactElement<typeof Billboard | typeof GeoObject | typeof Label | typeof Polyline | typeof Strip | typeof Gltf | typeof Entity | typeof Geometry>;
6
8
  export interface EntityParams extends IEntityParams {
7
9
  children?: EntityChildElement | EntityChildElement[];
8
10
  visibility?: boolean;
9
- lon: number;
10
- lat: number;
11
- alt: number;
11
+ lon?: number;
12
+ lat?: number;
13
+ alt?: number;
12
14
  onDraw?: EventCallback;
15
+ readonly _addEntity?: (billboard: GlobusEntity) => void;
16
+ readonly _removeEntity?: (billboard: GlobusEntity) => void;
13
17
  }
14
18
  declare const Entity: React.FC<EntityParams>;
15
19
  export { Entity };
@@ -0,0 +1,13 @@
1
+ import { Entity as GlobusEntity, Vec3 } from '@openglobus/og';
2
+ import * as React from "react";
3
+ export interface GltfProps {
4
+ src: string;
5
+ cartesian?: [number, number, number] | Vec3;
6
+ scale?: number;
7
+ visible?: boolean;
8
+ }
9
+ export interface GltfParams extends GltfProps {
10
+ readonly _addGltf?: (geoObject: GlobusEntity[]) => void;
11
+ readonly _removeGltf?: (geoObject: GlobusEntity[]) => void;
12
+ }
13
+ export declare const Gltf: React.FC<GltfParams>;
@@ -0,0 +1 @@
1
+ export * from './Gltf';
@@ -5,3 +5,4 @@ export * from './Geometry';
5
5
  export * from './Polyline';
6
6
  export * from './Strip';
7
7
  export * from './Entity';
8
+ export * from './Gltf';
@@ -18,6 +18,8 @@ declare const VectorContext: React.Context<{
18
18
  removePolyline: (entity: Entity) => void;
19
19
  addStrip: (entity: Entity, strip: Strip) => void;
20
20
  removeStrip: (entity: Entity) => void;
21
+ addGltf: (entity: Entity, gltf: Entity[]) => void;
22
+ removeGltf: (entity: Entity, gltf: Entity[]) => void;
21
23
  }>;
22
24
  type EntityElement = React.ReactElement<{
23
25
  type: typeof Entity;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openglobus/openglobus-react",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "description": "OpenGlobus React Components",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "private": false,
@@ -28,24 +28,20 @@
28
28
  "author": "Pavel Sukhodolski",
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@openglobus/og": "^0.27.6",
32
- "react": "^19.0.0"
31
+ "@openglobus/og": "^0.27.15",
32
+ "react": "^19.2.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@chromatic-com/storybook": "^3.2.4",
36
- "@storybook/addon-essentials": "^8.5.0",
37
- "@storybook/addon-interactions": "^8.5.0",
38
- "@storybook/addon-links": "^8.5.0",
39
- "@storybook/blocks": "^8.5.0",
40
- "@storybook/react": "^8.5.0",
41
- "@storybook/react-vite": "^8.5.0",
42
- "@storybook/test": "^8.5.0",
43
- "@types/node": "^22.10.7",
44
- "@types/react": "^19.0.7",
45
- "react": "^19.0.0",
46
- "storybook": "^8.5.0",
47
- "typescript": "^5.7.3",
48
- "vite": "^6.0.7",
49
- "vite-plugin-dts": "^4.5.0"
35
+ "@chromatic-com/storybook": "^4.1.1",
36
+ "@storybook/addon-links": "^9.1.10",
37
+ "@storybook/react-vite": "^9.1.10",
38
+ "@types/node": "^24.7.2",
39
+ "@types/react": "^19.2.2",
40
+ "react": "^19.2.0",
41
+ "storybook": "^9.1.10",
42
+ "typescript": "^5.9.3",
43
+ "vite": "^7.1.10",
44
+ "vite-plugin-dts": "^4.5.4",
45
+ "@storybook/addon-docs": "^9.1.10"
50
46
  }
51
47
  }