@flamingo-stack/openframe-frontend-core 0.0.195 → 0.0.197
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-4CWSZPXH.cjs.map +1 -1
- package/dist/{chunk-PJ5KFD2V.js → chunk-4ML3NA2L.js} +75 -1
- package/dist/{chunk-PJ5KFD2V.js.map → chunk-4ML3NA2L.js.map} +1 -1
- package/dist/{chunk-U6AJSRJP.js → chunk-GIQZAYY5.js} +731 -365
- package/dist/chunk-GIQZAYY5.js.map +1 -0
- package/dist/{chunk-IQM3G2I6.cjs → chunk-IMDXOVYD.cjs} +777 -411
- package/dist/chunk-IMDXOVYD.cjs.map +1 -0
- package/dist/{chunk-CVMSC7M4.cjs → chunk-OII2IERE.cjs} +77 -3
- package/dist/chunk-OII2IERE.cjs.map +1 -0
- package/dist/chunk-UC43NICZ.cjs.map +1 -1
- package/dist/chunk-V2FNIPZJ.cjs.map +1 -1
- package/dist/chunk-VJTFBYVG.cjs.map +1 -1
- package/dist/chunk-VRHGVLSL.cjs.map +1 -1
- package/dist/chunk-WZW7C7TF.cjs.map +1 -1
- package/dist/chunk-XQFFGR6U.cjs.map +1 -1
- package/dist/components/chart.d.ts +7 -14
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chat/hooks/index.d.ts +1 -0
- package/dist/components/chat/hooks/index.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-jetstream-dialog-subscription.d.ts +15 -0
- package/dist/components/chat/hooks/use-jetstream-dialog-subscription.d.ts.map +1 -0
- package/dist/components/chat/types/api.types.d.ts +43 -0
- package/dist/components/chat/types/api.types.d.ts.map +1 -1
- package/dist/components/chat/types/network.types.d.ts +4 -0
- package/dist/components/chat/types/network.types.d.ts.map +1 -1
- package/dist/components/features/board/ticket-card-skeleton.d.ts.map +1 -1
- package/dist/components/features/board/ticket-card.d.ts.map +1 -1
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.cjs.map +1 -1
- package/dist/components/features/index.js +2 -2
- package/dist/components/icons/index.cjs.map +1 -1
- package/dist/components/icons-v2-generated/index.cjs.map +1 -1
- package/dist/components/index.cjs +5 -3
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +4 -2
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.cjs.map +1 -1
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/resizable.d.ts +1 -1
- package/dist/components/toast/index.cjs.map +1 -1
- package/dist/components/ui/file-manager/index.cjs.map +1 -1
- package/dist/components/ui/index.cjs +5 -3
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +4 -2
- package/dist/hooks/index.cjs +2 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/nats/index.cjs +73 -0
- package/dist/nats/index.cjs.map +1 -1
- package/dist/nats/index.js +73 -0
- package/dist/nats/index.js.map +1 -1
- package/dist/nats/nats.d.ts +22 -1
- package/dist/nats/nats.d.ts.map +1 -1
- package/dist/tailwind.config.cjs +7 -7
- package/dist/tailwind.config.cjs.map +1 -1
- package/dist/tailwind.config.js +7 -7
- package/dist/tailwind.config.js.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/hooks/index.ts +1 -0
- package/src/components/chat/hooks/use-jetstream-dialog-subscription.ts +474 -0
- package/src/components/chat/types/api.types.ts +45 -0
- package/src/components/chat/types/network.types.ts +4 -0
- package/src/components/features/board/ticket-card-skeleton.tsx +16 -4
- package/src/components/features/board/ticket-card.tsx +6 -4
- package/src/nats/nats.ts +117 -0
- package/dist/chunk-CVMSC7M4.cjs.map +0 -1
- package/dist/chunk-IQM3G2I6.cjs.map +0 -1
- package/dist/chunk-U6AJSRJP.js.map +0 -1
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
useNearViewport,
|
|
17
17
|
useOnboardingState,
|
|
18
18
|
useToast
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-4ML3NA2L.js";
|
|
20
20
|
import {
|
|
21
21
|
Button,
|
|
22
22
|
Checkbox,
|
|
@@ -407,7 +407,7 @@ function useDynamicTheme() {
|
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
// src/components/features/array-entry-manager.tsx
|
|
410
|
-
import { useState as
|
|
410
|
+
import { useState as useState57, useEffect as useEffect43 } from "react";
|
|
411
411
|
|
|
412
412
|
// src/components/ui/allowed-domains-input.tsx
|
|
413
413
|
init_cn();
|
|
@@ -7245,13 +7245,17 @@ function useChunkCatchup({
|
|
|
7245
7245
|
};
|
|
7246
7246
|
}
|
|
7247
7247
|
|
|
7248
|
-
// src/components/chat/hooks/use-
|
|
7248
|
+
// src/components/chat/hooks/use-jetstream-dialog-subscription.ts
|
|
7249
7249
|
import { useCallback as useCallback6, useEffect as useEffect9, useRef as useRef10, useState as useState16 } from "react";
|
|
7250
7250
|
var shared = null;
|
|
7251
|
-
|
|
7251
|
+
var DEFAULT_INACTIVE_THRESHOLD_MS = 5 * 6e4;
|
|
7252
|
+
var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
|
|
7253
|
+
function useJetStreamDialogSubscription({
|
|
7252
7254
|
enabled,
|
|
7253
7255
|
dialogId,
|
|
7254
|
-
|
|
7256
|
+
streamName = DEFAULT_STREAM_NAME,
|
|
7257
|
+
topic,
|
|
7258
|
+
optStartSeq,
|
|
7255
7259
|
onEvent,
|
|
7256
7260
|
onConnect,
|
|
7257
7261
|
onDisconnect,
|
|
@@ -7259,13 +7263,16 @@ function useNatsDialogSubscription({
|
|
|
7259
7263
|
onBeforeReconnect,
|
|
7260
7264
|
getNatsWsUrl,
|
|
7261
7265
|
clientConfig = {},
|
|
7262
|
-
reconnectionBackoff
|
|
7266
|
+
reconnectionBackoff,
|
|
7267
|
+
inactiveThresholdMs
|
|
7263
7268
|
}) {
|
|
7264
7269
|
const [isConnected, setIsConnected] = useState16(false);
|
|
7265
7270
|
const [isSubscribed, setIsSubscribed] = useState16(false);
|
|
7266
7271
|
const [reconnectionCount, setReconnectionCount] = useState16(0);
|
|
7272
|
+
const [currentStreamSeq, setCurrentStreamSeq] = useState16(null);
|
|
7267
7273
|
const clientRef = useRef10(null);
|
|
7268
|
-
const
|
|
7274
|
+
const subscriptionRef = useRef10(null);
|
|
7275
|
+
const highestStreamSeqRef = useRef10(null);
|
|
7269
7276
|
const onEventRef = useRef10(onEvent);
|
|
7270
7277
|
useEffect9(() => {
|
|
7271
7278
|
onEventRef.current = onEvent;
|
|
@@ -7286,7 +7293,6 @@ function useNatsDialogSubscription({
|
|
|
7286
7293
|
useEffect9(() => {
|
|
7287
7294
|
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
7288
7295
|
}, [onBeforeReconnect]);
|
|
7289
|
-
const hadConnectionBeforeRef = useRef10(false);
|
|
7290
7296
|
const getNatsWsUrlRef = useRef10(getNatsWsUrl);
|
|
7291
7297
|
useEffect9(() => {
|
|
7292
7298
|
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
@@ -7295,33 +7301,54 @@ function useNatsDialogSubscription({
|
|
|
7295
7301
|
useEffect9(() => {
|
|
7296
7302
|
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
7297
7303
|
}, [reconnectionBackoff]);
|
|
7298
|
-
const
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7304
|
+
const optStartSeqRef = useRef10(optStartSeq);
|
|
7305
|
+
useEffect9(() => {
|
|
7306
|
+
optStartSeqRef.current = optStartSeq;
|
|
7307
|
+
}, [optStartSeq]);
|
|
7308
|
+
const inactiveThresholdRef = useRef10(inactiveThresholdMs);
|
|
7309
|
+
useEffect9(() => {
|
|
7310
|
+
inactiveThresholdRef.current = inactiveThresholdMs;
|
|
7311
|
+
}, [inactiveThresholdMs]);
|
|
7312
|
+
const hadConnectionBeforeRef = useRef10(false);
|
|
7313
|
+
const acquireClient = useCallback6(
|
|
7314
|
+
(url) => {
|
|
7315
|
+
if (shared?.wsUrl !== url) {
|
|
7316
|
+
if (shared) {
|
|
7317
|
+
if (shared.closeTimer) clearTimeout(shared.closeTimer);
|
|
7318
|
+
const old = shared;
|
|
7319
|
+
shared = null;
|
|
7320
|
+
void old.client.close().catch(() => {
|
|
7321
|
+
});
|
|
7322
|
+
}
|
|
7323
|
+
const { name = "openframe-frontend-jetstream", user = "machine", pass = "" } = clientConfig;
|
|
7324
|
+
const client = createNatsClient({
|
|
7325
|
+
servers: url,
|
|
7326
|
+
name,
|
|
7327
|
+
user,
|
|
7328
|
+
pass,
|
|
7329
|
+
connectTimeoutMs: NETWORK_CONFIG.CONNECT_TIMEOUT_MS,
|
|
7330
|
+
reconnect: false,
|
|
7331
|
+
pingIntervalMs: NETWORK_CONFIG.PING_INTERVAL_MS,
|
|
7332
|
+
maxPingOut: NETWORK_CONFIG.MAX_PING_OUT
|
|
7305
7333
|
});
|
|
7334
|
+
shared = {
|
|
7335
|
+
wsUrl: url,
|
|
7336
|
+
client,
|
|
7337
|
+
connectPromise: null,
|
|
7338
|
+
refCount: 0,
|
|
7339
|
+
closeTimer: null,
|
|
7340
|
+
retryTimer: null
|
|
7341
|
+
};
|
|
7306
7342
|
}
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
maxPingOut: NETWORK_CONFIG.MAX_PING_OUT
|
|
7317
|
-
});
|
|
7318
|
-
shared = { wsUrl: url, client, connectPromise: null, refCount: 0, closeTimer: null, retryTimer: null };
|
|
7319
|
-
}
|
|
7320
|
-
shared.refCount += 1;
|
|
7321
|
-
shared.closeTimer && clearTimeout(shared.closeTimer);
|
|
7322
|
-
shared.closeTimer = null;
|
|
7323
|
-
return shared;
|
|
7324
|
-
}, [clientConfig]);
|
|
7343
|
+
shared.refCount += 1;
|
|
7344
|
+
if (shared.closeTimer) {
|
|
7345
|
+
clearTimeout(shared.closeTimer);
|
|
7346
|
+
shared.closeTimer = null;
|
|
7347
|
+
}
|
|
7348
|
+
return shared;
|
|
7349
|
+
},
|
|
7350
|
+
[clientConfig]
|
|
7351
|
+
);
|
|
7325
7352
|
const releaseClient = useCallback6((url) => {
|
|
7326
7353
|
if (!shared || shared.wsUrl !== url) return;
|
|
7327
7354
|
shared.refCount = Math.max(0, shared.refCount - 1);
|
|
@@ -7410,6 +7437,331 @@ function useNatsDialogSubscription({
|
|
|
7410
7437
|
}
|
|
7411
7438
|
}, jitteredDelay);
|
|
7412
7439
|
}
|
|
7440
|
+
const unsubscribeStatus = client.onStatus((event) => {
|
|
7441
|
+
const connected = event.status === "connected";
|
|
7442
|
+
const disconnected = event.status === "closed" || event.status === "disconnected";
|
|
7443
|
+
if (connected) {
|
|
7444
|
+
setIsConnected(true);
|
|
7445
|
+
if (hadConnectionBeforeRef.current) {
|
|
7446
|
+
setReconnectionCount((c) => c + 1);
|
|
7447
|
+
}
|
|
7448
|
+
hadConnectionBeforeRef.current = true;
|
|
7449
|
+
retryAttempt = 0;
|
|
7450
|
+
onConnectRef.current?.();
|
|
7451
|
+
}
|
|
7452
|
+
if (event.status === "error") {
|
|
7453
|
+
console.warn("[JetStream] NATS protocol error:", event.data);
|
|
7454
|
+
return;
|
|
7455
|
+
}
|
|
7456
|
+
if (disconnected) {
|
|
7457
|
+
setIsConnected(false);
|
|
7458
|
+
setIsSubscribed(false);
|
|
7459
|
+
if (subscriptionRef.current) {
|
|
7460
|
+
try {
|
|
7461
|
+
subscriptionRef.current.unsubscribe();
|
|
7462
|
+
} catch {
|
|
7463
|
+
}
|
|
7464
|
+
subscriptionRef.current = null;
|
|
7465
|
+
}
|
|
7466
|
+
onDisconnectRef.current?.();
|
|
7467
|
+
scheduleRetry();
|
|
7468
|
+
}
|
|
7469
|
+
});
|
|
7470
|
+
(async () => {
|
|
7471
|
+
try {
|
|
7472
|
+
sharedConn.connectPromise || (sharedConn.connectPromise = client.connect());
|
|
7473
|
+
await sharedConn.connectPromise;
|
|
7474
|
+
if (!closed) {
|
|
7475
|
+
setIsConnected(true);
|
|
7476
|
+
hadConnectionBeforeRef.current = true;
|
|
7477
|
+
}
|
|
7478
|
+
} catch {
|
|
7479
|
+
sharedConn.connectPromise = null;
|
|
7480
|
+
if (!closed) {
|
|
7481
|
+
setIsConnected(false);
|
|
7482
|
+
onDisconnectRef.current?.();
|
|
7483
|
+
scheduleRetry();
|
|
7484
|
+
}
|
|
7485
|
+
}
|
|
7486
|
+
})();
|
|
7487
|
+
return () => {
|
|
7488
|
+
closed = true;
|
|
7489
|
+
setIsConnected(false);
|
|
7490
|
+
setIsSubscribed(false);
|
|
7491
|
+
unsubscribeStatus();
|
|
7492
|
+
if (sharedConn.retryTimer) {
|
|
7493
|
+
clearTimeout(sharedConn.retryTimer);
|
|
7494
|
+
sharedConn.retryTimer = null;
|
|
7495
|
+
}
|
|
7496
|
+
if (subscriptionRef.current) {
|
|
7497
|
+
try {
|
|
7498
|
+
subscriptionRef.current.unsubscribe();
|
|
7499
|
+
} catch {
|
|
7500
|
+
}
|
|
7501
|
+
subscriptionRef.current = null;
|
|
7502
|
+
}
|
|
7503
|
+
if (clientRef.current && currentWsUrlRef.current) {
|
|
7504
|
+
releaseClient(currentWsUrlRef.current);
|
|
7505
|
+
clientRef.current = null;
|
|
7506
|
+
currentWsUrlRef.current = "";
|
|
7507
|
+
}
|
|
7508
|
+
};
|
|
7509
|
+
}, [enabled, getNatsWsUrl, acquireClient, releaseClient]);
|
|
7510
|
+
useEffect9(() => {
|
|
7511
|
+
if (!enabled || !dialogId || !isConnected) {
|
|
7512
|
+
if (subscriptionRef.current) {
|
|
7513
|
+
try {
|
|
7514
|
+
subscriptionRef.current.unsubscribe();
|
|
7515
|
+
} catch {
|
|
7516
|
+
}
|
|
7517
|
+
subscriptionRef.current = null;
|
|
7518
|
+
}
|
|
7519
|
+
setIsSubscribed(false);
|
|
7520
|
+
return;
|
|
7521
|
+
}
|
|
7522
|
+
const client = clientRef.current;
|
|
7523
|
+
if (!client) return;
|
|
7524
|
+
const abortController = new AbortController();
|
|
7525
|
+
const decoder = new TextDecoder();
|
|
7526
|
+
const filterSubject = `chat.${dialogId}.${topic}`;
|
|
7527
|
+
const resumeSeq = highestStreamSeqRef.current;
|
|
7528
|
+
const initialOptStart = optStartSeqRef.current;
|
|
7529
|
+
const startSeq = resumeSeq != null ? resumeSeq + 1 : initialOptStart != null ? initialOptStart + 1 : void 0;
|
|
7530
|
+
let cancelled = false;
|
|
7531
|
+
void (async () => {
|
|
7532
|
+
try {
|
|
7533
|
+
const handle = await client.subscribeJetStreamOrdered(
|
|
7534
|
+
(msg) => {
|
|
7535
|
+
if (cancelled) return;
|
|
7536
|
+
const streamSeq = msg.info.streamSequence;
|
|
7537
|
+
if (typeof streamSeq === "number") {
|
|
7538
|
+
if (highestStreamSeqRef.current == null || streamSeq > highestStreamSeqRef.current) {
|
|
7539
|
+
highestStreamSeqRef.current = streamSeq;
|
|
7540
|
+
setCurrentStreamSeq(streamSeq);
|
|
7541
|
+
}
|
|
7542
|
+
}
|
|
7543
|
+
const cb = onEventRef.current;
|
|
7544
|
+
if (!cb) return;
|
|
7545
|
+
try {
|
|
7546
|
+
const parsed = JSON.parse(decoder.decode(msg.data));
|
|
7547
|
+
if (typeof streamSeq === "number") {
|
|
7548
|
+
;
|
|
7549
|
+
parsed.streamSeq = streamSeq;
|
|
7550
|
+
}
|
|
7551
|
+
cb(parsed, topic);
|
|
7552
|
+
} catch {
|
|
7553
|
+
}
|
|
7554
|
+
},
|
|
7555
|
+
{
|
|
7556
|
+
streamName,
|
|
7557
|
+
filterSubject,
|
|
7558
|
+
deliverPolicy: startSeq != null ? "byStartSequence" : "new",
|
|
7559
|
+
optStartSeq: startSeq,
|
|
7560
|
+
inactiveThresholdMs: inactiveThresholdRef.current ?? DEFAULT_INACTIVE_THRESHOLD_MS,
|
|
7561
|
+
signal: abortController.signal
|
|
7562
|
+
}
|
|
7563
|
+
);
|
|
7564
|
+
if (cancelled) {
|
|
7565
|
+
try {
|
|
7566
|
+
handle.unsubscribe();
|
|
7567
|
+
} catch {
|
|
7568
|
+
}
|
|
7569
|
+
return;
|
|
7570
|
+
}
|
|
7571
|
+
subscriptionRef.current = handle;
|
|
7572
|
+
setIsSubscribed(true);
|
|
7573
|
+
onSubscribedRef.current?.();
|
|
7574
|
+
} catch {
|
|
7575
|
+
if (!cancelled) {
|
|
7576
|
+
setIsSubscribed(false);
|
|
7577
|
+
}
|
|
7578
|
+
}
|
|
7579
|
+
})();
|
|
7580
|
+
return () => {
|
|
7581
|
+
cancelled = true;
|
|
7582
|
+
abortController.abort();
|
|
7583
|
+
if (subscriptionRef.current) {
|
|
7584
|
+
try {
|
|
7585
|
+
subscriptionRef.current.unsubscribe();
|
|
7586
|
+
} catch {
|
|
7587
|
+
}
|
|
7588
|
+
subscriptionRef.current = null;
|
|
7589
|
+
}
|
|
7590
|
+
setIsSubscribed(false);
|
|
7591
|
+
};
|
|
7592
|
+
}, [enabled, dialogId, isConnected, streamName, topic, reconnectionCount]);
|
|
7593
|
+
useEffect9(() => {
|
|
7594
|
+
highestStreamSeqRef.current = null;
|
|
7595
|
+
setCurrentStreamSeq(null);
|
|
7596
|
+
}, [dialogId]);
|
|
7597
|
+
return { isConnected, isSubscribed, reconnectionCount, currentStreamSeq };
|
|
7598
|
+
}
|
|
7599
|
+
|
|
7600
|
+
// src/components/chat/hooks/use-nats-dialog-subscription.ts
|
|
7601
|
+
import { useCallback as useCallback7, useEffect as useEffect10, useRef as useRef11, useState as useState17 } from "react";
|
|
7602
|
+
var shared2 = null;
|
|
7603
|
+
function useNatsDialogSubscription({
|
|
7604
|
+
enabled,
|
|
7605
|
+
dialogId,
|
|
7606
|
+
topics = ["message"],
|
|
7607
|
+
onEvent,
|
|
7608
|
+
onConnect,
|
|
7609
|
+
onDisconnect,
|
|
7610
|
+
onSubscribed,
|
|
7611
|
+
onBeforeReconnect,
|
|
7612
|
+
getNatsWsUrl,
|
|
7613
|
+
clientConfig = {},
|
|
7614
|
+
reconnectionBackoff
|
|
7615
|
+
}) {
|
|
7616
|
+
const [isConnected, setIsConnected] = useState17(false);
|
|
7617
|
+
const [isSubscribed, setIsSubscribed] = useState17(false);
|
|
7618
|
+
const [reconnectionCount, setReconnectionCount] = useState17(0);
|
|
7619
|
+
const clientRef = useRef11(null);
|
|
7620
|
+
const subscriptionRefs = useRef11(/* @__PURE__ */ new Map());
|
|
7621
|
+
const onEventRef = useRef11(onEvent);
|
|
7622
|
+
useEffect10(() => {
|
|
7623
|
+
onEventRef.current = onEvent;
|
|
7624
|
+
}, [onEvent]);
|
|
7625
|
+
const onConnectRef = useRef11(onConnect);
|
|
7626
|
+
useEffect10(() => {
|
|
7627
|
+
onConnectRef.current = onConnect;
|
|
7628
|
+
}, [onConnect]);
|
|
7629
|
+
const onDisconnectRef = useRef11(onDisconnect);
|
|
7630
|
+
useEffect10(() => {
|
|
7631
|
+
onDisconnectRef.current = onDisconnect;
|
|
7632
|
+
}, [onDisconnect]);
|
|
7633
|
+
const onSubscribedRef = useRef11(onSubscribed);
|
|
7634
|
+
useEffect10(() => {
|
|
7635
|
+
onSubscribedRef.current = onSubscribed;
|
|
7636
|
+
}, [onSubscribed]);
|
|
7637
|
+
const onBeforeReconnectRef = useRef11(onBeforeReconnect);
|
|
7638
|
+
useEffect10(() => {
|
|
7639
|
+
onBeforeReconnectRef.current = onBeforeReconnect;
|
|
7640
|
+
}, [onBeforeReconnect]);
|
|
7641
|
+
const hadConnectionBeforeRef = useRef11(false);
|
|
7642
|
+
const getNatsWsUrlRef = useRef11(getNatsWsUrl);
|
|
7643
|
+
useEffect10(() => {
|
|
7644
|
+
getNatsWsUrlRef.current = getNatsWsUrl;
|
|
7645
|
+
}, [getNatsWsUrl]);
|
|
7646
|
+
const reconnectionBackoffRef = useRef11(reconnectionBackoff);
|
|
7647
|
+
useEffect10(() => {
|
|
7648
|
+
reconnectionBackoffRef.current = reconnectionBackoff;
|
|
7649
|
+
}, [reconnectionBackoff]);
|
|
7650
|
+
const acquireClient = useCallback7((url) => {
|
|
7651
|
+
if (shared2?.wsUrl !== url) {
|
|
7652
|
+
if (shared2) {
|
|
7653
|
+
shared2.closeTimer && clearTimeout(shared2.closeTimer);
|
|
7654
|
+
const old = shared2;
|
|
7655
|
+
shared2 = null;
|
|
7656
|
+
void old.client.close().catch(() => {
|
|
7657
|
+
});
|
|
7658
|
+
}
|
|
7659
|
+
const { name = "openframe-frontend", user = "machine", pass = "" } = clientConfig;
|
|
7660
|
+
const client = createNatsClient({
|
|
7661
|
+
servers: url,
|
|
7662
|
+
name,
|
|
7663
|
+
user,
|
|
7664
|
+
pass,
|
|
7665
|
+
connectTimeoutMs: NETWORK_CONFIG.CONNECT_TIMEOUT_MS,
|
|
7666
|
+
reconnect: false,
|
|
7667
|
+
pingIntervalMs: NETWORK_CONFIG.PING_INTERVAL_MS,
|
|
7668
|
+
maxPingOut: NETWORK_CONFIG.MAX_PING_OUT
|
|
7669
|
+
});
|
|
7670
|
+
shared2 = { wsUrl: url, client, connectPromise: null, refCount: 0, closeTimer: null, retryTimer: null };
|
|
7671
|
+
}
|
|
7672
|
+
shared2.refCount += 1;
|
|
7673
|
+
shared2.closeTimer && clearTimeout(shared2.closeTimer);
|
|
7674
|
+
shared2.closeTimer = null;
|
|
7675
|
+
return shared2;
|
|
7676
|
+
}, [clientConfig]);
|
|
7677
|
+
const releaseClient = useCallback7((url) => {
|
|
7678
|
+
if (!shared2 || shared2.wsUrl !== url) return;
|
|
7679
|
+
shared2.refCount = Math.max(0, shared2.refCount - 1);
|
|
7680
|
+
if (shared2.refCount > 0) return;
|
|
7681
|
+
shared2.closeTimer = setTimeout(() => {
|
|
7682
|
+
const s = shared2;
|
|
7683
|
+
shared2 = null;
|
|
7684
|
+
if (s) {
|
|
7685
|
+
if (s.retryTimer) {
|
|
7686
|
+
clearTimeout(s.retryTimer);
|
|
7687
|
+
s.retryTimer = null;
|
|
7688
|
+
}
|
|
7689
|
+
void s.client.close().catch(() => {
|
|
7690
|
+
});
|
|
7691
|
+
}
|
|
7692
|
+
}, NETWORK_CONFIG.SHARED_CLOSE_DELAY_MS);
|
|
7693
|
+
}, []);
|
|
7694
|
+
const currentWsUrlRef = useRef11("");
|
|
7695
|
+
useEffect10(() => {
|
|
7696
|
+
const wsUrl = getNatsWsUrl();
|
|
7697
|
+
if (!enabled || !wsUrl) {
|
|
7698
|
+
if (currentWsUrlRef.current && clientRef.current) {
|
|
7699
|
+
releaseClient(currentWsUrlRef.current);
|
|
7700
|
+
clientRef.current = null;
|
|
7701
|
+
currentWsUrlRef.current = "";
|
|
7702
|
+
setIsConnected(false);
|
|
7703
|
+
}
|
|
7704
|
+
return;
|
|
7705
|
+
}
|
|
7706
|
+
if (wsUrl === currentWsUrlRef.current && clientRef.current && clientRef.current.isConnected()) {
|
|
7707
|
+
return;
|
|
7708
|
+
}
|
|
7709
|
+
if (currentWsUrlRef.current && currentWsUrlRef.current !== wsUrl && clientRef.current) {
|
|
7710
|
+
releaseClient(currentWsUrlRef.current);
|
|
7711
|
+
clientRef.current = null;
|
|
7712
|
+
setIsConnected(false);
|
|
7713
|
+
}
|
|
7714
|
+
currentWsUrlRef.current = wsUrl;
|
|
7715
|
+
const sharedConn = acquireClient(wsUrl);
|
|
7716
|
+
const client = sharedConn.client;
|
|
7717
|
+
clientRef.current = client;
|
|
7718
|
+
setIsConnected(false);
|
|
7719
|
+
let closed = false;
|
|
7720
|
+
let retryAttempt = 0;
|
|
7721
|
+
function scheduleRetry() {
|
|
7722
|
+
if (closed) return;
|
|
7723
|
+
if (shared2 !== sharedConn) return;
|
|
7724
|
+
if (sharedConn.retryTimer) {
|
|
7725
|
+
clearTimeout(sharedConn.retryTimer);
|
|
7726
|
+
sharedConn.retryTimer = null;
|
|
7727
|
+
}
|
|
7728
|
+
const cfg = reconnectionBackoffRef.current ?? {};
|
|
7729
|
+
const fastRetries = cfg.fastRetries ?? 0;
|
|
7730
|
+
const fastDelay = cfg.fastRetryDelayMs ?? NETWORK_CONFIG.RETRY_INITIAL_DELAY_MS;
|
|
7731
|
+
const baseDelay = cfg.initialDelayMs ?? NETWORK_CONFIG.RETRY_INITIAL_DELAY_MS;
|
|
7732
|
+
const maxDelay = cfg.maxDelayMs ?? NETWORK_CONFIG.RETRY_MAX_DELAY_MS;
|
|
7733
|
+
const multiplier = cfg.multiplier ?? NETWORK_CONFIG.RETRY_BACKOFF_MULTIPLIER;
|
|
7734
|
+
const delay2 = retryAttempt < fastRetries ? fastDelay : Math.min(baseDelay * multiplier ** (retryAttempt - fastRetries), maxDelay);
|
|
7735
|
+
const jitteredDelay = delay2 * (0.5 + Math.random() * 0.5);
|
|
7736
|
+
retryAttempt++;
|
|
7737
|
+
sharedConn.retryTimer = setTimeout(async () => {
|
|
7738
|
+
sharedConn.retryTimer = null;
|
|
7739
|
+
if (closed) return;
|
|
7740
|
+
if (shared2 !== sharedConn) return;
|
|
7741
|
+
try {
|
|
7742
|
+
await onBeforeReconnectRef.current?.();
|
|
7743
|
+
} catch {
|
|
7744
|
+
}
|
|
7745
|
+
if (closed) return;
|
|
7746
|
+
if (shared2 !== sharedConn) return;
|
|
7747
|
+
const freshUrl = getNatsWsUrlRef.current();
|
|
7748
|
+
if (freshUrl !== wsUrl) return;
|
|
7749
|
+
try {
|
|
7750
|
+
sharedConn.connectPromise = null;
|
|
7751
|
+
sharedConn.connectPromise = client.connect();
|
|
7752
|
+
await sharedConn.connectPromise;
|
|
7753
|
+
if (!closed && shared2 === sharedConn) {
|
|
7754
|
+
retryAttempt = 0;
|
|
7755
|
+
setIsConnected(true);
|
|
7756
|
+
}
|
|
7757
|
+
} catch {
|
|
7758
|
+
sharedConn.connectPromise = null;
|
|
7759
|
+
if (!closed && shared2 === sharedConn) {
|
|
7760
|
+
scheduleRetry();
|
|
7761
|
+
}
|
|
7762
|
+
}
|
|
7763
|
+
}, jitteredDelay);
|
|
7764
|
+
}
|
|
7413
7765
|
const unsubscribeStatus = client.onStatus((event) => {
|
|
7414
7766
|
const connected = event.status === "connected";
|
|
7415
7767
|
const disconnected = ["closed", "disconnected", "error"].includes(event.status);
|
|
@@ -7481,14 +7833,14 @@ function useNatsDialogSubscription({
|
|
|
7481
7833
|
};
|
|
7482
7834
|
}, [enabled, getNatsWsUrl, acquireClient, releaseClient]);
|
|
7483
7835
|
const topicsKey = topics.join(",");
|
|
7484
|
-
const lastSubscribedDialogIdRef =
|
|
7485
|
-
const isConnectedRef =
|
|
7486
|
-
|
|
7836
|
+
const lastSubscribedDialogIdRef = useRef11(null);
|
|
7837
|
+
const isConnectedRef = useRef11(isConnected);
|
|
7838
|
+
useEffect10(() => {
|
|
7487
7839
|
isConnectedRef.current = isConnected;
|
|
7488
7840
|
}, [isConnected]);
|
|
7489
|
-
const currentDialogIdRef =
|
|
7490
|
-
const abortControllerRef =
|
|
7491
|
-
|
|
7841
|
+
const currentDialogIdRef = useRef11(null);
|
|
7842
|
+
const abortControllerRef = useRef11(null);
|
|
7843
|
+
useEffect10(() => {
|
|
7492
7844
|
currentDialogIdRef.current = dialogId;
|
|
7493
7845
|
if (!enabled || !dialogId) {
|
|
7494
7846
|
if (subscriptionRefs.current.size > 0) {
|
|
@@ -7569,7 +7921,7 @@ function useNatsDialogSubscription({
|
|
|
7569
7921
|
abortControllerRef.current = null;
|
|
7570
7922
|
};
|
|
7571
7923
|
}, [enabled, dialogId, topicsKey, topics]);
|
|
7572
|
-
|
|
7924
|
+
useEffect10(() => {
|
|
7573
7925
|
if (!enabled || !currentDialogIdRef.current || !isConnected) {
|
|
7574
7926
|
return;
|
|
7575
7927
|
}
|
|
@@ -7619,7 +7971,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
|
|
|
7619
7971
|
}
|
|
7620
7972
|
|
|
7621
7973
|
// src/components/chat/hooks/use-realtime-chunk-processor.ts
|
|
7622
|
-
import { useCallback as
|
|
7974
|
+
import { useCallback as useCallback8, useRef as useRef12, useEffect as useEffect11 } from "react";
|
|
7623
7975
|
|
|
7624
7976
|
// src/components/chat/utils/chunk-parser.ts
|
|
7625
7977
|
function normalizeToolCalls(raw) {
|
|
@@ -8252,14 +8604,14 @@ function useRealtimeChunkProcessor(options) {
|
|
|
8252
8604
|
// get the new batch UI; pass `false` explicitly to fall back to legacy.
|
|
8253
8605
|
batchApprovalsEnabled = true
|
|
8254
8606
|
} = options;
|
|
8255
|
-
const accumulatorRef =
|
|
8607
|
+
const accumulatorRef = useRef12(
|
|
8256
8608
|
createMessageSegmentAccumulator({
|
|
8257
8609
|
onApprove: callbacks.onApprove,
|
|
8258
8610
|
onReject: callbacks.onReject
|
|
8259
8611
|
})
|
|
8260
8612
|
);
|
|
8261
|
-
const hasInitializedWithData =
|
|
8262
|
-
|
|
8613
|
+
const hasInitializedWithData = useRef12(false);
|
|
8614
|
+
useEffect11(() => {
|
|
8263
8615
|
if (initialState && !hasInitializedWithData.current) {
|
|
8264
8616
|
accumulatorRef.current.initializeWithState(initialState);
|
|
8265
8617
|
if (initialState.escalatedApprovals) {
|
|
@@ -8271,9 +8623,9 @@ function useRealtimeChunkProcessor(options) {
|
|
|
8271
8623
|
hasInitializedWithData.current = true;
|
|
8272
8624
|
}
|
|
8273
8625
|
}, [initialState, callbacks]);
|
|
8274
|
-
const isInStreamRef =
|
|
8275
|
-
const pendingEscalatedRef =
|
|
8276
|
-
const processChunk =
|
|
8626
|
+
const isInStreamRef = useRef12(false);
|
|
8627
|
+
const pendingEscalatedRef = useRef12(/* @__PURE__ */ new Map());
|
|
8628
|
+
const processChunk = useCallback8(
|
|
8277
8629
|
(chunk) => {
|
|
8278
8630
|
if (!enableThinking && chunk && typeof chunk === "object" && chunk.type === MESSAGE_TYPE.THINKING) {
|
|
8279
8631
|
return;
|
|
@@ -8472,21 +8824,21 @@ function useRealtimeChunkProcessor(options) {
|
|
|
8472
8824
|
},
|
|
8473
8825
|
[callbacks, displayApprovalTypes, approvalStatuses, initialState, enableThinking]
|
|
8474
8826
|
);
|
|
8475
|
-
const getSegments =
|
|
8827
|
+
const getSegments = useCallback8(() => {
|
|
8476
8828
|
return accumulatorRef.current.getSegments();
|
|
8477
8829
|
}, []);
|
|
8478
|
-
const reset =
|
|
8830
|
+
const reset = useCallback8(() => {
|
|
8479
8831
|
accumulatorRef.current.reset();
|
|
8480
8832
|
pendingEscalatedRef.current.clear();
|
|
8481
8833
|
hasInitializedWithData.current = false;
|
|
8482
8834
|
}, []);
|
|
8483
|
-
const updateApprovalStatus =
|
|
8835
|
+
const updateApprovalStatus = useCallback8(
|
|
8484
8836
|
(requestId, status) => {
|
|
8485
8837
|
return accumulatorRef.current.updateApprovalStatus(requestId, status);
|
|
8486
8838
|
},
|
|
8487
8839
|
[]
|
|
8488
8840
|
);
|
|
8489
|
-
const getPendingApprovals =
|
|
8841
|
+
const getPendingApprovals = useCallback8(() => {
|
|
8490
8842
|
return new Map(pendingEscalatedRef.current);
|
|
8491
8843
|
}, []);
|
|
8492
8844
|
return {
|
|
@@ -8962,16 +9314,16 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
8962
9314
|
|
|
8963
9315
|
// src/components/navigation/header.tsx
|
|
8964
9316
|
import Link from "next/link";
|
|
8965
|
-
import React24, { useEffect as
|
|
9317
|
+
import React24, { useEffect as useEffect12, useRef as useRef13, useState as useState18 } from "react";
|
|
8966
9318
|
init_button2();
|
|
8967
9319
|
import { Fragment as Fragment6, jsx as jsx47, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
8968
9320
|
function Header({ config, platform }) {
|
|
8969
|
-
const [show, setShow] =
|
|
8970
|
-
const [lastScrollY, setLastScrollY] =
|
|
8971
|
-
const [openDropdowns, setOpenDropdowns] =
|
|
8972
|
-
const dropdownRefs =
|
|
8973
|
-
const triggerRefs =
|
|
8974
|
-
|
|
9321
|
+
const [show, setShow] = useState18(true);
|
|
9322
|
+
const [lastScrollY, setLastScrollY] = useState18(0);
|
|
9323
|
+
const [openDropdowns, setOpenDropdowns] = useState18({});
|
|
9324
|
+
const dropdownRefs = useRef13({});
|
|
9325
|
+
const triggerRefs = useRef13({});
|
|
9326
|
+
useEffect12(() => {
|
|
8975
9327
|
const handleClickOutside = (event) => {
|
|
8976
9328
|
const target = event.target;
|
|
8977
9329
|
if (!target) return;
|
|
@@ -9000,14 +9352,14 @@ function Header({ config, platform }) {
|
|
|
9000
9352
|
document.removeEventListener("keydown", handleEscapeKey);
|
|
9001
9353
|
};
|
|
9002
9354
|
}, [openDropdowns]);
|
|
9003
|
-
|
|
9355
|
+
useEffect12(() => {
|
|
9004
9356
|
return () => {
|
|
9005
9357
|
setOpenDropdowns({});
|
|
9006
9358
|
dropdownRefs.current = {};
|
|
9007
9359
|
triggerRefs.current = {};
|
|
9008
9360
|
};
|
|
9009
9361
|
}, []);
|
|
9010
|
-
|
|
9362
|
+
useEffect12(() => {
|
|
9011
9363
|
if (!config.autoHide) {
|
|
9012
9364
|
setShow(true);
|
|
9013
9365
|
return;
|
|
@@ -9230,7 +9582,7 @@ function Header({ config, platform }) {
|
|
|
9230
9582
|
}
|
|
9231
9583
|
|
|
9232
9584
|
// src/components/navigation/client-only-header.tsx
|
|
9233
|
-
import { useState as
|
|
9585
|
+
import { useState as useState19, useEffect as useEffect13 } from "react";
|
|
9234
9586
|
|
|
9235
9587
|
// src/components/navigation/header-skeleton.tsx
|
|
9236
9588
|
import { jsx as jsx48, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
@@ -9278,8 +9630,8 @@ function HeaderSkeleton({ config }) {
|
|
|
9278
9630
|
// src/components/navigation/client-only-header.tsx
|
|
9279
9631
|
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
9280
9632
|
function ClientOnlyHeader({ config, skeleton }) {
|
|
9281
|
-
const [isClient, setIsClient] =
|
|
9282
|
-
|
|
9633
|
+
const [isClient, setIsClient] = useState19(false);
|
|
9634
|
+
useEffect13(() => {
|
|
9283
9635
|
setIsClient(true);
|
|
9284
9636
|
}, []);
|
|
9285
9637
|
if (!isClient) {
|
|
@@ -9289,13 +9641,13 @@ function ClientOnlyHeader({ config, skeleton }) {
|
|
|
9289
9641
|
}
|
|
9290
9642
|
|
|
9291
9643
|
// src/components/navigation/mobile-nav-panel.tsx
|
|
9292
|
-
import { useEffect as
|
|
9644
|
+
import { useEffect as useEffect14, useRef as useRef14 } from "react";
|
|
9293
9645
|
init_button2();
|
|
9294
9646
|
import { X as X2 } from "lucide-react";
|
|
9295
9647
|
import { Fragment as Fragment7, jsx as jsx50, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
9296
9648
|
function MobileNavPanel({ isOpen, config }) {
|
|
9297
|
-
const panelRef =
|
|
9298
|
-
|
|
9649
|
+
const panelRef = useRef14(null);
|
|
9650
|
+
useEffect14(() => {
|
|
9299
9651
|
if (isOpen) {
|
|
9300
9652
|
document.body.style.overflow = "hidden";
|
|
9301
9653
|
} else {
|
|
@@ -9305,7 +9657,7 @@ function MobileNavPanel({ isOpen, config }) {
|
|
|
9305
9657
|
document.body.style.overflow = "unset";
|
|
9306
9658
|
};
|
|
9307
9659
|
}, [isOpen]);
|
|
9308
|
-
|
|
9660
|
+
useEffect14(() => {
|
|
9309
9661
|
const handleKeyDown = (e) => {
|
|
9310
9662
|
if (e.key === "Escape" && isOpen) {
|
|
9311
9663
|
config.onClose?.();
|
|
@@ -9413,15 +9765,15 @@ function MobileNavPanel({ isOpen, config }) {
|
|
|
9413
9765
|
}
|
|
9414
9766
|
|
|
9415
9767
|
// src/components/navigation/sliding-sidebar.tsx
|
|
9416
|
-
import { useState as
|
|
9768
|
+
import { useState as useState20, useEffect as useEffect15 } from "react";
|
|
9417
9769
|
import { motion, AnimatePresence } from "framer-motion";
|
|
9418
9770
|
init_button2();
|
|
9419
9771
|
import { Fragment as Fragment8, jsx as jsx51, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
9420
9772
|
function SlidingSidebar({ config }) {
|
|
9421
|
-
const [expandedItems, setExpandedItems] =
|
|
9422
|
-
const [mounted, setMounted] =
|
|
9423
|
-
const [headerHeight, setHeaderHeight] =
|
|
9424
|
-
|
|
9773
|
+
const [expandedItems, setExpandedItems] = useState20(/* @__PURE__ */ new Set());
|
|
9774
|
+
const [mounted, setMounted] = useState20(false);
|
|
9775
|
+
const [headerHeight, setHeaderHeight] = useState20(64);
|
|
9776
|
+
useEffect15(() => {
|
|
9425
9777
|
setMounted(true);
|
|
9426
9778
|
const calculateHeaderHeight = () => {
|
|
9427
9779
|
let totalHeight = 0;
|
|
@@ -9632,7 +9984,7 @@ function SlidingSidebar({ config }) {
|
|
|
9632
9984
|
}
|
|
9633
9985
|
|
|
9634
9986
|
// src/components/navigation/sticky-section-nav.tsx
|
|
9635
|
-
import { useEffect as
|
|
9987
|
+
import { useEffect as useEffect16, useState as useState21, useCallback as useCallback9, useRef as useRef15 } from "react";
|
|
9636
9988
|
import { jsx as jsx52, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
9637
9989
|
function StickySectionNav({
|
|
9638
9990
|
sections,
|
|
@@ -9693,10 +10045,10 @@ function StickySectionNav({
|
|
|
9693
10045
|
] });
|
|
9694
10046
|
}
|
|
9695
10047
|
function useSectionNavigation(sections, options) {
|
|
9696
|
-
const [activeSection, setActiveSection] =
|
|
9697
|
-
const isScrollingFromClick =
|
|
10048
|
+
const [activeSection, setActiveSection] = useState21(sections[0]?.id || "");
|
|
10049
|
+
const isScrollingFromClick = useRef15(false);
|
|
9698
10050
|
const { offset: offset2 = 100 } = options || {};
|
|
9699
|
-
const handleSectionClick =
|
|
10051
|
+
const handleSectionClick = useCallback9((sectionId) => {
|
|
9700
10052
|
const targetElement = document.getElementById(sectionId);
|
|
9701
10053
|
if (!targetElement) return;
|
|
9702
10054
|
isScrollingFromClick.current = true;
|
|
@@ -9707,14 +10059,14 @@ function useSectionNavigation(sections, options) {
|
|
|
9707
10059
|
isScrollingFromClick.current = false;
|
|
9708
10060
|
}, 500);
|
|
9709
10061
|
}, [offset2]);
|
|
9710
|
-
|
|
10062
|
+
useEffect16(() => {
|
|
9711
10063
|
sections.forEach((section) => {
|
|
9712
10064
|
if (section.ref.current && !section.ref.current.id) {
|
|
9713
10065
|
section.ref.current.id = section.id;
|
|
9714
10066
|
}
|
|
9715
10067
|
});
|
|
9716
10068
|
}, [sections]);
|
|
9717
|
-
|
|
10069
|
+
useEffect16(() => {
|
|
9718
10070
|
const handleScroll = () => {
|
|
9719
10071
|
if (isScrollingFromClick.current) return;
|
|
9720
10072
|
const scrollPosition = window.scrollY + offset2 + 50;
|
|
@@ -9747,7 +10099,7 @@ function useSectionNavigation(sections, options) {
|
|
|
9747
10099
|
}
|
|
9748
10100
|
|
|
9749
10101
|
// src/components/navigation/navigation-sidebar.tsx
|
|
9750
|
-
import { useCallback as
|
|
10102
|
+
import { useCallback as useCallback10, useLayoutEffect as useLayoutEffect4, useMemo as useMemo10, useState as useState22 } from "react";
|
|
9751
10103
|
|
|
9752
10104
|
// src/components/navigation/navigation-sidebar-header.tsx
|
|
9753
10105
|
import { jsx as jsx53, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
@@ -9897,14 +10249,14 @@ function NavigationSidebar({ config, disabled = false }) {
|
|
|
9897
10249
|
STORAGE_KEY,
|
|
9898
10250
|
!isLgUp || (config.minimized ?? false)
|
|
9899
10251
|
);
|
|
9900
|
-
const [transitionsEnabled, setTransitionsEnabled] =
|
|
10252
|
+
const [transitionsEnabled, setTransitionsEnabled] = useState22(false);
|
|
9901
10253
|
const isMinimized = !isLgUp || minimized;
|
|
9902
10254
|
const showLabel = isLgUp && !minimized;
|
|
9903
|
-
const handleToggle =
|
|
10255
|
+
const handleToggle = useCallback10(() => {
|
|
9904
10256
|
setMinimized((prev) => !prev);
|
|
9905
10257
|
config.onToggleMinimized?.();
|
|
9906
10258
|
}, [setMinimized, config]);
|
|
9907
|
-
const handleItemClick =
|
|
10259
|
+
const handleItemClick = useCallback10((item, event) => {
|
|
9908
10260
|
event?.stopPropagation();
|
|
9909
10261
|
if (item.onClick) {
|
|
9910
10262
|
item.onClick();
|
|
@@ -10427,7 +10779,7 @@ function NotificationsHeaderButton({
|
|
|
10427
10779
|
}
|
|
10428
10780
|
|
|
10429
10781
|
// src/components/navigation/app-layout.tsx
|
|
10430
|
-
import { Suspense, useCallback as
|
|
10782
|
+
import { Suspense, useCallback as useCallback13, useState as useState25 } from "react";
|
|
10431
10783
|
|
|
10432
10784
|
// src/components/features/notifications/notification-drawer.tsx
|
|
10433
10785
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
@@ -10617,7 +10969,7 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
|
10617
10969
|
init_cn();
|
|
10618
10970
|
|
|
10619
10971
|
// src/components/features/notifications/notification-tile.tsx
|
|
10620
|
-
import { useMemo as useMemo12, useEffect as
|
|
10972
|
+
import { useMemo as useMemo12, useEffect as useEffect18 } from "react";
|
|
10621
10973
|
init_button();
|
|
10622
10974
|
init_cn();
|
|
10623
10975
|
import { jsx as jsx64, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
@@ -10631,7 +10983,7 @@ function NotificationTile({
|
|
|
10631
10983
|
const { id, variant = "default", title, description, createdAt, read, settled } = notification;
|
|
10632
10984
|
const initialElapsed = useMemo12(() => Date.now() - createdAt, [createdAt]);
|
|
10633
10985
|
const isLive = !read && !settled && initialElapsed < liveDurationMs;
|
|
10634
|
-
|
|
10986
|
+
useEffect18(() => {
|
|
10635
10987
|
if (!isLive) return;
|
|
10636
10988
|
const remaining = Math.max(0, liveDurationMs - initialElapsed);
|
|
10637
10989
|
const timer = window.setTimeout(() => {
|
|
@@ -10807,7 +11159,7 @@ function NotificationsHistoryButton({ onClick }) {
|
|
|
10807
11159
|
}
|
|
10808
11160
|
|
|
10809
11161
|
// src/components/navigation/mobile-burger-menu.tsx
|
|
10810
|
-
import React33, { useCallback as
|
|
11162
|
+
import React33, { useCallback as useCallback12, useEffect as useEffect19 } from "react";
|
|
10811
11163
|
import { Fragment as Fragment10, jsx as jsx66, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
10812
11164
|
var HEADER_HEIGHT = 48;
|
|
10813
11165
|
var MobileBurgerMenu = React33.memo(function MobileBurgerMenu2({
|
|
@@ -10820,7 +11172,7 @@ var MobileBurgerMenu = React33.memo(function MobileBurgerMenu2({
|
|
|
10820
11172
|
onLogout,
|
|
10821
11173
|
disabled = false
|
|
10822
11174
|
}) {
|
|
10823
|
-
|
|
11175
|
+
useEffect19(() => {
|
|
10824
11176
|
if (isOpen) {
|
|
10825
11177
|
document.body.style.overflow = "hidden";
|
|
10826
11178
|
} else {
|
|
@@ -10830,7 +11182,7 @@ var MobileBurgerMenu = React33.memo(function MobileBurgerMenu2({
|
|
|
10830
11182
|
document.body.style.overflow = "unset";
|
|
10831
11183
|
};
|
|
10832
11184
|
}, [isOpen]);
|
|
10833
|
-
|
|
11185
|
+
useEffect19(() => {
|
|
10834
11186
|
const handleKeyDown = (e) => {
|
|
10835
11187
|
if (e.key === "Escape" && isOpen) {
|
|
10836
11188
|
onClose();
|
|
@@ -10841,7 +11193,7 @@ var MobileBurgerMenu = React33.memo(function MobileBurgerMenu2({
|
|
|
10841
11193
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
10842
11194
|
}
|
|
10843
11195
|
}, [isOpen, onClose]);
|
|
10844
|
-
const handleItemClick =
|
|
11196
|
+
const handleItemClick = useCallback12((item) => {
|
|
10845
11197
|
if (item.onClick) {
|
|
10846
11198
|
item.onClick();
|
|
10847
11199
|
} else if (item.path) {
|
|
@@ -11016,11 +11368,11 @@ function AppLayout({
|
|
|
11016
11368
|
mobileBurgerMenuProps,
|
|
11017
11369
|
disabled = false
|
|
11018
11370
|
}) {
|
|
11019
|
-
const [mobileMenuOpen, setMobileMenuOpen] =
|
|
11020
|
-
const handleToggleMobileMenu =
|
|
11371
|
+
const [mobileMenuOpen, setMobileMenuOpen] = useState25(false);
|
|
11372
|
+
const handleToggleMobileMenu = useCallback13(() => {
|
|
11021
11373
|
setMobileMenuOpen((prev) => !prev);
|
|
11022
11374
|
}, []);
|
|
11023
|
-
const handleCloseMobileMenu =
|
|
11375
|
+
const handleCloseMobileMenu = useCallback13(() => {
|
|
11024
11376
|
setMobileMenuOpen(false);
|
|
11025
11377
|
}, []);
|
|
11026
11378
|
return /* @__PURE__ */ jsxs55("div", { className: cn("flex h-screen bg-ods-bg", className), children: [
|
|
@@ -11390,7 +11742,7 @@ ScriptArguments.displayName = "ScriptArguments";
|
|
|
11390
11742
|
|
|
11391
11743
|
// src/components/announcement-bar.tsx
|
|
11392
11744
|
init_button2();
|
|
11393
|
-
import { useState as
|
|
11745
|
+
import { useState as useState26, useEffect as useEffect20 } from "react";
|
|
11394
11746
|
import Image4 from "next/image";
|
|
11395
11747
|
import { X as X4 } from "lucide-react";
|
|
11396
11748
|
|
|
@@ -11596,8 +11948,8 @@ var getSvgIcon = (name, size = "main", extra = {}) => {
|
|
|
11596
11948
|
return renderSvgIcon(name, { className: cls, ...extra });
|
|
11597
11949
|
};
|
|
11598
11950
|
function AnnouncementBar() {
|
|
11599
|
-
const [announcement, setAnnouncement] =
|
|
11600
|
-
const [isVisible, setIsVisible] =
|
|
11951
|
+
const [announcement, setAnnouncement] = useState26(null);
|
|
11952
|
+
const [isVisible, setIsVisible] = useState26(false);
|
|
11601
11953
|
const platform = getAppType();
|
|
11602
11954
|
const getDismissKey = (id) => `${platform}-announcement-${id}-dismissed`;
|
|
11603
11955
|
const getCacheKey = () => `${platform}-announcement-cache`;
|
|
@@ -11629,7 +11981,7 @@ function AnnouncementBar() {
|
|
|
11629
11981
|
clearStoredAnnouncement(getCacheKey());
|
|
11630
11982
|
}
|
|
11631
11983
|
};
|
|
11632
|
-
|
|
11984
|
+
useEffect20(() => {
|
|
11633
11985
|
const cached = getStoredAnnouncement(getCacheKey());
|
|
11634
11986
|
if (cached) {
|
|
11635
11987
|
const isDismissed = localStorage.getItem(getDismissKey(cached.id));
|
|
@@ -12736,7 +13088,7 @@ function EmptyState2({
|
|
|
12736
13088
|
}
|
|
12737
13089
|
|
|
12738
13090
|
// src/components/faq-accordion.tsx
|
|
12739
|
-
import { useRef as
|
|
13091
|
+
import { useRef as useRef16, useState as useState27, useEffect as useEffect21, useCallback as useCallback14 } from "react";
|
|
12740
13092
|
|
|
12741
13093
|
// src/components/ui/chevron-button.tsx
|
|
12742
13094
|
init_cn();
|
|
@@ -12776,15 +13128,15 @@ ChevronButton.displayName = "ChevronButton";
|
|
|
12776
13128
|
init_cn();
|
|
12777
13129
|
import { jsx as jsx91, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
12778
13130
|
var useMeasuredHeight = (isOpen) => {
|
|
12779
|
-
const ref =
|
|
12780
|
-
const [maxHeight, setMaxHeight] =
|
|
12781
|
-
const measure =
|
|
13131
|
+
const ref = useRef16(null);
|
|
13132
|
+
const [maxHeight, setMaxHeight] = useState27("0px");
|
|
13133
|
+
const measure = useCallback14(() => {
|
|
12782
13134
|
if (ref.current) {
|
|
12783
13135
|
const height = ref.current.scrollHeight;
|
|
12784
13136
|
setMaxHeight(`${height}px`);
|
|
12785
13137
|
}
|
|
12786
13138
|
}, []);
|
|
12787
|
-
|
|
13139
|
+
useEffect21(() => {
|
|
12788
13140
|
if (isOpen) {
|
|
12789
13141
|
measure();
|
|
12790
13142
|
} else {
|
|
@@ -12794,7 +13146,7 @@ var useMeasuredHeight = (isOpen) => {
|
|
|
12794
13146
|
return { ref, maxHeight };
|
|
12795
13147
|
};
|
|
12796
13148
|
function FaqAccordion({ items, defaultOpenIds = [] }) {
|
|
12797
|
-
const [openSet, setOpenSet] =
|
|
13149
|
+
const [openSet, setOpenSet] = useState27(new Set(defaultOpenIds));
|
|
12798
13150
|
const toggle = (id) => {
|
|
12799
13151
|
setOpenSet((prev) => {
|
|
12800
13152
|
const next = new Set(prev);
|
|
@@ -13364,13 +13716,13 @@ init_unified_pagination();
|
|
|
13364
13716
|
|
|
13365
13717
|
// src/components/footer-waitlist-button.tsx
|
|
13366
13718
|
import { usePathname as usePathname2, useRouter as useRouter4 } from "next/navigation";
|
|
13367
|
-
import { useCallback as
|
|
13719
|
+
import { useCallback as useCallback15 } from "react";
|
|
13368
13720
|
init_button2();
|
|
13369
13721
|
import { jsx as jsx97 } from "react/jsx-runtime";
|
|
13370
13722
|
function FooterWaitlistButton({ className }) {
|
|
13371
13723
|
const router = useRouter4();
|
|
13372
13724
|
const pathname = usePathname2();
|
|
13373
|
-
const handleClick =
|
|
13725
|
+
const handleClick = useCallback15(() => {
|
|
13374
13726
|
if (pathname?.startsWith("/waitlist")) {
|
|
13375
13727
|
const anchor = document.getElementById("waitlist-form");
|
|
13376
13728
|
if (anchor) {
|
|
@@ -13397,13 +13749,13 @@ function FooterWaitlistButton({ className }) {
|
|
|
13397
13749
|
|
|
13398
13750
|
// src/components/hero-image-uploader.tsx
|
|
13399
13751
|
init_button2();
|
|
13400
|
-
import { useRef as
|
|
13752
|
+
import { useRef as useRef17, useState as useState28 } from "react";
|
|
13401
13753
|
import { Loader2 as Loader22, Image as ImageIcon, Upload, X as X6 } from "lucide-react";
|
|
13402
13754
|
import { Fragment as Fragment14, jsx as jsx98, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
13403
13755
|
function HeroImageUploader({ imageUrl, onChange, uploadEndpoint, height = 300, objectFit = "cover", showReplaceButton = true, deferUpload = false, onUpload, onDelete }) {
|
|
13404
|
-
const inputRef =
|
|
13756
|
+
const inputRef = useRef17(null);
|
|
13405
13757
|
const { toast } = useToast();
|
|
13406
|
-
const [uploading, setUploading] =
|
|
13758
|
+
const [uploading, setUploading] = useState28(false);
|
|
13407
13759
|
const ALLOWED_TYPES = ["image/jpeg", "image/jpg", "image/png", "image/webp", "image/gif"];
|
|
13408
13760
|
const MAX_SIZE = 5 * 1024 * 1024;
|
|
13409
13761
|
const openDialog = () => inputRef.current?.click();
|
|
@@ -13519,7 +13871,7 @@ function HeroImageUploader({ imageUrl, onChange, uploadEndpoint, height = 300, o
|
|
|
13519
13871
|
}
|
|
13520
13872
|
|
|
13521
13873
|
// src/components/icons-block.tsx
|
|
13522
|
-
import { useState as
|
|
13874
|
+
import { useState as useState29, useEffect as useEffect22, useRef as useRef18 } from "react";
|
|
13523
13875
|
|
|
13524
13876
|
// src/components/icons-stub.tsx
|
|
13525
13877
|
import { DollarSign, Code, Users, Building, GitCompare, MessageSquare } from "lucide-react";
|
|
@@ -13555,11 +13907,11 @@ var availableIcons = [
|
|
|
13555
13907
|
OpenmspLogo2
|
|
13556
13908
|
];
|
|
13557
13909
|
function ResponsiveIconsBlock({ loading = false }) {
|
|
13558
|
-
const [columns, setColumns] =
|
|
13559
|
-
const [iconGrid, setIconGrid] =
|
|
13560
|
-
const [iconsLoaded, setIconsLoaded] =
|
|
13561
|
-
const randomSeedRef =
|
|
13562
|
-
|
|
13910
|
+
const [columns, setColumns] = useState29(24);
|
|
13911
|
+
const [iconGrid, setIconGrid] = useState29([]);
|
|
13912
|
+
const [iconsLoaded, setIconsLoaded] = useState29(false);
|
|
13913
|
+
const randomSeedRef = useRef18(0);
|
|
13914
|
+
useEffect22(() => {
|
|
13563
13915
|
function calculateColumns() {
|
|
13564
13916
|
const cols = Math.ceil(window.innerWidth / 56) + 4;
|
|
13565
13917
|
setColumns(cols);
|
|
@@ -13569,7 +13921,7 @@ function ResponsiveIconsBlock({ loading = false }) {
|
|
|
13569
13921
|
setIconsLoaded(true);
|
|
13570
13922
|
return () => window.removeEventListener("resize", calculateColumns);
|
|
13571
13923
|
}, []);
|
|
13572
|
-
|
|
13924
|
+
useEffect22(() => {
|
|
13573
13925
|
if (randomSeedRef.current === 0) {
|
|
13574
13926
|
randomSeedRef.current = Date.now();
|
|
13575
13927
|
}
|
|
@@ -13674,7 +14026,7 @@ function ResponsiveIconsBlock({ loading = false }) {
|
|
|
13674
14026
|
|
|
13675
14027
|
// src/components/image-cropper.tsx
|
|
13676
14028
|
init_button2();
|
|
13677
|
-
import { useCallback as
|
|
14029
|
+
import { useCallback as useCallback16, useState as useState30 } from "react";
|
|
13678
14030
|
import Cropper from "react-easy-crop";
|
|
13679
14031
|
|
|
13680
14032
|
// src/components/ui/slider.tsx
|
|
@@ -13732,15 +14084,15 @@ var ImageCropper = ({
|
|
|
13732
14084
|
maxSizePx = 512,
|
|
13733
14085
|
className
|
|
13734
14086
|
}) => {
|
|
13735
|
-
const [crop, setCrop] =
|
|
13736
|
-
const [zoom, setZoom] =
|
|
13737
|
-
const [rotation, setRotation] =
|
|
13738
|
-
const [croppedAreaPixels, setCroppedAreaPixels] =
|
|
13739
|
-
const onCropComplete =
|
|
14087
|
+
const [crop, setCrop] = useState30({ x: 0, y: 0 });
|
|
14088
|
+
const [zoom, setZoom] = useState30(1);
|
|
14089
|
+
const [rotation, setRotation] = useState30(0);
|
|
14090
|
+
const [croppedAreaPixels, setCroppedAreaPixels] = useState30(null);
|
|
14091
|
+
const onCropComplete = useCallback16((_, area) => {
|
|
13740
14092
|
setCroppedAreaPixels(area);
|
|
13741
14093
|
}, []);
|
|
13742
14094
|
const checkerBg = "bg-[length:16px_16px] bg-[linear-gradient(45deg,transparent_25%,#2a2a2a_25%,#2a2a2a_75%,transparent_75%,transparent),linear-gradient(45deg,#2a2a2a_25%,transparent_25%,transparent_75%,#2a2a2a_75%,#2a2a2a)]";
|
|
13743
|
-
const exportCrop =
|
|
14095
|
+
const exportCrop = useCallback16(async () => {
|
|
13744
14096
|
if (!croppedAreaPixels) return void 0;
|
|
13745
14097
|
const img = await loadImage(src);
|
|
13746
14098
|
const canvas = document.createElement("canvas");
|
|
@@ -13903,7 +14255,7 @@ var ImageCropper = ({
|
|
|
13903
14255
|
|
|
13904
14256
|
// src/components/media-carousel.tsx
|
|
13905
14257
|
init_cn();
|
|
13906
|
-
import { useState as
|
|
14258
|
+
import { useState as useState31, useRef as useRef20, useEffect as useEffect24, memo as memo3, useCallback as useCallback17 } from "react";
|
|
13907
14259
|
import { Fragment as Fragment15, jsx as jsx102, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
13908
14260
|
var ChevronLeftIcon = () => /* @__PURE__ */ jsx102("svg", { width: "24", height: "24", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx102("polyline", { points: "15,18 9,12 15,6" }) });
|
|
13909
14261
|
var ChevronRightIcon = () => /* @__PURE__ */ jsx102("svg", { width: "24", height: "24", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx102("polyline", { points: "9,18 15,12 9,6" }) });
|
|
@@ -13915,12 +14267,12 @@ var MediaCarousel = memo3(function MediaCarousel2({
|
|
|
13915
14267
|
autoPlay = false,
|
|
13916
14268
|
objectFit = "contain"
|
|
13917
14269
|
}) {
|
|
13918
|
-
const [currentIndex, setCurrentIndex] =
|
|
13919
|
-
const [touchStart, setTouchStart] =
|
|
13920
|
-
const [touchEnd, setTouchEnd] =
|
|
13921
|
-
const carouselRef =
|
|
13922
|
-
const thumbnailsRef =
|
|
13923
|
-
|
|
14270
|
+
const [currentIndex, setCurrentIndex] = useState31(0);
|
|
14271
|
+
const [touchStart, setTouchStart] = useState31(null);
|
|
14272
|
+
const [touchEnd, setTouchEnd] = useState31(null);
|
|
14273
|
+
const carouselRef = useRef20(null);
|
|
14274
|
+
const thumbnailsRef = useRef20(null);
|
|
14275
|
+
useEffect24(() => {
|
|
13924
14276
|
if (currentIndex >= media.length && media.length > 0) {
|
|
13925
14277
|
setCurrentIndex(media.length - 1);
|
|
13926
14278
|
}
|
|
@@ -13932,17 +14284,17 @@ var MediaCarousel = memo3(function MediaCarousel2({
|
|
|
13932
14284
|
if (!currentItem) {
|
|
13933
14285
|
return null;
|
|
13934
14286
|
}
|
|
13935
|
-
const nextSlide =
|
|
14287
|
+
const nextSlide = useCallback17(() => {
|
|
13936
14288
|
setCurrentIndex((prev) => (prev + 1) % media.length);
|
|
13937
14289
|
}, [media.length]);
|
|
13938
|
-
const prevSlide =
|
|
14290
|
+
const prevSlide = useCallback17(() => {
|
|
13939
14291
|
setCurrentIndex((prev) => (prev - 1 + media.length) % media.length);
|
|
13940
14292
|
}, [media.length]);
|
|
13941
|
-
const selectSlide =
|
|
14293
|
+
const selectSlide = useCallback17((index) => {
|
|
13942
14294
|
if (index === currentIndex) return;
|
|
13943
14295
|
setCurrentIndex(index);
|
|
13944
14296
|
}, [currentIndex]);
|
|
13945
|
-
const handleKeyDown =
|
|
14297
|
+
const handleKeyDown = useCallback17((e) => {
|
|
13946
14298
|
if (media.length <= 1) return;
|
|
13947
14299
|
if (e.key === "ArrowLeft") {
|
|
13948
14300
|
e.preventDefault();
|
|
@@ -16299,16 +16651,16 @@ function evaluateFeatureValue(value, dataType) {
|
|
|
16299
16651
|
}
|
|
16300
16652
|
|
|
16301
16653
|
// src/components/made-with-love.tsx
|
|
16302
|
-
import { useState as
|
|
16654
|
+
import { useState as useState32, useEffect as useEffect25 } from "react";
|
|
16303
16655
|
import { jsx as jsx132, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
16304
16656
|
function MadeWithLove({
|
|
16305
16657
|
className = "",
|
|
16306
16658
|
size = "md",
|
|
16307
16659
|
showOnMobile = true
|
|
16308
16660
|
}) {
|
|
16309
|
-
const [isMobile, setIsMobile] =
|
|
16310
|
-
const [isHovered, setIsHovered] =
|
|
16311
|
-
|
|
16661
|
+
const [isMobile, setIsMobile] = useState32(false);
|
|
16662
|
+
const [isHovered, setIsHovered] = useState32(false);
|
|
16663
|
+
useEffect25(() => {
|
|
16312
16664
|
const checkMobile = () => {
|
|
16313
16665
|
setIsMobile(window.innerWidth < 640);
|
|
16314
16666
|
};
|
|
@@ -16556,7 +16908,7 @@ function DateTimePicker({
|
|
|
16556
16908
|
|
|
16557
16909
|
// src/components/shared/onboarding/onboarding-walkthrough.tsx
|
|
16558
16910
|
init_button2();
|
|
16559
|
-
import React45, { useRef as
|
|
16911
|
+
import React45, { useRef as useRef21, useCallback as useCallback18 } from "react";
|
|
16560
16912
|
|
|
16561
16913
|
// src/components/shared/onboarding/onboarding-step-card.tsx
|
|
16562
16914
|
import React44 from "react";
|
|
@@ -16822,10 +17174,10 @@ function OnboardingWalkthrough({
|
|
|
16822
17174
|
allStepsComplete,
|
|
16823
17175
|
markMultipleComplete
|
|
16824
17176
|
} = useOnboardingState(storageKey);
|
|
16825
|
-
const hasAutoMarkedRef =
|
|
16826
|
-
const autoMarkingInProgressRef =
|
|
16827
|
-
const lastCompletionStatusRef =
|
|
16828
|
-
const actionInProgressRef =
|
|
17177
|
+
const hasAutoMarkedRef = useRef21(false);
|
|
17178
|
+
const autoMarkingInProgressRef = useRef21(false);
|
|
17179
|
+
const lastCompletionStatusRef = useRef21(null);
|
|
17180
|
+
const actionInProgressRef = useRef21(/* @__PURE__ */ new Set());
|
|
16829
17181
|
React45.useEffect(() => {
|
|
16830
17182
|
if (isLoadingCompletion) {
|
|
16831
17183
|
hasAutoMarkedRef.current = false;
|
|
@@ -16851,7 +17203,7 @@ function OnboardingWalkthrough({
|
|
|
16851
17203
|
lastCompletionStatusRef.current = statusKey;
|
|
16852
17204
|
}
|
|
16853
17205
|
}, [completionStatus, isLoadingCompletion, state.completedSteps, markMultipleComplete]);
|
|
16854
|
-
const handleStepAction =
|
|
17206
|
+
const handleStepAction = useCallback18(async (step) => {
|
|
16855
17207
|
if (actionInProgressRef.current.has(step.id)) {
|
|
16856
17208
|
console.log(`\u23F3 Action already in progress for "${step.id}", skipping`);
|
|
16857
17209
|
return;
|
|
@@ -17128,7 +17480,7 @@ function ProductReleaseCardSkeleton({ className, size = "default" }) {
|
|
|
17128
17480
|
}
|
|
17129
17481
|
|
|
17130
17482
|
// src/components/shared/product-release/release-detail-page.tsx
|
|
17131
|
-
import { useState as
|
|
17483
|
+
import { useState as useState36, useEffect as useEffect27 } from "react";
|
|
17132
17484
|
import Link4 from "next/link";
|
|
17133
17485
|
|
|
17134
17486
|
// src/components/layout/article-detail-layout.tsx
|
|
@@ -17147,7 +17499,7 @@ function ArticleDetailLayout({ children, schemas }) {
|
|
|
17147
17499
|
}
|
|
17148
17500
|
|
|
17149
17501
|
// src/components/ui/release-changelog-section.tsx
|
|
17150
|
-
import { useState as
|
|
17502
|
+
import { useState as useState33 } from "react";
|
|
17151
17503
|
|
|
17152
17504
|
// src/components/ui/badge.tsx
|
|
17153
17505
|
init_cn();
|
|
@@ -17187,7 +17539,7 @@ function ReleaseChangelogSection({
|
|
|
17187
17539
|
defaultCollapsed = true,
|
|
17188
17540
|
SimpleMarkdownRenderer: SimpleMarkdownRenderer2
|
|
17189
17541
|
}) {
|
|
17190
|
-
const [collapsed, setCollapsed] =
|
|
17542
|
+
const [collapsed, setCollapsed] = useState33(collapsible ? defaultCollapsed : false);
|
|
17191
17543
|
if (!entries || entries.length === 0) return null;
|
|
17192
17544
|
const showEntries = !collapsible || !collapsed;
|
|
17193
17545
|
return /* @__PURE__ */ jsxs113("div", { className: "space-y-4", children: [
|
|
@@ -17222,7 +17574,7 @@ function ReleaseChangelogSection({
|
|
|
17222
17574
|
}
|
|
17223
17575
|
|
|
17224
17576
|
// src/components/ui/image-gallery-modal.tsx
|
|
17225
|
-
import { useState as
|
|
17577
|
+
import { useState as useState34, useEffect as useEffect26 } from "react";
|
|
17226
17578
|
import { ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight7 } from "lucide-react";
|
|
17227
17579
|
import Image8 from "next/image";
|
|
17228
17580
|
import { Fragment as Fragment21, jsx as jsx143, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
@@ -17232,8 +17584,8 @@ function ImageGalleryModal({
|
|
|
17232
17584
|
onClose,
|
|
17233
17585
|
initialIndex = 0
|
|
17234
17586
|
}) {
|
|
17235
|
-
const [selectedImageIndex, setSelectedImageIndex] =
|
|
17236
|
-
|
|
17587
|
+
const [selectedImageIndex, setSelectedImageIndex] = useState34(initialIndex);
|
|
17588
|
+
useEffect26(() => {
|
|
17237
17589
|
if (isOpen) {
|
|
17238
17590
|
setSelectedImageIndex(initialIndex);
|
|
17239
17591
|
}
|
|
@@ -17248,7 +17600,7 @@ function ImageGalleryModal({
|
|
|
17248
17600
|
setSelectedImageIndex(selectedImageIndex + 1);
|
|
17249
17601
|
}
|
|
17250
17602
|
};
|
|
17251
|
-
|
|
17603
|
+
useEffect26(() => {
|
|
17252
17604
|
const handleKeyPress = (event) => {
|
|
17253
17605
|
if (!isOpen) return;
|
|
17254
17606
|
switch (event.key) {
|
|
@@ -17357,7 +17709,7 @@ import React48 from "react";
|
|
|
17357
17709
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
17358
17710
|
import { Check as Check2 } from "lucide-react";
|
|
17359
17711
|
import Link3 from "next/link";
|
|
17360
|
-
import React47, { useCallback as
|
|
17712
|
+
import React47, { useCallback as useCallback19, useState as useState35 } from "react";
|
|
17361
17713
|
init_cn();
|
|
17362
17714
|
init_button2();
|
|
17363
17715
|
import { Fragment as Fragment22, jsx as jsx144, jsxs as jsxs115 } from "react/jsx-runtime";
|
|
@@ -17365,7 +17717,7 @@ var ROW_CLASSES = "flex flex-1 min-w-0 items-center gap-2 px-3 py-3 cursor-point
|
|
|
17365
17717
|
var WRAPPER_CLASSES = "relative flex items-stretch border-b border-ods-border last:border-b-0";
|
|
17366
17718
|
var SECONDARY_ACTION_CLASSES = "flex w-10 shrink-0 items-center justify-center self-stretch border-l border-ods-border transition-colors hover:bg-ods-bg-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-focus";
|
|
17367
17719
|
var SecondaryAction = ({ action }) => {
|
|
17368
|
-
const handleClick =
|
|
17720
|
+
const handleClick = useCallback19(
|
|
17369
17721
|
(e) => {
|
|
17370
17722
|
e.stopPropagation();
|
|
17371
17723
|
if (action.disabled) {
|
|
@@ -17410,7 +17762,7 @@ var SecondaryAction = ({ action }) => {
|
|
|
17410
17762
|
);
|
|
17411
17763
|
};
|
|
17412
17764
|
var MenuItem = ({ item, onItemClick }) => {
|
|
17413
|
-
const activate =
|
|
17765
|
+
const activate = useCallback19(() => {
|
|
17414
17766
|
if (item.disabled) return;
|
|
17415
17767
|
if (item.type === "checkbox") {
|
|
17416
17768
|
item.onClick?.();
|
|
@@ -17421,7 +17773,7 @@ var MenuItem = ({ item, onItemClick }) => {
|
|
|
17421
17773
|
item.onClick?.();
|
|
17422
17774
|
onItemClick?.(item);
|
|
17423
17775
|
}, [item, onItemClick]);
|
|
17424
|
-
const handleClick =
|
|
17776
|
+
const handleClick = useCallback19(
|
|
17425
17777
|
(e) => {
|
|
17426
17778
|
e.stopPropagation();
|
|
17427
17779
|
e.preventDefault();
|
|
@@ -17429,7 +17781,7 @@ var MenuItem = ({ item, onItemClick }) => {
|
|
|
17429
17781
|
},
|
|
17430
17782
|
[activate]
|
|
17431
17783
|
);
|
|
17432
|
-
const handleKeyDown =
|
|
17784
|
+
const handleKeyDown = useCallback19(
|
|
17433
17785
|
(e) => {
|
|
17434
17786
|
if (e.key !== "Enter" && e.key !== " ") return;
|
|
17435
17787
|
e.preventDefault();
|
|
@@ -17438,7 +17790,7 @@ var MenuItem = ({ item, onItemClick }) => {
|
|
|
17438
17790
|
},
|
|
17439
17791
|
[activate]
|
|
17440
17792
|
);
|
|
17441
|
-
const handleLinkClick =
|
|
17793
|
+
const handleLinkClick = useCallback19(
|
|
17442
17794
|
(e) => {
|
|
17443
17795
|
if (item.disabled) {
|
|
17444
17796
|
e.preventDefault();
|
|
@@ -17598,8 +17950,8 @@ var ActionsMenuDropdown = ({
|
|
|
17598
17950
|
side = "bottom",
|
|
17599
17951
|
sideOffset = 6
|
|
17600
17952
|
}) => {
|
|
17601
|
-
const [open, setOpen] =
|
|
17602
|
-
const handleItemClick =
|
|
17953
|
+
const [open, setOpen] = useState35(false);
|
|
17954
|
+
const handleItemClick = useCallback19(
|
|
17603
17955
|
(item) => {
|
|
17604
17956
|
onItemClick?.(item);
|
|
17605
17957
|
if (item.type !== "checkbox" && item.type !== "submenu") {
|
|
@@ -18121,13 +18473,13 @@ function ReleaseDetailPage({
|
|
|
18121
18473
|
}) {
|
|
18122
18474
|
const { data: fetchedRelease, error, isLoading } = useRelease(initialData ? void 0 : slug);
|
|
18123
18475
|
const release = initialData || fetchedRelease;
|
|
18124
|
-
const [galleryOpen, setGalleryOpen] =
|
|
18125
|
-
const [galleryIndex, setGalleryIndex] =
|
|
18126
|
-
const [roadmapTasks, setRoadmapTasks] =
|
|
18127
|
-
const [deliveryData, setDeliveryData] =
|
|
18128
|
-
const [roadmapLoading, setRoadmapLoading] =
|
|
18129
|
-
const [deliveryLoading, setDeliveryLoading] =
|
|
18130
|
-
|
|
18476
|
+
const [galleryOpen, setGalleryOpen] = useState36(false);
|
|
18477
|
+
const [galleryIndex, setGalleryIndex] = useState36(0);
|
|
18478
|
+
const [roadmapTasks, setRoadmapTasks] = useState36([]);
|
|
18479
|
+
const [deliveryData, setDeliveryData] = useState36(null);
|
|
18480
|
+
const [roadmapLoading, setRoadmapLoading] = useState36(false);
|
|
18481
|
+
const [deliveryLoading, setDeliveryLoading] = useState36(false);
|
|
18482
|
+
useEffect27(() => {
|
|
18131
18483
|
async function fetchLinkedTasks() {
|
|
18132
18484
|
if (!release) return;
|
|
18133
18485
|
try {
|
|
@@ -18702,7 +19054,7 @@ function CompactPageLoader({
|
|
|
18702
19054
|
}
|
|
18703
19055
|
|
|
18704
19056
|
// src/components/ui/progress-bar.tsx
|
|
18705
|
-
import { useEffect as
|
|
19057
|
+
import { useEffect as useEffect29, useRef as useRef22, useState as useState38 } from "react";
|
|
18706
19058
|
import { jsx as jsx156 } from "react/jsx-runtime";
|
|
18707
19059
|
var ProgressBar = ({
|
|
18708
19060
|
progress,
|
|
@@ -18718,9 +19070,9 @@ var ProgressBar = ({
|
|
|
18718
19070
|
const isMdUp = useMdUp() ?? true;
|
|
18719
19071
|
const effectiveSegmentWidth = isMdUp ? segmentWidth : mobileSegmentWidth;
|
|
18720
19072
|
const effectiveHeight = isMdUp ? height : mobileHeight;
|
|
18721
|
-
const containerRef =
|
|
18722
|
-
const [segmentCount, setSegmentCount] =
|
|
18723
|
-
|
|
19073
|
+
const containerRef = useRef22(null);
|
|
19074
|
+
const [segmentCount, setSegmentCount] = useState38(0);
|
|
19075
|
+
useEffect29(() => {
|
|
18724
19076
|
if (!containerRef.current) return;
|
|
18725
19077
|
const resizeObserver = new ResizeObserver(() => {
|
|
18726
19078
|
if (containerRef.current) {
|
|
@@ -19544,11 +19896,11 @@ DialogDescription.displayName = DialogPrimitive3.Description.displayName;
|
|
|
19544
19896
|
// src/components/ui/modal.tsx
|
|
19545
19897
|
init_cn();
|
|
19546
19898
|
import * as React58 from "react";
|
|
19547
|
-
import { useEffect as
|
|
19899
|
+
import { useEffect as useEffect30 } from "react";
|
|
19548
19900
|
import { jsx as jsx162, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
19549
19901
|
var Modal = React58.forwardRef(
|
|
19550
19902
|
({ isOpen, onClose, children, className }, ref) => {
|
|
19551
|
-
|
|
19903
|
+
useEffect30(() => {
|
|
19552
19904
|
const handleKeyDown = (event) => {
|
|
19553
19905
|
if (event.key === "Escape") {
|
|
19554
19906
|
onClose();
|
|
@@ -19630,13 +19982,13 @@ ModalFooter.displayName = "ModalFooter";
|
|
|
19630
19982
|
|
|
19631
19983
|
// src/components/ui/modal-v2.tsx
|
|
19632
19984
|
import * as React59 from "react";
|
|
19633
|
-
import { useEffect as
|
|
19985
|
+
import { useEffect as useEffect31 } from "react";
|
|
19634
19986
|
init_cn();
|
|
19635
19987
|
import { jsx as jsx163, jsxs as jsxs132 } from "react/jsx-runtime";
|
|
19636
19988
|
var ModalContext = React59.createContext({});
|
|
19637
19989
|
var Modal2 = React59.forwardRef(
|
|
19638
19990
|
({ isOpen, onClose, children, className }, ref) => {
|
|
19639
|
-
|
|
19991
|
+
useEffect31(() => {
|
|
19640
19992
|
const handleKeyDown = (event) => {
|
|
19641
19993
|
if (event.key === "Escape") {
|
|
19642
19994
|
onClose();
|
|
@@ -20267,7 +20619,7 @@ function TabContent({
|
|
|
20267
20619
|
|
|
20268
20620
|
// src/components/ui/tab-navigation.tsx
|
|
20269
20621
|
init_cn();
|
|
20270
|
-
import { useState as
|
|
20622
|
+
import { useState as useState41, useEffect as useEffect32, useMemo as useMemo14, useRef as useRef24, useCallback as useCallback21 } from "react";
|
|
20271
20623
|
import { useSearchParams as useSearchParams3, useRouter as useRouter5, usePathname as usePathname3 } from "next/navigation";
|
|
20272
20624
|
import { Fragment as Fragment25, jsx as jsx171, jsxs as jsxs139 } from "react/jsx-runtime";
|
|
20273
20625
|
function TabNavigation({
|
|
@@ -20298,9 +20650,9 @@ function TabNavigation({
|
|
|
20298
20650
|
}
|
|
20299
20651
|
return defaultTab || tabs[0]?.id || "";
|
|
20300
20652
|
};
|
|
20301
|
-
const [internalActiveTab, setInternalActiveTab] =
|
|
20653
|
+
const [internalActiveTab, setInternalActiveTab] = useState41(getInitialTab);
|
|
20302
20654
|
const activeTab = isUrlSyncEnabled ? internalActiveTab : controlledActiveTab || "";
|
|
20303
|
-
|
|
20655
|
+
useEffect32(() => {
|
|
20304
20656
|
if (!isUrlSyncEnabled) return;
|
|
20305
20657
|
const fromUrl = searchParams?.get(paramName) || "";
|
|
20306
20658
|
const nextTab = validTabIds.has(fromUrl) ? fromUrl : defaultTab || tabs[0]?.id || "";
|
|
@@ -20320,16 +20672,16 @@ function TabNavigation({
|
|
|
20320
20672
|
controlledOnTabChange?.(tabId);
|
|
20321
20673
|
}
|
|
20322
20674
|
};
|
|
20323
|
-
const scrollRef =
|
|
20324
|
-
const [canScrollLeft, setCanScrollLeft] =
|
|
20325
|
-
const [canScrollRight, setCanScrollRight] =
|
|
20326
|
-
const updateScrollShadows =
|
|
20675
|
+
const scrollRef = useRef24(null);
|
|
20676
|
+
const [canScrollLeft, setCanScrollLeft] = useState41(false);
|
|
20677
|
+
const [canScrollRight, setCanScrollRight] = useState41(false);
|
|
20678
|
+
const updateScrollShadows = useCallback21(() => {
|
|
20327
20679
|
const el = scrollRef.current;
|
|
20328
20680
|
if (!el) return;
|
|
20329
20681
|
setCanScrollLeft(el.scrollLeft > 0);
|
|
20330
20682
|
setCanScrollRight(el.scrollLeft + el.clientWidth < el.scrollWidth - 1);
|
|
20331
20683
|
}, []);
|
|
20332
|
-
|
|
20684
|
+
useEffect32(() => {
|
|
20333
20685
|
const el = scrollRef.current;
|
|
20334
20686
|
if (!el) return;
|
|
20335
20687
|
updateScrollShadows();
|
|
@@ -20518,11 +20870,11 @@ function StatusIndicator({ status, label, href }) {
|
|
|
20518
20870
|
|
|
20519
20871
|
// src/components/layout/list-page-layout.tsx
|
|
20520
20872
|
init_cn();
|
|
20521
|
-
import { useEffect as
|
|
20873
|
+
import { useEffect as useEffect34, useState as useState43 } from "react";
|
|
20522
20874
|
|
|
20523
20875
|
// src/components/ui/filter-modal.tsx
|
|
20524
20876
|
init_cn();
|
|
20525
|
-
import { useEffect as
|
|
20877
|
+
import { useEffect as useEffect33, useState as useState42 } from "react";
|
|
20526
20878
|
init_button2();
|
|
20527
20879
|
|
|
20528
20880
|
// src/components/ui/filter-checkbox-item.tsx
|
|
@@ -20718,11 +21070,11 @@ function FilterModal({
|
|
|
20718
21070
|
emptyStateTitle = "No filters available",
|
|
20719
21071
|
emptyStateDescription = "There are no filter options to display at the moment"
|
|
20720
21072
|
}) {
|
|
20721
|
-
const [selectedFilters, setSelectedFilters] =
|
|
21073
|
+
const [selectedFilters, setSelectedFilters] = useState42(() => {
|
|
20722
21074
|
return { ...currentFilters };
|
|
20723
21075
|
});
|
|
20724
|
-
const [pendingTags, setPendingTags] =
|
|
20725
|
-
|
|
21076
|
+
const [pendingTags, setPendingTags] = useState42(selectedTags ?? []);
|
|
21077
|
+
useEffect33(() => {
|
|
20726
21078
|
if (isOpen) {
|
|
20727
21079
|
setSelectedFilters({ ...currentFilters });
|
|
20728
21080
|
setPendingTags(selectedTags ?? []);
|
|
@@ -20865,13 +21217,13 @@ function ListPageLayout({
|
|
|
20865
21217
|
mobileFilterTitle,
|
|
20866
21218
|
stickyHeader = false
|
|
20867
21219
|
}) {
|
|
20868
|
-
const [mobileFilterOpen, setMobileFilterOpen] =
|
|
20869
|
-
const [localSearchValue, setLocalSearchValue] =
|
|
21220
|
+
const [mobileFilterOpen, setMobileFilterOpen] = useState43(false);
|
|
21221
|
+
const [localSearchValue, setLocalSearchValue] = useState43(searchValue);
|
|
20870
21222
|
const debouncedSearchValue = useDebounce(localSearchValue, 500);
|
|
20871
|
-
|
|
21223
|
+
useEffect34(() => {
|
|
20872
21224
|
setLocalSearchValue(searchValue);
|
|
20873
21225
|
}, [searchValue]);
|
|
20874
|
-
|
|
21226
|
+
useEffect34(() => {
|
|
20875
21227
|
if (debouncedSearchValue !== searchValue) {
|
|
20876
21228
|
onSearch(debouncedSearchValue);
|
|
20877
21229
|
}
|
|
@@ -22409,7 +22761,7 @@ function OrganizationCard({
|
|
|
22409
22761
|
|
|
22410
22762
|
// src/components/ui/service-card.tsx
|
|
22411
22763
|
init_cn();
|
|
22412
|
-
import { useMemo as useMemo17, useState as
|
|
22764
|
+
import { useMemo as useMemo17, useState as useState45 } from "react";
|
|
22413
22765
|
import { ExternalLink as ExternalLink3 } from "lucide-react";
|
|
22414
22766
|
|
|
22415
22767
|
// src/components/logs-list.tsx
|
|
@@ -22713,7 +23065,7 @@ function ServiceCard({ title, subtitle, icon, tag, rows, className }) {
|
|
|
22713
23065
|
] });
|
|
22714
23066
|
}
|
|
22715
23067
|
function ServiceCardRowItem({ row }) {
|
|
22716
|
-
const [revealed, setRevealed] =
|
|
23068
|
+
const [revealed, setRevealed] = useState45(false);
|
|
22717
23069
|
const { copy, copied } = useCopyToClipboard();
|
|
22718
23070
|
const actions = useMemo17(() => ({ copy: true, open: !!row.href, reveal: !!row.isSecret, ...row.actions }), [row]);
|
|
22719
23071
|
const displayValue = row.isSecret ? /* @__PURE__ */ jsx204(MaskedValue, { value: row.value, isRevealed: revealed }) : /* @__PURE__ */ jsx204("span", { children: row.value });
|
|
@@ -23048,7 +23400,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx209(ContentLoader, { ...props, va
|
|
|
23048
23400
|
|
|
23049
23401
|
// src/components/ui/table/table.tsx
|
|
23050
23402
|
init_cn();
|
|
23051
|
-
import { useEffect as
|
|
23403
|
+
import { useEffect as useEffect35, useRef as useRef27 } from "react";
|
|
23052
23404
|
init_pagination();
|
|
23053
23405
|
init_button2();
|
|
23054
23406
|
|
|
@@ -23799,10 +24151,10 @@ function Table({
|
|
|
23799
24151
|
};
|
|
23800
24152
|
const allSelected = selectedRows.length > 0 && selectedRows.length === data.length;
|
|
23801
24153
|
const someSelected = selectedRows.length > 0 && selectedRows.length < data.length;
|
|
23802
|
-
const sentinelRef =
|
|
23803
|
-
const onLoadMoreRef =
|
|
24154
|
+
const sentinelRef = useRef27(null);
|
|
24155
|
+
const onLoadMoreRef = useRef27(infiniteScroll?.onLoadMore);
|
|
23804
24156
|
onLoadMoreRef.current = infiniteScroll?.onLoadMore;
|
|
23805
|
-
|
|
24157
|
+
useEffect35(() => {
|
|
23806
24158
|
if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
|
|
23807
24159
|
const sentinel = sentinelRef.current;
|
|
23808
24160
|
if (!sentinel) return;
|
|
@@ -24014,7 +24366,7 @@ import { useMemo as useMemo18 } from "react";
|
|
|
24014
24366
|
|
|
24015
24367
|
// src/components/ui/query-report-table/query-report-table-header.tsx
|
|
24016
24368
|
init_cn();
|
|
24017
|
-
import { useRef as
|
|
24369
|
+
import { useRef as useRef28, useState as useState46, useCallback as useCallback22 } from "react";
|
|
24018
24370
|
import { jsx as jsx220, jsxs as jsxs178 } from "react/jsx-runtime";
|
|
24019
24371
|
function QueryReportTableHeader({
|
|
24020
24372
|
columns,
|
|
@@ -24043,9 +24395,9 @@ function QueryReportTableHeader({
|
|
|
24043
24395
|
);
|
|
24044
24396
|
}
|
|
24045
24397
|
function TruncatedHeaderCell({ value, width }) {
|
|
24046
|
-
const textRef =
|
|
24047
|
-
const [isTruncated, setIsTruncated] =
|
|
24048
|
-
const checkTruncation =
|
|
24398
|
+
const textRef = useRef28(null);
|
|
24399
|
+
const [isTruncated, setIsTruncated] = useState46(false);
|
|
24400
|
+
const checkTruncation = useCallback22(() => {
|
|
24049
24401
|
const el = textRef.current;
|
|
24050
24402
|
if (el) {
|
|
24051
24403
|
setIsTruncated(el.scrollWidth > el.clientWidth);
|
|
@@ -24073,7 +24425,7 @@ function TruncatedHeaderCell({ value, width }) {
|
|
|
24073
24425
|
|
|
24074
24426
|
// src/components/ui/query-report-table/query-report-table-row.tsx
|
|
24075
24427
|
init_cn();
|
|
24076
|
-
import { useRef as
|
|
24428
|
+
import { useRef as useRef29, useState as useState47, useCallback as useCallback23 } from "react";
|
|
24077
24429
|
import { jsx as jsx221, jsxs as jsxs179 } from "react/jsx-runtime";
|
|
24078
24430
|
function QueryReportTableRow({
|
|
24079
24431
|
row,
|
|
@@ -24119,9 +24471,9 @@ function QueryReportTableRow({
|
|
|
24119
24471
|
);
|
|
24120
24472
|
}
|
|
24121
24473
|
function TruncatedCell({ value, className }) {
|
|
24122
|
-
const textRef =
|
|
24123
|
-
const [isTruncated, setIsTruncated] =
|
|
24124
|
-
const checkTruncation =
|
|
24474
|
+
const textRef = useRef29(null);
|
|
24475
|
+
const [isTruncated, setIsTruncated] = useState47(false);
|
|
24476
|
+
const checkTruncation = useCallback23(() => {
|
|
24125
24477
|
const el = textRef.current;
|
|
24126
24478
|
if (el) {
|
|
24127
24479
|
setIsTruncated(el.scrollWidth > el.clientWidth);
|
|
@@ -24384,7 +24736,7 @@ init_cn();
|
|
|
24384
24736
|
|
|
24385
24737
|
// src/components/ui/data-table/data-table-column-filter.tsx
|
|
24386
24738
|
init_cn();
|
|
24387
|
-
import { useCallback as
|
|
24739
|
+
import { useCallback as useCallback24, useMemo as useMemo19 } from "react";
|
|
24388
24740
|
|
|
24389
24741
|
// src/components/ui/data-table/utils.ts
|
|
24390
24742
|
function getHideClasses2(hideAt) {
|
|
@@ -24444,14 +24796,14 @@ function DataTableColumnFilter({
|
|
|
24444
24796
|
() => ({ [column.id]: currentValue ?? EMPTY_ARRAY }),
|
|
24445
24797
|
[column.id, currentValue]
|
|
24446
24798
|
);
|
|
24447
|
-
const handleApply =
|
|
24799
|
+
const handleApply = useCallback24(
|
|
24448
24800
|
(applied) => {
|
|
24449
24801
|
const next = applied[column.id] ?? [];
|
|
24450
24802
|
column.setFilterValue(next.length > 0 ? next : void 0);
|
|
24451
24803
|
},
|
|
24452
24804
|
[column]
|
|
24453
24805
|
);
|
|
24454
|
-
const handleReset =
|
|
24806
|
+
const handleReset = useCallback24(() => {
|
|
24455
24807
|
column.setFilterValue(void 0);
|
|
24456
24808
|
}, [column]);
|
|
24457
24809
|
return /* @__PURE__ */ jsx225(
|
|
@@ -24638,7 +24990,7 @@ function DataTableEmpty({
|
|
|
24638
24990
|
// src/components/ui/data-table/data-table-row.tsx
|
|
24639
24991
|
init_cn();
|
|
24640
24992
|
import Link10 from "next/link";
|
|
24641
|
-
import { memo as memo4, useCallback as
|
|
24993
|
+
import { memo as memo4, useCallback as useCallback25 } from "react";
|
|
24642
24994
|
import { flexRender as flexRender2 } from "@tanstack/react-table";
|
|
24643
24995
|
|
|
24644
24996
|
// src/components/ui/data-table/data-table-skeleton.tsx
|
|
@@ -24719,7 +25071,7 @@ function DataTableRowImpl({
|
|
|
24719
25071
|
className
|
|
24720
25072
|
}) {
|
|
24721
25073
|
const isLinkMode = Boolean(href) && !onClick;
|
|
24722
|
-
const handleClick =
|
|
25074
|
+
const handleClick = useCallback25(
|
|
24723
25075
|
(e) => {
|
|
24724
25076
|
const target = e.target;
|
|
24725
25077
|
if (target.closest("[data-no-row-click]")) return;
|
|
@@ -24856,7 +25208,7 @@ function DataTableBody({
|
|
|
24856
25208
|
}
|
|
24857
25209
|
|
|
24858
25210
|
// src/components/ui/data-table/data-table-infinite-footer.tsx
|
|
24859
|
-
import { useEffect as
|
|
25211
|
+
import { useEffect as useEffect36, useRef as useRef30 } from "react";
|
|
24860
25212
|
import { Fragment as Fragment37, jsx as jsx231, jsxs as jsxs188 } from "react/jsx-runtime";
|
|
24861
25213
|
function DataTableInfiniteFooter({
|
|
24862
25214
|
hasNextPage,
|
|
@@ -24865,10 +25217,10 @@ function DataTableInfiniteFooter({
|
|
|
24865
25217
|
skeletonRows = 3,
|
|
24866
25218
|
rootMargin = "200px"
|
|
24867
25219
|
}) {
|
|
24868
|
-
const sentinelRef =
|
|
24869
|
-
const onLoadMoreRef =
|
|
25220
|
+
const sentinelRef = useRef30(null);
|
|
25221
|
+
const onLoadMoreRef = useRef30(onLoadMore);
|
|
24870
25222
|
onLoadMoreRef.current = onLoadMore;
|
|
24871
|
-
|
|
25223
|
+
useEffect36(() => {
|
|
24872
25224
|
if (!hasNextPage || isFetchingNextPage) return;
|
|
24873
25225
|
const sentinel = sentinelRef.current;
|
|
24874
25226
|
if (!sentinel) return;
|
|
@@ -24993,7 +25345,7 @@ var DataTable = Object.assign(DataTableRoot, {
|
|
|
24993
25345
|
});
|
|
24994
25346
|
|
|
24995
25347
|
// src/components/ui/phone-input.tsx
|
|
24996
|
-
import { useCallback as
|
|
25348
|
+
import { useCallback as useCallback26, useEffect as useEffect37, useMemo as useMemo20, useRef as useRef31, useState as useState48 } from "react";
|
|
24997
25349
|
import { jsx as jsx233, jsxs as jsxs190 } from "react/jsx-runtime";
|
|
24998
25350
|
function PhoneInput({
|
|
24999
25351
|
value,
|
|
@@ -25010,10 +25362,10 @@ function PhoneInput({
|
|
|
25010
25362
|
() => [...priority, ...others].find((c) => c.code === countryCode),
|
|
25011
25363
|
[countryCode, priority, others]
|
|
25012
25364
|
);
|
|
25013
|
-
const [isInvalid, setIsInvalid] =
|
|
25014
|
-
const debounceRef =
|
|
25015
|
-
const digitCount =
|
|
25016
|
-
const runValidation =
|
|
25365
|
+
const [isInvalid, setIsInvalid] = useState48(false);
|
|
25366
|
+
const debounceRef = useRef31(null);
|
|
25367
|
+
const digitCount = useCallback26((val) => val.replace(/[^0-9]/g, "").length, []);
|
|
25368
|
+
const runValidation = useCallback26((phone) => {
|
|
25017
25369
|
if (!phone || digitCount(phone) === 0) {
|
|
25018
25370
|
setIsInvalid(false);
|
|
25019
25371
|
onValidationChange?.(false);
|
|
@@ -25023,11 +25375,11 @@ function PhoneInput({
|
|
|
25023
25375
|
setIsInvalid(invalid);
|
|
25024
25376
|
onValidationChange?.(invalid);
|
|
25025
25377
|
}, [countryCode, digitCount, onValidationChange]);
|
|
25026
|
-
const debouncedValidation =
|
|
25378
|
+
const debouncedValidation = useCallback26((phone) => {
|
|
25027
25379
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
25028
25380
|
debounceRef.current = setTimeout(() => runValidation(phone), 300);
|
|
25029
25381
|
}, [runValidation]);
|
|
25030
|
-
|
|
25382
|
+
useEffect37(() => {
|
|
25031
25383
|
return () => {
|
|
25032
25384
|
if (debounceRef.current) clearTimeout(debounceRef.current);
|
|
25033
25385
|
};
|
|
@@ -25598,9 +25950,9 @@ function FilterList({
|
|
|
25598
25950
|
|
|
25599
25951
|
// src/components/ui/tag-search-input.tsx
|
|
25600
25952
|
import {
|
|
25601
|
-
useEffect as
|
|
25602
|
-
useRef as
|
|
25603
|
-
useState as
|
|
25953
|
+
useEffect as useEffect39,
|
|
25954
|
+
useRef as useRef33,
|
|
25955
|
+
useState as useState50
|
|
25604
25956
|
} from "react";
|
|
25605
25957
|
init_cn();
|
|
25606
25958
|
import { jsx as jsx236, jsxs as jsxs193 } from "react/jsx-runtime";
|
|
@@ -25634,11 +25986,11 @@ function TagSearchInput({
|
|
|
25634
25986
|
limitTags,
|
|
25635
25987
|
placeholder: currentPlaceholder
|
|
25636
25988
|
});
|
|
25637
|
-
const wrapperRef =
|
|
25638
|
-
const hiddenTagsRef =
|
|
25639
|
-
const hiddenTagsPopupRef =
|
|
25640
|
-
const [showHiddenTags, setShowHiddenTags] =
|
|
25641
|
-
|
|
25989
|
+
const wrapperRef = useRef33(null);
|
|
25990
|
+
const hiddenTagsRef = useRef33(null);
|
|
25991
|
+
const hiddenTagsPopupRef = useRef33(null);
|
|
25992
|
+
const [showHiddenTags, setShowHiddenTags] = useState50(false);
|
|
25993
|
+
useEffect39(() => {
|
|
25642
25994
|
if (!showHiddenTags) return;
|
|
25643
25995
|
const handleClick = (e) => {
|
|
25644
25996
|
const target = e.target;
|
|
@@ -25794,7 +26146,7 @@ function TagSearchInput({
|
|
|
25794
26146
|
|
|
25795
26147
|
// src/components/ui/markdown-editor.tsx
|
|
25796
26148
|
init_cn();
|
|
25797
|
-
import { useRef as
|
|
26149
|
+
import { useRef as useRef34, useCallback as useCallback27, useState as useState51, useEffect as useEffect40 } from "react";
|
|
25798
26150
|
import dynamic from "next/dynamic";
|
|
25799
26151
|
import { Loader2 as Loader23, Upload as Upload2 } from "lucide-react";
|
|
25800
26152
|
import { jsx as jsx237, jsxs as jsxs194 } from "react/jsx-runtime";
|
|
@@ -25825,7 +26177,7 @@ body .w-md-editor .w-md-editor-bar::after { content: '' !important; display: blo
|
|
|
25825
26177
|
body .w-md-editor .w-md-editor-bar:hover::after { border-color: var(--color-text-secondary) !important; }
|
|
25826
26178
|
`;
|
|
25827
26179
|
function MarkdownEditorStyles() {
|
|
25828
|
-
|
|
26180
|
+
useEffect40(() => {
|
|
25829
26181
|
if (document.getElementById(MARKDOWN_EDITOR_STYLE_ID)) return;
|
|
25830
26182
|
const style = document.createElement("style");
|
|
25831
26183
|
style.id = MARKDOWN_EDITOR_STYLE_ID;
|
|
@@ -25849,11 +26201,11 @@ function MarkdownEditor({
|
|
|
25849
26201
|
onFileUploaded,
|
|
25850
26202
|
renderPreview
|
|
25851
26203
|
}) {
|
|
25852
|
-
const fileInputRef =
|
|
25853
|
-
const [isUploading, setIsUploading] =
|
|
25854
|
-
const [uploadProgress, setUploadProgress] =
|
|
25855
|
-
const [defaultExtraCommands, setDefaultExtraCommands] =
|
|
25856
|
-
|
|
26204
|
+
const fileInputRef = useRef34(null);
|
|
26205
|
+
const [isUploading, setIsUploading] = useState51(false);
|
|
26206
|
+
const [uploadProgress, setUploadProgress] = useState51("");
|
|
26207
|
+
const [defaultExtraCommands, setDefaultExtraCommands] = useState51([]);
|
|
26208
|
+
useEffect40(() => {
|
|
25857
26209
|
import("@uiw/react-md-editor").then((mod) => {
|
|
25858
26210
|
if (mod.commands?.getExtraCommands) {
|
|
25859
26211
|
setDefaultExtraCommands(mod.commands.getExtraCommands());
|
|
@@ -25863,7 +26215,7 @@ function MarkdownEditor({
|
|
|
25863
26215
|
const handleChange = (val) => {
|
|
25864
26216
|
onChange(val || "");
|
|
25865
26217
|
};
|
|
25866
|
-
const insertTextAtCursor =
|
|
26218
|
+
const insertTextAtCursor = useCallback27(
|
|
25867
26219
|
(text) => {
|
|
25868
26220
|
const textarea = document.querySelector(
|
|
25869
26221
|
".w-md-editor-text-textarea"
|
|
@@ -25879,7 +26231,7 @@ function MarkdownEditor({
|
|
|
25879
26231
|
},
|
|
25880
26232
|
[value, onChange]
|
|
25881
26233
|
);
|
|
25882
|
-
const handleFileUpload =
|
|
26234
|
+
const handleFileUpload = useCallback27(
|
|
25883
26235
|
async (file) => {
|
|
25884
26236
|
if (!onUploadFile) return;
|
|
25885
26237
|
setIsUploading(true);
|
|
@@ -25900,7 +26252,7 @@ function MarkdownEditor({
|
|
|
25900
26252
|
},
|
|
25901
26253
|
[onUploadFile, insertTextAtCursor, onFileUploaded]
|
|
25902
26254
|
);
|
|
25903
|
-
const handleFileInputChange =
|
|
26255
|
+
const handleFileInputChange = useCallback27(
|
|
25904
26256
|
(e) => {
|
|
25905
26257
|
const file = e.target.files?.[0];
|
|
25906
26258
|
if (file) {
|
|
@@ -25910,7 +26262,7 @@ function MarkdownEditor({
|
|
|
25910
26262
|
},
|
|
25911
26263
|
[handleFileUpload]
|
|
25912
26264
|
);
|
|
25913
|
-
const handlePaste =
|
|
26265
|
+
const handlePaste = useCallback27(
|
|
25914
26266
|
(e) => {
|
|
25915
26267
|
if (!onUploadFile) return;
|
|
25916
26268
|
const items = e.clipboardData?.items;
|
|
@@ -25942,14 +26294,14 @@ function MarkdownEditor({
|
|
|
25942
26294
|
}
|
|
25943
26295
|
} : null;
|
|
25944
26296
|
const extraCommands = uploadCommand ? [...defaultExtraCommands, uploadCommand] : defaultExtraCommands;
|
|
25945
|
-
const wrapperRef =
|
|
25946
|
-
const isDraggingRef =
|
|
25947
|
-
const mouseYRef =
|
|
25948
|
-
const rafRef =
|
|
25949
|
-
const scrollParentRef =
|
|
26297
|
+
const wrapperRef = useRef34(null);
|
|
26298
|
+
const isDraggingRef = useRef34(false);
|
|
26299
|
+
const mouseYRef = useRef34(0);
|
|
26300
|
+
const rafRef = useRef34(0);
|
|
26301
|
+
const scrollParentRef = useRef34(window);
|
|
25950
26302
|
const EDGE_ZONE = 60;
|
|
25951
26303
|
const MAX_SCROLL_SPEED = 15;
|
|
25952
|
-
const findScrollParent =
|
|
26304
|
+
const findScrollParent = useCallback27((el) => {
|
|
25953
26305
|
let node = el?.parentElement;
|
|
25954
26306
|
while (node && node !== document.documentElement) {
|
|
25955
26307
|
const { overflowY } = window.getComputedStyle(node);
|
|
@@ -25960,7 +26312,7 @@ function MarkdownEditor({
|
|
|
25960
26312
|
}
|
|
25961
26313
|
return window;
|
|
25962
26314
|
}, []);
|
|
25963
|
-
const scrollLoop =
|
|
26315
|
+
const scrollLoop = useCallback27(() => {
|
|
25964
26316
|
if (!isDraggingRef.current) return;
|
|
25965
26317
|
const parent = scrollParentRef.current;
|
|
25966
26318
|
const isWindow = parent === window;
|
|
@@ -25976,7 +26328,7 @@ function MarkdownEditor({
|
|
|
25976
26328
|
}
|
|
25977
26329
|
rafRef.current = requestAnimationFrame(scrollLoop);
|
|
25978
26330
|
}, []);
|
|
25979
|
-
|
|
26331
|
+
useEffect40(() => {
|
|
25980
26332
|
const wrapper = wrapperRef.current;
|
|
25981
26333
|
if (!wrapper) return;
|
|
25982
26334
|
const onMouseMove = (e) => {
|
|
@@ -27226,14 +27578,14 @@ function ArrayEntryManager({
|
|
|
27226
27578
|
renderLabel,
|
|
27227
27579
|
isSaving = false
|
|
27228
27580
|
}) {
|
|
27229
|
-
const [draftItems, setDraftItems] =
|
|
27230
|
-
const [isDirty, setIsDirty] =
|
|
27231
|
-
|
|
27581
|
+
const [draftItems, setDraftItems] = useState57(items);
|
|
27582
|
+
const [isDirty, setIsDirty] = useState57(false);
|
|
27583
|
+
useEffect43(() => {
|
|
27232
27584
|
if (!isDirty && !isSaving) {
|
|
27233
27585
|
setDraftItems(items);
|
|
27234
27586
|
}
|
|
27235
27587
|
}, [items, isDirty, isSaving]);
|
|
27236
|
-
|
|
27588
|
+
useEffect43(() => {
|
|
27237
27589
|
if (onDirtyChange) {
|
|
27238
27590
|
onDirtyChange(isDirty);
|
|
27239
27591
|
}
|
|
@@ -27343,7 +27695,7 @@ function ArrayEntryManager({
|
|
|
27343
27695
|
|
|
27344
27696
|
// src/components/features/provider-button.tsx
|
|
27345
27697
|
init_button2();
|
|
27346
|
-
import { useState as
|
|
27698
|
+
import { useState as useState58 } from "react";
|
|
27347
27699
|
import { jsx as jsx247 } from "react/jsx-runtime";
|
|
27348
27700
|
var PROVIDER_CONFIG = {
|
|
27349
27701
|
microsoft: {
|
|
@@ -27364,7 +27716,7 @@ var PROVIDER_CONFIG = {
|
|
|
27364
27716
|
}
|
|
27365
27717
|
};
|
|
27366
27718
|
function ProviderButton({ provider, onClick, disabled = false, loading = false }) {
|
|
27367
|
-
const [internalLoading, setInternalLoading] =
|
|
27719
|
+
const [internalLoading, setInternalLoading] = useState58(false);
|
|
27368
27720
|
const config = PROVIDER_CONFIG[provider];
|
|
27369
27721
|
const IconComponent = config.icon;
|
|
27370
27722
|
const isLoading = loading || internalLoading;
|
|
@@ -27448,7 +27800,7 @@ function AuthProvidersList({
|
|
|
27448
27800
|
|
|
27449
27801
|
// src/components/features/changelog-manager.tsx
|
|
27450
27802
|
import { Trash2 as Trash23, Plus as Plus3, ChevronDown as ChevronDown7, ChevronUp as ChevronUp3, Eye, EyeOff } from "lucide-react";
|
|
27451
|
-
import { useState as
|
|
27803
|
+
import { useState as useState59, useEffect as useEffect44 } from "react";
|
|
27452
27804
|
import { jsx as jsx249, jsxs as jsxs205 } from "react/jsx-runtime";
|
|
27453
27805
|
function ChangelogManager({
|
|
27454
27806
|
title,
|
|
@@ -27458,8 +27810,8 @@ function ChangelogManager({
|
|
|
27458
27810
|
expandAll = false,
|
|
27459
27811
|
showVisibilityToggle = false
|
|
27460
27812
|
}) {
|
|
27461
|
-
const [expandedIndices, setExpandedIndices] =
|
|
27462
|
-
|
|
27813
|
+
const [expandedIndices, setExpandedIndices] = useState59(/* @__PURE__ */ new Set());
|
|
27814
|
+
useEffect44(() => {
|
|
27463
27815
|
if (expandAll && entries.length > 0) {
|
|
27464
27816
|
setExpandedIndices(new Set(entries.map((_, i) => i)));
|
|
27465
27817
|
}
|
|
@@ -27771,7 +28123,7 @@ var ErrorBoundary = class extends Component {
|
|
|
27771
28123
|
|
|
27772
28124
|
// src/components/features/figma-prototype-viewer.tsx
|
|
27773
28125
|
init_cn();
|
|
27774
|
-
import { useState as
|
|
28126
|
+
import { useState as useState60, useRef as useRef37, useEffect as useEffect45, useCallback as useCallback29, useMemo as useMemo24 } from "react";
|
|
27775
28127
|
|
|
27776
28128
|
// src/components/features/section-selector.tsx
|
|
27777
28129
|
init_cn();
|
|
@@ -28140,27 +28492,27 @@ var FigmaPrototypeViewer = ({
|
|
|
28140
28492
|
}) => {
|
|
28141
28493
|
const clientId = process.env.NEXT_PUBLIC_FIGMA_CLIENT_ID || "UTQPwZHR9OZp68TTGPFFi5";
|
|
28142
28494
|
const showDebugPanel = process.env.NEXT_PUBLIC_FIGMA_DEBUG === "true";
|
|
28143
|
-
const iframeRef =
|
|
28144
|
-
const containerRef =
|
|
28145
|
-
const navTimerRef =
|
|
28146
|
-
const touchTimerRef =
|
|
28147
|
-
const [screenWidth, setScreenWidth] =
|
|
28495
|
+
const iframeRef = useRef37(null);
|
|
28496
|
+
const containerRef = useRef37(null);
|
|
28497
|
+
const navTimerRef = useRef37(null);
|
|
28498
|
+
const touchTimerRef = useRef37(null);
|
|
28499
|
+
const [screenWidth, setScreenWidth] = useState60(
|
|
28148
28500
|
typeof window !== "undefined" ? window.innerWidth : DESKTOP_BREAKPOINT
|
|
28149
28501
|
);
|
|
28150
|
-
const [isTouchDevice, setIsTouchDevice] =
|
|
28502
|
+
const [isTouchDevice, setIsTouchDevice] = useState60(() => {
|
|
28151
28503
|
if (typeof window === "undefined") return false;
|
|
28152
28504
|
return "ontouchstart" in window;
|
|
28153
28505
|
});
|
|
28154
|
-
const [iframeState, setIframeState] =
|
|
28155
|
-
const [iframeKey, setIframeKey] =
|
|
28156
|
-
const [isInitialized, setIsInitialized] =
|
|
28157
|
-
const [currentNodeId, setCurrentNodeId] =
|
|
28158
|
-
const [internalActiveSection, setInternalActiveSection] =
|
|
28506
|
+
const [iframeState, setIframeState] = useState60("INITIAL");
|
|
28507
|
+
const [iframeKey, setIframeKey] = useState60(0);
|
|
28508
|
+
const [isInitialized, setIsInitialized] = useState60(false);
|
|
28509
|
+
const [currentNodeId, setCurrentNodeId] = useState60(null);
|
|
28510
|
+
const [internalActiveSection, setInternalActiveSection] = useState60(
|
|
28159
28511
|
config.defaultSectionId || config.sections[0]?.id || ""
|
|
28160
28512
|
);
|
|
28161
28513
|
const activeSection = externalActiveSection || internalActiveSection;
|
|
28162
|
-
const [isNavigating, setIsNavigating] =
|
|
28163
|
-
const [containerDimensions, setContainerDimensions] =
|
|
28514
|
+
const [isNavigating, setIsNavigating] = useState60(false);
|
|
28515
|
+
const [containerDimensions, setContainerDimensions] = useState60({ width: 1200, height: 800 });
|
|
28164
28516
|
const viewMode = useMemo24(
|
|
28165
28517
|
() => getViewMode(screenWidth, isTouchDevice),
|
|
28166
28518
|
[screenWidth, isTouchDevice]
|
|
@@ -28209,7 +28561,7 @@ var FigmaPrototypeViewer = ({
|
|
|
28209
28561
|
embedUrl,
|
|
28210
28562
|
iframeKey
|
|
28211
28563
|
]);
|
|
28212
|
-
|
|
28564
|
+
useEffect45(() => {
|
|
28213
28565
|
const handleResize = () => {
|
|
28214
28566
|
const newWidth = window.innerWidth;
|
|
28215
28567
|
setScreenWidth(newWidth);
|
|
@@ -28222,8 +28574,8 @@ var FigmaPrototypeViewer = ({
|
|
|
28222
28574
|
window.addEventListener("resize", handleResize);
|
|
28223
28575
|
return () => window.removeEventListener("resize", handleResize);
|
|
28224
28576
|
}, []);
|
|
28225
|
-
const [lastViewMode, setLastViewMode] =
|
|
28226
|
-
|
|
28577
|
+
const [lastViewMode, setLastViewMode] = useState60(viewMode);
|
|
28578
|
+
useEffect45(() => {
|
|
28227
28579
|
if (lastViewMode !== viewMode && iframeState === "READY") {
|
|
28228
28580
|
console.log("[ViewMode Change]", lastViewMode, "\u2192", viewMode);
|
|
28229
28581
|
setIframeState("RELOADING");
|
|
@@ -28231,7 +28583,7 @@ var FigmaPrototypeViewer = ({
|
|
|
28231
28583
|
}
|
|
28232
28584
|
setLastViewMode(viewMode);
|
|
28233
28585
|
}, [viewMode, lastViewMode, iframeState]);
|
|
28234
|
-
|
|
28586
|
+
useEffect45(() => {
|
|
28235
28587
|
const handleVisibilityChange = () => {
|
|
28236
28588
|
if (document.visibilityState === "visible" && iframeState === "READY") {
|
|
28237
28589
|
console.log("[Sleep Recovery] Reloading iframe after sleep");
|
|
@@ -28242,7 +28594,7 @@ var FigmaPrototypeViewer = ({
|
|
|
28242
28594
|
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
28243
28595
|
return () => document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
28244
28596
|
}, [iframeState]);
|
|
28245
|
-
|
|
28597
|
+
useEffect45(() => {
|
|
28246
28598
|
const handleMessage = (event) => {
|
|
28247
28599
|
if (event.origin !== "https://www.figma.com") return;
|
|
28248
28600
|
const validEvents = ["INITIAL_LOAD", "NEW_STATE", "PRESENTED_NODE_CHANGED"];
|
|
@@ -28279,7 +28631,7 @@ var FigmaPrototypeViewer = ({
|
|
|
28279
28631
|
window.addEventListener("message", handleMessage);
|
|
28280
28632
|
return () => window.removeEventListener("message", handleMessage);
|
|
28281
28633
|
}, [config.sections, activeSection, isNavigating, externalActiveSection, config.onSectionChange, viewMode]);
|
|
28282
|
-
const navigateToSection =
|
|
28634
|
+
const navigateToSection = useCallback29((sectionId) => {
|
|
28283
28635
|
const section = config.sections.find((s) => s.id === sectionId);
|
|
28284
28636
|
if (!section || !iframeRef.current?.contentWindow || !isInitialized) {
|
|
28285
28637
|
return;
|
|
@@ -28303,7 +28655,7 @@ var FigmaPrototypeViewer = ({
|
|
|
28303
28655
|
if (navTimerRef.current) clearTimeout(navTimerRef.current);
|
|
28304
28656
|
navTimerRef.current = setTimeout(() => setIsNavigating(false), 500);
|
|
28305
28657
|
}, [config, isInitialized, viewMode, externalActiveSection]);
|
|
28306
|
-
const handleSectionClick =
|
|
28658
|
+
const handleSectionClick = useCallback29((sectionId) => {
|
|
28307
28659
|
const sectionsDisabled = iframeState !== "READY" || isNavigating;
|
|
28308
28660
|
if (sectionId === activeSection || sectionsDisabled) {
|
|
28309
28661
|
return;
|
|
@@ -28314,7 +28666,7 @@ var FigmaPrototypeViewer = ({
|
|
|
28314
28666
|
navigateToSection(sectionId);
|
|
28315
28667
|
}
|
|
28316
28668
|
}, [activeSection, iframeState, isNavigating, externalOnSectionClick, navigateToSection]);
|
|
28317
|
-
const handleTouchStart =
|
|
28669
|
+
const handleTouchStart = useCallback29((e) => {
|
|
28318
28670
|
const overlayElement = e.currentTarget;
|
|
28319
28671
|
console.log("[Touch] Touch detected, allowing iframe interaction");
|
|
28320
28672
|
overlayElement.style.pointerEvents = "none";
|
|
@@ -28326,12 +28678,12 @@ var FigmaPrototypeViewer = ({
|
|
|
28326
28678
|
}
|
|
28327
28679
|
}, 500);
|
|
28328
28680
|
}, []);
|
|
28329
|
-
|
|
28681
|
+
useEffect45(() => {
|
|
28330
28682
|
if (externalActiveSection && externalActiveSection !== activeSection && isInitialized) {
|
|
28331
28683
|
navigateToSection(externalActiveSection);
|
|
28332
28684
|
}
|
|
28333
28685
|
}, [externalActiveSection, activeSection, isInitialized, navigateToSection]);
|
|
28334
|
-
|
|
28686
|
+
useEffect45(() => {
|
|
28335
28687
|
return () => {
|
|
28336
28688
|
if (navTimerRef.current) clearTimeout(navTimerRef.current);
|
|
28337
28689
|
if (touchTimerRef.current) clearTimeout(touchTimerRef.current);
|
|
@@ -28434,7 +28786,7 @@ var FigmaPrototypeViewer = ({
|
|
|
28434
28786
|
|
|
28435
28787
|
// src/components/features/filters-dropdown.tsx
|
|
28436
28788
|
init_cn();
|
|
28437
|
-
import { useEffect as
|
|
28789
|
+
import { useEffect as useEffect46, useRef as useRef38, useState as useState61 } from "react";
|
|
28438
28790
|
import { jsx as jsx255, jsxs as jsxs210 } from "react/jsx-runtime";
|
|
28439
28791
|
var FilterCheckbox = ({ checked, disabled = false, className }) => {
|
|
28440
28792
|
return /* @__PURE__ */ jsx255(
|
|
@@ -28466,15 +28818,15 @@ var FiltersDropdown = ({
|
|
|
28466
28818
|
placement = "bottom-start",
|
|
28467
28819
|
responsive = true
|
|
28468
28820
|
}) => {
|
|
28469
|
-
const [isOpen, setIsOpen] =
|
|
28470
|
-
const [shouldRender, setShouldRender] =
|
|
28471
|
-
const [isVisible, setIsVisible] =
|
|
28472
|
-
const [isMobile, setIsMobile] =
|
|
28473
|
-
const [actualPlacement, setActualPlacement] =
|
|
28474
|
-
const dropdownRef =
|
|
28475
|
-
const triggerRef =
|
|
28476
|
-
const containerRef =
|
|
28477
|
-
|
|
28821
|
+
const [isOpen, setIsOpen] = useState61(false);
|
|
28822
|
+
const [shouldRender, setShouldRender] = useState61(false);
|
|
28823
|
+
const [isVisible, setIsVisible] = useState61(false);
|
|
28824
|
+
const [isMobile, setIsMobile] = useState61(false);
|
|
28825
|
+
const [actualPlacement, setActualPlacement] = useState61(placement);
|
|
28826
|
+
const dropdownRef = useRef38(null);
|
|
28827
|
+
const triggerRef = useRef38(null);
|
|
28828
|
+
const containerRef = useRef38(null);
|
|
28829
|
+
useEffect46(() => {
|
|
28478
28830
|
if (isOpen) {
|
|
28479
28831
|
setShouldRender(true);
|
|
28480
28832
|
let id2 = 0;
|
|
@@ -28490,7 +28842,7 @@ var FiltersDropdown = ({
|
|
|
28490
28842
|
const t = setTimeout(() => setShouldRender(false), ANIMATION_MS);
|
|
28491
28843
|
return () => clearTimeout(t);
|
|
28492
28844
|
}, [isOpen]);
|
|
28493
|
-
|
|
28845
|
+
useEffect46(() => {
|
|
28494
28846
|
if (!responsive) {
|
|
28495
28847
|
setIsMobile(false);
|
|
28496
28848
|
return;
|
|
@@ -28502,7 +28854,7 @@ var FiltersDropdown = ({
|
|
|
28502
28854
|
window.addEventListener("resize", checkMobile);
|
|
28503
28855
|
return () => window.removeEventListener("resize", checkMobile);
|
|
28504
28856
|
}, [responsive]);
|
|
28505
|
-
|
|
28857
|
+
useEffect46(() => {
|
|
28506
28858
|
if (!isOpen || isMobile || !triggerRef.current) return;
|
|
28507
28859
|
const calculateOptimalPlacement = () => {
|
|
28508
28860
|
const trigger = triggerRef.current;
|
|
@@ -28528,7 +28880,7 @@ var FiltersDropdown = ({
|
|
|
28528
28880
|
window.addEventListener("resize", calculateOptimalPlacement);
|
|
28529
28881
|
return () => window.removeEventListener("resize", calculateOptimalPlacement);
|
|
28530
28882
|
}, [isOpen, isMobile, placement]);
|
|
28531
|
-
const [selectedFilters, setSelectedFilters] =
|
|
28883
|
+
const [selectedFilters, setSelectedFilters] = useState61(() => {
|
|
28532
28884
|
if (currentFilters) {
|
|
28533
28885
|
return { ...currentFilters };
|
|
28534
28886
|
}
|
|
@@ -28539,12 +28891,12 @@ var FiltersDropdown = ({
|
|
|
28539
28891
|
return initial;
|
|
28540
28892
|
});
|
|
28541
28893
|
const currentFiltersStr = currentFilters ? JSON.stringify(currentFilters) : "";
|
|
28542
|
-
|
|
28894
|
+
useEffect46(() => {
|
|
28543
28895
|
if (currentFilters) {
|
|
28544
28896
|
setSelectedFilters({ ...currentFilters });
|
|
28545
28897
|
}
|
|
28546
28898
|
}, [currentFiltersStr]);
|
|
28547
|
-
|
|
28899
|
+
useEffect46(() => {
|
|
28548
28900
|
const handleClickOutside = (event) => {
|
|
28549
28901
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
28550
28902
|
setIsOpen(false);
|
|
@@ -28561,7 +28913,7 @@ var FiltersDropdown = ({
|
|
|
28561
28913
|
};
|
|
28562
28914
|
}
|
|
28563
28915
|
}, [isOpen, placement]);
|
|
28564
|
-
|
|
28916
|
+
useEffect46(() => {
|
|
28565
28917
|
const handleEscape = (e) => {
|
|
28566
28918
|
if (e.key === "Escape" && isOpen) {
|
|
28567
28919
|
setIsOpen(false);
|
|
@@ -28748,7 +29100,7 @@ var FiltersDropdown = ({
|
|
|
28748
29100
|
] });
|
|
28749
29101
|
};
|
|
28750
29102
|
var useFiltersDropdown = (initialSections) => {
|
|
28751
|
-
const [appliedFilters, setAppliedFilters] =
|
|
29103
|
+
const [appliedFilters, setAppliedFilters] = useState61(() => {
|
|
28752
29104
|
const initial = {};
|
|
28753
29105
|
initialSections.forEach((section) => {
|
|
28754
29106
|
if (section.defaultSelected) {
|
|
@@ -28827,13 +29179,13 @@ function KnowledgeBaseLinksManager({
|
|
|
28827
29179
|
}
|
|
28828
29180
|
|
|
28829
29181
|
// src/components/features/loading-provider.tsx
|
|
28830
|
-
import { createContext as createContext7, useContext as useContext7, useState as
|
|
29182
|
+
import { createContext as createContext7, useContext as useContext7, useState as useState62, useEffect as useEffect47 } from "react";
|
|
28831
29183
|
import { jsx as jsx258, jsxs as jsxs211 } from "react/jsx-runtime";
|
|
28832
29184
|
var LoadingContext = createContext7(void 0);
|
|
28833
29185
|
function LoadingProvider({ children }) {
|
|
28834
|
-
const [isLoading, setIsLoading] =
|
|
28835
|
-
const [progress, setProgress] =
|
|
28836
|
-
|
|
29186
|
+
const [isLoading, setIsLoading] = useState62(false);
|
|
29187
|
+
const [progress, setProgress] = useState62(0);
|
|
29188
|
+
useEffect47(() => {
|
|
28837
29189
|
let interval;
|
|
28838
29190
|
if (isLoading) {
|
|
28839
29191
|
setProgress(10);
|
|
@@ -28878,7 +29230,7 @@ function useLoading() {
|
|
|
28878
29230
|
}
|
|
28879
29231
|
|
|
28880
29232
|
// src/components/features/media-gallery-manager.tsx
|
|
28881
|
-
import { useState as
|
|
29233
|
+
import { useState as useState63, useRef as useRef39, useCallback as useCallback30 } from "react";
|
|
28882
29234
|
import {
|
|
28883
29235
|
Upload as Upload3,
|
|
28884
29236
|
Image as ImageIcon2,
|
|
@@ -28899,10 +29251,10 @@ function MediaGalleryManager({
|
|
|
28899
29251
|
modalTitle = "Media Gallery",
|
|
28900
29252
|
className = ""
|
|
28901
29253
|
}) {
|
|
28902
|
-
const fileInputRef =
|
|
28903
|
-
const [deletingIndex, setDeletingIndex] =
|
|
28904
|
-
const [draggedIndex, setDraggedIndex] =
|
|
28905
|
-
const handleFileSelect =
|
|
29254
|
+
const fileInputRef = useRef39(null);
|
|
29255
|
+
const [deletingIndex, setDeletingIndex] = useState63(null);
|
|
29256
|
+
const [draggedIndex, setDraggedIndex] = useState63(null);
|
|
29257
|
+
const handleFileSelect = useCallback30(async (event) => {
|
|
28906
29258
|
const file = event.target.files?.[0];
|
|
28907
29259
|
if (!file) return;
|
|
28908
29260
|
let mediaType;
|
|
@@ -28928,18 +29280,18 @@ function MediaGalleryManager({
|
|
|
28928
29280
|
console.error("Upload failed:", error);
|
|
28929
29281
|
}
|
|
28930
29282
|
}, [media, onChange, onUpload]);
|
|
28931
|
-
const handleDeleteMedia =
|
|
29283
|
+
const handleDeleteMedia = useCallback30((index) => {
|
|
28932
29284
|
setDeletingIndex(index);
|
|
28933
29285
|
onChange(media.filter((_, i) => i !== index));
|
|
28934
29286
|
setDeletingIndex(null);
|
|
28935
29287
|
}, [media, onChange]);
|
|
28936
|
-
const handleDragStart =
|
|
29288
|
+
const handleDragStart = useCallback30((index) => {
|
|
28937
29289
|
setDraggedIndex(index);
|
|
28938
29290
|
}, []);
|
|
28939
|
-
const handleDragOver =
|
|
29291
|
+
const handleDragOver = useCallback30((e) => {
|
|
28940
29292
|
e.preventDefault();
|
|
28941
29293
|
}, []);
|
|
28942
|
-
const handleDrop =
|
|
29294
|
+
const handleDrop = useCallback30((e, targetIndex) => {
|
|
28943
29295
|
e.preventDefault();
|
|
28944
29296
|
if (draggedIndex === null || draggedIndex === targetIndex) {
|
|
28945
29297
|
setDraggedIndex(null);
|
|
@@ -28951,7 +29303,7 @@ function MediaGalleryManager({
|
|
|
28951
29303
|
onChange(newMedia.map((item, i) => ({ ...item, display_order: i })));
|
|
28952
29304
|
setDraggedIndex(null);
|
|
28953
29305
|
}, [media, draggedIndex, onChange]);
|
|
28954
|
-
const renderMediaItem =
|
|
29306
|
+
const renderMediaItem = useCallback30((mediaItem, index) => {
|
|
28955
29307
|
const isDeleting = deletingIndex === index;
|
|
28956
29308
|
return /* @__PURE__ */ jsxs212(
|
|
28957
29309
|
Card,
|
|
@@ -29111,7 +29463,7 @@ function OSTypeBadgeGroup({
|
|
|
29111
29463
|
}
|
|
29112
29464
|
|
|
29113
29465
|
// src/components/features/parallax-image-showcase.tsx
|
|
29114
|
-
import { useEffect as
|
|
29466
|
+
import { useEffect as useEffect48, useState as useState64, useRef as useRef40 } from "react";
|
|
29115
29467
|
import Image12 from "next/image";
|
|
29116
29468
|
import { motion as motion2, useScroll, useTransform, useMotionValue, useSpring } from "framer-motion";
|
|
29117
29469
|
import { jsx as jsx262, jsxs as jsxs214 } from "react/jsx-runtime";
|
|
@@ -29130,9 +29482,9 @@ var ParallaxImageShowcase = ({
|
|
|
29130
29482
|
const springConfig = { stiffness: 100, damping: 30 };
|
|
29131
29483
|
const mouseXSpring = useSpring(mouseX, springConfig);
|
|
29132
29484
|
const mouseYSpring = useSpring(mouseY, springConfig);
|
|
29133
|
-
const [componentRect, setComponentRect] =
|
|
29134
|
-
const componentRef =
|
|
29135
|
-
|
|
29485
|
+
const [componentRect, setComponentRect] = useState64(null);
|
|
29486
|
+
const componentRef = useRef40(null);
|
|
29487
|
+
useEffect48(() => {
|
|
29136
29488
|
const updateRect = () => {
|
|
29137
29489
|
if (componentRef.current) {
|
|
29138
29490
|
setComponentRect(componentRef.current.getBoundingClientRect());
|
|
@@ -29146,7 +29498,7 @@ var ParallaxImageShowcase = ({
|
|
|
29146
29498
|
window.removeEventListener("scroll", updateRect);
|
|
29147
29499
|
};
|
|
29148
29500
|
}, []);
|
|
29149
|
-
|
|
29501
|
+
useEffect48(() => {
|
|
29150
29502
|
const handleGlobalMouseMove = (e) => {
|
|
29151
29503
|
if (!componentRect) return;
|
|
29152
29504
|
const centerX = componentRect.left + componentRect.width / 2;
|
|
@@ -29790,7 +30142,7 @@ function PushButtonSelector({
|
|
|
29790
30142
|
}
|
|
29791
30143
|
|
|
29792
30144
|
// src/components/features/release-media-manager.tsx
|
|
29793
|
-
import { useState as
|
|
30145
|
+
import { useState as useState65, useRef as useRef41 } from "react";
|
|
29794
30146
|
import { Trash2 as Trash25, Plus as Plus5, Image as ImageIcon3, Video as Video5, Upload as Upload4, Loader2 as Loader28, GripVertical as GripVertical2 } from "lucide-react";
|
|
29795
30147
|
import Image13 from "next/image";
|
|
29796
30148
|
import { jsx as jsx267, jsxs as jsxs219 } from "react/jsx-runtime";
|
|
@@ -29800,8 +30152,8 @@ function ReleaseMediaManager({
|
|
|
29800
30152
|
onUpload,
|
|
29801
30153
|
className = ""
|
|
29802
30154
|
}) {
|
|
29803
|
-
const fileInputRef =
|
|
29804
|
-
const [uploadingIndex, setUploadingIndex] =
|
|
30155
|
+
const fileInputRef = useRef41(null);
|
|
30156
|
+
const [uploadingIndex, setUploadingIndex] = useState65(null);
|
|
29805
30157
|
const handleFileSelect = async (event) => {
|
|
29806
30158
|
const file = event.target.files?.[0];
|
|
29807
30159
|
if (!file) return;
|
|
@@ -30062,7 +30414,7 @@ var SelectButton = React94.forwardRef(
|
|
|
30062
30414
|
SelectButton.displayName = "SelectButton";
|
|
30063
30415
|
|
|
30064
30416
|
// src/components/features/seo-editor-preview.tsx
|
|
30065
|
-
import { useState as
|
|
30417
|
+
import { useState as useState66 } from "react";
|
|
30066
30418
|
import { Globe as Globe3, ExternalLink as ExternalLink5, Upload as Upload5, X as X11, Loader2 as Loader29, Sparkles as Sparkles2 } from "lucide-react";
|
|
30067
30419
|
import Image14 from "next/image";
|
|
30068
30420
|
import { Fragment as Fragment42, jsx as jsx269, jsxs as jsxs221 } from "react/jsx-runtime";
|
|
@@ -30086,9 +30438,9 @@ function SEOEditorPreview({
|
|
|
30086
30438
|
disabled = false,
|
|
30087
30439
|
className = ""
|
|
30088
30440
|
}) {
|
|
30089
|
-
const [imageError, setImageError] =
|
|
30090
|
-
const [isUploading, setIsUploading] =
|
|
30091
|
-
const [fileInputRef, setFileInputRef] =
|
|
30441
|
+
const [imageError, setImageError] = useState66(false);
|
|
30442
|
+
const [isUploading, setIsUploading] = useState66(false);
|
|
30443
|
+
const [fileInputRef, setFileInputRef] = useState66(null);
|
|
30092
30444
|
const displayTitle = seoTitle.trim() || title || "Untitled";
|
|
30093
30445
|
const displayDescription = seoDescription.trim() || summary || "No description";
|
|
30094
30446
|
const hasOgImage = ogImageUrl.trim();
|
|
@@ -30532,7 +30884,7 @@ function StatusFilterComponent({
|
|
|
30532
30884
|
}
|
|
30533
30885
|
|
|
30534
30886
|
// src/components/features/tags-selector.tsx
|
|
30535
|
-
import { useState as
|
|
30887
|
+
import { useState as useState67 } from "react";
|
|
30536
30888
|
import { Search as Search2, X as X12, Plus as Plus6, Loader2 as Loader210 } from "lucide-react";
|
|
30537
30889
|
import { jsx as jsx273, jsxs as jsxs224 } from "react/jsx-runtime";
|
|
30538
30890
|
function TagsSelector({
|
|
@@ -30546,9 +30898,9 @@ function TagsSelector({
|
|
|
30546
30898
|
disabled = false,
|
|
30547
30899
|
allowCreate = true
|
|
30548
30900
|
}) {
|
|
30549
|
-
const [searchQuery, setSearchQuery] =
|
|
30550
|
-
const [showDropdown, setShowDropdown] =
|
|
30551
|
-
const [isCreating, setIsCreating] =
|
|
30901
|
+
const [searchQuery, setSearchQuery] = useState67("");
|
|
30902
|
+
const [showDropdown, setShowDropdown] = useState67(false);
|
|
30903
|
+
const [isCreating, setIsCreating] = useState67(false);
|
|
30552
30904
|
const handleTagAdd = (tagId) => {
|
|
30553
30905
|
if (!selectedTagIds.includes(tagId) && selectedTagIds.length < maxTags) {
|
|
30554
30906
|
onTagsChange([...selectedTagIds, tagId]);
|
|
@@ -30714,7 +31066,7 @@ function TagsSelector({
|
|
|
30714
31066
|
|
|
30715
31067
|
// src/components/features/video-source-selector.tsx
|
|
30716
31068
|
init_button2();
|
|
30717
|
-
import { useState as
|
|
31069
|
+
import { useState as useState68, useCallback as useCallback31 } from "react";
|
|
30718
31070
|
import { Upload as Upload6, Sparkles as Sparkles3, X as X13, Video as Video6 } from "lucide-react";
|
|
30719
31071
|
import { jsx as jsx274, jsxs as jsxs225 } from "react/jsx-runtime";
|
|
30720
31072
|
function VideoSourceSelector({
|
|
@@ -30739,11 +31091,11 @@ function VideoSourceSelector({
|
|
|
30739
31091
|
showTitle = true,
|
|
30740
31092
|
className = ""
|
|
30741
31093
|
}) {
|
|
30742
|
-
const [isUploading, setIsUploading] =
|
|
30743
|
-
const [uploadProgress, setUploadProgress] =
|
|
30744
|
-
const [uploadMessage, setUploadMessage] =
|
|
30745
|
-
const [uploadError, setUploadError] =
|
|
30746
|
-
const handleUploadClick =
|
|
31094
|
+
const [isUploading, setIsUploading] = useState68(false);
|
|
31095
|
+
const [uploadProgress, setUploadProgress] = useState68(0);
|
|
31096
|
+
const [uploadMessage, setUploadMessage] = useState68("");
|
|
31097
|
+
const [uploadError, setUploadError] = useState68(null);
|
|
31098
|
+
const handleUploadClick = useCallback31(() => {
|
|
30747
31099
|
const input = document.createElement("input");
|
|
30748
31100
|
input.type = "file";
|
|
30749
31101
|
input.accept = "video/*";
|
|
@@ -30774,7 +31126,7 @@ function VideoSourceSelector({
|
|
|
30774
31126
|
};
|
|
30775
31127
|
input.click();
|
|
30776
31128
|
}, [onUploadVideo, onMainVideoUrlChange]);
|
|
30777
|
-
const handleDeleteVideo =
|
|
31129
|
+
const handleDeleteVideo = useCallback31(() => {
|
|
30778
31130
|
onMainVideoUrlChange("");
|
|
30779
31131
|
}, [onMainVideoUrlChange]);
|
|
30780
31132
|
return /* @__PURE__ */ jsxs225("div", { className: `space-y-4 p-6 bg-ods-card border border-ods-border rounded-lg ${className}`, children: [
|
|
@@ -31093,7 +31445,7 @@ function TranscriptSummaryEditor({
|
|
|
31093
31445
|
}
|
|
31094
31446
|
|
|
31095
31447
|
// src/components/features/highlight-video-section.tsx
|
|
31096
|
-
import { useState as
|
|
31448
|
+
import { useState as useState69 } from "react";
|
|
31097
31449
|
import { Sparkles as Sparkles5, Upload as Upload7 } from "lucide-react";
|
|
31098
31450
|
init_button2();
|
|
31099
31451
|
|
|
@@ -31392,7 +31744,7 @@ function HighlightVideoSection({
|
|
|
31392
31744
|
disabled = false,
|
|
31393
31745
|
className = ""
|
|
31394
31746
|
}) {
|
|
31395
|
-
const [uploadError, setUploadError] =
|
|
31747
|
+
const [uploadError, setUploadError] = useState69(null);
|
|
31396
31748
|
const handleUploadClick = () => {
|
|
31397
31749
|
const input = document.createElement("input");
|
|
31398
31750
|
input.type = "file";
|
|
@@ -32236,7 +32588,7 @@ function ViewToggle({
|
|
|
32236
32588
|
|
|
32237
32589
|
// src/components/features/policy-configuration-panel.tsx
|
|
32238
32590
|
init_cn();
|
|
32239
|
-
import { useRef as
|
|
32591
|
+
import { useRef as useRef42, useEffect as useEffect49, useState as useState70 } from "react";
|
|
32240
32592
|
import { ChevronDown as ChevronDown8 } from "lucide-react";
|
|
32241
32593
|
init_button2();
|
|
32242
32594
|
|
|
@@ -32417,9 +32769,9 @@ var PolicyRow = ({ policy, categoryId, editMode, onPermissionChange }) => {
|
|
|
32417
32769
|
] });
|
|
32418
32770
|
};
|
|
32419
32771
|
var useAnimatedHeight = (isExpanded) => {
|
|
32420
|
-
const [height, setHeight] =
|
|
32421
|
-
const contentRef =
|
|
32422
|
-
|
|
32772
|
+
const [height, setHeight] = useState70(0);
|
|
32773
|
+
const contentRef = useRef42(null);
|
|
32774
|
+
useEffect49(() => {
|
|
32423
32775
|
if (contentRef.current) {
|
|
32424
32776
|
const contentHeight = contentRef.current.scrollHeight;
|
|
32425
32777
|
setHeight(isExpanded ? contentHeight : 0);
|
|
@@ -32575,7 +32927,7 @@ PolicyConfigurationPanel.displayName = "PolicyConfigurationPanel";
|
|
|
32575
32927
|
init_button2();
|
|
32576
32928
|
init_cn();
|
|
32577
32929
|
import { getCountries as getCountries2 } from "libphonenumber-js";
|
|
32578
|
-
import { useEffect as
|
|
32930
|
+
import { useEffect as useEffect50, useState as useState71 } from "react";
|
|
32579
32931
|
import { Fragment as Fragment44, jsx as jsx294, jsxs as jsxs241 } from "react/jsx-runtime";
|
|
32580
32932
|
function WaitlistForm({
|
|
32581
32933
|
id = "waitlist-form",
|
|
@@ -32595,21 +32947,21 @@ function WaitlistForm({
|
|
|
32595
32947
|
privacyPolicyUrl,
|
|
32596
32948
|
consentText = "I agree to receive recurring automated text messages at the phone number provided. Msg & data rates may apply. Msg frequency varies. Reply HELP for help and STOP to cancel."
|
|
32597
32949
|
}) {
|
|
32598
|
-
const [email, setEmail] =
|
|
32599
|
-
const [phone, setPhone] =
|
|
32600
|
-
const [countryCode, setCountryCode] =
|
|
32950
|
+
const [email, setEmail] = useState71(defaultEmail);
|
|
32951
|
+
const [phone, setPhone] = useState71(defaultPhone);
|
|
32952
|
+
const [countryCode, setCountryCode] = useState71("US");
|
|
32601
32953
|
const { toast } = useToast();
|
|
32602
|
-
const [smsConsent, setSmsConsent] =
|
|
32603
|
-
const [isClient, setIsClient] =
|
|
32604
|
-
const [isPhoneInvalid, setIsPhoneInvalid] =
|
|
32605
|
-
const [showConsentError, setShowConsentError] =
|
|
32954
|
+
const [smsConsent, setSmsConsent] = useState71(false);
|
|
32955
|
+
const [isClient, setIsClient] = useState71(false);
|
|
32956
|
+
const [isPhoneInvalid, setIsPhoneInvalid] = useState71(false);
|
|
32957
|
+
const [showConsentError, setShowConsentError] = useState71(false);
|
|
32606
32958
|
const isMailDomainGeneric = hasGenericEmailDomain(email);
|
|
32607
|
-
|
|
32959
|
+
useEffect50(() => {
|
|
32608
32960
|
if (defaultEmail) {
|
|
32609
32961
|
setEmail(defaultEmail);
|
|
32610
32962
|
}
|
|
32611
32963
|
}, [defaultEmail]);
|
|
32612
|
-
|
|
32964
|
+
useEffect50(() => {
|
|
32613
32965
|
setIsClient(true);
|
|
32614
32966
|
if (!geoApiUrl) return;
|
|
32615
32967
|
const supportedCountries = new Set(getCountries2());
|
|
@@ -32954,7 +33306,7 @@ function TicketCard({
|
|
|
32954
33306
|
] }) : null;
|
|
32955
33307
|
const body = /* @__PURE__ */ jsxs243(Fragment45, { children: [
|
|
32956
33308
|
/* @__PURE__ */ jsxs243("div", { className: "flex items-start gap-[var(--spacing-system-sf)]", children: [
|
|
32957
|
-
/* @__PURE__ */ jsxs243("div", { className: "flex min-w-0 flex-1 flex-col gap-[var(--spacing-system-
|
|
33309
|
+
/* @__PURE__ */ jsxs243("div", { className: "flex min-w-0 flex-1 flex-col gap-[var(--spacing-system-zero)]", children: [
|
|
32958
33310
|
/* @__PURE__ */ jsx296("p", { className: "text-h3 truncate text-ods-text-primary", children: ticket.title }),
|
|
32959
33311
|
showDeviceRow && /* @__PURE__ */ jsxs243("div", { className: "flex min-w-0 items-center gap-[var(--spacing-system-xxs)] text-h6 text-ods-text-secondary", children: [
|
|
32960
33312
|
/* @__PURE__ */ jsx296(LaptopIcon, { className: "size-4 shrink-0" }),
|
|
@@ -32978,8 +33330,9 @@ function TicketCard({
|
|
|
32978
33330
|
...isOverlay ? {} : sortable.attributes,
|
|
32979
33331
|
...isOverlay ? {} : sortable.listeners
|
|
32980
33332
|
};
|
|
33333
|
+
const innerWrapperClass = "relative z-10 flex flex-col gap-[var(--spacing-system-sf)]";
|
|
32981
33334
|
if (isOverlay) {
|
|
32982
|
-
return /* @__PURE__ */ jsx296("div", { ...outerProps, children: /* @__PURE__ */ jsx296("div", { className:
|
|
33335
|
+
return /* @__PURE__ */ jsx296("div", { ...outerProps, children: /* @__PURE__ */ jsx296("div", { className: innerWrapperClass, children: body }) });
|
|
32983
33336
|
}
|
|
32984
33337
|
if (href) {
|
|
32985
33338
|
return /* @__PURE__ */ jsxs243("div", { ...outerProps, children: [
|
|
@@ -32994,7 +33347,7 @@ function TicketCard({
|
|
|
32994
33347
|
className: "absolute inset-0 z-0 rounded-md focus-visible:outline-none"
|
|
32995
33348
|
}
|
|
32996
33349
|
),
|
|
32997
|
-
/* @__PURE__ */ jsx296("div", { className: "pointer-events-none
|
|
33350
|
+
/* @__PURE__ */ jsx296("div", { className: cn("pointer-events-none", innerWrapperClass), children: body })
|
|
32998
33351
|
] });
|
|
32999
33352
|
}
|
|
33000
33353
|
return /* @__PURE__ */ jsxs243("div", { ...outerProps, children: [
|
|
@@ -33007,7 +33360,7 @@ function TicketCard({
|
|
|
33007
33360
|
className: "absolute inset-0 z-0 cursor-pointer rounded-md focus-visible:outline-none"
|
|
33008
33361
|
}
|
|
33009
33362
|
),
|
|
33010
|
-
/* @__PURE__ */ jsx296("div", { className: "pointer-events-none
|
|
33363
|
+
/* @__PURE__ */ jsx296("div", { className: cn("pointer-events-none", innerWrapperClass), children: body })
|
|
33011
33364
|
] });
|
|
33012
33365
|
}
|
|
33013
33366
|
function TicketTagRow({ tags }) {
|
|
@@ -33024,7 +33377,7 @@ import * as React100 from "react";
|
|
|
33024
33377
|
init_cn();
|
|
33025
33378
|
import { jsx as jsx297, jsxs as jsxs244 } from "react/jsx-runtime";
|
|
33026
33379
|
var TicketCardSkeleton = React100.forwardRef(
|
|
33027
|
-
({ className, ...props }, ref) => /* @__PURE__ */
|
|
33380
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsxs244(
|
|
33028
33381
|
"div",
|
|
33029
33382
|
{
|
|
33030
33383
|
ref,
|
|
@@ -33033,13 +33386,25 @@ var TicketCardSkeleton = React100.forwardRef(
|
|
|
33033
33386
|
className
|
|
33034
33387
|
),
|
|
33035
33388
|
...props,
|
|
33036
|
-
children:
|
|
33037
|
-
/* @__PURE__ */ jsxs244("div", { className: "flex
|
|
33038
|
-
/* @__PURE__ */
|
|
33039
|
-
|
|
33389
|
+
children: [
|
|
33390
|
+
/* @__PURE__ */ jsxs244("div", { className: "flex items-start gap-[var(--spacing-system-sf)]", children: [
|
|
33391
|
+
/* @__PURE__ */ jsxs244("div", { className: "flex min-w-0 flex-1 flex-col gap-[var(--spacing-system-xxs)]", children: [
|
|
33392
|
+
/* @__PURE__ */ jsx297("div", { className: "text-h3 flex items-center", children: /* @__PURE__ */ jsx297(Skeleton, { className: "h-4 w-3/4" }) }),
|
|
33393
|
+
/* @__PURE__ */ jsxs244("div", { className: "text-h6 flex items-center gap-[var(--spacing-system-xxs)]", children: [
|
|
33394
|
+
/* @__PURE__ */ jsx297(Skeleton, { className: "size-4 shrink-0 rounded-sm" }),
|
|
33395
|
+
/* @__PURE__ */ jsx297(Skeleton, { className: "h-3 w-1/2" })
|
|
33396
|
+
] })
|
|
33397
|
+
] }),
|
|
33398
|
+
/* @__PURE__ */ jsxs244("div", { className: "flex shrink-0 items-center gap-[var(--spacing-system-xsf)]", children: [
|
|
33399
|
+
/* @__PURE__ */ jsx297(Skeleton, { className: "size-4 rounded-sm" }),
|
|
33400
|
+
/* @__PURE__ */ jsx297(Skeleton, { className: "size-8 rounded-full" })
|
|
33401
|
+
] })
|
|
33040
33402
|
] }),
|
|
33041
|
-
/* @__PURE__ */
|
|
33042
|
-
|
|
33403
|
+
/* @__PURE__ */ jsxs244("div", { className: "flex h-8 items-center gap-[var(--spacing-system-xxs)]", children: [
|
|
33404
|
+
/* @__PURE__ */ jsx297(Skeleton, { className: "h-8 w-16 rounded-md" }),
|
|
33405
|
+
/* @__PURE__ */ jsx297(Skeleton, { className: "h-8 w-12 rounded-md" })
|
|
33406
|
+
] })
|
|
33407
|
+
]
|
|
33043
33408
|
}
|
|
33044
33409
|
)
|
|
33045
33410
|
);
|
|
@@ -33182,22 +33547,22 @@ function EmptyState3() {
|
|
|
33182
33547
|
}
|
|
33183
33548
|
|
|
33184
33549
|
// src/components/features/board/use-board-collapse.ts
|
|
33185
|
-
import { useCallback as
|
|
33550
|
+
import { useCallback as useCallback33, useState as useState72 } from "react";
|
|
33186
33551
|
function useBoardCollapse(storageKey) {
|
|
33187
33552
|
const [persisted, setPersisted] = useLocalStorage(
|
|
33188
33553
|
storageKey ?? "__board_collapse_unused__",
|
|
33189
33554
|
{}
|
|
33190
33555
|
);
|
|
33191
|
-
const [memory, setMemory] =
|
|
33556
|
+
const [memory, setMemory] = useState72({});
|
|
33192
33557
|
const collapsed = storageKey ? persisted : memory;
|
|
33193
33558
|
const setMap = storageKey ? setPersisted : setMemory;
|
|
33194
|
-
const toggle =
|
|
33559
|
+
const toggle = useCallback33(
|
|
33195
33560
|
(columnId) => {
|
|
33196
33561
|
setMap((prev) => ({ ...prev, [columnId]: !prev[columnId] }));
|
|
33197
33562
|
},
|
|
33198
33563
|
[setMap]
|
|
33199
33564
|
);
|
|
33200
|
-
const setCollapsed =
|
|
33565
|
+
const setCollapsed = useCallback33(
|
|
33201
33566
|
(columnId, value) => {
|
|
33202
33567
|
setMap((prev) => ({ ...prev, [columnId]: value }));
|
|
33203
33568
|
},
|
|
@@ -33654,6 +34019,7 @@ export {
|
|
|
33654
34019
|
CONNECTION_STATUS,
|
|
33655
34020
|
NETWORK_CONFIG,
|
|
33656
34021
|
useChunkCatchup,
|
|
34022
|
+
useJetStreamDialogSubscription,
|
|
33657
34023
|
useNatsDialogSubscription,
|
|
33658
34024
|
buildNatsWsUrl,
|
|
33659
34025
|
parseChunkToAction,
|
|
@@ -34119,4 +34485,4 @@ export {
|
|
|
34119
34485
|
TMCG_SOCIAL_PLATFORMS,
|
|
34120
34486
|
assets
|
|
34121
34487
|
};
|
|
34122
|
-
//# sourceMappingURL=chunk-
|
|
34488
|
+
//# sourceMappingURL=chunk-GIQZAYY5.js.map
|