@arcgis/api-extractor 6.0.0-next.2 → 6.0.0-next.20
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/chunks/ApiExtractor.js +204 -197
- package/dist/chunks/links.js +85 -85
- package/dist/diff/apiDiffToMarkdown.js +135 -100
- package/dist/diff/diffApiJson.js +106 -205
- package/dist/extractor/config.d.ts +6 -0
- package/dist/utils/partPrinter.js +24 -23
- package/package.json +3 -3
package/dist/chunks/links.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { styleText as D } from "node:util";
|
|
2
|
-
import { emitJsDocError as g, getApiNodeLabel as
|
|
3
|
-
import { b as
|
|
2
|
+
import { emitJsDocError as g, getApiNodeLabel as x } from "../utils/apiHelpers.js";
|
|
3
|
+
import { b as N, e as W, d as S, g as L } from "./privateContext.js";
|
|
4
4
|
import { kebabToPascal as M } from "@arcgis/toolkit/string";
|
|
5
5
|
import R from "typescript";
|
|
6
6
|
function q(e, i, n) {
|
|
7
|
-
return
|
|
7
|
+
return I(e, i, n) ?? void 0;
|
|
8
8
|
}
|
|
9
|
-
function z(e, i, n, t) {
|
|
10
|
-
|
|
11
|
-
return s === void 0 ? t : s ?? void 0;
|
|
9
|
+
function z(e, i, n, t, o) {
|
|
10
|
+
let s = I(e, i, n);
|
|
11
|
+
return s === void 0 && o !== void 0 && (s = I(o, i, n)), s === void 0 ? t : s ?? void 0;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function I(e, i, n) {
|
|
14
14
|
const t = R.getLeadingCommentRanges(n.file.text, e.pos);
|
|
15
15
|
if (t === void 0)
|
|
16
16
|
return;
|
|
17
|
-
let
|
|
17
|
+
let o;
|
|
18
18
|
for (const l of t) {
|
|
19
19
|
const d = n.file.text.slice(l.pos, l.end);
|
|
20
|
-
d.startsWith("/**") && (
|
|
20
|
+
d.startsWith("/**") && (o !== void 0 && n.config.strict && n.emitError(
|
|
21
21
|
`Found multiple JSDoc comments for the same node. This is not allowed.
|
|
22
22
|
If one of these was meant to be a file-level comment, read the documentation: https://webgis.esri.com/references/api-extractor/api-node-kinds#module-level-documentation
|
|
23
23
|
If this is meant to be a function overload, read the documentation: https://webgis.esri.com/references/api-extractor/api-node-kinds#function-overloads`,
|
|
@@ -25,26 +25,26 @@ If this is meant to be a function overload, read the documentation: https://webg
|
|
|
25
25
|
file: n.file,
|
|
26
26
|
node: e
|
|
27
27
|
}
|
|
28
|
-
),
|
|
28
|
+
), o = d);
|
|
29
29
|
}
|
|
30
|
-
if (
|
|
30
|
+
if (o === void 0)
|
|
31
31
|
return;
|
|
32
|
-
const
|
|
33
|
-
return J(
|
|
32
|
+
const s = n.config.documentation.omitInternal;
|
|
33
|
+
return J(o, i, s, n);
|
|
34
34
|
}
|
|
35
35
|
function J(e, i, n, t) {
|
|
36
36
|
if (i && !e.includes("* @public") && (n || !e.includes("* @internal")))
|
|
37
37
|
return null;
|
|
38
|
-
const
|
|
39
|
-
let
|
|
38
|
+
const o = e.length - 2;
|
|
39
|
+
let s = 3, l = "";
|
|
40
40
|
const d = [];
|
|
41
41
|
let r, k, h = !1;
|
|
42
|
-
for (;
|
|
42
|
+
for (; s < o; ) {
|
|
43
43
|
let v = e.indexOf(`
|
|
44
|
-
`,
|
|
45
|
-
v === -1 && (v =
|
|
46
|
-
let f = e.slice(
|
|
47
|
-
if (
|
|
44
|
+
`, s);
|
|
45
|
+
v === -1 && (v = o);
|
|
46
|
+
let f = e.slice(s, v).trim();
|
|
47
|
+
if (s = v + 1, f === "*" ? f = "" : f.startsWith("*") && (f[1] === " " ? f = f.slice(2) : t.config.strict ? t.emitError(
|
|
48
48
|
`For consistency, include a space character after '*' in JSDoc. Did not find it in "${e}"`,
|
|
49
49
|
{
|
|
50
50
|
file: t.file,
|
|
@@ -81,68 +81,68 @@ ${f}` : l += `${f}
|
|
|
81
81
|
}
|
|
82
82
|
function G(e, i) {
|
|
83
83
|
for (let n = 0; n < i.docsTags.length; ++n) {
|
|
84
|
-
const t = i.docsTags[n], { name:
|
|
85
|
-
|
|
84
|
+
const t = i.docsTags[n], { name: o, text: s } = t;
|
|
85
|
+
o === "deprecated" ? e.deprecated = s || !0 : (e.docsTags ??= [], e.docsTags.push(t));
|
|
86
86
|
}
|
|
87
87
|
e.description = i.description;
|
|
88
88
|
}
|
|
89
89
|
function K(e, i) {
|
|
90
90
|
for (let n = 0; n < i.docsTags.length; ++n) {
|
|
91
|
-
const t = i.docsTags[n], { name:
|
|
92
|
-
if (
|
|
93
|
-
e.deprecated =
|
|
91
|
+
const t = i.docsTags[n], { name: o, text: s } = t;
|
|
92
|
+
if (o === "deprecated")
|
|
93
|
+
e.deprecated = s || !0;
|
|
94
94
|
else if (t === y.private)
|
|
95
95
|
e.privacy = "private";
|
|
96
|
-
else if (
|
|
97
|
-
e.cssParts ??= [], e.cssParts.push(w(
|
|
98
|
-
else if (
|
|
99
|
-
e.cssStates ??= [], e.cssStates.push(w(
|
|
100
|
-
else if (
|
|
101
|
-
e.slots ??= [], e.slots.push(w(
|
|
102
|
-
else if (
|
|
103
|
-
const l =
|
|
104
|
-
l.esriCompatibilityNames ??= [], l.esriCompatibilityNames.push(
|
|
105
|
-
} else
|
|
96
|
+
else if (o === "csspart")
|
|
97
|
+
e.cssParts ??= [], e.cssParts.push(w(s));
|
|
98
|
+
else if (o === "cssstate")
|
|
99
|
+
e.cssStates ??= [], e.cssStates.push(w(s));
|
|
100
|
+
else if (o === "slot")
|
|
101
|
+
e.slots ??= [], e.slots.push(w(s));
|
|
102
|
+
else if (o === "esriCompatibilityName") {
|
|
103
|
+
const l = N(e);
|
|
104
|
+
l.esriCompatibilityNames ??= [], l.esriCompatibilityNames.push(s ?? "");
|
|
105
|
+
} else o === "readonly" || (e.docsTags ??= [], e.docsTags.push(t));
|
|
106
106
|
}
|
|
107
107
|
e.description = i.description;
|
|
108
108
|
}
|
|
109
109
|
function Q(e, i) {
|
|
110
110
|
const n = e, t = [];
|
|
111
|
-
for (let
|
|
112
|
-
const
|
|
111
|
+
for (let o = 0; o < i.docsTags.length; ++o) {
|
|
112
|
+
const s = i.docsTags[o], { name: l, text: d } = s;
|
|
113
113
|
if (l === "deprecated")
|
|
114
114
|
e.deprecated = d || !0;
|
|
115
|
-
else if (
|
|
115
|
+
else if (s === y.private)
|
|
116
116
|
e.privacy = "private";
|
|
117
117
|
else if (l === "param")
|
|
118
|
-
t.push(
|
|
118
|
+
t.push(s);
|
|
119
119
|
else if (l === "returns")
|
|
120
|
-
n.return.description =
|
|
120
|
+
n.return.description = s.text;
|
|
121
121
|
else if (l === "esriCompatibilityName") {
|
|
122
122
|
const r = S(e);
|
|
123
123
|
r.esriCompatibilityNames ??= [], r.esriCompatibilityNames.push(d ?? "");
|
|
124
124
|
} else
|
|
125
|
-
e.docsTags ??= [], e.docsTags.push(
|
|
125
|
+
e.docsTags ??= [], e.docsTags.push(s);
|
|
126
126
|
}
|
|
127
127
|
return e.description = i.description, t;
|
|
128
128
|
}
|
|
129
129
|
function X(e, i) {
|
|
130
130
|
for (let n = 0; n < i.docsTags.length; ++n) {
|
|
131
|
-
const t = i.docsTags[n], { name:
|
|
132
|
-
|
|
131
|
+
const t = i.docsTags[n], { name: o, text: s } = t;
|
|
132
|
+
o === "deprecated" ? e.deprecated = s || !0 : o === "default" ? e.default = s : t === y.readonly ? e.readonly = !0 : t === y.private ? e.privacy = "private" : (e.docsTags ??= [], e.docsTags.push(t));
|
|
133
133
|
}
|
|
134
134
|
e.description = i.description;
|
|
135
135
|
}
|
|
136
136
|
function Y(e, i) {
|
|
137
137
|
for (let n = 0; n < i.docsTags.length; ++n) {
|
|
138
|
-
const t = i.docsTags[n], { name:
|
|
139
|
-
if (
|
|
140
|
-
e.deprecated =
|
|
141
|
-
else if (
|
|
142
|
-
e.default =
|
|
143
|
-
else if (
|
|
138
|
+
const t = i.docsTags[n], { name: o, text: s } = t;
|
|
139
|
+
if (o === "deprecated")
|
|
140
|
+
e.deprecated = s || !0;
|
|
141
|
+
else if (o === "default")
|
|
142
|
+
e.default = s;
|
|
143
|
+
else if (o !== "readonly") if (o === "esriCompatibilityName") {
|
|
144
144
|
const l = W(e);
|
|
145
|
-
l.esriCompatibilityNames ??= [], l.esriCompatibilityNames.push(
|
|
145
|
+
l.esriCompatibilityNames ??= [], l.esriCompatibilityNames.push(s ?? "");
|
|
146
146
|
} else
|
|
147
147
|
e.docsTags ??= [], e.docsTags.push(t);
|
|
148
148
|
}
|
|
@@ -150,8 +150,8 @@ function Y(e, i) {
|
|
|
150
150
|
}
|
|
151
151
|
function Z(e, i) {
|
|
152
152
|
for (let n = 0; n < i.docsTags.length; ++n) {
|
|
153
|
-
const t = i.docsTags[n], { name:
|
|
154
|
-
|
|
153
|
+
const t = i.docsTags[n], { name: o, text: s } = t;
|
|
154
|
+
o === "deprecated" ? e.deprecated = s || !0 : t === y.private ? e.privacy = "private" : (e.docsTags ??= [], e.docsTags.push(t));
|
|
155
155
|
}
|
|
156
156
|
e.description = i.description;
|
|
157
157
|
}
|
|
@@ -190,15 +190,15 @@ function w(e) {
|
|
|
190
190
|
};
|
|
191
191
|
let n, t = e.slice(0, i);
|
|
192
192
|
if (t.startsWith("[") && t.endsWith("]")) {
|
|
193
|
-
const
|
|
194
|
-
t =
|
|
193
|
+
const s = t.slice(1, -1), l = s.indexOf("=");
|
|
194
|
+
t = s.slice(0, l), n = s.slice(l + 1);
|
|
195
195
|
}
|
|
196
|
-
const
|
|
196
|
+
const o = e.slice(i + 3);
|
|
197
197
|
return {
|
|
198
198
|
name: t,
|
|
199
199
|
deprecated: void 0,
|
|
200
200
|
summary: void 0,
|
|
201
|
-
description:
|
|
201
|
+
description: o,
|
|
202
202
|
docsTags: void 0,
|
|
203
203
|
type: void 0,
|
|
204
204
|
syntax: void 0,
|
|
@@ -225,15 +225,15 @@ const y = {
|
|
|
225
225
|
};
|
|
226
226
|
function ne(e, i) {
|
|
227
227
|
if (typeof e == "string") {
|
|
228
|
-
const n = e.replaceAll(
|
|
229
|
-
return e.includes("](.") && g(
|
|
228
|
+
const n = e.replaceAll(A, i.resolveJsDocLink).replaceAll(i.config.documentation.alternativeHost, i.config.documentation.host);
|
|
229
|
+
return e.includes("](.") && g(F, e, i), n;
|
|
230
230
|
}
|
|
231
231
|
return e;
|
|
232
232
|
}
|
|
233
233
|
function te(e, i) {
|
|
234
234
|
if (e) {
|
|
235
|
-
const n = e.replaceAll(
|
|
236
|
-
return n.includes("](.") && g(
|
|
235
|
+
const n = e.replaceAll(A, i.resolveJsDocLink).replaceAll(i.config.documentation.alternativeHost, i.config.documentation.host);
|
|
236
|
+
return n.includes("](.") && g(F, n, i), n;
|
|
237
237
|
}
|
|
238
238
|
return e;
|
|
239
239
|
}
|
|
@@ -241,25 +241,25 @@ function se(e, i) {
|
|
|
241
241
|
if (e !== void 0 && i.inheritedModuleName === void 0)
|
|
242
242
|
for (let n = 0; n < e.length; ++n) {
|
|
243
243
|
const t = e[n];
|
|
244
|
-
t.text && (t.text = t.text.replaceAll(
|
|
244
|
+
t.text && (t.text = t.text.replaceAll(A, i.resolveJsDocLink).replaceAll(i.config.documentation.alternativeHost, i.config.documentation.host), t.text.includes("](.") && g(F, t.text, i));
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
const
|
|
247
|
+
const F = "Unexpected relative markdown link. For links to API within the package use {@link}. For all other links, use absolute markdown. Documentation: https://webgis.esri.com/references/api-extractor/tags-reference#link)", A = /\{@link +([^}]+)\}/gu;
|
|
248
248
|
function oe(e, i, n) {
|
|
249
249
|
let t = n.indexOf(" ");
|
|
250
250
|
t === -1 && (t = n.length);
|
|
251
|
-
const
|
|
252
|
-
let
|
|
253
|
-
if (
|
|
251
|
+
const o = n.slice(0, t);
|
|
252
|
+
let s = n.slice(t + 1);
|
|
253
|
+
if (o.startsWith("https://"))
|
|
254
254
|
return e.config.strict ? (g(
|
|
255
255
|
"Did not expect absolute URLs in a @link tag. Please use markdown links for external links. See https://webgis.esri.com/references/api-extractor/tags-reference#link)",
|
|
256
256
|
i,
|
|
257
257
|
e
|
|
258
|
-
), "") : `[${
|
|
259
|
-
const [l, d] =
|
|
258
|
+
), "") : `[${s || o}](${o})`;
|
|
259
|
+
const [l, d] = o.split("#"), [r, k] = l.split("!");
|
|
260
260
|
if (r === "")
|
|
261
261
|
return g(
|
|
262
|
-
`Expected @link reference to start with a module name (before ! or #), but got: ${
|
|
262
|
+
`Expected @link reference to start with a module name (before ! or #), but got: ${o}`,
|
|
263
263
|
i,
|
|
264
264
|
e
|
|
265
265
|
), i;
|
|
@@ -295,7 +295,7 @@ function oe(e, i, n) {
|
|
|
295
295
|
`Invalid reference syntax used. Class/mixin/custom element declarations must be referenced without specifying the class name. Expected ${D("green", r)}`,
|
|
296
296
|
i,
|
|
297
297
|
e
|
|
298
|
-
), i) : (P(e, i, c), `[${
|
|
298
|
+
), i) : (P(e, i, c), `[${s || x(c)}](${b})`);
|
|
299
299
|
} else if (d !== void 0) {
|
|
300
300
|
const c = h.path === f.path, a = v.index.class;
|
|
301
301
|
if (a === void 0)
|
|
@@ -308,12 +308,12 @@ function oe(e, i, n) {
|
|
|
308
308
|
i,
|
|
309
309
|
e
|
|
310
310
|
), i;
|
|
311
|
-
const $ = v.inheritance,
|
|
311
|
+
const $ = v.inheritance, T = typeof $ == "object" ? $ : void 0;
|
|
312
312
|
let m;
|
|
313
313
|
if (d.startsWith("event-")) {
|
|
314
314
|
const u = d.slice(6);
|
|
315
|
-
if (
|
|
316
|
-
m =
|
|
315
|
+
if (T !== void 0)
|
|
316
|
+
m = T.indexedEvents?.[u];
|
|
317
317
|
else if (a.events !== void 0)
|
|
318
318
|
for (let p = 0; p < a.events.length; ++p) {
|
|
319
319
|
const C = a.events[p];
|
|
@@ -324,8 +324,8 @@ function oe(e, i, n) {
|
|
|
324
324
|
}
|
|
325
325
|
} else if (d.startsWith("slot-")) {
|
|
326
326
|
const u = d.slice(5);
|
|
327
|
-
if (
|
|
328
|
-
m =
|
|
327
|
+
if (T !== void 0)
|
|
328
|
+
m = T.indexedSlots?.[u];
|
|
329
329
|
else if (a.slots !== void 0)
|
|
330
330
|
for (let p = 0; p < a.slots.length; ++p) {
|
|
331
331
|
const C = a.slots[p];
|
|
@@ -334,10 +334,10 @@ function oe(e, i, n) {
|
|
|
334
334
|
break;
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
m?.name === "" && (
|
|
337
|
+
m?.name === "" && (s ||= `${x(a)}.default-slot`);
|
|
338
338
|
} else if (d.startsWith("--")) {
|
|
339
|
-
if (
|
|
340
|
-
m =
|
|
339
|
+
if (T !== void 0)
|
|
340
|
+
m = T.indexedCssProperties?.[d];
|
|
341
341
|
else if (a.cssProperties !== void 0)
|
|
342
342
|
for (let u = 0; u < a.cssProperties.length; ++u) {
|
|
343
343
|
const p = a.cssProperties[u];
|
|
@@ -346,7 +346,7 @@ function oe(e, i, n) {
|
|
|
346
346
|
break;
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
|
-
} else if (
|
|
349
|
+
} else if (T?.indexedMembers !== void 0 && (m = T.indexedMembers[d] ?? T.indexedMembers[`static ${d}`]), m === void 0 && a.members !== void 0) {
|
|
350
350
|
for (let u = 0; u < a.members.length; ++u) {
|
|
351
351
|
const p = a.members[u];
|
|
352
352
|
if (d === p.name) {
|
|
@@ -363,20 +363,20 @@ function oe(e, i, n) {
|
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
return m === void 0 ? (e.config.verify.detectBrokenLinks ? g("Failed to find the referenced class member", i, e) : e.silencedBrokenLinkCount += 1, i) : (P(e, i, m), `[${
|
|
366
|
+
return m === void 0 ? (e.config.verify.detectBrokenLinks ? g("Failed to find the referenced class member", i, e) : e.silencedBrokenLinkCount += 1, i) : (P(e, i, m), `[${s || (c ? x(m) : `${x(a)}.${x(m)}`)}](${b})`);
|
|
367
367
|
} else {
|
|
368
368
|
P(e, i, v.index.class);
|
|
369
|
-
const c = v.index.class === void 0 ? B(r) :
|
|
370
|
-
return `[${
|
|
369
|
+
const c = v.index.class === void 0 ? B(r) : x(v.index.class);
|
|
370
|
+
return `[${s || c}](${b})`;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
function O(e, i, n, t) {
|
|
374
|
-
let
|
|
374
|
+
let o;
|
|
375
375
|
if (t.isComponentProject && typeof t.config.documentation.getComponentDocsUrl == "function" && e.startsWith("components/")) {
|
|
376
|
-
const
|
|
377
|
-
r !== void 0 && (
|
|
376
|
+
const s = e.slice(11), l = s.indexOf("/"), d = l === -1 ? s : s.slice(0, l), r = t.config.documentation.getComponentDocsUrl(d, M(d));
|
|
377
|
+
r !== void 0 && (o = r + (l === -1 ? "" : s.slice(l + 1)));
|
|
378
378
|
}
|
|
379
|
-
return
|
|
379
|
+
return o ??= `${t.normalizedApiReferencePrefix}${e}/`, U(o, i, n);
|
|
380
380
|
}
|
|
381
381
|
function U(e, i, n) {
|
|
382
382
|
return i !== void 0 ? n === void 0 ? `${e}#${encodeURIComponent(i)}` : `${e}#${encodeURIComponent(i)}-${encodeURIComponent(n)}` : n !== void 0 ? `${e}#${encodeURIComponent(n)}` : e;
|
|
@@ -1,140 +1,175 @@
|
|
|
1
|
-
import { b as
|
|
2
|
-
function
|
|
3
|
-
const o =
|
|
1
|
+
import { b as O } from "../chunks/links.js";
|
|
2
|
+
function P(e, n) {
|
|
3
|
+
const o = [
|
|
4
|
+
["Additions", (t) => t.added === !0 && !t.deprecated && !t.removed],
|
|
5
|
+
["Deprecations", (t) => !!t.deprecated && !t.removed],
|
|
6
|
+
["Removals", (t) => t.removed === !0]
|
|
7
|
+
], c = [];
|
|
8
|
+
for (const [t, i] of o) {
|
|
9
|
+
const l = T(e, n, i);
|
|
10
|
+
l !== "" && c.push(`### ${t}
|
|
11
|
+
|
|
12
|
+
${l}`);
|
|
13
|
+
}
|
|
14
|
+
return c.join(`
|
|
15
|
+
|
|
16
|
+
`);
|
|
17
|
+
}
|
|
18
|
+
function T({ modules: e }, n, o) {
|
|
19
|
+
const c = {
|
|
4
20
|
children: /* @__PURE__ */ new Map(),
|
|
5
21
|
members: []
|
|
6
22
|
};
|
|
7
|
-
for (let
|
|
8
|
-
const
|
|
9
|
-
let y =
|
|
10
|
-
const M =
|
|
11
|
-
|
|
12
|
-
let U =
|
|
13
|
-
for (const
|
|
14
|
-
U =
|
|
15
|
-
for (let
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
18
|
-
for (let
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
23
|
+
for (let i = 0; i < e.length; ++i) {
|
|
24
|
+
const l = e[i], k = l.path.split("/");
|
|
25
|
+
let y = k;
|
|
26
|
+
const M = k.at(-1);
|
|
27
|
+
l.declarations.length === 1 && l.declarations[0].name === M && (y = k.slice(0, -1));
|
|
28
|
+
let U = c;
|
|
29
|
+
for (const b of y)
|
|
30
|
+
U = N(U, b);
|
|
31
|
+
for (let b = 0; b < l.declarations.length; ++b) {
|
|
32
|
+
const u = l.declarations[b], j = E(u), B = u.removed === !0 ? void 0 : w(n, l.path, u, void 0), D = o(u) ? A(u) : void 0, x = { label: j, viewUrl: B, change: D }, h = u, p = [];
|
|
33
|
+
if (h.members !== void 0)
|
|
34
|
+
for (let d = 0; d < h.members.length; ++d) {
|
|
35
|
+
const s = h.members[d];
|
|
36
|
+
if (!o(s))
|
|
21
37
|
continue;
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
38
|
+
const v = s.kind === "field" ? "property" : s.kind === "call-signature" ? "call signature" : s.kind, f = g(v, s);
|
|
39
|
+
if (f === void 0)
|
|
40
|
+
continue;
|
|
41
|
+
const a = I(s), r = s.removed === !0 ? void 0 : w(
|
|
42
|
+
n,
|
|
43
|
+
l.path,
|
|
44
|
+
u,
|
|
45
|
+
"name" in s ? s.name : `${u.name}Properties`
|
|
27
46
|
);
|
|
28
|
-
|
|
47
|
+
p.push({ label: a, viewUrl: r, change: f });
|
|
29
48
|
}
|
|
30
|
-
if (
|
|
31
|
-
for (let
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
49
|
+
if (h.events !== void 0)
|
|
50
|
+
for (let d = 0; d < h.events.length; ++d) {
|
|
51
|
+
const s = h.events[d];
|
|
52
|
+
if (!o(s))
|
|
53
|
+
continue;
|
|
54
|
+
const v = g("event", s);
|
|
55
|
+
if (v === void 0)
|
|
34
56
|
continue;
|
|
35
|
-
const
|
|
36
|
-
|
|
57
|
+
const f = s.removed === !0 ? void 0 : w(n, l.path, u, `event-${s.name}`);
|
|
58
|
+
p.push({ label: `@${s.name}`, viewUrl: f, change: v });
|
|
37
59
|
}
|
|
38
|
-
if (typeof
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
for (let
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
60
|
+
if (typeof h.tagName == "string") {
|
|
61
|
+
const d = h.slots, s = h.cssParts, v = h.cssProperties, f = h.cssStates;
|
|
62
|
+
if (d !== void 0)
|
|
63
|
+
for (let a = 0; a < d.length; ++a) {
|
|
64
|
+
const r = d[a];
|
|
65
|
+
if (!o(r))
|
|
66
|
+
continue;
|
|
67
|
+
const m = g("slot", r);
|
|
68
|
+
if (m === void 0)
|
|
44
69
|
continue;
|
|
45
|
-
const
|
|
46
|
-
|
|
70
|
+
const $ = r.removed === !0 ? void 0 : w(n, l.path, u, `slot-${r.name}`);
|
|
71
|
+
p.push({ label: r.name, viewUrl: $, change: m });
|
|
47
72
|
}
|
|
48
|
-
if (
|
|
49
|
-
for (let
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
73
|
+
if (s !== void 0)
|
|
74
|
+
for (let a = 0; a < s.length; ++a) {
|
|
75
|
+
const r = s[a];
|
|
76
|
+
if (!o(r))
|
|
52
77
|
continue;
|
|
53
|
-
|
|
78
|
+
const m = g("css part", r);
|
|
79
|
+
if (m === void 0)
|
|
80
|
+
continue;
|
|
81
|
+
p.push({ label: r.name, viewUrl: void 0, change: m });
|
|
54
82
|
}
|
|
55
|
-
if (
|
|
56
|
-
for (let
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
83
|
+
if (v !== void 0)
|
|
84
|
+
for (let a = 0; a < v.length; ++a) {
|
|
85
|
+
const r = v[a];
|
|
86
|
+
if (!o(r))
|
|
87
|
+
continue;
|
|
88
|
+
const m = g("css property", r);
|
|
89
|
+
if (m === void 0)
|
|
59
90
|
continue;
|
|
60
|
-
const
|
|
61
|
-
|
|
91
|
+
const $ = r.removed === !0 ? void 0 : w(n, l.path, u, r.name);
|
|
92
|
+
p.push({ label: r.name, viewUrl: $, change: m });
|
|
62
93
|
}
|
|
63
|
-
if (
|
|
64
|
-
for (let
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
94
|
+
if (f !== void 0)
|
|
95
|
+
for (let a = 0; a < f.length; ++a) {
|
|
96
|
+
const r = f[a];
|
|
97
|
+
if (!o(r))
|
|
98
|
+
continue;
|
|
99
|
+
const m = g("css state", r);
|
|
100
|
+
if (m === void 0)
|
|
67
101
|
continue;
|
|
68
|
-
|
|
102
|
+
p.push({ label: r.name, viewUrl: void 0, change: m });
|
|
69
103
|
}
|
|
70
104
|
}
|
|
71
|
-
|
|
105
|
+
p.length > 0 ? F(U, x).members.push(...p) : D !== void 0 && U.members.push(x);
|
|
72
106
|
}
|
|
73
107
|
}
|
|
74
|
-
const
|
|
75
|
-
for (const
|
|
76
|
-
|
|
77
|
-
return
|
|
108
|
+
const t = [];
|
|
109
|
+
for (const i of c.children.values())
|
|
110
|
+
S(i, "", t);
|
|
111
|
+
return t.join(`
|
|
78
112
|
`);
|
|
79
113
|
}
|
|
80
|
-
function
|
|
81
|
-
const o = e.children.get(
|
|
114
|
+
function N(e, n) {
|
|
115
|
+
const o = e.children.get(n);
|
|
82
116
|
if (o !== void 0)
|
|
83
117
|
return o;
|
|
84
|
-
const c = { name:
|
|
85
|
-
return e.children.set(
|
|
118
|
+
const c = { name: n, children: /* @__PURE__ */ new Map(), members: [], node: void 0 };
|
|
119
|
+
return e.children.set(n, c), c;
|
|
86
120
|
}
|
|
87
|
-
function
|
|
88
|
-
const
|
|
89
|
-
return
|
|
121
|
+
function A(e) {
|
|
122
|
+
const n = e.tagName !== void 0 ? "component" : e.kind === "interface" ? "type declaration" : e.kind;
|
|
123
|
+
return g(n, e);
|
|
90
124
|
}
|
|
91
|
-
function
|
|
92
|
-
const { added: o, removed: c, deprecated:
|
|
93
|
-
if (c)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if (n)
|
|
98
|
-
return typeof n == "string" ? `**deprecated** ${e} ${x(n)}` : `**deprecated** ${e}`;
|
|
125
|
+
function g(e, n) {
|
|
126
|
+
const { added: o, removed: c, deprecated: t } = n;
|
|
127
|
+
if (c)
|
|
128
|
+
return typeof t == "string" ? `${e} - deprecated ${L(t)}` : e;
|
|
129
|
+
if (t)
|
|
130
|
+
return typeof t == "string" ? `**deprecated** ${e} ${L(t)}` : `**deprecated** ${e}`;
|
|
99
131
|
if (o)
|
|
100
|
-
return
|
|
132
|
+
return e;
|
|
101
133
|
}
|
|
102
|
-
function
|
|
103
|
-
const
|
|
104
|
-
return typeof
|
|
134
|
+
function E(e) {
|
|
135
|
+
const n = e.tagName;
|
|
136
|
+
return typeof n == "string" && n.length > 0 ? n : C(e.name) + (e.kind === "function" ? "()" : "");
|
|
105
137
|
}
|
|
106
|
-
function
|
|
107
|
-
const
|
|
108
|
-
return
|
|
138
|
+
function w(e, n, o, c) {
|
|
139
|
+
const t = `${e}${n}/`;
|
|
140
|
+
return O(t, o.kind === "class" ? void 0 : o.name, c);
|
|
109
141
|
}
|
|
110
|
-
function
|
|
111
|
-
const o =
|
|
112
|
-
return o.node =
|
|
142
|
+
function F(e, n) {
|
|
143
|
+
const o = N(e, n.label);
|
|
144
|
+
return o.node = n, o;
|
|
113
145
|
}
|
|
114
|
-
function
|
|
115
|
-
return e.kind === "constructor" ? "constructor" : e.kind === "call-signature" ? "call signature" : e.kind === "method" ? `${
|
|
146
|
+
function I(e) {
|
|
147
|
+
return e.kind === "constructor" ? "constructor" : e.kind === "call-signature" ? "call signature" : e.kind === "method" ? `${C(e.name)}()` : C(e.name);
|
|
116
148
|
}
|
|
117
|
-
function
|
|
149
|
+
function C(e) {
|
|
118
150
|
return e.replace(/[\\\[\]\(\)]/gu, "\\$&");
|
|
119
151
|
}
|
|
120
|
-
function
|
|
152
|
+
function L(e) {
|
|
121
153
|
return e.split(`
|
|
122
154
|
`)[0];
|
|
123
155
|
}
|
|
124
|
-
function
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
156
|
+
function S(e, n, o) {
|
|
157
|
+
const c = `${n} `, t = [];
|
|
158
|
+
for (const i of e.members) {
|
|
159
|
+
const l = i.viewUrl === void 0 ? i.label : `[${i.label}](${i.viewUrl})`;
|
|
160
|
+
t.push(`${c}- ${l} - ${i.change}`);
|
|
161
|
+
}
|
|
162
|
+
for (const i of e.children.values())
|
|
163
|
+
S(i, c, t);
|
|
164
|
+
if (!(t.length === 0 && e.node?.change === void 0)) {
|
|
165
|
+
if (e.node) {
|
|
166
|
+
const i = e.node.viewUrl === void 0 ? e.node.label : `[${e.node.label}](${e.node.viewUrl})`;
|
|
167
|
+
e.node.change ? o.push(`${n}- ${i} - ${e.node.change}`) : o.push(`${n}- ${i}`);
|
|
168
|
+
} else
|
|
169
|
+
o.push(`${n}- ${e.name}/`);
|
|
170
|
+
o.push(...t);
|
|
134
171
|
}
|
|
135
|
-
for (const n of e.children.values())
|
|
136
|
-
L(n, c, o);
|
|
137
172
|
}
|
|
138
173
|
export {
|
|
139
|
-
|
|
174
|
+
P as apiDiffToMarkdown
|
|
140
175
|
};
|