@buerli.io/headless 1.2.0 → 2.0.0-beta.20261016085358

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.
@@ -1,3 +1,4 @@
1
+ import type * as THREE from 'three';
1
2
  import { BooleanOperationType, ChamferType, FlipType, ReorientedType, WorkAxisType, WorkCoordSystemType, WorkPlaneType, WorkPointType, ViewType, ExtrusionType, WorkGeomType, SVGModusType, LimitsParam, DimensionParam, LimitedValue, GraphicType, ObjectID, ObjectIdent } from '@buerli.io/classcad';
2
3
  import { DrawingID, InteractionInfo, GeometryElement, DrawingState, BuerliState } from '@buerli.io/core';
3
4
  import { BufferGeometry, Material, Object3D, Scene } from 'three';
@@ -27,7 +28,7 @@ import { BufferGeometry, Material, Object3D, Scene } from 'three';
27
28
  * })
28
29
  * ```
29
30
  */
30
- export declare type ApiHistory = {
31
+ export type ApiHistory = {
31
32
  /**
32
33
  * Returns the drawing id of the current headless-session
33
34
  * @returns DrawingID
@@ -1619,41 +1620,41 @@ export declare class History {
1619
1620
  export declare class history extends History {
1620
1621
  constructor();
1621
1622
  }
1622
- declare type VID = ObjectID | null | Promise<ObjectID | null>;
1623
- declare type VIDs = ObjectID[] | Promise<ObjectID[]>;
1624
- declare type ID = Promise<ObjectID | null>;
1625
- declare type IDs = Promise<ObjectID[]>;
1626
- declare type Point = {
1623
+ type VID = ObjectID | null | Promise<ObjectID | null>;
1624
+ type VIDs = ObjectID[] | Promise<ObjectID[]>;
1625
+ type ID = Promise<ObjectID | null>;
1626
+ type IDs = Promise<ObjectID[]>;
1627
+ type Point = {
1627
1628
  x: number;
1628
1629
  y: number;
1629
1630
  z: number;
1630
1631
  };
1631
- declare type ModelInfo = {
1632
+ type ModelInfo = {
1632
1633
  centerOfGravity: Vec;
1633
1634
  volume: number;
1634
1635
  };
1635
- declare type MateParam = {
1636
+ type MateParam = {
1636
1637
  matePath: VID[];
1637
1638
  wcsId: VID;
1638
1639
  flip: FlipType;
1639
1640
  reoriented: ReorientedType;
1640
1641
  };
1641
- declare type GrT = GraphicType.POINT | GraphicType.LINE | GraphicType.ARC | GraphicType.CIRCLE | GraphicType.PLANE | GraphicType.CYLINDER | GraphicType.CONE | GraphicType.SPHERE | GraphicType.NURBSCURVE | GraphicType.NURBSSURFACE;
1642
+ type GrT = GraphicType.POINT | GraphicType.LINE | GraphicType.ARC | GraphicType.CIRCLE | GraphicType.PLANE | GraphicType.CYLINDER | GraphicType.CONE | GraphicType.SPHERE | GraphicType.NURBSCURVE | GraphicType.NURBSSURFACE;
1642
1643
  /**
1643
1644
  * Array type containing three points of type Point = {x: number, y: number, z: number}.
1644
1645
  * - [0] = origin position containing x-, y- and z-coordinates
1645
1646
  * - [1] = x-direction vector
1646
1647
  * - [2] = y-direction vector
1647
1648
  */
1648
- export declare type Transform = [Point, Point, Point];
1649
- export declare type DimensionType = DimensionParam<VID, Vec>;
1650
- export declare type ViewOptionsType = {
1649
+ export type Transform = [Point, Point, Point];
1650
+ export type DimensionType = DimensionParam<VID, Vec>;
1651
+ export type ViewOptionsType = {
1651
1652
  /** optional color (autocad color index) to set for the 2d view, if color = 256 then color will be taken from layer definition */
1652
1653
  color?: number;
1653
1654
  /** optional layer to set for the 2d view, layers are defined in the dxf file */
1654
1655
  layer?: string;
1655
1656
  };
1656
- export declare type FastenedOriginConstraintType = {
1657
+ export type FastenedOriginConstraintType = {
1657
1658
  /** id of the constraint */
1658
1659
  constrId: VID;
1659
1660
  /** first mate constraint */
@@ -1671,7 +1672,7 @@ export declare type FastenedOriginConstraintType = {
1671
1672
  /** rotation around z-axis */
1672
1673
  zRotation?: number | string;
1673
1674
  };
1674
- export declare type FastenedConstraintType = {
1675
+ export type FastenedConstraintType = {
1675
1676
  /** id of the constraint */
1676
1677
  constrId: VID;
1677
1678
  /** first mate constraint */
@@ -1691,7 +1692,7 @@ export declare type FastenedConstraintType = {
1691
1692
  /** rotation around z-axis */
1692
1693
  zRotation?: number | string;
1693
1694
  };
1694
- export declare type RevoluteConstraintType = {
1695
+ export type RevoluteConstraintType = {
1695
1696
  /** id of the constraint */
1696
1697
  constrId: VID;
1697
1698
  /** first mate constraint */
@@ -1703,7 +1704,7 @@ export declare type RevoluteConstraintType = {
1703
1704
  /** min and max limit for the rotation around z-Axis */
1704
1705
  zRotationLimits: LimitsParam;
1705
1706
  };
1706
- export declare type SliderConstraintType = {
1707
+ export type SliderConstraintType = {
1707
1708
  /** id of the constraint */
1708
1709
  constrId: VID;
1709
1710
  /** first mate constraint */
@@ -1717,7 +1718,7 @@ export declare type SliderConstraintType = {
1717
1718
  /** min and max limit for the z-offset */
1718
1719
  zOffsetLimits: LimitsParam;
1719
1720
  };
1720
- export declare type PlanarConstraintType = {
1721
+ export type PlanarConstraintType = {
1721
1722
  /** id of the constraint */
1722
1723
  constrId: VID;
1723
1724
  /** first mate constraint */
@@ -1733,7 +1734,7 @@ export declare type PlanarConstraintType = {
1733
1734
  /** min and max limit for the rotation around z-Axis */
1734
1735
  zRotationLimits: LimitsParam;
1735
1736
  };
1736
- export declare type ParallelConstraintType = {
1737
+ export type ParallelConstraintType = {
1737
1738
  /** id of the constraint */
1738
1739
  constrId: VID;
1739
1740
  /** first mate constraint */
@@ -1749,7 +1750,7 @@ export declare type ParallelConstraintType = {
1749
1750
  /** min and max limit for the rotation around z-Axis */
1750
1751
  zRotationLimits: LimitsParam;
1751
1752
  };
1752
- export declare type CylindricalConstraintType = {
1753
+ export type CylindricalConstraintType = {
1753
1754
  /** id of the constraint */
1754
1755
  constrId: VID;
1755
1756
  /** first mate constraint */
@@ -1761,13 +1762,13 @@ export declare type CylindricalConstraintType = {
1761
1762
  /** min and max limit for the rotation around z-Axis */
1762
1763
  zRotationLimits: LimitsParam;
1763
1764
  };
1764
- export declare type GroupConstraintType = {
1765
+ export type GroupConstraintType = {
1765
1766
  /** id of the constraint */
1766
1767
  constrId: VID;
1767
1768
  /** ids of instances to be grouped */
1768
1769
  instanceIds: VID[];
1769
1770
  };
1770
- export declare type LinearPatternConstraintType = {
1771
+ export type LinearPatternConstraintType = {
1771
1772
  /** id of the constraint */
1772
1773
  constrId: VID;
1773
1774
  /** id of the instance to be copied */
@@ -1785,7 +1786,7 @@ export declare type LinearPatternConstraintType = {
1785
1786
  /** number of copies over the second direction (set by z-axis of mate2) */
1786
1787
  secondDirDistance?: number | string;
1787
1788
  };
1788
- export declare type CircularPatternConstraintType = {
1789
+ export type CircularPatternConstraintType = {
1789
1790
  /** id of the constraint */
1790
1791
  constrId: VID;
1791
1792
  /** id of the instance to be copied */
@@ -1816,7 +1817,7 @@ export declare type CircularPatternConstraintType = {
1816
1817
  * zOffset
1817
1818
  * ]
1818
1819
  */
1819
- export declare type ConstraintType = [
1820
+ export type ConstraintType = [
1820
1821
  number,
1821
1822
  [
1822
1823
  number[],
@@ -1844,7 +1845,7 @@ export declare type ConstraintType = [
1844
1845
  * - THREE.Vector [See threejs documentation](https://threejs.org/docs/?q=Vect#api/en/math/Vector3)
1845
1846
  * - THREE.Euler [See threejs documentation](https://threejs.org/docs/?q=Euler#api/en/math/Euler)
1846
1847
  */
1847
- export declare type Vec<Value = number> = Value[] | {
1848
+ export type Vec<Value = number> = Value[] | {
1848
1849
  x: Value;
1849
1850
  y: Value;
1850
1851
  z: Value;
@@ -10,20 +10,20 @@ export { GraphicType, ContainerType, MeshTypes, EdgeTypes, CurveTypes, EntityTyp
10
10
  * Please have a look at https://github.com/awv-informatik/buerli/pull/129 for more information.
11
11
  */
12
12
  import { WorkGeomType as WorkGeomType1 } from '@buerli.io/classcad';
13
- export declare type WorkGeomType = WorkGeomType1;
13
+ export type WorkGeomType = WorkGeomType1;
14
14
  import { ApiHistory as ApiHistory1, ConstraintType as ConstraintType1, Transform as Transform1, DimensionType as DimensionType1, FastenedOriginConstraintType as FastenedOriginConstraintType1, FastenedConstraintType as FastenedConstraintType1, RevoluteConstraintType as RevoluteConstraintType1, SliderConstraintType as SliderConstraintType1, PlanarConstraintType as PlanarConstraintType1, ParallelConstraintType as ParallelConstraintType1, CylindricalConstraintType as CylindricalConstraintType1 } from './history';
15
- export declare type ApiHistory = ApiHistory1;
16
- export declare type ConstraintType = ConstraintType1;
17
- export declare type Transform = Transform1;
18
- export declare type DimensionType = DimensionType1;
19
- export declare type FastenedOriginConstraintType = FastenedOriginConstraintType1;
20
- export declare type FastenedConstraintType = FastenedConstraintType1;
21
- export declare type RevoluteConstraintType = RevoluteConstraintType1;
22
- export declare type SliderConstraintType = SliderConstraintType1;
23
- export declare type PlanarConstraintType = PlanarConstraintType1;
24
- export declare type ParallelConstraintType = ParallelConstraintType1;
25
- export declare type CylindricalConstraintType = CylindricalConstraintType1;
15
+ export type ApiHistory = ApiHistory1;
16
+ export type ConstraintType = ConstraintType1;
17
+ export type Transform = Transform1;
18
+ export type DimensionType = DimensionType1;
19
+ export type FastenedOriginConstraintType = FastenedOriginConstraintType1;
20
+ export type FastenedConstraintType = FastenedConstraintType1;
21
+ export type RevoluteConstraintType = RevoluteConstraintType1;
22
+ export type SliderConstraintType = SliderConstraintType1;
23
+ export type PlanarConstraintType = PlanarConstraintType1;
24
+ export type ParallelConstraintType = ParallelConstraintType1;
25
+ export type CylindricalConstraintType = CylindricalConstraintType1;
26
26
  import { ApiNoHistory as ApiNoHistory1, FilletPoint as FilletPoint1, Polyline as Polyline1 } from './solid';
27
- export declare type ApiNoHistory = ApiNoHistory1;
28
- export declare type Polyline = Polyline1;
29
- export declare type FilletPoint = FilletPoint1;
27
+ export type ApiNoHistory = ApiNoHistory1;
28
+ export type Polyline = Polyline1;
29
+ export type FilletPoint = FilletPoint1;
@@ -1,3 +1,4 @@
1
+ import type * as THREE from 'three';
1
2
  import { ObjectID } from '@buerli.io/classcad';
2
3
  import { BuerliState, DrawingID, DrawingState } from '@buerli.io/core';
3
4
  import { BufferGeometry, Scene, Vector3 } from 'three';
@@ -23,7 +24,7 @@ import { BufferGeometry, Scene, Vector3 } from 'three';
23
24
  * })
24
25
  * ```
25
26
  */
26
- export declare type ApiNoHistory = {
27
+ export type ApiNoHistory = {
27
28
  /**
28
29
  * Returns the drawing id of the current headless-session
29
30
  * @returns DrawingID
@@ -498,15 +499,15 @@ export declare class Solid {
498
499
  export declare class solid extends Solid {
499
500
  constructor();
500
501
  }
501
- declare type VID = ObjectID | Promise<ObjectID>;
502
- declare type VIDs = ObjectID[] | Promise<ObjectID[]>;
503
- declare type ID = Promise<ObjectID>;
504
- declare type IDs = Promise<ObjectID[]>;
505
- declare type Vec = number[] | THREE.Vector3 | THREE.Euler;
502
+ type VID = ObjectID | Promise<ObjectID>;
503
+ type VIDs = ObjectID[] | Promise<ObjectID[]>;
504
+ type ID = Promise<ObjectID>;
505
+ type IDs = Promise<ObjectID[]>;
506
+ type Vec = number[] | THREE.Vector3 | THREE.Euler;
506
507
  /**
507
508
  * Point definition where the fillet will be added with a specified radius.
508
509
  */
509
- export declare type FilletPoint = {
510
+ export type FilletPoint = {
510
511
  /** Point where the corner of the polyline will be. */
511
512
  point: Vector3;
512
513
  /** Radius of the fillet at the position of point. */
@@ -515,7 +516,7 @@ export declare type FilletPoint = {
515
516
  /**
516
517
  * Polyline of points and bulges. Bulges define the arc between the current and the next point.
517
518
  */
518
- export declare type Polyline = {
519
+ export type Polyline = {
519
520
  /** Points where the corners of the polyline will be. */
520
521
  points: Vector3[];
521
522
  /** Bulges which define the arcs. */
@@ -1,6 +1,6 @@
1
1
  import { ContainerGeometryT, MeshGeometry } from '@buerli.io/core';
2
2
  import { Color } from 'three';
3
- declare type ColorMeshMap = Record<string, {
3
+ type ColorMeshMap = Record<string, {
4
4
  meshes: MeshGeometry[];
5
5
  color: Color | undefined;
6
6
  opacity: number;
@@ -1,4 +1,4 @@
1
1
  import { SelectedItem } from '@buerli.io/core';
2
2
  declare type CustomSelect<T> = (resolve: (result: T) => Promise<T>, newItems: SelectedItem[], diff: SelectedItem[]) => void;
3
- export declare function waitForSelect<T>(length: number, filter: any, onChange: CustomSelect<T>): Promise<SelectedItem<any>[]>;
3
+ export declare function waitForSelect<T>(length: number, filter: any, onChange: CustomSelect<T>): Promise<SelectedItem[]>;
4
4
  export {};
package/package.json CHANGED
@@ -1,38 +1,42 @@
1
1
  {
2
2
  "name": "@buerli.io/headless",
3
- "version": "1.2.0",
3
+ "version": "2.0.0-beta.20261016085358",
4
4
  "description": "A non-manifold CAD workflow for the web",
5
5
  "author": "AWV Informatik AG <info@awv-informatik.ch>",
6
6
  "license": "ISC",
7
- "repository": {},
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/awv-informatik/buerli.git",
10
+ "directory": "packages/headless"
11
+ },
8
12
  "main": "build/cjs/index.js",
9
13
  "module": "build/esm/index.js",
10
14
  "types": "build/types/index.d.ts",
11
15
  "sideEffects": false,
12
16
  "scripts": {
13
- "ver": "yarn version --no-commit-hooks --no-git-tag-version --new-version",
14
17
  "prepack": "npm run clean && npm run build -- --sourceMap false && npm run build:cjs -- --sourceMap false",
15
18
  "clean": "rimraf ./build* && rimraf tsconfig.tsbuildinfo",
16
19
  "build": "tsc -v && tsc",
17
- "build:cjs": "tsc --target es2017 --module commonjs --composite false --declaration false --declarationDir null --outDir ./build/cjs",
20
+ "build:cjs": "tsc --target es2017 --module commonjs --moduleResolution node10 --ignoreDeprecations 6.0 --composite false --declaration false --declarationDir null --outDir ./build/cjs",
18
21
  "test": "echo no tests yet",
19
22
  "lint": "eslint \"./src/**/*.ts?(x)\"",
20
23
  "prettify": "prettier --write \"./{src,tests}/**/*.{js,jsx,ts,tsx,json}\""
21
24
  },
22
25
  "devDependencies": {
23
- "@types/three": "^0.152.1",
24
- "copyfiles": "^2.1.1",
25
- "rimraf": "^2.6.3",
26
- "three": "^0.153",
27
- "three-stdlib": "2.23.5",
28
- "typescript": "4.8.4"
26
+ "@types/three": "~0.184.1",
27
+ "copyfiles": "^2.4.1",
28
+ "rimraf": "^6.1.3",
29
+ "three": "~0.184.0",
30
+ "three-stdlib": "^2.36.1",
31
+ "typescript": "~6.0.3"
29
32
  },
30
33
  "peerDependencies": {
31
- "three": ">=0.138",
32
- "three-stdlib": ">=2.11.0"
34
+ "three": ">=0.170",
35
+ "three-stdlib": ">=2.30"
33
36
  },
34
37
  "dependencies": {
35
- "@buerli.io/classcad": "1.2.0",
36
- "flat-promise": "^1.0.3"
38
+ "@buerli.io/classcad": "2.0.0-beta.20261016085358",
39
+ "flat-promise": "^1.0.3",
40
+ "uuid": "^11.1.1"
37
41
  }
38
42
  }