@umami/shiso 1.12.0 → 1.14.0
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/bin/shiso.mjs +0 -0
- package/dist/chunks/App.js +166 -139
- package/dist/chunks/abnfDiagram-VCTEODGH.js +109 -0
- package/dist/chunks/arc.js +130 -0
- package/dist/chunks/architecture-7GRP2DOG.js +4 -0
- package/dist/chunks/architectureDiagram-5GKGNRK7.js +7466 -0
- package/dist/chunks/array.js +8 -0
- package/dist/chunks/blockDiagram-I7D4REHJ.js +2546 -0
- package/dist/chunks/c4Diagram-7LVT6UL2.js +3654 -0
- package/dist/chunks/channel.js +9 -0
- package/dist/chunks/chunk-2Q5K7J3B.js +21 -0
- package/dist/chunks/chunk-4HAMMTFA.js +6106 -0
- package/dist/chunks/chunk-5VM5RSS4.js +21 -0
- package/dist/chunks/chunk-75Z2AOVW.js +2185 -0
- package/dist/chunks/chunk-DU6HZSFF.js +8729 -0
- package/dist/chunks/chunk-F27PBJKO.js +95 -0
- package/dist/chunks/chunk-FOHPRMQF.js +27162 -0
- package/dist/chunks/chunk-GMAD6QVW.js +2369 -0
- package/dist/chunks/chunk-GVQU2GXP.js +58 -0
- package/dist/chunks/chunk-IMKFNOWR.js +2593 -0
- package/dist/chunks/chunk-JWPE2WC7.js +12 -0
- package/dist/chunks/chunk-L3NEJ4N5.js +420 -0
- package/dist/chunks/chunk-OSK3NFVY.js +1029 -0
- package/dist/chunks/chunk-P2QGCYS3.js +95 -0
- package/dist/chunks/chunk-POPQ4Y6H.js +33 -0
- package/dist/chunks/chunk-PWAF6VOD.js +467 -0
- package/dist/chunks/chunk-SHT3W25Y.js +4813 -0
- package/dist/chunks/chunk-SVP7TREG.js +686 -0
- package/dist/chunks/chunk-TICWLB2K.js +3800 -0
- package/dist/chunks/chunk-XXDRQBXY.js +12 -0
- package/dist/chunks/chunk-Y2CYZVJY.js +15 -0
- package/dist/chunks/classDiagram-ZZMXUADV.js +33 -0
- package/dist/chunks/classDiagram-v2-VYDZK3BY.js +33 -0
- package/dist/chunks/cose-bilkent-JH36ORCC.js +4268 -0
- package/dist/chunks/cynefin-OW5HDTMX.js +4 -0
- package/dist/chunks/cynefinDiagram-5FMLGOSQ.js +482 -0
- package/dist/chunks/cytoscape.esm.js +28282 -0
- package/dist/chunks/dagre-GXQ25YYZ.js +583 -0
- package/dist/chunks/dagre.js +4235 -0
- package/dist/chunks/defaultLocale.js +246 -0
- package/dist/chunks/diagram-S7CK7UJ4.js +402 -0
- package/dist/chunks/diagram-UQ7AKVKN.js +291 -0
- package/dist/chunks/diagram-VSXAHHWV.js +553 -0
- package/dist/chunks/diagram-VX7I27RA.js +798 -0
- package/dist/chunks/diagram-Z3DM3KII.js +186 -0
- package/dist/chunks/dist.js +92 -0
- package/dist/chunks/docs.js +1163 -347
- package/dist/chunks/ebnfDiagram-PWID7BFC.js +123 -0
- package/dist/chunks/erDiagram-RLTQ6QDP.js +2295 -0
- package/dist/chunks/eventmodeling-NTZA5JFV.js +4 -0
- package/dist/chunks/flowDiagram-HODETNUW.js +17 -0
- package/dist/chunks/ganttDiagram-EL5Y4UJY.js +3928 -0
- package/dist/chunks/gitGraph-4MIJSDKK.js +4 -0
- package/dist/chunks/gitGraphDiagram-WWUBYQGX.js +1153 -0
- package/dist/chunks/graphlib.js +4194 -0
- package/dist/chunks/info-A6RAGUB7.js +4 -0
- package/dist/chunks/infoDiagram-27XIBGKW.js +25 -0
- package/dist/chunks/init.js +14 -0
- package/dist/chunks/ishikawaDiagram-5VMMS53U.js +971 -0
- package/dist/chunks/journeyDiagram-3NMN7TZE.js +1226 -0
- package/dist/chunks/kanban-definition-UXKFOSKX.js +1241 -0
- package/dist/chunks/katex.js +26463 -0
- package/dist/chunks/line.js +48 -0
- package/dist/chunks/linear.js +391 -0
- package/dist/chunks/mermaid-parser.core.js +754 -0
- package/dist/chunks/mermaid.core.js +4898 -0
- package/dist/chunks/mindmap-definition-YA3MSWOX.js +1309 -0
- package/dist/chunks/ordinal.js +84 -0
- package/dist/chunks/packet-AYTQ26CC.js +4 -0
- package/dist/chunks/path.js +106 -0
- package/dist/chunks/pegDiagram-XKGWAZYB.js +115 -0
- package/dist/chunks/pie-WAS4IAKB.js +4 -0
- package/dist/chunks/pieDiagram-E7YTZNPT.js +297 -0
- package/dist/chunks/quadrantDiagram-AXDQQJYC.js +2234 -0
- package/dist/chunks/radar-RG4KPBEZ.js +4 -0
- package/dist/chunks/railroad-74A4TZTK.js +4 -0
- package/dist/chunks/railroad-abnf-HS5TGJTU.js +4 -0
- package/dist/chunks/railroad-ebnf-LZEXJU2U.js +4 -0
- package/dist/chunks/railroad-peg-WCYAUIDC.js +4 -0
- package/dist/chunks/railroadDiagram-O6MQD6OU.js +89 -0
- package/dist/chunks/requirementDiagram-BXWQKSXE.js +2464 -0
- package/dist/chunks/rough.esm.js +1396 -0
- package/dist/chunks/sankeyDiagram-P5KCCOFB.js +1308 -0
- package/dist/chunks/sequenceDiagram-WJ2MYXX4.js +5445 -0
- package/dist/chunks/sizeCapture-INFHLROL.js +56 -0
- package/dist/chunks/src.js +2653 -0
- package/dist/chunks/stateDiagram-D77RDMKH.js +368 -0
- package/dist/chunks/stateDiagram-v2-MP3YSRHH.js +33 -0
- package/dist/chunks/swimlanes-42K2YHIH.js +6925 -0
- package/dist/chunks/swimlanesDiagram-VR7AAH4N.js +32 -0
- package/dist/chunks/timeline-definition-24CTP7MA.js +1507 -0
- package/dist/chunks/treeView-Q6P3EWNA.js +4 -0
- package/dist/chunks/treemap-WGGIJYW6.js +4 -0
- package/dist/chunks/vennDiagram-4TSXK5OY.js +2803 -0
- package/dist/chunks/wardley-WFR3VGLG.js +4 -0
- package/dist/chunks/wardleyDiagram-VM6X3IG4.js +877 -0
- package/dist/chunks/xychartDiagram-S5SC5T6Z.js +2698 -0
- package/dist/components.js +2 -2
- package/dist/entry-client.js +1 -1
- package/dist/entry-server.js +2 -2
- package/docs.schema.json +1 -1
- package/package.json +2 -1
- package/scripts/expand-navigation-globs.mjs +77 -8
- package/scripts/lib/openapi.mjs +24 -13
- package/src/components/CodeBlock.tsx +36 -0
- package/src/components/Docs.tsx +44 -21
- package/src/components/OpenApiOperation.tsx +39 -52
- package/src/components/SideNav.tsx +8 -3
- package/src/components/docs/Changelog.tsx +163 -0
- package/src/components/docs/Mermaid.tsx +164 -0
- package/src/components/docs/Panel.tsx +23 -0
- package/src/components/docs/Param.tsx +6 -0
- package/src/components/docs/PropertiesTable.tsx +52 -36
- package/src/components/docs/Tiles.tsx +59 -0
- package/src/components/docs/Tree.tsx +359 -0
- package/src/components/docs/Update.tsx +72 -0
- package/src/components/docs/index.ts +8 -2
- package/src/components/docs/panel-context.tsx +25 -0
- package/src/components/docs/styles.ts +47 -6
- package/src/components/icons/index.ts +4 -0
- package/src/lib/openapi.ts +17 -1
- package/src/lib/rehype-shiki.ts +18 -1
- package/types/components.d.ts +83 -14
- package/src/components/docs/ParamField.tsx +0 -45
- package/src/components/docs/ResponseField.tsx +0 -36
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { m as createRailroadAbnfServices, t as MermaidParseError } from "./mermaid-parser.core.js";
|
|
2
|
+
import { n as __name } from "./chunk-Y2CYZVJY.js";
|
|
3
|
+
import { m as log } from "./src.js";
|
|
4
|
+
import "./chunk-DU6HZSFF.js";
|
|
5
|
+
import { n as getStyles, r as renderer, t as db } from "./chunk-SVP7TREG.js";
|
|
6
|
+
import { t as populateCommonDb } from "./chunk-JWPE2WC7.js";
|
|
7
|
+
import "./mermaid.core.js";
|
|
8
|
+
|
|
9
|
+
//#region ../../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/abnfDiagram-VCTEODGH.mjs
|
|
10
|
+
var langiumParser = createRailroadAbnfServices().RailroadAbnf.parser.LangiumParser;
|
|
11
|
+
var transformAlternation = /* @__PURE__ */ __name((alt) => {
|
|
12
|
+
const alternatives = alt.alternatives.map(transformConcatenation);
|
|
13
|
+
if (alternatives.length === 1) return alternatives[0];
|
|
14
|
+
return {
|
|
15
|
+
type: "choice",
|
|
16
|
+
alternatives
|
|
17
|
+
};
|
|
18
|
+
}, "transformAlternation");
|
|
19
|
+
var transformConcatenation = /* @__PURE__ */ __name((concat) => {
|
|
20
|
+
const elements = concat.elements.map(transformElement);
|
|
21
|
+
if (elements.length === 1) return elements[0];
|
|
22
|
+
return {
|
|
23
|
+
type: "sequence",
|
|
24
|
+
elements
|
|
25
|
+
};
|
|
26
|
+
}, "transformConcatenation");
|
|
27
|
+
var parseRepeat = /* @__PURE__ */ __name((repeat) => {
|
|
28
|
+
if (repeat.includes("*")) {
|
|
29
|
+
const [minStr, maxStr] = repeat.split("*");
|
|
30
|
+
return {
|
|
31
|
+
min: minStr ? parseInt(minStr, 10) : 0,
|
|
32
|
+
max: maxStr ? parseInt(maxStr, 10) : Infinity
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const exact = parseInt(repeat, 10);
|
|
36
|
+
return {
|
|
37
|
+
min: exact,
|
|
38
|
+
max: exact
|
|
39
|
+
};
|
|
40
|
+
}, "parseRepeat");
|
|
41
|
+
var transformElement = /* @__PURE__ */ __name((element) => {
|
|
42
|
+
const inner = transformPrimary(element.primary);
|
|
43
|
+
if (!element.repeat) return inner;
|
|
44
|
+
const { min, max } = parseRepeat(element.repeat);
|
|
45
|
+
if (min === 0 && max === 1) return {
|
|
46
|
+
type: "optional",
|
|
47
|
+
element: inner
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
type: "repetition",
|
|
51
|
+
element: inner,
|
|
52
|
+
min,
|
|
53
|
+
max
|
|
54
|
+
};
|
|
55
|
+
}, "transformElement");
|
|
56
|
+
var transformPrimary = /* @__PURE__ */ __name((primary) => {
|
|
57
|
+
switch (primary.$type) {
|
|
58
|
+
case "AbnfStringLiteral": return {
|
|
59
|
+
type: "terminal",
|
|
60
|
+
value: primary.value
|
|
61
|
+
};
|
|
62
|
+
case "AbnfNumVal": return {
|
|
63
|
+
type: "terminal",
|
|
64
|
+
value: primary.value
|
|
65
|
+
};
|
|
66
|
+
case "AbnfRuleName": return {
|
|
67
|
+
type: "nonterminal",
|
|
68
|
+
name: primary.name
|
|
69
|
+
};
|
|
70
|
+
case "AbnfGroup": return transformAlternation(primary.element);
|
|
71
|
+
case "AbnfOptionalGroup": return {
|
|
72
|
+
type: "optional",
|
|
73
|
+
element: transformAlternation(primary.element)
|
|
74
|
+
};
|
|
75
|
+
default: throw new Error(`Unsupported ABNF primary node: ${primary.$type}`);
|
|
76
|
+
}
|
|
77
|
+
}, "transformPrimary");
|
|
78
|
+
var transformRule = /* @__PURE__ */ __name((rule) => {
|
|
79
|
+
return {
|
|
80
|
+
name: rule.name,
|
|
81
|
+
definition: transformAlternation(rule.definition)
|
|
82
|
+
};
|
|
83
|
+
}, "transformRule");
|
|
84
|
+
var populateDb = /* @__PURE__ */ __name((ast) => {
|
|
85
|
+
populateCommonDb(ast, db);
|
|
86
|
+
if (ast.title) db.setTitle(ast.title);
|
|
87
|
+
ast.rules.map((rule) => db.addRule(transformRule(rule)));
|
|
88
|
+
}, "populateDb");
|
|
89
|
+
var diagram = {
|
|
90
|
+
parser: {
|
|
91
|
+
parse: /* @__PURE__ */ __name((input) => {
|
|
92
|
+
db.clear();
|
|
93
|
+
log.debug("[ABNF Parser] Starting Langium parse");
|
|
94
|
+
const result = langiumParser.parse(input);
|
|
95
|
+
if (result.lexerErrors.length > 0 || result.parserErrors.length > 0) throw new MermaidParseError(result);
|
|
96
|
+
const ast = result.value;
|
|
97
|
+
log.debug("[ABNF Parser] Parsed rules:", ast.rules.length);
|
|
98
|
+
populateDb(ast);
|
|
99
|
+
log.debug("[ABNF Parser] Parse complete");
|
|
100
|
+
}, "parse"),
|
|
101
|
+
parser: { yy: db }
|
|
102
|
+
},
|
|
103
|
+
db,
|
|
104
|
+
renderer,
|
|
105
|
+
styles: getStyles
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
//#endregion
|
|
109
|
+
export { diagram };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { n as constant_default, t as withPath } from "./path.js";
|
|
2
|
+
import { a as atan2, c as halfPi, d as pi, f as sin, i as asin, l as max, m as tau, n as abs, o as cos, p as sqrt, r as acos, s as epsilon, u as min } from "./dist.js";
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/arc.js
|
|
5
|
+
function arcInnerRadius(d) {
|
|
6
|
+
return d.innerRadius;
|
|
7
|
+
}
|
|
8
|
+
function arcOuterRadius(d) {
|
|
9
|
+
return d.outerRadius;
|
|
10
|
+
}
|
|
11
|
+
function arcStartAngle(d) {
|
|
12
|
+
return d.startAngle;
|
|
13
|
+
}
|
|
14
|
+
function arcEndAngle(d) {
|
|
15
|
+
return d.endAngle;
|
|
16
|
+
}
|
|
17
|
+
function arcPadAngle(d) {
|
|
18
|
+
return d && d.padAngle;
|
|
19
|
+
}
|
|
20
|
+
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
|
|
21
|
+
var x10 = x1 - x0, y10 = y1 - y0, x32 = x3 - x2, y32 = y3 - y2, t = y32 * x10 - x32 * y10;
|
|
22
|
+
if (t * t < 1e-12) return;
|
|
23
|
+
t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;
|
|
24
|
+
return [x0 + t * x10, y0 + t * y10];
|
|
25
|
+
}
|
|
26
|
+
function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
|
|
27
|
+
var x01 = x0 - x1, y01 = y0 - y1, lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x0 + ox, y11 = y0 + oy, x10 = x1 + ox, y10 = y1 + oy, x00 = (x11 + x10) / 2, y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r = r1 - rc, D = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x00, dy0 = cy0 - y00, dx1 = cx1 - x00, dy1 = cy1 - y00;
|
|
28
|
+
if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;
|
|
29
|
+
return {
|
|
30
|
+
cx: cx0,
|
|
31
|
+
cy: cy0,
|
|
32
|
+
x01: -ox,
|
|
33
|
+
y01: -oy,
|
|
34
|
+
x11: cx0 * (r1 / r - 1),
|
|
35
|
+
y11: cy0 * (r1 / r - 1)
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function arc_default() {
|
|
39
|
+
var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = constant_default(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null, path = withPath(arc);
|
|
40
|
+
function arc() {
|
|
41
|
+
var buffer, r, r0 = +innerRadius.apply(this, arguments), r1 = +outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) - halfPi, a1 = endAngle.apply(this, arguments) - halfPi, da = abs(a1 - a0), cw = a1 > a0;
|
|
42
|
+
if (!context) context = buffer = path();
|
|
43
|
+
if (r1 < r0) r = r1, r1 = r0, r0 = r;
|
|
44
|
+
if (!(r1 > 1e-12)) context.moveTo(0, 0);
|
|
45
|
+
else if (da > tau - 1e-12) {
|
|
46
|
+
context.moveTo(r1 * cos(a0), r1 * sin(a0));
|
|
47
|
+
context.arc(0, 0, r1, a0, a1, !cw);
|
|
48
|
+
if (r0 > 1e-12) {
|
|
49
|
+
context.moveTo(r0 * cos(a1), r0 * sin(a1));
|
|
50
|
+
context.arc(0, 0, r0, a1, a0, cw);
|
|
51
|
+
}
|
|
52
|
+
} else {
|
|
53
|
+
var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da, da1 = da, ap = padAngle.apply(this, arguments) / 2, rp = ap > 1e-12 && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)), rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t0, t1;
|
|
54
|
+
if (rp > 1e-12) {
|
|
55
|
+
var p0 = asin(rp / r0 * sin(ap)), p1 = asin(rp / r1 * sin(ap));
|
|
56
|
+
if ((da0 -= p0 * 2) > 1e-12) p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0;
|
|
57
|
+
else da0 = 0, a00 = a10 = (a0 + a1) / 2;
|
|
58
|
+
if ((da1 -= p1 * 2) > 1e-12) p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1;
|
|
59
|
+
else da1 = 0, a01 = a11 = (a0 + a1) / 2;
|
|
60
|
+
}
|
|
61
|
+
var x01 = r1 * cos(a01), y01 = r1 * sin(a01), x10 = r0 * cos(a10), y10 = r0 * sin(a10);
|
|
62
|
+
if (rc > 1e-12) {
|
|
63
|
+
var x11 = r1 * cos(a11), y11 = r1 * sin(a11), x00 = r0 * cos(a00), y00 = r0 * sin(a00), oc;
|
|
64
|
+
if (da < pi) if (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10)) {
|
|
65
|
+
var ax = x01 - oc[0], ay = y01 - oc[1], bx = x11 - oc[0], by = y11 - oc[1], kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2), lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);
|
|
66
|
+
rc0 = min(rc, (r0 - lc) / (kc - 1));
|
|
67
|
+
rc1 = min(rc, (r1 - lc) / (kc + 1));
|
|
68
|
+
} else rc0 = rc1 = 0;
|
|
69
|
+
}
|
|
70
|
+
if (!(da1 > 1e-12)) context.moveTo(x01, y01);
|
|
71
|
+
else if (rc1 > 1e-12) {
|
|
72
|
+
t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
|
|
73
|
+
t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
|
|
74
|
+
context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
|
75
|
+
if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
|
|
76
|
+
else {
|
|
77
|
+
context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
|
|
78
|
+
context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);
|
|
79
|
+
context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
|
|
80
|
+
}
|
|
81
|
+
} else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
|
|
82
|
+
if (!(r0 > 1e-12) || !(da0 > 1e-12)) context.lineTo(x10, y10);
|
|
83
|
+
else if (rc0 > 1e-12) {
|
|
84
|
+
t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
|
|
85
|
+
t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
|
|
86
|
+
context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
|
|
87
|
+
if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
|
|
88
|
+
else {
|
|
89
|
+
context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
|
|
90
|
+
context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);
|
|
91
|
+
context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
|
|
92
|
+
}
|
|
93
|
+
} else context.arc(0, 0, r0, a10, a00, cw);
|
|
94
|
+
}
|
|
95
|
+
context.closePath();
|
|
96
|
+
if (buffer) return context = null, buffer + "" || null;
|
|
97
|
+
}
|
|
98
|
+
arc.centroid = function() {
|
|
99
|
+
var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;
|
|
100
|
+
return [cos(a) * r, sin(a) * r];
|
|
101
|
+
};
|
|
102
|
+
arc.innerRadius = function(_) {
|
|
103
|
+
return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant_default(+_), arc) : innerRadius;
|
|
104
|
+
};
|
|
105
|
+
arc.outerRadius = function(_) {
|
|
106
|
+
return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant_default(+_), arc) : outerRadius;
|
|
107
|
+
};
|
|
108
|
+
arc.cornerRadius = function(_) {
|
|
109
|
+
return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant_default(+_), arc) : cornerRadius;
|
|
110
|
+
};
|
|
111
|
+
arc.padRadius = function(_) {
|
|
112
|
+
return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant_default(+_), arc) : padRadius;
|
|
113
|
+
};
|
|
114
|
+
arc.startAngle = function(_) {
|
|
115
|
+
return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant_default(+_), arc) : startAngle;
|
|
116
|
+
};
|
|
117
|
+
arc.endAngle = function(_) {
|
|
118
|
+
return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant_default(+_), arc) : endAngle;
|
|
119
|
+
};
|
|
120
|
+
arc.padAngle = function(_) {
|
|
121
|
+
return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant_default(+_), arc) : padAngle;
|
|
122
|
+
};
|
|
123
|
+
arc.context = function(_) {
|
|
124
|
+
return arguments.length ? (context = _ == null ? null : _, arc) : context;
|
|
125
|
+
};
|
|
126
|
+
return arc;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
//#endregion
|
|
130
|
+
export { arc_default as t };
|