@declarion/react 0.109.0 → 0.111.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.
@@ -10,10 +10,11 @@ async function r(t) {
10
10
  status: "active"
11
11
  };
12
12
  }
13
- async function i(t, n, r, i) {
13
+ async function i(t, n, r, i, a) {
14
14
  return {
15
15
  id: (await e("agents.send_message", {
16
16
  conversation_id: n,
17
+ idempotency_key: a,
17
18
  ...t ? { text: t } : {},
18
19
  ...i?.length ? { attachments: i } : {},
19
20
  ...r ? { context: r } : {}
@@ -0,0 +1,12 @@
1
+ //#region src/api/audience.ts
2
+ function e(e) {
3
+ if (!e.isLoading) return !e.isAuthenticated || !e.user ? null : {
4
+ user_id: e.user.id,
5
+ tenant_id: e.activeTenant?.id ?? ""
6
+ };
7
+ }
8
+ function t(e, t) {
9
+ return e === t || e !== null && t !== null && e.user_id === t.user_id && e.tenant_id === t.tenant_id;
10
+ }
11
+ //#endregion
12
+ export { t as sameAudience, e as sessionCaller };
@@ -43,7 +43,7 @@ async function u(n) {
43
43
  return t(r.expires_at), r;
44
44
  }
45
45
  async function d() {
46
- await e("auth.logout");
46
+ await e("auth.logout", {}, { keepalive: !0 });
47
47
  }
48
48
  async function f(t) {
49
49
  return (await e("auth.list_identity_providers", t ? { tenant_code: t } : {})).providers;
@@ -4,9 +4,10 @@ import { awaitEmbedToken as a, clearEmbedToken as o, getEmbedToken as s, isEmbed
4
4
  import { observe as l } from "../lib/versionTracker.js";
5
5
  import { REFRESH_TIMEOUT_MS as u, requestTimeoutMs as d } from "./request-bounds.js";
6
6
  import { clearAccessExpiry as f, recordAccessExpiry as p } from "./access-expiry.js";
7
+ import { sameAudience as m } from "./audience.js";
7
8
  //#region src/api/client.ts
8
- var m = (e) => JSON.stringify(e ?? {}), h = null, g = "declarion.auth.refresh.result", _ = "declarion.auth.refresh";
9
- function v(e = () => window.localStorage.getItem(g)) {
9
+ var h = (e) => JSON.stringify(e ?? {}), g = null, _ = "declarion.auth.refresh.result", v = "declarion.auth.refresh";
10
+ function y(e = () => window.localStorage.getItem(_)) {
10
11
  try {
11
12
  let t = JSON.parse(e() ?? "null");
12
13
  return typeof t?.ok == "boolean" && typeof t.updated_at == "number" ? t : null;
@@ -14,9 +15,9 @@ function v(e = () => window.localStorage.getItem(g)) {
14
15
  return null;
15
16
  }
16
17
  }
17
- function y(e) {
18
+ function b(e) {
18
19
  try {
19
- window.localStorage.setItem(g, JSON.stringify({
20
+ window.localStorage.setItem(_, JSON.stringify({
20
21
  updated_at: Date.now(),
21
22
  ...e
22
23
  }));
@@ -24,57 +25,57 @@ function y(e) {
24
25
  return;
25
26
  }
26
27
  }
27
- function b(e) {
28
- return e.ok ? (e.access_expires_at && T(e.access_expires_at), null) : new S(e.status ?? 401);
28
+ function x(e) {
29
+ return e.ok ? (e.access_expires_at && E(e.access_expires_at), null) : new C(e.status ?? 401);
29
30
  }
30
- async function x() {
31
+ async function S() {
31
32
  let e = navigator.locks;
32
33
  if (!e) {
33
- await A();
34
+ await j();
34
35
  return;
35
36
  }
36
37
  let t = Date.now();
37
- await e.request(_, { mode: "exclusive" }, async () => {
38
- let e = v();
38
+ await e.request(v, { mode: "exclusive" }, async () => {
39
+ let e = y();
39
40
  if (e && e.updated_at >= t) {
40
- let t = b(e);
41
+ let t = x(e);
41
42
  if (t) throw t;
42
43
  } else try {
43
- y({
44
+ b({
44
45
  ok: !0,
45
- access_expires_at: await A()
46
+ access_expires_at: await j()
46
47
  });
47
48
  } catch (e) {
48
- throw e instanceof S && y({
49
+ throw e instanceof C && b({
49
50
  ok: !1,
50
51
  status: e.status
51
52
  }), e;
52
53
  }
53
54
  });
54
55
  }
55
- var S = class extends Error {
56
+ var C = class extends Error {
56
57
  status;
57
58
  constructor(e) {
58
59
  super(`refresh failed terminally (${e})`), this.status = e, this.name = "RefreshDeadError";
59
60
  }
60
- }, C = null;
61
- function w() {
62
- return C ??= import("./session-renewal.js").catch((e) => {
63
- throw C = null, e;
64
- }), C;
61
+ }, w = null;
62
+ function T() {
63
+ return w ??= import("./session-renewal.js").catch((e) => {
64
+ throw w = null, e;
65
+ }), w;
65
66
  }
66
- function T(e) {
67
- return j = null, c() || p(e), typeof window > "u" ? Promise.resolve() : w().then((t) => t.scheduleRenewal(e), () => void 0);
67
+ function E(e) {
68
+ return M = null, c() || p(e), typeof window > "u" ? Promise.resolve() : T().then((t) => t.scheduleRenewal(e), () => void 0);
68
69
  }
69
- function E() {
70
- f(), C?.then((e) => e.cancelRenewal());
70
+ function D() {
71
+ f(), w?.then((e) => e.cancelRenewal());
71
72
  }
72
73
  typeof window < "u" && window.addEventListener("storage", (e) => {
73
- if (e.key !== g || c()) return;
74
- let t = v(() => e.newValue);
75
- t?.ok && t.access_expires_at && T(t.access_expires_at);
74
+ if (e.key !== _ || c()) return;
75
+ let t = y(() => e.newValue);
76
+ t?.ok && t.access_expires_at && E(t.access_expires_at);
76
77
  });
77
- async function D(e, n, r) {
78
+ async function O(e, n, r) {
78
79
  let i = new AbortController(), a = setTimeout(() => i.abort(), r);
79
80
  try {
80
81
  return await fetch(e, {
@@ -87,107 +88,114 @@ async function D(e, n, r) {
87
88
  clearTimeout(a);
88
89
  }
89
90
  }
90
- async function O(e) {
91
+ async function k(e) {
91
92
  try {
92
93
  return (await e.json())?.result?.expires_at;
93
94
  } catch {
94
95
  return;
95
96
  }
96
97
  }
97
- function k() {
98
- return D("/api/actions/auth.refresh", {
98
+ function A() {
99
+ return O("/api/actions/auth.refresh", {
99
100
  method: "POST",
100
101
  credentials: "include",
101
102
  headers: { "Content-Type": "application/json" },
102
- body: m({})
103
+ body: h({})
103
104
  }, u);
104
105
  }
105
- async function A() {
106
- let t = await k();
106
+ async function j() {
107
+ let t = await A();
107
108
  if (t.status === 429) {
108
109
  let e = parseInt(t.headers.get("Retry-After") || "1", 10);
109
- await r(t), await new Promise((t) => setTimeout(t, e * 1e3)), t = await k();
110
+ await r(t), await new Promise((t) => setTimeout(t, e * 1e3)), t = await A();
110
111
  }
111
112
  if (t.status >= 500) {
112
113
  let n = await r(t);
113
114
  throw new e(t.status, n.body, n.raw);
114
115
  }
115
- if (!t.ok) throw await r(t), new S(t.status);
116
- let n = await O(t);
117
- return T(n), n;
116
+ if (!t.ok) throw await r(t), new C(t.status);
117
+ let n = await k(t);
118
+ return E(n), n;
118
119
  }
119
- var j = null, M = /* @__PURE__ */ new Set(["auth.token_refresh_needed", "auth.unauthorized"]);
120
- function N(n) {
120
+ var M = null, N = /* @__PURE__ */ new Set(["auth.token_refresh_needed", "auth.unauthorized"]);
121
+ function P(n) {
121
122
  return n instanceof t || n instanceof e;
122
123
  }
123
- async function P() {
124
- if (j !== null) throw new S(j);
125
- return h || (h = x().catch((e) => {
126
- throw e instanceof S && (j = e.status), e;
124
+ async function F() {
125
+ if (M !== null) throw new C(M);
126
+ return g || (g = S().catch((e) => {
127
+ throw e instanceof C && (M = e.status), e;
127
128
  }).finally(() => {
128
- h = null;
129
- }), h);
129
+ g = null;
130
+ }), g);
130
131
  }
131
- var F = () => {
132
+ var I = () => {
132
133
  if (typeof window > "u") return;
133
134
  let { pathname: e } = window.location;
134
135
  e.startsWith("/login") || e.startsWith("/signup") || e === "/reset" || e === "/forgot" || e === "/2fa" || (window.location.href = i());
135
136
  };
136
- function I(e) {
137
- let t = F;
138
- return F = e, t;
137
+ function L(e) {
138
+ let t = I;
139
+ return I = e, t;
139
140
  }
140
- function L() {
141
- return F;
141
+ function R() {
142
+ return I;
142
143
  }
143
- var R = ({ status: e, code: t, message: n }) => {
144
+ var z = ({ status: e, code: t, message: n }) => {
144
145
  console.error(`[API ${e}] ${t}: ${n}`);
145
146
  };
146
- function z(e, t, n, r) {
147
+ function B(e, t, n, r) {
147
148
  let i = new Headers(e);
148
149
  return !i.has("Content-Type") && t && i.set("Content-Type", "application/json"), n.setAccept && !i.has("Accept") && i.set("Accept", "*/*"), r && i.set("Authorization", `Bearer ${r}`), i;
149
150
  }
150
- var B = null, V = 0;
151
- function H(e) {
152
- e || V++, B = e || null;
153
- }
154
- function U() {
155
- return V;
151
+ var V = null, H;
152
+ function U(e) {
153
+ H = e, V && e !== void 0 && !m(V.reader, e) && (V = null);
156
154
  }
157
155
  function W(e, t) {
158
- e === V && (B = t || null);
159
- }
160
- function G() {
161
- return B;
162
- }
163
- function K(e) {
164
- return !B || !e.startsWith("/api/") || /[?&]language=/.test(e) ? e : `${e}${e.includes("?") ? "&" : "?"}language=${encodeURIComponent(B)}`;
165
- }
166
- async function q(t, i, u, f) {
167
- let p = K(t), m = c(), h = m ? "omit" : "include", g = z(i.headers, !!i.body, u, m ? s() : null), _ = d(t, i), v = await D(p, {
156
+ (H === void 0 || m(e, H)) && (V = t ? {
157
+ language: t,
158
+ reader: e
159
+ } : null);
160
+ }
161
+ function G(e) {
162
+ V = e ? {
163
+ language: e,
164
+ reader: H ?? null
165
+ } : null;
166
+ }
167
+ function K() {
168
+ return V?.language ?? null;
169
+ }
170
+ function q(e) {
171
+ let t = K();
172
+ return !t || !e.startsWith("/api/") || /[?&]language=/.test(e) ? e : `${e}${e.includes("?") ? "&" : "?"}language=${encodeURIComponent(t)}`;
173
+ }
174
+ async function J(t, i, u, f) {
175
+ let p = q(t), m = c(), h = m ? "omit" : "include", g = B(i.headers, !!i.body, u, m ? s() : null), _ = d(t, i), v = await O(p, {
168
176
  ...i,
169
177
  headers: g,
170
178
  credentials: h
171
179
  }, _);
172
180
  if (l(v.headers), !v.ok) {
173
181
  let { raw: t, body: s } = await r(v), c = n(s.type), l = s.title ?? "";
174
- if (v.status === 401 && M.has(c)) try {
182
+ if (v.status === 401 && N.has(c)) try {
175
183
  let t = null;
176
- m ? (o(), t = await a()) : await P();
177
- let s = z(i.headers, !!i.body, u, t), c = await D(p, {
184
+ m ? (o(), t = await a()) : await F();
185
+ let s = B(i.headers, !!i.body, u, t), c = await O(p, {
178
186
  ...i,
179
187
  headers: s,
180
188
  credentials: h
181
189
  }, _);
182
190
  if (!c.ok) {
183
191
  let t = await r(c);
184
- throw !m && c.status === 401 && M.has(n(t.body.type)) && (j = 401), c.status === 401 && !u.isSessionProbe && F(), new e(c.status, t.body, t.raw);
192
+ throw !m && c.status === 401 && N.has(n(t.body.type)) && (M = 401), c.status === 401 && !u.isSessionProbe && I(), new e(c.status, t.body, t.raw);
185
193
  }
186
194
  return f(c);
187
195
  } catch (n) {
188
- throw N(n) ? n : (u.isSessionProbe || F(), new e(401, s, t));
196
+ throw P(n) ? n : (u.isSessionProbe || I(), new e(401, s, t));
189
197
  }
190
- throw v.status === 401 && !u.isSessionProbe && F(), R({
198
+ throw v.status === 401 && !u.isSessionProbe && I(), z({
191
199
  status: v.status,
192
200
  code: c,
193
201
  message: l
@@ -195,29 +203,29 @@ async function q(t, i, u, f) {
195
203
  }
196
204
  return f(v);
197
205
  }
198
- function J(e) {
206
+ function Y(e) {
199
207
  return e.status === 204 ? Promise.resolve(void 0) : e.json();
200
208
  }
201
- async function Y(e, t = {}, { isSessionProbe: n = !1 } = {}) {
202
- return q(e, t, {
209
+ async function X(e, t = {}, { isSessionProbe: n = !1 } = {}) {
210
+ return J(e, t, {
203
211
  setAccept: !1,
204
212
  isSessionProbe: n
205
- }, J);
213
+ }, Y);
206
214
  }
207
- async function X(e) {
215
+ async function Z(e) {
208
216
  return {
209
217
  blob: await e.blob(),
210
- filename: Q(e.headers),
218
+ filename: $(e.headers),
211
219
  headers: e.headers
212
220
  };
213
221
  }
214
- async function Z(e, t = {}) {
215
- return q(e, t, {
222
+ async function Q(e, t = {}) {
223
+ return J(e, t, {
216
224
  setAccept: !0,
217
225
  isSessionProbe: !1
218
- }, X);
226
+ }, Z);
219
227
  }
220
- function Q(e) {
228
+ function $(e) {
221
229
  let t = e.get("Content-Disposition");
222
230
  if (!t) return "";
223
231
  let n = t.match(/filename\*\s*=\s*([^']*)'([^']*)'([^;]+)/i);
@@ -227,14 +235,15 @@ function Q(e) {
227
235
  let r = t.match(/filename\s*=\s*("([^"]+)"|([^;]+))/i);
228
236
  return r ? (r[2] ?? r[3] ?? "").trim() : "";
229
237
  }
230
- async function $(e, t = {}, { isSessionProbe: n = !1 } = {}) {
231
- return (await q(`/api/actions/${encodeURIComponent(e)}`, {
238
+ async function ee(e, t = {}, { isSessionProbe: n = !1, keepalive: r = !1 } = {}) {
239
+ return (await J(`/api/actions/${encodeURIComponent(e)}`, {
232
240
  method: "POST",
233
- body: m(t)
241
+ body: h(t),
242
+ keepalive: r
234
243
  }, {
235
244
  setAccept: !1,
236
245
  isSessionProbe: n
237
- }, J)).result;
246
+ }, Y)).result;
238
247
  }
239
248
  //#endregion
240
- export { S as RefreshDeadError, Y as apiFetch, Z as apiFetchBlob, $ as callHandler, E as cancelProactiveRefresh, G as currentPublishedLanguage, U as currentReader, P as ensureRefresh, L as getPersistentAuthFailureHandler, N as isTransientFailure, Q as parseContentDispositionFilename, H as publishLanguage, W as publishLanguageFor, T as scheduleProactiveRefresh, I as setPersistentAuthFailureHandler, K as withPublishedLanguage };
249
+ export { C as RefreshDeadError, X as apiFetch, Q as apiFetchBlob, ee as callHandler, D as cancelProactiveRefresh, K as currentPublishedLanguage, F as ensureRefresh, R as getPersistentAuthFailureHandler, P as isTransientFailure, $ as parseContentDispositionFilename, G as publishLanguage, W as publishLanguageFor, E as scheduleProactiveRefresh, U as setLanguageReader, L as setPersistentAuthFailureHandler, q as withPublishedLanguage };
@@ -1,71 +1,71 @@
1
1
  import { recordActionTimeouts as e } from "./request-bounds.js";
2
- import { apiFetch as t, currentReader as n, publishLanguageFor as r } from "./client.js";
3
- import { OrderedMap as i } from "../types/ordmap.js";
2
+ import { apiFetch as t, publishLanguageFor as n } from "./client.js";
3
+ import { OrderedMap as r } from "../types/ordmap.js";
4
4
  //#region src/api/schema.ts
5
- function a(e) {
5
+ function i(e) {
6
6
  return {
7
7
  ...e,
8
- params: e.params ? i.fromWire(e.params) : void 0
8
+ params: e.params ? r.fromWire(e.params) : void 0
9
9
  };
10
10
  }
11
- function o(e) {
11
+ function a(e) {
12
12
  return {
13
13
  ...e,
14
- resolved_params: e.resolved_params ? i.fromWire(e.resolved_params) : void 0
14
+ resolved_params: e.resolved_params ? r.fromWire(e.resolved_params) : void 0
15
15
  };
16
16
  }
17
- function s(e) {
17
+ function o(e) {
18
18
  let t = {};
19
- if (e.handlers) for (let [n, r] of Object.entries(e.handlers)) t[n] = a(r);
19
+ if (e.handlers) for (let [n, r] of Object.entries(e.handlers)) t[n] = i(r);
20
20
  let n = {};
21
- if (e.actions) for (let [t, r] of Object.entries(e.actions)) n[t] = o(r);
21
+ if (e.actions) for (let [t, r] of Object.entries(e.actions)) n[t] = a(r);
22
22
  return {
23
23
  ...e,
24
- fields: i.fromWire(e.fields),
25
- files: e.files ? i.fromWire(e.files) : void 0,
26
- variants: e.variants ? i.fromWire(e.variants) : void 0,
24
+ fields: r.fromWire(e.fields),
25
+ files: e.files ? r.fromWire(e.files) : void 0,
26
+ variants: e.variants ? r.fromWire(e.variants) : void 0,
27
27
  handlers: e.handlers ? t : void 0,
28
28
  actions: e.actions ? n : void 0
29
29
  };
30
30
  }
31
- function c(e) {
31
+ function s(e) {
32
32
  let t = {};
33
- if (e.entities) for (let [n, r] of Object.entries(e.entities)) t[n] = s(r);
33
+ if (e.entities) for (let [n, r] of Object.entries(e.entities)) t[n] = o(r);
34
34
  let n = {};
35
- if (e.structures) for (let [t, r] of Object.entries(e.structures)) n[t] = {
36
- ...r,
37
- fields: i.fromWire(r.fields)
35
+ if (e.structures) for (let [t, i] of Object.entries(e.structures)) n[t] = {
36
+ ...i,
37
+ fields: r.fromWire(i.fields)
38
38
  };
39
- let r = {};
40
- if (e.handlers) for (let [t, n] of Object.entries(e.handlers)) r[t] = a(n);
39
+ let s = {};
40
+ if (e.handlers) for (let [t, n] of Object.entries(e.handlers)) s[t] = i(n);
41
41
  let c = {};
42
- if (e.actions) for (let [t, n] of Object.entries(e.actions)) c[t] = o(n);
42
+ if (e.actions) for (let [t, n] of Object.entries(e.actions)) c[t] = a(n);
43
43
  let l = { ...e.screens };
44
44
  for (let [e, t] of Object.entries(l)) {
45
45
  let n = t;
46
46
  l[e] = {
47
47
  ...t,
48
- variants: n.variants ? i.fromWire(n.variants) : void 0
48
+ variants: n.variants ? r.fromWire(n.variants) : void 0
49
49
  };
50
50
  }
51
51
  return {
52
52
  ...e,
53
53
  entities: t,
54
54
  structures: n,
55
- handlers: r,
55
+ handlers: s,
56
56
  actions: c,
57
57
  screens: l
58
58
  };
59
59
  }
60
- async function l() {
61
- let i = performance.now(), a = n(), { audience: o, ...s } = await t("/api/schema", { cache: "no-cache" });
62
- if (o === void 0) throw Error("/api/schema answered without its audience");
63
- let l = c(s);
64
- return r(a, l.language), e(l), {
65
- schema: l,
66
- audience: o,
67
- requestedAt: i
60
+ async function c() {
61
+ let r = performance.now(), { audience: i, ...a } = await t("/api/schema", { cache: "no-cache" });
62
+ if (i === void 0) throw Error("/api/schema answered without its audience");
63
+ let o = s(a);
64
+ return n(i, o.language), e(o), {
65
+ schema: o,
66
+ audience: i,
67
+ requestedAt: r
68
68
  };
69
69
  }
70
70
  //#endregion
71
- export { l as fetchSchema };
71
+ export { c as fetchSchema };
@@ -29,7 +29,9 @@ function u({ selections: r, onCancel: i, onRemove: a }) {
29
29
  padding: "0 0 6px",
30
30
  display: "flex",
31
31
  flexDirection: "column",
32
- gap: 4
32
+ gap: 4,
33
+ maxHeight: "30vh",
34
+ overflowY: "auto"
33
35
  },
34
36
  children: r.map((n) => /* @__PURE__ */ c("li", {
35
37
  "data-selection-state": n.state,
@@ -39,18 +41,26 @@ function u({ selections: r, onCancel: i, onRemove: a }) {
39
41
  },
40
42
  children: [
41
43
  /* @__PURE__ */ s(e.paperclip, { size: 11 }),
42
- /* @__PURE__ */ s("span", {
44
+ /* @__PURE__ */ c("span", {
43
45
  style: {
44
46
  flex: 1,
45
47
  minWidth: 0,
46
- overflow: "hidden",
47
- textOverflow: "ellipsis",
48
- whiteSpace: "nowrap"
48
+ display: "flex",
49
+ flexDirection: n.state === "failed" ? "column" : "row",
50
+ gap: n.state === "failed" ? 2 : 6
49
51
  },
50
- title: n.filename,
51
- children: n.filename
52
+ children: [/* @__PURE__ */ s("span", {
53
+ style: {
54
+ flex: 1,
55
+ minWidth: 0,
56
+ overflow: "hidden",
57
+ textOverflow: "ellipsis",
58
+ whiteSpace: "nowrap"
59
+ },
60
+ title: n.filename,
61
+ children: n.filename
62
+ }), /* @__PURE__ */ s(d, { selection: n })]
52
63
  }),
53
- /* @__PURE__ */ s(d, { selection: n }),
54
64
  n.state === "uploading" ? /* @__PURE__ */ s(t, {
55
65
  size: 20,
56
66
  icon: /* @__PURE__ */ s(e.x, { size: 11 }),
@@ -91,7 +101,7 @@ function d({ selection: e }) {
91
101
  });
92
102
  case "ready": return /* @__PURE__ */ s("span", {
93
103
  style: { color: "var(--text-3)" },
94
- children: r(e.sizeBytes)
104
+ children: r(e.sizeBytes, t.language)
95
105
  });
96
106
  }
97
107
  }
@@ -128,7 +138,7 @@ function p({ files: i, align: u }) {
128
138
  }),
129
139
  /* @__PURE__ */ s("span", {
130
140
  style: { color: "var(--text-3)" },
131
- children: r(n.size_bytes)
141
+ children: r(n.size_bytes, d.language)
132
142
  }),
133
143
  /* @__PURE__ */ s(t, {
134
144
  size: 20,
@@ -189,7 +189,7 @@ function S(e) {
189
189
  /* @__PURE__ */ b("div", {
190
190
  className: "flex flex-wrap gap-2 text-xs text-muted-foreground",
191
191
  children: [
192
- D && /* @__PURE__ */ y("span", { children: o(D.size_bytes) }),
192
+ D && /* @__PURE__ */ y("span", { children: o(D.size_bytes, W.language) }),
193
193
  D?.page_count != null && /* @__PURE__ */ y("span", { children: n(W, "file.document.pages", D.page_count, {
194
194
  one: "{count} page",
195
195
  other: "{count} pages"
@@ -137,7 +137,7 @@ function x(x) {
137
137
  }),
138
138
  /* @__PURE__ */ v("span", {
139
139
  className: "flex-none text-xs text-muted-foreground",
140
- children: r(e.size_bytes)
140
+ children: r(e.size_bytes, P.language)
141
141
  }),
142
142
  /* @__PURE__ */ v("button", {
143
143
  type: "button",
@@ -399,7 +399,7 @@ function ae({ file: e, hasPrev: n, hasNext: r, onPrev: a, onNext: o, onClose: s
399
399
  children: [
400
400
  e.filename,
401
401
  " (",
402
- i(e.size_bytes),
402
+ i(e.size_bytes, c.language),
403
403
  ")"
404
404
  ]
405
405
  })