@arcgis/api-extractor 6.0.0-next.2 → 6.0.0-next.20

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,260 +1,161 @@
1
- function w(r, a) {
2
- if (r.compiler?.name !== "@arcgis/core:manual" || r.compiler?.version !== "4.34")
3
- return;
4
- const o = {};
5
- return r.modules.forEach((t) => {
6
- o[t.path] = t;
7
- }), {
8
- ...a,
9
- modules: a.modules.filter((t) => {
10
- const e = o[t.path];
11
- return t.declarations = t.declarations.filter((n) => {
12
- if (n.kind === "mixin")
13
- return !1;
14
- if (n.kind === "interface") {
15
- const s = e?.declarations.find(
16
- (d) => d.name === n.name && d.kind === "interface"
17
- );
18
- return n.members = void 0, s !== void 0;
19
- }
20
- return !0;
21
- }), t.declarations.length > 0;
22
- })
23
- };
24
- }
25
- function x(r) {
26
- const a = /* @__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
- ]), o = r.modules.filter((i) => {
42
- if (a.has(i.path))
43
- return !1;
44
- const t = i.path.startsWith("widgets/");
45
- return i.declarations = i.declarations.filter((e) => t ? e.deprecated === void 0 && e.removed === void 0 ? !1 : ((e.kind === "class" || e.kind === "interface" || e.kind === "mixin") && (e.members = void 0), !0) : e.kind === "class" ? e.members === void 0 ? !0 : (e.members = e.members.filter((n) => !(n.kind === "constructor" || n.kind === "call-signature" || A.has(n.name))), e.members.length > 0) : !0), i.declarations.length > 0;
46
- });
47
- return { ...r, modules: o };
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 I(r, a) {
100
- const o = w(r, a), i = o ?? a, t = r.compiler?.version.startsWith("4.") === !0 && i.compiler?.version.startsWith("4.") !== !0, e = new Map(
101
- r.modules.map((d) => [
102
- b(d, t),
103
- d
1
+ function P(a, d) {
2
+ const i = a.compiler?.version.startsWith("4.") === !0 && d.compiler?.version.startsWith("4.") !== !0, n = new Map(
3
+ a.modules.map((e) => [
4
+ D(e, i),
5
+ e
104
6
  ])
105
- ), n = [];
106
- for (const d of i.modules) {
107
- const l = e.get(d.path), m = y(l, d, !0);
108
- m !== void 0 && n.push(m), e.delete(d.path);
7
+ ), o = [];
8
+ for (const e of d.modules) {
9
+ const s = n.get(e.path), t = b(s, e, !0);
10
+ t !== void 0 && o.push(t), n.delete(e.path);
109
11
  }
110
- for (const d of e.values()) {
111
- const l = y(
12
+ for (const e of n.values()) {
13
+ const s = b(
112
14
  void 0,
113
- t ? { ...d, path: b(d, t) } : d,
15
+ i ? { ...e, path: D(e, i) } : e,
114
16
  !1
115
17
  );
116
- l !== void 0 && n.push(l);
18
+ s !== void 0 && o.push(s);
117
19
  }
118
- const s = { modules: n };
119
- return o === void 0 ? s : x(s);
20
+ return { modules: o };
120
21
  }
121
- function b(r, a) {
122
- return a ? r.declarations?.[0]?.importPath ?? r.path : r.path;
22
+ function D(a, d) {
23
+ return d ? a.declarations?.[0]?.importPath ?? a.path : a.path;
123
24
  }
124
- function y(r, a, o) {
125
- const i = [], t = h(r?.declarations ?? []), e = h(a.declarations ?? []);
126
- for (const n of e.values()) {
127
- const s = n.at(-1), d = s.tagName, l = d ?? s.name, m = t.get(l);
128
- t.delete(l);
129
- const g = m === void 0 && !o ? !0 : void 0, v = (
25
+ function b(a, d, i) {
26
+ const n = [], o = u(a?.declarations ?? []), e = u(d.declarations ?? []);
27
+ for (const s of e.values()) {
28
+ const t = s.at(-1), f = t.tagName, h = f ?? t.name, p = o.get(h);
29
+ o.delete(h);
30
+ const g = p === void 0 && !i ? !0 : void 0, m = (
130
31
  // Only mark as deprecated if all overloads are deprecated
131
- n.length === 1 || n.every((c) => c.deprecated !== void 0) ? s.deprecated : void 0
132
- ), k = !v && m === void 0 && o ? !0 : void 0;
32
+ s.length === 1 || s.every((r) => r.deprecated !== void 0) ? t.deprecated : void 0
33
+ ), k = !m && p === void 0 && i ? !0 : void 0;
133
34
  if (g || k) {
134
- i.push({
135
- kind: s.kind,
136
- name: s.name,
137
- tagName: d,
35
+ n.push({
36
+ kind: t.kind,
37
+ name: t.name,
38
+ tagName: f,
138
39
  members: void 0,
139
40
  removed: g,
140
41
  added: k,
141
- deprecated: v
42
+ deprecated: m
142
43
  });
143
44
  continue;
144
- } else if (!o)
45
+ } else if (!i)
145
46
  continue;
146
- if (d !== void 0) {
147
- const c = s, u = m?.[0], f = {
148
- kind: c.kind,
149
- name: c.name,
150
- tagName: c.tagName,
151
- deprecated: v,
47
+ if (f !== void 0) {
48
+ const r = t, l = p?.[0], c = {
49
+ kind: r.kind,
50
+ name: r.name,
51
+ tagName: r.tagName,
52
+ deprecated: m,
152
53
  added: void 0,
153
54
  removed: void 0,
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)
55
+ members: M(l?.members, r.members),
56
+ events: v(l?.events, r.events),
57
+ slots: v(l?.slots, r.slots),
58
+ cssParts: v(l?.cssParts, r.cssParts),
59
+ cssProperties: v(l?.cssProperties, r.cssProperties),
60
+ cssStates: v(l?.cssStates, r.cssStates)
160
61
  };
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) && i.push(f);
162
- } else if (s.kind === "class" || s.kind === "interface" || s.kind === "mixin") {
163
- const c = m?.[0], u = {
164
- kind: s.kind,
165
- name: s.name,
166
- deprecated: v,
62
+ (m !== void 0 || c.members !== void 0 || c.events !== void 0 || c.slots !== void 0 || c.cssParts !== void 0 || c.cssProperties !== void 0 || c.cssStates !== void 0) && n.push(c);
63
+ } else if (t.kind === "class" || t.kind === "interface" || t.kind === "mixin") {
64
+ const r = p?.[0], l = m !== void 0 && (r?.kind === "class" || r?.kind === "interface") && t.kind === "interface" && t.type === void 0 && (t.supertypes?.length ?? 0) > 0 && (t.members?.length ?? 0) === 0, c = {
65
+ kind: t.kind,
66
+ name: t.name,
67
+ deprecated: m,
167
68
  added: void 0,
168
69
  removed: void 0,
169
- members: M(c?.members, s.members),
170
- events: "events" in s ? p(c?.events, s.events) : void 0
70
+ members: l ? void 0 : M(r?.members, t.members),
71
+ events: !l && "events" in t ? v(r?.events, t.events) : void 0
171
72
  };
172
- (v !== void 0 || u.members !== void 0 || u.events !== void 0) && i.push(u);
173
- } else v !== void 0 && i.push({
174
- kind: s.kind,
175
- name: s.name,
176
- deprecated: v,
73
+ (m !== void 0 || c.members !== void 0 || c.events !== void 0) && n.push(c);
74
+ } else m !== void 0 && n.push({
75
+ kind: t.kind,
76
+ name: t.name,
77
+ deprecated: m,
177
78
  added: void 0,
178
79
  removed: void 0
179
80
  });
180
81
  }
181
- if (o)
182
- for (const [n] of t.values())
183
- i.push({
184
- kind: n.kind,
185
- name: n.name,
186
- tagName: n.tagName,
82
+ if (i)
83
+ for (const [s] of o.values())
84
+ n.push({
85
+ kind: s.kind,
86
+ name: s.name,
87
+ tagName: s.tagName,
187
88
  members: void 0,
188
89
  removed: !0,
189
90
  added: void 0,
190
- deprecated: n.deprecated
91
+ deprecated: s.deprecated
191
92
  });
192
- if (i.length !== 0)
93
+ if (n.length !== 0)
193
94
  return {
194
- path: a.path,
195
- declarations: i
95
+ path: d.path,
96
+ declarations: n
196
97
  };
197
98
  }
198
- function h(r) {
199
- const a = /* @__PURE__ */ new Map();
200
- for (let o = 0; o < r.length; ++o) {
201
- const i = r[o], t = i.tagName ?? i.name ?? i.kind, e = a.get(t);
202
- P(i.docsTags) || (e === void 0 ? a.set(t, [i]) : e.push(i));
99
+ function u(a) {
100
+ const d = /* @__PURE__ */ new Map();
101
+ for (let i = 0; i < a.length; ++i) {
102
+ const n = a[i], o = n.tagName ?? n.name ?? n.kind, e = d.get(o);
103
+ A(n.docsTags) || (e === void 0 ? d.set(o, [n]) : e.push(n));
203
104
  }
204
- return a;
105
+ return d;
205
106
  }
206
- function P(r) {
207
- if (r !== void 0) {
208
- for (let a = 0; a < r.length; ++a)
209
- if (r[a].name === "internal")
107
+ function A(a) {
108
+ if (a !== void 0) {
109
+ for (let d = 0; d < a.length; ++d)
110
+ if (a[d].name === "internal")
210
111
  return !0;
211
112
  }
212
113
  return !1;
213
114
  }
214
- function p(r, a) {
215
- const o = h(r ?? []), i = h(a ?? []), t = [];
216
- for (const [e, n] of i) {
217
- const s = n.at(-1), d = o.get(e)?.at(-1);
218
- o.delete(e), d === void 0 ? t.push({ name: e, added: !0 }) : s.deprecated && t.push({ name: e, deprecated: s.deprecated });
115
+ function v(a, d) {
116
+ const i = u(a ?? []), n = u(d ?? []), o = [];
117
+ for (const [e, s] of n) {
118
+ const t = s.at(-1), f = i.get(e)?.at(-1);
119
+ i.delete(e), f === void 0 ? o.push({ name: e, added: !0 }) : t.deprecated && o.push({ name: e, deprecated: t.deprecated });
219
120
  }
220
- for (const [e] of o.values())
221
- t.push({
121
+ for (const [e] of i.values())
122
+ o.push({
222
123
  name: e.name,
223
124
  removed: !0,
224
125
  deprecated: e.deprecated
225
126
  });
226
- return t.length ? t : void 0;
127
+ return o.length ? o : void 0;
227
128
  }
228
- function M(r, a) {
229
- const o = h(r ?? []), i = h(a ?? []), t = [];
230
- for (const [e, n] of i.entries()) {
231
- const s = n.at(-1), d = o.get(e);
232
- o.delete(e);
233
- const l = (
129
+ function M(a, d) {
130
+ const i = u(a ?? []), n = u(d ?? []), o = [];
131
+ for (const [e, s] of n.entries()) {
132
+ const t = s.at(-1), f = i.get(e);
133
+ i.delete(e);
134
+ const h = (
234
135
  // Only mark as deprecated if all overloads are deprecated
235
- n.length === 1 || n.every((g) => g.deprecated !== void 0) ? s.deprecated : void 0
236
- ), m = e === "constructor" || e === "call-signature" ? void 0 : e;
237
- l ? t.push({
238
- kind: s.kind,
239
- name: m,
240
- deprecated: l
241
- }) : d === void 0 && t.push({
242
- kind: s.kind,
243
- name: m,
136
+ s.length === 1 || s.every((g) => g.deprecated !== void 0) ? t.deprecated : void 0
137
+ ), p = e === "constructor" || e === "call-signature" ? void 0 : e;
138
+ h ? o.push({
139
+ kind: t.kind,
140
+ name: p,
141
+ deprecated: h
142
+ }) : f === void 0 && o.push({
143
+ kind: t.kind,
144
+ name: p,
244
145
  added: !0
245
146
  });
246
147
  }
247
- for (const [e, [n]] of o.entries()) {
248
- const s = e === "constructor" || e === "call-signature" ? void 0 : e;
249
- t.push({
250
- kind: n.kind,
251
- name: s,
148
+ for (const [e, [s]] of i.entries()) {
149
+ const t = e === "constructor" || e === "call-signature" ? void 0 : e;
150
+ o.push({
151
+ kind: s.kind,
152
+ name: t,
252
153
  removed: !0,
253
- deprecated: n.deprecated
154
+ deprecated: s.deprecated
254
155
  });
255
156
  }
256
- return t.length ? t : void 0;
157
+ return o.length ? o : void 0;
257
158
  }
258
159
  export {
259
- I as diffApiJson
160
+ P as diffApiJson
260
161
  };
@@ -405,6 +405,12 @@ export interface ApiExtractorVerifyConfig {
405
405
 
406
406
  /**
407
407
  * Don't include these members in each subclass to keep api reference pages cleaner.
408
+ *
409
+ * For example, if all classes in a package extend the same base class, rather
410
+ * than inheriting members from the base class, and inflating each reference
411
+ * page, create a guide page for the common patterns coming from the base class
412
+ * and link to that guide page above the members reference table.
413
+ *
408
414
  * These has no types impact since their inheritance is still done by TypeScript.
409
415
  *
410
416
  * The structure maps module path to the list of class members inside that module.
@@ -1,4 +1,4 @@
1
- import { f as l } from "../chunks/privateContext.js";
1
+ import { f as u } from "../chunks/privateContext.js";
2
2
  function m(t, r, i, e, n, o) {
3
3
  return `${`${r ? "export default " : "export "}${t ? "abstract " : ""}`}class ${i}${c(e)}${n === void 0 ? "" : ` extends ${n}`} {${o}}`;
4
4
  }
@@ -14,29 +14,29 @@ function c(t) {
14
14
  }
15
15
  function v(t, r, i, e, n) {
16
16
  const o = t ? "export default " : "export ";
17
- let $ = "";
17
+ let f = "";
18
18
  if (e !== void 0) {
19
- $ = " extends ";
20
- for (let f = 0; f < e.length; ++f)
21
- $ += l(e[f]), f < e.length - 1 && ($ += ", ");
19
+ f = " extends ";
20
+ for (let $ = 0; $ < e.length; ++$)
21
+ f += u(e[$]), $ < e.length - 1 && (f += ", ");
22
22
  }
23
- return `${o}interface ${r}${c(i)}${$} {${n}}`;
23
+ return `${o}interface ${r}${c(i)}${f} {${n}}`;
24
24
  }
25
- function g(t, r, i, e, n, o, $, f) {
26
- const s = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`, x = f === void 0 ? "" : `: ${f}`;
27
- return `${s}${n === "" ? "" : d(n)}${e ? "?" : ""}${c(o)}(${a($)})${x};`;
25
+ function g(t, r, i, e, n, o, f, $) {
26
+ const s = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`, d = $ === void 0 ? "" : `: ${$}`;
27
+ return `${s}${n === "" ? "" : a(n)}${e ? "?" : ""}${c(o)}(${l(f)})${d};`;
28
28
  }
29
- function d(t) {
30
- return u.test(t) || t.startsWith("[") ? t : `"${t.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
29
+ function a(t) {
30
+ return x.test(t) || t.startsWith("[") ? t : `"${t.replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
31
31
  }
32
- const h = (t) => !u.test(t) && !t.startsWith("["), u = /^[A-Za-z_$][A-Za-z0-9_$]*$/u;
32
+ const h = (t) => !x.test(t) && !t.startsWith("["), x = /^[A-Za-z_$][A-Za-z0-9_$]*$/u;
33
33
  function b(t, r, i, e, n) {
34
- return `${t ? "export default " : "export "}function ${r}${c(i)}(${a(e)}): ${n};`;
34
+ return `${t ? "export default " : "export "}function ${r}${c(i)}(${l(e)}): ${n};`;
35
35
  }
36
36
  function A(t) {
37
- return `${c(t.typeParameters)}(${a(t.parameters)}): ${t.return.type.text}`;
37
+ return `${c(t.typeParameters)}(${l(t.parameters)}): ${t.return.type.text}`;
38
38
  }
39
- function a(t) {
39
+ function l(t) {
40
40
  if (t === void 0)
41
41
  return "";
42
42
  let r = "";
@@ -46,13 +46,14 @@ function a(t) {
46
46
  }
47
47
  return r;
48
48
  }
49
- function P(t, r, i, e, n, o, $, f) {
50
- return `${`${t ? "protected " : ""}${r ? "abstract " : i ? "static " : ""}${e ? "readonly " : n ? "accessor " : ""}`}${d($)}${o ? "?" : ""}: ${f};`;
49
+ function P(t, r, i, e, n, o, f, $) {
50
+ return `${`${t ? "protected " : ""}${r ? "abstract " : i ? "static " : ""}${e ? "readonly " : n ? "accessor " : ""}`}${a(f)}${o ? "?" : ""}: ${$};`;
51
51
  }
52
- function N(t, r, i, e, n, o) {
53
- const $ = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`, f = d(e), s = o === void 0 ? "" : `
54
- ${$}set ${f}(value: ${o});`;
55
- return `${$}get ${f}(): ${n};${s}`;
52
+ function N(t, r, i, e, n, o, f = !1) {
53
+ const $ = `${t ? "protected " : ""}${r ? "abstract " : ""}${i ? "static " : ""}`, s = a(e), d = o === void 0 ? "" : `
54
+ ${f ? `/** @deprecated */
55
+ ` : ""}${$}set ${s}(value: ${o});`;
56
+ return `${$}get ${s}(): ${n};${d}`;
56
57
  }
57
58
  function z(t, r, i) {
58
59
  const n = `${t ? "declare " : "export "}const ${r}: ${i};`;
@@ -63,13 +64,13 @@ function R(t, r, i, e) {
63
64
  let n = `export type ${t}${c(r)} = `;
64
65
  if (i !== void 0)
65
66
  for (let o = 0; o < i.length; ++o)
66
- n += l(i[o]), (o < i.length - 1 || e !== void 0) && (n += `
67
+ n += u(i[o]), (o < i.length - 1 || e !== void 0) && (n += `
67
68
  & `);
68
69
  return e !== void 0 && (n += e), n += ";", n;
69
70
  }
70
71
  export {
71
72
  h as isPropertyEscapeNeeded,
72
- d as maybeEscapePropertyName,
73
+ a as maybeEscapePropertyName,
73
74
  m as printClass,
74
75
  b as printFunction,
75
76
  N as printGetterSetter,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/api-extractor",
3
- "version": "6.0.0-next.2",
3
+ "version": "6.0.0-next.20",
4
4
  "description": "Documentation engine for WebGIS SDK packages",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -48,8 +48,8 @@
48
48
  ],
49
49
  "license": "SEE LICENSE IN LICENSE.md",
50
50
  "dependencies": {
51
- "@arcgis/node-toolkit": "6.0.0-next.2",
52
- "@arcgis/toolkit": "6.0.0-next.2",
51
+ "@arcgis/node-toolkit": "6.0.0-next.20",
52
+ "@arcgis/toolkit": "6.0.0-next.20",
53
53
  "@commander-js/extra-typings": "^15.0.0",
54
54
  "commander": "^15.0.0",
55
55
  "tslib": "^2.8.1"