@nice2dev/spatial-core 1.1.6 → 1.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/dist/bim/index.d.ts +1 -1
- package/dist/cad/index.d.ts +1 -1
- package/dist/export/index.d.ts +1 -1
- package/dist/export/index.js +1 -1
- package/dist/floor-plan/index.d.ts +3 -3
- package/dist/import/import.worker.d.ts +1 -1
- package/dist/import/import.worker.js +1 -1
- package/dist/import/index.d.ts +3 -3
- package/dist/import/index.js +1 -1
- package/dist/import/workerImport.d.ts +1 -1
- package/dist/import/workerImport.js +1 -1
- package/dist/index.d.ts +15 -15
- package/dist/index.js +15 -15
- package/dist/measurement/index.d.ts +1 -1
- package/dist/objects/index.d.ts +1 -1
- package/dist/serialization/index.d.ts +1 -1
- package/dist/topology/index.d.ts +1 -1
- package/dist/transitions/index.d.ts +1 -1
- package/dist/unified/index.d.ts +2 -2
- package/dist/virtualization/ViewportCulling.d.ts +1 -1
- package/dist/virtualization/index.d.ts +2 -2
- package/dist/virtualization/index.js +2 -2
- package/package.json +1 -1
package/dist/bim/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module @nice2dev/spatial-core/bim
|
|
8
8
|
*/
|
|
9
|
-
import type { Point2D, Point3D } from '../grid/index';
|
|
9
|
+
import type { Point2D, Point3D } from '../grid/index.js';
|
|
10
10
|
export type IfcSchema = 'IFC2x3' | 'IFC4' | 'IFC4x3';
|
|
11
11
|
export interface IfcEntity {
|
|
12
12
|
id: string;
|
package/dist/cad/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module @nice2dev/spatial-core/cad
|
|
8
8
|
*/
|
|
9
|
-
import type { Point2D, Point3D } from '../grid/index';
|
|
9
|
+
import type { Point2D, Point3D } from '../grid/index.js';
|
|
10
10
|
export type ConstraintKind = 'parallel' | 'perpendicular' | 'distance' | 'angle' | 'coincident' | 'tangent' | 'equal-length' | 'symmetric' | 'horizontal' | 'vertical' | 'concentric' | 'midpoint' | 'fixed';
|
|
11
11
|
export interface ParametricConstraint {
|
|
12
12
|
id: string;
|
package/dist/export/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @module @nice2dev/spatial-core/export
|
|
11
11
|
*/
|
|
12
|
-
import type { FloorPlanDocument } from '../floor-plan';
|
|
12
|
+
import type { FloorPlanDocument } from '../floor-plan/index.js';
|
|
13
13
|
/** Output format for document export. */
|
|
14
14
|
export type DocumentExportFormat = 'nsp' | 'svg' | 'dxf' | 'png' | 'pdf';
|
|
15
15
|
/** Export options. */
|
package/dist/export/index.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @module @nice2dev/spatial-core/export
|
|
11
11
|
*/
|
|
12
|
-
import { serialize } from '../serialization';
|
|
12
|
+
import { serialize } from '../serialization/index.js';
|
|
13
13
|
/* ================================================================
|
|
14
14
|
NSP JSON EXPORT
|
|
15
15
|
================================================================ */
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @module @nice2dev/spatial-core/floor-plan
|
|
10
10
|
*/
|
|
11
|
-
import type { Point2D, BoundingBox } from '../grid/index';
|
|
12
|
-
import type { SpatialObject, RoomType } from '../objects/index';
|
|
13
|
-
export type { SpatialObject, Room, RoomType } from '../objects/index';
|
|
11
|
+
import type { Point2D, BoundingBox } from '../grid/index.js';
|
|
12
|
+
import type { SpatialObject, RoomType } from '../objects/index.js';
|
|
13
|
+
export type { SpatialObject, Room, RoomType } from '../objects/index.js';
|
|
14
14
|
/** Floor plan document - the root object for .nsp.json files. */
|
|
15
15
|
export interface FloorPlanDocument {
|
|
16
16
|
/** Optional document identifier. */
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Send { type: 'import', content, format, options } message
|
|
9
9
|
* - Receive { type: 'result', result } or { type: 'progress', progress } messages
|
|
10
10
|
*/
|
|
11
|
-
import type { FileImportFormat, FileImportOptions, FileImportResult } from './index';
|
|
11
|
+
import type { FileImportFormat, FileImportOptions, FileImportResult } from './index.js';
|
|
12
12
|
/** Worker input message. */
|
|
13
13
|
export interface ImportWorkerInput {
|
|
14
14
|
type: 'import';
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Send { type: 'import', content, format, options } message
|
|
9
9
|
* - Receive { type: 'result', result } or { type: 'progress', progress } messages
|
|
10
10
|
*/
|
|
11
|
-
import { importFile } from './index';
|
|
11
|
+
import { importFile } from './index.js';
|
|
12
12
|
/* ================================================================
|
|
13
13
|
WORKER MESSAGE HANDLER
|
|
14
14
|
================================================================ */
|
package/dist/import/index.d.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @module @nice2dev/spatial-core/import
|
|
11
11
|
*/
|
|
12
|
-
import type { FloorPlanDocument } from '../floor-plan';
|
|
13
|
-
import type { Point2D } from '../grid';
|
|
12
|
+
import type { FloorPlanDocument } from '../floor-plan/index.js';
|
|
13
|
+
import type { Point2D } from '../grid/index.js';
|
|
14
14
|
/** Import format. */
|
|
15
15
|
export type FileImportFormat = 'dxf' | 'svg' | 'geojson' | 'ifc';
|
|
16
16
|
/** Import options. */
|
|
@@ -107,4 +107,4 @@ export declare function detectFileImportFormat(filename: string, content?: strin
|
|
|
107
107
|
* Import from file (browser File API).
|
|
108
108
|
*/
|
|
109
109
|
export declare function importFromBrowserFile(file: File, options?: Partial<FileImportOptions>): Promise<FileImportResult>;
|
|
110
|
-
export { importFileInWorker, importFileAsync, isWorkerSupported, terminateImportWorker, createImportWorker, type WorkerImportOptions, } from './workerImport';
|
|
110
|
+
export { importFileInWorker, importFileAsync, isWorkerSupported, terminateImportWorker, createImportWorker, type WorkerImportOptions, } from './workerImport.js';
|
package/dist/import/index.js
CHANGED
|
@@ -1088,4 +1088,4 @@ function assembleDocument(walls, zones, objects, layersFound, docInfo) {
|
|
|
1088
1088
|
/* ================================================================
|
|
1089
1089
|
WEB WORKER IMPORT (re-exported)
|
|
1090
1090
|
================================================================ */
|
|
1091
|
-
export { importFileInWorker, importFileAsync, isWorkerSupported, terminateImportWorker, createImportWorker, } from './workerImport';
|
|
1091
|
+
export { importFileInWorker, importFileAsync, isWorkerSupported, terminateImportWorker, createImportWorker, } from './workerImport.js';
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* }
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
import type { FileImportFormat, FileImportOptions, FileImportResult } from './index';
|
|
17
|
+
import type { FileImportFormat, FileImportOptions, FileImportResult } from './index.js';
|
|
18
18
|
/** Options for worker-based import. */
|
|
19
19
|
export interface WorkerImportOptions extends Partial<FileImportOptions> {
|
|
20
20
|
/** Progress callback (0-100). */
|
|
@@ -191,7 +191,7 @@ export function terminateImportWorker() {
|
|
|
191
191
|
*/
|
|
192
192
|
export async function importFileAsync(content, format, options = {}) {
|
|
193
193
|
// Import the sync function dynamically to avoid circular deps
|
|
194
|
-
const { importFile } = await import('./index');
|
|
194
|
+
const { importFile } = await import('./index.js');
|
|
195
195
|
if (isWorkerSupported()) {
|
|
196
196
|
try {
|
|
197
197
|
return await importFileInWorker(content, format, options);
|
package/dist/index.d.ts
CHANGED
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @module @nice2dev/spatial-core
|
|
13
13
|
*/
|
|
14
|
-
export * from './grid/index';
|
|
15
|
-
export * from './objects/index';
|
|
16
|
-
export * from './floor-plan/index';
|
|
17
|
-
export { convertLength, convertArea, degToRad, radToDeg, distance3D, manhattanDistance2D, manhattanDistance3D, polylineLength, polygonPerimeter, angleBetweenPoints, angleAtVertex, angleBetweenVectors, normalizeAngle, snapAngle, polygonArea, rectangleArea, circleArea, triangleArea, midpoint2D, midpoint3D, polygonCentroid, lerp2D, lerp3D, projectPointOnLine, pointToLineDistance, formatLength, formatArea, formatAngle, autoFormatLength, autoFormatArea, type UnitSystem, type LengthUnit, type AreaUnit, type AngleUnit, type MeasurementResult, } from './measurement/index';
|
|
18
|
-
export * from './serialization/index';
|
|
19
|
-
export * from './export/index';
|
|
20
|
-
export * from './topology/index';
|
|
21
|
-
export * from './import/index';
|
|
22
|
-
export * from './virtualization/index';
|
|
23
|
-
export * from './unified/index';
|
|
24
|
-
export * from './transitions/index';
|
|
25
|
-
export * from './cad/index';
|
|
26
|
-
export * from './bim/index';
|
|
27
|
-
export * from './interior/index';
|
|
28
|
-
export * from './ecad/index';
|
|
14
|
+
export * from './grid/index.js';
|
|
15
|
+
export * from './objects/index.js';
|
|
16
|
+
export * from './floor-plan/index.js';
|
|
17
|
+
export { convertLength, convertArea, degToRad, radToDeg, distance3D, manhattanDistance2D, manhattanDistance3D, polylineLength, polygonPerimeter, angleBetweenPoints, angleAtVertex, angleBetweenVectors, normalizeAngle, snapAngle, polygonArea, rectangleArea, circleArea, triangleArea, midpoint2D, midpoint3D, polygonCentroid, lerp2D, lerp3D, projectPointOnLine, pointToLineDistance, formatLength, formatArea, formatAngle, autoFormatLength, autoFormatArea, type UnitSystem, type LengthUnit, type AreaUnit, type AngleUnit, type MeasurementResult, } from './measurement/index.js';
|
|
18
|
+
export * from './serialization/index.js';
|
|
19
|
+
export * from './export/index.js';
|
|
20
|
+
export * from './topology/index.js';
|
|
21
|
+
export * from './import/index.js';
|
|
22
|
+
export * from './virtualization/index.js';
|
|
23
|
+
export * from './unified/index.js';
|
|
24
|
+
export * from './transitions/index.js';
|
|
25
|
+
export * from './cad/index.js';
|
|
26
|
+
export * from './bim/index.js';
|
|
27
|
+
export * from './interior/index.js';
|
|
28
|
+
export * from './ecad/index.js';
|
package/dist/index.js
CHANGED
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
15
15
|
// Grid System
|
|
16
16
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
17
|
-
export * from './grid/index';
|
|
17
|
+
export * from './grid/index.js';
|
|
18
18
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
19
19
|
// Spatial Objects
|
|
20
20
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
21
|
-
export * from './objects/index';
|
|
21
|
+
export * from './objects/index.js';
|
|
22
22
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
23
23
|
// Floor Plan Model
|
|
24
24
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
25
|
-
export * from './floor-plan/index';
|
|
25
|
+
export * from './floor-plan/index.js';
|
|
26
26
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
27
27
|
// Measurement Utilities (excluding distance2D which is in grid)
|
|
28
28
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
@@ -38,48 +38,48 @@ polygonArea, rectangleArea, circleArea, triangleArea,
|
|
|
38
38
|
// Points
|
|
39
39
|
midpoint2D, midpoint3D, polygonCentroid, lerp2D, lerp3D, projectPointOnLine, pointToLineDistance,
|
|
40
40
|
// Formatting
|
|
41
|
-
formatLength, formatArea, formatAngle, autoFormatLength, autoFormatArea, } from './measurement/index';
|
|
41
|
+
formatLength, formatArea, formatAngle, autoFormatLength, autoFormatArea, } from './measurement/index.js';
|
|
42
42
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
43
43
|
// Serialization
|
|
44
44
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
45
|
-
export * from './serialization/index';
|
|
45
|
+
export * from './serialization/index.js';
|
|
46
46
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
47
47
|
// Export (to various formats: NSP, SVG, DXF, PNG, PDF)
|
|
48
48
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
49
|
-
export * from './export/index';
|
|
49
|
+
export * from './export/index.js';
|
|
50
50
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
51
51
|
// Topology Layer (network connections, cable routing, coverage)
|
|
52
52
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
53
|
-
export * from './topology/index';
|
|
53
|
+
export * from './topology/index.js';
|
|
54
54
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
55
55
|
// Import (from DXF, SVG, GeoJSON, IFC)
|
|
56
56
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
57
|
-
export * from './import/index';
|
|
57
|
+
export * from './import/index.js';
|
|
58
58
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
59
59
|
// Virtualization (QuadTree, viewport culling for 1000+ objects)
|
|
60
60
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
61
|
-
export * from './virtualization/index';
|
|
61
|
+
export * from './virtualization/index.js';
|
|
62
62
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
63
63
|
// Unified 2D↔3D System (Shared Object Model, References, Materials, Layers)
|
|
64
64
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
65
|
-
export * from './unified/index';
|
|
65
|
+
export * from './unified/index.js';
|
|
66
66
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
67
67
|
// Editor Transitions (Quick Switch, Split View, Cross-Editor Undo, Bookmarks)
|
|
68
68
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
69
|
-
export * from './transitions/index';
|
|
69
|
+
export * from './transitions/index.js';
|
|
70
70
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
71
71
|
// Professional CAD (Parametric Constraints, Boolean Ops, Assembly, FEA)
|
|
72
72
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
73
|
-
export * from './cad/index';
|
|
73
|
+
export * from './cad/index.js';
|
|
74
74
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
75
75
|
// BIM / AEC (IFC, Revit, MEP, Clash Detection, 4D/5D, Digital Twin)
|
|
76
76
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
77
|
-
export * from './bim/index';
|
|
77
|
+
export * from './bim/index.js';
|
|
78
78
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
79
79
|
// Interior Design (Furniture, Lighting, Materials, Styles, Budget)
|
|
80
80
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
81
|
-
export * from './interior/index';
|
|
81
|
+
export * from './interior/index.js';
|
|
82
82
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
83
83
|
// Electrical & Electronics CAD (Schematic, PCB, SPICE, Harness, Panel, SLD)
|
|
84
84
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
85
|
-
export * from './ecad/index';
|
|
85
|
+
export * from './ecad/index.js';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module @nice2dev/spatial-core/measurement
|
|
9
9
|
*/
|
|
10
|
-
import type { Point2D, Point3D } from '../grid/index';
|
|
10
|
+
import type { Point2D, Point3D } from '../grid/index.js';
|
|
11
11
|
/** Unit system. */
|
|
12
12
|
export type UnitSystem = 'metric' | 'imperial';
|
|
13
13
|
/** Length unit. */
|
package/dist/objects/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @module @nice2dev/spatial-core/objects
|
|
10
10
|
*/
|
|
11
|
-
import type { Point2D, Point3D, BoundingBox } from '../grid/index';
|
|
11
|
+
import type { Point2D, Point3D, BoundingBox } from '../grid/index.js';
|
|
12
12
|
/** Transform in 2D space. */
|
|
13
13
|
export interface Transform2D {
|
|
14
14
|
position: Point2D;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module @nice2dev/spatial-core/serialization
|
|
12
12
|
*/
|
|
13
|
-
import type { FloorPlanDocument, Floor } from '../floor-plan/index';
|
|
13
|
+
import type { FloorPlanDocument, Floor } from '../floor-plan/index.js';
|
|
14
14
|
/** Serialization options. */
|
|
15
15
|
export interface SerializationOptions {
|
|
16
16
|
/** Pretty print JSON (default: false). */
|
package/dist/topology/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module @nice2dev/spatial-core/topology
|
|
12
12
|
*/
|
|
13
|
-
import type { Point2D, BoundingBox } from '../grid';
|
|
13
|
+
import type { Point2D, BoundingBox } from '../grid/index.js';
|
|
14
14
|
/** Connection medium type. */
|
|
15
15
|
export type ConnectionMedium = 'ethernet-cat5' | 'ethernet-cat6' | 'ethernet-cat6a' | 'ethernet-cat7' | 'fiber-single' | 'fiber-multi' | 'coax' | 'power-line' | 'wifi-2.4ghz' | 'wifi-5ghz' | 'wifi-6ghz' | 'bluetooth' | 'zigbee' | 'z-wave' | 'thread' | 'matter' | 'lora' | 'cellular-4g' | 'cellular-5g' | 'serial' | 'usb' | 'hdmi' | 'displayport' | 'custom';
|
|
16
16
|
/** Connection status. */
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @module @nice2dev/spatial-core/transitions
|
|
16
16
|
*/
|
|
17
|
-
import type { Point2D, Point3D } from '../grid/index';
|
|
17
|
+
import type { Point2D, Point3D } from '../grid/index.js';
|
|
18
18
|
export type ActiveEditor = '2d' | '3d' | 'split';
|
|
19
19
|
export interface EditorTransitionState {
|
|
20
20
|
/** Currently active editor */
|
package/dist/unified/index.d.ts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @module @nice2dev/spatial-core/unified
|
|
16
16
|
*/
|
|
17
|
-
import type { Point2D, Point3D } from '../grid/index';
|
|
18
|
-
import type { SpatialObject, Transform2D, Transform3D } from '../objects/index';
|
|
17
|
+
import type { Point2D, Point3D } from '../grid/index.js';
|
|
18
|
+
import type { SpatialObject, Transform2D, Transform3D } from '../objects/index.js';
|
|
19
19
|
/** SpatialObject3D extends the base SpatialObject with full 3D support. */
|
|
20
20
|
export interface SpatialObject3D extends Omit<SpatialObject, 'transform'> {
|
|
21
21
|
transform2D: Transform2D;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Calculates visible bounds and filters objects for rendering optimization.
|
|
5
5
|
*/
|
|
6
|
-
import type { Bounds, QuadTree, QuadTreeItem } from './QuadTree';
|
|
6
|
+
import type { Bounds, QuadTree, QuadTreeItem } from './QuadTree.js';
|
|
7
7
|
/** Viewport state with pan/zoom */
|
|
8
8
|
export interface ViewportState {
|
|
9
9
|
/** Current zoom level (1 = 100%) */
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Provides spatial indexing (QuadTree) and viewport culling utilities
|
|
5
5
|
* for rendering optimization with 1000+ objects.
|
|
6
6
|
*/
|
|
7
|
-
export { QuadTree, createFloorPlanQuadTree, type Bounds, type QuadTreeItem
|
|
8
|
-
export { calculateVisibleBounds, isInViewport, filterVisibleItems, queryVisibleFromQuadTree, shouldUseVirtualRendering, calculateRenderStats, createQuadTreeUpdater, type ViewportState, type ContainerSize, } from './ViewportCulling';
|
|
7
|
+
export { QuadTree, createFloorPlanQuadTree, type Bounds, type QuadTreeItem } from './QuadTree.js';
|
|
8
|
+
export { calculateVisibleBounds, isInViewport, filterVisibleItems, queryVisibleFromQuadTree, shouldUseVirtualRendering, calculateRenderStats, createQuadTreeUpdater, type ViewportState, type ContainerSize, } from './ViewportCulling.js';
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Provides spatial indexing (QuadTree) and viewport culling utilities
|
|
5
5
|
* for rendering optimization with 1000+ objects.
|
|
6
6
|
*/
|
|
7
|
-
export { QuadTree, createFloorPlanQuadTree
|
|
8
|
-
export { calculateVisibleBounds, isInViewport, filterVisibleItems, queryVisibleFromQuadTree, shouldUseVirtualRendering, calculateRenderStats, createQuadTreeUpdater, } from './ViewportCulling';
|
|
7
|
+
export { QuadTree, createFloorPlanQuadTree } from './QuadTree.js';
|
|
8
|
+
export { calculateVisibleBounds, isInViewport, filterVisibleItems, queryVisibleFromQuadTree, shouldUseVirtualRendering, calculateRenderStats, createQuadTreeUpdater, } from './ViewportCulling.js';
|