@timpel/forumkit-sdk-web 0.2.4 → 0.2.5
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/{chunk-GVC5IE24.js → chunk-BPIUCDZG.js} +97 -69
- package/dist/chunk-BPIUCDZG.js.map +1 -0
- package/dist/{chunk-2UVRYLED.js → chunk-HLAHGC4R.js} +7 -5
- package/dist/{chunk-2UVRYLED.js.map → chunk-HLAHGC4R.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{rich-text-editor-6ICCYZSK.js → rich-text-editor-TQFAV47P.js} +2 -2
- package/dist/wrappers/react.js +2 -2
- package/dist/wrappers/vue.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-GVC5IE24.js.map +0 -1
- /package/dist/{rich-text-editor-6ICCYZSK.js.map → rich-text-editor-TQFAV47P.js.map} +0 -0
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
uploadInline,
|
|
77
77
|
voteOnComment,
|
|
78
78
|
voteOnThread
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-HLAHGC4R.js";
|
|
80
80
|
|
|
81
81
|
// src/components/forum-kit.ts
|
|
82
82
|
import { createElement } from "react";
|
|
@@ -86,7 +86,9 @@ import { createRoot } from "react-dom/client";
|
|
|
86
86
|
import { createContext as createContext3, useContext as useContext2, useReducer, useCallback, useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
87
87
|
|
|
88
88
|
// src/views/api/search.ts
|
|
89
|
-
|
|
89
|
+
function getApiBase() {
|
|
90
|
+
return typeof window !== "undefined" ? window.FK_API_URL ?? "" : "";
|
|
91
|
+
}
|
|
90
92
|
function authHeaders2(token) {
|
|
91
93
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
92
94
|
}
|
|
@@ -97,13 +99,13 @@ function buildQuery(q, opts) {
|
|
|
97
99
|
return qs.toString();
|
|
98
100
|
}
|
|
99
101
|
function searchThreads2(forumId, q, opts, token) {
|
|
100
|
-
return searchThreads(
|
|
102
|
+
return searchThreads(getApiBase(), forumId, q, opts, token);
|
|
101
103
|
}
|
|
102
104
|
function searchUsers2(forumId, q, opts, token) {
|
|
103
|
-
return searchUsers(
|
|
105
|
+
return searchUsers(getApiBase(), forumId, q, opts, token);
|
|
104
106
|
}
|
|
105
107
|
async function searchComments(forumId, q, opts, token) {
|
|
106
|
-
const res = await fetch(`${
|
|
108
|
+
const res = await fetch(`${getApiBase()}/forums/${forumId}/search/comments?${buildQuery(q, opts)}`, {
|
|
107
109
|
headers: authHeaders2(token)
|
|
108
110
|
});
|
|
109
111
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
@@ -111,18 +113,20 @@ async function searchComments(forumId, q, opts, token) {
|
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
// src/views/api/notifications.ts
|
|
114
|
-
|
|
116
|
+
function getApiBase2() {
|
|
117
|
+
return typeof window !== "undefined" ? window.FK_API_URL ?? "" : "";
|
|
118
|
+
}
|
|
115
119
|
function listNotifications2(forumId, opts, token) {
|
|
116
|
-
return listNotifications(
|
|
120
|
+
return listNotifications(getApiBase2(), forumId, opts, token);
|
|
117
121
|
}
|
|
118
122
|
function markNotificationRead2(forumId, id, token) {
|
|
119
|
-
return markNotificationRead(
|
|
123
|
+
return markNotificationRead(getApiBase2(), forumId, id, token);
|
|
120
124
|
}
|
|
121
125
|
function markAllNotificationsRead2(forumId, token) {
|
|
122
|
-
return markAllNotificationsRead(
|
|
126
|
+
return markAllNotificationsRead(getApiBase2(), forumId, token);
|
|
123
127
|
}
|
|
124
128
|
async function getUnreadCount(forumId, token) {
|
|
125
|
-
const res = await fetch(`${
|
|
129
|
+
const res = await fetch(`${getApiBase2()}/forums/${forumId}/notifications/unread-count`, {
|
|
126
130
|
headers: authHeaders(token)
|
|
127
131
|
});
|
|
128
132
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
@@ -130,43 +134,45 @@ async function getUnreadCount(forumId, token) {
|
|
|
130
134
|
return body.count;
|
|
131
135
|
}
|
|
132
136
|
function deleteNotification2(forumId, id, token) {
|
|
133
|
-
return deleteNotification(
|
|
137
|
+
return deleteNotification(getApiBase2(), forumId, id, token);
|
|
134
138
|
}
|
|
135
139
|
|
|
136
140
|
// src/views/api/threads.ts
|
|
137
|
-
|
|
141
|
+
function getApiBase3() {
|
|
142
|
+
return typeof window !== "undefined" ? window.FK_API_URL ?? "" : "";
|
|
143
|
+
}
|
|
138
144
|
function authHeaders3(token) {
|
|
139
145
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
140
146
|
}
|
|
141
147
|
function listThreads2(forumId, token, params) {
|
|
142
|
-
return listThreads(
|
|
148
|
+
return listThreads(getApiBase3(), forumId, token, params);
|
|
143
149
|
}
|
|
144
150
|
function saveThread2(forumId, threadId, token) {
|
|
145
|
-
return saveThread(
|
|
151
|
+
return saveThread(getApiBase3(), forumId, threadId, token);
|
|
146
152
|
}
|
|
147
153
|
function unsaveThread2(forumId, threadId, token) {
|
|
148
|
-
return unsaveThread(
|
|
154
|
+
return unsaveThread(getApiBase3(), forumId, threadId, token);
|
|
149
155
|
}
|
|
150
156
|
function reportThread2(forumId, threadId, reason, token) {
|
|
151
|
-
return reportThread(
|
|
157
|
+
return reportThread(getApiBase3(), forumId, threadId, reason, token);
|
|
152
158
|
}
|
|
153
159
|
function getThread2(forumId, threadId, token) {
|
|
154
|
-
return getThread(
|
|
160
|
+
return getThread(getApiBase3(), forumId, threadId, token);
|
|
155
161
|
}
|
|
156
162
|
function createThread2(forumId, body, token) {
|
|
157
|
-
return createThread(
|
|
163
|
+
return createThread(getApiBase3(), forumId, body, token);
|
|
158
164
|
}
|
|
159
165
|
function updateThread2(forumId, threadId, body, token) {
|
|
160
|
-
return updateThread(
|
|
166
|
+
return updateThread(getApiBase3(), forumId, threadId, body, token);
|
|
161
167
|
}
|
|
162
168
|
function deleteThread2(forumId, threadId, token) {
|
|
163
|
-
return deleteThread(
|
|
169
|
+
return deleteThread(getApiBase3(), forumId, threadId, token);
|
|
164
170
|
}
|
|
165
171
|
function shareThreadWithUsers2(forumId, threadId, recipientUserIds, message, token) {
|
|
166
|
-
return shareThreadWithUsers(
|
|
172
|
+
return shareThreadWithUsers(getApiBase3(), forumId, threadId, recipientUserIds, message, token);
|
|
167
173
|
}
|
|
168
174
|
async function getSimilarThreads(forumId, threadId, token, limit = 5) {
|
|
169
|
-
const res = await fetch(`${
|
|
175
|
+
const res = await fetch(`${getApiBase3()}/forums/${forumId}/threads/${threadId}/similar?limit=${limit}`, {
|
|
170
176
|
method: "GET",
|
|
171
177
|
headers: { "Content-Type": "application/json", ...authHeaders3(token) }
|
|
172
178
|
});
|
|
@@ -175,30 +181,32 @@ async function getSimilarThreads(forumId, threadId, token, limit = 5) {
|
|
|
175
181
|
}
|
|
176
182
|
|
|
177
183
|
// src/views/api/comments.ts
|
|
178
|
-
|
|
184
|
+
function getApiBase4() {
|
|
185
|
+
return typeof window !== "undefined" ? window.FK_API_URL ?? "" : "";
|
|
186
|
+
}
|
|
179
187
|
function createReply2(threadId, body, token) {
|
|
180
|
-
return createReply(
|
|
188
|
+
return createReply(getApiBase4(), threadId, body, token);
|
|
181
189
|
}
|
|
182
190
|
function saveComment2(threadId, commentId, token) {
|
|
183
|
-
return saveComment(
|
|
191
|
+
return saveComment(getApiBase4(), threadId, commentId, token);
|
|
184
192
|
}
|
|
185
193
|
function unsaveComment2(threadId, commentId, token) {
|
|
186
|
-
return unsaveComment(
|
|
194
|
+
return unsaveComment(getApiBase4(), threadId, commentId, token);
|
|
187
195
|
}
|
|
188
196
|
function reportComment2(threadId, commentId, reason, token) {
|
|
189
|
-
return reportComment(
|
|
197
|
+
return reportComment(getApiBase4(), threadId, commentId, reason, token);
|
|
190
198
|
}
|
|
191
199
|
function updateReply2(threadId, commentId, body, token) {
|
|
192
|
-
return updateReply(
|
|
200
|
+
return updateReply(getApiBase4(), threadId, commentId, body, token);
|
|
193
201
|
}
|
|
194
202
|
function deleteComment2(threadId, commentId, token) {
|
|
195
|
-
return deleteComment(
|
|
203
|
+
return deleteComment(getApiBase4(), threadId, commentId, token);
|
|
196
204
|
}
|
|
197
205
|
function acceptAnswer2(threadId, commentId, token) {
|
|
198
|
-
return acceptAnswer(
|
|
206
|
+
return acceptAnswer(getApiBase4(), threadId, commentId, token);
|
|
199
207
|
}
|
|
200
208
|
function unacceptAnswer2(threadId, commentId, token) {
|
|
201
|
-
return unacceptAnswer(
|
|
209
|
+
return unacceptAnswer(getApiBase4(), threadId, commentId, token);
|
|
202
210
|
}
|
|
203
211
|
|
|
204
212
|
// src/views/hooks/use-theme.ts
|
|
@@ -207,13 +215,15 @@ var ThemeHostContext = createContext({ setThemeAttr: () => {
|
|
|
207
215
|
} });
|
|
208
216
|
|
|
209
217
|
// src/views/api/ai.ts
|
|
210
|
-
|
|
218
|
+
function getApiBase5() {
|
|
219
|
+
return typeof window !== "undefined" ? window.FK_API_URL ?? "" : "";
|
|
220
|
+
}
|
|
211
221
|
function authHeaders4(token) {
|
|
212
222
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
213
223
|
}
|
|
214
224
|
async function callSurfaceRelated(threadId, token) {
|
|
215
225
|
try {
|
|
216
|
-
const res = await fetch(`${
|
|
226
|
+
const res = await fetch(`${getApiBase5()}/threads/${threadId}/ai/surface-related`, {
|
|
217
227
|
method: "POST",
|
|
218
228
|
headers: authHeaders4(token)
|
|
219
229
|
});
|
|
@@ -226,18 +236,18 @@ async function callSurfaceRelated(threadId, token) {
|
|
|
226
236
|
}
|
|
227
237
|
}
|
|
228
238
|
async function callSummariseStreaming(threadId, onEvent, token) {
|
|
229
|
-
await summariseStreaming(
|
|
239
|
+
await summariseStreaming(getApiBase5(), threadId, token, onEvent);
|
|
230
240
|
}
|
|
231
241
|
async function callSuggestStreaming(threadId, onEvent, token) {
|
|
232
|
-
await suggestStreaming(
|
|
242
|
+
await suggestStreaming(getApiBase5(), threadId, token, onEvent);
|
|
233
243
|
}
|
|
234
244
|
async function callAskStreaming(forumId, q, token, onEvent) {
|
|
235
245
|
if (!token) throw new Error("Not authenticated");
|
|
236
|
-
await askQuestionStreaming(
|
|
246
|
+
await askQuestionStreaming(getApiBase5(), forumId, q, token, onEvent);
|
|
237
247
|
}
|
|
238
248
|
async function callSuggestMetadata(forumId, title, body, existingTags, token) {
|
|
239
249
|
try {
|
|
240
|
-
const res = await fetch(`${
|
|
250
|
+
const res = await fetch(`${getApiBase5()}/forums/${forumId}/ai/suggest-metadata`, {
|
|
241
251
|
method: "POST",
|
|
242
252
|
headers: { "Content-Type": "application/json", ...authHeaders4(token) },
|
|
243
253
|
body: JSON.stringify({ title, body, existingTags })
|
|
@@ -251,32 +261,34 @@ async function callSuggestMetadata(forumId, title, body, existingTags, token) {
|
|
|
251
261
|
}
|
|
252
262
|
|
|
253
263
|
// src/views/api/profile.ts
|
|
254
|
-
|
|
264
|
+
function getApiBase6() {
|
|
265
|
+
return typeof window !== "undefined" ? window.FK_API_URL ?? "" : "";
|
|
266
|
+
}
|
|
255
267
|
function authHeaders5(token) {
|
|
256
268
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
257
269
|
}
|
|
258
270
|
function getMyProfile2(forumId, token) {
|
|
259
|
-
return getMyProfile(
|
|
271
|
+
return getMyProfile(getApiBase6(), forumId, token);
|
|
260
272
|
}
|
|
261
273
|
function updateMyProfile2(forumId, body, token) {
|
|
262
|
-
return updateMyProfile(
|
|
274
|
+
return updateMyProfile(getApiBase6(), forumId, body, token);
|
|
263
275
|
}
|
|
264
276
|
async function updateThemePreference(forumId, themePreference, token) {
|
|
265
|
-
await fetch(`${
|
|
277
|
+
await fetch(`${getApiBase6()}/forums/${forumId}/me/theme`, {
|
|
266
278
|
method: "PATCH",
|
|
267
279
|
headers: { "Content-Type": "application/json", ...authHeaders5(token) },
|
|
268
280
|
body: JSON.stringify({ themePreference })
|
|
269
281
|
});
|
|
270
282
|
}
|
|
271
283
|
function updateNotificationPrefs2(forumId, prefs, token) {
|
|
272
|
-
return updateNotificationPrefs(
|
|
284
|
+
return updateNotificationPrefs(getApiBase6(), forumId, prefs, token);
|
|
273
285
|
}
|
|
274
286
|
function getProfileActivity2(forumId, scope, page, limit, sort, contentType, token) {
|
|
275
|
-
return getProfileActivity(
|
|
287
|
+
return getProfileActivity(getApiBase6(), forumId, scope, page, limit, sort, contentType, token);
|
|
276
288
|
}
|
|
277
289
|
async function getUserProfile(forumId, userId, token) {
|
|
278
290
|
try {
|
|
279
|
-
const res = await fetch(`${
|
|
291
|
+
const res = await fetch(`${getApiBase6()}/forums/${forumId}/users/${userId}`, {
|
|
280
292
|
headers: authHeaders5(token)
|
|
281
293
|
});
|
|
282
294
|
if (!res.ok) return null;
|
|
@@ -287,7 +299,7 @@ async function getUserProfile(forumId, userId, token) {
|
|
|
287
299
|
}
|
|
288
300
|
async function getUserActivity(forumId, userId, scope, page, limit, sort, contentType, token) {
|
|
289
301
|
const qs = new URLSearchParams({ scope, page: String(page), limit: String(limit), sort, contentType });
|
|
290
|
-
const res = await fetch(`${
|
|
302
|
+
const res = await fetch(`${getApiBase6()}/forums/${forumId}/users/${userId}/activity?${qs.toString()}`, {
|
|
291
303
|
headers: authHeaders5(token)
|
|
292
304
|
});
|
|
293
305
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
@@ -295,12 +307,14 @@ async function getUserActivity(forumId, userId, scope, page, limit, sort, conten
|
|
|
295
307
|
}
|
|
296
308
|
|
|
297
309
|
// src/views/api/forums.ts
|
|
298
|
-
|
|
310
|
+
function getApiBase7() {
|
|
311
|
+
return typeof window !== "undefined" ? window.FK_API_URL ?? "" : "";
|
|
312
|
+
}
|
|
299
313
|
function authHeaders6(token) {
|
|
300
314
|
return token ? { Authorization: `Bearer ${token}` } : {};
|
|
301
315
|
}
|
|
302
316
|
async function getForum(forumId, token) {
|
|
303
|
-
const res = await fetch(`${
|
|
317
|
+
const res = await fetch(`${getApiBase7()}/forums/${forumId}`, {
|
|
304
318
|
method: "GET",
|
|
305
319
|
headers: { "Content-Type": "application/json", ...authHeaders6(token) }
|
|
306
320
|
});
|
|
@@ -309,42 +323,48 @@ async function getForum(forumId, token) {
|
|
|
309
323
|
}
|
|
310
324
|
|
|
311
325
|
// src/views/api/votes.ts
|
|
312
|
-
|
|
326
|
+
function getApiBase8() {
|
|
327
|
+
return typeof window !== "undefined" ? window.FK_API_URL ?? "" : "";
|
|
328
|
+
}
|
|
313
329
|
function voteOnThread2(forumId, threadId, direction, token) {
|
|
314
|
-
return voteOnThread(
|
|
330
|
+
return voteOnThread(getApiBase8(), forumId, threadId, direction, token);
|
|
315
331
|
}
|
|
316
332
|
function removeVoteFromThread2(forumId, threadId, token) {
|
|
317
|
-
return removeVoteFromThread(
|
|
333
|
+
return removeVoteFromThread(getApiBase8(), forumId, threadId, token);
|
|
318
334
|
}
|
|
319
335
|
function voteOnComment2(threadId, commentId, direction, token) {
|
|
320
|
-
return voteOnComment(
|
|
336
|
+
return voteOnComment(getApiBase8(), threadId, commentId, direction, token);
|
|
321
337
|
}
|
|
322
338
|
function removeVoteFromComment2(threadId, commentId, token) {
|
|
323
|
-
return removeVoteFromComment(
|
|
339
|
+
return removeVoteFromComment(getApiBase8(), threadId, commentId, token);
|
|
324
340
|
}
|
|
325
341
|
|
|
326
342
|
// src/views/api/drafts.ts
|
|
327
|
-
|
|
343
|
+
function getApiBase9() {
|
|
344
|
+
return typeof window !== "undefined" ? window.FK_API_URL ?? "" : "";
|
|
345
|
+
}
|
|
328
346
|
function listDrafts2(forumId, token) {
|
|
329
|
-
return listDrafts(
|
|
347
|
+
return listDrafts(getApiBase9(), forumId, token);
|
|
330
348
|
}
|
|
331
349
|
function createDraft2(forumId, title, content, token) {
|
|
332
|
-
return createDraft(
|
|
350
|
+
return createDraft(getApiBase9(), forumId, title, content, token);
|
|
333
351
|
}
|
|
334
352
|
function updateDraft2(forumId, draftId, fields, token) {
|
|
335
|
-
return updateDraft(
|
|
353
|
+
return updateDraft(getApiBase9(), forumId, draftId, fields, token);
|
|
336
354
|
}
|
|
337
355
|
function deleteDraft2(forumId, draftId, token) {
|
|
338
|
-
return deleteDraft(
|
|
356
|
+
return deleteDraft(getApiBase9(), forumId, draftId, token);
|
|
339
357
|
}
|
|
340
358
|
|
|
341
359
|
// src/views/hooks/use-session.tsx
|
|
342
360
|
import { createContext as createContext2, useContext, useEffect, useRef, useState } from "react";
|
|
343
361
|
|
|
344
362
|
// src/views/api/auth.ts
|
|
345
|
-
|
|
363
|
+
function getApiBase10() {
|
|
364
|
+
return typeof window !== "undefined" ? window.FK_API_URL ?? "" : "";
|
|
365
|
+
}
|
|
346
366
|
async function createSession2(apiUrl, hostToken) {
|
|
347
|
-
return createSession(apiUrl ||
|
|
367
|
+
return createSession(apiUrl || getApiBase10(), hostToken);
|
|
348
368
|
}
|
|
349
369
|
|
|
350
370
|
// src/views/hooks/use-session.tsx
|
|
@@ -3949,9 +3969,11 @@ import { useEffect as useEffect6, useRef as useRef7, useState as useState10 } fr
|
|
|
3949
3969
|
import { useEditor, EditorContent } from "@tiptap/react";
|
|
3950
3970
|
|
|
3951
3971
|
// src/views/api/gifs.ts
|
|
3952
|
-
|
|
3972
|
+
function getApiBase11() {
|
|
3973
|
+
return typeof window !== "undefined" ? window.FK_API_URL ?? "" : "";
|
|
3974
|
+
}
|
|
3953
3975
|
function searchGifs2(forumId, query, token, limit = 24) {
|
|
3954
|
-
return searchGifs(
|
|
3976
|
+
return searchGifs(getApiBase11(), forumId, query, token, limit);
|
|
3955
3977
|
}
|
|
3956
3978
|
|
|
3957
3979
|
// src/views/components/thread/comment-composer.tsx
|
|
@@ -4249,7 +4271,7 @@ function CommentComposer({
|
|
|
4249
4271
|
|
|
4250
4272
|
// src/views/components/thread/comment.tsx
|
|
4251
4273
|
import { Fragment as Fragment9, jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4252
|
-
var RichTextEditor = lazy(() => import("./rich-text-editor-
|
|
4274
|
+
var RichTextEditor = lazy(() => import("./rich-text-editor-TQFAV47P.js"));
|
|
4253
4275
|
function Comment({
|
|
4254
4276
|
comment,
|
|
4255
4277
|
threadId,
|
|
@@ -4498,7 +4520,7 @@ function MinusMark() {
|
|
|
4498
4520
|
|
|
4499
4521
|
// src/views/components/thread/thread-view.tsx
|
|
4500
4522
|
import { Fragment as Fragment10, jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4501
|
-
var RichTextEditor2 = lazy2(() => import("./rich-text-editor-
|
|
4523
|
+
var RichTextEditor2 = lazy2(() => import("./rich-text-editor-TQFAV47P.js"));
|
|
4502
4524
|
function ThreadView({ forum, onBack }) {
|
|
4503
4525
|
const {
|
|
4504
4526
|
state,
|
|
@@ -5931,7 +5953,7 @@ function isValidUrl(s) {
|
|
|
5931
5953
|
return false;
|
|
5932
5954
|
}
|
|
5933
5955
|
}
|
|
5934
|
-
var RichTextEditor3 = lazy3(() => import("./rich-text-editor-
|
|
5956
|
+
var RichTextEditor3 = lazy3(() => import("./rich-text-editor-TQFAV47P.js"));
|
|
5935
5957
|
var TABS = [
|
|
5936
5958
|
{ id: "text", label: "Text" },
|
|
5937
5959
|
{ id: "images", label: "Images & Video" },
|
|
@@ -6591,12 +6613,14 @@ function Notifications() {
|
|
|
6591
6613
|
import { useEffect as useEffect10, useState as useState22 } from "react";
|
|
6592
6614
|
|
|
6593
6615
|
// src/views/api/moderation.ts
|
|
6594
|
-
|
|
6616
|
+
function getApiBase12() {
|
|
6617
|
+
return typeof window !== "undefined" ? window.FK_API_URL ?? "" : "";
|
|
6618
|
+
}
|
|
6595
6619
|
function getModerationQueue2(params, token) {
|
|
6596
|
-
return getModerationQueue(
|
|
6620
|
+
return getModerationQueue(getApiBase12(), params, token);
|
|
6597
6621
|
}
|
|
6598
6622
|
function resolveModerationItem2(itemId, action, token) {
|
|
6599
|
-
return resolveModerationItem(
|
|
6623
|
+
return resolveModerationItem(getApiBase12(), itemId, action, token);
|
|
6600
6624
|
}
|
|
6601
6625
|
|
|
6602
6626
|
// src/views/routes/Moderation.tsx
|
|
@@ -13372,11 +13396,15 @@ var ForumKitElement = class extends HTMLElement {
|
|
|
13372
13396
|
const theme = themeRaw ? JSON.parse(themeRaw) : {};
|
|
13373
13397
|
const platformAttr = this.getAttribute("platform");
|
|
13374
13398
|
const platform = platformAttr === "native" ? "native" : "web";
|
|
13399
|
+
const apiUrl = this.getAttribute("api-url") ?? DEFAULT_API_URL;
|
|
13400
|
+
if (typeof window !== "undefined") {
|
|
13401
|
+
window.FK_API_URL = apiUrl;
|
|
13402
|
+
}
|
|
13375
13403
|
return {
|
|
13376
13404
|
forumId,
|
|
13377
13405
|
token,
|
|
13378
13406
|
theme,
|
|
13379
|
-
apiUrl
|
|
13407
|
+
apiUrl,
|
|
13380
13408
|
platform,
|
|
13381
13409
|
...this._onLogout ? { onLogout: this._onLogout } : {}
|
|
13382
13410
|
};
|
|
@@ -13431,4 +13459,4 @@ if (!customElements.get("forum-kit")) {
|
|
|
13431
13459
|
export {
|
|
13432
13460
|
ForumKitElement
|
|
13433
13461
|
};
|
|
13434
|
-
//# sourceMappingURL=chunk-
|
|
13462
|
+
//# sourceMappingURL=chunk-BPIUCDZG.js.map
|