@scalar/api-reference-react 0.4.36 → 0.4.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @scalar/api-reference-react
2
2
 
3
+ ## 0.4.39
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [bab7990]
8
+ - Updated dependencies [2c621d4]
9
+ - Updated dependencies [46ea036]
10
+ - Updated dependencies [a31973c]
11
+ - Updated dependencies [bab7990]
12
+ - @scalar/types@0.0.39
13
+ - @scalar/api-reference@1.25.130
14
+
15
+ ## 0.4.38
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [7f1a40e]
20
+ - @scalar/types@0.0.38
21
+ - @scalar/api-reference@1.25.129
22
+
23
+ ## 0.4.37
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [89d8b75]
28
+ - Updated dependencies [479a2ef]
29
+ - Updated dependencies [b93b22f]
30
+ - Updated dependencies [89d8b75]
31
+ - Updated dependencies [8a04b8d]
32
+ - @scalar/api-reference@1.25.128
33
+ - @scalar/types@0.0.37
34
+
3
35
  ## 0.4.36
4
36
 
5
37
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import type { ReferenceProps } from '@scalar/api-reference';
1
+ import { type ReferenceProps } from '@scalar/api-reference';
2
2
  import './style.css';
3
3
  /**
4
4
  * React wrapper around the Scalar API Reference
@@ -1 +1 @@
1
- {"version":3,"file":"ApiReferenceReact.d.ts","sourceRoot":"","sources":["../src/ApiReferenceReact.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAI3D,OAAO,aAAa,CAAA;AAOpB;;GAEG;AACH,eAAO,MAAM,iBAAiB,UAAW,cAAc,4CAiCtD,CAAA"}
1
+ {"version":3,"file":"ApiReferenceReact.d.ts","sourceRoot":"","sources":["../src/ApiReferenceReact.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,cAAc,EAA0B,MAAM,uBAAuB,CAAA;AAGnF,OAAO,aAAa,CAAA;AAOpB;;GAEG;AACH,eAAO,MAAM,iBAAiB,UAAW,cAAc,4CA4BtD,CAAA"}
@@ -1,28 +1,27 @@
1
1
  "use client";
2
- import { jsx as a } from "react/jsx-runtime";
3
- import { createScalarReferences as _ } from "@scalar/api-reference";
4
- import { useRef as c, useState as l, useEffect as r } from "react";
2
+ import { jsx as _ } from "react/jsx-runtime";
3
+ import { useRef as c, useState as f, useEffect as i } from "react";
4
+ import { createScalarReferences as s } from "@scalar/api-reference";
5
+ import { apiReferenceConfigurationSchema as a } from "@scalar/types/api-reference";
5
6
  /* empty css */
6
7
  globalThis.__VUE_OPTIONS_API__ = !0;
7
8
  globalThis.__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = !0;
8
9
  globalThis.__VUE_PROD_DEVTOOLS__ = !1;
9
- const C = (e) => {
10
- const n = c(null), [t, u] = l(null);
11
- return r(() => {
12
- if (!n.current) return t == null ? void 0 : t.unmount;
13
- const o = { ...{
14
- _integration: "react"
15
- }, ...e.configuration }, i = _(n.current, o);
16
- return u(i), i.unmount;
17
- }, [n]), r(() => {
18
- const o = { ...{ _integration: "react" }, ...e.configuration };
19
- t == null || t.updateConfig(
20
- o,
10
+ const p = (n) => {
11
+ const t = c(null), [e, u] = f(null);
12
+ return i(() => {
13
+ if (!t.current) return e == null ? void 0 : e.unmount;
14
+ const r = a.parse({ _integration: "react", ...n.configuration }), o = s(t.current, r);
15
+ return u(o), o.unmount;
16
+ }, [t]), i(() => {
17
+ const r = a.parse({ _integration: "react", ...n.configuration });
18
+ e == null || e.updateConfig(
19
+ r,
21
20
  /** For React we will just replace the config if it changes */
22
21
  !1
23
22
  );
24
- }, [e.configuration]), /* @__PURE__ */ a("div", { ref: n });
23
+ }, [n.configuration]), /* @__PURE__ */ _("div", { ref: t });
25
24
  };
26
25
  export {
27
- C as ApiReferenceReact
26
+ p as ApiReferenceReact
28
27
  };