@retikz/core 0.2.0-alpha.7 → 0.2.0-alpha.8

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 (147) hide show
  1. package/dist/es/arrows/index.d.ts +13 -0
  2. package/dist/es/arrows/index.d.ts.map +1 -0
  3. package/dist/es/arrows/index.js +118 -0
  4. package/dist/es/arrows/types.d.ts +43 -0
  5. package/dist/es/arrows/types.d.ts.map +1 -0
  6. package/dist/es/compile/compile.d.ts +26 -1
  7. package/dist/es/compile/compile.d.ts.map +1 -1
  8. package/dist/es/compile/compile.js +29 -2
  9. package/dist/es/compile/marker-prim.d.ts +22 -0
  10. package/dist/es/compile/marker-prim.d.ts.map +1 -0
  11. package/dist/es/compile/marker-prim.js +63 -0
  12. package/dist/es/compile/paint.d.ts +6 -1
  13. package/dist/es/compile/paint.d.ts.map +1 -1
  14. package/dist/es/compile/paint.js +60 -3
  15. package/dist/es/compile/path/index.d.ts +15 -0
  16. package/dist/es/compile/path/index.d.ts.map +1 -1
  17. package/dist/es/compile/path/index.js +258 -10
  18. package/dist/es/compile/path/relative.d.ts.map +1 -1
  19. package/dist/es/compile/path/relative.js +8 -0
  20. package/dist/es/compile/path/shrink.d.ts +19 -6
  21. package/dist/es/compile/path/shrink.d.ts.map +1 -1
  22. package/dist/es/compile/path/shrink.js +147 -25
  23. package/dist/es/geometry/bend.d.ts +7 -0
  24. package/dist/es/geometry/bend.d.ts.map +1 -1
  25. package/dist/es/geometry/bend.js +26 -1
  26. package/dist/es/index.d.ts +14 -4
  27. package/dist/es/index.d.ts.map +1 -1
  28. package/dist/es/index.js +7 -3
  29. package/dist/es/ir/index.d.ts +1 -0
  30. package/dist/es/ir/index.d.ts.map +1 -1
  31. package/dist/es/ir/json.d.ts +22 -0
  32. package/dist/es/ir/json.d.ts.map +1 -0
  33. package/dist/es/ir/json.js +25 -0
  34. package/dist/es/ir/node.d.ts +5 -5
  35. package/dist/es/ir/paint.d.ts +25 -3
  36. package/dist/es/ir/paint.d.ts.map +1 -1
  37. package/dist/es/ir/paint.js +12 -6
  38. package/dist/es/ir/path/arrow.d.ts +28 -48
  39. package/dist/es/ir/path/arrow.d.ts.map +1 -1
  40. package/dist/es/ir/path/arrow.js +5 -5
  41. package/dist/es/ir/path/path.d.ts +444 -55
  42. package/dist/es/ir/path/path.d.ts.map +1 -1
  43. package/dist/es/ir/path/path.js +21 -1
  44. package/dist/es/ir/path/step.d.ts +363 -8
  45. package/dist/es/ir/path/step.d.ts.map +1 -1
  46. package/dist/es/ir/path/step.js +17 -4
  47. package/dist/es/ir/scope.d.ts +703 -189
  48. package/dist/es/ir/scope.d.ts.map +1 -1
  49. package/dist/es/pathGenerators/define.d.ts +16 -0
  50. package/dist/es/pathGenerators/define.d.ts.map +1 -0
  51. package/dist/es/pathGenerators/define.js +23 -0
  52. package/dist/es/pathGenerators/index.d.ts +9 -0
  53. package/dist/es/pathGenerators/index.d.ts.map +1 -0
  54. package/dist/es/pathGenerators/types.d.ts +45 -0
  55. package/dist/es/pathGenerators/types.d.ts.map +1 -0
  56. package/dist/es/patterns/index.d.ts +10 -0
  57. package/dist/es/patterns/index.d.ts.map +1 -0
  58. package/dist/es/patterns/index.js +83 -0
  59. package/dist/es/patterns/types.d.ts +38 -0
  60. package/dist/es/patterns/types.d.ts.map +1 -0
  61. package/dist/es/primitive/index.d.ts +1 -0
  62. package/dist/es/primitive/index.d.ts.map +1 -1
  63. package/dist/es/primitive/marker.d.ts +160 -0
  64. package/dist/es/primitive/marker.d.ts.map +1 -0
  65. package/dist/es/primitive/paint.d.ts +24 -2
  66. package/dist/es/primitive/paint.d.ts.map +1 -1
  67. package/dist/es/primitive/path.d.ts +22 -18
  68. package/dist/es/primitive/path.d.ts.map +1 -1
  69. package/dist/es/primitive/scene.d.ts +1 -1
  70. package/dist/es/primitive/scene.d.ts.map +1 -1
  71. package/dist/lib/arrows/index.cjs +118 -0
  72. package/dist/lib/arrows/index.d.ts +13 -0
  73. package/dist/lib/arrows/index.d.ts.map +1 -0
  74. package/dist/lib/arrows/types.d.ts +43 -0
  75. package/dist/lib/arrows/types.d.ts.map +1 -0
  76. package/dist/lib/compile/compile.cjs +31 -4
  77. package/dist/lib/compile/compile.d.ts +26 -1
  78. package/dist/lib/compile/compile.d.ts.map +1 -1
  79. package/dist/lib/compile/marker-prim.cjs +63 -0
  80. package/dist/lib/compile/marker-prim.d.ts +22 -0
  81. package/dist/lib/compile/marker-prim.d.ts.map +1 -0
  82. package/dist/lib/compile/paint.cjs +60 -3
  83. package/dist/lib/compile/paint.d.ts +6 -1
  84. package/dist/lib/compile/paint.d.ts.map +1 -1
  85. package/dist/lib/compile/path/index.cjs +256 -8
  86. package/dist/lib/compile/path/index.d.ts +15 -0
  87. package/dist/lib/compile/path/index.d.ts.map +1 -1
  88. package/dist/lib/compile/path/relative.cjs +8 -0
  89. package/dist/lib/compile/path/relative.d.ts.map +1 -1
  90. package/dist/lib/compile/path/shrink.cjs +147 -25
  91. package/dist/lib/compile/path/shrink.d.ts +19 -6
  92. package/dist/lib/compile/path/shrink.d.ts.map +1 -1
  93. package/dist/lib/geometry/bend.cjs +26 -0
  94. package/dist/lib/geometry/bend.d.ts +7 -0
  95. package/dist/lib/geometry/bend.d.ts.map +1 -1
  96. package/dist/lib/index.cjs +11 -0
  97. package/dist/lib/index.d.ts +14 -4
  98. package/dist/lib/index.d.ts.map +1 -1
  99. package/dist/lib/ir/index.d.ts +1 -0
  100. package/dist/lib/ir/index.d.ts.map +1 -1
  101. package/dist/lib/ir/json.cjs +26 -0
  102. package/dist/lib/ir/json.d.ts +22 -0
  103. package/dist/lib/ir/json.d.ts.map +1 -0
  104. package/dist/lib/ir/node.d.ts +5 -5
  105. package/dist/lib/ir/paint.cjs +12 -5
  106. package/dist/lib/ir/paint.d.ts +25 -3
  107. package/dist/lib/ir/paint.d.ts.map +1 -1
  108. package/dist/lib/ir/path/arrow.cjs +5 -5
  109. package/dist/lib/ir/path/arrow.d.ts +28 -48
  110. package/dist/lib/ir/path/arrow.d.ts.map +1 -1
  111. package/dist/lib/ir/path/path.cjs +20 -0
  112. package/dist/lib/ir/path/path.d.ts +444 -55
  113. package/dist/lib/ir/path/path.d.ts.map +1 -1
  114. package/dist/lib/ir/path/step.cjs +17 -3
  115. package/dist/lib/ir/path/step.d.ts +363 -8
  116. package/dist/lib/ir/path/step.d.ts.map +1 -1
  117. package/dist/lib/ir/scope.d.ts +703 -189
  118. package/dist/lib/ir/scope.d.ts.map +1 -1
  119. package/dist/lib/pathGenerators/define.cjs +23 -0
  120. package/dist/lib/pathGenerators/define.d.ts +16 -0
  121. package/dist/lib/pathGenerators/define.d.ts.map +1 -0
  122. package/dist/lib/pathGenerators/index.d.ts +9 -0
  123. package/dist/lib/pathGenerators/index.d.ts.map +1 -0
  124. package/dist/lib/pathGenerators/types.d.ts +45 -0
  125. package/dist/lib/pathGenerators/types.d.ts.map +1 -0
  126. package/dist/lib/patterns/index.cjs +83 -0
  127. package/dist/lib/patterns/index.d.ts +10 -0
  128. package/dist/lib/patterns/index.d.ts.map +1 -0
  129. package/dist/lib/patterns/types.d.ts +38 -0
  130. package/dist/lib/patterns/types.d.ts.map +1 -0
  131. package/dist/lib/primitive/index.d.ts +1 -0
  132. package/dist/lib/primitive/index.d.ts.map +1 -1
  133. package/dist/lib/primitive/marker.d.ts +160 -0
  134. package/dist/lib/primitive/marker.d.ts.map +1 -0
  135. package/dist/lib/primitive/paint.d.ts +24 -2
  136. package/dist/lib/primitive/paint.d.ts.map +1 -1
  137. package/dist/lib/primitive/path.d.ts +22 -18
  138. package/dist/lib/primitive/path.d.ts.map +1 -1
  139. package/dist/lib/primitive/scene.d.ts +1 -1
  140. package/dist/lib/primitive/scene.d.ts.map +1 -1
  141. package/package.json +1 -1
  142. package/dist/es/compile/path/arrow-geometry.d.ts +0 -22
  143. package/dist/es/compile/path/arrow-geometry.d.ts.map +0 -1
  144. package/dist/es/compile/path/arrow-geometry.js +0 -40
  145. package/dist/lib/compile/path/arrow-geometry.cjs +0 -41
  146. package/dist/lib/compile/path/arrow-geometry.d.ts +0 -22
  147. package/dist/lib/compile/path/arrow-geometry.d.ts.map +0 -1
@@ -1,22 +0,0 @@
1
- import { ArrowShape } from '../../ir';
2
- import { ArrowEndSpec } from '../../primitive';
3
- /** 箭头形状几何:供路径端点收缩计算使用 */
4
- export type ArrowShapeGeometry = {
5
- /** 标准局部坐标基准尺寸 */
6
- baseSize: number;
7
- /** 箭头尖端在标准局部坐标里的 x 位置 */
8
- tipX: number;
9
- /** 路径线段应接触箭头尾部或凹口的位置 */
10
- lineContactX: number;
11
- /** 默认箭头长度 */
12
- defaultLength: number;
13
- /** 默认箭头宽度 */
14
- defaultWidth: number;
15
- /** 空心箭头默认描边宽度 */
16
- hollowLineWidth?: number;
17
- };
18
- /** 箭头形状是否为空心描边形状 */
19
- export declare const isHollowArrowShape: (shape: ArrowShape) => boolean;
20
- /** 解析端点箭头在标准局部坐标中的中性几何 */
21
- export declare const resolveArrowShapeGeometry: (spec: ArrowEndSpec) => ArrowShapeGeometry;
22
- //# sourceMappingURL=arrow-geometry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"arrow-geometry.d.ts","sourceRoot":"","sources":["../../../../src/compile/path/arrow-geometry.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAKpD,yBAAyB;AACzB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,iBAAiB;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,oBAAoB;AACpB,eAAO,MAAM,kBAAkB,GAAI,OAAO,UAAU,KAAG,OACvB,CAAC;AAEjC,0BAA0B;AAC1B,eAAO,MAAM,yBAAyB,GAAI,MAAM,YAAY,KAAG,kBAgC9D,CAAC"}
@@ -1,40 +0,0 @@
1
- import { HOLLOW_ARROW_SHAPES } from "../../ir/path/arrow.js";
2
- //#region src/compile/path/arrow-geometry.ts
3
- /** 标准箭头局部坐标基准尺寸 */
4
- var ARROW_GEOMETRY_BASE_SIZE = 10;
5
- /** 箭头形状是否为空心描边形状 */
6
- var isHollowArrowShape = (shape) => HOLLOW_ARROW_SHAPES.has(shape);
7
- /** 解析端点箭头在标准局部坐标中的中性几何 */
8
- var resolveArrowShapeGeometry = (spec) => {
9
- const lineWidth = spec.lineWidth ?? 1.5;
10
- const base = {
11
- baseSize: ARROW_GEOMETRY_BASE_SIZE,
12
- tipX: ARROW_GEOMETRY_BASE_SIZE,
13
- lineContactX: 0,
14
- defaultLength: 6,
15
- defaultWidth: 6
16
- };
17
- switch (spec.shape) {
18
- case "normal":
19
- case "diamond":
20
- case "circle": return base;
21
- case "stealth": return {
22
- ...base,
23
- lineContactX: 3
24
- };
25
- case "open":
26
- case "openDiamond": return {
27
- ...base,
28
- tipX: 9,
29
- lineContactX: 1 - lineWidth / 2,
30
- hollowLineWidth: lineWidth
31
- };
32
- case "openCircle": return {
33
- ...base,
34
- lineContactX: .75 - lineWidth / 2,
35
- hollowLineWidth: lineWidth
36
- };
37
- }
38
- };
39
- //#endregion
40
- export { isHollowArrowShape, resolveArrowShapeGeometry };
@@ -1,41 +0,0 @@
1
- const require_arrow = require("../../ir/path/arrow.cjs");
2
- //#region src/compile/path/arrow-geometry.ts
3
- /** 标准箭头局部坐标基准尺寸 */
4
- var ARROW_GEOMETRY_BASE_SIZE = 10;
5
- /** 箭头形状是否为空心描边形状 */
6
- var isHollowArrowShape = (shape) => require_arrow.HOLLOW_ARROW_SHAPES.has(shape);
7
- /** 解析端点箭头在标准局部坐标中的中性几何 */
8
- var resolveArrowShapeGeometry = (spec) => {
9
- const lineWidth = spec.lineWidth ?? 1.5;
10
- const base = {
11
- baseSize: ARROW_GEOMETRY_BASE_SIZE,
12
- tipX: ARROW_GEOMETRY_BASE_SIZE,
13
- lineContactX: 0,
14
- defaultLength: 6,
15
- defaultWidth: 6
16
- };
17
- switch (spec.shape) {
18
- case "normal":
19
- case "diamond":
20
- case "circle": return base;
21
- case "stealth": return {
22
- ...base,
23
- lineContactX: 3
24
- };
25
- case "open":
26
- case "openDiamond": return {
27
- ...base,
28
- tipX: 9,
29
- lineContactX: 1 - lineWidth / 2,
30
- hollowLineWidth: lineWidth
31
- };
32
- case "openCircle": return {
33
- ...base,
34
- lineContactX: .75 - lineWidth / 2,
35
- hollowLineWidth: lineWidth
36
- };
37
- }
38
- };
39
- //#endregion
40
- exports.isHollowArrowShape = isHollowArrowShape;
41
- exports.resolveArrowShapeGeometry = resolveArrowShapeGeometry;
@@ -1,22 +0,0 @@
1
- import { ArrowShape } from '../../ir';
2
- import { ArrowEndSpec } from '../../primitive';
3
- /** 箭头形状几何:供路径端点收缩计算使用 */
4
- export type ArrowShapeGeometry = {
5
- /** 标准局部坐标基准尺寸 */
6
- baseSize: number;
7
- /** 箭头尖端在标准局部坐标里的 x 位置 */
8
- tipX: number;
9
- /** 路径线段应接触箭头尾部或凹口的位置 */
10
- lineContactX: number;
11
- /** 默认箭头长度 */
12
- defaultLength: number;
13
- /** 默认箭头宽度 */
14
- defaultWidth: number;
15
- /** 空心箭头默认描边宽度 */
16
- hollowLineWidth?: number;
17
- };
18
- /** 箭头形状是否为空心描边形状 */
19
- export declare const isHollowArrowShape: (shape: ArrowShape) => boolean;
20
- /** 解析端点箭头在标准局部坐标中的中性几何 */
21
- export declare const resolveArrowShapeGeometry: (spec: ArrowEndSpec) => ArrowShapeGeometry;
22
- //# sourceMappingURL=arrow-geometry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"arrow-geometry.d.ts","sourceRoot":"","sources":["../../../../src/compile/path/arrow-geometry.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAKpD,yBAAyB;AACzB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,iBAAiB;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,oBAAoB;AACpB,eAAO,MAAM,kBAAkB,GAAI,OAAO,UAAU,KAAG,OACvB,CAAC;AAEjC,0BAA0B;AAC1B,eAAO,MAAM,yBAAyB,GAAI,MAAM,YAAY,KAAG,kBAgC9D,CAAC"}