@joint/core 4.2.0-alpha.0 → 4.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +3 -1
  2. package/dist/geometry.js +2 -2
  3. package/dist/geometry.min.js +3 -3
  4. package/dist/joint.d.ts +595 -198
  5. package/dist/joint.js +3895 -1304
  6. package/dist/joint.min.js +3 -3
  7. package/dist/joint.nowrap.js +3895 -1304
  8. package/dist/joint.nowrap.min.js +3 -3
  9. package/dist/vectorizer.js +21 -8
  10. package/dist/vectorizer.min.js +3 -3
  11. package/dist/version.mjs +1 -1
  12. package/package.json +13 -13
  13. package/src/V/index.mjs +20 -5
  14. package/src/alg/Deque.mjs +126 -0
  15. package/src/cellTools/Boundary.mjs +15 -13
  16. package/src/cellTools/Button.mjs +7 -5
  17. package/src/cellTools/Control.mjs +37 -14
  18. package/src/cellTools/HoverConnect.mjs +5 -1
  19. package/src/cellTools/helpers.mjs +44 -3
  20. package/src/config/index.mjs +11 -1
  21. package/src/dia/Cell.mjs +96 -83
  22. package/src/dia/CellCollection.mjs +136 -0
  23. package/src/dia/CellView.mjs +6 -0
  24. package/src/dia/Element.mjs +6 -5
  25. package/src/dia/ElementView.mjs +2 -1
  26. package/src/dia/Graph.mjs +610 -317
  27. package/src/dia/GraphLayer.mjs +53 -0
  28. package/src/dia/GraphLayerCollection.mjs +313 -0
  29. package/src/dia/GraphLayerView.mjs +128 -0
  30. package/src/dia/GraphLayersController.mjs +166 -0
  31. package/src/dia/GraphTopologyIndex.mjs +222 -0
  32. package/src/dia/{layers/GridLayer.mjs → GridLayerView.mjs} +23 -16
  33. package/src/dia/HighlighterView.mjs +22 -0
  34. package/src/dia/{PaperLayer.mjs → LayerView.mjs} +52 -17
  35. package/src/dia/LegacyGraphLayerView.mjs +14 -0
  36. package/src/dia/LinkView.mjs +118 -98
  37. package/src/dia/Paper.mjs +1441 -620
  38. package/src/dia/ToolView.mjs +4 -0
  39. package/src/dia/ToolsView.mjs +14 -5
  40. package/src/dia/attributes/text.mjs +4 -2
  41. package/src/dia/index.mjs +6 -1
  42. package/src/dia/ports.mjs +213 -84
  43. package/src/dia/symbols.mjs +24 -0
  44. package/src/elementTools/HoverConnect.mjs +14 -8
  45. package/src/env/index.mjs +6 -3
  46. package/src/layout/ports/port.mjs +30 -15
  47. package/src/layout/ports/portLabel.mjs +1 -1
  48. package/src/mvc/Collection.mjs +19 -19
  49. package/src/mvc/Model.mjs +13 -10
  50. package/src/mvc/View.mjs +4 -0
  51. package/src/mvc/ViewBase.mjs +1 -1
  52. package/types/geometry.d.ts +64 -60
  53. package/types/joint.d.ts +520 -137
  54. package/types/vectorizer.d.ts +11 -1
@@ -27,6 +27,7 @@ export namespace Vectorizer {
27
27
  annotations?: TextAnnotation[];
28
28
  includeAnnotationIndices?: boolean;
29
29
  displayEmpty?: boolean;
30
+ useNoBreakSpace?: boolean;
30
31
  }
31
32
 
32
33
  interface GetBBoxOptions {
@@ -48,6 +49,10 @@ export namespace Vectorizer {
48
49
  attrs: { [key: string]: any };
49
50
  }
50
51
 
52
+ interface TransformToElementOptions {
53
+ safe?: boolean;
54
+ }
55
+
51
56
  // modifiable Matrix. SVGMatrix doesn't allow set on properties or a constructor.
52
57
  interface Matrix {
53
58
  a: number;
@@ -126,7 +131,7 @@ export class VElement {
126
131
  id: string;
127
132
  node: SVGElement;
128
133
 
129
- getTransformToElement(toElem: SVGGElement | VElement): SVGMatrix;
134
+ getTransformToElement(target: SVGElement | VElement, opt?: Vectorizer.TransformToElementOptions): SVGMatrix;
130
135
 
131
136
  transform(): SVGMatrix;
132
137
  transform(matrix: SVGMatrix | Vectorizer.Matrix, opt?: Vectorizer.TransformOptions): this;
@@ -233,6 +238,9 @@ interface VStatic {
233
238
 
234
239
  ensureId(node: SVGElement | VElement): string;
235
240
 
241
+ /**
242
+ * @deprecated Use regular spaces and rely on xml:space="preserve" instead.
243
+ */
236
244
  sanitizeText(text: string): string;
237
245
 
238
246
  isUndefined(value: any): boolean;
@@ -247,6 +255,8 @@ interface VStatic {
247
255
 
248
256
  qualifyAttr(name: string): Vectorizer.QualifiedAttribute;
249
257
 
258
+ getCommonAncestor(node1: SVGElement | VElement, node2: SVGElement | VElement): SVGElement | null;
259
+
250
260
  transformStringToMatrix(transform: string): SVGMatrix;
251
261
 
252
262
  matrixToTransformString(matrix: SVGMatrix | Vectorizer.Matrix): string;