@retikz/react 0.1.0-alpha.1 → 0.1.0-alpha.3
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/index.d.ts +5 -5
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/index.js +3 -1
- package/dist/es/kernel/Node.d.ts +59 -8
- package/dist/es/kernel/Node.d.ts.map +1 -1
- package/dist/es/kernel/Path.d.ts +12 -0
- package/dist/es/kernel/Path.d.ts.map +1 -1
- package/dist/es/kernel/Step.d.ts +86 -3
- package/dist/es/kernel/Step.d.ts.map +1 -1
- package/dist/es/kernel/Text.d.ts +31 -0
- package/dist/es/kernel/Text.d.ts.map +1 -0
- package/dist/es/kernel/Text.js +22 -0
- package/dist/es/kernel/_builder.d.ts.map +1 -1
- package/dist/es/kernel/_builder.js +215 -27
- package/dist/es/kernel/_displayNames.d.ts +4 -0
- package/dist/es/kernel/_displayNames.d.ts.map +1 -1
- package/dist/es/kernel/_displayNames.js +5 -1
- package/dist/es/kernel/_unbuilder.d.ts.map +1 -1
- package/dist/es/kernel/_unbuilder.js +78 -2
- package/dist/es/kernel/index.d.ts +1 -0
- package/dist/es/kernel/index.d.ts.map +1 -1
- package/dist/es/kernel/index.js +1 -0
- package/dist/es/render/renderPrim.d.ts.map +1 -1
- package/dist/es/render/renderPrim.js +31 -13
- package/dist/es/sugar/Draw.d.ts +20 -2
- package/dist/es/sugar/Draw.d.ts.map +1 -1
- package/dist/es/sugar/Draw.js +57 -3
- package/dist/es/sugar/EdgeLabel.d.ts +20 -0
- package/dist/es/sugar/EdgeLabel.d.ts.map +1 -0
- package/dist/es/sugar/EdgeLabel.js +13 -0
- package/dist/es/sugar/index.d.ts +1 -0
- package/dist/es/sugar/index.d.ts.map +1 -1
- package/dist/es/sugar/index.js +1 -0
- package/dist/lib/index.cjs +4 -0
- package/dist/lib/index.d.ts +5 -5
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/kernel/Node.d.ts +59 -8
- package/dist/lib/kernel/Node.d.ts.map +1 -1
- package/dist/lib/kernel/Path.d.ts +12 -0
- package/dist/lib/kernel/Path.d.ts.map +1 -1
- package/dist/lib/kernel/Step.d.ts +86 -3
- package/dist/lib/kernel/Step.d.ts.map +1 -1
- package/dist/lib/kernel/Text.cjs +22 -0
- package/dist/lib/kernel/Text.d.ts +31 -0
- package/dist/lib/kernel/Text.d.ts.map +1 -0
- package/dist/lib/kernel/_builder.cjs +214 -26
- package/dist/lib/kernel/_builder.d.ts.map +1 -1
- package/dist/lib/kernel/_displayNames.cjs +6 -0
- package/dist/lib/kernel/_displayNames.d.ts +4 -0
- package/dist/lib/kernel/_displayNames.d.ts.map +1 -1
- package/dist/lib/kernel/_unbuilder.cjs +78 -2
- package/dist/lib/kernel/_unbuilder.d.ts.map +1 -1
- package/dist/lib/kernel/index.cjs +1 -0
- package/dist/lib/kernel/index.d.ts +1 -0
- package/dist/lib/kernel/index.d.ts.map +1 -1
- package/dist/lib/render/renderPrim.cjs +31 -13
- package/dist/lib/render/renderPrim.d.ts.map +1 -1
- package/dist/lib/sugar/Draw.cjs +57 -3
- package/dist/lib/sugar/Draw.d.ts +20 -2
- package/dist/lib/sugar/Draw.d.ts.map +1 -1
- package/dist/lib/sugar/EdgeLabel.cjs +13 -0
- package/dist/lib/sugar/EdgeLabel.d.ts +20 -0
- package/dist/lib/sugar/EdgeLabel.d.ts.map +1 -0
- package/dist/lib/sugar/index.cjs +1 -0
- package/dist/lib/sugar/index.d.ts +1 -0
- package/dist/lib/sugar/index.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -25,6 +25,7 @@ var renderPrim = (p, key, ctx = {}) => {
|
|
|
25
25
|
fill: p.fill,
|
|
26
26
|
fillOpacity: p.fillOpacity,
|
|
27
27
|
stroke: p.stroke,
|
|
28
|
+
strokeOpacity: p.strokeOpacity,
|
|
28
29
|
strokeWidth: p.strokeWidth,
|
|
29
30
|
strokeDasharray: p.strokeDasharray,
|
|
30
31
|
rx: p.cornerRadius,
|
|
@@ -42,32 +43,49 @@ var renderPrim = (p, key, ctx = {}) => {
|
|
|
42
43
|
fill: p.fill,
|
|
43
44
|
fillOpacity: p.fillOpacity,
|
|
44
45
|
stroke: p.stroke,
|
|
46
|
+
strokeOpacity: p.strokeOpacity,
|
|
45
47
|
strokeWidth: p.strokeWidth,
|
|
46
48
|
strokeDasharray: p.strokeDasharray,
|
|
47
49
|
opacity: p.opacity
|
|
48
50
|
}, key);
|
|
49
51
|
}
|
|
50
|
-
case "text":
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
case "text": {
|
|
53
|
+
const n = p.lines.length;
|
|
54
|
+
const firstDy = p.baseline === "middle" ? -(n - 1) / 2 * p.lineHeight : p.baseline === "bottom" ? -(n - 1) * p.lineHeight : 0;
|
|
55
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", {
|
|
56
|
+
x: p.x,
|
|
57
|
+
y: p.y,
|
|
58
|
+
fontSize: p.fontSize,
|
|
59
|
+
fontFamily: p.fontFamily,
|
|
60
|
+
fontWeight: p.fontWeight,
|
|
61
|
+
fontStyle: p.fontStyle,
|
|
62
|
+
textAnchor: alignToAnchor(p.align),
|
|
63
|
+
dominantBaseline: baselineToDominant(p.baseline),
|
|
64
|
+
fill: p.fill,
|
|
65
|
+
opacity: p.opacity,
|
|
66
|
+
children: p.lines.map((line, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tspan", {
|
|
67
|
+
x: p.x,
|
|
68
|
+
dy: i === 0 ? firstDy : p.lineHeight,
|
|
69
|
+
fill: line.fill,
|
|
70
|
+
opacity: line.opacity,
|
|
71
|
+
fontSize: line.fontSize,
|
|
72
|
+
fontFamily: line.fontFamily,
|
|
73
|
+
fontWeight: line.fontWeight,
|
|
74
|
+
fontStyle: line.fontStyle,
|
|
75
|
+
children: line.text
|
|
76
|
+
}, i))
|
|
77
|
+
}, key);
|
|
78
|
+
}
|
|
63
79
|
case "path": {
|
|
64
80
|
const startId = p.arrowStart && ctx.arrowMarkerIdFor ? ctx.arrowMarkerIdFor(p.arrowStart) : void 0;
|
|
65
81
|
const endId = p.arrowEnd && ctx.arrowMarkerIdFor ? ctx.arrowMarkerIdFor(p.arrowEnd) : void 0;
|
|
66
82
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
67
83
|
d: p.d,
|
|
68
84
|
fill: p.fill,
|
|
85
|
+
fillOpacity: p.fillOpacity,
|
|
69
86
|
fillRule: p.fillRule,
|
|
70
87
|
stroke: p.stroke,
|
|
88
|
+
strokeOpacity: p.strokeOpacity,
|
|
71
89
|
strokeWidth: p.strokeWidth,
|
|
72
90
|
strokeDasharray: p.strokeDasharray,
|
|
73
91
|
strokeLinecap: p.strokeLinecap,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderPrim.d.ts","sourceRoot":"","sources":["../../../src/render/renderPrim.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AA6B/D;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,MAAM,CAAC;CAClD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,GACrB,GAAG,cAAc,EACjB,KAAK,GAAG,EACR,MAAK,aAAkB,KACtB,
|
|
1
|
+
{"version":3,"file":"renderPrim.d.ts","sourceRoot":"","sources":["../../../src/render/renderPrim.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AA6B/D;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,MAAM,CAAC;CAClD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,GACrB,GAAG,cAAc,EACjB,KAAK,GAAG,EACR,MAAK,aAAkB,KACtB,YAqHF,CAAC"}
|
package/dist/lib/sugar/Draw.cjs
CHANGED
|
@@ -12,15 +12,21 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
12
12
|
* (useState / useMemo / useEffect 等会抛 "Invalid hook call")。
|
|
13
13
|
*/
|
|
14
14
|
var Draw = (props) => {
|
|
15
|
-
const { way, stroke, strokeWidth, strokeDasharray, arrow, arrowShape, fill, fillRule } = props;
|
|
15
|
+
const { way, stroke, strokeWidth, strokeDasharray, lineCap, lineJoin, thickness, arrow, arrowShape, fill, fillRule, opacity, fillOpacity, drawOpacity } = props;
|
|
16
16
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Path.Path, {
|
|
17
17
|
stroke,
|
|
18
18
|
strokeWidth,
|
|
19
19
|
strokeDasharray,
|
|
20
|
+
lineCap,
|
|
21
|
+
lineJoin,
|
|
22
|
+
thickness,
|
|
20
23
|
arrow,
|
|
21
24
|
arrowShape,
|
|
22
25
|
fill,
|
|
23
26
|
fillRule,
|
|
27
|
+
opacity,
|
|
28
|
+
fillOpacity,
|
|
29
|
+
drawOpacity,
|
|
24
30
|
children: (0, _retikz_core.parseWay)(way).map((s, i) => {
|
|
25
31
|
if (s.kind === "cycle") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Step.Step, { kind: "cycle" }, i);
|
|
26
32
|
if (s.kind === "move") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Step.Step, {
|
|
@@ -30,11 +36,59 @@ var Draw = (props) => {
|
|
|
30
36
|
if (s.kind === "step") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Step.Step, {
|
|
31
37
|
kind: "step",
|
|
32
38
|
via: s.via,
|
|
33
|
-
to: s.to
|
|
39
|
+
to: s.to,
|
|
40
|
+
label: s.label
|
|
41
|
+
}, i);
|
|
42
|
+
if (s.kind === "curve") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Step.Step, {
|
|
43
|
+
kind: "curve",
|
|
44
|
+
to: s.to,
|
|
45
|
+
control: s.control,
|
|
46
|
+
label: s.label
|
|
47
|
+
}, i);
|
|
48
|
+
if (s.kind === "cubic") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Step.Step, {
|
|
49
|
+
kind: "cubic",
|
|
50
|
+
to: s.to,
|
|
51
|
+
control1: s.control1,
|
|
52
|
+
control2: s.control2,
|
|
53
|
+
label: s.label
|
|
54
|
+
}, i);
|
|
55
|
+
if (s.kind === "bend") {
|
|
56
|
+
if (s.bendAngle !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Step.Step, {
|
|
57
|
+
kind: "bend",
|
|
58
|
+
to: s.to,
|
|
59
|
+
bendDirection: s.bendDirection,
|
|
60
|
+
bendAngle: s.bendAngle,
|
|
61
|
+
label: s.label
|
|
62
|
+
}, i);
|
|
63
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Step.Step, {
|
|
64
|
+
kind: "bend",
|
|
65
|
+
to: s.to,
|
|
66
|
+
bendDirection: s.bendDirection,
|
|
67
|
+
label: s.label
|
|
68
|
+
}, i);
|
|
69
|
+
}
|
|
70
|
+
if (s.kind === "arc") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Step.Step, {
|
|
71
|
+
kind: "arc",
|
|
72
|
+
startAngle: s.startAngle,
|
|
73
|
+
endAngle: s.endAngle,
|
|
74
|
+
radius: s.radius,
|
|
75
|
+
label: s.label
|
|
76
|
+
}, i);
|
|
77
|
+
if (s.kind === "circlePath") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Step.Step, {
|
|
78
|
+
kind: "circlePath",
|
|
79
|
+
radius: s.radius,
|
|
80
|
+
label: s.label
|
|
81
|
+
}, i);
|
|
82
|
+
if (s.kind === "ellipsePath") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Step.Step, {
|
|
83
|
+
kind: "ellipsePath",
|
|
84
|
+
radiusX: s.radiusX,
|
|
85
|
+
radiusY: s.radiusY,
|
|
86
|
+
label: s.label
|
|
34
87
|
}, i);
|
|
35
88
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Step.Step, {
|
|
36
89
|
kind: "line",
|
|
37
|
-
to: s.to
|
|
90
|
+
to: s.to,
|
|
91
|
+
label: s.label
|
|
38
92
|
}, i);
|
|
39
93
|
})
|
|
40
94
|
});
|
package/dist/lib/sugar/Draw.d.ts
CHANGED
|
@@ -2,7 +2,13 @@ import { FC } from 'react';
|
|
|
2
2
|
import { IRPath, WayDSL } from '@retikz/core';
|
|
3
3
|
/** <Draw> 组件的 props */
|
|
4
4
|
export type DrawProps = {
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* way 数组 DSL:节点 id / 笛卡尔 / 极坐标 / 相对偏移 `{ position, type: DrawWay.Relative | DrawWay.Accumulate }` /
|
|
7
|
+
* 折角算子 `'-|'` `'|-'`(或 `DrawWay.Hv` / `DrawWay.Vh`)/ 闭合 `DrawWay.Cycle` /
|
|
8
|
+
* 曲线算子 `{ curve | cubic | bend }`(infix)/
|
|
9
|
+
* 形状算子 `{ arc | circle | ellipse }`(infix,以"上一项"为圆心,不消耗下一项)/
|
|
10
|
+
* 边标注算子 `{ label }`(infix,修饰下一段)
|
|
11
|
+
*/
|
|
6
12
|
way: WayDSL;
|
|
7
13
|
/** 描边色,省略时用 currentColor */
|
|
8
14
|
stroke?: IRPath['stroke'];
|
|
@@ -10,6 +16,12 @@ export type DrawProps = {
|
|
|
10
16
|
strokeWidth?: IRPath['strokeWidth'];
|
|
11
17
|
/** SVG stroke-dasharray 模式(如 "4 2") */
|
|
12
18
|
strokeDasharray?: IRPath['strokeDasharray'];
|
|
19
|
+
/** 端点形状(SVG `stroke-linecap`) */
|
|
20
|
+
lineCap?: IRPath['lineCap'];
|
|
21
|
+
/** 拐点形状(SVG `stroke-linejoin`) */
|
|
22
|
+
lineJoin?: IRPath['lineJoin'];
|
|
23
|
+
/** 语义 stroke 档位(TikZ `ultra thin` … `ultra thick`);显式 `strokeWidth` 始终优先 */
|
|
24
|
+
thickness?: IRPath['thickness'];
|
|
13
25
|
/**
|
|
14
26
|
* 路径级箭头方向。`'->'` = 终点;`'<-'` = 起点;`'<->'` = 两端;
|
|
15
27
|
* 省略或 `'none'` = 无箭头。
|
|
@@ -19,10 +31,16 @@ export type DrawProps = {
|
|
|
19
31
|
* 箭头形状。默认 `'normal'`。其他:`'open'` / `'stealth'` / `'diamond'` / `'circle'`。
|
|
20
32
|
*/
|
|
21
33
|
arrowShape?: IRPath['arrowShape'];
|
|
22
|
-
/** 闭合区域填充色,省略 = 不填充。配合 way 末尾的 `DrawWay.
|
|
34
|
+
/** 闭合区域填充色,省略 = 不填充。配合 way 末尾的 `DrawWay.Cycle` 画填充形状 */
|
|
23
35
|
fill?: IRPath['fill'];
|
|
24
36
|
/** SVG fill-rule:`'nonzero'`(默认)/ `'evenodd'` */
|
|
25
37
|
fillRule?: IRPath['fillRule'];
|
|
38
|
+
/** 整 path 透明度 0~1 */
|
|
39
|
+
opacity?: IRPath['opacity'];
|
|
40
|
+
/** 仅 fill 透明度 0~1 */
|
|
41
|
+
fillOpacity?: IRPath['fillOpacity'];
|
|
42
|
+
/** 仅 stroke 透明度 0~1(TikZ `draw opacity`) */
|
|
43
|
+
drawOpacity?: IRPath['drawOpacity'];
|
|
26
44
|
};
|
|
27
45
|
/**
|
|
28
46
|
* Sugar 组件——展开为等价的 <Path><Step.../></Path> Kernel 子树。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Draw.d.ts","sourceRoot":"","sources":["../../../src/sugar/Draw.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAKnD,uBAAuB;AACvB,MAAM,MAAM,SAAS,GAAG;IACtB
|
|
1
|
+
{"version":3,"file":"Draw.d.ts","sourceRoot":"","sources":["../../../src/sugar/Draw.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAKnD,uBAAuB;AACvB,MAAM,MAAM,SAAS,GAAG;IACtB;;;;;;OAMG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ,4BAA4B;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC1B,kBAAkB;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;IACpC,uCAAuC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC5C,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IAC5B,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IAC9B,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;IAChC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IAClC,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IACtB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IAC9B,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IAC5B,qBAAqB;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;IACpC,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;CACrC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CA0G9B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require__displayNames = require("../kernel/_displayNames.cjs");
|
|
2
|
+
//#region src/sugar/EdgeLabel.tsx
|
|
3
|
+
/**
|
|
4
|
+
* Sugar 组件——挂在 <Step> 内作为子节点声明边标注。等价于在 Step 上写
|
|
5
|
+
* `label={{ text, position, side }}` prop;二者并存时 prop 优先。
|
|
6
|
+
*
|
|
7
|
+
* <EdgeLabel> 自身不渲染,由 buildIR 在收集 Step 时识别 displayName 后
|
|
8
|
+
* 提取到 IR `step.label`。
|
|
9
|
+
*/
|
|
10
|
+
var EdgeLabel = () => null;
|
|
11
|
+
EdgeLabel.displayName = require__displayNames.TIKZ_EDGE_LABEL;
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.EdgeLabel = EdgeLabel;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IRStepLabel } from '@retikz/core';
|
|
3
|
+
/** <EdgeLabel> 组件的 props(ADR-0004) */
|
|
4
|
+
export type EdgeLabelProps = {
|
|
5
|
+
/** 段上位置(TikZ `midway` / `near start` / `near end`),缺省 'midway' */
|
|
6
|
+
position?: IRStepLabel['position'];
|
|
7
|
+
/** 相对段方向 / 视觉方位的偏移侧('sloped' = 沿切线旋转),缺省 'above' */
|
|
8
|
+
side?: IRStepLabel['side'];
|
|
9
|
+
/** 标签文字内容;必须是字符串 */
|
|
10
|
+
children: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Sugar 组件——挂在 <Step> 内作为子节点声明边标注。等价于在 Step 上写
|
|
14
|
+
* `label={{ text, position, side }}` prop;二者并存时 prop 优先。
|
|
15
|
+
*
|
|
16
|
+
* <EdgeLabel> 自身不渲染,由 buildIR 在收集 Step 时识别 displayName 后
|
|
17
|
+
* 提取到 IR `step.label`。
|
|
18
|
+
*/
|
|
19
|
+
export declare const EdgeLabel: FC<EdgeLabelProps>;
|
|
20
|
+
//# sourceMappingURL=EdgeLabel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EdgeLabel.d.ts","sourceRoot":"","sources":["../../../src/sugar/EdgeLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,sCAAsC;AACtC,MAAM,MAAM,cAAc,GAAG;IAC3B,kEAAkE;IAClE,QAAQ,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IACnC,oDAAoD;IACpD,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3B,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAAc,CAAC"}
|
package/dist/lib/sugar/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sugar/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sugar/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@retikz/react",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.3",
|
|
4
4
|
"description": "React adapter for retikz: Kernel/Sugar JSX components and SVG renderer.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/lib/index.cjs",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"react-dom": ">=18"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@retikz/core": "0.1.0-alpha.
|
|
27
|
+
"@retikz/core": "0.1.0-alpha.3"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "^25.6.0",
|