@dracor/react 1.0.0-rc.6 → 1.0.0

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/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import f1, { useState as j, useEffect as P, Fragment as n1, useRef as g1 } from "react";
2
- import _1 from "swagger-ui-react";
1
+ import f1, { useState as j, useEffect as P, Fragment as n1, useRef as _1 } from "react";
2
+ import g1 from "swagger-ui-react";
3
3
  import { faGithub as c1 } from "@fortawesome/free-brands-svg-icons";
4
4
  import { FontAwesomeIcon as b } from "@fortawesome/react-fontawesome";
5
5
  import p1 from "react-markdown";
@@ -136,7 +136,7 @@ function P1() {
136
136
  configurable: !0
137
137
  });
138
138
  }
139
- function g() {
139
+ function _() {
140
140
  var a = s(this.type);
141
141
  return X[a] || (X[a] = !0, console.error(
142
142
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
@@ -152,7 +152,7 @@ function P1() {
152
152
  _owner: u
153
153
  }, (f !== void 0 ? f : null) !== null ? Object.defineProperty(a, "ref", {
154
154
  enumerable: !1,
155
- get: g
155
+ get: _
156
156
  }) : Object.defineProperty(a, "ref", { enumerable: !1, value: null }), a._store = {}, Object.defineProperty(a._store, "validated", {
157
157
  configurable: !1,
158
158
  enumerable: !1,
@@ -229,16 +229,16 @@ React keys must be passed directly to JSX without using spread:
229
229
  function p(a) {
230
230
  return typeof a == "object" && a !== null && a.$$typeof === w;
231
231
  }
232
- var _ = f1, w = /* @__PURE__ */ Symbol.for("react.transitional.element"), I = /* @__PURE__ */ Symbol.for("react.portal"), Z = /* @__PURE__ */ Symbol.for("react.fragment"), F = /* @__PURE__ */ Symbol.for("react.strict_mode"), E = /* @__PURE__ */ Symbol.for("react.profiler"), U = /* @__PURE__ */ Symbol.for("react.consumer"), D = /* @__PURE__ */ Symbol.for("react.context"), B = /* @__PURE__ */ Symbol.for("react.forward_ref"), C = /* @__PURE__ */ Symbol.for("react.suspense"), H = /* @__PURE__ */ Symbol.for("react.suspense_list"), $ = /* @__PURE__ */ Symbol.for("react.memo"), M = /* @__PURE__ */ Symbol.for("react.lazy"), z = /* @__PURE__ */ Symbol.for("react.activity"), T = /* @__PURE__ */ Symbol.for("react.client.reference"), N = _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, y = Object.prototype.hasOwnProperty, x1 = Array.isArray, W = console.createTask ? console.createTask : function() {
232
+ var g = f1, w = /* @__PURE__ */ Symbol.for("react.transitional.element"), I = /* @__PURE__ */ Symbol.for("react.portal"), Z = /* @__PURE__ */ Symbol.for("react.fragment"), F = /* @__PURE__ */ Symbol.for("react.strict_mode"), E = /* @__PURE__ */ Symbol.for("react.profiler"), U = /* @__PURE__ */ Symbol.for("react.consumer"), D = /* @__PURE__ */ Symbol.for("react.context"), B = /* @__PURE__ */ Symbol.for("react.forward_ref"), C = /* @__PURE__ */ Symbol.for("react.suspense"), H = /* @__PURE__ */ Symbol.for("react.suspense_list"), $ = /* @__PURE__ */ Symbol.for("react.memo"), M = /* @__PURE__ */ Symbol.for("react.lazy"), z = /* @__PURE__ */ Symbol.for("react.activity"), T = /* @__PURE__ */ Symbol.for("react.client.reference"), N = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, y = Object.prototype.hasOwnProperty, x1 = Array.isArray, W = console.createTask ? console.createTask : function() {
233
233
  return null;
234
234
  };
235
- _ = {
235
+ g = {
236
236
  react_stack_bottom_frame: function(a) {
237
237
  return a();
238
238
  }
239
239
  };
240
- var J, X = {}, Q = _.react_stack_bottom_frame.bind(
241
- _,
240
+ var J, X = {}, Q = g.react_stack_bottom_frame.bind(
241
+ g,
242
242
  n
243
243
  )(), K = W(t(n)), e1 = {};
244
244
  R.Fragment = Z, R.jsx = function(a, i, x) {
@@ -272,7 +272,7 @@ var e = H1();
272
272
  function x0({ url: s, title: l }) {
273
273
  return /* @__PURE__ */ e.jsxs("div", { children: [
274
274
  l !== void 0 && /* @__PURE__ */ e.jsx("title", { children: l }),
275
- /* @__PURE__ */ e.jsx(_1, { url: s, deepLinking: !0 })
275
+ /* @__PURE__ */ e.jsx(g1, { url: s, deepLinking: !0 })
276
276
  ] });
277
277
  }
278
278
  const $1 = [
@@ -312,13 +312,13 @@ function m1({ showLabel: s, children: l, className: r }) {
312
312
  const p = new RegExp(
313
313
  `^(?:${o || d}/|${m}:)([a-z\\d]+)$`,
314
314
  "i"
315
- ), _ = l.match(p);
316
- return _ ? (c = _[1], !0) : !1;
315
+ ), g = l.match(p);
316
+ return g ? (c = g[1], !0) : !1;
317
317
  });
318
318
  if (!n)
319
319
  return /* @__PURE__ */ e.jsx("span", { className: t, children: l });
320
- const { url: h, label: v, classes: g = "" } = n;
321
- return t += ` ${g}`, /* @__PURE__ */ e.jsxs("span", { className: t, children: [
320
+ const { url: h, label: v, classes: _ = "" } = n;
321
+ return t += ` ${_}`, /* @__PURE__ */ e.jsxs("span", { className: t, children: [
322
322
  s && `${v}: `,
323
323
  /* @__PURE__ */ e.jsx("a", { className: r, href: `${h}/${c}`, title: v, children: c })
324
324
  ] });
@@ -370,7 +370,7 @@ function u0({
370
370
  function p(w) {
371
371
  return w.startsWith("http://www.wikidata.org/.well-known/genid") ? c : V(w.replace(/^(-?\d{4}).*$/, "$1"));
372
372
  }
373
- async function _(w) {
373
+ async function g(w) {
374
374
  const I = `
375
375
  SELECT ?author ?authorLabel ?birthDate ?deathDate ?gender ?genderLabel
376
376
  ?birthPlace ?birthPlaceLabel ?birthCoord
@@ -415,9 +415,9 @@ WHERE {
415
415
  console.log(E);
416
416
  }
417
417
  }
418
- s && _(s);
418
+ s && g(s);
419
419
  }, [s, c]);
420
- const { name: v, imageUrl: g, commonsPage: o, birth: d = [], death: m = [] } = n || {};
420
+ const { name: v, imageUrl: _, commonsPage: o, birth: d = [], death: m = [] } = n || {};
421
421
  return /* @__PURE__ */ e.jsxs("div", { className: "flex whitespace-nowrap", children: [
422
422
  /* @__PURE__ */ e.jsxs(
423
423
  "div",
@@ -425,10 +425,10 @@ WHERE {
425
425
  className: "relative w-[5em] h-[6em] overflow-hidden bg-(image:--img-author) bg-no-repeat bg-center bg-primary rounded-md border-2 border-primary mr-4",
426
426
  style: { backgroundSize: "70%" },
427
427
  children: [
428
- g && /* @__PURE__ */ e.jsx(
428
+ _ && /* @__PURE__ */ e.jsx(
429
429
  "img",
430
430
  {
431
- src: g,
431
+ src: _,
432
432
  title: v,
433
433
  alt: "",
434
434
  className: "object-cover object-top w-full h-full"
@@ -483,7 +483,7 @@ const f0 = ({ data: s }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: s.map(
483
483
  /* @__PURE__ */ e.jsx("small", { children: /* @__PURE__ */ e.jsx(m1, { children: l.ref }) })
484
484
  ] })
485
485
  ] }, `${r}-${l.name}`)) });
486
- function g0({ repo: s, children: l }) {
486
+ function _0({ repo: s, children: l }) {
487
487
  const r = l.trim(), t = r.substring(0, 7), c = `${s}/commit/${r}`;
488
488
  return s ? /* @__PURE__ */ e.jsxs(
489
489
  "a",
@@ -522,12 +522,12 @@ function L1({
522
522
  }
523
523
  );
524
524
  }
525
- function _0({ url: s, match: l }) {
525
+ function g0({ url: s, match: l }) {
526
526
  const [r, t] = j(""), [c, n] = j("");
527
527
  return P(() => {
528
- async function h(g) {
528
+ async function h(_) {
529
529
  try {
530
- const o = await fetch(g, { method: "GET" });
530
+ const o = await fetch(_, { method: "GET" });
531
531
  if (o.status == 404) {
532
532
  t("Not Found"), n("Not Found");
533
533
  return;
@@ -535,14 +535,14 @@ function _0({ url: s, match: l }) {
535
535
  if (o.status !== 200)
536
536
  throw console.log(o.status), new Error(`Request failed with status ${o.status}`);
537
537
  const d = o.headers.get("content-type");
538
- if (console.log({ contentType: d }), !d || !d.includes("text/markdown")) {
538
+ if (!d || !d.includes("text/markdown")) {
539
539
  t("Oops, we haven't got Markdown!"), n("No Markdown");
540
540
  return;
541
541
  }
542
542
  const m = await o.text();
543
543
  t(m);
544
- const _ = m.replace(/^\s+/, "").split(/(\n|\r|\r\n){2,}/)[0].match(/^#\s*(.+)/);
545
- n(_ ? _[1] : "...");
544
+ const g = m.replace(/^\s+/, "").split(/(\n|\r|\r\n){2,}/)[0].match(/^#\s*(.+)/);
545
+ n(g ? g[1] : "...");
546
546
  } catch (o) {
547
547
  o instanceof Error && o.message === "Request failed with status code 404" ? (t("Not Found"), n("Not Found")) : (t("Something went wrong."), n("Error"), console.error(o));
548
548
  }
@@ -1336,7 +1336,7 @@ function a0({ label: s, items: l, menuClass: r }) {
1336
1336
  leave: "transition ease-in duration-75",
1337
1337
  leaveFrom: "transform opacity-100 scale-100",
1338
1338
  leaveTo: "transform opacity-0 scale-95",
1339
- children: /* @__PURE__ */ e.jsx(d1, { className: "absolute left-0 mt-2 min-w-fit whitespace-nowrap origin-top-right divide-y divide-gray-100 rounded-sm bg-white shadow-lg focus:outline-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "px-1 py-1", children: l.map(({ to: h, href: v, params: g, label: o }) => /* @__PURE__ */ e.jsx(v1, { children: v?.startsWith("http") || v?.startsWith("mailto:") ? /* @__PURE__ */ e.jsx(
1339
+ children: /* @__PURE__ */ e.jsx(d1, { className: "absolute left-0 mt-2 min-w-fit whitespace-nowrap origin-top-right divide-y divide-gray-100 rounded-sm bg-white shadow-lg focus:outline-hidden", children: /* @__PURE__ */ e.jsx("div", { className: "px-1 py-1", children: l.map(({ to: h, href: v, params: _, label: o }) => /* @__PURE__ */ e.jsx(v1, { children: v?.startsWith("http") || v?.startsWith("mailto:") ? /* @__PURE__ */ e.jsx(
1340
1340
  "a",
1341
1341
  {
1342
1342
  href: v,
@@ -1349,7 +1349,7 @@ function a0({ label: s, items: l, menuClass: r }) {
1349
1349
  q,
1350
1350
  {
1351
1351
  to: h,
1352
- params: g,
1352
+ params: _,
1353
1353
  className: l1 + " [&.active]:bg-blue-300 [&.active]:text-white [&.active]:font-medium [&.active]:hover:bg-blue-100 [&.active]:hover:text-gray-900",
1354
1354
  children: o
1355
1355
  }
@@ -1367,7 +1367,7 @@ function w0({
1367
1367
  gitHubIcon: n,
1368
1368
  gitHubTitle: h,
1369
1369
  addItem: v,
1370
- navItems: g
1370
+ navItems: _
1371
1371
  }) {
1372
1372
  const [o, d] = j(!1);
1373
1373
  return /* @__PURE__ */ e.jsxs("nav", { className: "flex items-center justify-between flex-wrap p-4 bg-primary text-white font-medium", children: [
@@ -1404,7 +1404,7 @@ function w0({
1404
1404
  {
1405
1405
  className: `block md:flex grow md:items-center w-full md:w-auto ${o ? "" : "hidden"}`,
1406
1406
  children: [
1407
- g?.length && /* @__PURE__ */ e.jsx("div", { className: "my-2 md:grow md:flex-row flex justify-center flex-col gap-4", children: g.map(
1407
+ _?.length && /* @__PURE__ */ e.jsx("div", { className: "my-2 md:grow md:flex-row flex justify-center flex-col gap-4", children: _.map(
1408
1408
  (m) => "items" in m ? /* @__PURE__ */ e.jsx(
1409
1409
  a0,
1410
1410
  {
@@ -1430,7 +1430,7 @@ function w0({
1430
1430
  ] });
1431
1431
  }
1432
1432
  function E0({ columns: s, data: l, defaultSort: r = [] }) {
1433
- const [t, c] = j(r), [n, h] = j(""), [v] = j(l), g = Z1({
1433
+ const [t, c] = j(r), [n, h] = j(""), [v] = j(l), _ = Z1({
1434
1434
  data: v,
1435
1435
  columns: s,
1436
1436
  state: {
@@ -1456,12 +1456,12 @@ function E0({ columns: s, data: l, defaultSort: r = [] }) {
1456
1456
  ),
1457
1457
  n !== "" && /* @__PURE__ */ e.jsxs("span", { className: "ml-2", children: [
1458
1458
  "(",
1459
- g.getRowModel().rows.length,
1459
+ _.getRowModel().rows.length,
1460
1460
  ")"
1461
1461
  ] })
1462
1462
  ] }),
1463
1463
  /* @__PURE__ */ e.jsx("div", { className: "flex", children: /* @__PURE__ */ e.jsxs("table", { children: [
1464
- /* @__PURE__ */ e.jsx("thead", { children: g.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx("tr", { children: o.headers.map((d) => /* @__PURE__ */ e.jsx("th", { colSpan: d.colSpan, children: d.isPlaceholder ? null : /* @__PURE__ */ e.jsxs(
1464
+ /* @__PURE__ */ e.jsx("thead", { children: _.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx("tr", { children: o.headers.map((d) => /* @__PURE__ */ e.jsx("th", { colSpan: d.colSpan, children: d.isPlaceholder ? null : /* @__PURE__ */ e.jsxs(
1465
1465
  "div",
1466
1466
  {
1467
1467
  className: d.column.getCanSort() ? "cursor-pointer select-none" : "",
@@ -1476,7 +1476,7 @@ function E0({ columns: s, data: l, defaultSort: r = [] }) {
1476
1476
  ]
1477
1477
  }
1478
1478
  ) }, d.id)) }, o.id)) }),
1479
- /* @__PURE__ */ e.jsx("tbody", { children: g.getRowModel().rows.map((o, d) => /* @__PURE__ */ e.jsx("tr", { className: d % 2 ? "" : "bg-neutral-200", children: o.getVisibleCells().map((m) => /* @__PURE__ */ e.jsx("td", { children: a1(m.column.columnDef.cell, m.getContext()) }, m.id)) }, o.id)) })
1479
+ /* @__PURE__ */ e.jsx("tbody", { children: _.getRowModel().rows.map((o, d) => /* @__PURE__ */ e.jsx("tr", { className: d % 2 ? "" : "bg-neutral-200", children: o.getVisibleCells().map((m) => /* @__PURE__ */ e.jsx("td", { children: a1(m.column.columnDef.cell, m.getContext()) }, m.id)) }, o.id)) })
1480
1480
  ] }) })
1481
1481
  ] });
1482
1482
  }
@@ -1491,7 +1491,7 @@ function N0({ data: s }) {
1491
1491
  return /* @__PURE__ */ e.jsx("div", { className: "text-sm font-medium text-center text-gray-500 border-b border-gray-200 dark:text-gray-400 dark:border-gray-700", children: /* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap -mb-px gap-3", children: s.map(({ label: r, to: t }) => /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(q, { to: t, className: l, children: r }) }, r)) }) });
1492
1492
  }
1493
1493
  function M0({ url: s }) {
1494
- const l = g1(null);
1494
+ const l = _1(null);
1495
1495
  return P(() => {
1496
1496
  const r = new R1();
1497
1497
  for (; l.current?.firstChild; )
@@ -1538,9 +1538,9 @@ export {
1538
1538
  x0 as ApiDoc,
1539
1539
  u0 as AuthorInfo,
1540
1540
  f0 as Authors,
1541
- g0 as Commit,
1541
+ _0 as Commit,
1542
1542
  L1 as DebouncedInput,
1543
- _0 as DocPage,
1543
+ g0 as DocPage,
1544
1544
  p0 as DownloadButton,
1545
1545
  j0 as IdCopy,
1546
1546
  m1 as IdLink,