@arcgis/api-extractor 5.2.0-next.1 → 5.2.0-next.11

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
@@ -451,7 +451,7 @@ export interface ApiWithInheritance {
451
451
  inheritedFrom?: ApiReference;
452
452
  }
453
453
 
454
- /** @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) */
455
455
  export interface ApiSlot extends ApiWithDescription, ApiWithUnusedSummary {
456
456
  /**
457
457
  * The slot name, or the empty string for an unnamed slot.
@@ -474,7 +474,7 @@ export interface ApiSlot extends ApiWithDescription, ApiWithUnusedSummary {
474
474
  /**
475
475
  * The description of exposed CSS Parts
476
476
  *
477
- * @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
478
478
  */
479
479
  export interface ApiCssPart extends ApiWithDescription, ApiWithUnusedSummary {
480
480
  /** @example "tab" */
@@ -494,7 +494,7 @@ export interface ApiCssPart extends ApiWithDescription, ApiWithUnusedSummary {
494
494
  /**
495
495
  * The description of a CSS Custom State.
496
496
  *
497
- * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
497
+ * @see https://developer.mozilla.org/docs/Web/API/CustomStateSet
498
498
  */
499
499
  export interface ApiCssCustomState extends ApiWithDescription, ApiWithUnusedSummary {
500
500
  /**
@@ -527,7 +527,7 @@ export interface ApiCssCustomProperty extends ApiWithDescription, ApiWithUnusedS
527
527
  * The expected syntax of the defined property. Defaults to "*".
528
528
  *
529
529
  * The syntax must be a valid CSS
530
- * [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)
531
531
  * as defined in the CSS Properties and Values API.
532
532
  *
533
533
  * Examples:
@@ -1,8 +1,8 @@
1
- import "../typeScript-Bi6LkUmP.js";
2
- import "../worker-C9agsAIe.js";
1
+ import "../typeScript-rpB6x3rO.js";
2
+ import "../worker-B9PXR8bT.js";
3
3
  import "./processing/links.js";
4
4
  import "typescript";
5
- import { A as x } from "../ApiExtractor-CZfBqER_.js";
5
+ import { A as x } from "../ApiExtractor-DKbuT3yq.js";
6
6
  import "@arcgis/toolkit/function";
7
7
  export {
8
8
  x as ApiExtractor
@@ -1,17 +1,18 @@
1
1
  import "@arcgis/components-build-utils";
2
- import "../typeScript-Bi6LkUmP.js";
3
- import { l, m as n, r as A } from "../worker-C9agsAIe.js";
2
+ import "../typeScript-rpB6x3rO.js";
3
+ import { l as n, m as A, r as C } from "../worker-B9PXR8bT.js";
4
4
  import "./processing/links.js";
5
5
  import "typescript";
6
6
  import "fs/promises";
7
7
  import "node:util";
8
8
  import "@arcgis/toolkit/string";
9
9
  import "../utils/apiHelpers.js";
10
+ import "@arcgis/toolkit/array";
10
11
  import "@arcgis/toolkit/function";
11
12
  import "node:fs";
12
13
  import "node:url";
13
14
  export {
14
- l as loadApiExtractorConfig,
15
- n as mergeApiExtractorConfigs,
16
- A as resolveApiExtractorConfig
15
+ n as loadApiExtractorConfig,
16
+ A as mergeApiExtractorConfigs,
17
+ C as resolveApiExtractorConfig
17
18
  };
@@ -1,4 +1,4 @@
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
3
  /** [Documentation](https://webgis.esri.com/references/api-extractor/tags-reference#copydoc)) */
4
4
  export interface CopyDocDefinitions {
@@ -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,7 +1,7 @@
1
1
  import { findPath as E, path as u, toSystemPathSeparators as S } from "@arcgis/components-build-utils";
2
2
  import t from "typescript";
3
3
  import { styleText as f } from "util";
4
- const w = "@arcgis/api-extractor", P = "5.2.0-next.1", D = {
4
+ const w = "@arcgis/api-extractor", P = "5.2.0-next.11", D = {
5
5
  name: w,
6
6
  version: P
7
7
  };
@@ -12,6 +12,9 @@ export const globalPackageIdentifier: "global:";
12
12
  /**
13
13
  * Get a name from a class member.
14
14
  *
15
+ * > We don't need a similar utility for ApiModule declarations as each
16
+ * > declaration has a name.
17
+ *
15
18
  * @param member
16
19
  * @example
17
20
  * - method named "test" => "test"
@@ -30,7 +30,7 @@ function x(e, n, o) {
30
30
  }
31
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
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);
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);
34
34
  const { docsTags: i } = e, t = n;
35
35
  if (o !== -1 && (i === void 0 && t.docsTags.length === 1 ? t.docsTags = void 0 : t.docsTags.splice(o, 1)), i !== void 0) {
36
36
  t.docsTags ??= [];
@@ -43,7 +43,7 @@ function k(e, n, o = -1) {
43
43
  }
44
44
  }
45
45
  }
46
- function y(e, n) {
46
+ function A(e, n) {
47
47
  let o = e.text;
48
48
  if (e.references !== void 0)
49
49
  for (let i = e.references.length - 1; i >= 0; i--) {
@@ -59,11 +59,11 @@ function y(e, n) {
59
59
  references: void 0
60
60
  };
61
61
  }
62
- function A(e) {
62
+ function N(e) {
63
63
  return e.return.type.text.startsWith("Promise<");
64
64
  }
65
65
  export {
66
- y as apiTypeToImportType,
66
+ A as apiTypeToImportType,
67
67
  M as compareClassMembers,
68
68
  S as compareNamedNodes,
69
69
  l as compareStrings,
@@ -73,7 +73,7 @@ export {
73
73
  P as getMaybeStaticApiMemberName,
74
74
  p as globalPackageIdentifier,
75
75
  g as isApiMethod,
76
- A as isApiMethodAsync,
76
+ N as isApiMethodAsync,
77
77
  v as isApiProperty,
78
78
  k as mergeApiNodes,
79
79
  h as naturalSortModules
@@ -1,3 +1,4 @@
1
+ import { globalPackageIdentifier as h } from "./apiHelpers.js";
1
2
  const d = {
2
3
  // Create a null prototype object to avoid collisions with Object.prototype when doing lookups
3
4
  // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -12,51 +13,52 @@ const d = {
12
13
  unknown: "https://www.typescriptlang.org/docs/handbook/2/functions.html#unknown",
13
14
  never: "https://www.typescriptlang.org/docs/handbook/2/functions.html#never",
14
15
  any: "https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any",
15
- this: "#"
16
- }, h = Object.keys(d).join("|"), g = new RegExp(`(?<!["'-])\\b(?:${h})\\b(?!["'-])`, "u");
17
- function p(e, c) {
18
- const n = [];
19
- let o = e.text.length;
16
+ this: "#",
17
+ symbol: "https://www.typescriptlang.org/docs/handbook/symbols.html"
18
+ }, p = Object.keys(d).join("|"), g = new RegExp(`(?<!["'-])\\b(?:${p})\\b(?!["'-])`, "u");
19
+ function v(e, c) {
20
+ const o = [];
21
+ let n = e.text.length;
20
22
  if (e.references !== void 0)
21
23
  for (let l = e.references.length - 1; l >= 0; l--) {
22
24
  const t = e.references[l];
23
25
  if (t.start === void 0 || t.end === void 0)
24
26
  continue;
25
- const r = e.text.slice(t.end, o);
26
- r.length > 0 && i(r, c, n);
27
+ const r = e.text.slice(t.end, n);
28
+ r.length > 0 && i(r, c, o);
27
29
  const s = e.text.slice(t.start, t.end);
28
- o = t.start, t.viewUrl === void 0 ? n.push(s) : n.push(
30
+ n = t.start, t.viewUrl === void 0 ? o.push(s) : o.push(
29
31
  c(s, t)
30
32
  );
31
33
  }
32
- if (o > 0) {
33
- const l = e.text.slice(0, o);
34
- i(l, c, n);
34
+ if (n > 0) {
35
+ const l = e.text.slice(0, n);
36
+ i(l, c, o);
35
37
  }
36
- return n.reverse();
38
+ return o.reverse();
37
39
  }
38
- function i(e, c, n) {
39
- const o = n.length;
40
+ function i(e, c, o) {
41
+ const n = o.length;
40
42
  for (let l = 0; l < e.length; ) {
41
43
  const t = e.match(g);
42
44
  if (t?.index === void 0)
43
45
  break;
44
46
  const r = e.slice(0, t.index);
45
- r.length > 0 && n.splice(o, 0, r);
47
+ r.length > 0 && o.splice(n, 0, r);
46
48
  const s = t[0];
47
49
  e = e.slice(t.index + s.length);
48
50
  const a = d[s], b = c(s, {
49
51
  name: s,
50
52
  module: void 0,
51
- package: s === "this" ? void 0 : "global:",
53
+ package: s === "this" ? void 0 : h,
52
54
  viewUrl: a,
53
55
  start: void 0,
54
56
  end: void 0
55
57
  });
56
- n.splice(o, 0, b);
58
+ o.splice(n, 0, b);
57
59
  }
58
- e.length > 0 && n.splice(o, 0, e);
60
+ e.length > 0 && o.splice(n, 0, e);
59
61
  }
60
62
  export {
61
- p as hydrateApiType
63
+ v as hydrateApiType
62
64
  };
@@ -1,6 +1,6 @@
1
- import { l as O, m as J } from "../worker-C9agsAIe.js";
2
- import { A as S, w as T } from "../ApiExtractor-CZfBqER_.js";
3
- import { p as A, l as C } from "../typeScript-Bi6LkUmP.js";
1
+ import { l as O, m as J } from "../worker-B9PXR8bT.js";
2
+ import { A as S, w as T } from "../ApiExtractor-DKbuT3yq.js";
3
+ import { p as A, l as C } from "../typeScript-rpB6x3rO.js";
4
4
  import { writeFile as M } from "node:fs/promises";
5
5
  import { path as w } from "@arcgis/components-build-utils";
6
6
  const N = A.name;
@@ -1,6 +1,6 @@
1
1
  import "@arcgis/components-build-utils";
2
2
  import "typescript";
3
- import { b as t } from "../typeScript-Bi6LkUmP.js";
3
+ import { b as t } from "../typeScript-rpB6x3rO.js";
4
4
  export {
5
5
  t as loadTypeScriptConfig
6
6
  };