@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.
- package/dist/es/arrows/index.d.ts +13 -0
- package/dist/es/arrows/index.d.ts.map +1 -0
- package/dist/es/arrows/index.js +118 -0
- package/dist/es/arrows/types.d.ts +43 -0
- package/dist/es/arrows/types.d.ts.map +1 -0
- package/dist/es/compile/compile.d.ts +26 -1
- package/dist/es/compile/compile.d.ts.map +1 -1
- package/dist/es/compile/compile.js +29 -2
- package/dist/es/compile/marker-prim.d.ts +22 -0
- package/dist/es/compile/marker-prim.d.ts.map +1 -0
- package/dist/es/compile/marker-prim.js +63 -0
- package/dist/es/compile/paint.d.ts +6 -1
- package/dist/es/compile/paint.d.ts.map +1 -1
- package/dist/es/compile/paint.js +60 -3
- package/dist/es/compile/path/index.d.ts +15 -0
- package/dist/es/compile/path/index.d.ts.map +1 -1
- package/dist/es/compile/path/index.js +258 -10
- package/dist/es/compile/path/relative.d.ts.map +1 -1
- package/dist/es/compile/path/relative.js +8 -0
- package/dist/es/compile/path/shrink.d.ts +19 -6
- package/dist/es/compile/path/shrink.d.ts.map +1 -1
- package/dist/es/compile/path/shrink.js +147 -25
- package/dist/es/geometry/bend.d.ts +7 -0
- package/dist/es/geometry/bend.d.ts.map +1 -1
- package/dist/es/geometry/bend.js +26 -1
- package/dist/es/index.d.ts +14 -4
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/index.js +7 -3
- package/dist/es/ir/index.d.ts +1 -0
- package/dist/es/ir/index.d.ts.map +1 -1
- package/dist/es/ir/json.d.ts +22 -0
- package/dist/es/ir/json.d.ts.map +1 -0
- package/dist/es/ir/json.js +25 -0
- package/dist/es/ir/node.d.ts +5 -5
- package/dist/es/ir/paint.d.ts +25 -3
- package/dist/es/ir/paint.d.ts.map +1 -1
- package/dist/es/ir/paint.js +12 -6
- package/dist/es/ir/path/arrow.d.ts +28 -48
- package/dist/es/ir/path/arrow.d.ts.map +1 -1
- package/dist/es/ir/path/arrow.js +5 -5
- package/dist/es/ir/path/path.d.ts +444 -55
- package/dist/es/ir/path/path.d.ts.map +1 -1
- package/dist/es/ir/path/path.js +21 -1
- package/dist/es/ir/path/step.d.ts +363 -8
- package/dist/es/ir/path/step.d.ts.map +1 -1
- package/dist/es/ir/path/step.js +17 -4
- package/dist/es/ir/scope.d.ts +703 -189
- package/dist/es/ir/scope.d.ts.map +1 -1
- package/dist/es/pathGenerators/define.d.ts +16 -0
- package/dist/es/pathGenerators/define.d.ts.map +1 -0
- package/dist/es/pathGenerators/define.js +23 -0
- package/dist/es/pathGenerators/index.d.ts +9 -0
- package/dist/es/pathGenerators/index.d.ts.map +1 -0
- package/dist/es/pathGenerators/types.d.ts +45 -0
- package/dist/es/pathGenerators/types.d.ts.map +1 -0
- package/dist/es/patterns/index.d.ts +10 -0
- package/dist/es/patterns/index.d.ts.map +1 -0
- package/dist/es/patterns/index.js +83 -0
- package/dist/es/patterns/types.d.ts +38 -0
- package/dist/es/patterns/types.d.ts.map +1 -0
- package/dist/es/primitive/index.d.ts +1 -0
- package/dist/es/primitive/index.d.ts.map +1 -1
- package/dist/es/primitive/marker.d.ts +160 -0
- package/dist/es/primitive/marker.d.ts.map +1 -0
- package/dist/es/primitive/paint.d.ts +24 -2
- package/dist/es/primitive/paint.d.ts.map +1 -1
- package/dist/es/primitive/path.d.ts +22 -18
- package/dist/es/primitive/path.d.ts.map +1 -1
- package/dist/es/primitive/scene.d.ts +1 -1
- package/dist/es/primitive/scene.d.ts.map +1 -1
- package/dist/lib/arrows/index.cjs +118 -0
- package/dist/lib/arrows/index.d.ts +13 -0
- package/dist/lib/arrows/index.d.ts.map +1 -0
- package/dist/lib/arrows/types.d.ts +43 -0
- package/dist/lib/arrows/types.d.ts.map +1 -0
- package/dist/lib/compile/compile.cjs +31 -4
- package/dist/lib/compile/compile.d.ts +26 -1
- package/dist/lib/compile/compile.d.ts.map +1 -1
- package/dist/lib/compile/marker-prim.cjs +63 -0
- package/dist/lib/compile/marker-prim.d.ts +22 -0
- package/dist/lib/compile/marker-prim.d.ts.map +1 -0
- package/dist/lib/compile/paint.cjs +60 -3
- package/dist/lib/compile/paint.d.ts +6 -1
- package/dist/lib/compile/paint.d.ts.map +1 -1
- package/dist/lib/compile/path/index.cjs +256 -8
- package/dist/lib/compile/path/index.d.ts +15 -0
- package/dist/lib/compile/path/index.d.ts.map +1 -1
- package/dist/lib/compile/path/relative.cjs +8 -0
- package/dist/lib/compile/path/relative.d.ts.map +1 -1
- package/dist/lib/compile/path/shrink.cjs +147 -25
- package/dist/lib/compile/path/shrink.d.ts +19 -6
- package/dist/lib/compile/path/shrink.d.ts.map +1 -1
- package/dist/lib/geometry/bend.cjs +26 -0
- package/dist/lib/geometry/bend.d.ts +7 -0
- package/dist/lib/geometry/bend.d.ts.map +1 -1
- package/dist/lib/index.cjs +11 -0
- package/dist/lib/index.d.ts +14 -4
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/ir/index.d.ts +1 -0
- package/dist/lib/ir/index.d.ts.map +1 -1
- package/dist/lib/ir/json.cjs +26 -0
- package/dist/lib/ir/json.d.ts +22 -0
- package/dist/lib/ir/json.d.ts.map +1 -0
- package/dist/lib/ir/node.d.ts +5 -5
- package/dist/lib/ir/paint.cjs +12 -5
- package/dist/lib/ir/paint.d.ts +25 -3
- package/dist/lib/ir/paint.d.ts.map +1 -1
- package/dist/lib/ir/path/arrow.cjs +5 -5
- package/dist/lib/ir/path/arrow.d.ts +28 -48
- package/dist/lib/ir/path/arrow.d.ts.map +1 -1
- package/dist/lib/ir/path/path.cjs +20 -0
- package/dist/lib/ir/path/path.d.ts +444 -55
- package/dist/lib/ir/path/path.d.ts.map +1 -1
- package/dist/lib/ir/path/step.cjs +17 -3
- package/dist/lib/ir/path/step.d.ts +363 -8
- package/dist/lib/ir/path/step.d.ts.map +1 -1
- package/dist/lib/ir/scope.d.ts +703 -189
- package/dist/lib/ir/scope.d.ts.map +1 -1
- package/dist/lib/pathGenerators/define.cjs +23 -0
- package/dist/lib/pathGenerators/define.d.ts +16 -0
- package/dist/lib/pathGenerators/define.d.ts.map +1 -0
- package/dist/lib/pathGenerators/index.d.ts +9 -0
- package/dist/lib/pathGenerators/index.d.ts.map +1 -0
- package/dist/lib/pathGenerators/types.d.ts +45 -0
- package/dist/lib/pathGenerators/types.d.ts.map +1 -0
- package/dist/lib/patterns/index.cjs +83 -0
- package/dist/lib/patterns/index.d.ts +10 -0
- package/dist/lib/patterns/index.d.ts.map +1 -0
- package/dist/lib/patterns/types.d.ts +38 -0
- package/dist/lib/patterns/types.d.ts.map +1 -0
- package/dist/lib/primitive/index.d.ts +1 -0
- package/dist/lib/primitive/index.d.ts.map +1 -1
- package/dist/lib/primitive/marker.d.ts +160 -0
- package/dist/lib/primitive/marker.d.ts.map +1 -0
- package/dist/lib/primitive/paint.d.ts +24 -2
- package/dist/lib/primitive/paint.d.ts.map +1 -1
- package/dist/lib/primitive/path.d.ts +22 -18
- package/dist/lib/primitive/path.d.ts.map +1 -1
- package/dist/lib/primitive/scene.d.ts +1 -1
- package/dist/lib/primitive/scene.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/es/compile/path/arrow-geometry.d.ts +0 -22
- package/dist/es/compile/path/arrow-geometry.d.ts.map +0 -1
- package/dist/es/compile/path/arrow-geometry.js +0 -40
- package/dist/lib/compile/path/arrow-geometry.cjs +0 -41
- package/dist/lib/compile/path/arrow-geometry.d.ts +0 -22
- 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"}
|