zudoku 0.53.1 → 0.53.3

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.
Files changed (127) hide show
  1. package/README.md +2 -2
  2. package/dist/app/demo.js +2 -1
  3. package/dist/app/demo.js.map +1 -1
  4. package/dist/app/main.js +3 -9
  5. package/dist/app/main.js.map +1 -1
  6. package/dist/cli/build/handler.js +9 -1
  7. package/dist/cli/build/handler.js.map +1 -1
  8. package/dist/config/loader.js +2 -5
  9. package/dist/config/loader.js.map +1 -1
  10. package/dist/config/validators/BuildSchema.js +5 -0
  11. package/dist/config/validators/BuildSchema.js.map +1 -1
  12. package/dist/config/validators/validate.d.ts +1 -1
  13. package/dist/config/validators/validate.js +11 -2
  14. package/dist/config/validators/validate.js.map +1 -1
  15. package/dist/config/validators/validate.test.js +65 -2
  16. package/dist/config/validators/validate.test.js.map +1 -1
  17. package/dist/flat-config.d.ts +325 -0
  18. package/dist/lib/components/Banner.js +1 -1
  19. package/dist/lib/components/Banner.js.map +1 -1
  20. package/dist/lib/components/CategoryHeading.js +1 -1
  21. package/dist/lib/components/CategoryHeading.js.map +1 -1
  22. package/dist/lib/components/Header.js +1 -1
  23. package/dist/lib/components/Header.js.map +1 -1
  24. package/dist/lib/components/Pagination.js +1 -1
  25. package/dist/lib/components/Pagination.js.map +1 -1
  26. package/dist/lib/components/StatusPage.js +4 -0
  27. package/dist/lib/components/StatusPage.js.map +1 -1
  28. package/dist/lib/components/TopNavigation.d.ts +1 -1
  29. package/dist/lib/components/TopNavigation.js.map +1 -1
  30. package/dist/lib/components/navigation/NavigationWrapper.js +1 -1
  31. package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -1
  32. package/dist/lib/core/ZudokuContext.d.ts +1 -1
  33. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +4 -4
  34. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  35. package/dist/lib/plugins/markdown/MdxPage.js +1 -1
  36. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  37. package/dist/lib/plugins/search-inkeep/index.d.ts +5 -22
  38. package/dist/lib/plugins/search-inkeep/index.js +35 -29
  39. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  40. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
  41. package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
  42. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  43. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
  44. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  45. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
  46. package/dist/lib/plugins/search-pagefind/ResultList.js +12 -5
  47. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  48. package/dist/lib/ui/Alert.d.ts +1 -1
  49. package/dist/vite/build.js +7 -1
  50. package/dist/vite/build.js.map +1 -1
  51. package/dist/vite/mdx/remark-last-modified.js +1 -28
  52. package/dist/vite/mdx/remark-last-modified.js.map +1 -1
  53. package/dist/vite/plugin-mdx.js +2 -3
  54. package/dist/vite/plugin-mdx.js.map +1 -1
  55. package/lib/{Alert-CT_ViLrJ.js → Alert-FYKbqjIt.js} +2 -2
  56. package/lib/Alert-FYKbqjIt.js.map +1 -0
  57. package/lib/{MdxPage-8UuEK446.js → MdxPage-DyRuoE_F.js} +16 -16
  58. package/lib/{MdxPage-8UuEK446.js.map → MdxPage-DyRuoE_F.js.map} +1 -1
  59. package/lib/{OasProvider-BsWpguVO.js → OasProvider-CUA-DFGE.js} +2 -2
  60. package/lib/{OasProvider-BsWpguVO.js.map → OasProvider-CUA-DFGE.js.map} +1 -1
  61. package/lib/{OperationList-PnZbf3b2.js → OperationList-CRMvWoTv.js} +7 -7
  62. package/lib/{OperationList-PnZbf3b2.js.map → OperationList-CRMvWoTv.js.map} +1 -1
  63. package/lib/{Pagination-DY7gCrm4.js → Pagination-HZKe5ncg.js} +9 -8
  64. package/lib/Pagination-HZKe5ncg.js.map +1 -0
  65. package/lib/{SchemaList-D6k4DKWH.js → SchemaList-B792ORza.js} +6 -6
  66. package/lib/{SchemaList-D6k4DKWH.js.map → SchemaList-B792ORza.js.map} +1 -1
  67. package/lib/{SchemaView-BhgJ9WB8.js → SchemaView-Bo53TeMb.js} +4 -4
  68. package/lib/{SchemaView-BhgJ9WB8.js.map → SchemaView-Bo53TeMb.js.map} +1 -1
  69. package/lib/{SignUp-CpUD6DUM.js → SignUp-DfVvOCYB.js} +2 -2
  70. package/lib/{SignUp-CpUD6DUM.js.map → SignUp-DfVvOCYB.js.map} +1 -1
  71. package/lib/{Slot-DwZlQ-vX.js → Slot-BpO_AGKJ.js} +13 -5
  72. package/lib/Slot-BpO_AGKJ.js.map +1 -0
  73. package/lib/{SyntaxHighlight-CrjhGEwT.js → SyntaxHighlight-CZgjJ7-f.js} +753 -753
  74. package/lib/SyntaxHighlight-CZgjJ7-f.js.map +1 -0
  75. package/lib/{Toc-WCmwFkX-.js → Toc-DYMzDvOa.js} +2 -2
  76. package/lib/{Toc-WCmwFkX-.js.map → Toc-DYMzDvOa.js.map} +1 -1
  77. package/lib/{circular-BUMjK3JF.js → circular-CLdQ0oUd.js} +2 -2
  78. package/lib/{circular-BUMjK3JF.js.map → circular-CLdQ0oUd.js.map} +1 -1
  79. package/lib/{createServer-BPz8ZCrd.js → createServer-Co4BBP-i.js} +4 -4
  80. package/lib/{createServer-BPz8ZCrd.js.map → createServer-Co4BBP-i.js.map} +1 -1
  81. package/lib/{errors-DY-qOx9n.js → errors-DE1gK7ms.js} +3 -3
  82. package/lib/{errors-DY-qOx9n.js.map → errors-DE1gK7ms.js.map} +1 -1
  83. package/lib/{index-C_xVKbf9.js → index-DLshv89l.js} +581 -566
  84. package/lib/index-DLshv89l.js.map +1 -0
  85. package/lib/{index-CcV90rin.js → index-DLzZDv8_.js} +2 -2
  86. package/lib/{index-CcV90rin.js.map → index-DLzZDv8_.js.map} +1 -1
  87. package/lib/{index-dVBKCNMa.js → index-DYP-V0jG.js} +10 -10
  88. package/lib/{index-dVBKCNMa.js.map → index-DYP-V0jG.js.map} +1 -1
  89. package/lib/ui/Alert.js.map +1 -1
  90. package/lib/ui/SyntaxHighlight.js +1 -1
  91. package/lib/zudoku.auth-azureb2c.js +1553 -1556
  92. package/lib/zudoku.auth-azureb2c.js.map +1 -1
  93. package/lib/zudoku.auth-clerk.js +1 -1
  94. package/lib/zudoku.auth-openid.js +1 -1
  95. package/lib/zudoku.components.js +2 -2
  96. package/lib/zudoku.plugin-api-catalog.js +3 -3
  97. package/lib/zudoku.plugin-api-keys.js +61 -53
  98. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  99. package/lib/zudoku.plugin-markdown.js +1 -1
  100. package/lib/zudoku.plugin-openapi.js +1 -1
  101. package/lib/zudoku.plugin-search-inkeep.js +54 -57
  102. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  103. package/lib/zudoku.plugin-search-pagefind.js +106 -102
  104. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  105. package/package.json +11 -10
  106. package/src/app/demo.tsx +3 -1
  107. package/src/app/main.tsx +6 -14
  108. package/src/lib/components/Banner.tsx +0 -1
  109. package/src/lib/components/CategoryHeading.tsx +4 -1
  110. package/src/lib/components/Header.tsx +4 -1
  111. package/src/lib/components/Pagination.tsx +1 -0
  112. package/src/lib/components/StatusPage.tsx +5 -0
  113. package/src/lib/components/TopNavigation.tsx +1 -1
  114. package/src/lib/components/navigation/NavigationWrapper.tsx +4 -1
  115. package/src/lib/core/ZudokuContext.ts +1 -1
  116. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +13 -9
  117. package/src/lib/plugins/markdown/MdxPage.tsx +1 -1
  118. package/src/lib/plugins/search-inkeep/index.tsx +54 -58
  119. package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
  120. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +1 -0
  121. package/src/lib/plugins/search-pagefind/ResultList.tsx +13 -4
  122. package/src/lib/ui/Alert.tsx +1 -1
  123. package/lib/Alert-CT_ViLrJ.js.map +0 -1
  124. package/lib/Pagination-DY7gCrm4.js.map +0 -1
  125. package/lib/Slot-DwZlQ-vX.js.map +0 -1
  126. package/lib/SyntaxHighlight-CrjhGEwT.js.map +0 -1
  127. package/lib/index-C_xVKbf9.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import { j as l } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { LogOutIcon as g } from "lucide-react";
3
- import { S as f, a as w, b as p } from "./SignUp-CpUD6DUM.js";
3
+ import { S as f, a as w, b as p } from "./SignUp-DfVvOCYB.js";
4
4
  import { u as n } from "./hook-Bd0yS8M0.js";
5
5
  const y = ({
6
6
  clerkPubKey: d,
@@ -2,7 +2,7 @@ import { j as ne } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { g as Le } from "./invariant-DAFpPywt.js";
3
3
  import { C as Ue } from "./ClientOnly-E7hGysn1.js";
4
4
  import { j as xe, u as S } from "./hook-Bd0yS8M0.js";
5
- import { C as Ce, O as re, A as R, a as Ie } from "./errors-DY-qOx9n.js";
5
+ import { C as Ce, O as re, A as R, a as Ie } from "./errors-DE1gK7ms.js";
6
6
  var O = { exports: {} }, je = O.exports, oe;
7
7
  function De() {
8
8
  return oe || (oe = 1, function(t) {
@@ -2,8 +2,8 @@ import "./RouteGuard-CbKd7_9h.js";
2
2
  import "./index-ClhS5TxS.js";
3
3
  import "./chunk-DQRVZFIR-DHK7_Ilc.js";
4
4
  import "./hook-Bd0yS8M0.js";
5
- import "./Slot-DwZlQ-vX.js";
6
- import { e as C, f as d, j as h, B as k, m as l, C as S, i as B, H as c, c as y, L as E, M as g, g as H, R as L, d as M, S as R, h as T, T as Z, Z as f, b as A, l as b, k as j, n as v, u as w } from "./index-C_xVKbf9.js";
5
+ import "./Slot-BpO_AGKJ.js";
6
+ import { e as C, f as d, j as h, B as k, m as l, C as S, i as B, H as c, c as y, L as E, M as g, g as H, R as L, d as M, S as R, h as T, T as Z, Z as f, b as A, l as b, k as j, n as v, u as w } from "./index-DLshv89l.js";
7
7
  import "./ui/Button.js";
8
8
  import "./ui/Callout.js";
9
9
  import "./ClientOnly-E7hGysn1.js";
@@ -1,10 +1,10 @@
1
1
  import { j as t } from "./jsx-runtime-C5mzlN2N.js";
2
- import { s as f } from "./index-CcV90rin.js";
2
+ import { s as f } from "./index-DLzZDv8_.js";
3
3
  import { d as b, m as j } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
4
4
  import { u as x, c as v, j as d } from "./hook-Bd0yS8M0.js";
5
5
  import { H as y } from "./RouteGuard-CbKd7_9h.js";
6
- import { L as N } from "./index-C_xVKbf9.js";
7
- import { H as k, M as S } from "./Slot-DwZlQ-vX.js";
6
+ import { L as N } from "./index-DLshv89l.js";
7
+ import { H as k, M as S } from "./Slot-BpO_AGKJ.js";
8
8
  const w = ({
9
9
  items: n,
10
10
  filterCatalogItems: o = (r) => r,
@@ -1,17 +1,17 @@
1
1
  import { j as e } from "./jsx-runtime-C5mzlN2N.js";
2
2
  import { CircleSlashIcon as M, CheckIcon as W, XIcon as ae, PencilLineIcon as oe, RefreshCwIcon as le, EyeOffIcon as ce, EyeIcon as de, CopyIcon as ue, TrashIcon as he, KeyRoundIcon as fe } from "lucide-react";
3
- import { D as pe, a as B, R as me } from "./Slot-DwZlQ-vX.js";
4
- import { i as P } from "./invariant-DAFpPywt.js";
3
+ import { D as pe, a as B, R as me } from "./Slot-BpO_AGKJ.js";
4
+ import { i as D } from "./invariant-DAFpPywt.js";
5
5
  import { O as xe, L as J } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
6
6
  import { e as ye, d as ge, g as je, c as Ce } from "./hook-Bd0yS8M0.js";
7
7
  import { Button as j } from "./ui/Button.js";
8
- import { u as S, A as q, a as L } from "./Alert-CT_ViLrJ.js";
8
+ import { u as S, A as q, a as L } from "./Alert-FYKbqjIt.js";
9
9
  import * as F from "react";
10
- import ve, { createContext as O, useRef as E, useLayoutEffect as we, useEffect as X, useId as Q, useContext as H, useInsertionEffect as ke, useMemo as $, useCallback as be, Children as Ee, isValidElement as Ne, useState as N } from "react";
10
+ import we, { createContext as O, useRef as N, useLayoutEffect as ve, useEffect as X, useId as Q, useContext as H, useInsertionEffect as ke, useMemo as $, useCallback as be, Children as Ee, isValidElement as Ne, useState as P } from "react";
11
11
  import { C as Pe, a as De } from "./Card-DPhGbYUM.js";
12
- import { D as Y, e as G, a as V, c as Z, b as ee, d as te, f as se, g as A } from "./Dialog-CiIdyz6a.js";
12
+ import { D as Y, e as G, a as V, c as Z, b as ee, d as te, f as se, g as R } from "./Dialog-CiIdyz6a.js";
13
13
  import { Input as Ie } from "./ui/Input.js";
14
- import { c as R } from "./cn-wvCW-ho6.js";
14
+ import { c as E } from "./cn-wvCW-ho6.js";
15
15
  import { u as Ke } from "./CodeBlock-DAKxs_Tu.js";
16
16
  const Ae = () => {
17
17
  const t = ye();
@@ -25,10 +25,10 @@ const Ae = () => {
25
25
  ] }) });
26
26
  }, Re = O({});
27
27
  function ne(t) {
28
- const i = E(null);
28
+ const i = N(null);
29
29
  return i.current === null && (i.current = t()), i.current;
30
30
  }
31
- const Te = typeof window < "u", ze = Te ? we : X, ie = /* @__PURE__ */ O(null), Me = O({
31
+ const Te = typeof window < "u", ze = Te ? ve : X, ie = /* @__PURE__ */ O(null), Me = O({
32
32
  transformPagePoint: (t) => t,
33
33
  isStatic: !1,
34
34
  reducedMotion: "never"
@@ -58,7 +58,7 @@ class Le extends F.Component {
58
58
  }
59
59
  }
60
60
  function $e({ children: t, isPresent: i, anchorX: s }) {
61
- const n = Q(), o = E(null), r = E({
61
+ const n = Q(), o = N(null), r = N({
62
62
  width: 0,
63
63
  height: 0,
64
64
  top: 0,
@@ -122,7 +122,7 @@ function Qe(t = !0) {
122
122
  const f = be(() => t && n && n(r), [r, n, t]);
123
123
  return !s && n ? [!1, f] : [!0];
124
124
  }
125
- const D = (t) => t.key || "";
125
+ const I = (t) => t.key || "";
126
126
  function U(t) {
127
127
  const i = [];
128
128
  return Ee.forEach(t, (s) => {
@@ -130,27 +130,27 @@ function U(t) {
130
130
  }), i;
131
131
  }
132
132
  const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presenceAffectsLayout: o = !0, mode: r = "sync", propagate: f = !1, anchorX: x = "left" }) => {
133
- const [u, h] = Qe(f), d = $(() => U(t), [t]), l = f && !u ? [] : d.map(D), y = E(!0), p = E(d), k = ne(() => /* @__PURE__ */ new Map()), [a, c] = N(d), [m, v] = N(d);
133
+ const [u, h] = Qe(f), d = $(() => U(t), [t]), l = f && !u ? [] : d.map(I), y = N(!0), p = N(d), k = ne(() => /* @__PURE__ */ new Map()), [a, c] = P(d), [m, w] = P(d);
134
134
  ze(() => {
135
135
  y.current = !1, p.current = d;
136
- for (let w = 0; w < m.length; w++) {
137
- const g = D(m[w]);
136
+ for (let v = 0; v < m.length; v++) {
137
+ const g = I(m[v]);
138
138
  l.includes(g) ? k.delete(g) : k.get(g) !== !0 && k.set(g, !1);
139
139
  }
140
140
  }, [m, l.length, l.join("-")]);
141
141
  const C = [];
142
142
  if (d !== a) {
143
- let w = [...d];
143
+ let v = [...d];
144
144
  for (let g = 0; g < m.length; g++) {
145
- const b = m[g], z = D(b);
146
- l.includes(z) || (w.splice(g, 0, b), C.push(b));
145
+ const b = m[g], z = I(b);
146
+ l.includes(z) || (v.splice(g, 0, b), C.push(b));
147
147
  }
148
- return r === "wait" && C.length && (w = C), v(U(w)), c(d), null;
148
+ return r === "wait" && C.length && (v = C), w(U(v)), c(d), null;
149
149
  }
150
150
  process.env.NODE_ENV !== "production" && r === "wait" && m.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
151
151
  const { forceRender: T } = H(Re);
152
- return e.jsx(e.Fragment, { children: m.map((w) => {
153
- const g = D(w), b = f && !u ? !1 : d === m || l.includes(g), z = () => {
152
+ return e.jsx(e.Fragment, { children: m.map((v) => {
153
+ const g = I(v), b = f && !u ? !1 : d === m || l.includes(g), z = () => {
154
154
  if (k.has(g))
155
155
  k.set(g, !0);
156
156
  else
@@ -158,14 +158,14 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
158
158
  let _ = !0;
159
159
  k.forEach((re) => {
160
160
  re || (_ = !1);
161
- }), _ && (T?.(), v(p.current), f && h?.(), n && n());
161
+ }), _ && (T?.(), w(p.current), f && h?.(), n && n());
162
162
  };
163
- return e.jsx(Fe, { isPresent: b, initial: !y.current || s ? void 0 : !1, custom: i, presenceAffectsLayout: o, mode: r, onExitComplete: b ? void 0 : z, anchorX: x, children: w }, g);
163
+ return e.jsx(Fe, { isPresent: b, initial: !y.current || s ? void 0 : !1, custom: i, presenceAffectsLayout: o, mode: r, onExitComplete: b ? void 0 : z, anchorX: x, children: v }, g);
164
164
  }) });
165
165
  }, _e = ({ service: t }) => {
166
- const i = ge(), s = je(), [n, o] = N(
166
+ const i = ge(), s = je(), [n, o] = P(
167
167
  null
168
- ), [r, f] = N(""), { data: x, isFetching: u } = Ce({
168
+ ), [r, f] = P(""), { data: x, isFetching: u } = Ce({
169
169
  queryFn: () => t.getConsumers(i),
170
170
  queryKey: ["api-keys"],
171
171
  retry: !1
@@ -183,7 +183,7 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
183
183
  const m = s.getQueryData([
184
184
  "api-keys"
185
185
  ]);
186
- return s.setQueryData(["api-keys"], (v) => v && v.map((C) => C.id === a ? {
186
+ return s.setQueryData(["api-keys"], (w) => w && w.map((C) => C.id === a ? {
187
187
  ...C,
188
188
  apiKeys: C.apiKeys.filter((T) => T.id !== c)
189
189
  } : C)), { previousData: m };
@@ -206,7 +206,7 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
206
206
  onMutate: async ({ consumerId: a, label: c }) => {
207
207
  await s.cancelQueries({ queryKey: ["api-keys"] });
208
208
  const m = s.getQueryData(["api-keys"]);
209
- return s.setQueryData(["api-keys"], (v) => v && v.map((C) => C.id === a ? {
209
+ return s.setQueryData(["api-keys"], (w) => w && w.map((C) => C.id === a ? {
210
210
  ...C,
211
211
  label: c
212
212
  } : C)), { previousData: m };
@@ -265,9 +265,8 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
265
265
  ] }) : /* @__PURE__ */ e.jsx(
266
266
  "ul",
267
267
  {
268
- className: R(
269
- "grid grid-cols-1 divide-y divide-border col-span-6",
270
- "lg:grid-cols-[1fr_min-content]"
268
+ className: E(
269
+ "grid grid-cols-[1fr_min-content] divide-y divide-border col-span-6"
271
270
  ),
272
271
  children: x.map((a) => /* @__PURE__ */ e.jsxs(
273
272
  Pe,
@@ -334,14 +333,14 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
334
333
  {
335
334
  variant: "ghost",
336
335
  onClick: () => y(a.id, a.label),
337
- className: R(
336
+ className: E(
338
337
  "flex gap-2",
339
338
  n === a.id && "opacity-0! pointer-events-none"
340
339
  ),
341
340
  disabled: n === a.id,
342
341
  children: [
343
342
  /* @__PURE__ */ e.jsx(oe, { size: 16 }),
344
- "Edit label"
343
+ /* @__PURE__ */ e.jsx("span", { className: "hidden md:block", children: "Edit label" })
345
344
  ]
346
345
  }
347
346
  ),
@@ -361,7 +360,7 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
361
360
  className: l.isPending ? "animate-spin" : void 0
362
361
  }
363
362
  ),
364
- "Roll key"
363
+ /* @__PURE__ */ e.jsx("span", { className: "hidden md:block", children: "Roll key" })
365
364
  ]
366
365
  }
367
366
  ) }),
@@ -371,8 +370,8 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
371
370
  /* @__PURE__ */ e.jsx(te, { children: "Are you sure you want to roll this API key?" })
372
371
  ] }),
373
372
  /* @__PURE__ */ e.jsxs(se, { children: [
374
- /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(j, { variant: "outline", children: "Cancel" }) }),
375
- /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(
373
+ /* @__PURE__ */ e.jsx(R, { asChild: !0, children: /* @__PURE__ */ e.jsx(j, { variant: "outline", children: "Cancel" }) }),
374
+ /* @__PURE__ */ e.jsx(R, { asChild: !0, children: /* @__PURE__ */ e.jsx(
376
375
  j,
377
376
  {
378
377
  onClick: () => {
@@ -386,7 +385,7 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
386
385
  ] })
387
386
  ] })
388
387
  ] }),
389
- /* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(He, { children: a.apiKeys.map((c) => /* @__PURE__ */ e.jsxs(ve.Fragment, { children: [
388
+ /* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(He, { children: a.apiKeys.map((c) => /* @__PURE__ */ e.jsxs(we.Fragment, { children: [
390
389
  /* @__PURE__ */ e.jsx(
391
390
  Je,
392
391
  {
@@ -417,24 +416,33 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
417
416
  onDeleteKey: i,
418
417
  className: s
419
418
  }) => {
420
- const [n, o] = N(!1), [r, f] = Ke(), { key: x, createdOn: u, expiresOn: h } = t, d = h && new Date(h) < /* @__PURE__ */ new Date(), l = h ? Math.ceil(
419
+ const [n, o] = P(!1), [r, f] = Ke(), { key: x, createdOn: u, expiresOn: h } = t, d = h && new Date(h) < /* @__PURE__ */ new Date(), l = h ? Math.ceil(
421
420
  (new Date(h).getTime() - (/* @__PURE__ */ new Date()).getTime()) / (1e3 * 60 * 60 * 24)
422
421
  ) : 1 / 0, y = l <= 7 && !d;
423
- return /* @__PURE__ */ e.jsxs("div", { className: R("grid col-span-full grid-cols-subgrid p-6", s), children: [
422
+ return /* @__PURE__ */ e.jsxs("div", { className: E("grid col-span-full grid-cols-subgrid p-6", s), children: [
424
423
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
425
- /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center text-sm border rounded-md w-fit px-1", children: [
426
- /* @__PURE__ */ e.jsxs("div", { className: "font-mono truncate h-9 items-center flex px-2 text-xs gap-2", children: [
424
+ /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center text-sm border rounded-md w-full max-w-fit px-1", children: [
425
+ /* @__PURE__ */ e.jsxs("div", { className: "font-mono w-full h-9 items-center flex px-2 text-xs gap-2", children: [
427
426
  /* @__PURE__ */ e.jsx(
428
427
  "div",
429
428
  {
430
- className: R(
429
+ className: E(
431
430
  "rounded-full w-2 h-2 bg-emerald-400 mr-2",
432
431
  (y || d) && "bg-neutral-200"
433
432
  )
434
433
  }
435
434
  ),
436
- /* @__PURE__ */ e.jsxs("span", { children: [
437
- /* @__PURE__ */ e.jsx("span", { className: n ? "" : "opacity-20", children: n ? x.slice(0, -5) : "**** ".repeat(x.slice(0, -5).length / 5) + "*".repeat(x.slice(0, -5).length % 5) }),
435
+ /* @__PURE__ */ e.jsxs("span", { className: "w-full truncate", children: [
436
+ /* @__PURE__ */ e.jsx(
437
+ "div",
438
+ {
439
+ className: E(
440
+ "w-40 inline-block md:w-full truncate",
441
+ n ? "" : "opacity-20"
442
+ ),
443
+ children: n ? x.slice(0, -5) : "**** ".repeat(x.slice(0, -5).length / 5) + "*".repeat(x.slice(0, -5).length % 5)
444
+ }
445
+ ),
438
446
  /* @__PURE__ */ e.jsx("span", { children: x.slice(-5) })
439
447
  ] })
440
448
  ] }),
@@ -486,8 +494,8 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
486
494
  /* @__PURE__ */ e.jsx(te, { children: "Are you sure you want to delete this API key?" })
487
495
  ] }),
488
496
  /* @__PURE__ */ e.jsxs(se, { children: [
489
- /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(j, { variant: "outline", children: "Cancel" }) }),
490
- /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(
497
+ /* @__PURE__ */ e.jsx(R, { asChild: !0, children: /* @__PURE__ */ e.jsx(j, { variant: "outline", children: "Cancel" }) }),
498
+ /* @__PURE__ */ e.jsx(R, { asChild: !0, children: /* @__PURE__ */ e.jsx(
491
499
  j,
492
500
  {
493
501
  onClick: () => {
@@ -500,13 +508,13 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
500
508
  ] })
501
509
  ] }) })
502
510
  ] });
503
- }, I = "https://api.zuploedge.com/v2/client", Ue = async (t) => {
511
+ }, K = "https://api.zuploedge.com/v2/client", Ue = async (t) => {
504
512
  try {
505
513
  return await t.json();
506
514
  } catch {
507
515
  return;
508
516
  }
509
- }, K = async (t) => {
517
+ }, A = async (t) => {
510
518
  const i = t.headers.get("content-type");
511
519
  if (!t.ok && i?.includes("application/problem+json")) {
512
520
  const s = await Ue(t);
@@ -516,20 +524,20 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
516
524
  }, We = (t) => ({
517
525
  deleteKey: async (i, s, n) => {
518
526
  const o = new Request(
519
- I + `/${t}/consumers/${i}/keys/${s}`,
527
+ K + `/${t}/consumers/${i}/keys/${s}`,
520
528
  {
521
529
  method: "DELETE"
522
530
  }
523
531
  );
524
532
  await n.signRequest(o);
525
533
  const r = await fetch(o);
526
- await K(r), P(r.ok, "Failed to delete API key");
534
+ await A(r), D(r.ok, "Failed to delete API key");
527
535
  },
528
536
  updateConsumer: async (i, s) => {
529
537
  const n = await fetch(
530
538
  await s.signRequest(
531
539
  new Request(
532
- I + `/${t}/consumers/${i.id}`,
540
+ K + `/${t}/consumers/${i.id}`,
533
541
  {
534
542
  method: "PATCH",
535
543
  headers: {
@@ -542,13 +550,13 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
542
550
  )
543
551
  )
544
552
  );
545
- await K(n), P(n.ok, "Failed to update API key description");
553
+ await A(n), D(n.ok, "Failed to update API key description");
546
554
  },
547
555
  rollKey: async (i, s) => {
548
556
  const n = await fetch(
549
557
  await s.signRequest(
550
558
  new Request(
551
- I + `/${t}/consumers/${i}/roll-key`,
559
+ K + `/${t}/consumers/${i}/roll-key`,
552
560
  {
553
561
  method: "POST",
554
562
  headers: {
@@ -559,15 +567,15 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
559
567
  )
560
568
  )
561
569
  );
562
- await K(n), P(n.ok, "Failed to delete API key");
570
+ await A(n), D(n.ok, "Failed to delete API key");
563
571
  },
564
572
  getConsumers: async (i) => {
565
573
  const s = new Request(
566
- I + `/${t}/consumers`
574
+ K + `/${t}/consumers`
567
575
  );
568
576
  await i.signRequest(s);
569
577
  const n = await fetch(s);
570
- return await K(n), P(n.ok, "Failed to fetch API keys"), (await n.json()).data.map((r) => ({
578
+ return await A(n), D(n.ok, "Failed to fetch API keys"), (await n.json()).data.map((r) => ({
571
579
  id: r.id,
572
580
  label: r.label || r.subject || "API Key",
573
581
  apiKeys: r.apiKeys.data,