@arcgis/api-extractor 5.1.0-next.13 → 5.1.0-next.131

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/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.
@@ -436,7 +451,7 @@ export interface ApiWithInheritance {
436
451
  inheritedFrom?: ApiReference;
437
452
  }
438
453
 
439
- /** @see [MDN Slot](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot) */
454
+ /** @see [MDN Slot](https://developer.mozilla.org/docs/Web/HTML/Element/slot) */
440
455
  export interface ApiSlot extends ApiWithDescription, ApiWithUnusedSummary {
441
456
  /**
442
457
  * The slot name, or the empty string for an unnamed slot.
@@ -459,7 +474,7 @@ export interface ApiSlot extends ApiWithDescription, ApiWithUnusedSummary {
459
474
  /**
460
475
  * The description of exposed CSS Parts
461
476
  *
462
- * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_shadow_parts
477
+ * @see https://developer.mozilla.org/docs/Web/CSS/CSS_shadow_parts
463
478
  */
464
479
  export interface ApiCssPart extends ApiWithDescription, ApiWithUnusedSummary {
465
480
  /** @example "tab" */
@@ -479,7 +494,7 @@ export interface ApiCssPart extends ApiWithDescription, ApiWithUnusedSummary {
479
494
  /**
480
495
  * The description of a CSS Custom State.
481
496
  *
482
- * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
497
+ * @see https://developer.mozilla.org/docs/Web/API/CustomStateSet
483
498
  */
484
499
  export interface ApiCssCustomState extends ApiWithDescription, ApiWithUnusedSummary {
485
500
  /**
@@ -512,7 +527,7 @@ export interface ApiCssCustomProperty extends ApiWithDescription, ApiWithUnusedS
512
527
  * The expected syntax of the defined property. Defaults to "*".
513
528
  *
514
529
  * The syntax must be a valid CSS
515
- * [syntax string](https://developer.mozilla.org/en-US/docs/Web/CSS/@property/syntax)
530
+ * [syntax string](https://developer.mozilla.org/docs/Web/CSS/@property/syntax)
516
531
  * as defined in the CSS Properties and Values API.
517
532
  *
518
533
  * Examples:
@@ -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/webgis/core/core/mixins
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?: __esri.PopupViewOpenPopupOptions): Promise<void>"
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/webgis/core/core/mixins)
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
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env node
2
1
  import { Command as c } from "@commander-js/extra-typings";
3
2
  const o = new c();
4
3
  o.name("api-extractor").description("Extract public API from a TypeScript project to produce .d.ts types and api.json docs");
@@ -5,70 +5,70 @@ function K({ modules: e }, t) {
5
5
  members: []
6
6
  };
7
7
  for (let n = 0; n < e.length; ++n) {
8
- const s = e[n], w = s.path.split("/");
8
+ const i = e[n], w = i.path.split("/");
9
9
  let y = w;
10
10
  const M = w.at(-1);
11
- s.declarations.length === 1 && s.declarations[0].name === M && (y = w.slice(0, -1));
11
+ i.declarations.length === 1 && i.declarations[0].name === M && (y = w.slice(0, -1));
12
12
  let U = o;
13
13
  for (const g of y)
14
- U = N(U, g);
15
- for (let g = 0; g < s.declarations.length; ++g) {
16
- const h = s.declarations[g], S = B(h), O = h.removed === !0 ? void 0 : $(t, s.path, h, void 0), k = j(h), x = { label: S, viewUrl: O, change: k }, d = h, m = [];
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
17
  if (d.members !== void 0)
18
18
  for (let l = 0; l < d.members.length; ++l) {
19
- const a = d.members[l], f = p(a.kind, a);
20
- if (f === void 0)
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 v = F(a), r = a.removed === !0 ? void 0 : $(
22
+ const s = F(r), a = r.removed === !0 ? void 0 : $(
23
23
  t,
24
- s.path,
25
- h,
26
- "name" in a ? a.name : `${h.name}Properties`
24
+ i.path,
25
+ f,
26
+ "name" in r ? r.name : `${f.name}Properties`
27
27
  );
28
- m.push({ label: v, viewUrl: r, change: f });
28
+ h.push({ label: s, viewUrl: a, change: p });
29
29
  }
30
30
  if (d.events !== void 0)
31
31
  for (let l = 0; l < d.events.length; ++l) {
32
- const a = d.events[l], f = p("event", a);
33
- if (f === void 0)
32
+ const r = d.events[l], m = v("event", r);
33
+ if (m === void 0)
34
34
  continue;
35
- const v = a.removed === !0 ? void 0 : $(t, s.path, h, `event-${a.name}`);
36
- m.push({ label: `@${a.name}`, viewUrl: v, change: f });
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
38
  if (typeof d.tagName == "string") {
39
- const l = d.slots, a = d.cssParts, f = d.cssProperties, v = d.cssStates;
39
+ const l = d.slots, r = d.cssParts, m = d.cssProperties, p = d.cssStates;
40
40
  if (l !== void 0)
41
- for (let r = 0; r < l.length; ++r) {
42
- const i = l[r], u = p("slot", i);
41
+ for (let s = 0; s < l.length; ++s) {
42
+ const a = l[s], u = v("slot", a);
43
43
  if (u === void 0)
44
44
  continue;
45
- const b = i.removed === !0 ? void 0 : $(t, s.path, h, `slot-${i.name}`);
46
- m.push({ label: i.name, viewUrl: b, change: u });
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 (a !== void 0)
49
- for (let r = 0; r < a.length; ++r) {
50
- const i = a[r], u = p("css part", i);
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
51
  if (u === void 0)
52
52
  continue;
53
- m.push({ label: i.name, viewUrl: void 0, change: u });
53
+ h.push({ label: a.name, viewUrl: void 0, change: u });
54
54
  }
55
- if (f !== void 0)
56
- for (let r = 0; r < f.length; ++r) {
57
- const i = f[r], u = p("css property", i);
55
+ if (m !== void 0)
56
+ for (let s = 0; s < m.length; ++s) {
57
+ const a = m[s], u = v("css property", a);
58
58
  if (u === void 0)
59
59
  continue;
60
- const b = i.removed === !0 ? void 0 : $(t, s.path, h, i.name);
61
- m.push({ label: i.name, viewUrl: b, change: u });
60
+ const b = a.removed === !0 ? void 0 : $(t, i.path, f, a.name);
61
+ h.push({ label: a.name, viewUrl: b, change: u });
62
62
  }
63
- if (v !== void 0)
64
- for (let r = 0; r < v.length; ++r) {
65
- const i = v[r], u = p("css state", i);
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
66
  if (u === void 0)
67
67
  continue;
68
- m.push({ label: i.name, viewUrl: void 0, change: u });
68
+ h.push({ label: a.name, viewUrl: void 0, change: u });
69
69
  }
70
70
  }
71
- m.length > 0 ? E(U, x).members.push(...m) : k !== void 0 && U.members.push(x);
71
+ h.length > 0 ? E(U, N).members.push(...h) : C !== void 0 && U.members.push(N);
72
72
  }
73
73
  }
74
74
  const c = [];
@@ -77,7 +77,7 @@ function K({ modules: e }, t) {
77
77
  return c.join(`
78
78
  `);
79
79
  }
80
- function N(e, t) {
80
+ function D(e, t) {
81
81
  const o = e.children.get(t);
82
82
  if (o !== void 0)
83
83
  return o;
@@ -86,38 +86,38 @@ function N(e, t) {
86
86
  }
87
87
  function j(e) {
88
88
  const t = e.tagName !== void 0 ? "component" : e.kind === "interface" ? "type declaration" : e.kind;
89
- return p(t, e);
89
+ return v(t, e);
90
90
  }
91
- function p(e, t) {
91
+ function v(e, t) {
92
92
  const { added: o, removed: c, deprecated: n } = t;
93
93
  if (c) {
94
- const s = `**removed** ${e}`;
95
- return typeof n == "string" ? `${s} - deprecated ${D(n)}` : s;
94
+ const i = `**removed** ${e}`;
95
+ return typeof n == "string" ? `${i} - deprecated ${x(n)}` : i;
96
96
  }
97
97
  if (n)
98
- return typeof n == "string" ? `**deprecated** ${e} ${D(n)}` : `**deprecated** ${e}`;
98
+ return typeof n == "string" ? `**deprecated** ${e} ${x(n)}` : `**deprecated** ${e}`;
99
99
  if (o)
100
100
  return `**added** ${e}`;
101
101
  }
102
102
  function B(e) {
103
103
  const t = e.tagName;
104
- return typeof t == "string" && t.length > 0 ? t : C(e.name) + (e.kind === "function" ? "()" : "");
104
+ return typeof t == "string" && t.length > 0 ? t : k(e.name) + (e.kind === "function" ? "()" : "");
105
105
  }
106
106
  function $(e, t, o, c) {
107
107
  const n = `${e}${t}/`;
108
108
  return T(n, o.kind === "class" ? void 0 : o.name, c);
109
109
  }
110
110
  function E(e, t) {
111
- const o = N(e, t.label);
111
+ const o = D(e, t.label);
112
112
  return o.node = t, o;
113
113
  }
114
114
  function F(e) {
115
- return e.kind === "constructor" ? "constructor" : e.kind === "call-signature" ? "call signature" : e.kind === "method" ? `${C(e.name)}()` : C(e.name);
115
+ return e.kind === "constructor" ? "constructor" : e.kind === "call-signature" ? "call signature" : e.kind === "method" ? `${k(e.name)}()` : k(e.name);
116
116
  }
117
- function C(e) {
117
+ function k(e) {
118
118
  return e.replace(/[\\\[\]\(\)]/gu, "\\$&");
119
119
  }
120
- function D(e) {
120
+ function x(e) {
121
121
  return e.split(`
122
122
  `)[0];
123
123
  }
@@ -129,8 +129,8 @@ function L(e, t, o) {
129
129
  o.push(`${t}- ${e.name}/`);
130
130
  const c = `${t} `;
131
131
  for (const n of e.members) {
132
- const s = n.viewUrl === void 0 ? n.label : `[${n.label}](${n.viewUrl})`;
133
- n.change ? o.push(`${c}- ${s} - ${n.change}`) : o.push(`${c}- ${s}`);
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}`);
134
134
  }
135
135
  for (const n of e.children.values())
136
136
  L(n, c, o);
@@ -1,8 +1,8 @@
1
- import "../typeScript-C2M4aviw.js";
2
- import "../worker-oskaUWnO.js";
1
+ import "../typeScript-A4VCaB_l.js";
2
+ import "../worker-DgLbFKBs.js";
3
3
  import "./processing/links.js";
4
4
  import "typescript";
5
- import { A as x } from "../ApiExtractor-CsZw1gc4.js";
5
+ import { A as x } from "../ApiExtractor-BGS5EKsb.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/?path=/story/arcgis-area-measurement-2d--demo&singleStory=true"
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
  /**
@@ -1,18 +1,17 @@
1
1
  import "@arcgis/components-build-utils";
2
- import "../typeScript-C2M4aviw.js";
3
- import { l as n, m as A, r as C } from "../worker-oskaUWnO.js";
2
+ import "../typeScript-A4VCaB_l.js";
3
+ import { l, m as n, r as A } from "../worker-DgLbFKBs.js";
4
4
  import "./processing/links.js";
5
5
  import "typescript";
6
6
  import "fs/promises";
7
- import "chalk";
8
- import "util";
7
+ import "node:util";
9
8
  import "@arcgis/toolkit/string";
10
- import "../apiHelpers-BYzO767m.js";
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
- n as loadApiExtractorConfig,
16
- A as mergeApiExtractorConfigs,
17
- C as resolveApiExtractorConfig
14
+ l as loadApiExtractorConfig,
15
+ n as mergeApiExtractorConfigs,
16
+ A as resolveApiExtractorConfig
18
17
  };
@@ -1,6 +1,6 @@
1
- import type { ApiClassDeclaration, ApiClassMethod, ApiCustomElementDeclaration, ApiCustomElementField, ApiEvent, ApiFunctionDeclaration, ApiInterfaceDeclaration, ApiModule, ApiVariableDeclaration } from "../../apiJson.js";
1
+ import type { ApiClassDeclaration, ApiClassMethod, ApiCustomElementDeclaration, ApiCustomElementField, ApiEvent, ApiFunctionDeclaration, ApiInterfaceDeclaration, ApiModule, ApiVariableDeclaration, ApiWithDeprecated, ApiWithDescription, ApiWithDocsTags } from "../../apiJson.js";
2
2
 
3
- /** [Documentation](https://webgis.esri.com/webgis/core/core/documenting-api#copydoc) */
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>;
@@ -18,8 +18,14 @@ export interface CopyDocDefinitions {
18
18
  interfaces?: CopyDocDeclarations<ApiInterfaceDeclaration>;
19
19
  }
20
20
 
21
- export type CopiableFields = "deprecated" | "description" | "docsTags" | "readonly" | "return";
21
+ /**
22
+ * A common shape for metadata that can be included in declarative copy doc.
23
+ * Extra fields can be specified by imperatively mutating the API declaration.
24
+ */
25
+ export interface CopyDocCommonBase extends Partial<ApiWithDescription>, Partial<ApiWithDocsTags>, Partial<ApiWithDeprecated> {
26
+ return?: ApiWithDescription;
27
+ }
22
28
 
23
- export type CopyDocDeclarations<ApiType extends Partial<Record<CopiableFields, unknown>>> = Record<string, Partial<Pick<ApiType, CopiableFields>> | ((apiDeclaration: ApiType, module: ApiModule) => Partial<Pick<ApiType, CopiableFields>>) | undefined>;
29
+ export type CopyDocDeclarations<ApiType extends Partial<CopyDocCommonBase>> = Record<string, Pick<CopyDocCommonBase, keyof ApiType & keyof CopyDocCommonBase> | ((apiDeclaration: ApiType, module: ApiModule) => Pick<CopyDocCommonBase, keyof ApiType & keyof CopyDocCommonBase>) | undefined>;
24
30
 
25
- export type CopyDocMemberDeclarations<ApiType extends Partial<Record<CopiableFields, unknown>>> = Record<string, Partial<Pick<ApiType, CopiableFields>> | ((apiDeclaration: ApiType, classOrComponent: ApiClassDeclaration | ApiCustomElementDeclaration, module: ApiModule) => Partial<Pick<ApiType, CopiableFields>>) | undefined>;
31
+ export type CopyDocMemberDeclarations<ApiType extends Partial<CopyDocCommonBase>> = Record<string, Pick<CopyDocCommonBase, keyof ApiType & keyof CopyDocCommonBase> | ((apiDeclaration: ApiType, classOrComponent: ApiClassDeclaration | ApiCustomElementDeclaration, module: ApiModule) => Pick<CopyDocCommonBase, keyof ApiType & keyof CopyDocCommonBase> | undefined) | undefined>;
@@ -1,87 +1,88 @@
1
- import C from "chalk";
2
- import { u as a, g as P, v as w } from "../../apiHelpers-BYzO767m.js";
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 R(e, n) {
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(y, e, n), i;
8
+ return e.includes("](.") && a(P, e, n), i;
8
9
  }
9
10
  return e;
10
11
  }
11
- function W(e, n) {
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(y, i, n), i;
15
+ return i.includes("](.") && a(P, i, n), i;
15
16
  }
16
17
  return e;
17
18
  }
18
- function j(e, n) {
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(y, d.text, n));
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 y = "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/webgis/core/core/documenting-api#link", F = /\{@link +([^}]+)\}/gu;
26
- function J(e, n, i) {
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/webgis/core/core/documenting-api#link",
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 [g, t] = u.split("#"), [f, L] = g.split("!");
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 k = e.moduleMap.get(f);
44
- if (k === void 0 && e.isComponentProject && !e.config.strict) {
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 (P(r).index.class?.name === f) {
47
- k = r;
47
+ if (y(r).index.class?.name === f) {
48
+ g = r;
48
49
  break;
49
50
  }
50
51
  }
51
- if (k === void 0)
52
+ if (g === void 0)
52
53
  return e.config.verify.detectBrokenLinks ? a(
53
- `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
+ `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 = P(k), D = e.inheritedModuleName === void 0 ? e.apiModule : e.moduleMap.get(e.inheritedModuleName) ?? e.apiModule;
58
- if (e.watchFiles !== void 0 && f !== D.path && P(D).isStale) {
59
- const r = P(D).file.fileName.slice(e.config.context.cwd.length), s = v.file.fileName.slice(e.config.context.cwd.length);
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(k.path, L, t, e);
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.red(`${f}!${L}`)}`,
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.green(f)}`,
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 = k.path === D.path, s = v.index.class;
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.red(`${f}!${t}`)} instead? Linking to properties in interfaces is not yet supported`,
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 ? A(f) : w(v.index.class);
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), g = m.indexOf("/"), t = g === -1 ? m : m.slice(0, g), f = d.config.documentation.getComponentDocsUrl(t, I(t));
152
- f !== void 0 && (u = f + (g === -1 ? "" : m.slice(g + 1)));
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}/`, U(u, n, i);
155
+ return u ??= `${d.normalizedApiReferencePrefix}${e}/`, x(u, n, i);
155
156
  }
156
- function U(e, n, i) {
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 A(e) {
160
+ function U(e) {
160
161
  const n = e.lastIndexOf("/");
161
162
  return n === -1 ? e : e.slice(n + 1);
162
163
  }
163
- const N = (e) => `/javascript/latest/references/${e}/`;
164
+ const E = (e) => `/javascript/latest/references/${e}/`;
164
165
  export {
165
- U as buildViewUrl,
166
- N as getDefaultBasePath,
166
+ x as buildViewUrl,
167
+ E as getDefaultBasePath,
167
168
  M as getViewUrl,
168
- R as postProcessDeprecated,
169
- W as postProcessDescription,
170
- j as postProcessDocsTags,
171
- J as resolveJsDocLink
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
+ };