@openglobus/ext-entity-editor 0.0.0-stage → 1.0.0

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.
@@ -0,0 +1,20 @@
1
+ import { Object3d, type EventsHandler } from "@openglobus/og";
2
+ type Object3dCollectionEvents = ["add", "remove"];
3
+ export interface IObject3dItem {
4
+ name: string;
5
+ objects: Object3d[];
6
+ scale?: number;
7
+ }
8
+ interface Object3dCollectionParams {
9
+ collection?: IObject3dItem[];
10
+ }
11
+ export declare class Object3dCollection {
12
+ protected _items: Map<string, IObject3dItem>;
13
+ events: EventsHandler<Object3dCollectionEvents>;
14
+ constructor(params?: Object3dCollectionParams);
15
+ static createItemsMap(items: IObject3dItem[]): Map<string, IObject3dItem>;
16
+ getItem(name: string): IObject3dItem | undefined;
17
+ addItem(item: IObject3dItem, force?: boolean): void;
18
+ getItems(): IObject3dItem[];
19
+ }
20
+ export {};
@@ -0,0 +1,14 @@
1
+ import { ui, type EventsHandler } from "@openglobus/og";
2
+ import { IObject3dItem, Object3dCollection } from "./Object3dCollection";
3
+ import { Object3dItemView } from "./Object3dItemView";
4
+ type Object3dCollectionViewEvents = ["select"];
5
+ export declare class Object3dCollectionView extends ui.View<Object3dCollection> {
6
+ events: EventsHandler<Object3dCollectionViewEvents> & EventsHandler<ui.ViewEventsList>;
7
+ protected _activeView: Object3dItemView | null;
8
+ constructor(params: ui.IViewParams);
9
+ protected _addItem(item: IObject3dItem): void;
10
+ render(params: ui.IViewParams): this;
11
+ protected _initEvents(): void;
12
+ protected _onAdd: (item: IObject3dItem) => void;
13
+ }
14
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ui, type EventsHandler } from "@openglobus/og";
2
+ import { IObject3dItem } from "./Object3dCollection";
3
+ type Object3dItemViewEvents = ["click"];
4
+ export declare class Object3dItemView extends ui.View<IObject3dItem> {
5
+ events: EventsHandler<Object3dItemViewEvents> & EventsHandler<ui.ViewEventsList>;
6
+ constructor(params: ui.IViewParams);
7
+ render(params?: any): this;
8
+ }
9
+ export {};
@@ -0,0 +1,25 @@
1
+ import { Control, Entity, LonLat, Vector, type IControlParams, type IMouseState } from "@openglobus/og";
2
+ import { Object3dManagerDialog } from "./Object3dManagerDialog";
3
+ import { Object3dCollection } from "./Object3dCollection";
4
+ import { IObject3dItem } from "./Object3dCollection";
5
+ export interface IObject3dManagerParams extends IControlParams {
6
+ collection?: IObject3dItem[];
7
+ layer?: Vector;
8
+ }
9
+ export declare class Object3dManager extends Control {
10
+ protected _dialog: Object3dManagerDialog;
11
+ protected _collection: Object3dCollection;
12
+ protected _layer: Vector | null;
13
+ protected _currentItem: IObject3dItem | null;
14
+ constructor(options?: IObject3dManagerParams);
15
+ oninit(): void;
16
+ onactivate(): void;
17
+ ondeactivate(): void;
18
+ onremove(): void;
19
+ protected _onSelect: (item: IObject3dItem) => void;
20
+ bindLayer(layer: Vector): void;
21
+ protected _initEvents(): void;
22
+ protected _clearEvents(): void;
23
+ protected _onClick: (e: IMouseState) => void;
24
+ protected _createEntity(item: IObject3dItem, lonLat: LonLat): Entity;
25
+ }
@@ -0,0 +1,20 @@
1
+ import { Object3d, ui, type EventsHandler } from "@openglobus/og";
2
+ import { Object3dCollection } from "./Object3dCollection";
3
+ import { Object3dCollectionView } from "./Object3dCollectionView";
4
+ type Object3dManagerDialogEvents = ["select"];
5
+ interface IObject3dManagerDialogParams extends ui.IDialogParams {
6
+ model: Object3dCollection;
7
+ }
8
+ type Object3dManagerDialogEventsExt = EventsHandler<Object3dManagerDialogEvents> & EventsHandler<ui.DialogEventsList> & EventsHandler<ui.ViewEventsList>;
9
+ export declare class Object3dManagerDialog extends ui.Dialog<null> {
10
+ events: Object3dManagerDialogEventsExt;
11
+ protected _object3dCollectionView: Object3dCollectionView;
12
+ constructor(params: IObject3dManagerDialogParams);
13
+ render(params: any): this;
14
+ protected _onLoadClick: () => void;
15
+ protected _addObject: (item: {
16
+ name: string;
17
+ objects: Object3d[];
18
+ }) => void;
19
+ }
20
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Adds the styles of the control to the page, the first control adds them.
3
+ */
4
+ export declare function addStyle(): void;
5
+ /**
6
+ * Removes the styles from the page when the last control is removed.
7
+ */
8
+ export declare function releaseStyle(): void;
package/package.json CHANGED
@@ -1,6 +1,31 @@
1
1
  {
2
- "name": "@openglobus/ext-entity-editor",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@openglobus/ext-entity-editor",
3
+ "version": "1.0.0",
4
+ "description": "Entity editor extension for OpenGlobus: entity properties dialog with the gizmo, entity tree and 3D object manager",
5
+ "type": "module",
6
+ "license": "Apache-2.0",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/openglobus/og-extensions.git",
10
+ "directory": "packages/entity-editor"
11
+ },
12
+ "keywords": [
13
+ "openglobus-extension"
14
+ ],
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.js"
19
+ }
20
+ },
21
+ "files": [
22
+ "dist/"
23
+ ],
24
+ "sideEffects": false,
25
+ "scripts": {
26
+ "build": "vite build && tsc --emitDeclarationOnly"
27
+ },
28
+ "peerDependencies": {
29
+ "@openglobus/og": "^1.0.0-rc.50"
30
+ }
31
+ }