@arcgis/api-extractor 5.1.0-next.37 → 5.1.0-next.39

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,5 +1,5 @@
1
- import { l as H, a as se, e as Re, p as fe } from "./typeScript-Drcd6Yzh.js";
2
- import { a as be, o as Me, t as Ge, b as De, c as Le, e as Oe, p as Ne, d as Be, f as _, i as me, g as We, h as Ue, j as ze, k as je, n as He, r as Je } from "./worker-BT6oI8gP.js";
1
+ import { l as H, a as se, e as Re, p as fe } from "./typeScript-DPVMVQZB.js";
2
+ import { a as be, o as Me, t as Ge, b as De, c as Le, e as Oe, p as Ne, d as Be, f as _, i as me, g as We, h as Ue, j as ze, k as je, n as He, r as Je } from "./worker-D3VBXIbc.js";
3
3
  import { getViewUrl as Ve, postProcessDeprecated as ee, postProcessDescription as G, postProcessDocsTags as V, resolveJsDocLink as Xe } from "./extractor/processing/links.js";
4
4
  import E from "typescript";
5
5
  import { path as N, toPosixPathSeparators as Ye } from "@arcgis/components-build-utils";
@@ -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-Drcd6Yzh.js";
2
- import "../worker-BT6oI8gP.js";
1
+ import "../typeScript-DPVMVQZB.js";
2
+ import "../worker-D3VBXIbc.js";
3
3
  import "./processing/links.js";
4
4
  import "typescript";
5
- import { A as x } from "../ApiExtractor-mEE08X17.js";
5
+ import { A as x } from "../ApiExtractor-Cjq_q9Vb.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
  /**
@@ -1,6 +1,6 @@
1
1
  import "@arcgis/components-build-utils";
2
- import "../typeScript-Drcd6Yzh.js";
3
- import { l as n, m as A, r as C } from "../worker-BT6oI8gP.js";
2
+ import "../typeScript-DPVMVQZB.js";
3
+ import { l as n, m as A, r as C } from "../worker-D3VBXIbc.js";
4
4
  import "./processing/links.js";
5
5
  import "typescript";
6
6
  import "fs/promises";
@@ -2,7 +2,7 @@ import { findPath as v, path as C, toSystemPathSeparators as y } from "@arcgis/c
2
2
  import t from "typescript";
3
3
  import E, { supportsColorStderr as S } from "chalk";
4
4
  import { styleText as w } from "util";
5
- const P = "@arcgis/api-extractor", D = "5.1.0-next.37", N = {
5
+ const P = "@arcgis/api-extractor", D = "5.1.0-next.39", N = {
6
6
  name: P,
7
7
  version: D
8
8
  };
@@ -1,28 +1,30 @@
1
- import { l as T, m as J } from "../worker-BT6oI8gP.js";
2
- import { A as b, w as S } from "../ApiExtractor-mEE08X17.js";
3
- import { p as k, l as A } from "../typeScript-Drcd6Yzh.js";
4
- import { writeFile as C } from "node:fs/promises";
1
+ import { l as O, m as J } from "../worker-D3VBXIbc.js";
2
+ import { A as S, w as T } from "../ApiExtractor-Cjq_q9Vb.js";
3
+ import { p as A, l as C } from "../typeScript-DPVMVQZB.js";
4
+ import { writeFile as M } from "node:fs/promises";
5
5
  import { path as w } from "@arcgis/components-build-utils";
6
- const M = k.name;
7
- function V(s = {}) {
8
- let t = !1, h = !1, e, i, c, l, E = !0, v = !1, f, m, u, y, p;
9
- async function x(d, r) {
10
- if (r.dtsFiles !== void 0 && u !== "") {
6
+ const N = A.name;
7
+ function $(s = {}) {
8
+ let t = !1, v = !1, e, o, c, l, E = !0, h = !1, f, m, u, y, p;
9
+ async function x(d, n) {
10
+ if (n.dtsFiles !== void 0 && u !== "") {
11
11
  const g = w.join(w.resolve(p, u), "/");
12
- await S(g, !1, d.changedDtsFiles ?? r.dtsFiles);
12
+ await T(g, !1, d.changedDtsFiles ?? n.dtsFiles);
13
13
  }
14
- y !== "" && await C(
14
+ y !== "" && await M(
15
15
  y,
16
- d.config.context.environment === "production" ? JSON.stringify(r.apiJson) : JSON.stringify(r.apiJson, null, 2)
16
+ d.config.context.environment === "production" ? JSON.stringify(n.apiJson) : JSON.stringify(n.apiJson, null, 2)
17
17
  );
18
18
  }
19
19
  return {
20
- name: M,
20
+ name: N,
21
21
  async configResolved(d) {
22
22
  if (e = d, t = e.command === "build", !t && s.serve?.extract !== !0)
23
23
  return;
24
- h = (t ? e.build.watch : e.server.watch) !== null, p = e.configFile === void 0 ? e.root : w.dirname(e.configFile);
25
- const r = {
24
+ v = (t ? e.build.watch : e.server.watch) !== null;
25
+ const n = e.resolve.conditions.includes("storybook");
26
+ p = e.configFile === void 0 ? e.root : w.dirname(e.configFile);
27
+ const g = {
26
28
  context: {
27
29
  // Handled by Vite
28
30
  emptyDtsEmitPath: !1,
@@ -33,11 +35,11 @@ function V(s = {}) {
33
35
  // It is desirable to type-check as part of build. Thus, we can do
34
36
  // typed extraction essentially for free.
35
37
  typeCheckedExtraction: !0,
36
- fullTypeCheck: t,
37
- afterDiagnostic(o) {
38
- if (o.length > 0 && !h) {
39
- const W = new Error("TypeScript errors reported. See error messages above");
40
- throw W.stack = "", W;
38
+ fullTypeCheck: t && !n,
39
+ afterDiagnostic(i) {
40
+ if (i.length > 0 && !v) {
41
+ const b = new Error("TypeScript errors reported. See error messages above");
42
+ throw b.stack = "", b;
41
43
  }
42
44
  }
43
45
  },
@@ -49,35 +51,35 @@ function V(s = {}) {
49
51
  // if desired.
50
52
  clearScreen: !1,
51
53
  skipWritingUnchanged: d.build.emptyOutDir === !1,
52
- onUpdate(o) {
53
- f = o.then((n) => (c = n ?? c, f = void 0, clearTimeout(m), t && !v && n !== void 0 && (n.changedModules.length > 0 || n.removedModules.length > 0) && (m = setTimeout(() => {
54
- x(i, n);
55
- }, 250)), n));
54
+ onUpdate(i) {
55
+ f = i.then((a) => (c = a ?? c, f = void 0, clearTimeout(m), t && !h && a !== void 0 && (a.changedModules.length > 0 || a.removedModules.length > 0) && (m = setTimeout(() => {
56
+ x(o, a);
57
+ }, 250)), a));
56
58
  }
57
59
  }
58
- }, g = s.configFilePath === "" ? void 0 : await T(p, s.configFilePath), P = s.unsafeConfigOverride ?? {}, F = g === void 0 ? r : J(r, g), a = P === void 0 ? F : J(F, P);
59
- u = t ? a.context?.dtsEmitPath ?? e.build.outDir : "", y = t ? a.context?.apiJsonEmitPath ?? "" : "";
60
- const D = a.context?.logger ?? e.logger ?? console, B = {
61
- ...a,
60
+ }, P = s.configFilePath === "" ? void 0 : await O(p, s.configFilePath), F = s.unsafeConfigOverride ?? {}, D = P === void 0 ? g : J(g, P), r = F === void 0 ? D : J(D, F);
61
+ u = t ? r.context?.dtsEmitPath ?? e.build.outDir : "", y = t ? r.context?.apiJsonEmitPath ?? "" : "";
62
+ const W = r.context?.logger ?? e.logger ?? console, k = {
63
+ ...r,
62
64
  context: {
63
- ...a.context,
65
+ ...r.context,
64
66
  dtsEmitPath: "",
65
67
  apiJsonEmitPath: "",
66
68
  logger: {
67
- info(o) {
68
- !t || o.startsWith(`${A}Wrote `) || D.info(o);
69
+ info(i) {
70
+ !t || i.startsWith(`${C}Wrote `) || W.info(i);
69
71
  },
70
- error(o) {
71
- D.error(o);
72
+ error(i) {
73
+ W.error(i);
72
74
  }
73
75
  }
74
76
  },
75
77
  types: {
76
- ...a.types,
77
- forceProduceDts: a.types?.forceProduceDts === !0 || u !== ""
78
+ ...r.types,
79
+ forceProduceDts: r.types?.forceProduceDts === !0 || u !== ""
78
80
  }
79
81
  };
80
- i = new b(B), s.afterExtractorCreated?.(i);
82
+ o = new S(k), s.afterExtractorCreated?.(o);
81
83
  },
82
84
  /**
83
85
  * TypeScript reads files directly from the file system - Vite's
@@ -87,10 +89,10 @@ function V(s = {}) {
87
89
  * match what "npx tsc" would report.
88
90
  */
89
91
  async buildStart() {
90
- v = !0, clearTimeout(m), !(i === void 0 || !E) && (E = !1, h ? l = await i.watch() : c = await i.run());
92
+ h = !0, clearTimeout(m), !(o === void 0 || !E) && (E = !1, v ? l = await o.watch() : c = await o.run());
91
93
  },
92
94
  async writeBundle() {
93
- clearTimeout(m), f !== void 0 && await f, i !== void 0 && c !== void 0 && await x(i, c), v = !1;
95
+ clearTimeout(m), f !== void 0 && await f, o !== void 0 && c !== void 0 && await x(o, c), h = !1;
94
96
  },
95
97
  // Fires if dev server is closed programmatically. Ctrl+C is handled by Node
96
98
  async closeBundle() {
@@ -103,5 +105,5 @@ function V(s = {}) {
103
105
  };
104
106
  }
105
107
  export {
106
- V as useApiExtractor
108
+ $ as useApiExtractor
107
109
  };
@@ -1,6 +1,6 @@
1
1
  import "@arcgis/components-build-utils";
2
2
  import "typescript";
3
- import { b as t } from "../typeScript-Drcd6Yzh.js";
3
+ import { b as t } from "../typeScript-DPVMVQZB.js";
4
4
  export {
5
5
  t as loadTypeScriptConfig
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import { path as $e, existsAsync as Qt, getCwd as Pi, retrievePackageJson as lt, toPosixPathSeparators as xi } from "@arcgis/components-build-utils";
2
- import { b as Ri, p as Di, l as Li } from "./typeScript-Drcd6Yzh.js";
2
+ import { b as Ri, p as Di, l as Li } from "./typeScript-DPVMVQZB.js";
3
3
  import { getDefaultBasePath as Yt, buildViewUrl as Ii, getViewUrl as Ge } from "./extractor/processing/links.js";
4
4
  import o from "typescript";
5
5
  import "fs/promises";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/api-extractor",
3
- "version": "5.1.0-next.37",
3
+ "version": "5.1.0-next.39",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -53,8 +53,8 @@
53
53
  "chalk": "^5.4.1",
54
54
  "commander": "^14.0.0",
55
55
  "tslib": "^2.8.1",
56
- "@arcgis/components-build-utils": "5.1.0-next.37",
57
- "@arcgis/toolkit": "5.1.0-next.37"
56
+ "@arcgis/components-build-utils": "5.1.0-next.39",
57
+ "@arcgis/toolkit": "5.1.0-next.39"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "typescript": "~5.9.3",