@mlightcad/graphic-interface 3.11.0 → 3.11.1
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 +1 @@
|
|
|
1
|
-
(function(n,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("@mlightcad/geometry-engine")):typeof define=="function"&&define.amd?define(["exports","@mlightcad/geometry-engine"],_):(n=typeof globalThis<"u"?globalThis:n||self,_(n["graphic-interface"]={},n.geometryEngine))})(this,function(n,_){"use strict";var d=(t=>(t.ClosedFilled="",t.Dot="_DOT",t.DotSmall="_DOTSMALL",t.DotBlank="_DOTBLANK",t.Origin="_ORIGIN",t.Origin2="_ORIGIN2",t.Open="_OPEN",t.Open90="_OPEN90",t.Open30="_OPEN30",t.Closed="_CLOSED",t.Small="_SMALL",t.None="_NONE",t.Oblique="_OBLIQUE",t.BoxFilled="_BOXFILLED",t.Box="_BOXBLANK",t.ClosedBlank="_CLOSEDBLANK",t.DatumBlank="_DATUMBLANK",t.DatumFilled="_DATUMFILLED",t.Integral="_INTEGRAL",t.ArchTick="_ARCHTICK",t))(d||{}),h=(t=>(t[t.ByBlock=-2]="ByBlock",t[t.ByDIPs=-4]="ByDIPs",t[t.ByLayer=-1]="ByLayer",t[t.ByLineWeightDefault=-3]="ByLineWeightDefault",t[t.LineWeight000=0]="LineWeight000",t[t.LineWeight005=5]="LineWeight005",t[t.LineWeight009=9]="LineWeight009",t[t.LineWeight013=13]="LineWeight013",t[t.LineWeight015=15]="LineWeight015",t[t.LineWeight018=18]="LineWeight018",t[t.LineWeight020=20]="LineWeight020",t[t.LineWeight025=25]="LineWeight025",t[t.LineWeight030=30]="LineWeight030",t[t.LineWeight035=35]="LineWeight035",t[t.LineWeight040=40]="LineWeight040",t[t.LineWeight050=50]="LineWeight050",t[t.LineWeight053=53]="LineWeight053",t[t.LineWeight060=60]="LineWeight060",t[t.LineWeight070=70]="LineWeight070",t[t.LineWeight080=80]="LineWeight080",t[t.LineWeight090=90]="LineWeight090",t[t.LineWeight100=100]="LineWeight100",t[t.LineWeight106=106]="LineWeight106",t[t.LineWeight120=120]="LineWeight120",t[t.LineWeight140=140]="LineWeight140",t[t.LineWeight158=158]="LineWeight158",t[t.LineWeight200=200]="LineWeight200",t[t.LineWeight211=211]="LineWeight211",t))(h||{});class s{constructor(e={}){this.database=e.database,this.foregroundOnDark=e.foregroundOnDark??u,this.foregroundOnLight=e.foregroundOnLight??g,this.backgroundIsDark=e.backgroundIsDark??!0,this.fallbackRgb=e.fallbackRgb??16777215}resolveSubEntityTraitsRgb(e){const r=e.color;return r.isForeground?this.backgroundIsDark?this.foregroundOnDark:this.foregroundOnLight:r.isByLayer||r.isByBlock?this.fallbackRgb??16777215:r.RGB??this.fallbackRgb??16777215}static fromBackgroundColor(e=I,r){return new s({database:r,foregroundOnDark:u,foregroundOnLight:g,backgroundIsDark:!o(e),fallbackRgb:16777215})}}const I=0,u=16777215,g=0,l=16777215,R=128,L=new s({database:void 0,foregroundOnDark:u,foregroundOnLight:g,backgroundIsDark:!0,fallbackRgb:16777215});function o(t){const e=t>>16&255,r=t>>8&255,T=t&255;return .299*e+.587*r+.114*T>R}function H(t){const e=s.fromBackgroundColor(t);return e.backgroundIsDark?e.foregroundOnDark:e.foregroundOnLight}function b(t){return t?g:u}function f(t,e){return s.fromBackgroundColor(e).resolveSubEntityTraitsRgb(t)}var E=(t=>(t[t.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",t[t.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT",t[t.TOP_TO_BOTTOM=3]="TOP_TO_BOTTOM",t[t.BOTTOM_TO_TOP=4]="BOTTOM_TO_TOP",t[t.BY_STYLE=5]="BY_STYLE",t))(E||{}),D=(t=>(t[t.TopLeft=1]="TopLeft",t[t.TopCenter=2]="TopCenter",t[t.TopRight=3]="TopRight",t[t.MiddleLeft=4]="MiddleLeft",t[t.MiddleCenter=5]="MiddleCenter",t[t.MiddleRight=6]="MiddleRight",t[t.BottomLeft=7]="BottomLeft",t[t.BottomCenter=8]="BottomCenter",t[t.BottomRight=9]="BottomRight",t[t.BaselineLeft=10]="BaselineLeft",t[t.BaselineCenter=11]="BaselineCenter",t[t.BaselineRight=12]="BaselineRight",t))(D||{}),B=(t=>(t[t.OPTIMIZED_2D=0]="OPTIMIZED_2D",t[t.WIREFRAME=1]="WIREFRAME",t[t.HIDDEN_LINE=2]="HIDDEN_LINE",t[t.FLAT_SHADED=3]="FLAT_SHADED",t[t.GOURAUD_SHADED=4]="GOURAUD_SHADED",t[t.FLAT_SHADED_WITH_WIREFRAME=5]="FLAT_SHADED_WITH_WIREFRAME",t[t.GOURAUD_SHADED_WITH_WIREFRAME=6]="GOURAUD_SHADED_WITH_WIREFRAME",t))(B||{}),a=(t=>(t[t.NON_ORTHOGRAPHIC=0]="NON_ORTHOGRAPHIC",t[t.TOP=1]="TOP",t[t.BOTTOM=2]="BOTTOM",t[t.FRONT=3]="FRONT",t[t.BACK=4]="BACK",t[t.LEFT=5]="LEFT",t[t.RIGHT=6]="RIGHT",t))(a||{}),C=(t=>(t[t.ONE_DISTANT_LIGHT=0]="ONE_DISTANT_LIGHT",t[t.TWO_DISTANT_LIGHTS=1]="TWO_DISTANT_LIGHTS",t))(C||{});class O{constructor(){this._number=-1,this._id="",this._groupId="",this._centerPoint=new _.AcGePoint3d,this._height=0,this._width=0,this._viewCenter=new _.AcGePoint3d,this._viewHeight=0}get number(){return this._number}set number(e){this._number=e}get id(){return this._id}set id(e){this._id=e}get groupId(){return this._groupId}set groupId(e){this._groupId=e}get centerPoint(){return this._centerPoint}set centerPoint(e){this._centerPoint.copy(e)}get height(){return this._height}set height(e){this._height=e}get width(){return this._width}set width(e){this._width=e}get box(){const e=new _.AcGeBox2d;return e.setFromCenterAndSize(this.centerPoint,{x:this.width,y:this.height}),e}get viewCenter(){return this._viewCenter}set viewCenter(e){this._viewCenter.copy(e)}get viewHeight(){return this._viewHeight}set viewHeight(e){this._viewHeight=e}get viewWidth(){return this.viewHeight*(this.width/this.height)}get viewBox(){const e=new _.AcGeBox2d;return e.setFromCenterAndSize(this.viewCenter,{x:this.viewWidth,y:this.viewHeight}),e}clone(){const e=new O;return e.id=this.id,e.groupId=this.groupId,e.number=this.number,e.centerPoint.copy(this.centerPoint),e.height=this.height,e.width=this.width,e.viewCenter.copy(this.viewCenter),e.viewHeight=this.viewHeight,e}copy(e){return this.id=e.id,this.groupId=e.groupId,this.number=e.number,this.centerPoint.copy(e.centerPoint),this.height=e.height,this.width=e.width,this.viewCenter.copy(e.viewCenter),this.viewHeight=e.viewHeight,this}}n.ACGI_DARK_THEME_FOREGROUND=u,n.ACGI_LIGHT_THEME_FOREGROUND=g,n.ACGI_MODEL_SPACE_BACKGROUND=I,n.ACGI_PAPER_SPACE_BACKGROUND=l,n.AcGiArrowType=d,n.AcGiContext=s,n.AcGiDefaultLightingType=C,n.AcGiLineWeight=h,n.AcGiMTextAttachmentPoint=D,n.AcGiMTextFlowDirection=E,n.AcGiOrthographicType=a,n.AcGiRenderMode=B,n.AcGiViewport=O,n.DEFAULT_ACGI_CONTEXT=L,n.acgiContrastingForegroundColor=b,n.acgiForegroundColorForBackground=H,n.acgiIsLightBackground=o,n.acgiResolveSubEntityTraitsRgbFromBackground=f,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(n,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("@mlightcad/geometry-engine")):typeof define=="function"&&define.amd?define(["exports","@mlightcad/geometry-engine"],_):(n=typeof globalThis<"u"?globalThis:n||self,_(n["graphic-interface"]={},n.geometryEngine))})(this,(function(n,_){"use strict";var d=(t=>(t.ClosedFilled="",t.Dot="_DOT",t.DotSmall="_DOTSMALL",t.DotBlank="_DOTBLANK",t.Origin="_ORIGIN",t.Origin2="_ORIGIN2",t.Open="_OPEN",t.Open90="_OPEN90",t.Open30="_OPEN30",t.Closed="_CLOSED",t.Small="_SMALL",t.None="_NONE",t.Oblique="_OBLIQUE",t.BoxFilled="_BOXFILLED",t.Box="_BOXBLANK",t.ClosedBlank="_CLOSEDBLANK",t.DatumBlank="_DATUMBLANK",t.DatumFilled="_DATUMFILLED",t.Integral="_INTEGRAL",t.ArchTick="_ARCHTICK",t))(d||{}),h=(t=>(t[t.ByBlock=-2]="ByBlock",t[t.ByDIPs=-4]="ByDIPs",t[t.ByLayer=-1]="ByLayer",t[t.ByLineWeightDefault=-3]="ByLineWeightDefault",t[t.LineWeight000=0]="LineWeight000",t[t.LineWeight005=5]="LineWeight005",t[t.LineWeight009=9]="LineWeight009",t[t.LineWeight013=13]="LineWeight013",t[t.LineWeight015=15]="LineWeight015",t[t.LineWeight018=18]="LineWeight018",t[t.LineWeight020=20]="LineWeight020",t[t.LineWeight025=25]="LineWeight025",t[t.LineWeight030=30]="LineWeight030",t[t.LineWeight035=35]="LineWeight035",t[t.LineWeight040=40]="LineWeight040",t[t.LineWeight050=50]="LineWeight050",t[t.LineWeight053=53]="LineWeight053",t[t.LineWeight060=60]="LineWeight060",t[t.LineWeight070=70]="LineWeight070",t[t.LineWeight080=80]="LineWeight080",t[t.LineWeight090=90]="LineWeight090",t[t.LineWeight100=100]="LineWeight100",t[t.LineWeight106=106]="LineWeight106",t[t.LineWeight120=120]="LineWeight120",t[t.LineWeight140=140]="LineWeight140",t[t.LineWeight158=158]="LineWeight158",t[t.LineWeight200=200]="LineWeight200",t[t.LineWeight211=211]="LineWeight211",t))(h||{});class s{constructor(e={}){this.database=e.database,this.foregroundOnDark=e.foregroundOnDark??u,this.foregroundOnLight=e.foregroundOnLight??g,this.backgroundIsDark=e.backgroundIsDark??!0,this.fallbackRgb=e.fallbackRgb??16777215}resolveSubEntityTraitsRgb(e){const r=e.color;return r.isForeground?this.backgroundIsDark?this.foregroundOnDark:this.foregroundOnLight:r.isByLayer||r.isByBlock?this.fallbackRgb??16777215:r.RGB??this.fallbackRgb??16777215}static fromBackgroundColor(e=I,r){return new s({database:r,foregroundOnDark:u,foregroundOnLight:g,backgroundIsDark:!o(e),fallbackRgb:16777215})}}const I=0,u=16777215,g=0,l=16777215,R=128,L=new s({database:void 0,foregroundOnDark:u,foregroundOnLight:g,backgroundIsDark:!0,fallbackRgb:16777215});function o(t){const e=t>>16&255,r=t>>8&255,T=t&255;return .299*e+.587*r+.114*T>R}function H(t){const e=s.fromBackgroundColor(t);return e.backgroundIsDark?e.foregroundOnDark:e.foregroundOnLight}function b(t){return t?g:u}function f(t,e){return s.fromBackgroundColor(e).resolveSubEntityTraitsRgb(t)}var E=(t=>(t[t.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",t[t.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT",t[t.TOP_TO_BOTTOM=3]="TOP_TO_BOTTOM",t[t.BOTTOM_TO_TOP=4]="BOTTOM_TO_TOP",t[t.BY_STYLE=5]="BY_STYLE",t))(E||{}),D=(t=>(t[t.TopLeft=1]="TopLeft",t[t.TopCenter=2]="TopCenter",t[t.TopRight=3]="TopRight",t[t.MiddleLeft=4]="MiddleLeft",t[t.MiddleCenter=5]="MiddleCenter",t[t.MiddleRight=6]="MiddleRight",t[t.BottomLeft=7]="BottomLeft",t[t.BottomCenter=8]="BottomCenter",t[t.BottomRight=9]="BottomRight",t[t.BaselineLeft=10]="BaselineLeft",t[t.BaselineCenter=11]="BaselineCenter",t[t.BaselineRight=12]="BaselineRight",t))(D||{}),B=(t=>(t[t.OPTIMIZED_2D=0]="OPTIMIZED_2D",t[t.WIREFRAME=1]="WIREFRAME",t[t.HIDDEN_LINE=2]="HIDDEN_LINE",t[t.FLAT_SHADED=3]="FLAT_SHADED",t[t.GOURAUD_SHADED=4]="GOURAUD_SHADED",t[t.FLAT_SHADED_WITH_WIREFRAME=5]="FLAT_SHADED_WITH_WIREFRAME",t[t.GOURAUD_SHADED_WITH_WIREFRAME=6]="GOURAUD_SHADED_WITH_WIREFRAME",t))(B||{}),a=(t=>(t[t.NON_ORTHOGRAPHIC=0]="NON_ORTHOGRAPHIC",t[t.TOP=1]="TOP",t[t.BOTTOM=2]="BOTTOM",t[t.FRONT=3]="FRONT",t[t.BACK=4]="BACK",t[t.LEFT=5]="LEFT",t[t.RIGHT=6]="RIGHT",t))(a||{}),C=(t=>(t[t.ONE_DISTANT_LIGHT=0]="ONE_DISTANT_LIGHT",t[t.TWO_DISTANT_LIGHTS=1]="TWO_DISTANT_LIGHTS",t))(C||{});class O{constructor(){this._number=-1,this._id="",this._groupId="",this._centerPoint=new _.AcGePoint3d,this._height=0,this._width=0,this._viewCenter=new _.AcGePoint3d,this._viewHeight=0}get number(){return this._number}set number(e){this._number=e}get id(){return this._id}set id(e){this._id=e}get groupId(){return this._groupId}set groupId(e){this._groupId=e}get centerPoint(){return this._centerPoint}set centerPoint(e){this._centerPoint.copy(e)}get height(){return this._height}set height(e){this._height=e}get width(){return this._width}set width(e){this._width=e}get box(){const e=new _.AcGeBox2d;return e.setFromCenterAndSize(this.centerPoint,{x:this.width,y:this.height}),e}get viewCenter(){return this._viewCenter}set viewCenter(e){this._viewCenter.copy(e)}get viewHeight(){return this._viewHeight}set viewHeight(e){this._viewHeight=e}get viewWidth(){return this.viewHeight*(this.width/this.height)}get viewBox(){const e=new _.AcGeBox2d;return e.setFromCenterAndSize(this.viewCenter,{x:this.viewWidth,y:this.viewHeight}),e}clone(){const e=new O;return e.id=this.id,e.groupId=this.groupId,e.number=this.number,e.centerPoint.copy(this.centerPoint),e.height=this.height,e.width=this.width,e.viewCenter.copy(this.viewCenter),e.viewHeight=this.viewHeight,e}copy(e){return this.id=e.id,this.groupId=e.groupId,this.number=e.number,this.centerPoint.copy(e.centerPoint),this.height=e.height,this.width=e.width,this.viewCenter.copy(e.viewCenter),this.viewHeight=e.viewHeight,this}}n.ACGI_DARK_THEME_FOREGROUND=u,n.ACGI_LIGHT_THEME_FOREGROUND=g,n.ACGI_MODEL_SPACE_BACKGROUND=I,n.ACGI_PAPER_SPACE_BACKGROUND=l,n.AcGiArrowType=d,n.AcGiContext=s,n.AcGiDefaultLightingType=C,n.AcGiLineWeight=h,n.AcGiMTextAttachmentPoint=D,n.AcGiMTextFlowDirection=E,n.AcGiOrthographicType=a,n.AcGiRenderMode=B,n.AcGiViewport=O,n.DEFAULT_ACGI_CONTEXT=L,n.acgiContrastingForegroundColor=b,n.acgiForegroundColorForBackground=H,n.acgiIsLightBackground=o,n.acgiResolveSubEntityTraitsRgbFromBackground=f,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlightcad/graphic-interface",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"require": "./dist/graphic-interface.umd.cjs"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@mlightcad/common": "1.11.
|
|
37
|
-
"@mlightcad/geometry-engine": "3.11.
|
|
36
|
+
"@mlightcad/common": "1.11.1",
|
|
37
|
+
"@mlightcad/geometry-engine": "3.11.1"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"clean": "rimraf dist lib tsconfig.tsbuildinfo",
|