@inweb/markup 26.9.3 → 26.9.5

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/markup.js CHANGED
@@ -1,3 +1,26 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
3
+ // All rights reserved.
4
+ //
5
+ // This software and its documentation and related materials are owned by
6
+ // the Alliance. The software may only be incorporated into application
7
+ // programs owned by members of the Alliance, subject to a signed
8
+ // Membership Agreement and Supplemental Software License Agreement with the
9
+ // Alliance. The structure and organization of this software are the valuable
10
+ // trade secrets of the Alliance and its suppliers. The software is also
11
+ // protected by copyright law and international treaty provisions. Application
12
+ // programs incorporating this software must include the following statement
13
+ // with their copyright notices:
14
+ //
15
+ // This application incorporates Open Design Alliance software pursuant to a
16
+ // license agreement with Open Design Alliance.
17
+ // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
18
+ // All rights reserved.
19
+ //
20
+ // By use of this software, its documentation or related materials, you
21
+ // acknowledge and accept the above terms.
22
+ ///////////////////////////////////////////////////////////////////////////////
23
+
1
24
  (function (global, factory) {
2
25
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
26
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
@@ -19,7 +42,6 @@
19
42
  var Global = {};
20
43
 
21
44
  var hasRequiredGlobal;
22
-
23
45
  function requireGlobal () {
24
46
  if (hasRequiredGlobal) return Global;
25
47
  hasRequiredGlobal = 1;
@@ -88,7 +110,7 @@
88
110
  exports.Konva[NodeClass.prototype.getClassName()] = NodeClass;
89
111
  };
90
112
  exports._registerNode = _registerNode;
91
- exports.Konva._injectGlobal(exports.Konva);
113
+ exports.Konva._injectGlobal(exports.Konva);
92
114
  } (Global));
93
115
  return Global;
94
116
  }
@@ -96,7 +118,6 @@
96
118
  var Util = {};
97
119
 
98
120
  var hasRequiredUtil;
99
-
100
121
  function requireUtil () {
101
122
  if (hasRequiredUtil) return Util;
102
123
  hasRequiredUtil = 1;
@@ -904,7 +925,7 @@
904
925
  context.lineTo(0, topLeft);
905
926
  context.arc(topLeft, topLeft, topLeft, Math.PI, (Math.PI * 3) / 2, false);
906
927
  },
907
- };
928
+ };
908
929
  } (Util));
909
930
  return Util;
910
931
  }
@@ -916,7 +937,6 @@
916
937
  var Context = {};
917
938
 
918
939
  var hasRequiredContext;
919
-
920
940
  function requireContext () {
921
941
  if (hasRequiredContext) return Context;
922
942
  hasRequiredContext = 1;
@@ -1464,7 +1484,6 @@
1464
1484
  }
1465
1485
 
1466
1486
  var hasRequiredCanvas;
1467
-
1468
1487
  function requireCanvas () {
1469
1488
  if (hasRequiredCanvas) return Canvas;
1470
1489
  hasRequiredCanvas = 1;
@@ -1586,7 +1605,6 @@
1586
1605
  var DragAndDrop = {};
1587
1606
 
1588
1607
  var hasRequiredDragAndDrop;
1589
-
1590
1608
  function requireDragAndDrop () {
1591
1609
  if (hasRequiredDragAndDrop) return DragAndDrop;
1592
1610
  hasRequiredDragAndDrop = 1;
@@ -1702,7 +1720,7 @@
1702
1720
  window.addEventListener('mouseup', exports.DD._endDragAfter, false);
1703
1721
  window.addEventListener('touchend', exports.DD._endDragAfter, false);
1704
1722
  window.addEventListener('touchcancel', exports.DD._endDragAfter, false);
1705
- }
1723
+ }
1706
1724
  } (DragAndDrop));
1707
1725
  return DragAndDrop;
1708
1726
  }
@@ -1712,7 +1730,6 @@
1712
1730
  var Validators = {};
1713
1731
 
1714
1732
  var hasRequiredValidators;
1715
-
1716
1733
  function requireValidators () {
1717
1734
  if (hasRequiredValidators) return Validators;
1718
1735
  hasRequiredValidators = 1;
@@ -1910,7 +1927,6 @@
1910
1927
  }
1911
1928
 
1912
1929
  var hasRequiredFactory;
1913
-
1914
1930
  function requireFactory () {
1915
1931
  if (hasRequiredFactory) return Factory;
1916
1932
  hasRequiredFactory = 1;
@@ -2039,13 +2055,12 @@
2039
2055
  afterSetFilter() {
2040
2056
  this._filterUpToDate = false;
2041
2057
  },
2042
- };
2058
+ };
2043
2059
  } (Factory));
2044
2060
  return Factory;
2045
2061
  }
2046
2062
 
2047
2063
  var hasRequiredNode;
2048
-
2049
2064
  function requireNode () {
2050
2065
  if (hasRequiredNode) return Node;
2051
2066
  hasRequiredNode = 1;
@@ -3502,7 +3517,6 @@
3502
3517
  var Container = {};
3503
3518
 
3504
3519
  var hasRequiredContainer;
3505
-
3506
3520
  function requireContainer () {
3507
3521
  if (hasRequiredContainer) return Container;
3508
3522
  hasRequiredContainer = 1;
@@ -3833,7 +3847,6 @@
3833
3847
  var PointerEvents = {};
3834
3848
 
3835
3849
  var hasRequiredPointerEvents;
3836
-
3837
3850
  function requirePointerEvents () {
3838
3851
  if (hasRequiredPointerEvents) return PointerEvents;
3839
3852
  hasRequiredPointerEvents = 1;
@@ -3883,7 +3896,6 @@
3883
3896
  }
3884
3897
 
3885
3898
  var hasRequiredStage;
3886
-
3887
3899
  function requireStage () {
3888
3900
  if (hasRequiredStage) return Stage;
3889
3901
  hasRequiredStage = 1;
@@ -4591,7 +4603,7 @@
4591
4603
  stage.batchDraw();
4592
4604
  });
4593
4605
  });
4594
- }
4606
+ }
4595
4607
  } (Stage));
4596
4608
  return Stage;
4597
4609
  }
@@ -4601,7 +4613,6 @@
4601
4613
  var Shape = {};
4602
4614
 
4603
4615
  var hasRequiredShape;
4604
-
4605
4616
  function requireShape () {
4606
4617
  if (hasRequiredShape) return Shape;
4607
4618
  hasRequiredShape = 1;
@@ -5149,13 +5160,12 @@
5149
5160
  drawHitFunc: 'hitFunc',
5150
5161
  getDrawHitFunc: 'getHitFunc',
5151
5162
  setDrawHitFunc: 'setHitFunc',
5152
- });
5163
+ });
5153
5164
  } (Shape));
5154
5165
  return Shape;
5155
5166
  }
5156
5167
 
5157
5168
  var hasRequiredLayer;
5158
-
5159
5169
  function requireLayer () {
5160
5170
  if (hasRequiredLayer) return Layer;
5161
5171
  hasRequiredLayer = 1;
@@ -5473,7 +5483,6 @@
5473
5483
  var FastLayer = {};
5474
5484
 
5475
5485
  var hasRequiredFastLayer;
5476
-
5477
5486
  function requireFastLayer () {
5478
5487
  if (hasRequiredFastLayer) return FastLayer;
5479
5488
  hasRequiredFastLayer = 1;
@@ -5498,7 +5507,6 @@
5498
5507
  var Group = {};
5499
5508
 
5500
5509
  var hasRequiredGroup;
5501
-
5502
5510
  function requireGroup () {
5503
5511
  if (hasRequiredGroup) return Group;
5504
5512
  hasRequiredGroup = 1;
@@ -5524,7 +5532,6 @@
5524
5532
  var Animation = {};
5525
5533
 
5526
5534
  var hasRequiredAnimation;
5527
-
5528
5535
  function requireAnimation () {
5529
5536
  if (hasRequiredAnimation) return Animation;
5530
5537
  hasRequiredAnimation = 1;
@@ -5679,7 +5686,6 @@
5679
5686
  var Tween = {};
5680
5687
 
5681
5688
  var hasRequiredTween;
5682
-
5683
5689
  function requireTween () {
5684
5690
  if (hasRequiredTween) return Tween;
5685
5691
  hasRequiredTween = 1;
@@ -6217,13 +6223,12 @@
6217
6223
  Linear(t, b, c, d) {
6218
6224
  return (c * t) / d + b;
6219
6225
  },
6220
- };
6226
+ };
6221
6227
  } (Tween));
6222
6228
  return Tween;
6223
6229
  }
6224
6230
 
6225
6231
  var hasRequired_CoreInternals;
6226
-
6227
6232
  function require_CoreInternals () {
6228
6233
  if (hasRequired_CoreInternals) return _CoreInternals;
6229
6234
  hasRequired_CoreInternals = 1;
@@ -6263,7 +6268,7 @@
6263
6268
  Context: Context_1.Context,
6264
6269
  Canvas: Canvas_1.Canvas,
6265
6270
  });
6266
- exports.default = exports.Konva;
6271
+ exports.default = exports.Konva;
6267
6272
  } (_CoreInternals));
6268
6273
  return _CoreInternals;
6269
6274
  }
@@ -6271,7 +6276,6 @@
6271
6276
  var Arc = {};
6272
6277
 
6273
6278
  var hasRequiredArc;
6274
-
6275
6279
  function requireArc () {
6276
6280
  if (hasRequiredArc) return Arc;
6277
6281
  hasRequiredArc = 1;
@@ -6346,7 +6350,6 @@
6346
6350
  var Line = {};
6347
6351
 
6348
6352
  var hasRequiredLine;
6349
-
6350
6353
  function requireLine () {
6351
6354
  if (hasRequiredLine) return Line;
6352
6355
  hasRequiredLine = 1;
@@ -6517,7 +6520,6 @@
6517
6520
  var BezierFunctions = {};
6518
6521
 
6519
6522
  var hasRequiredBezierFunctions;
6520
-
6521
6523
  function requireBezierFunctions () {
6522
6524
  if (hasRequiredBezierFunctions) return BezierFunctions;
6523
6525
  hasRequiredBezierFunctions = 1;
@@ -7310,13 +7312,12 @@
7310
7312
  }
7311
7313
  return t;
7312
7314
  };
7313
- exports.t2length = t2length;
7315
+ exports.t2length = t2length;
7314
7316
  } (BezierFunctions));
7315
7317
  return BezierFunctions;
7316
7318
  }
7317
7319
 
7318
7320
  var hasRequiredPath;
7319
-
7320
7321
  function requirePath () {
7321
7322
  if (hasRequiredPath) return Path;
7322
7323
  hasRequiredPath = 1;
@@ -7933,7 +7934,6 @@
7933
7934
  }
7934
7935
 
7935
7936
  var hasRequiredArrow;
7936
-
7937
7937
  function requireArrow () {
7938
7938
  if (hasRequiredArrow) return Arrow;
7939
7939
  hasRequiredArrow = 1;
@@ -8045,7 +8045,6 @@
8045
8045
  var Circle = {};
8046
8046
 
8047
8047
  var hasRequiredCircle;
8048
-
8049
8048
  function requireCircle () {
8050
8049
  if (hasRequiredCircle) return Circle;
8051
8050
  hasRequiredCircle = 1;
@@ -8091,7 +8090,6 @@
8091
8090
  var Ellipse = {};
8092
8091
 
8093
8092
  var hasRequiredEllipse;
8094
-
8095
8093
  function requireEllipse () {
8096
8094
  if (hasRequiredEllipse) return Ellipse;
8097
8095
  hasRequiredEllipse = 1;
@@ -8141,7 +8139,6 @@
8141
8139
  var Image$1 = {};
8142
8140
 
8143
8141
  var hasRequiredImage;
8144
-
8145
8142
  function requireImage () {
8146
8143
  if (hasRequiredImage) return Image$1;
8147
8144
  hasRequiredImage = 1;
@@ -8284,7 +8281,6 @@
8284
8281
  var Label = {};
8285
8282
 
8286
8283
  var hasRequiredLabel;
8287
-
8288
8284
  function requireLabel () {
8289
8285
  if (hasRequiredLabel) return Label;
8290
8286
  hasRequiredLabel = 1;
@@ -8471,7 +8467,6 @@
8471
8467
  var Rect = {};
8472
8468
 
8473
8469
  var hasRequiredRect;
8474
-
8475
8470
  function requireRect () {
8476
8471
  if (hasRequiredRect) return Rect;
8477
8472
  hasRequiredRect = 1;
@@ -8506,7 +8501,6 @@
8506
8501
  var RegularPolygon = {};
8507
8502
 
8508
8503
  var hasRequiredRegularPolygon;
8509
-
8510
8504
  function requireRegularPolygon () {
8511
8505
  if (hasRequiredRegularPolygon) return RegularPolygon;
8512
8506
  hasRequiredRegularPolygon = 1;
@@ -8584,7 +8578,6 @@
8584
8578
  var Ring = {};
8585
8579
 
8586
8580
  var hasRequiredRing;
8587
-
8588
8581
  function requireRing () {
8589
8582
  if (hasRequiredRing) return Ring;
8590
8583
  hasRequiredRing = 1;
@@ -8630,7 +8623,6 @@
8630
8623
  var Sprite = {};
8631
8624
 
8632
8625
  var hasRequiredSprite;
8633
-
8634
8626
  function requireSprite () {
8635
8627
  if (hasRequiredSprite) return Sprite;
8636
8628
  hasRequiredSprite = 1;
@@ -8751,7 +8743,6 @@
8751
8743
  var Star = {};
8752
8744
 
8753
8745
  var hasRequiredStar;
8754
-
8755
8746
  function requireStar () {
8756
8747
  if (hasRequiredStar) return Star;
8757
8748
  hasRequiredStar = 1;
@@ -8802,7 +8793,6 @@
8802
8793
  var Text = {};
8803
8794
 
8804
8795
  var hasRequiredText;
8805
-
8806
8796
  function requireText () {
8807
8797
  if (hasRequiredText) return Text;
8808
8798
  hasRequiredText = 1;
@@ -9250,7 +9240,6 @@
9250
9240
  var TextPath = {};
9251
9241
 
9252
9242
  var hasRequiredTextPath;
9253
-
9254
9243
  function requireTextPath () {
9255
9244
  if (hasRequiredTextPath) return TextPath;
9256
9245
  hasRequiredTextPath = 1;
@@ -9500,7 +9489,6 @@
9500
9489
  var Transformer = {};
9501
9490
 
9502
9491
  var hasRequiredTransformer;
9503
-
9504
9492
  function requireTransformer () {
9505
9493
  if (hasRequiredTransformer) return Transformer;
9506
9494
  hasRequiredTransformer = 1;
@@ -10517,7 +10505,6 @@
10517
10505
  var Wedge = {};
10518
10506
 
10519
10507
  var hasRequiredWedge;
10520
-
10521
10508
  function requireWedge () {
10522
10509
  if (hasRequiredWedge) return Wedge;
10523
10510
  hasRequiredWedge = 1;
@@ -10568,7 +10555,6 @@
10568
10555
  var Blur = {};
10569
10556
 
10570
10557
  var hasRequiredBlur;
10571
-
10572
10558
  function requireBlur () {
10573
10559
  if (hasRequiredBlur) return Blur;
10574
10560
  hasRequiredBlur = 1;
@@ -10816,7 +10802,6 @@
10816
10802
  var Brighten = {};
10817
10803
 
10818
10804
  var hasRequiredBrighten;
10819
-
10820
10805
  function requireBrighten () {
10821
10806
  if (hasRequiredBrighten) return Brighten;
10822
10807
  hasRequiredBrighten = 1;
@@ -10841,7 +10826,6 @@
10841
10826
  var Contrast = {};
10842
10827
 
10843
10828
  var hasRequiredContrast;
10844
-
10845
10829
  function requireContrast () {
10846
10830
  if (hasRequiredContrast) return Contrast;
10847
10831
  hasRequiredContrast = 1;
@@ -10889,7 +10873,6 @@
10889
10873
  var Emboss = {};
10890
10874
 
10891
10875
  var hasRequiredEmboss;
10892
-
10893
10876
  function requireEmboss () {
10894
10877
  if (hasRequiredEmboss) return Emboss;
10895
10878
  hasRequiredEmboss = 1;
@@ -11005,7 +10988,6 @@
11005
10988
  var Enhance = {};
11006
10989
 
11007
10990
  var hasRequiredEnhance;
11008
-
11009
10991
  function requireEnhance () {
11010
10992
  if (hasRequiredEnhance) return Enhance;
11011
10993
  hasRequiredEnhance = 1;
@@ -11102,7 +11084,6 @@
11102
11084
  var Grayscale = {};
11103
11085
 
11104
11086
  var hasRequiredGrayscale;
11105
-
11106
11087
  function requireGrayscale () {
11107
11088
  if (hasRequiredGrayscale) return Grayscale;
11108
11089
  hasRequiredGrayscale = 1;
@@ -11124,7 +11105,6 @@
11124
11105
  var HSL = {};
11125
11106
 
11126
11107
  var hasRequiredHSL;
11127
-
11128
11108
  function requireHSL () {
11129
11109
  if (hasRequiredHSL) return HSL;
11130
11110
  hasRequiredHSL = 1;
@@ -11161,7 +11141,6 @@
11161
11141
  var HSV = {};
11162
11142
 
11163
11143
  var hasRequiredHSV;
11164
-
11165
11144
  function requireHSV () {
11166
11145
  if (hasRequiredHSV) return HSV;
11167
11146
  hasRequiredHSV = 1;
@@ -11197,7 +11176,6 @@
11197
11176
  var Invert = {};
11198
11177
 
11199
11178
  var hasRequiredInvert;
11200
-
11201
11179
  function requireInvert () {
11202
11180
  if (hasRequiredInvert) return Invert;
11203
11181
  hasRequiredInvert = 1;
@@ -11218,7 +11196,6 @@
11218
11196
  var Kaleidoscope = {};
11219
11197
 
11220
11198
  var hasRequiredKaleidoscope;
11221
-
11222
11199
  function requireKaleidoscope () {
11223
11200
  if (hasRequiredKaleidoscope) return Kaleidoscope;
11224
11201
  hasRequiredKaleidoscope = 1;
@@ -11364,7 +11341,6 @@
11364
11341
  var Mask = {};
11365
11342
 
11366
11343
  var hasRequiredMask;
11367
-
11368
11344
  function requireMask () {
11369
11345
  if (hasRequiredMask) return Mask;
11370
11346
  hasRequiredMask = 1;
@@ -11518,7 +11494,6 @@
11518
11494
  var Noise = {};
11519
11495
 
11520
11496
  var hasRequiredNoise;
11521
-
11522
11497
  function requireNoise () {
11523
11498
  if (hasRequiredNoise) return Noise;
11524
11499
  hasRequiredNoise = 1;
@@ -11543,7 +11518,6 @@
11543
11518
  var Pixelate = {};
11544
11519
 
11545
11520
  var hasRequiredPixelate;
11546
-
11547
11521
  function requirePixelate () {
11548
11522
  if (hasRequiredPixelate) return Pixelate;
11549
11523
  hasRequiredPixelate = 1;
@@ -11616,7 +11590,6 @@
11616
11590
  var Posterize = {};
11617
11591
 
11618
11592
  var hasRequiredPosterize;
11619
-
11620
11593
  function requirePosterize () {
11621
11594
  if (hasRequiredPosterize) return Posterize;
11622
11595
  hasRequiredPosterize = 1;
@@ -11639,7 +11612,6 @@
11639
11612
  var RGB = {};
11640
11613
 
11641
11614
  var hasRequiredRGB;
11642
-
11643
11615
  function requireRGB () {
11644
11616
  if (hasRequiredRGB) return RGB;
11645
11617
  hasRequiredRGB = 1;
@@ -11690,7 +11662,6 @@
11690
11662
  var RGBA = {};
11691
11663
 
11692
11664
  var hasRequiredRGBA;
11693
-
11694
11665
  function requireRGBA () {
11695
11666
  if (hasRequiredRGBA) return RGBA;
11696
11667
  hasRequiredRGBA = 1;
@@ -11752,7 +11723,6 @@
11752
11723
  var Sepia = {};
11753
11724
 
11754
11725
  var hasRequiredSepia;
11755
-
11756
11726
  function requireSepia () {
11757
11727
  if (hasRequiredSepia) return Sepia;
11758
11728
  hasRequiredSepia = 1;
@@ -11776,7 +11746,6 @@
11776
11746
  var Solarize = {};
11777
11747
 
11778
11748
  var hasRequiredSolarize;
11779
-
11780
11749
  function requireSolarize () {
11781
11750
  if (hasRequiredSolarize) return Solarize;
11782
11751
  hasRequiredSolarize = 1;
@@ -11815,7 +11784,6 @@
11815
11784
  var Threshold = {};
11816
11785
 
11817
11786
  var hasRequiredThreshold;
11818
-
11819
11787
  function requireThreshold () {
11820
11788
  if (hasRequiredThreshold) return Threshold;
11821
11789
  hasRequiredThreshold = 1;
@@ -11836,7 +11804,6 @@
11836
11804
  }
11837
11805
 
11838
11806
  var hasRequired_FullInternals;
11839
-
11840
11807
  function require_FullInternals () {
11841
11808
  if (hasRequired_FullInternals) return _FullInternals;
11842
11809
  hasRequired_FullInternals = 1;
@@ -11924,9 +11891,7 @@
11924
11891
  }
11925
11892
 
11926
11893
  var lib = lib$1.exports;
11927
-
11928
11894
  var hasRequiredLib;
11929
-
11930
11895
  function requireLib () {
11931
11896
  if (hasRequiredLib) return lib$1.exports;
11932
11897
  hasRequiredLib = 1;
@@ -11939,28 +11904,6 @@
11939
11904
  var libExports = requireLib();
11940
11905
  var Konva = /*@__PURE__*/getDefaultExportFromCjs(libExports);
11941
11906
 
11942
- ///////////////////////////////////////////////////////////////////////////////
11943
- // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
11944
- // All rights reserved.
11945
- //
11946
- // This software and its documentation and related materials are owned by
11947
- // the Alliance. The software may only be incorporated into application
11948
- // programs owned by members of the Alliance, subject to a signed
11949
- // Membership Agreement and Supplemental Software License Agreement with the
11950
- // Alliance. The structure and organization of this software are the valuable
11951
- // trade secrets of the Alliance and its suppliers. The software is also
11952
- // protected by copyright law and international treaty provisions. Application
11953
- // programs incorporating this software must include the following statement
11954
- // with their copyright notices:
11955
- //
11956
- // This application incorporates Open Design Alliance software pursuant to a
11957
- // license agreement with Open Design Alliance.
11958
- // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
11959
- // All rights reserved.
11960
- //
11961
- // By use of this software, its documentation or related materials, you
11962
- // acknowledge and accept the above terms.
11963
- ///////////////////////////////////////////////////////////////////////////////
11964
11907
  class WorldTransform {
11965
11908
  screenToWorld(position) {
11966
11909
  return { x: position.x, y: position.y, z: 0 };
@@ -11973,62 +11916,16 @@
11973
11916
  }
11974
11917
  }
11975
11918
 
11976
- ///////////////////////////////////////////////////////////////////////////////
11977
- // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
11978
- // All rights reserved.
11979
- //
11980
- // This software and its documentation and related materials are owned by
11981
- // the Alliance. The software may only be incorporated into application
11982
- // programs owned by members of the Alliance, subject to a signed
11983
- // Membership Agreement and Supplemental Software License Agreement with the
11984
- // Alliance. The structure and organization of this software are the valuable
11985
- // trade secrets of the Alliance and its suppliers. The software is also
11986
- // protected by copyright law and international treaty provisions. Application
11987
- // programs incorporating this software must include the following statement
11988
- // with their copyright notices:
11989
- //
11990
- // This application incorporates Open Design Alliance software pursuant to a
11991
- // license agreement with Open Design Alliance.
11992
- // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
11993
- // All rights reserved.
11994
- //
11995
- // By use of this software, its documentation or related materials, you
11996
- // acknowledge and accept the above terms.
11997
- ///////////////////////////////////////////////////////////////////////////////
11998
- /**
11999
- * Defines the markup color helper object.
12000
- */
12001
11919
  class MarkupColor {
12002
- /**
12003
- * Creates an instance of the color.
12004
- *
12005
- * @param r - The `red` component of the color, as a number between 0 and 255.
12006
- * @param g - The `green` component of the color, as a number between 0 and 255.
12007
- * @param b - The `blue` component of the color, as a number between 0 and 255.
12008
- */
12009
11920
  constructor(r, g, b) {
12010
11921
  this.setColor(r, g, b);
12011
11922
  }
12012
- /**
12013
- * Returns the color as a string in hexadecimal color syntax `#RGB` using its primary color components
12014
- * (red, green, blue) written as hexadecimal numbers.
12015
- */
12016
11923
  asHex() {
12017
11924
  return "#" + this.HEX;
12018
11925
  }
12019
- /**
12020
- * Returns the color as an {r, g, b} object.
12021
- */
12022
11926
  asRGB() {
12023
11927
  return { r: this.R, g: this.G, b: this.B };
12024
11928
  }
12025
- /**
12026
- * Sets the color.
12027
- *
12028
- * @param r - The `red` component of the color, as a number between 0 and 255.
12029
- * @param g - The `green` component of the color, as a number between 0 and 255.
12030
- * @param b - The `blue` component of the color, as a number between 0 and 255.
12031
- */
12032
11929
  setColor(r, g, b) {
12033
11930
  this.R = r;
12034
11931
  this.G = g;
@@ -12044,28 +11941,6 @@
12044
11941
  }
12045
11942
  }
12046
11943
 
12047
- ///////////////////////////////////////////////////////////////////////////////
12048
- // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
12049
- // All rights reserved.
12050
- //
12051
- // This software and its documentation and related materials are owned by
12052
- // the Alliance. The software may only be incorporated into application
12053
- // programs owned by members of the Alliance, subject to a signed
12054
- // Membership Agreement and Supplemental Software License Agreement with the
12055
- // Alliance. The structure and organization of this software are the valuable
12056
- // trade secrets of the Alliance and its suppliers. The software is also
12057
- // protected by copyright law and international treaty provisions. Application
12058
- // programs incorporating this software must include the following statement
12059
- // with their copyright notices:
12060
- //
12061
- // This application incorporates Open Design Alliance software pursuant to a
12062
- // license agreement with Open Design Alliance.
12063
- // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
12064
- // All rights reserved.
12065
- //
12066
- // By use of this software, its documentation or related materials, you
12067
- // acknowledge and accept the above terms.
12068
- ///////////////////////////////////////////////////////////////////////////////
12069
11944
  const LineTypeSpecs = new Map([
12070
11945
  ["solid", []],
12071
11946
  ["dot", [30, 30, 0.001, 30]],
@@ -12238,28 +12113,6 @@
12238
12113
  }
12239
12114
  }
12240
12115
 
12241
- ///////////////////////////////////////////////////////////////////////////////
12242
- // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
12243
- // All rights reserved.
12244
- //
12245
- // This software and its documentation and related materials are owned by
12246
- // the Alliance. The software may only be incorporated into application
12247
- // programs owned by members of the Alliance, subject to a signed
12248
- // Membership Agreement and Supplemental Software License Agreement with the
12249
- // Alliance. The structure and organization of this software are the valuable
12250
- // trade secrets of the Alliance and its suppliers. The software is also
12251
- // protected by copyright law and international treaty provisions. Application
12252
- // programs incorporating this software must include the following statement
12253
- // with their copyright notices:
12254
- //
12255
- // This application incorporates Open Design Alliance software pursuant to a
12256
- // license agreement with Open Design Alliance.
12257
- // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
12258
- // All rights reserved.
12259
- //
12260
- // By use of this software, its documentation or related materials, you
12261
- // acknowledge and accept the above terms.
12262
- ///////////////////////////////////////////////////////////////////////////////
12263
12116
  class KonvaText {
12264
12117
  constructor(params, ref = null, worldTransformer = new WorldTransform()) {
12265
12118
  var _a, _b, _c;
@@ -12394,28 +12247,6 @@
12394
12247
  }
12395
12248
  }
12396
12249
 
12397
- ///////////////////////////////////////////////////////////////////////////////
12398
- // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
12399
- // All rights reserved.
12400
- //
12401
- // This software and its documentation and related materials are owned by
12402
- // the Alliance. The software may only be incorporated into application
12403
- // programs owned by members of the Alliance, subject to a signed
12404
- // Membership Agreement and Supplemental Software License Agreement with the
12405
- // Alliance. The structure and organization of this software are the valuable
12406
- // trade secrets of the Alliance and its suppliers. The software is also
12407
- // protected by copyright law and international treaty provisions. Application
12408
- // programs incorporating this software must include the following statement
12409
- // with their copyright notices:
12410
- //
12411
- // This application incorporates Open Design Alliance software pursuant to a
12412
- // license agreement with Open Design Alliance.
12413
- // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
12414
- // All rights reserved.
12415
- //
12416
- // By use of this software, its documentation or related materials, you
12417
- // acknowledge and accept the above terms.
12418
- ///////////////////////////////////////////////////////////////////////////////
12419
12250
  class KonvaRectangle {
12420
12251
  constructor(params, ref = null, worldTransformer = new WorldTransform()) {
12421
12252
  var _a, _b, _c, _d;
@@ -12592,28 +12423,6 @@
12592
12423
  return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
12593
12424
  }
12594
12425
 
12595
- ///////////////////////////////////////////////////////////////////////////////
12596
- // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
12597
- // All rights reserved.
12598
- //
12599
- // This software and its documentation and related materials are owned by
12600
- // the Alliance. The software may only be incorporated into application
12601
- // programs owned by members of the Alliance, subject to a signed
12602
- // Membership Agreement and Supplemental Software License Agreement with the
12603
- // Alliance. The structure and organization of this software are the valuable
12604
- // trade secrets of the Alliance and its suppliers. The software is also
12605
- // protected by copyright law and international treaty provisions. Application
12606
- // programs incorporating this software must include the following statement
12607
- // with their copyright notices:
12608
- //
12609
- // This application incorporates Open Design Alliance software pursuant to a
12610
- // license agreement with Open Design Alliance.
12611
- // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
12612
- // All rights reserved.
12613
- //
12614
- // By use of this software, its documentation or related materials, you
12615
- // acknowledge and accept the above terms.
12616
- ///////////////////////////////////////////////////////////////////////////////
12617
12426
  class KonvaEllipse {
12618
12427
  constructor(params, ref = null, worldTransformer = new WorldTransform()) {
12619
12428
  var _a, _b, _c;
@@ -12793,28 +12602,6 @@
12793
12602
  }
12794
12603
  }
12795
12604
 
12796
- ///////////////////////////////////////////////////////////////////////////////
12797
- // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
12798
- // All rights reserved.
12799
- //
12800
- // This software and its documentation and related materials are owned by
12801
- // the Alliance. The software may only be incorporated into application
12802
- // programs owned by members of the Alliance, subject to a signed
12803
- // Membership Agreement and Supplemental Software License Agreement with the
12804
- // Alliance. The structure and organization of this software are the valuable
12805
- // trade secrets of the Alliance and its suppliers. The software is also
12806
- // protected by copyright law and international treaty provisions. Application
12807
- // programs incorporating this software must include the following statement
12808
- // with their copyright notices:
12809
- //
12810
- // This application incorporates Open Design Alliance software pursuant to a
12811
- // license agreement with Open Design Alliance.
12812
- // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
12813
- // All rights reserved.
12814
- //
12815
- // By use of this software, its documentation or related materials, you
12816
- // acknowledge and accept the above terms.
12817
- ///////////////////////////////////////////////////////////////////////////////
12818
12605
  class KonvaArrow {
12819
12606
  constructor(params, ref = null, worldTransformer = new WorldTransform()) {
12820
12607
  var _a, _b;
@@ -12947,28 +12734,6 @@
12947
12734
  }
12948
12735
  }
12949
12736
 
12950
- ///////////////////////////////////////////////////////////////////////////////
12951
- // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
12952
- // All rights reserved.
12953
- //
12954
- // This software and its documentation and related materials are owned by
12955
- // the Alliance. The software may only be incorporated into application
12956
- // programs owned by members of the Alliance, subject to a signed
12957
- // Membership Agreement and Supplemental Software License Agreement with the
12958
- // Alliance. The structure and organization of this software are the valuable
12959
- // trade secrets of the Alliance and its suppliers. The software is also
12960
- // protected by copyright law and international treaty provisions. Application
12961
- // programs incorporating this software must include the following statement
12962
- // with their copyright notices:
12963
- //
12964
- // This application incorporates Open Design Alliance software pursuant to a
12965
- // license agreement with Open Design Alliance.
12966
- // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
12967
- // All rights reserved.
12968
- //
12969
- // By use of this software, its documentation or related materials, you
12970
- // acknowledge and accept the above terms.
12971
- ///////////////////////////////////////////////////////////////////////////////
12972
12737
  class KonvaImage {
12973
12738
  constructor(params, ref = null, worldTransformer = new WorldTransform()) {
12974
12739
  var _a, _b;
@@ -13022,7 +12787,6 @@
13022
12787
  this._ref.height() <= this.EPSILON || this._ref.width() <= this.EPSILON
13023
12788
  ? 1
13024
12789
  : this._ref.height() / this._ref.width();
13025
- // need to rescale only if input width and height are 0 - we do not loading Viewpoint with existing params
13026
12790
  if ((params.width <= this.EPSILON || params.height <= this.EPSILON) &&
13027
12791
  (params.maxWidth >= this.EPSILON || params.maxWidth >= this.EPSILON)) {
13028
12792
  const heightOutOfCanvas = params.maxHeight - this._canvasImage.height;
@@ -13181,28 +12945,6 @@
13181
12945
  }
13182
12946
  }
13183
12947
 
13184
- ///////////////////////////////////////////////////////////////////////////////
13185
- // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
13186
- // All rights reserved.
13187
- //
13188
- // This software and its documentation and related materials are owned by
13189
- // the Alliance. The software may only be incorporated into application
13190
- // programs owned by members of the Alliance, subject to a signed
13191
- // Membership Agreement and Supplemental Software License Agreement with the
13192
- // Alliance. The structure and organization of this software are the valuable
13193
- // trade secrets of the Alliance and its suppliers. The software is also
13194
- // protected by copyright law and international treaty provisions. Application
13195
- // programs incorporating this software must include the following statement
13196
- // with their copyright notices:
13197
- //
13198
- // This application incorporates Open Design Alliance software pursuant to a
13199
- // license agreement with Open Design Alliance.
13200
- // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
13201
- // All rights reserved.
13202
- //
13203
- // By use of this software, its documentation or related materials, you
13204
- // acknowledge and accept the above terms.
13205
- ///////////////////////////////////////////////////////////////////////////////
13206
12948
  class KonvaCloud {
13207
12949
  constructor(params, ref = null, worldTransformer = new WorldTransform()) {
13208
12950
  var _a, _b, _c, _d;
@@ -13303,8 +13045,6 @@
13303
13045
  }
13304
13046
  }
13305
13047
  context.closePath();
13306
- // (!) Konva specific method, it is very important
13307
- // it will apply are required styles
13308
13048
  context.fillStrokeShape(shape);
13309
13049
  }
13310
13050
  function drawRectangle() {
@@ -13314,8 +13054,6 @@
13314
13054
  context.lineTo(points[3].x, points[3].y);
13315
13055
  context.lineTo(points[4].x, points[4].y);
13316
13056
  context.closePath();
13317
- // (!) Konva specific method, it is very important
13318
- // it will apply are required styles
13319
13057
  context.fillStrokeShape(shape);
13320
13058
  }
13321
13059
  },
@@ -13451,28 +13189,6 @@
13451
13189
  }
13452
13190
  }
13453
13191
 
13454
- ///////////////////////////////////////////////////////////////////////////////
13455
- // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance").
13456
- // All rights reserved.
13457
- //
13458
- // This software and its documentation and related materials are owned by
13459
- // the Alliance. The software may only be incorporated into application
13460
- // programs owned by members of the Alliance, subject to a signed
13461
- // Membership Agreement and Supplemental Software License Agreement with the
13462
- // Alliance. The structure and organization of this software are the valuable
13463
- // trade secrets of the Alliance and its suppliers. The software is also
13464
- // protected by copyright law and international treaty provisions. Application
13465
- // programs incorporating this software must include the following statement
13466
- // with their copyright notices:
13467
- //
13468
- // This application incorporates Open Design Alliance software pursuant to a
13469
- // license agreement with Open Design Alliance.
13470
- // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance.
13471
- // All rights reserved.
13472
- //
13473
- // By use of this software, its documentation or related materials, you
13474
- // acknowledge and accept the above terms.
13475
- ///////////////////////////////////////////////////////////////////////////////
13476
13192
  const MarkupMode2Konva = {
13477
13193
  SelectMarkup: {
13478
13194
  name: "SelectMarkup",
@@ -13519,9 +13235,6 @@
13519
13235
  }, wait);
13520
13236
  };
13521
13237
  }
13522
- /**
13523
- * 2D markup core.
13524
- */
13525
13238
  class KonvaMarkup {
13526
13239
  constructor() {
13527
13240
  this._markupIsActive = false;
@@ -13546,7 +13259,7 @@
13546
13259
  return;
13547
13260
  const { width, height } = entries[0].contentRect;
13548
13261
  if (!width || !height)
13549
- return; // <- invisible container, or container with parent removed
13262
+ return;
13550
13263
  if (!this._konvaStage)
13551
13264
  return;
13552
13265
  this._konvaStage.width(width);
@@ -13558,7 +13271,7 @@
13558
13271
  this.resizeViewer = (event) => {
13559
13272
  const { width, height } = event;
13560
13273
  if (!width || !height)
13561
- return; // <- invisible container, or container with parent removed
13274
+ return;
13562
13275
  if (!this._konvaStage)
13563
13276
  return;
13564
13277
  this._konvaStage.width(width);
@@ -13582,12 +13295,8 @@
13582
13295
  this._viewer.emit(event);
13583
13296
  };
13584
13297
  this.getRelativePointPosition = (point, node) => {
13585
- // the function will return pointer position relative to the passed node
13586
13298
  const transform = node.getAbsoluteTransform().copy();
13587
- // to detect relative position we need to invert transform
13588
13299
  transform.invert();
13589
- // get pointer (say mouse or touch) position
13590
- // now we find relative point
13591
13300
  return transform.point(point);
13592
13301
  };
13593
13302
  this.getRelativePointerPosition = (node) => {
@@ -13605,7 +13314,7 @@
13605
13314
  this._markupContainer.style.position = "absolute";
13606
13315
  this._markupContainer.style.top = "0px";
13607
13316
  this._markupContainer.style.left = "0px";
13608
- this._markupContainer.style.outline = "0px"; // <- to eliminate grey box during delete elements
13317
+ this._markupContainer.style.outline = "0px";
13609
13318
  this._markupContainer.style.pointerEvents = "none";
13610
13319
  const parentDiv = this._container.parentElement;
13611
13320
  parentDiv.appendChild(this._markupContainer);
@@ -13791,7 +13500,6 @@
13791
13500
  const konvaShape = MarkupMode2Konva[type];
13792
13501
  if (!konvaShape || !konvaShape.initializer)
13793
13502
  return [];
13794
- // for "draggable" Konva uses Rectangles in Transformer. We need only Shapes from layer.
13795
13503
  return this._konvaLayer
13796
13504
  .find(konvaShape.name)
13797
13505
  .filter((ref) => ref.parent === this._konvaLayer ||
@@ -13800,7 +13508,6 @@
13800
13508
  ref.parent === this._groupTexts);
13801
13509
  }
13802
13510
  initializeKonva() {
13803
- // first we need Konva core things: stage and layer
13804
13511
  const stage = new Konva.Stage({
13805
13512
  container: this._markupContainer,
13806
13513
  width: this._container.clientWidth,
@@ -13828,7 +13535,6 @@
13828
13535
  let mouseDownPos;
13829
13536
  let lastObj;
13830
13537
  stage.on("mousedown touchstart", (e) => {
13831
- // do nothing if we mousedown on any shape
13832
13538
  if (!this._markupIsActive || e.target !== stage || this._markupMode === "Text" || this._markupMode === "Image")
13833
13539
  return;
13834
13540
  if (e.target === stage && transformer.nodes().length > 0) {
@@ -13839,7 +13545,6 @@
13839
13545
  mouseDownPos = pos;
13840
13546
  isPaint = ["Arrow", "Cloud", "Ellipse", "Line", "Rectangle"].some((m) => m === this._markupMode);
13841
13547
  if (this._markupMode === "Line") {
13842
- // add point twice, so we have some drawings even on a simple click
13843
13548
  lastLine = this.addLine([pos.x, pos.y, pos.x, pos.y]);
13844
13549
  }
13845
13550
  });
@@ -13877,8 +13582,6 @@
13877
13582
  if (!isPaint) {
13878
13583
  return;
13879
13584
  }
13880
- // prevent scrolling on touch devices
13881
- //e.evt.preventDefault();
13882
13585
  const pos = this.getRelativePointerPosition(stage);
13883
13586
  const defParams = mouseDownPos && pos.x === mouseDownPos.x && pos.y === mouseDownPos.y;
13884
13587
  const startX = defParams ? mouseDownPos.x : Math.min(mouseDownPos.x, pos.x);
@@ -13922,11 +13625,9 @@
13922
13625
  lastObj = this.addCloud({ x: startX, y: startY }, null, dX, dY);
13923
13626
  }
13924
13627
  });
13925
- // clicks should select/deselect shapes
13926
13628
  stage.on("click tap", (e) => {
13927
13629
  if (!this._markupIsActive)
13928
13630
  return;
13929
- // if click on empty area - remove all selections
13930
13631
  if (e.target === stage) {
13931
13632
  if (this._markupMode === "Text") {
13932
13633
  if (this._textInputRef && this._textInputRef.value)
@@ -13979,32 +13680,23 @@
13979
13680
  else {
13980
13681
  transformer.rotateEnabled(true);
13981
13682
  }
13982
- // do we pressed shift or ctrl?
13983
13683
  const metaPressed = e.evt.shiftKey || e.evt.ctrlKey || e.evt.metaKey;
13984
13684
  const isSelected = transformer.nodes().indexOf(e.target) >= 0;
13985
13685
  if (!metaPressed && !isSelected) {
13986
- // if no key pressed and the node is not selected
13987
- // select just one
13988
13686
  transformer.nodes([e.target]);
13989
13687
  }
13990
13688
  else if (metaPressed && isSelected) {
13991
- // if we pressed keys and node was selected
13992
- // we need to remove it from selection:
13993
- const nodes = transformer.nodes().slice(); // use slice to have new copy of array
13994
- // remove node from array
13689
+ const nodes = transformer.nodes().slice();
13995
13690
  nodes.splice(nodes.indexOf(e.target), 1);
13996
13691
  transformer.nodes(nodes);
13997
13692
  }
13998
13693
  else if (metaPressed && !isSelected) {
13999
- // add the node into selection
14000
13694
  const nodes = transformer.nodes().concat([e.target]);
14001
13695
  transformer.nodes(nodes);
14002
13696
  }
14003
13697
  });
14004
13698
  const container = stage.container();
14005
13699
  container.tabIndex = 1;
14006
- // focus it
14007
- // also stage will be in focus on its click
14008
13700
  container.focus();
14009
13701
  container.addEventListener("keydown", (e) => {
14010
13702
  if (!this._markupIsActive)
@@ -14118,7 +13810,6 @@
14118
13810
  getMarkupArrows() {
14119
13811
  const arrows = [];
14120
13812
  this.konvaLayerFind("Arrow").forEach((ref) => {
14121
- // we need getAbsoluteTransform because inside Konva position starts from {0, 0}
14122
13813
  const wcsStart = ref.getAttr("wcsStart");
14123
13814
  const wcsEnd = ref.getAttr("wcsEnd");
14124
13815
  const shape = new KonvaArrow(null, ref, this._worldTransformer);
@@ -14290,11 +13981,9 @@
14290
13981
  var _a;
14291
13982
  if (!text)
14292
13983
  return;
14293
- // in case of edit - remove old Konva.Text object
14294
13984
  (_a = this.getSelectedObjects().shift()) === null || _a === void 0 ? void 0 : _a.delete();
14295
13985
  this.clearSelected();
14296
13986
  this.removeTextInput();
14297
- // in case we have old viewpoint without font_size
14298
13987
  const tolerance = 1.0e-6;
14299
13988
  if (textSize && textSize > tolerance && (!fontSize || fontSize < tolerance)) {
14300
13989
  const size = 0.02;
@@ -14373,7 +14062,6 @@
14373
14062
  var _a;
14374
14063
  if (!position || !src)
14375
14064
  return;
14376
- // in case of edit - remove old Image placeholder object
14377
14065
  (_a = this.getSelectedObjects().shift()) === null || _a === void 0 ? void 0 : _a.delete();
14378
14066
  this.clearSelected();
14379
14067
  this.removeImageInput();