@arcgis/api-extractor 5.1.0-next.1 → 5.1.0-next.100

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.
@@ -1,142 +1,265 @@
1
- function M(r, a) {
2
- const n = new Map(r.modules.map((e) => [e.path, e])), t = [];
3
- for (const e of a.modules) {
4
- const s = n.get(e.path), i = k(s, e, !0);
5
- i !== void 0 && t.push(i), n.delete(e.path);
1
+ function w(i, o) {
2
+ if (i.compiler?.name !== "@arcgis/core:manual" || i.compiler?.version !== "4.34")
3
+ return;
4
+ const a = {};
5
+ return i.modules.forEach((e) => {
6
+ a[e.path] = e;
7
+ }), {
8
+ ...o,
9
+ modules: o.modules.filter((e) => {
10
+ const t = a[e.path];
11
+ return e.declarations = e.declarations.filter((s) => {
12
+ if (s.kind === "mixin")
13
+ return !1;
14
+ if (s.kind === "interface") {
15
+ const r = t?.declarations.find(
16
+ (d) => d.name === s.name && d.kind === "interface"
17
+ );
18
+ return s.members = void 0, r !== void 0;
19
+ }
20
+ return !0;
21
+ }), e.declarations.length > 0;
22
+ })
23
+ };
24
+ }
25
+ function x(i) {
26
+ const o = /* @__PURE__ */ new Set([
27
+ // Fake class turned into a variable
28
+ "config",
29
+ // Wasn't visible directly before due to doc mismatch
30
+ "identity/IdentityManagerBase",
31
+ // Fake class turned into a variable
32
+ "identity/IdentityManager",
33
+ // Fake class turned into an interface
34
+ "views/layers/GeoRSSLayerView",
35
+ "views/layers/GraphicsLayerView",
36
+ "views/layers/KMLLayerView",
37
+ "views/layers/VectorTileLayerView",
38
+ "views/layers/PointCloudLayerView",
39
+ // ENUM-like objects turned into const variable + interfaces
40
+ "layers/support/rasterFunctionConstants"
41
+ ]), a = i.modules.filter((n) => {
42
+ if (o.has(n.path))
43
+ return !1;
44
+ const e = n.path.startsWith("widgets/");
45
+ return n.declarations = n.declarations.filter((t) => e ? t.deprecated === void 0 && t.removed === void 0 ? !1 : ((t.kind === "class" || t.kind === "interface" || t.kind === "mixin") && (t.members = void 0), !0) : t.kind === "class" ? t.members === void 0 ? !0 : (t.members = t.members.filter((s) => !(s.kind === "constructor" || s.kind === "call-signature" || A.has(s.name))), t.members.length > 0) : !0), n.declarations.length > 0;
46
+ });
47
+ return { ...i, modules: a };
48
+ }
49
+ const A = /* @__PURE__ */ new Set([
50
+ // Excluded from api.json inheritance to keep file size in check
51
+ "addHandles",
52
+ "hasHandles",
53
+ "removeHandles",
54
+ // These are coming from mixins. Exclude them from the diff to reduce noise
55
+ // compared to more valuable new 5.0 fields.
56
+ // Added 77 times
57
+ "emit",
58
+ // 77
59
+ "hasEventListener",
60
+ // 73
61
+ "fromJSON",
62
+ // 72
63
+ "on",
64
+ // 71
65
+ "toJSON",
66
+ // 63
67
+ "declaredClass",
68
+ // 63
69
+ "getAtOrigin",
70
+ // 63
71
+ "originOf",
72
+ // 63
73
+ "revertAllToOrigin",
74
+ // 63
75
+ "revertToOrigin",
76
+ // 54
77
+ "clone",
78
+ // 50
79
+ "fromPortalItem",
80
+ // 49
81
+ "fromArcGISServerUrl",
82
+ // 28
83
+ "isFulfilled",
84
+ // 28
85
+ "isRejected",
86
+ // 28
87
+ "isResolved",
88
+ // 28
89
+ "when",
90
+ // 6
91
+ "cancelLoad",
92
+ // 6
93
+ "loadError",
94
+ // 6
95
+ "loadStatus",
96
+ // 6
97
+ "loadWarnings"
98
+ ]);
99
+ function N(i, o) {
100
+ const a = w(i, o), n = a ?? o, e = i.compiler?.version.startsWith("4.") === !0 && n.compiler?.version.startsWith("4.") !== !0, t = new Map(
101
+ i.modules.map((d) => [
102
+ b(d, e),
103
+ d
104
+ ])
105
+ ), s = [];
106
+ for (const d of n.modules) {
107
+ const l = t.get(d.path), m = y(l, d, !0);
108
+ m !== void 0 && s.push(m), t.delete(d.path);
6
109
  }
7
- for (const e of n.values()) {
8
- const s = k(void 0, e, !1);
9
- s !== void 0 && t.push(s);
110
+ for (const d of t.values()) {
111
+ const l = y(
112
+ void 0,
113
+ e ? { ...d, path: b(d, e) } : d,
114
+ !1
115
+ );
116
+ l !== void 0 && s.push(l);
10
117
  }
11
- return { modules: t };
118
+ const r = { modules: s };
119
+ return a === void 0 ? r : x(r);
120
+ }
121
+ function b(i, o) {
122
+ return o ? i.declarations?.[0]?.importPath ?? i.path : i.path;
12
123
  }
13
- function k(r, a, n) {
14
- const t = [], e = h(r?.declarations ?? []), s = h(a.declarations ?? []);
15
- for (const i of s.values()) {
16
- const o = i.at(-1), p = o.tagName, u = p ?? o.name, f = e.get(u);
17
- e.delete(u);
18
- const g = f === void 0 && !n ? !0 : void 0, m = n && // Only mark as deprecated if all overloads are deprecated
19
- (i.length === 1 || i.every((d) => d.deprecated !== void 0)) ? o.deprecated : void 0, D = !m && f === void 0 && n ? !0 : void 0;
20
- if (g || D) {
21
- t.push({
22
- kind: o.kind,
23
- name: o.name,
24
- tagName: p,
124
+ function y(i, o, a) {
125
+ const n = [], e = h(i?.declarations ?? []), t = h(o.declarations ?? []);
126
+ for (const s of t.values()) {
127
+ const r = s.at(-1), d = r.tagName, l = d ?? r.name, m = e.get(l);
128
+ e.delete(l);
129
+ const g = m === void 0 && !a ? !0 : void 0, v = (
130
+ // Only mark as deprecated if all overloads are deprecated
131
+ s.length === 1 || s.every((c) => c.deprecated !== void 0) ? r.deprecated : void 0
132
+ ), k = !v && m === void 0 && a ? !0 : void 0;
133
+ if (g || k) {
134
+ n.push({
135
+ kind: r.kind,
136
+ name: r.name,
137
+ tagName: d,
25
138
  members: void 0,
26
139
  removed: g,
27
- added: D,
28
- deprecated: m
140
+ added: k,
141
+ deprecated: v
29
142
  });
30
143
  continue;
31
- } else if (!n)
144
+ } else if (!a)
32
145
  continue;
33
- if (p !== void 0) {
34
- const d = o, c = f?.[0], l = {
35
- kind: d.kind,
36
- name: d.name,
37
- tagName: d.tagName,
38
- deprecated: m,
146
+ if (d !== void 0) {
147
+ const c = r, u = m?.[0], f = {
148
+ kind: c.kind,
149
+ name: c.name,
150
+ tagName: c.tagName,
151
+ deprecated: v,
39
152
  added: void 0,
40
153
  removed: void 0,
41
- members: b(c?.members, d.members),
42
- events: v(c?.events, d.events),
43
- slots: v(c?.slots, d.slots),
44
- cssParts: v(c?.cssParts, d.cssParts),
45
- cssProperties: v(c?.cssProperties, d.cssProperties),
46
- cssStates: v(c?.cssStates, d.cssStates)
154
+ members: M(u?.members, c.members),
155
+ events: p(u?.events, c.events),
156
+ slots: p(u?.slots, c.slots),
157
+ cssParts: p(u?.cssParts, c.cssParts),
158
+ cssProperties: p(u?.cssProperties, c.cssProperties),
159
+ cssStates: p(u?.cssStates, c.cssStates)
47
160
  };
48
- (m !== void 0 || l.members !== void 0 || l.events !== void 0 || l.slots !== void 0 || l.cssParts !== void 0 || l.cssProperties !== void 0 || l.cssStates !== void 0) && t.push(l);
49
- } else if (o.kind === "class" || o.kind === "interface" || o.kind === "mixin") {
50
- const d = f?.[0], c = {
51
- kind: o.kind,
52
- name: o.name,
53
- deprecated: m,
161
+ (v !== void 0 || f.members !== void 0 || f.events !== void 0 || f.slots !== void 0 || f.cssParts !== void 0 || f.cssProperties !== void 0 || f.cssStates !== void 0) && n.push(f);
162
+ } else if (r.kind === "class" || r.kind === "interface" || r.kind === "mixin") {
163
+ const c = m?.[0], u = {
164
+ kind: r.kind,
165
+ name: r.name,
166
+ deprecated: v,
54
167
  added: void 0,
55
168
  removed: void 0,
56
- members: b(d?.members, o.members),
57
- events: "events" in o ? v(d?.events, o.events) : void 0
169
+ members: M(c?.members, r.members),
170
+ events: "events" in r ? p(c?.events, r.events) : void 0
58
171
  };
59
- (m !== void 0 || c.members !== void 0 || c.events !== void 0) && t.push(c);
60
- } else m !== void 0 && t.push({
61
- kind: o.kind,
62
- name: o.name,
63
- deprecated: m,
172
+ (v !== void 0 || u.members !== void 0 || u.events !== void 0) && n.push(u);
173
+ } else v !== void 0 && n.push({
174
+ kind: r.kind,
175
+ name: r.name,
176
+ deprecated: v,
64
177
  added: void 0,
65
178
  removed: void 0
66
179
  });
67
180
  }
68
- if (n)
69
- for (const [i] of e.values())
70
- t.push({
71
- kind: i.kind,
72
- name: i.name,
73
- tagName: i.tagName,
181
+ if (a)
182
+ for (const [s] of e.values())
183
+ n.push({
184
+ kind: s.kind,
185
+ name: s.name,
186
+ tagName: s.tagName,
74
187
  members: void 0,
75
188
  removed: !0,
76
189
  added: void 0,
77
- deprecated: void 0
190
+ deprecated: s.deprecated
78
191
  });
79
- if (t.length !== 0)
192
+ if (n.length !== 0)
80
193
  return {
81
- path: a.path,
82
- declarations: t
194
+ path: o.path,
195
+ declarations: n
83
196
  };
84
197
  }
85
- function h(r) {
86
- const a = /* @__PURE__ */ new Map();
87
- for (let n = 0; n < r.length; ++n) {
88
- const t = r[n], e = t.tagName ?? t.name ?? t.kind, s = a.get(e);
89
- s === void 0 ? a.set(e, [t]) : s.push(t);
198
+ function h(i) {
199
+ const o = /* @__PURE__ */ new Map();
200
+ for (let a = 0; a < i.length; ++a) {
201
+ const n = i[a], e = n.tagName ?? n.name ?? n.kind, t = o.get(e);
202
+ P(n.docsTags) || (t === void 0 ? o.set(e, [n]) : t.push(n));
203
+ }
204
+ return o;
205
+ }
206
+ function P(i) {
207
+ if (i !== void 0) {
208
+ for (let o = 0; o < i.length; ++o)
209
+ if (i[o].name === "internal")
210
+ return !0;
90
211
  }
91
- return a;
212
+ return !1;
92
213
  }
93
- function v(r, a) {
94
- const n = h(r ?? []), t = [];
95
- if (a !== void 0)
96
- for (const e of a)
97
- n.get(e.name) === void 0 ? t.push({
214
+ function p(i, o) {
215
+ const a = h(i ?? []), n = [];
216
+ if (o !== void 0)
217
+ for (const e of o)
218
+ a.get(e.name) === void 0 ? n.push({
98
219
  name: e.name,
99
220
  added: !0
100
- }) : e.deprecated && t.push({
221
+ }) : e.deprecated && n.push({
101
222
  name: e.name,
102
223
  deprecated: e.deprecated
103
- }), n.delete(e.name);
104
- for (const [e] of n.values())
105
- t.push({
224
+ }), a.delete(e.name);
225
+ for (const [e] of a.values())
226
+ n.push({
106
227
  name: e.name,
107
- removed: !0
228
+ removed: !0,
229
+ deprecated: e.deprecated
108
230
  });
109
- return t.length ? t : void 0;
231
+ return n.length ? n : void 0;
110
232
  }
111
- function b(r, a) {
112
- const n = h(r ?? []), t = h(a ?? []), e = [];
113
- for (const [s, i] of t.entries()) {
114
- const o = i.at(-1), p = n.get(s);
115
- n.delete(s);
116
- const u = (
233
+ function M(i, o) {
234
+ const a = h(i ?? []), n = h(o ?? []), e = [];
235
+ for (const [t, s] of n.entries()) {
236
+ const r = s.at(-1), d = a.get(t);
237
+ a.delete(t);
238
+ const l = (
117
239
  // Only mark as deprecated if all overloads are deprecated
118
- i.length === 1 || i.every((g) => g.deprecated !== void 0) ? o.deprecated : void 0
119
- ), f = s === "constructor" || s === "call-signature" ? void 0 : s;
120
- u ? e.push({
121
- kind: o.kind,
122
- name: f,
123
- deprecated: u
124
- }) : p === void 0 && e.push({
125
- kind: o.kind,
126
- name: f,
240
+ s.length === 1 || s.every((g) => g.deprecated !== void 0) ? r.deprecated : void 0
241
+ ), m = t === "constructor" || t === "call-signature" ? void 0 : t;
242
+ l ? e.push({
243
+ kind: r.kind,
244
+ name: m,
245
+ deprecated: l
246
+ }) : d === void 0 && e.push({
247
+ kind: r.kind,
248
+ name: m,
127
249
  added: !0
128
250
  });
129
251
  }
130
- for (const [s, [i]] of n.entries()) {
131
- const o = s === "constructor" || s === "call-signature" ? void 0 : s;
252
+ for (const [t, [s]] of a.entries()) {
253
+ const r = t === "constructor" || t === "call-signature" ? void 0 : t;
132
254
  e.push({
133
- kind: i.kind,
134
- name: o,
135
- removed: !0
255
+ kind: s.kind,
256
+ name: r,
257
+ removed: !0,
258
+ deprecated: s.deprecated
136
259
  });
137
260
  }
138
261
  return e.length ? e : void 0;
139
262
  }
140
263
  export {
141
- M as diffApiJson
264
+ N as diffApiJson
142
265
  };
@@ -26,8 +26,9 @@ export interface ApiDiffBase {
26
26
  */
27
27
  added?: true;
28
28
  /**
29
- * Whether this declaration is deprecated in the new api.json, regardless of
30
- * whether it was deprecated in the old api.json.
29
+ * Whether this declaration is deprecated in the new api.json. If declaration
30
+ * was removed, but was deprecated in the old api.json, this will show the old
31
+ * deprecation message as it points at the replacement API.
31
32
  * If the value is a string, it's the reason for the deprecation.
32
33
  * Deprecated takes precedence over added.
33
34
  *
@@ -1,8 +1,8 @@
1
- import "../typeScript-D4_nAmBW.js";
2
- import "../worker-Btg0KdqM.js";
1
+ import "../typeScript-CjWB1rJ_.js";
2
+ import "../worker-OTZkb-ju.js";
3
3
  import "./processing/links.js";
4
4
  import "typescript";
5
- import { A as x } from "../ApiExtractor-DByayOhi.js";
5
+ import { A as x } from "../ApiExtractor-KGzi9B02.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-D4_nAmBW.js";
3
- import { l as n, m as A, r as C } from "../worker-Btg0KdqM.js";
2
+ import "../typeScript-CjWB1rJ_.js";
3
+ import { l, m as n, r as A } from "../worker-OTZkb-ju.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
1
  import type { ApiClassDeclaration, ApiClassMethod, ApiCustomElementDeclaration, ApiCustomElementField, ApiEvent, ApiFunctionDeclaration, ApiInterfaceDeclaration, ApiModule, ApiVariableDeclaration } from "../../apiJson.js";
2
2
 
3
- /** [Documentation](https://webgis.esri.com/webgis/core/core/documenting-api#copydoc) */
3
+ /** [Documentation](https://webgis.esri.com/sdk/contributing/core/core/documenting-api#copydoc) */
4
4
  export interface CopyDocDefinitions {
5
5
  properties?: CopyDocMemberDeclarations<ApiCustomElementField>;
6
6
  methods?: CopyDocMemberDeclarations<ApiClassMethod>;