@arcgis/api-extractor 5.1.0-next.9 → 5.1.0-next.91
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/cli.js +2 -0
- package/dist/{ApiExtractor-n7bNNfky.js → ApiExtractor-eQY5NhCx.js} +223 -222
- package/dist/apiJson.d.ts +10 -3
- package/dist/cli.js +0 -1
- package/dist/diff/apiDiffToMarkdown.js +65 -67
- package/dist/diff/diffApiJson.js +107 -102
- package/dist/extractor/ApiExtractor.js +3 -3
- package/dist/extractor/config.d.ts +10 -1
- package/dist/extractor/config.js +7 -8
- package/dist/extractor/extractors/copyDoc.d.ts +1 -1
- package/dist/extractor/processing/links.js +65 -64
- package/dist/privateContext-CB7P40up.js +86 -0
- package/dist/typeScript-H1XCuOU6.js +66 -0
- package/dist/utils/apiHelpers.js +78 -15
- package/dist/utils/createIndex.d.ts +1 -1
- package/dist/utils/createIndex.js +46 -45
- package/dist/utils/partPrinter.js +29 -28
- package/dist/vite/plugin.js +41 -39
- package/dist/vite/typeScript.js +1 -1
- package/dist/worker-CzYU5Yle.js +3684 -0
- package/package.json +7 -7
- package/dist/apiHelpers-BYzO767m.js +0 -161
- package/dist/typeScript-CInYutJl.js +0 -64
- package/dist/worker-CkQr9LFy.js +0 -3681
|
@@ -1,145 +1,146 @@
|
|
|
1
|
-
import C from "
|
|
2
|
-
import {
|
|
1
|
+
import { styleText as C } from "node:util";
|
|
2
|
+
import { emitJsDocError as a, getApiNodeLabel as w } from "../../utils/apiHelpers.js";
|
|
3
|
+
import { g as y } from "../../privateContext-CB7P40up.js";
|
|
3
4
|
import { kebabToPascal as I } from "@arcgis/toolkit/string";
|
|
4
|
-
function
|
|
5
|
+
function W(e, n) {
|
|
5
6
|
if (typeof e == "string") {
|
|
6
7
|
const i = e.replaceAll(F, n.resolveJsDocLink).replaceAll(n.config.documentation.alternativeHost, n.config.documentation.host);
|
|
7
|
-
return e.includes("](.") && a(
|
|
8
|
+
return e.includes("](.") && a(P, e, n), i;
|
|
8
9
|
}
|
|
9
10
|
return e;
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
+
function j(e, n) {
|
|
12
13
|
if (e) {
|
|
13
14
|
const i = e.replaceAll(F, n.resolveJsDocLink).replaceAll(n.config.documentation.alternativeHost, n.config.documentation.host);
|
|
14
|
-
return i.includes("](.") && a(
|
|
15
|
+
return i.includes("](.") && a(P, i, n), i;
|
|
15
16
|
}
|
|
16
17
|
return e;
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
+
function J(e, n) {
|
|
19
20
|
if (e !== void 0 && n.inheritedModuleName === void 0)
|
|
20
21
|
for (let i = 0; i < e.length; ++i) {
|
|
21
22
|
const d = e[i];
|
|
22
|
-
d.text && (d.text = d.text.replaceAll(F, n.resolveJsDocLink).replaceAll(n.config.documentation.alternativeHost, n.config.documentation.host), d.text.includes("](.") && a(
|
|
23
|
+
d.text && (d.text = d.text.replaceAll(F, n.resolveJsDocLink).replaceAll(n.config.documentation.alternativeHost, n.config.documentation.host), d.text.includes("](.") && a(P, d.text, n));
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
|
-
const
|
|
26
|
-
function
|
|
26
|
+
const P = "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/sdk/contributing/core/core/documenting-api#link", F = /\{@link +([^}]+)\}/gu;
|
|
27
|
+
function N(e, n, i) {
|
|
27
28
|
let d = i.indexOf(" ");
|
|
28
29
|
d === -1 && (d = i.length);
|
|
29
30
|
const u = i.slice(0, d), m = i.slice(d + 1);
|
|
30
31
|
if (u.startsWith("https://"))
|
|
31
32
|
return e.config.strict ? (a(
|
|
32
|
-
"Did not expect absolute URLs in a @link tag. Please use markdown links for external links. See https://webgis.esri.com/
|
|
33
|
+
"Did not expect absolute URLs in a @link tag. Please use markdown links for external links. See https://webgis.esri.com/sdk/contributing/core/core/documenting-api#link",
|
|
33
34
|
n,
|
|
34
35
|
e
|
|
35
36
|
), "") : `[${m || u}](${u})`;
|
|
36
|
-
const [
|
|
37
|
+
const [k, s] = u.split("#"), [f, L] = k.split("!");
|
|
37
38
|
if (f === "")
|
|
38
39
|
return a(
|
|
39
40
|
`Expected @link reference to start with a module name (before ! or #), but got: ${u}`,
|
|
40
41
|
n,
|
|
41
42
|
e
|
|
42
43
|
), n;
|
|
43
|
-
let
|
|
44
|
-
if (
|
|
44
|
+
let g = e.moduleMap.get(f);
|
|
45
|
+
if (g === void 0 && e.isComponentProject && !e.config.strict) {
|
|
45
46
|
for (const r of e.moduleMap.values())
|
|
46
|
-
if (
|
|
47
|
-
|
|
47
|
+
if (y(r).index.class?.name === f) {
|
|
48
|
+
g = r;
|
|
48
49
|
break;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
|
-
if (
|
|
52
|
+
if (g === void 0)
|
|
52
53
|
return e.config.verify.detectBrokenLinks ? a(
|
|
53
|
-
`Failed to find referenced module: ${C
|
|
54
|
+
`Failed to find referenced module: ${C("red", f)}${f.startsWith("module:") ? '. Module name in @link does not need the "module:" prefix' : f.startsWith("esri/") ? '. Module name in @link does not need to start with the "esri/" prefix.' : ""}`,
|
|
54
55
|
n,
|
|
55
56
|
e
|
|
56
57
|
) : e.silencedBrokenLinkCount += 1, n;
|
|
57
|
-
const v =
|
|
58
|
-
if (e.watchFiles !== void 0 && f !== D.path &&
|
|
59
|
-
const r =
|
|
60
|
-
e.watchFiles.get(r).docLinks.push(i), e.watchFiles.get(r).dependencies.add(
|
|
61
|
-
const b = e.watchFiles.get(
|
|
58
|
+
const v = y(g), D = e.inheritedModuleName === void 0 ? e.apiModule : e.moduleMap.get(e.inheritedModuleName) ?? e.apiModule;
|
|
59
|
+
if (e.watchFiles !== void 0 && f !== D.path && y(D).isStale) {
|
|
60
|
+
const r = y(D).file.fileName.slice(e.config.context.cwd.length), t = v.file.fileName.slice(e.config.context.cwd.length);
|
|
61
|
+
e.watchFiles.get(r).docLinks.push(i), e.watchFiles.get(r).dependencies.add(t);
|
|
62
|
+
const b = e.watchFiles.get(t).dependents;
|
|
62
63
|
b.has(r) || b.set(r, !1);
|
|
63
64
|
}
|
|
64
|
-
let h = M(
|
|
65
|
+
let h = M(g.path, L, s, e);
|
|
65
66
|
if (L !== void 0) {
|
|
66
67
|
const r = v.index.named[L];
|
|
67
68
|
return r === void 0 ? (e.config.verify.detectBrokenLinks ? a(
|
|
68
|
-
`Failed to find the referenced declaration inside the module: ${C
|
|
69
|
+
`Failed to find the referenced declaration inside the module: ${C("red", `${f}!${L}`)}`,
|
|
69
70
|
n,
|
|
70
71
|
e
|
|
71
72
|
) : e.silencedBrokenLinkCount += 1, n) : r === v.index.class ? (a(
|
|
72
|
-
`Invalid reference syntax used. Class/mixin/custom element declarations must be referenced without specifying the class name. Expected ${C
|
|
73
|
+
`Invalid reference syntax used. Class/mixin/custom element declarations must be referenced without specifying the class name. Expected ${C("green", f)}`,
|
|
73
74
|
n,
|
|
74
75
|
e
|
|
75
76
|
), n) : `[${m || w(r)}](${h})`;
|
|
76
|
-
} else if (
|
|
77
|
-
const r =
|
|
78
|
-
if (
|
|
79
|
-
return v.index.named[
|
|
77
|
+
} else if (s !== void 0) {
|
|
78
|
+
const r = g.path === D.path, t = v.index.class;
|
|
79
|
+
if (t === void 0)
|
|
80
|
+
return v.index.named[s] === void 0 ? e.config.verify.detectBrokenLinks ? a(
|
|
80
81
|
'Failed to find the referenced member. Class member reference syntax was used, yet current module does not expose a class/mixin/custom element? Linking to properties in interfaces is not yet supported. For event links, prefix with "event-"',
|
|
81
82
|
n,
|
|
82
83
|
e
|
|
83
84
|
) : e.silencedBrokenLinkCount += 1 : a(
|
|
84
|
-
`Invalid reference syntax used. This syntax is only permitted on modules that export a class/mixin/web component. Perhaps you meant to use ${C
|
|
85
|
+
`Invalid reference syntax used. This syntax is only permitted on modules that export a class/mixin/web component. Perhaps you meant to use ${C("red", `${f}!${s}`)} instead? Linking to properties in interfaces is not yet supported`,
|
|
85
86
|
n,
|
|
86
87
|
e
|
|
87
88
|
), n;
|
|
88
89
|
const b = v.inheritance, p = typeof b == "object" ? b : void 0;
|
|
89
90
|
let c;
|
|
90
|
-
if (
|
|
91
|
-
const o =
|
|
91
|
+
if (s.startsWith("event-")) {
|
|
92
|
+
const o = s.slice(6);
|
|
92
93
|
if (p !== void 0)
|
|
93
94
|
c = p.indexedEvents?.[o];
|
|
94
|
-
else if (
|
|
95
|
-
for (let l = 0; l <
|
|
96
|
-
const $ =
|
|
95
|
+
else if (t.events !== void 0)
|
|
96
|
+
for (let l = 0; l < t.events.length; ++l) {
|
|
97
|
+
const $ = t.events[l];
|
|
97
98
|
if (o === $.name) {
|
|
98
99
|
c = $;
|
|
99
100
|
break;
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
|
-
} else if (
|
|
103
|
-
const o =
|
|
103
|
+
} else if (s.startsWith("slot-")) {
|
|
104
|
+
const o = s.slice(5);
|
|
104
105
|
if (p !== void 0)
|
|
105
106
|
c = p.indexedSlots?.[o];
|
|
106
|
-
else if (
|
|
107
|
-
for (let l = 0; l <
|
|
108
|
-
const $ =
|
|
107
|
+
else if (t.slots !== void 0)
|
|
108
|
+
for (let l = 0; l < t.slots.length; ++l) {
|
|
109
|
+
const $ = t.slots[l];
|
|
109
110
|
if (o === $.name) {
|
|
110
111
|
c = $;
|
|
111
112
|
break;
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
|
-
} else if (
|
|
115
|
+
} else if (s.startsWith("--")) {
|
|
115
116
|
if (p !== void 0)
|
|
116
|
-
c = p.indexedCssProperties?.[
|
|
117
|
-
else if (
|
|
118
|
-
for (let o = 0; o <
|
|
119
|
-
const l =
|
|
120
|
-
if (
|
|
117
|
+
c = p.indexedCssProperties?.[s];
|
|
118
|
+
else if (t.cssProperties !== void 0)
|
|
119
|
+
for (let o = 0; o < t.cssProperties.length; ++o) {
|
|
120
|
+
const l = t.cssProperties[o];
|
|
121
|
+
if (s === l.name) {
|
|
121
122
|
c = l;
|
|
122
123
|
break;
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
|
-
} else if (p?.indexedMembers !== void 0 && (c = p.indexedMembers[
|
|
126
|
-
for (let o = 0; o <
|
|
127
|
-
const l =
|
|
128
|
-
if (
|
|
126
|
+
} else if (p?.indexedMembers !== void 0 && (c = p.indexedMembers[s] ?? p.indexedMembers[`static ${s}`]), c === void 0 && t.members !== void 0) {
|
|
127
|
+
for (let o = 0; o < t.members.length; ++o) {
|
|
128
|
+
const l = t.members[o];
|
|
129
|
+
if (s === l.name) {
|
|
129
130
|
c = l;
|
|
130
131
|
break;
|
|
131
132
|
}
|
|
132
133
|
}
|
|
133
|
-
if (c === void 0 && !e.config.strict && e.isComponentProject &&
|
|
134
|
-
for (let o = 0; o <
|
|
135
|
-
const l =
|
|
136
|
-
if (
|
|
134
|
+
if (c === void 0 && !e.config.strict && e.isComponentProject && t.events !== void 0)
|
|
135
|
+
for (let o = 0; o < t.events.length; ++o) {
|
|
136
|
+
const l = t.events[o];
|
|
137
|
+
if (s === l.name) {
|
|
137
138
|
c = l, h = h.replace("#", "#event-");
|
|
138
139
|
break;
|
|
139
140
|
}
|
|
140
141
|
}
|
|
141
142
|
}
|
|
142
|
-
return c === void 0 ? (e.config.verify.detectBrokenLinks ? a("Failed to find the referenced class member", n, e) : e.silencedBrokenLinkCount += 1, n) : `[${m || (r ? w(c) : `${w(
|
|
143
|
+
return c === void 0 ? (e.config.verify.detectBrokenLinks ? a("Failed to find the referenced class member", n, e) : e.silencedBrokenLinkCount += 1, n) : `[${m || (r ? w(c) : `${w(t)}.${w(c)}`)}](${h})`;
|
|
143
144
|
} else {
|
|
144
145
|
const r = v.index.class === void 0 ? A(f) : w(v.index.class);
|
|
145
146
|
return `[${m || r}](${h})`;
|
|
@@ -148,8 +149,8 @@ function J(e, n, i) {
|
|
|
148
149
|
function M(e, n, i, d) {
|
|
149
150
|
let u;
|
|
150
151
|
if (d.isComponentProject && typeof d.config.documentation.getComponentDocsUrl == "function" && e.startsWith("components/")) {
|
|
151
|
-
const m = e.slice(11),
|
|
152
|
-
f !== void 0 && (u = f + (
|
|
152
|
+
const m = e.slice(11), k = m.indexOf("/"), s = k === -1 ? m : m.slice(0, k), f = d.config.documentation.getComponentDocsUrl(s, I(s));
|
|
153
|
+
f !== void 0 && (u = f + (k === -1 ? "" : m.slice(k + 1)));
|
|
153
154
|
}
|
|
154
155
|
return u ??= `${d.normalizedApiReferencePrefix}${e}/`, U(u, n, i);
|
|
155
156
|
}
|
|
@@ -160,13 +161,13 @@ function A(e) {
|
|
|
160
161
|
const n = e.lastIndexOf("/");
|
|
161
162
|
return n === -1 ? e : e.slice(n + 1);
|
|
162
163
|
}
|
|
163
|
-
const
|
|
164
|
+
const E = (e) => `/javascript/latest/references/${e}/`;
|
|
164
165
|
export {
|
|
165
166
|
U as buildViewUrl,
|
|
166
|
-
|
|
167
|
+
E as getDefaultBasePath,
|
|
167
168
|
M as getViewUrl,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
W as postProcessDeprecated,
|
|
170
|
+
j as postProcessDescription,
|
|
171
|
+
J as postProcessDocsTags,
|
|
172
|
+
N as resolveJsDocLink
|
|
172
173
|
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const e = /* @__PURE__ */ Symbol("privateContext");
|
|
2
|
+
function s(t, o, i, n) {
|
|
3
|
+
return {
|
|
4
|
+
isStale: !0,
|
|
5
|
+
file: t,
|
|
6
|
+
dtsPath: o,
|
|
7
|
+
importsMap: i,
|
|
8
|
+
importsText: void 0,
|
|
9
|
+
constructorPropertiesInterface: void 0,
|
|
10
|
+
constructorOnlySetters: void 0,
|
|
11
|
+
constructorAutoCastType: void 0,
|
|
12
|
+
typeName: void 0,
|
|
13
|
+
inheritance: void 0,
|
|
14
|
+
index: n,
|
|
15
|
+
reExports: void 0,
|
|
16
|
+
namespaces: void 0
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function a() {
|
|
20
|
+
return {
|
|
21
|
+
hasExplicitAbstract: void 0,
|
|
22
|
+
isDefaultExported: void 0,
|
|
23
|
+
eventTypesProperty: void 0,
|
|
24
|
+
isMixinBaseClass: void 0,
|
|
25
|
+
emitAsTypeAlias: void 0,
|
|
26
|
+
esriCompatibilityNames: void 0
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function c() {
|
|
30
|
+
return {
|
|
31
|
+
isAbstract: void 0,
|
|
32
|
+
isAccessor: void 0,
|
|
33
|
+
hasAutoCasting: void 0,
|
|
34
|
+
autoCastingRequiresType: void 0,
|
|
35
|
+
autoCastingDefaultType: void 0,
|
|
36
|
+
isConstructorOnly: void 0,
|
|
37
|
+
isOverride: void 0,
|
|
38
|
+
dtsTypeOverride: void 0
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function u() {
|
|
42
|
+
return {
|
|
43
|
+
isAbstract: void 0,
|
|
44
|
+
isDefaultExported: void 0,
|
|
45
|
+
hasQuestionToken: void 0,
|
|
46
|
+
esriCompatibilityNames: void 0
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function d() {
|
|
50
|
+
return {
|
|
51
|
+
isDefaultExported: void 0,
|
|
52
|
+
esriCompatibilityNames: void 0
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function v(t) {
|
|
56
|
+
return t[e];
|
|
57
|
+
}
|
|
58
|
+
function x(t) {
|
|
59
|
+
return t[e];
|
|
60
|
+
}
|
|
61
|
+
function p(t) {
|
|
62
|
+
return t[e];
|
|
63
|
+
}
|
|
64
|
+
function C(t) {
|
|
65
|
+
return t[e];
|
|
66
|
+
}
|
|
67
|
+
function l(t) {
|
|
68
|
+
return t[e];
|
|
69
|
+
}
|
|
70
|
+
function f(t) {
|
|
71
|
+
return t[e];
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
x as a,
|
|
75
|
+
l as b,
|
|
76
|
+
C as c,
|
|
77
|
+
f as d,
|
|
78
|
+
p as e,
|
|
79
|
+
u as f,
|
|
80
|
+
v as g,
|
|
81
|
+
s as h,
|
|
82
|
+
c as i,
|
|
83
|
+
a as j,
|
|
84
|
+
d as k,
|
|
85
|
+
e as p
|
|
86
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { findPath as E, path as u, toSystemPathSeparators as S } from "@arcgis/components-build-utils";
|
|
2
|
+
import t from "typescript";
|
|
3
|
+
import { styleText as f } from "util";
|
|
4
|
+
const w = "@arcgis/api-extractor", P = "5.1.0-next.91", D = {
|
|
5
|
+
name: w,
|
|
6
|
+
version: P
|
|
7
|
+
};
|
|
8
|
+
let x;
|
|
9
|
+
function N(o) {
|
|
10
|
+
return x ??= t.createPrinter(), x.printNode(t.EmitHint.Unspecified, o, void 0);
|
|
11
|
+
}
|
|
12
|
+
function A(o, e) {
|
|
13
|
+
return o.pos !== -1 && o.end !== -1 && e !== void 0 ? o.getText(e) : N(o);
|
|
14
|
+
}
|
|
15
|
+
let h;
|
|
16
|
+
const g = D.name, m = {
|
|
17
|
+
getCurrentDirectory: process.cwd,
|
|
18
|
+
getCanonicalFileName: (o) => o,
|
|
19
|
+
getNewLine: () => t.sys.newLine
|
|
20
|
+
}, L = function(o, { file: e, node: n, scope: i, start: s, length: c }) {
|
|
21
|
+
this.errorCount += 1, process.exitCode = 1, s ??= n === void 0 || n.pos === -1 ? -1 : n.getStart(e, !1);
|
|
22
|
+
const a = n?.end ?? -1;
|
|
23
|
+
c ??= a === -1 ? -1 : Math.max(1, a - s);
|
|
24
|
+
const r = s >= 0 && c >= 0, d = !r && i !== void 0, l = {
|
|
25
|
+
category: t.DiagnosticCategory.Error,
|
|
26
|
+
code: r ? g : v,
|
|
27
|
+
file: d ? void 0 : e,
|
|
28
|
+
start: r ? s : 0,
|
|
29
|
+
length: r ? c : 0,
|
|
30
|
+
messageText: (d ? `${f("cyan", i, { stream: process.stderr })}: ` : "") + o + (r || n === void 0 ? "" : `
|
|
31
|
+
|
|
32
|
+
${A(n, e)}`)
|
|
33
|
+
}, p = t.formatDiagnosticsWithColorAndContext([l], m);
|
|
34
|
+
h ??= process.env.CI !== void 0 || f("red", "", { stream: process.stderr }) !== "";
|
|
35
|
+
const C = h ? p : p.replaceAll(F, ""), y = r ? C : C.replace(v.toString(), g);
|
|
36
|
+
this.config.context.logger.error(y);
|
|
37
|
+
}, v = 1490, F = /\x1B\[[0-9;]*m/gu, W = f("cyan", `[${g}] `);
|
|
38
|
+
function k(o = process.cwd(), e, n) {
|
|
39
|
+
const i = e === void 0 ? E("tsconfig.json", o) : u.resolve(o, e);
|
|
40
|
+
if (i === void 0)
|
|
41
|
+
throw Error(
|
|
42
|
+
`Unable to find ${S(String(e))}. Please make sure the file exists, or provide types.tsconfigPath option to useLumina()`
|
|
43
|
+
);
|
|
44
|
+
const s = t.readConfigFile(i, t.sys.readFile);
|
|
45
|
+
if (s.error !== void 0)
|
|
46
|
+
throw Error(t.formatDiagnosticsWithColorAndContext([s.error], m));
|
|
47
|
+
const c = s.config, a = n ? c : {
|
|
48
|
+
...c,
|
|
49
|
+
include: [],
|
|
50
|
+
files: [],
|
|
51
|
+
exclude: []
|
|
52
|
+
}, r = t.parseJsonConfigFileContent(a, t.sys, u.dirname(i)), d = 18002, l = n ? r.errors : r.errors.filter((p) => p.code !== d);
|
|
53
|
+
if (l.length > 0)
|
|
54
|
+
throw Error(t.formatDiagnosticsWithColorAndContext(l, m));
|
|
55
|
+
return {
|
|
56
|
+
configPath: i,
|
|
57
|
+
config: r
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
m as a,
|
|
62
|
+
k as b,
|
|
63
|
+
L as e,
|
|
64
|
+
W as l,
|
|
65
|
+
D as p
|
|
66
|
+
};
|
package/dist/utils/apiHelpers.js
CHANGED
|
@@ -1,17 +1,80 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as f } from "../privateContext-CB7P40up.js";
|
|
2
|
+
const g = (e) => e.kind === "method", v = (e) => e.kind === "field";
|
|
3
|
+
function h(e, n) {
|
|
4
|
+
const o = e.sourcePath, i = n.sourcePath;
|
|
5
|
+
let t = 0;
|
|
6
|
+
for (; ; ) {
|
|
7
|
+
const c = o.indexOf("/", t), s = i.indexOf("/", t);
|
|
8
|
+
if (c === -1)
|
|
9
|
+
return s === -1 ? o.slice(t) < i.slice(t) ? -1 : 1 : -1;
|
|
10
|
+
if (s === -1)
|
|
11
|
+
return 1;
|
|
12
|
+
{
|
|
13
|
+
const r = o.slice(t, c), a = i.slice(t, s);
|
|
14
|
+
if (r !== a)
|
|
15
|
+
return r < a ? -1 : 1;
|
|
16
|
+
t = c + 1;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const p = "global:";
|
|
21
|
+
function x(e, n, o) {
|
|
22
|
+
const i = f(o.apiModule).file, t = i.text.indexOf(n) ?? -1;
|
|
23
|
+
o.emitError(`${e}${t === -1 ? `. Found in: ${n}` : ""}`, {
|
|
24
|
+
file: i,
|
|
25
|
+
node: void 0,
|
|
26
|
+
scope: i === void 0 ? o.apiModule.sourcePath : void 0,
|
|
27
|
+
start: t,
|
|
28
|
+
length: n.length
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
const l = new Intl.Collator("en", { numeric: !0 }).compare, S = (e, n) => l(e.name, n.name), M = (e, n) => e.static !== void 0 && n.static === void 0 ? -1 : n.static !== void 0 && e.static === void 0 ? 1 : e.name === void 0 ? n.name === void 0 ? 0 : -1 : n.name === void 0 || "return" in e && !("return" in n) ? 1 : "return" in n && !("return" in e) ? -1 : l(e.name, n.name), d = (e) => e.name ?? (e.kind === "constructor" ? "constructor" : "call-signature"), P = (e) => e.static === !0 ? `static ${d(e)}` : d(e), T = (e) => ("bubbles" in e ? "@" : "") + (e.tagName ?? e.name ?? (e.kind === "constructor" ? "constructor" : "")) + ("return" in e ? "()" : "");
|
|
32
|
+
function k(e, n, o = -1) {
|
|
33
|
+
"description" in n && (n.description ??= e.description), "deprecated" in n && (n.deprecated ??= e.deprecated), "return" in n && e.return !== void 0 && (n.return.description ??= e.return?.description), "readonly" in n && (n.readonly ??= e.readonly);
|
|
34
|
+
const { docsTags: i } = e, t = n;
|
|
35
|
+
if (o !== -1 && (i === void 0 && t.docsTags.length === 1 ? t.docsTags = void 0 : t.docsTags.splice(o, 1)), i !== void 0) {
|
|
36
|
+
t.docsTags ??= [];
|
|
37
|
+
const c = /* @__PURE__ */ new Set();
|
|
38
|
+
for (let s = 0; s < t.docsTags.length; ++s)
|
|
39
|
+
c.add(t.docsTags[s].name);
|
|
40
|
+
for (let s = 0; s < i.length; ++s) {
|
|
41
|
+
const r = i[s];
|
|
42
|
+
c.has(r.name) && r.name !== "example" && r.name !== "see" || t.docsTags.push(r);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function y(e, n) {
|
|
47
|
+
let o = e.text;
|
|
48
|
+
if (e.references !== void 0)
|
|
49
|
+
for (let i = e.references.length - 1; i >= 0; i--) {
|
|
50
|
+
const t = e.references[i];
|
|
51
|
+
if (t.package === p || t.module === void 0 && t.package === void 0 && t.viewUrl === void 0)
|
|
52
|
+
continue;
|
|
53
|
+
const r = t.name === "default" ? "default" : t.name, u = `import("${t.package === void 0 ? `./${t.module ?? n}.js` : t.package + (t.module === void 0 ? "" : `/${t.module}`)}").${r}`;
|
|
54
|
+
o = o.slice(0, t.start) + u + o.slice(t.end);
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
...e,
|
|
58
|
+
text: o,
|
|
59
|
+
references: void 0
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function A(e) {
|
|
63
|
+
return e.return.type.text.startsWith("Promise<");
|
|
64
|
+
}
|
|
2
65
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
66
|
+
y as apiTypeToImportType,
|
|
67
|
+
M as compareClassMembers,
|
|
68
|
+
S as compareNamedNodes,
|
|
69
|
+
l as compareStrings,
|
|
70
|
+
x as emitJsDocError,
|
|
71
|
+
d as getApiMemberName,
|
|
72
|
+
T as getApiNodeLabel,
|
|
73
|
+
P as getMaybeStaticApiMemberName,
|
|
74
|
+
p as globalPackageIdentifier,
|
|
75
|
+
g as isApiMethod,
|
|
76
|
+
A as isApiMethodAsync,
|
|
77
|
+
v as isApiProperty,
|
|
78
|
+
k as mergeApiNodes,
|
|
79
|
+
h as naturalSortModules
|
|
17
80
|
};
|
|
@@ -7,7 +7,7 @@ export interface IndexedModule {
|
|
|
7
7
|
readonly apiModule: ApiModule;
|
|
8
8
|
readonly classLike?: ApiClassDeclaration | ApiCustomElementDeclaration | ApiMixinDeclaration;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Superclasses ancestors. Sorted from most immediate to furthest
|
|
11
11
|
* ancestor.
|
|
12
12
|
*
|
|
13
13
|
* The type reference may refer to a local module or an external package.
|
|
@@ -1,82 +1,83 @@
|
|
|
1
|
-
function y(
|
|
2
|
-
const
|
|
3
|
-
return k(
|
|
1
|
+
function y(t) {
|
|
2
|
+
const o = g(t.modules);
|
|
3
|
+
return k(o), o;
|
|
4
4
|
}
|
|
5
|
-
function g(
|
|
6
|
-
const
|
|
7
|
-
for (let
|
|
8
|
-
const n = s
|
|
5
|
+
function g(t) {
|
|
6
|
+
const o = /* @__PURE__ */ new Map();
|
|
7
|
+
for (let s = 0; s < t.length; ++s) {
|
|
8
|
+
const n = t[s];
|
|
9
9
|
let i;
|
|
10
10
|
for (let a = 0; a < n.declarations.length; ++a) {
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
i =
|
|
11
|
+
const e = n.declarations[a];
|
|
12
|
+
if (e.kind === "class" || e.kind === "mixin") {
|
|
13
|
+
i = e;
|
|
14
14
|
break;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
o.set(n.path, {
|
|
18
18
|
apiModule: n,
|
|
19
19
|
classLike: i,
|
|
20
20
|
ancestors: void 0,
|
|
21
21
|
children: void 0
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return o;
|
|
25
25
|
}
|
|
26
|
-
function k(
|
|
27
|
-
for (const
|
|
28
|
-
p(
|
|
26
|
+
function k(t) {
|
|
27
|
+
for (const o of t.values())
|
|
28
|
+
p(o, t);
|
|
29
29
|
}
|
|
30
|
-
function p(
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
30
|
+
function p(t, o) {
|
|
31
|
+
const s = t.classLike;
|
|
32
|
+
if (s === void 0)
|
|
33
33
|
return;
|
|
34
|
-
const n =
|
|
35
|
-
if (!(
|
|
36
|
-
if (
|
|
37
|
-
for (let a =
|
|
38
|
-
|
|
39
|
-
n.superclass !== void 0 &&
|
|
34
|
+
const n = s;
|
|
35
|
+
if (!(t.ancestors !== void 0 || s.mixins === void 0 && n.superclass === void 0)) {
|
|
36
|
+
if (t.ancestors ??= [], s.mixins !== void 0)
|
|
37
|
+
for (let a = s.mixins.length - 1; a >= 0; --a)
|
|
38
|
+
f(s.mixins[a], t, o);
|
|
39
|
+
n.superclass !== void 0 && v(n.superclass, t, o);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
if (
|
|
44
|
-
const n =
|
|
45
|
-
|
|
42
|
+
function f(t, o, s) {
|
|
43
|
+
if (t.module !== void 0 && t.package === void 0) {
|
|
44
|
+
const n = s.get(t.module);
|
|
45
|
+
if (n === void 0)
|
|
46
|
+
return;
|
|
47
|
+
p(n, s), n.children ??= [], n.children.push(o);
|
|
46
48
|
}
|
|
47
|
-
t.ancestors.push(s);
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
-
if (!(
|
|
51
|
-
|
|
50
|
+
function v(t, o, s) {
|
|
51
|
+
if (!(t.module !== void 0 && t.package === void 0)) {
|
|
52
|
+
o.ancestors.push(t);
|
|
52
53
|
return;
|
|
53
54
|
}
|
|
54
|
-
const i =
|
|
55
|
-
p(i,
|
|
55
|
+
const i = s.get(t.module);
|
|
56
|
+
p(i, s), i.children ??= [], i.children.push(o);
|
|
56
57
|
const a = i.classLike;
|
|
57
|
-
if (a.kind === "mixin" && a.name !==
|
|
58
|
+
if (a.kind === "mixin" && a.name !== t.name && t.name !== "default") {
|
|
58
59
|
const u = i.apiModule.declarations;
|
|
59
|
-
for (let
|
|
60
|
-
const
|
|
61
|
-
if (
|
|
62
|
-
const l =
|
|
60
|
+
for (let r = 0; r < u.length; ++r) {
|
|
61
|
+
const d = u[r];
|
|
62
|
+
if (d.name === t.name) {
|
|
63
|
+
const l = d;
|
|
63
64
|
for (let m = l.supertypes.length - 1; m >= 1; --m) {
|
|
64
|
-
const c = l.supertypes[m],
|
|
65
|
+
const c = l.supertypes[m], h = c.module === void 0 && c.package === void 0 ? {
|
|
65
66
|
name: c.name,
|
|
66
|
-
module:
|
|
67
|
+
module: t.module,
|
|
67
68
|
package: void 0,
|
|
68
69
|
viewUrl: c.viewUrl,
|
|
69
70
|
typeArguments: c.typeArguments
|
|
70
71
|
} : c;
|
|
71
|
-
|
|
72
|
+
f(h, o, s);
|
|
72
73
|
}
|
|
73
|
-
|
|
74
|
+
v(l.supertypes[0], o, s);
|
|
74
75
|
break;
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
} else
|
|
78
|
-
|
|
79
|
-
i.ancestors !== void 0 &&
|
|
79
|
+
o.ancestors.push(t);
|
|
80
|
+
i.ancestors !== void 0 && o.ancestors.push(...i.ancestors);
|
|
80
81
|
}
|
|
81
82
|
export {
|
|
82
83
|
y as createIndex
|