@arcgis/api-extractor 5.1.0-next.12 → 5.1.0-next.121
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/README.md +2 -2
- package/bin/cli.js +2 -0
- package/dist/{ApiExtractor-BCmY4dON.js → ApiExtractor-eZ3nrkIb.js} +530 -493
- package/dist/apiJson.d.ts +18 -3
- package/dist/cli.js +0 -1
- package/dist/diff/apiDiffToMarkdown.js +65 -67
- package/dist/extractor/ApiExtractor.js +3 -3
- package/dist/extractor/config.d.ts +12 -3
- package/dist/extractor/config.js +7 -8
- package/dist/extractor/extractors/copyDoc.d.ts +1 -1
- package/dist/extractor/processing/links.js +40 -39
- package/dist/privateContext-CB7P40up.js +86 -0
- package/dist/typeScript-HgjKPtKR.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/inferEntrypoints.js +1 -0
- package/dist/utils/partPrinter.js +29 -28
- package/dist/vite/plugin.js +41 -39
- package/dist/vite/typeScript.js +1 -1
- package/dist/worker-Cqxnyyq3.js +3699 -0
- package/package.json +10 -10
- package/dist/apiHelpers-BYzO767m.js +0 -161
- package/dist/typeScript-BCBmfHLx.js +0 -64
- package/dist/worker-BVWpH1zZ.js +0 -3681
package/dist/apiJson.d.ts
CHANGED
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
* @see https://custom-elements-manifest.open-wc.org/analyzer/getting-started/
|
|
7
7
|
*/
|
|
8
8
|
export interface ApiJson {
|
|
9
|
+
/**
|
|
10
|
+
* The name of the package this api.json describes.
|
|
11
|
+
*
|
|
12
|
+
* > Not present in vanilla custom-elements-manifest.
|
|
13
|
+
*
|
|
14
|
+
* @example "@arcgis/map-components"
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
9
17
|
/**
|
|
10
18
|
* The timestamp at which the api.json was generated, in the format
|
|
11
19
|
* `YYYY-MM-DDThh:mm:ss`.
|
|
@@ -328,6 +336,13 @@ export interface ApiCustomElementDeclaration extends ApiClassDeclaration, ApiWit
|
|
|
328
336
|
* @example "ArcgisCounter" (even if class name is `Counter`)
|
|
329
337
|
*/
|
|
330
338
|
pascalCaseName: string;
|
|
339
|
+
/**
|
|
340
|
+
* True if the custom element is
|
|
341
|
+
* [form-associated](https://html.spec.whatwg.org/dev/custom-elements.html).
|
|
342
|
+
*
|
|
343
|
+
* @default false
|
|
344
|
+
*/
|
|
345
|
+
formAssociated?: boolean;
|
|
331
346
|
members: ApiCustomElementMember[];
|
|
332
347
|
/**
|
|
333
348
|
* The attributes that this element is known to understand.
|
|
@@ -651,7 +666,7 @@ export interface ApiClassDeclaration extends ApiObjectLikeDeclaration, ApiWithEv
|
|
|
651
666
|
* matches the order of language used to describe mixin application, like
|
|
652
667
|
* "S with A, B".
|
|
653
668
|
*
|
|
654
|
-
* @see https://webgis.esri.com/
|
|
669
|
+
* @see https://webgis.esri.com/sdk/contributing/core/core/mixins
|
|
655
670
|
*/
|
|
656
671
|
mixins?: ApiReferenceWithTypeArguments[];
|
|
657
672
|
}
|
|
@@ -778,7 +793,7 @@ export interface ApiClassMethod extends ApiFunctionLike, ApiWithInheritance, Api
|
|
|
778
793
|
* displaying the signature is redundant.
|
|
779
794
|
* Still, if needed, you can use printSignature() util from
|
|
780
795
|
* `@arcgis/api-extractor`.
|
|
781
|
-
* @example "(options?:
|
|
796
|
+
* @example "(options?: PopupViewOpenPopupOptions): Promise<void>"
|
|
782
797
|
*/
|
|
783
798
|
signature: string;
|
|
784
799
|
}
|
|
@@ -796,7 +811,7 @@ export interface ApiClassCallSignature extends Omit<ApiFunctionLike, "name">, Ap
|
|
|
796
811
|
/**
|
|
797
812
|
* A description of a class mixin.
|
|
798
813
|
*
|
|
799
|
-
* @see [WebGIS - Mixins](https://webgis.esri.com/
|
|
814
|
+
* @see [WebGIS - Mixins](https://webgis.esri.com/sdk/contributing/core/core/mixins)
|
|
800
815
|
*/
|
|
801
816
|
export interface ApiMixinDeclaration extends Omit<ApiFunctionLike, "return">, ApiObjectLikeDeclaration, ApiWithEvents {
|
|
802
817
|
kind: "mixin";
|
package/dist/cli.js
CHANGED
|
@@ -5,81 +5,79 @@ function K({ modules: e }, t) {
|
|
|
5
5
|
members: []
|
|
6
6
|
};
|
|
7
7
|
for (let n = 0; n < e.length; ++n) {
|
|
8
|
-
const
|
|
9
|
-
let y =
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
let
|
|
13
|
-
for (const
|
|
14
|
-
|
|
15
|
-
for (let
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
18
|
-
for (let
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
8
|
+
const i = e[n], w = i.path.split("/");
|
|
9
|
+
let y = w;
|
|
10
|
+
const M = w.at(-1);
|
|
11
|
+
i.declarations.length === 1 && i.declarations[0].name === M && (y = w.slice(0, -1));
|
|
12
|
+
let U = o;
|
|
13
|
+
for (const g of y)
|
|
14
|
+
U = D(U, g);
|
|
15
|
+
for (let g = 0; g < i.declarations.length; ++g) {
|
|
16
|
+
const f = i.declarations[g], S = B(f), O = f.removed === !0 ? void 0 : $(t, i.path, f, void 0), C = j(f), N = { label: S, viewUrl: O, change: C }, d = f, h = [];
|
|
17
|
+
if (d.members !== void 0)
|
|
18
|
+
for (let l = 0; l < d.members.length; ++l) {
|
|
19
|
+
const r = d.members[l], m = r.kind === "field" ? "property" : r.kind === "call-signature" ? "call signature" : r.kind, p = v(m, r);
|
|
20
|
+
if (p === void 0)
|
|
21
21
|
continue;
|
|
22
|
-
const
|
|
22
|
+
const s = F(r), a = r.removed === !0 ? void 0 : $(
|
|
23
23
|
t,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"name" in
|
|
24
|
+
i.path,
|
|
25
|
+
f,
|
|
26
|
+
"name" in r ? r.name : `${f.name}Properties`
|
|
27
27
|
);
|
|
28
|
-
|
|
28
|
+
h.push({ label: s, viewUrl: a, change: p });
|
|
29
29
|
}
|
|
30
|
-
if (
|
|
31
|
-
for (let
|
|
32
|
-
const
|
|
30
|
+
if (d.events !== void 0)
|
|
31
|
+
for (let l = 0; l < d.events.length; ++l) {
|
|
32
|
+
const r = d.events[l], m = v("event", r);
|
|
33
33
|
if (m === void 0)
|
|
34
34
|
continue;
|
|
35
|
-
const
|
|
36
|
-
|
|
35
|
+
const p = r.removed === !0 ? void 0 : $(t, i.path, f, `event-${r.name}`);
|
|
36
|
+
h.push({ label: `@${r.name}`, viewUrl: p, change: m });
|
|
37
37
|
}
|
|
38
|
-
if (typeof
|
|
39
|
-
const
|
|
40
|
-
if (
|
|
41
|
-
for (let
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
38
|
+
if (typeof d.tagName == "string") {
|
|
39
|
+
const l = d.slots, r = d.cssParts, m = d.cssProperties, p = d.cssStates;
|
|
40
|
+
if (l !== void 0)
|
|
41
|
+
for (let s = 0; s < l.length; ++s) {
|
|
42
|
+
const a = l[s], u = v("slot", a);
|
|
43
|
+
if (u === void 0)
|
|
44
44
|
continue;
|
|
45
|
-
const
|
|
46
|
-
|
|
45
|
+
const b = a.removed === !0 ? void 0 : $(t, i.path, f, `slot-${a.name}`);
|
|
46
|
+
h.push({ label: a.name, viewUrl: b, change: u });
|
|
47
47
|
}
|
|
48
|
-
if (
|
|
49
|
-
for (let
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
48
|
+
if (r !== void 0)
|
|
49
|
+
for (let s = 0; s < r.length; ++s) {
|
|
50
|
+
const a = r[s], u = v("css part", a);
|
|
51
|
+
if (u === void 0)
|
|
52
52
|
continue;
|
|
53
|
-
|
|
54
|
-
f.push({ label: r.name, viewUrl: p, change: h });
|
|
53
|
+
h.push({ label: a.name, viewUrl: void 0, change: u });
|
|
55
54
|
}
|
|
56
55
|
if (m !== void 0)
|
|
57
|
-
for (let
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
56
|
+
for (let s = 0; s < m.length; ++s) {
|
|
57
|
+
const a = m[s], u = v("css property", a);
|
|
58
|
+
if (u === void 0)
|
|
60
59
|
continue;
|
|
61
|
-
const
|
|
62
|
-
|
|
60
|
+
const b = a.removed === !0 ? void 0 : $(t, i.path, f, a.name);
|
|
61
|
+
h.push({ label: a.name, viewUrl: b, change: u });
|
|
63
62
|
}
|
|
64
|
-
if (
|
|
65
|
-
for (let
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
63
|
+
if (p !== void 0)
|
|
64
|
+
for (let s = 0; s < p.length; ++s) {
|
|
65
|
+
const a = p[s], u = v("css state", a);
|
|
66
|
+
if (u === void 0)
|
|
68
67
|
continue;
|
|
69
|
-
|
|
70
|
-
f.push({ label: r.name, viewUrl: p, change: h });
|
|
68
|
+
h.push({ label: a.name, viewUrl: void 0, change: u });
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
|
-
|
|
71
|
+
h.length > 0 ? E(U, N).members.push(...h) : C !== void 0 && U.members.push(N);
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
74
|
const c = [];
|
|
77
75
|
for (const n of o.children.values())
|
|
78
|
-
|
|
76
|
+
L(n, "", c);
|
|
79
77
|
return c.join(`
|
|
80
78
|
`);
|
|
81
79
|
}
|
|
82
|
-
function
|
|
80
|
+
function D(e, t) {
|
|
83
81
|
const o = e.children.get(t);
|
|
84
82
|
if (o !== void 0)
|
|
85
83
|
return o;
|
|
@@ -88,42 +86,42 @@ function L(e, t) {
|
|
|
88
86
|
}
|
|
89
87
|
function j(e) {
|
|
90
88
|
const t = e.tagName !== void 0 ? "component" : e.kind === "interface" ? "type declaration" : e.kind;
|
|
91
|
-
return
|
|
89
|
+
return v(t, e);
|
|
92
90
|
}
|
|
93
|
-
function
|
|
91
|
+
function v(e, t) {
|
|
94
92
|
const { added: o, removed: c, deprecated: n } = t;
|
|
95
93
|
if (c) {
|
|
96
|
-
const
|
|
97
|
-
return typeof n == "string" ? `${
|
|
94
|
+
const i = `**removed** ${e}`;
|
|
95
|
+
return typeof n == "string" ? `${i} - deprecated ${x(n)}` : i;
|
|
98
96
|
}
|
|
99
97
|
if (n)
|
|
100
|
-
return typeof n == "string" ? `**deprecated** ${e} ${
|
|
98
|
+
return typeof n == "string" ? `**deprecated** ${e} ${x(n)}` : `**deprecated** ${e}`;
|
|
101
99
|
if (o)
|
|
102
100
|
return `**added** ${e}`;
|
|
103
101
|
}
|
|
104
102
|
function B(e) {
|
|
105
103
|
const t = e.tagName;
|
|
106
|
-
return typeof t == "string" && t.length > 0 ? t :
|
|
104
|
+
return typeof t == "string" && t.length > 0 ? t : k(e.name) + (e.kind === "function" ? "()" : "");
|
|
107
105
|
}
|
|
108
|
-
function
|
|
109
|
-
const n = `${e}${t}
|
|
106
|
+
function $(e, t, o, c) {
|
|
107
|
+
const n = `${e}${t}/`;
|
|
110
108
|
return T(n, o.kind === "class" ? void 0 : o.name, c);
|
|
111
109
|
}
|
|
112
110
|
function E(e, t) {
|
|
113
|
-
const o =
|
|
111
|
+
const o = D(e, t.label);
|
|
114
112
|
return o.node = t, o;
|
|
115
113
|
}
|
|
116
114
|
function F(e) {
|
|
117
|
-
return e.kind === "constructor" ? "constructor" : e.kind === "call-signature" ? "call signature" : e.kind === "method" ? `${
|
|
115
|
+
return e.kind === "constructor" ? "constructor" : e.kind === "call-signature" ? "call signature" : e.kind === "method" ? `${k(e.name)}()` : k(e.name);
|
|
118
116
|
}
|
|
119
|
-
function
|
|
117
|
+
function k(e) {
|
|
120
118
|
return e.replace(/[\\\[\]\(\)]/gu, "\\$&");
|
|
121
119
|
}
|
|
122
|
-
function
|
|
120
|
+
function x(e) {
|
|
123
121
|
return e.split(`
|
|
124
122
|
`)[0];
|
|
125
123
|
}
|
|
126
|
-
function
|
|
124
|
+
function L(e, t, o) {
|
|
127
125
|
if (e.node) {
|
|
128
126
|
const n = e.node.viewUrl === void 0 ? e.node.label : `[${e.node.label}](${e.node.viewUrl})`;
|
|
129
127
|
e.node.change ? o.push(`${t}- ${n} - ${e.node.change}`) : o.push(`${t}- ${n}`);
|
|
@@ -131,11 +129,11 @@ function M(e, t, o) {
|
|
|
131
129
|
o.push(`${t}- ${e.name}/`);
|
|
132
130
|
const c = `${t} `;
|
|
133
131
|
for (const n of e.members) {
|
|
134
|
-
const
|
|
135
|
-
n.change ? o.push(`${c}- ${
|
|
132
|
+
const i = n.viewUrl === void 0 ? n.label : `[${n.label}](${n.viewUrl})`;
|
|
133
|
+
n.change ? o.push(`${c}- ${i} - ${n.change}`) : o.push(`${c}- ${i}`);
|
|
136
134
|
}
|
|
137
135
|
for (const n of e.children.values())
|
|
138
|
-
|
|
136
|
+
L(n, c, o);
|
|
139
137
|
}
|
|
140
138
|
export {
|
|
141
139
|
K as apiDiffToMarkdown
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../typeScript-
|
|
2
|
-
import "../worker-
|
|
1
|
+
import "../typeScript-HgjKPtKR.js";
|
|
2
|
+
import "../worker-Cqxnyyq3.js";
|
|
3
3
|
import "./processing/links.js";
|
|
4
4
|
import "typescript";
|
|
5
|
-
import { A as x } from "../ApiExtractor-
|
|
5
|
+
import { A as x } from "../ApiExtractor-eZ3nrkIb.js";
|
|
6
6
|
import "@arcgis/toolkit/function";
|
|
7
7
|
export {
|
|
8
8
|
x as ApiExtractor
|
|
@@ -186,7 +186,7 @@ export interface ApiExtractorTypesConfig {
|
|
|
186
186
|
* anyway, this option deduplicates work by removing the need for you to run
|
|
187
187
|
* type checking separately.
|
|
188
188
|
*
|
|
189
|
-
* @default // false if running standalone. true if running in Vite.
|
|
189
|
+
* @default // false if running standalone or in storybook. true if running in Vite.
|
|
190
190
|
*/
|
|
191
191
|
readonly fullTypeCheck?: boolean;
|
|
192
192
|
/**
|
|
@@ -279,14 +279,23 @@ export type TypeReplacements = Record<string, Record<string, readonly [modulePat
|
|
|
279
279
|
export interface ApiExtractorDocumentationConfig {
|
|
280
280
|
readonly copyDocDefinitions?: CopyDocDefinitions;
|
|
281
281
|
readonly noInheritMembers?: NoInheritMembers;
|
|
282
|
+
/**
|
|
283
|
+
* Whether to omit \@internal APIs from api.json.
|
|
284
|
+
* This can only be disabled if not emitting .d.ts files.
|
|
285
|
+
* Otherwise, you can manually filter out nodes that have
|
|
286
|
+
* .docsTags[].name==="internal" in the api.json.
|
|
287
|
+
*
|
|
288
|
+
* @default false
|
|
289
|
+
*/
|
|
290
|
+
readonly omitInternal?: boolean;
|
|
282
291
|
/**
|
|
283
292
|
* Get a prefix for a public-facing URL for each component story.
|
|
284
293
|
*
|
|
285
294
|
* @see https://webgis.esri.com/references/support-packages/storybook
|
|
286
295
|
* @example
|
|
287
|
-
* Set this to "https://developers.arcgis.com/javascript/latest/storybook/map-components/".
|
|
296
|
+
* Set this to "https://developers.arcgis.com/javascript/latest/storybook/map-components/index.html".
|
|
288
297
|
* This will produce URLs like
|
|
289
|
-
* "https://developers.arcgis.com/javascript/latest/storybook/map-components
|
|
298
|
+
* "https://developers.arcgis.com/javascript/latest/storybook/map-components/index.html?path=/story/arcgis-area-measurement-2d--demo&singleStory=true"
|
|
290
299
|
*/
|
|
291
300
|
readonly publicStoryUrlPrefix?: string | false;
|
|
292
301
|
/**
|
package/dist/extractor/config.js
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import "@arcgis/components-build-utils";
|
|
2
|
-
import "../typeScript-
|
|
3
|
-
import { l
|
|
2
|
+
import "../typeScript-HgjKPtKR.js";
|
|
3
|
+
import { l, m as n, r as A } from "../worker-Cqxnyyq3.js";
|
|
4
4
|
import "./processing/links.js";
|
|
5
5
|
import "typescript";
|
|
6
6
|
import "fs/promises";
|
|
7
|
-
import "
|
|
8
|
-
import "util";
|
|
7
|
+
import "node:util";
|
|
9
8
|
import "@arcgis/toolkit/string";
|
|
10
|
-
import "../apiHelpers
|
|
9
|
+
import "../utils/apiHelpers.js";
|
|
11
10
|
import "@arcgis/toolkit/function";
|
|
12
11
|
import "node:fs";
|
|
13
12
|
import "node:url";
|
|
14
13
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
l as loadApiExtractorConfig,
|
|
15
|
+
n as mergeApiExtractorConfigs,
|
|
16
|
+
A as resolveApiExtractorConfig
|
|
18
17
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApiClassDeclaration, ApiClassMethod, ApiCustomElementDeclaration, ApiCustomElementField, ApiEvent, ApiFunctionDeclaration, ApiInterfaceDeclaration, ApiModule, ApiVariableDeclaration } from "../../apiJson.js";
|
|
2
2
|
|
|
3
|
-
/** [Documentation](https://webgis.esri.com/
|
|
3
|
+
/** [Documentation](https://webgis.esri.com/references/api-extractor/tags-reference#copydoc)) */
|
|
4
4
|
export interface CopyDocDefinitions {
|
|
5
5
|
properties?: CopyDocMemberDeclarations<ApiCustomElementField>;
|
|
6
6
|
methods?: CopyDocMemberDeclarations<ApiClassMethod>;
|
|
@@ -1,87 +1,88 @@
|
|
|
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/references/api-extractor/tags-reference#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/references/api-extractor/tags-reference#link)",
|
|
33
34
|
n,
|
|
34
35
|
e
|
|
35
36
|
), "") : `[${m || u}](${u})`;
|
|
36
|
-
const [
|
|
37
|
+
const [k, t] = 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 =
|
|
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), s = v.file.fileName.slice(e.config.context.cwd.length);
|
|
60
61
|
e.watchFiles.get(r).docLinks.push(i), e.watchFiles.get(r).dependencies.add(s);
|
|
61
62
|
const b = e.watchFiles.get(s).dependents;
|
|
62
63
|
b.has(r) || b.set(r, !1);
|
|
63
64
|
}
|
|
64
|
-
let h = M(
|
|
65
|
+
let h = M(g.path, L, t, 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
77
|
} else if (t !== void 0) {
|
|
77
|
-
const r =
|
|
78
|
+
const r = g.path === D.path, s = v.index.class;
|
|
78
79
|
if (s === void 0)
|
|
79
80
|
return v.index.named[t] === 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}!${t}`)} instead? Linking to properties in interfaces is not yet supported`,
|
|
85
86
|
n,
|
|
86
87
|
e
|
|
87
88
|
), n;
|
|
@@ -141,32 +142,32 @@ function J(e, n, i) {
|
|
|
141
142
|
}
|
|
142
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(s)}.${w(c)}`)}](${h})`;
|
|
143
144
|
} else {
|
|
144
|
-
const r = v.index.class === void 0 ?
|
|
145
|
+
const r = v.index.class === void 0 ? U(f) : w(v.index.class);
|
|
145
146
|
return `[${m || r}](${h})`;
|
|
146
147
|
}
|
|
147
148
|
}
|
|
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("/"), t = k === -1 ? m : m.slice(0, k), f = d.config.documentation.getComponentDocsUrl(t, I(t));
|
|
153
|
+
f !== void 0 && (u = f + (k === -1 ? "" : m.slice(k + 1)));
|
|
153
154
|
}
|
|
154
|
-
return u ??= `${d.normalizedApiReferencePrefix}${e}/`,
|
|
155
|
+
return u ??= `${d.normalizedApiReferencePrefix}${e}/`, x(u, n, i);
|
|
155
156
|
}
|
|
156
|
-
function
|
|
157
|
+
function x(e, n, i) {
|
|
157
158
|
return n !== void 0 ? i === void 0 ? `${e}#${encodeURIComponent(n)}` : `${e}#${encodeURIComponent(n)}-${encodeURIComponent(i)}` : i !== void 0 ? `${e}#${encodeURIComponent(i)}` : e;
|
|
158
159
|
}
|
|
159
|
-
function
|
|
160
|
+
function U(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
|
-
|
|
166
|
+
x as buildViewUrl,
|
|
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
|
+
};
|