@nanoforge-dev/graphics-2d 1.0.3 → 1.3.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.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -92
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +62 -92
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +8 -6
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("@nanoforge-dev/common"),l=require("konva");l=s(l,1);const u=l.default.Animation,d=l.default.Arc,f=l.default.Arrow,p=l.default.Canvas,ee=l.default.Circle,m=l.default.Container,h=l.default.Context,g=l.default.DD,_=l.default.Easings,v=l.default.Ellipse,y=l.default.FastLayer,b=l.default.Filters,x=l.default.Group,S=l.default.Image,C=l.default.Label,w=l.default.Layer,T=l.default.Line,E=l.default.Node,D=l.default.Path,O=l.default.Rect,k=l.default.RegularPolygon,A=l.default.Ring,j=l.default.Shape,M=l.default.Sprite,N=l.default.Stage,P=l.default.Star,F=l.default.Tag,I=l.default.Text,L=l.default.TextPath,R=l.default.Transform,z=l.default.Transformer,B=l.default.Tween,V=l.default.Util,H=l.default.Wedge,U=l.default._global,W=l.default._injectGlobal,G=l.default._mouseDblClickPointerId,K=l.default._mouseInDblClickWindow,q=l.default._mouseListenClick,J=l.default._pointerDblClickPointerId,Y=l.default._pointerInDblClickWindow,te=l.default._pointerListenClick,X=l.default._renderBackend,Z=l.default._touchDblClickPointerId,Q=l.default._touchInDblClickWindow,ne=l.default._touchListenClick,re=l.default.angleDeg,ie=l.default.autoDrawEnabled,ae=l.default.capturePointerEventsEnabled,oe=l.default.dblClickWindow,se=l.default.document,ce=l.default.dragButtons,le=l.default.dragDistance,ue=l.default.enableTrace,de=l.default.getAngle,fe=l.default.hitOnDragEnabled,pe=l.default.isBrowser,me=l.default.isDragReady,he=l.default.isDragging,ge=l.default.isTransforming,_e=l.default.isUnminified,ve=l.default.legacyTextRendering,ye=l.default.pixelRatio,be=l.default.pointerEventsEnabled,$=l.default.releaseCanvasOnDestroy,xe=l.default.shapes,Se=l.default.showWarnings,Ce=l.default.stages,we=l.default.version;var Te=class extends c.BaseGraphicsLibrary{_stage;_baseLayer;get __name(){return`Graphics2DLibrary`}get stage(){return this._stage||this.throwNotInitializedError(),this._stage}get baseLayer(){return this._baseLayer||this.throwNotInitializedError(),this._baseLayer}async __init(e){if(!e.container)throw Error(`Can't initialize the container context`);this._stage=new N({container:e.container,width:e.container.offsetWidth,height:e.container.offsetHeight}),this._baseLayer=new w,this._stage.add(this._baseLayer)}async __run(){}};exports.Animation=u,exports.Arc=d,exports.Arrow=f,exports.Canvas=p,exports.Circle=ee,exports.Container=m,exports.Context=h,exports.DD=g,exports.Easings=_,exports.Ellipse=v,exports.FastLayer=y,exports.Filters=b,exports.Graphics2DLibrary=Te,exports.Group=x,exports.Image=S,exports.Label=C,exports.Layer=w,exports.Line=T,exports.Node=E,exports.Path=D,exports.Rect=O,exports.RegularPolygon=k,exports.Ring=A,exports.Shape=j,exports.Sprite=M,exports.Stage=N,exports.Star=P,exports.Tag=F,exports.Text=I,exports.TextPath=L,exports.Transform=R,exports.Transformer=z,exports.Tween=B,exports.Util=V,exports.Wedge=H,exports._global=U,exports._injectGlobal=W,exports._mouseDblClickPointerId=G,exports._mouseInDblClickWindow=K,exports._mouseListenClick=q,exports._pointerDblClickPointerId=J,exports._pointerInDblClickWindow=Y,exports._pointerListenClick=te,exports._renderBackend=X,exports._touchDblClickPointerId=Z,exports._touchInDblClickWindow=Q,exports._touchListenClick=ne,exports.angleDeg=re,exports.autoDrawEnabled=ie,exports.capturePointerEventsEnabled=ae,exports.dblClickWindow=oe,exports.document=se,exports.dragButtons=ce,exports.dragDistance=le,exports.enableTrace=ue,exports.getAngle=de,exports.hitOnDragEnabled=fe,exports.isBrowser=pe,exports.isDragReady=me,exports.isDragging=he,exports.isTransforming=ge,exports.isUnminified=_e,exports.legacyTextRendering=ve,exports.pixelRatio=ye,exports.pointerEventsEnabled=be,exports.releaseCanvasOnDestroy=$,exports.shapes=xe,exports.showWarnings=Se,exports.stages=Ce,exports.version=we;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["Konva","BaseGraphicsLibrary","Graphics.Stage","Graphics.Layer"],"sources":["../src/exports/konva.ts","../src/graphics-2d.library.ts"],"sourcesContent":["import Konva from \"konva\";\n\nexport const Animation = Konva.Animation;\nexport type Animation = Konva.Animation;\n\nexport const Arc = Konva.Arc;\nexport type Arc = Konva.Arc;\n\nexport type ArcConfig = Konva.ArcConfig;\n\nexport const Arrow = Konva.Arrow;\nexport type Arrow = Konva.Arrow;\n\nexport type ArrowConfig = Konva.ArrowConfig;\n\nexport const Canvas = Konva.Canvas;\nexport type Canvas = typeof Konva.Canvas;\n\nexport const Circle = Konva.Circle;\nexport type Circle = Konva.Circle;\n\nexport type CircleConfig = Konva.CircleConfig;\n\nexport const Container = Konva.Container;\nexport type Container = Konva.Container;\n\nexport type ContainerConfig = Konva.ContainerConfig;\n\nexport const Context = Konva.Context;\nexport type Context = Konva.Context;\n\nexport const DD = Konva.DD;\nexport type DD = typeof Konva.DD;\n\nexport const Easings = Konva.Easings;\nexport type Easings = typeof Konva.Easings;\n\nexport const Ellipse = Konva.Ellipse;\nexport type Ellipse = Konva.Ellipse;\n\nexport type EllipseConfig = Konva.EllipseConfig;\n\nexport const FastLayer = Konva.FastLayer;\nexport type FastLayer = Konva.FastLayer;\n\nexport const Filters = Konva.Filters;\nexport type Filters = typeof Konva.Filters;\n\nexport const Group = Konva.Group;\nexport type Group = Konva.Group;\n\nexport type GroupConfig = Konva.GroupConfig;\n\nexport const Image = Konva.Image;\nexport type Image = Konva.Image;\n\nexport type ImageConfig = Konva.ImageConfig;\n\nexport type KonvaEventListener<This, EventType> = Konva.KonvaEventListener<This, EventType>;\n\nexport type KonvaEventObject<EventType> = Konva.KonvaEventObject<EventType>;\n\nexport type KonvaPointerEvent = Konva.KonvaPointerEvent;\n\nexport const Label = Konva.Label;\nexport type Label = Konva.Label;\n\nexport type LabelConfig = Konva.LabelConfig;\n\nexport const Layer = Konva.Layer;\nexport type Layer = Konva.Layer;\n\nexport type LayerConfig = Konva.LayerConfig;\n\nexport const Line = Konva.Line;\nexport type Line = Konva.Line;\n\nexport type LineConfig = Konva.LineConfig;\n\nexport const Node = Konva.Node;\nexport type Node = Konva.Node;\n\nexport type NodeConfig = Konva.NodeConfig;\n\nexport const Path = Konva.Path;\nexport type Path = Konva.Path;\n\nexport type PathConfig = Konva.PathConfig;\n\nexport const Rect = Konva.Rect;\nexport type Rect = Konva.Rect;\n\nexport type RectConfig = Konva.RectConfig;\n\nexport const RegularPolygon = Konva.RegularPolygon;\nexport type RegularPolygon = Konva.RegularPolygon;\n\nexport type RegularPolygonConfig = Konva.RegularPolygonConfig;\n\nexport const Ring = Konva.Ring;\nexport type Ring = Konva.Ring;\n\nexport type RingConfig = Konva.RingConfig;\n\nexport const Shape = Konva.Shape;\nexport type Shape = Konva.Shape;\n\nexport type ShapeConfig = Konva.ShapeConfig;\n\nexport const Sprite = Konva.Sprite;\nexport type Sprite = Konva.Sprite;\n\nexport type SpriteConfig = Konva.SpriteConfig;\n\nexport const Stage = Konva.Stage;\nexport type Stage = Konva.Stage;\n\nexport type StageConfig = Konva.StageConfig;\n\nexport const Star = Konva.Star;\nexport type Star = Konva.Star;\n\nexport type StarConfig = Konva.StarConfig;\n\nexport const Tag = Konva.Tag;\nexport type Tag = Konva.Tag;\n\nexport type TagConfig = Konva.TagConfig;\n\nexport const Text = Konva.Text;\nexport type Text = Konva.Text;\n\nexport type TextConfig = Konva.TextConfig;\n\nexport const TextPath = Konva.TextPath;\nexport type TextPath = Konva.TextPath;\n\nexport type TextPathConfig = Konva.TextPathConfig;\n\nexport const Transform = Konva.Transform;\nexport type Transform = Konva.Transform;\n\nexport const Transformer = Konva.Transformer;\nexport type Transformer = Konva.Transformer;\n\nexport type TransformerConfig = Konva.TransformerConfig;\n\nexport const Tween = Konva.Tween;\nexport type Tween = Konva.Tween;\n\nexport type TweenConfig = Konva.TweenConfig;\n\nexport const Util = Konva.Util;\nexport type Util = typeof Konva.Util;\n\nexport type Vector2d = Konva.Vector2d;\n\nexport const Wedge = Konva.Wedge;\nexport type Wedge = Konva.Wedge;\n\nexport type WedgeConfig = Konva.WedgeConfig;\n\nexport const _global = Konva._global;\n\nexport const _injectGlobal = Konva._injectGlobal;\n\nexport const _mouseDblClickPointerId = Konva._mouseDblClickPointerId;\n\nexport const _mouseInDblClickWindow = Konva._mouseInDblClickWindow;\n\nexport const _mouseListenClick = Konva._mouseListenClick;\n\nexport const _pointerDblClickPointerId = Konva._pointerDblClickPointerId;\n\nexport const _pointerInDblClickWindow = Konva._pointerInDblClickWindow;\n\nexport const _pointerListenClick = Konva._pointerListenClick;\n\nexport const _renderBackend = Konva._renderBackend;\n\nexport const _touchDblClickPointerId = Konva._touchDblClickPointerId;\n\nexport const _touchInDblClickWindow = Konva._touchInDblClickWindow;\n\nexport const _touchListenClick = Konva._touchListenClick;\n\nexport const angleDeg = Konva.angleDeg;\n\nexport const autoDrawEnabled = Konva.autoDrawEnabled;\n\nexport const capturePointerEventsEnabled = Konva.capturePointerEventsEnabled;\n\nexport const dblClickWindow = Konva.dblClickWindow;\n\nexport const document = Konva.document;\n\nexport const dragButtons = Konva.dragButtons;\n\nexport const dragDistance = Konva.dragDistance;\n\nexport const enableTrace = Konva.enableTrace;\n\nexport const getAngle = Konva.getAngle;\n\nexport const hitOnDragEnabled = Konva.hitOnDragEnabled;\n\nexport const isBrowser = Konva.isBrowser;\n\nexport const isDragReady = Konva.isDragReady;\n\nexport const isDragging = Konva.isDragging;\n\nexport const isTransforming = Konva.isTransforming;\n\nexport const isUnminified = Konva.isUnminified;\n\nexport const legacyTextRendering = Konva.legacyTextRendering;\n\nexport const pixelRatio = Konva.pixelRatio;\n\nexport const pointerEventsEnabled = Konva.pointerEventsEnabled;\n\nexport const releaseCanvasOnDestroy = Konva.releaseCanvasOnDestroy;\n\nexport const shapes = Konva.shapes;\n\nexport const showWarnings = Konva.showWarnings;\n\nexport const stages = Konva.stages;\n\nexport const version = Konva.version;\n","import { BaseGraphicsLibrary, type InitContext } from \"@nanoforge-dev/common\";\n\nimport * as Graphics from \"./exports/konva\";\n\nexport class Graphics2DLibrary extends BaseGraphicsLibrary {\n private _stage?: Graphics.Stage;\n private _baseLayer?: Graphics.Layer;\n\n get __name(): string {\n return \"Graphics2DLibrary\";\n }\n\n get stage(): Graphics.Stage {\n if (!this._stage) this.throwNotInitializedError();\n return this._stage;\n }\n\n get baseLayer(): Graphics.Layer {\n if (!this._baseLayer) this.throwNotInitializedError();\n return this._baseLayer;\n }\n\n public override async __init(context: InitContext): Promise<void> {\n if (!context.container) {\n throw new Error(\"Can't initialize the container context\");\n }\n this._stage = new Graphics.Stage({\n container: context.container,\n width: context.container.offsetWidth,\n height: context.container.offsetHeight,\n });\n this._baseLayer = new Graphics.Layer();\n this._stage.add(this._baseLayer);\n }\n\n public async __run(): Promise<void> {}\n}\n"],"mappings":"omBAEA,MAAa,EAAYA,EAAAA,QAAM,UAGlB,EAAMA,EAAAA,QAAM,IAKZ,EAAQA,EAAAA,QAAM,MAKd,EAASA,EAAAA,QAAM,OAGf,GAASA,EAAAA,QAAM,OAKf,EAAYA,EAAAA,QAAM,UAKlB,EAAUA,EAAAA,QAAM,QAGhB,EAAKA,EAAAA,QAAM,GAGX,EAAUA,EAAAA,QAAM,QAGhB,EAAUA,EAAAA,QAAM,QAKhB,EAAYA,EAAAA,QAAM,UAGlB,EAAUA,EAAAA,QAAM,QAGhB,EAAQA,EAAAA,QAAM,MAKd,EAAQA,EAAAA,QAAM,MAWd,EAAQA,EAAAA,QAAM,MAKd,EAAQA,EAAAA,QAAM,MAKd,EAAOA,EAAAA,QAAM,KAKb,EAAOA,EAAAA,QAAM,KAKb,EAAOA,EAAAA,QAAM,KAKb,EAAOA,EAAAA,QAAM,KAKb,EAAiBA,EAAAA,QAAM,eAKvB,EAAOA,EAAAA,QAAM,KAKb,EAAQA,EAAAA,QAAM,MAKd,EAASA,EAAAA,QAAM,OAKf,EAAQA,EAAAA,QAAM,MAKd,EAAOA,EAAAA,QAAM,KAKb,EAAMA,EAAAA,QAAM,IAKZ,EAAOA,EAAAA,QAAM,KAKb,EAAWA,EAAAA,QAAM,SAKjB,EAAYA,EAAAA,QAAM,UAGlB,EAAcA,EAAAA,QAAM,YAKpB,EAAQA,EAAAA,QAAM,MAKd,EAAOA,EAAAA,Q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"sourcesContent":["import Konva from \"konva\";\n\nexport const Animation = Konva.Animation;\nexport type Animation = Konva.Animation;\n\nexport const Arc = Konva.Arc;\nexport type Arc = Konva.Arc;\n\nexport type ArcConfig = Konva.ArcConfig;\n\nexport const Arrow = Konva.Arrow;\nexport type Arrow = Konva.Arrow;\n\nexport type ArrowConfig = Konva.ArrowConfig;\n\nexport const Canvas = Konva.Canvas;\nexport type Canvas = typeof Konva.Canvas;\n\nexport const Circle = Konva.Circle;\nexport type Circle = Konva.Circle;\n\nexport type CircleConfig = Konva.CircleConfig;\n\nexport const Container = Konva.Container;\nexport type Container = Konva.Container;\n\nexport type ContainerConfig = Konva.ContainerConfig;\n\nexport const Context = Konva.Context;\nexport type Context = Konva.Context;\n\nexport const DD = Konva.DD;\nexport type DD = typeof Konva.DD;\n\nexport const Easings = Konva.Easings;\nexport type Easings = typeof Konva.Easings;\n\nexport const Ellipse = Konva.Ellipse;\nexport type Ellipse = Konva.Ellipse;\n\nexport type EllipseConfig = Konva.EllipseConfig;\n\nexport const FastLayer = Konva.FastLayer;\nexport type FastLayer = Konva.FastLayer;\n\nexport const Filters = Konva.Filters;\nexport type Filters = typeof Konva.Filters;\n\nexport const Group = Konva.Group;\nexport type Group = Konva.Group;\n\nexport type GroupConfig = Konva.GroupConfig;\n\nexport const Image = Konva.Image;\nexport type Image = Konva.Image;\n\nexport type ImageConfig = Konva.ImageConfig;\n\nexport type KonvaEventListener<This, EventType> = Konva.KonvaEventListener<This, EventType>;\n\nexport type KonvaEventObject<EventType> = Konva.KonvaEventObject<EventType>;\n\nexport type KonvaPointerEvent = Konva.KonvaPointerEvent;\n\nexport const Label = Konva.Label;\nexport type Label = Konva.Label;\n\nexport type LabelConfig = Konva.LabelConfig;\n\nexport const Layer = Konva.Layer;\nexport type Layer = Konva.Layer;\n\nexport type LayerConfig = Konva.LayerConfig;\n\nexport const Line = Konva.Line;\nexport type Line = Konva.Line;\n\nexport type LineConfig = Konva.LineConfig;\n\nexport const Node = Konva.Node;\nexport type Node = Konva.Node;\n\nexport type NodeConfig = Konva.NodeConfig;\n\nexport const Path = Konva.Path;\nexport type Path = Konva.Path;\n\nexport type PathConfig = Konva.PathConfig;\n\nexport const Rect = Konva.Rect;\nexport type Rect = Konva.Rect;\n\nexport type RectConfig = Konva.RectConfig;\n\nexport const RegularPolygon = Konva.RegularPolygon;\nexport type RegularPolygon = Konva.RegularPolygon;\n\nexport type RegularPolygonConfig = Konva.RegularPolygonConfig;\n\nexport const Ring = Konva.Ring;\nexport type Ring = Konva.Ring;\n\nexport type RingConfig = Konva.RingConfig;\n\nexport const Shape = Konva.Shape;\nexport type Shape = Konva.Shape;\n\nexport type ShapeConfig = Konva.ShapeConfig;\n\nexport const Sprite = Konva.Sprite;\nexport type Sprite = Konva.Sprite;\n\nexport type SpriteConfig = Konva.SpriteConfig;\n\nexport const Stage = Konva.Stage;\nexport type Stage = Konva.Stage;\n\nexport type StageConfig = Konva.StageConfig;\n\nexport const Star = Konva.Star;\nexport type Star = Konva.Star;\n\nexport type StarConfig = Konva.StarConfig;\n\nexport const Tag = Konva.Tag;\nexport type Tag = Konva.Tag;\n\nexport type TagConfig = Konva.TagConfig;\n\nexport const Text = Konva.Text;\nexport type Text = Konva.Text;\n\nexport type TextConfig = Konva.TextConfig;\n\nexport const TextPath = Konva.TextPath;\nexport type TextPath = Konva.TextPath;\n\nexport type TextPathConfig = Konva.TextPathConfig;\n\nexport const Transform = Konva.Transform;\nexport type Transform = Konva.Transform;\n\nexport const Transformer = Konva.Transformer;\nexport type Transformer = Konva.Transformer;\n\nexport type TransformerConfig = Konva.TransformerConfig;\n\nexport const Tween = Konva.Tween;\nexport type Tween = Konva.Tween;\n\nexport type TweenConfig = Konva.TweenConfig;\n\nexport const Util = Konva.Util;\nexport type Util = typeof Konva.Util;\n\nexport type Vector2d = Konva.Vector2d;\n\nexport const Wedge = Konva.Wedge;\nexport type Wedge = Konva.Wedge;\n\nexport type WedgeConfig = Konva.WedgeConfig;\n\nexport const _global = Konva._global;\n\nexport const _injectGlobal = Konva._injectGlobal;\n\nexport const _mouseDblClickPointerId = Konva._mouseDblClickPointerId;\n\nexport const _mouseInDblClickWindow = Konva._mouseInDblClickWindow;\n\nexport const _mouseListenClick = Konva._mouseListenClick;\n\nexport const _pointerDblClickPointerId = Konva._pointerDblClickPointerId;\n\nexport const _pointerInDblClickWindow = Konva._pointerInDblClickWindow;\n\nexport const _pointerListenClick = Konva._pointerListenClick;\n\nexport const _renderBackend = Konva._renderBackend;\n\nexport const _touchDblClickPointerId = Konva._touchDblClickPointerId;\n\nexport const _touchInDblClickWindow = Konva._touchInDblClickWindow;\n\nexport const _touchListenClick = Konva._touchListenClick;\n\nexport const angleDeg = Konva.angleDeg;\n\nexport const autoDrawEnabled = Konva.autoDrawEnabled;\n\nexport const capturePointerEventsEnabled = Konva.capturePointerEventsEnabled;\n\nexport const dblClickWindow = Konva.dblClickWindow;\n\nexport const document = Konva.document;\n\nexport const dragButtons = Konva.dragButtons;\n\nexport const dragDistance = Konva.dragDistance;\n\nexport const enableTrace = Konva.enableTrace;\n\nexport const getAngle = Konva.getAngle;\n\nexport const hitOnDragEnabled = Konva.hitOnDragEnabled;\n\nexport const isBrowser = Konva.isBrowser;\n\nexport const isDragReady = Konva.isDragReady;\n\nexport const isDragging = Konva.isDragging;\n\nexport const isTransforming = Konva.isTransforming;\n\nexport const isUnminified = Konva.isUnminified;\n\nexport const legacyTextRendering = Konva.legacyTextRendering;\n\nexport const pixelRatio = Konva.pixelRatio;\n\nexport const pointerEventsEnabled = Konva.pointerEventsEnabled;\n\nexport const releaseCanvasOnDestroy = Konva.releaseCanvasOnDestroy;\n\nexport const shapes = Konva.shapes;\n\nexport const showWarnings = Konva.showWarnings;\n\nexport const stages = Konva.stages;\n\nexport const version = Konva.version;\n","import { BaseGraphicsLibrary, type InitContext } from \"@nanoforge-dev/common\";\n\nimport * as Graphics from \"./exports/konva\";\n\nexport class Graphics2DLibrary extends BaseGraphicsLibrary {\n private _stage?: Graphics.Stage;\n private _baseLayer?: Graphics.Layer;\n\n get __name(): string {\n return \"Graphics2DLibrary\";\n }\n\n get stage(): Graphics.Stage {\n if (!this._stage) this.throwNotInitializedError();\n return this._stage;\n }\n\n get baseLayer(): Graphics.Layer {\n if (!this._baseLayer) this.throwNotInitializedError();\n return this._baseLayer;\n }\n\n public override async __init(context: InitContext): Promise<void> {\n if (!context.container) {\n throw new Error(\"Can't initialize the container context\");\n }\n this._stage = new Graphics.Stage({\n container: context.container,\n width: context.container.offsetWidth,\n height: context.container.offsetHeight,\n });\n this._baseLayer = new Graphics.Layer();\n this._stage.add(this._baseLayer);\n }\n\n public async __run(): Promise<void> {}\n}\n"],"mappings":"omBAEA,MAAa,EAAYA,EAAAA,QAAM,UAGlB,EAAMA,EAAAA,QAAM,IAKZ,EAAQA,EAAAA,QAAM,MAKd,EAASA,EAAAA,QAAM,OAGf,GAASA,EAAAA,QAAM,OAKf,EAAYA,EAAAA,QAAM,UAKlB,EAAUA,EAAAA,QAAM,QAGhB,EAAKA,EAAAA,QAAM,GAGX,EAAUA,EAAAA,QAAM,QAGhB,EAAUA,EAAAA,QAAM,QAKhB,EAAYA,EAAAA,QAAM,UAGlB,EAAUA,EAAAA,QAAM,QAGhB,EAAQA,EAAAA,QAAM,MAKd,EAAQA,EAAAA,QAAM,MAWd,EAAQA,EAAAA,QAAM,MAKd,EAAQA,EAAAA,QAAM,MAKd,EAAOA,EAAAA,QAAM,KAKb,EAAOA,EAAAA,QAAM,KAKb,EAAOA,EAAAA,QAAM,KAKb,EAAOA,EAAAA,QAAM,KAKb,EAAiBA,EAAAA,QAAM,eAKvB,EAAOA,EAAAA,QAAM,KAKb,EAAQA,EAAAA,QAAM,MAKd,EAASA,EAAAA,QAAM,OAKf,EAAQA,EAAAA,QAAM,MAKd,EAAOA,EAAAA,QAAM,KAKb,EAAMA,EAAAA,QAAM,IAKZ,EAAOA,EAAAA,QAAM,KAKb,EAAWA,EAAAA,QAAM,SAKjB,EAAYA,EAAA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ADK,KAAK,QAAQ,KAAK,yBAAyB,EACzC,KAAK,MACd,CAEA,IAAI,WAA4B,CAE9B,OADK,KAAK,YAAY,KAAK,yBAAyB,EAC7C,KAAK,UACd,CAEA,MAAsB,OAAO,EAAqC,CAChE,GAAI,CAAC,EAAQ,UACX,MAAU,MAAM,wCAAwC,EAE1D,KAAK,OAAS,IAAIC,EAAe,CAC/B,UAAW,EAAQ,UACnB,MAAO,EAAQ,UAAU,YACzB,OAAQ,EAAQ,UAAU,YAC5B,CAAC,EACD,KAAK,WAAa,IAAIC,EACtB,KAAK,OAAO,IAAI,KAAK,UAAU,CACjC,CAEA,MAAa,OAAuB,CAAC,CACvC"}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,63 +1,33 @@
|
|
|
1
1
|
import { BaseGraphicsLibrary, InitContext } from "@nanoforge-dev/common";
|
|
2
|
-
import * as _$konva_lib_Animation0 from "konva/lib/Animation";
|
|
3
|
-
import * as _$konva_lib_shapes_Arc0 from "konva/lib/shapes/Arc";
|
|
4
|
-
import * as _$konva_lib_shapes_Arrow0 from "konva/lib/shapes/Arrow";
|
|
5
|
-
import * as _$konva_lib_Canvas0 from "konva/lib/Canvas";
|
|
6
|
-
import * as _$konva_lib_shapes_Circle0 from "konva/lib/shapes/Circle";
|
|
7
|
-
import * as _$konva_lib_Container0 from "konva/lib/Container";
|
|
8
|
-
import * as _$konva_lib_Context0 from "konva/lib/Context";
|
|
9
|
-
import * as _$konva_lib_Node0 from "konva/lib/Node";
|
|
10
|
-
import * as _$konva_lib_types0 from "konva/lib/types";
|
|
11
|
-
import * as _$konva_lib_shapes_Ellipse0 from "konva/lib/shapes/Ellipse";
|
|
12
|
-
import * as _$konva_lib_FastLayer0 from "konva/lib/FastLayer";
|
|
13
|
-
import * as _$konva_lib_Group0 from "konva/lib/Group";
|
|
14
|
-
import * as _$konva_lib_shapes_Image0 from "konva/lib/shapes/Image";
|
|
15
|
-
import * as _$konva_lib_shapes_Label0 from "konva/lib/shapes/Label";
|
|
16
|
-
import * as _$konva_lib_Layer0 from "konva/lib/Layer";
|
|
17
|
-
import * as _$konva_lib_shapes_Line0 from "konva/lib/shapes/Line";
|
|
18
|
-
import * as _$konva_lib_shapes_Path0 from "konva/lib/shapes/Path";
|
|
19
|
-
import * as _$konva_lib_shapes_Rect0 from "konva/lib/shapes/Rect";
|
|
20
|
-
import * as _$konva_lib_shapes_RegularPolygon0 from "konva/lib/shapes/RegularPolygon";
|
|
21
|
-
import * as _$konva_lib_shapes_Ring0 from "konva/lib/shapes/Ring";
|
|
22
|
-
import * as _$konva_lib_Shape0 from "konva/lib/Shape";
|
|
23
|
-
import * as _$konva_lib_shapes_Sprite0 from "konva/lib/shapes/Sprite";
|
|
24
|
-
import * as _$konva_lib_Stage0 from "konva/lib/Stage";
|
|
25
|
-
import * as _$konva_lib_shapes_Star0 from "konva/lib/shapes/Star";
|
|
26
|
-
import * as _$konva_lib_shapes_Text0 from "konva/lib/shapes/Text";
|
|
27
|
-
import * as _$konva_lib_shapes_TextPath0 from "konva/lib/shapes/TextPath";
|
|
28
|
-
import * as _$konva_lib_Util0 from "konva/lib/Util";
|
|
29
|
-
import * as _$konva_lib_shapes_Transformer0 from "konva/lib/shapes/Transformer";
|
|
30
|
-
import * as _$konva_lib_Tween0 from "konva/lib/Tween";
|
|
31
|
-
import * as _$konva_lib_shapes_Wedge0 from "konva/lib/shapes/Wedge";
|
|
32
2
|
import Konva from "konva";
|
|
33
3
|
|
|
34
4
|
//#region src/exports/konva.d.ts
|
|
35
|
-
declare const Animation: typeof
|
|
5
|
+
declare const Animation: typeof import("konva/lib/Animation").Animation;
|
|
36
6
|
type Animation = Konva.Animation;
|
|
37
|
-
declare const Arc: typeof
|
|
7
|
+
declare const Arc: typeof import("konva/lib/shapes/Arc").Arc;
|
|
38
8
|
type Arc = Konva.Arc;
|
|
39
9
|
type ArcConfig = Konva.ArcConfig;
|
|
40
|
-
declare const Arrow: typeof
|
|
10
|
+
declare const Arrow: typeof import("konva/lib/shapes/Arrow").Arrow;
|
|
41
11
|
type Arrow = Konva.Arrow;
|
|
42
12
|
type ArrowConfig = Konva.ArrowConfig;
|
|
43
|
-
declare const Canvas: typeof
|
|
13
|
+
declare const Canvas: typeof import("konva/lib/Canvas").Canvas;
|
|
44
14
|
type Canvas = typeof Konva.Canvas;
|
|
45
|
-
declare const Circle: typeof
|
|
15
|
+
declare const Circle: typeof import("konva/lib/shapes/Circle").Circle;
|
|
46
16
|
type Circle = Konva.Circle;
|
|
47
17
|
type CircleConfig = Konva.CircleConfig;
|
|
48
|
-
declare const Container: typeof
|
|
18
|
+
declare const Container: typeof import("konva/lib/Container").Container;
|
|
49
19
|
type Container = Konva.Container;
|
|
50
20
|
type ContainerConfig = Konva.ContainerConfig;
|
|
51
|
-
declare const Context: typeof
|
|
21
|
+
declare const Context: typeof import("konva/lib/Context").Context;
|
|
52
22
|
type Context = Konva.Context;
|
|
53
23
|
declare const DD: {
|
|
54
24
|
readonly isDragging: boolean;
|
|
55
25
|
justDragged: boolean;
|
|
56
|
-
readonly node:
|
|
26
|
+
readonly node: import("konva/lib/Node").Node<import("konva/lib/Node").NodeConfig> | undefined;
|
|
57
27
|
_dragElements: Map<number, {
|
|
58
|
-
node:
|
|
59
|
-
startPointerPos:
|
|
60
|
-
offset:
|
|
28
|
+
node: import("konva/lib/Node").Node;
|
|
29
|
+
startPointerPos: import("konva/lib/types").Vector2d;
|
|
30
|
+
offset: import("konva/lib/types").Vector2d;
|
|
61
31
|
pointerId?: number;
|
|
62
32
|
startEvent?: any;
|
|
63
33
|
dragStatus: "ready" | "dragging" | "stopped";
|
|
@@ -86,94 +56,94 @@ declare const Easings: {
|
|
|
86
56
|
Linear(t: any, b: any, c: any, d: any): any;
|
|
87
57
|
};
|
|
88
58
|
type Easings = typeof Konva.Easings;
|
|
89
|
-
declare const Ellipse: typeof
|
|
59
|
+
declare const Ellipse: typeof import("konva/lib/shapes/Ellipse").Ellipse;
|
|
90
60
|
type Ellipse = Konva.Ellipse;
|
|
91
61
|
type EllipseConfig = Konva.EllipseConfig;
|
|
92
|
-
declare const FastLayer: typeof
|
|
62
|
+
declare const FastLayer: typeof import("konva/lib/FastLayer").FastLayer;
|
|
93
63
|
type FastLayer = Konva.FastLayer;
|
|
94
64
|
declare const Filters: {
|
|
95
|
-
Blur:
|
|
96
|
-
Brightness:
|
|
97
|
-
Brighten:
|
|
98
|
-
Contrast:
|
|
99
|
-
Emboss:
|
|
100
|
-
Enhance:
|
|
101
|
-
Grayscale:
|
|
102
|
-
HSL:
|
|
103
|
-
HSV:
|
|
104
|
-
Invert:
|
|
105
|
-
Kaleidoscope:
|
|
106
|
-
Mask:
|
|
107
|
-
Noise:
|
|
108
|
-
Pixelate:
|
|
109
|
-
Posterize:
|
|
110
|
-
RGB:
|
|
111
|
-
RGBA:
|
|
112
|
-
Sepia:
|
|
113
|
-
Solarize:
|
|
114
|
-
Threshold:
|
|
65
|
+
Blur: import("konva/lib/Node").Filter;
|
|
66
|
+
Brightness: import("konva/lib/Node").Filter;
|
|
67
|
+
Brighten: import("konva/lib/Node").Filter;
|
|
68
|
+
Contrast: import("konva/lib/Node").Filter;
|
|
69
|
+
Emboss: import("konva/lib/Node").Filter;
|
|
70
|
+
Enhance: import("konva/lib/Node").Filter;
|
|
71
|
+
Grayscale: import("konva/lib/Node").Filter;
|
|
72
|
+
HSL: import("konva/lib/Node").Filter;
|
|
73
|
+
HSV: import("konva/lib/Node").Filter;
|
|
74
|
+
Invert: import("konva/lib/Node").Filter;
|
|
75
|
+
Kaleidoscope: import("konva/lib/Node").Filter;
|
|
76
|
+
Mask: import("konva/lib/Node").Filter;
|
|
77
|
+
Noise: import("konva/lib/Node").Filter;
|
|
78
|
+
Pixelate: import("konva/lib/Node").Filter;
|
|
79
|
+
Posterize: import("konva/lib/Node").Filter;
|
|
80
|
+
RGB: import("konva/lib/Node").Filter;
|
|
81
|
+
RGBA: import("konva/lib/Node").Filter;
|
|
82
|
+
Sepia: import("konva/lib/Node").Filter;
|
|
83
|
+
Solarize: import("konva/lib/Node").Filter;
|
|
84
|
+
Threshold: import("konva/lib/Node").Filter;
|
|
115
85
|
};
|
|
116
86
|
type Filters = typeof Konva.Filters;
|
|
117
|
-
declare const Group: typeof
|
|
87
|
+
declare const Group: typeof import("konva/lib/Group").Group;
|
|
118
88
|
type Group = Konva.Group;
|
|
119
89
|
type GroupConfig = Konva.GroupConfig;
|
|
120
|
-
declare const Image: typeof
|
|
90
|
+
declare const Image: typeof import("konva/lib/shapes/Image").Image;
|
|
121
91
|
type Image = Konva.Image;
|
|
122
92
|
type ImageConfig = Konva.ImageConfig;
|
|
123
93
|
type KonvaEventListener<This, EventType> = Konva.KonvaEventListener<This, EventType>;
|
|
124
94
|
type KonvaEventObject<EventType> = Konva.KonvaEventObject<EventType>;
|
|
125
95
|
type KonvaPointerEvent = Konva.KonvaPointerEvent;
|
|
126
|
-
declare const Label: typeof
|
|
96
|
+
declare const Label: typeof import("konva/lib/shapes/Label").Label;
|
|
127
97
|
type Label = Konva.Label;
|
|
128
98
|
type LabelConfig = Konva.LabelConfig;
|
|
129
|
-
declare const Layer: typeof
|
|
99
|
+
declare const Layer: typeof import("konva/lib/Layer").Layer;
|
|
130
100
|
type Layer = Konva.Layer;
|
|
131
101
|
type LayerConfig = Konva.LayerConfig;
|
|
132
|
-
declare const Line: typeof
|
|
102
|
+
declare const Line: typeof import("konva/lib/shapes/Line").Line;
|
|
133
103
|
type Line = Konva.Line;
|
|
134
104
|
type LineConfig = Konva.LineConfig;
|
|
135
|
-
declare const Node: typeof
|
|
105
|
+
declare const Node: typeof import("konva/lib/Node").Node;
|
|
136
106
|
type Node = Konva.Node;
|
|
137
107
|
type NodeConfig = Konva.NodeConfig;
|
|
138
|
-
declare const Path: typeof
|
|
108
|
+
declare const Path: typeof import("konva/lib/shapes/Path").Path;
|
|
139
109
|
type Path = Konva.Path;
|
|
140
110
|
type PathConfig = Konva.PathConfig;
|
|
141
|
-
declare const Rect: typeof
|
|
111
|
+
declare const Rect: typeof import("konva/lib/shapes/Rect").Rect;
|
|
142
112
|
type Rect = Konva.Rect;
|
|
143
113
|
type RectConfig = Konva.RectConfig;
|
|
144
|
-
declare const RegularPolygon: typeof
|
|
114
|
+
declare const RegularPolygon: typeof import("konva/lib/shapes/RegularPolygon").RegularPolygon;
|
|
145
115
|
type RegularPolygon = Konva.RegularPolygon;
|
|
146
116
|
type RegularPolygonConfig = Konva.RegularPolygonConfig;
|
|
147
|
-
declare const Ring: typeof
|
|
117
|
+
declare const Ring: typeof import("konva/lib/shapes/Ring").Ring;
|
|
148
118
|
type Ring = Konva.Ring;
|
|
149
119
|
type RingConfig = Konva.RingConfig;
|
|
150
|
-
declare const Shape: typeof
|
|
120
|
+
declare const Shape: typeof import("konva/lib/Shape").Shape;
|
|
151
121
|
type Shape = Konva.Shape;
|
|
152
122
|
type ShapeConfig = Konva.ShapeConfig;
|
|
153
|
-
declare const Sprite: typeof
|
|
123
|
+
declare const Sprite: typeof import("konva/lib/shapes/Sprite").Sprite;
|
|
154
124
|
type Sprite = Konva.Sprite;
|
|
155
125
|
type SpriteConfig = Konva.SpriteConfig;
|
|
156
|
-
declare const Stage: typeof
|
|
126
|
+
declare const Stage: typeof import("konva/lib/Stage").Stage;
|
|
157
127
|
type Stage = Konva.Stage;
|
|
158
128
|
type StageConfig = Konva.StageConfig;
|
|
159
|
-
declare const Star: typeof
|
|
129
|
+
declare const Star: typeof import("konva/lib/shapes/Star").Star;
|
|
160
130
|
type Star = Konva.Star;
|
|
161
131
|
type StarConfig = Konva.StarConfig;
|
|
162
|
-
declare const Tag: typeof
|
|
132
|
+
declare const Tag: typeof import("konva/lib/shapes/Label").Tag;
|
|
163
133
|
type Tag = Konva.Tag;
|
|
164
134
|
type TagConfig = Konva.TagConfig;
|
|
165
|
-
declare const Text: typeof
|
|
135
|
+
declare const Text: typeof import("konva/lib/shapes/Text").Text;
|
|
166
136
|
type Text = Konva.Text;
|
|
167
137
|
type TextConfig = Konva.TextConfig;
|
|
168
|
-
declare const TextPath: typeof
|
|
138
|
+
declare const TextPath: typeof import("konva/lib/shapes/TextPath").TextPath;
|
|
169
139
|
type TextPath = Konva.TextPath;
|
|
170
140
|
type TextPathConfig = Konva.TextPathConfig;
|
|
171
|
-
declare const Transform: typeof
|
|
141
|
+
declare const Transform: typeof import("konva/lib/Util").Transform;
|
|
172
142
|
type Transform = Konva.Transform;
|
|
173
|
-
declare const Transformer: typeof
|
|
143
|
+
declare const Transformer: typeof import("konva/lib/shapes/Transformer").Transformer;
|
|
174
144
|
type Transformer = Konva.Transformer;
|
|
175
145
|
type TransformerConfig = Konva.TransformerConfig;
|
|
176
|
-
declare const Tween: typeof
|
|
146
|
+
declare const Tween: typeof import("konva/lib/Tween").Tween;
|
|
177
147
|
type Tween = Konva.Tween;
|
|
178
148
|
type TweenConfig = Konva.TweenConfig;
|
|
179
149
|
declare const Util: {
|
|
@@ -193,13 +163,13 @@ declare const Util: {
|
|
|
193
163
|
_isInDocument(el: any): boolean;
|
|
194
164
|
_urlToImage(url: string, callback: Function): void;
|
|
195
165
|
_rgbToHex(r: number, g: number, b: number): string;
|
|
196
|
-
_hexToRgb(hex: string):
|
|
166
|
+
_hexToRgb(hex: string): import("konva/lib/types").RGB;
|
|
197
167
|
getRandomColor(): string;
|
|
198
168
|
isCanvasFarblingActive(): boolean;
|
|
199
169
|
getHitColor(): string;
|
|
200
170
|
getHitColorKey(r: number, g: number, b: number): string;
|
|
201
171
|
getSnappedHexColor(hex: string): string;
|
|
202
|
-
getRGB(color: string):
|
|
172
|
+
getRGB(color: string): import("konva/lib/types").RGB;
|
|
203
173
|
colorToRGBA(str: string): {
|
|
204
174
|
r: number;
|
|
205
175
|
g: number;
|
|
@@ -254,7 +224,7 @@ declare const Util: {
|
|
|
254
224
|
b: number;
|
|
255
225
|
a: number;
|
|
256
226
|
} | undefined;
|
|
257
|
-
haveIntersection(r1:
|
|
227
|
+
haveIntersection(r1: import("konva/lib/types").IRect, r2: import("konva/lib/types").IRect): boolean;
|
|
258
228
|
cloneObject<Any>(obj: Any): Any;
|
|
259
229
|
cloneArray(arr: Array<any>): any[];
|
|
260
230
|
degToRad(deg: number): number;
|
|
@@ -269,18 +239,18 @@ declare const Util: {
|
|
|
269
239
|
each(obj: object, func: Function): void;
|
|
270
240
|
_inRange(val: number, left: number, right: number): boolean;
|
|
271
241
|
_getProjectionToSegment(x1: any, y1: any, x2: any, y2: any, x3: any, y3: any): any[];
|
|
272
|
-
_getProjectionToLine(pt:
|
|
242
|
+
_getProjectionToLine(pt: import("konva/lib/types").Vector2d, line: Array<import("konva/lib/types").Vector2d>, isClosed: boolean): import("konva/lib/types").Vector2d;
|
|
273
243
|
_prepareArrayForTween(startArray: any, endArray: any, isClosed: any): number[];
|
|
274
244
|
_prepareToStringify<T>(obj: any): T | null;
|
|
275
245
|
_assign<T, U>(target: T, source: U): T & U;
|
|
276
246
|
_getFirstPointerId(evt: any): any;
|
|
277
247
|
releaseCanvas(...canvases: HTMLCanvasElement[]): void;
|
|
278
|
-
drawRoundedRectPath(context:
|
|
279
|
-
drawRoundedPolygonPath(context:
|
|
248
|
+
drawRoundedRectPath(context: import("konva/lib/Context").Context, width: number, height: number, cornerRadius: number | number[]): void;
|
|
249
|
+
drawRoundedPolygonPath(context: import("konva/lib/Context").Context, points: import("konva/lib/types").Vector2d[], sides: number, radius: number, cornerRadius: number | number[]): void;
|
|
280
250
|
};
|
|
281
251
|
type Util = typeof Konva.Util;
|
|
282
252
|
type Vector2d = Konva.Vector2d;
|
|
283
|
-
declare const Wedge: typeof
|
|
253
|
+
declare const Wedge: typeof import("konva/lib/shapes/Wedge").Wedge;
|
|
284
254
|
type Wedge = Konva.Wedge;
|
|
285
255
|
type WedgeConfig = Konva.WedgeConfig;
|
|
286
256
|
declare const _global: any;
|
|
@@ -315,10 +285,10 @@ declare const pixelRatio: number;
|
|
|
315
285
|
declare const pointerEventsEnabled: boolean;
|
|
316
286
|
declare const releaseCanvasOnDestroy: boolean;
|
|
317
287
|
declare const shapes: {
|
|
318
|
-
[key: string]:
|
|
288
|
+
[key: string]: import("konva/lib/Shape").Shape<import("konva/lib/Shape").ShapeConfig>;
|
|
319
289
|
};
|
|
320
290
|
declare const showWarnings: boolean;
|
|
321
|
-
declare const stages:
|
|
291
|
+
declare const stages: import("konva/lib/Stage").Stage[];
|
|
322
292
|
declare const version: string;
|
|
323
293
|
//#endregion
|
|
324
294
|
//#region src/graphics-2d.library.d.ts
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/exports/konva.ts","../src/graphics-2d.library.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/exports/konva.ts","../src/graphics-2d.library.ts"],"mappings":";;;;cAEa,SAAA,uCAAS,SAAkB;AAAA,KAC5B,SAAA,GAAY,KAAA,CAAM,SAAS;AAAA,cAE1B,GAAA,wCAAG,GAAY;AAAA,KAChB,GAAA,GAAM,KAAA,CAAM,GAAG;AAAA,KAEf,SAAA,GAAY,KAAA,CAAM,SAAS;AAAA,cAE1B,KAAA,0CAAK,KAAc;AAAA,KACpB,KAAA,GAAQ,KAAA,CAAM,KAAK;AAAA,KAEnB,WAAA,GAAc,KAAA,CAAM,WAAW;AAAA,cAE9B,MAAA,oCAAM,MAAe;AAAA,KACtB,MAAA,UAAgB,KAAA,CAAM,MAAM;AAAA,cAE3B,MAAA,2CAAM,MAAe;AAAA,KACtB,MAAA,GAAS,KAAA,CAAM,MAAM;AAAA,KAErB,YAAA,GAAe,KAAA,CAAM,YAAY;AAAA,cAEhC,SAAA,uCAAS,SAAkB;AAAA,KAC5B,SAAA,GAAY,KAAA,CAAM,SAAS;AAAA,KAE3B,eAAA,GAAkB,KAAA,CAAM,eAAe;AAAA,cAEtC,OAAA,qCAAO,OAAgB;AAAA,KACxB,OAAA,GAAU,KAAA,CAAM,OAAO;AAAA,cAEtB,EAAA;EAAA;;;iBAAa,GAAA;;;;;;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EA,SAAA;AAAA,cAEA,WAAA;AAAA,cAEA,UAAA;AAAA,cAEA,cAAA;AAAA,cAEA,YAAA;AAAA,cAEA,mBAAA;AAAA,cAEA,UAAA;AAAA,cAEA,oBAAA;AAAA,cAEA,sBAAA;AAAA,cAEA,MAAA;EAAA;;cAEA,YAAA;AAAA,cAEA,MAAA,4BAAM,KAAA;AAAA,cAEN,OAAA;;;cClOA,iBAAA,SAA0B,mBAAA;EAAA,QAC7B,MAAA;EAAA,QACA,UAAA;EAAA,IAEJ,MAAA,CAAA;EAAA,IAIA,KAAA,CAAA,GAAS,KAAA;EAAA,IAKT,SAAA,CAAA,GAAa,KAAA;EAKK,MAAA,CAAO,OAAA,EAAS,WAAA,GAAc,OAAA;EAavC,KAAA,CAAA,GAAS,OAAA;AAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,63 +1,33 @@
|
|
|
1
1
|
import { BaseGraphicsLibrary, InitContext } from "@nanoforge-dev/common";
|
|
2
2
|
import Konva from "konva";
|
|
3
|
-
import * as _$konva_lib_Animation0 from "konva/lib/Animation";
|
|
4
|
-
import * as _$konva_lib_shapes_Arc0 from "konva/lib/shapes/Arc";
|
|
5
|
-
import * as _$konva_lib_shapes_Arrow0 from "konva/lib/shapes/Arrow";
|
|
6
|
-
import * as _$konva_lib_Canvas0 from "konva/lib/Canvas";
|
|
7
|
-
import * as _$konva_lib_shapes_Circle0 from "konva/lib/shapes/Circle";
|
|
8
|
-
import * as _$konva_lib_Container0 from "konva/lib/Container";
|
|
9
|
-
import * as _$konva_lib_Context0 from "konva/lib/Context";
|
|
10
|
-
import * as _$konva_lib_Node0 from "konva/lib/Node";
|
|
11
|
-
import * as _$konva_lib_types0 from "konva/lib/types";
|
|
12
|
-
import * as _$konva_lib_shapes_Ellipse0 from "konva/lib/shapes/Ellipse";
|
|
13
|
-
import * as _$konva_lib_FastLayer0 from "konva/lib/FastLayer";
|
|
14
|
-
import * as _$konva_lib_Group0 from "konva/lib/Group";
|
|
15
|
-
import * as _$konva_lib_shapes_Image0 from "konva/lib/shapes/Image";
|
|
16
|
-
import * as _$konva_lib_shapes_Label0 from "konva/lib/shapes/Label";
|
|
17
|
-
import * as _$konva_lib_Layer0 from "konva/lib/Layer";
|
|
18
|
-
import * as _$konva_lib_shapes_Line0 from "konva/lib/shapes/Line";
|
|
19
|
-
import * as _$konva_lib_shapes_Path0 from "konva/lib/shapes/Path";
|
|
20
|
-
import * as _$konva_lib_shapes_Rect0 from "konva/lib/shapes/Rect";
|
|
21
|
-
import * as _$konva_lib_shapes_RegularPolygon0 from "konva/lib/shapes/RegularPolygon";
|
|
22
|
-
import * as _$konva_lib_shapes_Ring0 from "konva/lib/shapes/Ring";
|
|
23
|
-
import * as _$konva_lib_Shape0 from "konva/lib/Shape";
|
|
24
|
-
import * as _$konva_lib_shapes_Sprite0 from "konva/lib/shapes/Sprite";
|
|
25
|
-
import * as _$konva_lib_Stage0 from "konva/lib/Stage";
|
|
26
|
-
import * as _$konva_lib_shapes_Star0 from "konva/lib/shapes/Star";
|
|
27
|
-
import * as _$konva_lib_shapes_Text0 from "konva/lib/shapes/Text";
|
|
28
|
-
import * as _$konva_lib_shapes_TextPath0 from "konva/lib/shapes/TextPath";
|
|
29
|
-
import * as _$konva_lib_Util0 from "konva/lib/Util";
|
|
30
|
-
import * as _$konva_lib_shapes_Transformer0 from "konva/lib/shapes/Transformer";
|
|
31
|
-
import * as _$konva_lib_Tween0 from "konva/lib/Tween";
|
|
32
|
-
import * as _$konva_lib_shapes_Wedge0 from "konva/lib/shapes/Wedge";
|
|
33
3
|
|
|
34
4
|
//#region src/exports/konva.d.ts
|
|
35
|
-
declare const Animation: typeof
|
|
5
|
+
declare const Animation: typeof import("konva/lib/Animation").Animation;
|
|
36
6
|
type Animation = Konva.Animation;
|
|
37
|
-
declare const Arc: typeof
|
|
7
|
+
declare const Arc: typeof import("konva/lib/shapes/Arc").Arc;
|
|
38
8
|
type Arc = Konva.Arc;
|
|
39
9
|
type ArcConfig = Konva.ArcConfig;
|
|
40
|
-
declare const Arrow: typeof
|
|
10
|
+
declare const Arrow: typeof import("konva/lib/shapes/Arrow").Arrow;
|
|
41
11
|
type Arrow = Konva.Arrow;
|
|
42
12
|
type ArrowConfig = Konva.ArrowConfig;
|
|
43
|
-
declare const Canvas: typeof
|
|
13
|
+
declare const Canvas: typeof import("konva/lib/Canvas").Canvas;
|
|
44
14
|
type Canvas = typeof Konva.Canvas;
|
|
45
|
-
declare const Circle: typeof
|
|
15
|
+
declare const Circle: typeof import("konva/lib/shapes/Circle").Circle;
|
|
46
16
|
type Circle = Konva.Circle;
|
|
47
17
|
type CircleConfig = Konva.CircleConfig;
|
|
48
|
-
declare const Container: typeof
|
|
18
|
+
declare const Container: typeof import("konva/lib/Container").Container;
|
|
49
19
|
type Container = Konva.Container;
|
|
50
20
|
type ContainerConfig = Konva.ContainerConfig;
|
|
51
|
-
declare const Context: typeof
|
|
21
|
+
declare const Context: typeof import("konva/lib/Context").Context;
|
|
52
22
|
type Context = Konva.Context;
|
|
53
23
|
declare const DD: {
|
|
54
24
|
readonly isDragging: boolean;
|
|
55
25
|
justDragged: boolean;
|
|
56
|
-
readonly node:
|
|
26
|
+
readonly node: import("konva/lib/Node").Node<import("konva/lib/Node").NodeConfig> | undefined;
|
|
57
27
|
_dragElements: Map<number, {
|
|
58
|
-
node:
|
|
59
|
-
startPointerPos:
|
|
60
|
-
offset:
|
|
28
|
+
node: import("konva/lib/Node").Node;
|
|
29
|
+
startPointerPos: import("konva/lib/types").Vector2d;
|
|
30
|
+
offset: import("konva/lib/types").Vector2d;
|
|
61
31
|
pointerId?: number;
|
|
62
32
|
startEvent?: any;
|
|
63
33
|
dragStatus: "ready" | "dragging" | "stopped";
|
|
@@ -86,94 +56,94 @@ declare const Easings: {
|
|
|
86
56
|
Linear(t: any, b: any, c: any, d: any): any;
|
|
87
57
|
};
|
|
88
58
|
type Easings = typeof Konva.Easings;
|
|
89
|
-
declare const Ellipse: typeof
|
|
59
|
+
declare const Ellipse: typeof import("konva/lib/shapes/Ellipse").Ellipse;
|
|
90
60
|
type Ellipse = Konva.Ellipse;
|
|
91
61
|
type EllipseConfig = Konva.EllipseConfig;
|
|
92
|
-
declare const FastLayer: typeof
|
|
62
|
+
declare const FastLayer: typeof import("konva/lib/FastLayer").FastLayer;
|
|
93
63
|
type FastLayer = Konva.FastLayer;
|
|
94
64
|
declare const Filters: {
|
|
95
|
-
Blur:
|
|
96
|
-
Brightness:
|
|
97
|
-
Brighten:
|
|
98
|
-
Contrast:
|
|
99
|
-
Emboss:
|
|
100
|
-
Enhance:
|
|
101
|
-
Grayscale:
|
|
102
|
-
HSL:
|
|
103
|
-
HSV:
|
|
104
|
-
Invert:
|
|
105
|
-
Kaleidoscope:
|
|
106
|
-
Mask:
|
|
107
|
-
Noise:
|
|
108
|
-
Pixelate:
|
|
109
|
-
Posterize:
|
|
110
|
-
RGB:
|
|
111
|
-
RGBA:
|
|
112
|
-
Sepia:
|
|
113
|
-
Solarize:
|
|
114
|
-
Threshold:
|
|
65
|
+
Blur: import("konva/lib/Node").Filter;
|
|
66
|
+
Brightness: import("konva/lib/Node").Filter;
|
|
67
|
+
Brighten: import("konva/lib/Node").Filter;
|
|
68
|
+
Contrast: import("konva/lib/Node").Filter;
|
|
69
|
+
Emboss: import("konva/lib/Node").Filter;
|
|
70
|
+
Enhance: import("konva/lib/Node").Filter;
|
|
71
|
+
Grayscale: import("konva/lib/Node").Filter;
|
|
72
|
+
HSL: import("konva/lib/Node").Filter;
|
|
73
|
+
HSV: import("konva/lib/Node").Filter;
|
|
74
|
+
Invert: import("konva/lib/Node").Filter;
|
|
75
|
+
Kaleidoscope: import("konva/lib/Node").Filter;
|
|
76
|
+
Mask: import("konva/lib/Node").Filter;
|
|
77
|
+
Noise: import("konva/lib/Node").Filter;
|
|
78
|
+
Pixelate: import("konva/lib/Node").Filter;
|
|
79
|
+
Posterize: import("konva/lib/Node").Filter;
|
|
80
|
+
RGB: import("konva/lib/Node").Filter;
|
|
81
|
+
RGBA: import("konva/lib/Node").Filter;
|
|
82
|
+
Sepia: import("konva/lib/Node").Filter;
|
|
83
|
+
Solarize: import("konva/lib/Node").Filter;
|
|
84
|
+
Threshold: import("konva/lib/Node").Filter;
|
|
115
85
|
};
|
|
116
86
|
type Filters = typeof Konva.Filters;
|
|
117
|
-
declare const Group: typeof
|
|
87
|
+
declare const Group: typeof import("konva/lib/Group").Group;
|
|
118
88
|
type Group = Konva.Group;
|
|
119
89
|
type GroupConfig = Konva.GroupConfig;
|
|
120
|
-
declare const Image: typeof
|
|
90
|
+
declare const Image: typeof import("konva/lib/shapes/Image").Image;
|
|
121
91
|
type Image = Konva.Image;
|
|
122
92
|
type ImageConfig = Konva.ImageConfig;
|
|
123
93
|
type KonvaEventListener<This, EventType> = Konva.KonvaEventListener<This, EventType>;
|
|
124
94
|
type KonvaEventObject<EventType> = Konva.KonvaEventObject<EventType>;
|
|
125
95
|
type KonvaPointerEvent = Konva.KonvaPointerEvent;
|
|
126
|
-
declare const Label: typeof
|
|
96
|
+
declare const Label: typeof import("konva/lib/shapes/Label").Label;
|
|
127
97
|
type Label = Konva.Label;
|
|
128
98
|
type LabelConfig = Konva.LabelConfig;
|
|
129
|
-
declare const Layer: typeof
|
|
99
|
+
declare const Layer: typeof import("konva/lib/Layer").Layer;
|
|
130
100
|
type Layer = Konva.Layer;
|
|
131
101
|
type LayerConfig = Konva.LayerConfig;
|
|
132
|
-
declare const Line: typeof
|
|
102
|
+
declare const Line: typeof import("konva/lib/shapes/Line").Line;
|
|
133
103
|
type Line = Konva.Line;
|
|
134
104
|
type LineConfig = Konva.LineConfig;
|
|
135
|
-
declare const Node: typeof
|
|
105
|
+
declare const Node: typeof import("konva/lib/Node").Node;
|
|
136
106
|
type Node = Konva.Node;
|
|
137
107
|
type NodeConfig = Konva.NodeConfig;
|
|
138
|
-
declare const Path: typeof
|
|
108
|
+
declare const Path: typeof import("konva/lib/shapes/Path").Path;
|
|
139
109
|
type Path = Konva.Path;
|
|
140
110
|
type PathConfig = Konva.PathConfig;
|
|
141
|
-
declare const Rect: typeof
|
|
111
|
+
declare const Rect: typeof import("konva/lib/shapes/Rect").Rect;
|
|
142
112
|
type Rect = Konva.Rect;
|
|
143
113
|
type RectConfig = Konva.RectConfig;
|
|
144
|
-
declare const RegularPolygon: typeof
|
|
114
|
+
declare const RegularPolygon: typeof import("konva/lib/shapes/RegularPolygon").RegularPolygon;
|
|
145
115
|
type RegularPolygon = Konva.RegularPolygon;
|
|
146
116
|
type RegularPolygonConfig = Konva.RegularPolygonConfig;
|
|
147
|
-
declare const Ring: typeof
|
|
117
|
+
declare const Ring: typeof import("konva/lib/shapes/Ring").Ring;
|
|
148
118
|
type Ring = Konva.Ring;
|
|
149
119
|
type RingConfig = Konva.RingConfig;
|
|
150
|
-
declare const Shape: typeof
|
|
120
|
+
declare const Shape: typeof import("konva/lib/Shape").Shape;
|
|
151
121
|
type Shape = Konva.Shape;
|
|
152
122
|
type ShapeConfig = Konva.ShapeConfig;
|
|
153
|
-
declare const Sprite: typeof
|
|
123
|
+
declare const Sprite: typeof import("konva/lib/shapes/Sprite").Sprite;
|
|
154
124
|
type Sprite = Konva.Sprite;
|
|
155
125
|
type SpriteConfig = Konva.SpriteConfig;
|
|
156
|
-
declare const Stage: typeof
|
|
126
|
+
declare const Stage: typeof import("konva/lib/Stage").Stage;
|
|
157
127
|
type Stage = Konva.Stage;
|
|
158
128
|
type StageConfig = Konva.StageConfig;
|
|
159
|
-
declare const Star: typeof
|
|
129
|
+
declare const Star: typeof import("konva/lib/shapes/Star").Star;
|
|
160
130
|
type Star = Konva.Star;
|
|
161
131
|
type StarConfig = Konva.StarConfig;
|
|
162
|
-
declare const Tag: typeof
|
|
132
|
+
declare const Tag: typeof import("konva/lib/shapes/Label").Tag;
|
|
163
133
|
type Tag = Konva.Tag;
|
|
164
134
|
type TagConfig = Konva.TagConfig;
|
|
165
|
-
declare const Text: typeof
|
|
135
|
+
declare const Text: typeof import("konva/lib/shapes/Text").Text;
|
|
166
136
|
type Text = Konva.Text;
|
|
167
137
|
type TextConfig = Konva.TextConfig;
|
|
168
|
-
declare const TextPath: typeof
|
|
138
|
+
declare const TextPath: typeof import("konva/lib/shapes/TextPath").TextPath;
|
|
169
139
|
type TextPath = Konva.TextPath;
|
|
170
140
|
type TextPathConfig = Konva.TextPathConfig;
|
|
171
|
-
declare const Transform: typeof
|
|
141
|
+
declare const Transform: typeof import("konva/lib/Util").Transform;
|
|
172
142
|
type Transform = Konva.Transform;
|
|
173
|
-
declare const Transformer: typeof
|
|
143
|
+
declare const Transformer: typeof import("konva/lib/shapes/Transformer").Transformer;
|
|
174
144
|
type Transformer = Konva.Transformer;
|
|
175
145
|
type TransformerConfig = Konva.TransformerConfig;
|
|
176
|
-
declare const Tween: typeof
|
|
146
|
+
declare const Tween: typeof import("konva/lib/Tween").Tween;
|
|
177
147
|
type Tween = Konva.Tween;
|
|
178
148
|
type TweenConfig = Konva.TweenConfig;
|
|
179
149
|
declare const Util: {
|
|
@@ -193,13 +163,13 @@ declare const Util: {
|
|
|
193
163
|
_isInDocument(el: any): boolean;
|
|
194
164
|
_urlToImage(url: string, callback: Function): void;
|
|
195
165
|
_rgbToHex(r: number, g: number, b: number): string;
|
|
196
|
-
_hexToRgb(hex: string):
|
|
166
|
+
_hexToRgb(hex: string): import("konva/lib/types").RGB;
|
|
197
167
|
getRandomColor(): string;
|
|
198
168
|
isCanvasFarblingActive(): boolean;
|
|
199
169
|
getHitColor(): string;
|
|
200
170
|
getHitColorKey(r: number, g: number, b: number): string;
|
|
201
171
|
getSnappedHexColor(hex: string): string;
|
|
202
|
-
getRGB(color: string):
|
|
172
|
+
getRGB(color: string): import("konva/lib/types").RGB;
|
|
203
173
|
colorToRGBA(str: string): {
|
|
204
174
|
r: number;
|
|
205
175
|
g: number;
|
|
@@ -254,7 +224,7 @@ declare const Util: {
|
|
|
254
224
|
b: number;
|
|
255
225
|
a: number;
|
|
256
226
|
} | undefined;
|
|
257
|
-
haveIntersection(r1:
|
|
227
|
+
haveIntersection(r1: import("konva/lib/types").IRect, r2: import("konva/lib/types").IRect): boolean;
|
|
258
228
|
cloneObject<Any>(obj: Any): Any;
|
|
259
229
|
cloneArray(arr: Array<any>): any[];
|
|
260
230
|
degToRad(deg: number): number;
|
|
@@ -269,18 +239,18 @@ declare const Util: {
|
|
|
269
239
|
each(obj: object, func: Function): void;
|
|
270
240
|
_inRange(val: number, left: number, right: number): boolean;
|
|
271
241
|
_getProjectionToSegment(x1: any, y1: any, x2: any, y2: any, x3: any, y3: any): any[];
|
|
272
|
-
_getProjectionToLine(pt:
|
|
242
|
+
_getProjectionToLine(pt: import("konva/lib/types").Vector2d, line: Array<import("konva/lib/types").Vector2d>, isClosed: boolean): import("konva/lib/types").Vector2d;
|
|
273
243
|
_prepareArrayForTween(startArray: any, endArray: any, isClosed: any): number[];
|
|
274
244
|
_prepareToStringify<T>(obj: any): T | null;
|
|
275
245
|
_assign<T, U>(target: T, source: U): T & U;
|
|
276
246
|
_getFirstPointerId(evt: any): any;
|
|
277
247
|
releaseCanvas(...canvases: HTMLCanvasElement[]): void;
|
|
278
|
-
drawRoundedRectPath(context:
|
|
279
|
-
drawRoundedPolygonPath(context:
|
|
248
|
+
drawRoundedRectPath(context: import("konva/lib/Context").Context, width: number, height: number, cornerRadius: number | number[]): void;
|
|
249
|
+
drawRoundedPolygonPath(context: import("konva/lib/Context").Context, points: import("konva/lib/types").Vector2d[], sides: number, radius: number, cornerRadius: number | number[]): void;
|
|
280
250
|
};
|
|
281
251
|
type Util = typeof Konva.Util;
|
|
282
252
|
type Vector2d = Konva.Vector2d;
|
|
283
|
-
declare const Wedge: typeof
|
|
253
|
+
declare const Wedge: typeof import("konva/lib/shapes/Wedge").Wedge;
|
|
284
254
|
type Wedge = Konva.Wedge;
|
|
285
255
|
type WedgeConfig = Konva.WedgeConfig;
|
|
286
256
|
declare const _global: any;
|
|
@@ -315,10 +285,10 @@ declare const pixelRatio: number;
|
|
|
315
285
|
declare const pointerEventsEnabled: boolean;
|
|
316
286
|
declare const releaseCanvasOnDestroy: boolean;
|
|
317
287
|
declare const shapes: {
|
|
318
|
-
[key: string]:
|
|
288
|
+
[key: string]: import("konva/lib/Shape").Shape<import("konva/lib/Shape").ShapeConfig>;
|
|
319
289
|
};
|
|
320
290
|
declare const showWarnings: boolean;
|
|
321
|
-
declare const stages:
|
|
291
|
+
declare const stages: import("konva/lib/Stage").Stage[];
|
|
322
292
|
declare const version: string;
|
|
323
293
|
//#endregion
|
|
324
294
|
//#region src/graphics-2d.library.d.ts
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/exports/konva.ts","../src/graphics-2d.library.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/exports/konva.ts","../src/graphics-2d.library.ts"],"mappings":";;;;cAEa,SAAA,uCAAS,SAAkB;AAAA,KAC5B,SAAA,GAAY,KAAA,CAAM,SAAS;AAAA,cAE1B,GAAA,wCAAG,GAAY;AAAA,KAChB,GAAA,GAAM,KAAA,CAAM,GAAG;AAAA,KAEf,SAAA,GAAY,KAAA,CAAM,SAAS;AAAA,cAE1B,KAAA,0CAAK,KAAc;AAAA,KACpB,KAAA,GAAQ,KAAA,CAAM,KAAK;AAAA,KAEnB,WAAA,GAAc,KAAA,CAAM,WAAW;AAAA,cAE9B,MAAA,oCAAM,MAAe;AAAA,KACtB,MAAA,UAAgB,KAAA,CAAM,MAAM;AAAA,cAE3B,MAAA,2CAAM,MAAe;AAAA,KACtB,MAAA,GAAS,KAAA,CAAM,MAAM;AAAA,KAErB,YAAA,GAAe,KAAA,CAAM,YAAY;AAAA,cAEhC,SAAA,uCAAS,SAAkB;AAAA,KAC5B,SAAA,GAAY,KAAA,CAAM,SAAS;AAAA,KAE3B,eAAA,GAAkB,KAAA,CAAM,eAAe;AAAA,cAEtC,OAAA,qCAAO,OAAgB;AAAA,KACxB,O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AAAA,cAEA,WAAA;AAAA,cAEA,QAAA,GAAQ,KAAA;AAAA,cAER,gBAAA;AAAA,cAEA,SAAA;AAAA,cAEA,WAAA;AAAA,cAEA,UAAA;AAAA,cAEA,cAAA;AAAA,cAEA,YAAA;AAAA,cAEA,mBAAA;AAAA,cAEA,UAAA;AAAA,cAEA,oBAAA;AAAA,cAEA,sBAAA;AAAA,cAEA,MAAA;EAAA;;cAEA,YAAA;AAAA,cAEA,MAAA,4BAAM,KAAA;AAAA,cAEN,OAAA;;;cClOA,iBAAA,SAA0B,mBAAA;EAAA,QAC7B,MAAA;EAAA,QACA,UAAA;EAAA,IAEJ,MAAA,CAAA;EAAA,IAIA,KAAA,CAAA,GAAS,KAAA;EAAA,IAKT,SAAA,CAAA,GAAa,KAAA;EAKK,MAAA,CAAO,OAAA,EAAS,WAAA,GAAc,OAAA;EAavC,KAAA,CAAA,GAAS,OAAA;AAAA"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Graphics.Stage","Graphics.Layer"],"sources":["../src/exports/konva.ts","../src/graphics-2d.library.ts"],"sourcesContent":["import Konva from \"konva\";\n\nexport const Animation = Konva.Animation;\nexport type Animation = Konva.Animation;\n\nexport const Arc = Konva.Arc;\nexport type Arc = Konva.Arc;\n\nexport type ArcConfig = Konva.ArcConfig;\n\nexport const Arrow = Konva.Arrow;\nexport type Arrow = Konva.Arrow;\n\nexport type ArrowConfig = Konva.ArrowConfig;\n\nexport const Canvas = Konva.Canvas;\nexport type Canvas = typeof Konva.Canvas;\n\nexport const Circle = Konva.Circle;\nexport type Circle = Konva.Circle;\n\nexport type CircleConfig = Konva.CircleConfig;\n\nexport const Container = Konva.Container;\nexport type Container = Konva.Container;\n\nexport type ContainerConfig = Konva.ContainerConfig;\n\nexport const Context = Konva.Context;\nexport type Context = Konva.Context;\n\nexport const DD = Konva.DD;\nexport type DD = typeof Konva.DD;\n\nexport const Easings = Konva.Easings;\nexport type Easings = typeof Konva.Easings;\n\nexport const Ellipse = Konva.Ellipse;\nexport type Ellipse = Konva.Ellipse;\n\nexport type EllipseConfig = Konva.EllipseConfig;\n\nexport const FastLayer = Konva.FastLayer;\nexport type FastLayer = Konva.FastLayer;\n\nexport const Filters = Konva.Filters;\nexport type Filters = typeof Konva.Filters;\n\nexport const Group = Konva.Group;\nexport type Group = Konva.Group;\n\nexport type GroupConfig = Konva.GroupConfig;\n\nexport const Image = Konva.Image;\nexport type Image = Konva.Image;\n\nexport type ImageConfig = Konva.ImageConfig;\n\nexport type KonvaEventListener<This, EventType> = Konva.KonvaEventListener<This, EventType>;\n\nexport type KonvaEventObject<EventType> = Konva.KonvaEventObject<EventType>;\n\nexport type KonvaPointerEvent = Konva.KonvaPointerEvent;\n\nexport const Label = Konva.Label;\nexport type Label = Konva.Label;\n\nexport type LabelConfig = Konva.LabelConfig;\n\nexport const Layer = Konva.Layer;\nexport type Layer = Konva.Layer;\n\nexport type LayerConfig = Konva.LayerConfig;\n\nexport const Line = Konva.Line;\nexport type Line = Konva.Line;\n\nexport type LineConfig = Konva.LineConfig;\n\nexport const Node = Konva.Node;\nexport type Node = Konva.Node;\n\nexport type NodeConfig = Konva.NodeConfig;\n\nexport const Path = Konva.Path;\nexport type Path = Konva.Path;\n\nexport type PathConfig = Konva.PathConfig;\n\nexport const Rect = Konva.Rect;\nexport type Rect = Konva.Rect;\n\nexport type RectConfig = Konva.RectConfig;\n\nexport const RegularPolygon = Konva.RegularPolygon;\nexport type RegularPolygon = Konva.RegularPolygon;\n\nexport type RegularPolygonConfig = Konva.RegularPolygonConfig;\n\nexport const Ring = Konva.Ring;\nexport type Ring = Konva.Ring;\n\nexport type RingConfig = Konva.RingConfig;\n\nexport const Shape = Konva.Shape;\nexport type Shape = Konva.Shape;\n\nexport type ShapeConfig = Konva.ShapeConfig;\n\nexport const Sprite = Konva.Sprite;\nexport type Sprite = Konva.Sprite;\n\nexport type SpriteConfig = Konva.SpriteConfig;\n\nexport const Stage = Konva.Stage;\nexport type Stage = Konva.Stage;\n\nexport type StageConfig = Konva.StageConfig;\n\nexport const Star = Konva.Star;\nexport type Star = Konva.Star;\n\nexport type StarConfig = Konva.StarConfig;\n\nexport const Tag = Konva.Tag;\nexport type Tag = Konva.Tag;\n\nexport type TagConfig = Konva.TagConfig;\n\nexport const Text = Konva.Text;\nexport type Text = Konva.Text;\n\nexport type TextConfig = Konva.TextConfig;\n\nexport const TextPath = Konva.TextPath;\nexport type TextPath = Konva.TextPath;\n\nexport type TextPathConfig = Konva.TextPathConfig;\n\nexport const Transform = Konva.Transform;\nexport type Transform = Konva.Transform;\n\nexport const Transformer = Konva.Transformer;\nexport type Transformer = Konva.Transformer;\n\nexport type TransformerConfig = Konva.TransformerConfig;\n\nexport const Tween = Konva.Tween;\nexport type Tween = Konva.Tween;\n\nexport type TweenConfig = Konva.TweenConfig;\n\nexport const Util = Konva.Util;\nexport type Util = typeof Konva.Util;\n\nexport type Vector2d = Konva.Vector2d;\n\nexport const Wedge = Konva.Wedge;\nexport type Wedge = Konva.Wedge;\n\nexport type WedgeConfig = Konva.WedgeConfig;\n\nexport const _global = Konva._global;\n\nexport const _injectGlobal = Konva._injectGlobal;\n\nexport const _mouseDblClickPointerId = Konva._mouseDblClickPointerId;\n\nexport const _mouseInDblClickWindow = Konva._mouseInDblClickWindow;\n\nexport const _mouseListenClick = Konva._mouseListenClick;\n\nexport const _pointerDblClickPointerId = Konva._pointerDblClickPointerId;\n\nexport const _pointerInDblClickWindow = Konva._pointerInDblClickWindow;\n\nexport const _pointerListenClick = Konva._pointerListenClick;\n\nexport const _renderBackend = Konva._renderBackend;\n\nexport const _touchDblClickPointerId = Konva._touchDblClickPointerId;\n\nexport const _touchInDblClickWindow = Konva._touchInDblClickWindow;\n\nexport const _touchListenClick = Konva._touchListenClick;\n\nexport const angleDeg = Konva.angleDeg;\n\nexport const autoDrawEnabled = Konva.autoDrawEnabled;\n\nexport const capturePointerEventsEnabled = Konva.capturePointerEventsEnabled;\n\nexport const dblClickWindow = Konva.dblClickWindow;\n\nexport const document = Konva.document;\n\nexport const dragButtons = Konva.dragButtons;\n\nexport const dragDistance = Konva.dragDistance;\n\nexport const enableTrace = Konva.enableTrace;\n\nexport const getAngle = Konva.getAngle;\n\nexport const hitOnDragEnabled = Konva.hitOnDragEnabled;\n\nexport const isBrowser = Konva.isBrowser;\n\nexport const isDragReady = Konva.isDragReady;\n\nexport const isDragging = Konva.isDragging;\n\nexport const isTransforming = Konva.isTransforming;\n\nexport const isUnminified = Konva.isUnminified;\n\nexport const legacyTextRendering = Konva.legacyTextRendering;\n\nexport const pixelRatio = Konva.pixelRatio;\n\nexport const pointerEventsEnabled = Konva.pointerEventsEnabled;\n\nexport const releaseCanvasOnDestroy = Konva.releaseCanvasOnDestroy;\n\nexport const shapes = Konva.shapes;\n\nexport const showWarnings = Konva.showWarnings;\n\nexport const stages = Konva.stages;\n\nexport const version = Konva.version;\n","import { BaseGraphicsLibrary, type InitContext } from \"@nanoforge-dev/common\";\n\nimport * as Graphics from \"./exports/konva\";\n\nexport class Graphics2DLibrary extends BaseGraphicsLibrary {\n private _stage?: Graphics.Stage;\n private _baseLayer?: Graphics.Layer;\n\n get __name(): string {\n return \"Graphics2DLibrary\";\n }\n\n get stage(): Graphics.Stage {\n if (!this._stage) this.throwNotInitializedError();\n return this._stage;\n }\n\n get baseLayer(): Graphics.Layer {\n if (!this._baseLayer) this.throwNotInitializedError();\n return this._baseLayer;\n }\n\n public override async __init(context: InitContext): Promise<void> {\n if (!context.container) {\n throw new Error(\"Can't initialize the container context\");\n }\n this._stage = new Graphics.Stage({\n container: context.container,\n width: context.container.offsetWidth,\n height: context.container.offsetHeight,\n });\n this._baseLayer = new Graphics.Layer();\n this._stage.add(this._baseLayer);\n }\n\n public async __run(): Promise<void> {}\n}\n"],"mappings":"iFAEA,MAAa,EAAY,EAAM,UAGlB,EAAM,EAAM,IAKZ,EAAQ,EAAM,MAKd,EAAS,EAAM,OAGf,EAAS,E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EAAM,OAEf,GAAU,EAAM,QClO7B,IAAa,GAAb,cAAuC,CAAoB,CACzD,OACA,WAEA,IAAI,QAAiB,CACnB,MAAO,
|
|
1
|
+
{"version":3,"file":"index.js","names":["Graphics.Stage","Graphics.Layer"],"sources":["../src/exports/konva.ts","../src/graphics-2d.library.ts"],"sourcesContent":["import Konva from \"konva\";\n\nexport const Animation = Konva.Animation;\nexport type Animation = Konva.Animation;\n\nexport const Arc = Konva.Arc;\nexport type Arc = Konva.Arc;\n\nexport type ArcConfig = Konva.ArcConfig;\n\nexport const Arrow = Konva.Arrow;\nexport type Arrow = Konva.Arrow;\n\nexport type ArrowConfig = Konva.ArrowConfig;\n\nexport const Canvas = Konva.Canvas;\nexport type Canvas = typeof Konva.Canvas;\n\nexport const Circle = Konva.Circle;\nexport type Circle = Konva.Circle;\n\nexport type CircleConfig = Konva.CircleConfig;\n\nexport const Container = Konva.Container;\nexport type Container = Konva.Container;\n\nexport type ContainerConfig = Konva.ContainerConfig;\n\nexport const Context = Konva.Context;\nexport type Context = Konva.Context;\n\nexport const DD = Konva.DD;\nexport type DD = typeof Konva.DD;\n\nexport const Easings = Konva.Easings;\nexport type Easings = typeof Konva.Easings;\n\nexport const Ellipse = Konva.Ellipse;\nexport type Ellipse = Konva.Ellipse;\n\nexport type EllipseConfig = Konva.EllipseConfig;\n\nexport const FastLayer = Konva.FastLayer;\nexport type FastLayer = Konva.FastLayer;\n\nexport const Filters = Konva.Filters;\nexport type Filters = typeof Konva.Filters;\n\nexport const Group = Konva.Group;\nexport type Group = Konva.Group;\n\nexport type GroupConfig = Konva.GroupConfig;\n\nexport const Image = Konva.Image;\nexport type Image = Konva.Image;\n\nexport type ImageConfig = Konva.ImageConfig;\n\nexport type KonvaEventListener<This, EventType> = Konva.KonvaEventListener<This, EventType>;\n\nexport type KonvaEventObject<EventType> = Konva.KonvaEventObject<EventType>;\n\nexport type KonvaPointerEvent = Konva.KonvaPointerEvent;\n\nexport const Label = Konva.Label;\nexport type Label = Konva.Label;\n\nexport type LabelConfig = Konva.LabelConfig;\n\nexport const Layer = Konva.Layer;\nexport type Layer = Konva.Layer;\n\nexport type LayerConfig = Konva.LayerConfig;\n\nexport const Line = Konva.Line;\nexport type Line = Konva.Line;\n\nexport type LineConfig = Konva.LineConfig;\n\nexport const Node = Konva.Node;\nexport type Node = Konva.Node;\n\nexport type NodeConfig = Konva.NodeConfig;\n\nexport const Path = Konva.Path;\nexport type Path = Konva.Path;\n\nexport type PathConfig = Konva.PathConfig;\n\nexport const Rect = Konva.Rect;\nexport type Rect = Konva.Rect;\n\nexport type RectConfig = Konva.RectConfig;\n\nexport const RegularPolygon = Konva.RegularPolygon;\nexport type RegularPolygon = Konva.RegularPolygon;\n\nexport type RegularPolygonConfig = Konva.RegularPolygonConfig;\n\nexport const Ring = Konva.Ring;\nexport type Ring = Konva.Ring;\n\nexport type RingConfig = Konva.RingConfig;\n\nexport const Shape = Konva.Shape;\nexport type Shape = Konva.Shape;\n\nexport type ShapeConfig = Konva.ShapeConfig;\n\nexport const Sprite = Konva.Sprite;\nexport type Sprite = Konva.Sprite;\n\nexport type SpriteConfig = Konva.SpriteConfig;\n\nexport const Stage = Konva.Stage;\nexport type Stage = Konva.Stage;\n\nexport type StageConfig = Konva.StageConfig;\n\nexport const Star = Konva.Star;\nexport type Star = Konva.Star;\n\nexport type StarConfig = Konva.StarConfig;\n\nexport const Tag = Konva.Tag;\nexport type Tag = Konva.Tag;\n\nexport type TagConfig = Konva.TagConfig;\n\nexport const Text = Konva.Text;\nexport type Text = Konva.Text;\n\nexport type TextConfig = Konva.TextConfig;\n\nexport const TextPath = Konva.TextPath;\nexport type TextPath = Konva.TextPath;\n\nexport type TextPathConfig = Konva.TextPathConfig;\n\nexport const Transform = Konva.Transform;\nexport type Transform = Konva.Transform;\n\nexport const Transformer = Konva.Transformer;\nexport type Transformer = Konva.Transformer;\n\nexport type TransformerConfig = Konva.TransformerConfig;\n\nexport const Tween = Konva.Tween;\nexport type Tween = Konva.Tween;\n\nexport type TweenConfig = Konva.TweenConfig;\n\nexport const Util = Konva.Util;\nexport type Util = typeof Konva.Util;\n\nexport type Vector2d = Konva.Vector2d;\n\nexport const Wedge = Konva.Wedge;\nexport type Wedge = Konva.Wedge;\n\nexport type WedgeConfig = Konva.WedgeConfig;\n\nexport const _global = Konva._global;\n\nexport const _injectGlobal = Konva._injectGlobal;\n\nexport const _mouseDblClickPointerId = Konva._mouseDblClickPointerId;\n\nexport const _mouseInDblClickWindow = Konva._mouseInDblClickWindow;\n\nexport const _mouseListenClick = Konva._mouseListenClick;\n\nexport const _pointerDblClickPointerId = Konva._pointerDblClickPointerId;\n\nexport const _pointerInDblClickWindow = Konva._pointerInDblClickWindow;\n\nexport const _pointerListenClick = Konva._pointerListenClick;\n\nexport const _renderBackend = Konva._renderBackend;\n\nexport const _touchDblClickPointerId = Konva._touchDblClickPointerId;\n\nexport const _touchInDblClickWindow = Konva._touchInDblClickWindow;\n\nexport const _touchListenClick = Konva._touchListenClick;\n\nexport const angleDeg = Konva.angleDeg;\n\nexport const autoDrawEnabled = Konva.autoDrawEnabled;\n\nexport const capturePointerEventsEnabled = Konva.capturePointerEventsEnabled;\n\nexport const dblClickWindow = Konva.dblClickWindow;\n\nexport const document = Konva.document;\n\nexport const dragButtons = Konva.dragButtons;\n\nexport const dragDistance = Konva.dragDistance;\n\nexport const enableTrace = Konva.enableTrace;\n\nexport const getAngle = Konva.getAngle;\n\nexport const hitOnDragEnabled = Konva.hitOnDragEnabled;\n\nexport const isBrowser = Konva.isBrowser;\n\nexport const isDragReady = Konva.isDragReady;\n\nexport const isDragging = Konva.isDragging;\n\nexport const isTransforming = Konva.isTransforming;\n\nexport const isUnminified = Konva.isUnminified;\n\nexport const legacyTextRendering = Konva.legacyTextRendering;\n\nexport const pixelRatio = Konva.pixelRatio;\n\nexport const pointerEventsEnabled = Konva.pointerEventsEnabled;\n\nexport const releaseCanvasOnDestroy = Konva.releaseCanvasOnDestroy;\n\nexport const shapes = Konva.shapes;\n\nexport const showWarnings = Konva.showWarnings;\n\nexport const stages = Konva.stages;\n\nexport const version = Konva.version;\n","import { BaseGraphicsLibrary, type InitContext } from \"@nanoforge-dev/common\";\n\nimport * as Graphics from \"./exports/konva\";\n\nexport class Graphics2DLibrary extends BaseGraphicsLibrary {\n private _stage?: Graphics.Stage;\n private _baseLayer?: Graphics.Layer;\n\n get __name(): string {\n return \"Graphics2DLibrary\";\n }\n\n get stage(): Graphics.Stage {\n if (!this._stage) this.throwNotInitializedError();\n return this._stage;\n }\n\n get baseLayer(): Graphics.Layer {\n if (!this._baseLayer) this.throwNotInitializedError();\n return this._baseLayer;\n }\n\n public override async __init(context: InitContext): Promise<void> {\n if (!context.container) {\n throw new Error(\"Can't initialize the container context\");\n }\n this._stage = new Graphics.Stage({\n container: context.container,\n width: context.container.offsetWidth,\n height: context.container.offsetHeight,\n });\n this._baseLayer = new Graphics.Layer();\n this._stage.add(this._baseLayer);\n }\n\n public async __run(): Promise<void> {}\n}\n"],"mappings":"iFAEA,MAAa,EAAY,EAAM,UAGlB,EAAM,EAAM,IAKZ,EAAQ,EAAM,MAKd,EAAS,EAAM,OAGf,EAAS,EAAM,OAKf,EAAY,EAAM,UAKlB,EAAU,EAAM,QAGhB,EAAK,EAAM,GAGX,EAAU,EAAM,QAGhB,EAAU,EAAM,QAKhB,EAAY,EAAM,UAGlB,EAAU,EAAM,QAGhB,EAAQ,EAAM,MAKd,EAAQ,EAAM,MAWd,EAAQ,EAAM,MAKd,EAAQ,EAAM,MAKd,EAAO,EAAM,KAKb,EAAO,EAAM,KAKb,EAAO,EAAM,KAKb,EAAO,EAAM,KAKb,EAAiB,EAAM,eAKvB,EAAO,EAAM,KAKb,EAAQ,EAAM,MAKd,EAAS,EAAM,OAKf,EAAQ,EAAM,MAKd,EAAO,EAAM,KAKb,EAAM,EAAM,IAKZ,EAAO,EAAM,KAKb,EAAW,EAAM,SAKjB,EAAY,EAAM,UAGlB,EAAc,EAAM,YAKpB,EAAQ,EA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,CACjC,CAEA,MAAa,OAAuB,CAAC,CACvC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@nanoforge-dev/graphics-2d",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.3.0",
|
|
5
5
|
"description": "NanoForge Engine - Graphics-2d",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"nanoforge",
|
|
@@ -48,16 +48,17 @@
|
|
|
48
48
|
"funding": "https://github.com/NanoForge-dev/Engine?sponsor",
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"konva": "^10.2.3",
|
|
51
|
-
"@nanoforge-dev/common": "1.
|
|
51
|
+
"@nanoforge-dev/common": "1.3.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@favware/cliff-jumper": "^6.0.0",
|
|
55
55
|
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
|
|
56
|
-
"eslint": "^10.
|
|
56
|
+
"eslint": "^10.4.0",
|
|
57
57
|
"prettier": "^3.8.3",
|
|
58
|
-
"tsdown": "^0.
|
|
58
|
+
"tsdown": "^0.22.0",
|
|
59
59
|
"typescript": "^6.0.3",
|
|
60
|
-
"
|
|
60
|
+
"unrun": "^0.3.0",
|
|
61
|
+
"vitest": "^4.1.7",
|
|
61
62
|
"@nanoforge-dev/utils-eslint-config": "1.0.2",
|
|
62
63
|
"@nanoforge-dev/utils-prettier-config": "1.0.2"
|
|
63
64
|
},
|
|
@@ -81,6 +82,7 @@
|
|
|
81
82
|
"format": "prettier --write . && eslint --fix --format=pretty src",
|
|
82
83
|
"test:unit": "vitest run --config ../../vitest.config.ts",
|
|
83
84
|
"changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/graphics-2d/*'",
|
|
84
|
-
"release": "cliff-jumper"
|
|
85
|
+
"release": "cliff-jumper",
|
|
86
|
+
"mint-tsdocs": "mint-tsdocs generate"
|
|
85
87
|
}
|
|
86
88
|
}
|