@axiom-lattice/react-sdk 4.1.4 → 4.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/{AgentDetailSideApp-KVL27KAF.mjs → AgentDetailSideApp-EBS7FGQS.mjs} +8 -8
  2. package/dist/AgentGovernanceWorkbench-IHYEFXEU.mjs +20 -0
  3. package/dist/{MessageGraph-LOSAZQ2V.mjs → MessageGraph-CU7TPJJI.mjs} +3 -3
  4. package/dist/{ReactChart-NDLIHCJJ.mjs → ReactChart-INAST7XW.mjs} +3 -3
  5. package/dist/{SkillFlow-OVKEKBOL.mjs → SkillFlow-TBKF765E.mjs} +4 -4
  6. package/dist/{TasksSideApp-37YKH7HV.mjs → TasksSideApp-IN46CQ4D.mjs} +4 -4
  7. package/dist/{TeamWorkspace-EAFZU3KS.mjs → TeamWorkspace-IH6F5QYO.mjs} +3 -3
  8. package/dist/{TopologyRuntimeView-53OCKDYA.mjs → TopologyRuntimeView-LR3YQQIU.mjs} +4 -4
  9. package/dist/{WorkflowAutomationView-R4EHXT7I.mjs → WorkflowAutomationView-GWBROX7L.mjs} +6 -6
  10. package/dist/{chunk-SLXJAOF2.mjs → chunk-4PV75HKR.mjs} +2 -2
  11. package/dist/{chunk-YYP5ASCR.mjs → chunk-EOBSSJ2W.mjs} +5 -5
  12. package/dist/{chunk-LEEQPRDB.mjs → chunk-HMBSH53V.mjs} +102 -33
  13. package/dist/chunk-HMBSH53V.mjs.map +1 -0
  14. package/dist/{chunk-NHD2XFH4.mjs → chunk-K7WBURGK.mjs} +3 -3
  15. package/dist/{chunk-AMIVRDYB.mjs → chunk-MFAPAXZ2.mjs} +2 -2
  16. package/dist/{chunk-WQBBDRPU.mjs → chunk-MSQON5ZR.mjs} +32 -28
  17. package/dist/chunk-MSQON5ZR.mjs.map +1 -0
  18. package/dist/{chunk-OT7IZRSM.mjs → chunk-O7PTPMW2.mjs} +2 -2
  19. package/dist/{chunk-EWLXRAWY.mjs → chunk-PBKPYK27.mjs} +237 -298
  20. package/dist/chunk-PBKPYK27.mjs.map +1 -0
  21. package/dist/{chunk-N4C7TX7T.mjs → chunk-R4XGQTDJ.mjs} +3 -3
  22. package/dist/{chunk-FKK4AXDU.mjs → chunk-YRPBTDOU.mjs} +5 -5
  23. package/dist/{embed-page-AgentDetailSideApp-3LBCEKFU.js → embed-page-AgentDetailSideApp-YPN3NDEA.js} +1 -1
  24. package/dist/{embed-page-AgentGovernanceWorkbench-K3JUQNBW.js → embed-page-AgentGovernanceWorkbench-FAZQNPAM.js} +1 -1
  25. package/dist/{embed-page-MessageGraph-3X4ROEN6.js → embed-page-MessageGraph-CEOPX4GM.js} +1 -1
  26. package/dist/{embed-page-ReactChart-F6VYCIYY.js → embed-page-ReactChart-NZAYQOQH.js} +1 -1
  27. package/dist/{embed-page-SkillFlow-3CF7R3CW.js → embed-page-SkillFlow-TPESM4DI.js} +1 -1
  28. package/dist/{embed-page-TasksSideApp-3WRDBZU3.js → embed-page-TasksSideApp-3EAPMISU.js} +1 -1
  29. package/dist/{embed-page-TeamWorkspace-6JSMZYUF.js → embed-page-TeamWorkspace-HB7ER45L.js} +1 -1
  30. package/dist/{embed-page-TopologyRuntimeView-YDFENLHH.js → embed-page-TopologyRuntimeView-O7JPR22B.js} +1 -1
  31. package/dist/{embed-page-WorkflowAutomationView-MP5B7Q2Q.js → embed-page-WorkflowAutomationView-OUXOBHXC.js} +1 -1
  32. package/dist/{embed-page-chunk-YMJGPA3F.js → embed-page-chunk-4SKSUBXL.js} +93 -102
  33. package/dist/{embed-page-chunk-B2E2XOH2.js → embed-page-chunk-5XKUKLZQ.js} +1 -1
  34. package/dist/{embed-page-chunk-UOL6CUAL.js → embed-page-chunk-6C2UZV63.js} +1 -1
  35. package/dist/{embed-page-chunk-IRP6JSSX.js → embed-page-chunk-GCDGRO6A.js} +1 -1
  36. package/dist/{embed-page-chunk-GDTBDOUE.js → embed-page-chunk-ILNGM4RN.js} +38 -38
  37. package/dist/embed-page-chunk-KFUAWYJ7.js +5 -0
  38. package/dist/{embed-page-chunk-FFO7CAYL.js → embed-page-chunk-RTVQJYET.js} +1 -1
  39. package/dist/{embed-page-chunk-QEYWJHEK.js → embed-page-chunk-TQPMRDLI.js} +1 -1
  40. package/dist/{embed-page-chunk-PAJ5NG2Z.js → embed-page-chunk-U6JBLAYD.js} +1 -1
  41. package/dist/{embed-page-chunk-RVXX5HKF.js → embed-page-chunk-ZTRCHYWV.js} +1 -1
  42. package/dist/embed-page.js +1 -1
  43. package/dist/index.d.mts +31 -6
  44. package/dist/index.d.ts +31 -6
  45. package/dist/index.js +224 -194
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +26 -14
  48. package/dist/index.mjs.map +1 -1
  49. package/package.json +1 -1
  50. package/dist/AgentGovernanceWorkbench-I6S4XU3T.mjs +0 -20
  51. package/dist/chunk-EWLXRAWY.mjs.map +0 -1
  52. package/dist/chunk-LEEQPRDB.mjs.map +0 -1
  53. package/dist/chunk-WQBBDRPU.mjs.map +0 -1
  54. package/dist/embed-page-chunk-URNZX66S.js +0 -5
  55. /package/dist/{AgentDetailSideApp-KVL27KAF.mjs.map → AgentDetailSideApp-EBS7FGQS.mjs.map} +0 -0
  56. /package/dist/{AgentGovernanceWorkbench-I6S4XU3T.mjs.map → AgentGovernanceWorkbench-IHYEFXEU.mjs.map} +0 -0
  57. /package/dist/{MessageGraph-LOSAZQ2V.mjs.map → MessageGraph-CU7TPJJI.mjs.map} +0 -0
  58. /package/dist/{ReactChart-NDLIHCJJ.mjs.map → ReactChart-INAST7XW.mjs.map} +0 -0
  59. /package/dist/{SkillFlow-OVKEKBOL.mjs.map → SkillFlow-TBKF765E.mjs.map} +0 -0
  60. /package/dist/{TasksSideApp-37YKH7HV.mjs.map → TasksSideApp-IN46CQ4D.mjs.map} +0 -0
  61. /package/dist/{TeamWorkspace-EAFZU3KS.mjs.map → TeamWorkspace-IH6F5QYO.mjs.map} +0 -0
  62. /package/dist/{TopologyRuntimeView-53OCKDYA.mjs.map → TopologyRuntimeView-LR3YQQIU.mjs.map} +0 -0
  63. /package/dist/{WorkflowAutomationView-R4EHXT7I.mjs.map → WorkflowAutomationView-GWBROX7L.mjs.map} +0 -0
  64. /package/dist/{chunk-SLXJAOF2.mjs.map → chunk-4PV75HKR.mjs.map} +0 -0
  65. /package/dist/{chunk-YYP5ASCR.mjs.map → chunk-EOBSSJ2W.mjs.map} +0 -0
  66. /package/dist/{chunk-NHD2XFH4.mjs.map → chunk-K7WBURGK.mjs.map} +0 -0
  67. /package/dist/{chunk-AMIVRDYB.mjs.map → chunk-MFAPAXZ2.mjs.map} +0 -0
  68. /package/dist/{chunk-OT7IZRSM.mjs.map → chunk-O7PTPMW2.mjs.map} +0 -0
  69. /package/dist/{chunk-N4C7TX7T.mjs.map → chunk-R4XGQTDJ.mjs.map} +0 -0
  70. /package/dist/{chunk-FKK4AXDU.mjs.map → chunk-YRPBTDOU.mjs.map} +0 -0
package/dist/index.js CHANGED
@@ -84,12 +84,82 @@ var init_AppRegistry = __esm({
84
84
  }
85
85
  });
86
86
 
87
+ // src/utils/authStorage.ts
88
+ function isStandalonePwa() {
89
+ if (typeof window === "undefined") return false;
90
+ try {
91
+ const displayMode = window.matchMedia?.("(display-mode: standalone)")?.matches === true;
92
+ const iosStandalone = window.navigator?.standalone === true;
93
+ return displayMode || iosStandalone;
94
+ } catch {
95
+ return false;
96
+ }
97
+ }
98
+ function authStorage() {
99
+ if (typeof window === "undefined") return sessionStorage;
100
+ return isStandalonePwa() ? window.localStorage : window.sessionStorage;
101
+ }
102
+ function readAuthItem(key) {
103
+ const primary = authStorage();
104
+ const value = primary.getItem(key);
105
+ if (value !== null) return value;
106
+ if (primary !== window.localStorage) return null;
107
+ const legacy = window.sessionStorage.getItem(key);
108
+ if (legacy !== null) {
109
+ window.localStorage.setItem(key, legacy);
110
+ return legacy;
111
+ }
112
+ return null;
113
+ }
114
+ function writeAuthItem(key, value) {
115
+ authStorage().setItem(key, value);
116
+ }
117
+ function removeAuthItem(key) {
118
+ try {
119
+ window.localStorage.removeItem(key);
120
+ } catch {
121
+ }
122
+ try {
123
+ window.sessionStorage.removeItem(key);
124
+ } catch {
125
+ }
126
+ }
127
+ function clearAuthItems() {
128
+ if (typeof window === "undefined") return;
129
+ const keys2 = new Set(AUTH_KEYS);
130
+ for (const storage of [window.localStorage, window.sessionStorage]) {
131
+ try {
132
+ for (let index3 = 0; index3 < storage.length; index3 += 1) {
133
+ const key = storage.key(index3);
134
+ if (key !== null && key.startsWith(PERSONAL_ASSISTANT_PREFIX)) keys2.add(key);
135
+ }
136
+ } catch {
137
+ }
138
+ }
139
+ for (const key of keys2) removeAuthItem(key);
140
+ }
141
+ var AUTH_KEYS, PERSONAL_ASSISTANT_PREFIX;
142
+ var init_authStorage = __esm({
143
+ "src/utils/authStorage.ts"() {
144
+ "use strict";
145
+ AUTH_KEYS = [
146
+ "lattice_token",
147
+ "lattice_user",
148
+ "lattice_tenants",
149
+ "lattice_current_tenant",
150
+ "lattice_personal_assistant"
151
+ ];
152
+ PERSONAL_ASSISTANT_PREFIX = "lattice_personal_assistant_";
153
+ }
154
+ });
155
+
87
156
  // src/context/AuthContext.tsx
88
157
  var import_react, import_jsx_runtime2, AuthContext, useAuth, useAuthOptional, AuthProvider;
89
158
  var init_AuthContext = __esm({
90
159
  "src/context/AuthContext.tsx"() {
91
160
  "use strict";
92
161
  import_react = require("react");
162
+ init_authStorage();
93
163
  import_jsx_runtime2 = require("react/jsx-runtime");
94
164
  AuthContext = (0, import_react.createContext)(null);
95
165
  useAuth = () => {
@@ -120,9 +190,9 @@ var init_AuthContext = __esm({
120
190
  const currentTenantRef = (0, import_react.useRef)(currentTenant);
121
191
  currentTenantRef.current = currentTenant;
122
192
  (0, import_react.useEffect)(() => {
123
- const storedUser = sessionStorage.getItem("lattice_user");
124
- const storedTenants = sessionStorage.getItem("lattice_tenants");
125
- const storedCurrentTenant = sessionStorage.getItem("lattice_current_tenant");
193
+ const storedUser = readAuthItem("lattice_user");
194
+ const storedTenants = readAuthItem("lattice_tenants");
195
+ const storedCurrentTenant = readAuthItem("lattice_current_tenant");
126
196
  if (storedUser) {
127
197
  try {
128
198
  const userData = JSON.parse(storedUser);
@@ -131,14 +201,14 @@ var init_AuthContext = __esm({
131
201
  if (storedCurrentTenant) {
132
202
  const ct = JSON.parse(storedCurrentTenant);
133
203
  setCurrentTenant(ct);
134
- const storedPA = sessionStorage.getItem(getPAKey(ct.id));
204
+ const storedPA = readAuthItem(getPAKey(ct.id));
135
205
  if (storedPA) setPersonalAssistant(JSON.parse(storedPA));
136
206
  }
137
207
  } catch {
138
- sessionStorage.removeItem("lattice_user");
139
- sessionStorage.removeItem("lattice_tenants");
140
- sessionStorage.removeItem("lattice_current_tenant");
141
- sessionStorage.removeItem("lattice_personal_assistant");
208
+ removeAuthItem("lattice_user");
209
+ removeAuthItem("lattice_tenants");
210
+ removeAuthItem("lattice_current_tenant");
211
+ removeAuthItem("lattice_personal_assistant");
142
212
  }
143
213
  }
144
214
  }, []);
@@ -164,10 +234,10 @@ var init_AuthContext = __esm({
164
234
  const { user: userData, tenants: tenantList, token, requiresTenantSelection, hasTenants } = result.data;
165
235
  setUser(userData);
166
236
  setTenants(tenantList || []);
167
- sessionStorage.setItem("lattice_user", JSON.stringify(userData));
168
- sessionStorage.setItem("lattice_tenants", JSON.stringify(tenantList || []));
237
+ writeAuthItem("lattice_user", JSON.stringify(userData));
238
+ writeAuthItem("lattice_tenants", JSON.stringify(tenantList || []));
169
239
  if (token) {
170
- sessionStorage.setItem("lattice_token", token);
240
+ writeAuthItem("lattice_token", token);
171
241
  }
172
242
  onLoginSuccess?.(userData, tenantList || []);
173
243
  return { requiresTenantSelection, hasTenants };
@@ -193,7 +263,7 @@ var init_AuthContext = __esm({
193
263
  throw new Error(data.error || "Registration failed");
194
264
  }
195
265
  if (data.data?.token) {
196
- sessionStorage.setItem("lattice_token", data.data.token);
266
+ writeAuthItem("lattice_token", data.data.token);
197
267
  }
198
268
  return { message: data.message || "Registration successful!", token: data.data?.token };
199
269
  } catch (err) {
@@ -209,7 +279,7 @@ var init_AuthContext = __esm({
209
279
  setTenants([]);
210
280
  setCurrentTenant(null);
211
281
  setPersonalAssistant(null);
212
- sessionStorage.clear();
282
+ clearAuthItems();
213
283
  onLogout?.();
214
284
  }, [onLogout]);
215
285
  (0, import_react.useEffect)(() => {
@@ -228,8 +298,8 @@ var init_AuthContext = __esm({
228
298
  method: "POST",
229
299
  headers: {
230
300
  "Content-Type": "application/json",
231
- ...sessionStorage.getItem("lattice_token") && {
232
- Authorization: `Bearer ${sessionStorage.getItem("lattice_token")}`
301
+ ...readAuthItem("lattice_token") && {
302
+ Authorization: `Bearer ${readAuthItem("lattice_token")}`
233
303
  }
234
304
  },
235
305
  body: JSON.stringify({ tenantId })
@@ -248,19 +318,19 @@ var init_AuthContext = __esm({
248
318
  const tenantData = result.data.tenant;
249
319
  const oldTenantId = currentTenantRef.current?.id;
250
320
  if (oldTenantId) {
251
- sessionStorage.removeItem(getPAKey(oldTenantId));
321
+ removeAuthItem(getPAKey(oldTenantId));
252
322
  }
253
323
  setCurrentTenant(tenantData);
254
- sessionStorage.setItem("lattice_current_tenant", JSON.stringify(tenantData));
324
+ writeAuthItem("lattice_current_tenant", JSON.stringify(tenantData));
255
325
  setPersonalAssistant(result.data.personalAssistant || null);
256
326
  if (result.data.personalAssistant) {
257
327
  const paWithTenant = { ...result.data.personalAssistant, tenantId: tenantData.id };
258
- sessionStorage.setItem(getPAKey(tenantData.id), JSON.stringify(paWithTenant));
328
+ writeAuthItem(getPAKey(tenantData.id), JSON.stringify(paWithTenant));
259
329
  } else {
260
- sessionStorage.removeItem(getPAKey(tenantData.id));
330
+ removeAuthItem(getPAKey(tenantData.id));
261
331
  }
262
332
  if (result.data.token) {
263
- sessionStorage.setItem("lattice_token", result.data.token);
333
+ writeAuthItem("lattice_token", result.data.token);
264
334
  }
265
335
  onTenantSelected?.(tenantData);
266
336
  } catch (err) {
@@ -277,8 +347,8 @@ var init_AuthContext = __esm({
277
347
  try {
278
348
  const response = await fetch(`${baseURL}/api/auth/tenants`, {
279
349
  headers: {
280
- ...sessionStorage.getItem("lattice_token") && {
281
- Authorization: `Bearer ${sessionStorage.getItem("lattice_token")}`
350
+ ...readAuthItem("lattice_token") && {
351
+ Authorization: `Bearer ${readAuthItem("lattice_token")}`
282
352
  }
283
353
  }
284
354
  });
@@ -299,7 +369,7 @@ var init_AuthContext = __esm({
299
369
  tenant: item.tenant
300
370
  }));
301
371
  setTenants(tenantList);
302
- sessionStorage.setItem("lattice_tenants", JSON.stringify(tenantList));
372
+ writeAuthItem("lattice_tenants", JSON.stringify(tenantList));
303
373
  } catch (err) {
304
374
  const message48 = err instanceof Error ? err.message : "Failed to fetch tenants";
305
375
  setError(message48);
@@ -313,8 +383,8 @@ var init_AuthContext = __esm({
313
383
  try {
314
384
  const response = await fetch(`${baseURL}/api/users/${user.id}`, {
315
385
  headers: {
316
- ...sessionStorage.getItem("lattice_token") && {
317
- Authorization: `Bearer ${sessionStorage.getItem("lattice_token")}`
386
+ ...readAuthItem("lattice_token") && {
387
+ Authorization: `Bearer ${readAuthItem("lattice_token")}`
318
388
  }
319
389
  }
320
390
  });
@@ -330,7 +400,7 @@ var init_AuthContext = __esm({
330
400
  }
331
401
  const { data } = await response.json();
332
402
  setUser(data);
333
- sessionStorage.setItem("lattice_user", JSON.stringify(data));
403
+ writeAuthItem("lattice_user", JSON.stringify(data));
334
404
  } catch (err) {
335
405
  const message48 = err instanceof Error ? err.message : "Failed to refresh user";
336
406
  setError(message48);
@@ -349,8 +419,8 @@ var init_AuthContext = __esm({
349
419
  method: "POST",
350
420
  headers: {
351
421
  "Content-Type": "application/json",
352
- ...sessionStorage.getItem("lattice_token") && {
353
- Authorization: `Bearer ${sessionStorage.getItem("lattice_token")}`
422
+ ...readAuthItem("lattice_token") && {
423
+ Authorization: `Bearer ${readAuthItem("lattice_token")}`
354
424
  }
355
425
  },
356
426
  body: JSON.stringify({ currentPassword, newPassword })
@@ -381,12 +451,12 @@ var init_AuthContext = __esm({
381
451
  const tenantId = currentTenantRef.current?.id;
382
452
  if (info) {
383
453
  const paWithTenant = { ...info, tenantId: tenantId || info.tenantId };
384
- sessionStorage.setItem(getPAKey(tenantId), JSON.stringify(paWithTenant));
454
+ writeAuthItem(getPAKey(tenantId), JSON.stringify(paWithTenant));
385
455
  } else {
386
456
  if (tenantId) {
387
- sessionStorage.removeItem(getPAKey(tenantId));
457
+ removeAuthItem(getPAKey(tenantId));
388
458
  }
389
- sessionStorage.removeItem("lattice_personal_assistant");
459
+ removeAuthItem("lattice_personal_assistant");
390
460
  }
391
461
  }, []);
392
462
  const value = {
@@ -424,7 +494,7 @@ function AxiomLatticeProvider({
424
494
  const tenantId = authContext?.currentTenant?.id;
425
495
  const effectiveApiKey = (0, import_react2.useMemo)(() => {
426
496
  if (authContext?.isAuthenticated) {
427
- return sessionStorage.getItem("lattice_token") || config.apiKey;
497
+ return readAuthItem("lattice_token") || config.apiKey;
428
498
  }
429
499
  return config.apiKey;
430
500
  }, [authContext?.isAuthenticated, authContext?.currentTenant?.id, config.apiKey]);
@@ -513,6 +583,7 @@ var init_context = __esm({
513
583
  import_react2 = require("react");
514
584
  import_client_sdk = require("@axiom-lattice/client-sdk");
515
585
  init_AuthContext();
586
+ init_authStorage();
516
587
  import_jsx_runtime3 = require("react/jsx-runtime");
517
588
  AxiomLatticeContext = (0, import_react2.createContext)({
518
589
  getClient: () => {
@@ -2685,7 +2756,7 @@ var init_useTenantBranding = __esm({
2685
2756
  });
2686
2757
 
2687
2758
  // src/components/Auth/TenantSelector.tsx
2688
- var import_react9, import_antd4, import_antd_style2, import_lucide_react5, import_jsx_runtime9, useToken, GRID_COLUMNS, STATUS_OPTIONS, getStatusConfig, useStyles, TenantSelector;
2759
+ var import_react9, import_antd4, import_antd_style2, import_lucide_react5, import_jsx_runtime9, useToken, TWO_COLUMN_THRESHOLD, useStyles, TenantSelector;
2689
2760
  var init_TenantSelector = __esm({
2690
2761
  "src/components/Auth/TenantSelector.tsx"() {
2691
2762
  "use strict";
@@ -2698,25 +2769,7 @@ var init_TenantSelector = __esm({
2698
2769
  init_useTenantBranding();
2699
2770
  import_jsx_runtime9 = require("react/jsx-runtime");
2700
2771
  ({ useToken } = import_antd4.theme);
2701
- GRID_COLUMNS = 2;
2702
- STATUS_OPTIONS = [
2703
- { value: "active", label: "Active" },
2704
- { value: "inactive", label: "Inactive" },
2705
- { value: "suspended", label: "Suspended" },
2706
- { value: "all", label: "All tenants" }
2707
- ];
2708
- getStatusConfig = (status, token) => {
2709
- switch (status) {
2710
- case "active":
2711
- return { color: token.colorSuccess, text: "Active" };
2712
- case "inactive":
2713
- return { color: token.colorTextTertiary, text: "Inactive" };
2714
- case "suspended":
2715
- return { color: token.colorError, text: "Suspended" };
2716
- default:
2717
- return { color: token.colorTextTertiary, text: status };
2718
- }
2719
- };
2772
+ TWO_COLUMN_THRESHOLD = 6;
2720
2773
  useStyles = (0, import_antd_style2.createStyles)(({ token, css }) => ({
2721
2774
  surface: css`
2722
2775
  position: relative;
@@ -2824,9 +2877,14 @@ var init_TenantSelector = __esm({
2824
2877
  `,
2825
2878
  grid: css`
2826
2879
  display: grid;
2827
- grid-template-columns: repeat(${GRID_COLUMNS}, minmax(0, 1fr));
2828
2880
  gap: ${token.marginSM}px;
2829
2881
  padding-bottom: 4px;
2882
+ `,
2883
+ gridOne: css`
2884
+ grid-template-columns: minmax(0, 1fr);
2885
+ `,
2886
+ gridTwo: css`
2887
+ grid-template-columns: repeat(2, minmax(0, 1fr));
2830
2888
 
2831
2889
  @media (max-width: 480px) {
2832
2890
  grid-template-columns: minmax(0, 1fr);
@@ -2903,20 +2961,6 @@ var init_TenantSelector = __esm({
2903
2961
  white-space: nowrap;
2904
2962
  overflow: hidden;
2905
2963
  text-overflow: ellipsis;
2906
- `,
2907
- status: css`
2908
- display: flex;
2909
- align-items: center;
2910
- gap: 5px;
2911
- flex-shrink: 0;
2912
- font-size: ${token.fontSizeSM}px;
2913
- line-height: 1;
2914
- `,
2915
- statusDot: css`
2916
- width: 6px;
2917
- height: 6px;
2918
- border-radius: 50%;
2919
- flex-shrink: 0;
2920
2964
  `,
2921
2965
  // ============================================
2922
2966
  // Empty / loading states
@@ -2976,34 +3020,21 @@ var init_TenantSelector = __esm({
2976
3020
  const { styles } = useStyles();
2977
3021
  const { token } = useToken();
2978
3022
  const { logout } = useAuth();
2979
- const currentTenant = (0, import_react9.useMemo)(
2980
- () => tenants.find((t4) => t4.id === currentTenantId) ?? null,
2981
- [tenants, currentTenantId]
2982
- );
2983
3023
  const [selectedId, setSelectedId] = (0, import_react9.useState)(currentTenantId ?? null);
2984
3024
  const [search, setSearch] = (0, import_react9.useState)("");
2985
- const [statusFilter, setStatusFilter] = (0, import_react9.useState)(
2986
- () => currentTenant && currentTenant.status !== "active" ? "all" : "active"
2987
- );
2988
3025
  const [isSubmitting, setIsSubmitting] = (0, import_react9.useState)(false);
2989
- const filterTouchedRef = (0, import_react9.useRef)(false);
2990
3026
  (0, import_react9.useEffect)(() => {
2991
3027
  setSelectedId(currentTenantId ?? null);
2992
3028
  }, [currentTenantId]);
2993
- (0, import_react9.useEffect)(() => {
2994
- if (filterTouchedRef.current) return;
2995
- if (currentTenant && currentTenant.status !== "active") setStatusFilter("all");
2996
- }, [currentTenant?.id, currentTenant?.status]);
2997
3029
  const filtered = (0, import_react9.useMemo)(() => {
2998
3030
  const query = search.trim().toLowerCase();
2999
- return tenants.filter((tenant) => {
3000
- if (statusFilter !== "all" && tenant.status !== statusFilter) return false;
3001
- if (!query) return true;
3002
- return tenant.name.toLowerCase().includes(query) || (tenant.description ?? "").toLowerCase().includes(query);
3003
- });
3004
- }, [tenants, search, statusFilter]);
3031
+ if (!query) return tenants;
3032
+ return tenants.filter(
3033
+ (tenant) => tenant.name.toLowerCase().includes(query) || (tenant.description ?? "").toLowerCase().includes(query)
3034
+ );
3035
+ }, [tenants, search]);
3005
3036
  const canConfirm = !!selectedId && tenants.some((t4) => t4.id === selectedId);
3006
- const isFiltering = search.trim().length > 0 || statusFilter !== "all";
3037
+ const isFiltering = search.trim().length > 0;
3007
3038
  const handleContinue = (0, import_react9.useCallback)(async () => {
3008
3039
  const tenant = tenants.find((t4) => t4.id === selectedId);
3009
3040
  if (!tenant) return;
@@ -3018,10 +3049,8 @@ var init_TenantSelector = __esm({
3018
3049
  logout();
3019
3050
  onLogout?.();
3020
3051
  }, [logout, onLogout]);
3021
- const handleResetFilters = (0, import_react9.useCallback)(() => {
3052
+ const handleResetSearch = (0, import_react9.useCallback)(() => {
3022
3053
  setSearch("");
3023
- filterTouchedRef.current = true;
3024
- setStatusFilter("all");
3025
3054
  }, []);
3026
3055
  const selectedTenant = tenants.find((t4) => t4.id === selectedId);
3027
3056
  const headerLogoUrl = getLogoSrc(selectedTenant?.metadata);
@@ -3076,38 +3105,22 @@ var init_TenantSelector = __esm({
3076
3105
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("h2", { className: styles.title, children: title }),
3077
3106
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: styles.subtitle, children: description })
3078
3107
  ] }),
3079
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: styles.toolbar, children: [
3080
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3081
- import_antd4.Input,
3082
- {
3083
- style: { flex: 1, minWidth: 0 },
3084
- placeholder: "Search tenant...",
3085
- "aria-label": "Search tenants",
3086
- value: search,
3087
- onChange: (e8) => setSearch(e8.target.value),
3088
- onPressEnter: () => {
3089
- if (canConfirm) handleContinue();
3090
- },
3091
- prefix: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react5.Search, { size: 16, style: { color: token.colorTextTertiary } }),
3092
- allowClear: true,
3093
- autoFocus: true
3094
- }
3095
- ),
3096
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3097
- import_antd4.Select,
3098
- {
3099
- "data-testid": "tenant-status-filter",
3100
- "aria-label": "Filter by status",
3101
- style: { width: 150 },
3102
- value: statusFilter,
3103
- onChange: (value) => {
3104
- filterTouchedRef.current = true;
3105
- setStatusFilter(value);
3106
- },
3107
- options: STATUS_OPTIONS
3108
- }
3109
- )
3110
- ] }),
3108
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: styles.toolbar, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3109
+ import_antd4.Input,
3110
+ {
3111
+ style: { flex: 1, minWidth: 0 },
3112
+ placeholder: "Search tenant...",
3113
+ "aria-label": "Search tenants",
3114
+ value: search,
3115
+ onChange: (e8) => setSearch(e8.target.value),
3116
+ onPressEnter: () => {
3117
+ if (canConfirm) handleContinue();
3118
+ },
3119
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react5.Search, { size: 16, style: { color: token.colorTextTertiary } }),
3120
+ allowClear: true,
3121
+ autoFocus: true
3122
+ }
3123
+ ) }),
3111
3124
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: styles.scrollRegion, children: [
3112
3125
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: styles.srOnly, "aria-live": "polite", children: [
3113
3126
  filtered.length,
@@ -3116,60 +3129,57 @@ var init_TenantSelector = __esm({
3116
3129
  ] }),
3117
3130
  filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: styles.centeredBody, children: [
3118
3131
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: styles.emptyTitle, children: "No tenants match" }),
3119
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Try a different search or status filter." }),
3120
- isFiltering && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_antd4.Button, { size: "small", onClick: handleResetFilters, children: "Show all tenants" })
3121
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: styles.grid, children: filtered.map((tenant) => {
3122
- const isSelected = selectedId === tenant.id;
3123
- const statusConfig2 = getStatusConfig(tenant.status, token);
3124
- const logoSrc = getLogoSrc(tenant.metadata);
3125
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
3126
- "button",
3127
- {
3128
- type: "button",
3129
- "aria-pressed": isSelected,
3130
- "data-testid": "tenant-option",
3131
- "data-tenant-id": tenant.id,
3132
- "data-tenant-name": tenant.name,
3133
- className: styles.card,
3134
- onClick: () => setSelectedId(tenant.id),
3135
- children: [
3136
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3137
- "div",
3138
- {
3139
- className: styles.avatar,
3140
- style: {
3141
- background: logoSrc ? "transparent" : isSelected ? token.colorPrimary : token.colorFillSecondary
3142
- },
3143
- children: logoSrc ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TenantLogo, { logoUrl: logoSrc, size: 28 }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3144
- "span",
3132
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: "Try a different search." }),
3133
+ isFiltering && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_antd4.Button, { size: "small", onClick: handleResetSearch, children: "Show all tenants" })
3134
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3135
+ "div",
3136
+ {
3137
+ "data-testid": "tenant-grid",
3138
+ "data-columns": filtered.length >= TWO_COLUMN_THRESHOLD ? 2 : 1,
3139
+ className: `${styles.grid} ${filtered.length >= TWO_COLUMN_THRESHOLD ? styles.gridTwo : styles.gridOne}`,
3140
+ children: filtered.map((tenant) => {
3141
+ const isSelected = selectedId === tenant.id;
3142
+ const logoSrc = getLogoSrc(tenant.metadata);
3143
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
3144
+ "button",
3145
+ {
3146
+ type: "button",
3147
+ "aria-pressed": isSelected,
3148
+ "data-testid": "tenant-option",
3149
+ "data-tenant-id": tenant.id,
3150
+ "data-tenant-name": tenant.name,
3151
+ className: styles.card,
3152
+ onClick: () => setSelectedId(tenant.id),
3153
+ children: [
3154
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3155
+ "div",
3145
3156
  {
3157
+ className: styles.avatar,
3146
3158
  style: {
3147
- color: isSelected ? "white" : token.colorTextSecondary
3159
+ background: logoSrc ? "transparent" : isSelected ? token.colorPrimary : token.colorFillSecondary
3148
3160
  },
3149
- children: tenant.name.charAt(0).toUpperCase() || "?"
3161
+ children: logoSrc ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TenantLogo, { logoUrl: logoSrc, size: 28 }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3162
+ "span",
3163
+ {
3164
+ style: {
3165
+ color: isSelected ? "white" : token.colorTextSecondary
3166
+ },
3167
+ children: tenant.name.charAt(0).toUpperCase() || "?"
3168
+ }
3169
+ )
3150
3170
  }
3151
- )
3152
- }
3153
- ),
3154
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: styles.cardBody, children: [
3155
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: styles.cardName, children: tenant.name }),
3156
- tenant.description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: styles.cardDescription, children: tenant.description })
3157
- ] }),
3158
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: styles.status, children: [
3159
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
3160
- "span",
3161
- {
3162
- className: styles.statusDot,
3163
- style: { background: statusConfig2.color }
3164
- }
3165
- ),
3166
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { style: { color: statusConfig2.color }, children: statusConfig2.text })
3167
- ] })
3168
- ]
3169
- },
3170
- tenant.id
3171
- );
3172
- }) })
3171
+ ),
3172
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: styles.cardBody, children: [
3173
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: styles.cardName, children: tenant.name }),
3174
+ tenant.description && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { className: styles.cardDescription, children: tenant.description })
3175
+ ] })
3176
+ ]
3177
+ },
3178
+ tenant.id
3179
+ );
3180
+ })
3181
+ }
3182
+ )
3173
3183
  ] }),
3174
3184
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: styles.footer, children: [
3175
3185
  onCancel ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_antd4.Button, { onClick: onCancel, children: "Cancel" }) : onLogout ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_antd4.Button, { onClick: handleLogout, icon: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react5.LogOut, { size: 16 }), children: "Log Out" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", {}),
@@ -9034,6 +9044,7 @@ var init_CreateGroupModal = __esm({
9034
9044
  import_antd17 = require("antd");
9035
9045
  init_AuthContext();
9036
9046
  init_LatticeChatShellContext();
9047
+ init_authStorage();
9037
9048
  import_jsx_runtime30 = require("react/jsx-runtime");
9038
9049
  CreateGroupModal = ({
9039
9050
  open,
@@ -9050,7 +9061,7 @@ var init_CreateGroupModal = __esm({
9050
9061
  if (!trimmed) return;
9051
9062
  setCreating(true);
9052
9063
  try {
9053
- const authApiKey = isAuthenticated ? sessionStorage.getItem("lattice_token") || config.apiKey || "" : config.apiKey || "";
9064
+ const authApiKey = isAuthenticated ? readAuthItem("lattice_token") || config.apiKey || "" : config.apiKey || "";
9054
9065
  const response = await fetch(`${config.baseURL}/api/workspaces/${workspaceId}/groups`, {
9055
9066
  method: "POST",
9056
9067
  headers: {
@@ -86361,7 +86372,7 @@ var init_task_card = __esm({
86361
86372
  new_assistant_id = assistantId + "-general-purpose";
86362
86373
  }
86363
86374
  const subagent_thread_id = (threadId || "") + "____" + new_assistant_id + "_" + toolCallData.id;
86364
- const getStatusConfig3 = (status2) => {
86375
+ const getStatusConfig2 = (status2) => {
86365
86376
  switch (status2) {
86366
86377
  case "success":
86367
86378
  return {
@@ -86387,7 +86398,7 @@ var init_task_card = __esm({
86387
86398
  };
86388
86399
  }
86389
86400
  };
86390
- const statusConfig2 = getStatusConfig3(status);
86401
+ const statusConfig2 = getStatusConfig2(status);
86391
86402
  const showResponse = status === "success" && response;
86392
86403
  const handleCardClick = () => {
86393
86404
  openSideApp({
@@ -104700,7 +104711,7 @@ var init_TeamDashboard = __esm({
104700
104711
  });
104701
104712
 
104702
104713
  // src/components/GenUI/elements/TeamWorkspace/TaskDetailModal.tsx
104703
- var import_react126, import_antd101, import_antd_style54, import_lucide_react43, import_jsx_runtime235, Title10, Text38, Paragraph5, useStyles38, getInitials6, getAvatarColor6, getStatusConfig2, formatDate5, formatRelativeTime3, CommentsTab, ActivityTab, TaskDetailModal;
104714
+ var import_react126, import_antd101, import_antd_style54, import_lucide_react43, import_jsx_runtime235, Title10, Text38, Paragraph5, useStyles38, getInitials6, getAvatarColor6, getStatusConfig, formatDate5, formatRelativeTime3, CommentsTab, ActivityTab, TaskDetailModal;
104704
104715
  var init_TaskDetailModal = __esm({
104705
104716
  "src/components/GenUI/elements/TeamWorkspace/TaskDetailModal.tsx"() {
104706
104717
  "use strict";
@@ -104941,7 +104952,7 @@ var init_TaskDetailModal = __esm({
104941
104952
  }
104942
104953
  return colors3[Math.abs(hash) % colors3.length];
104943
104954
  };
104944
- getStatusConfig2 = (status) => {
104955
+ getStatusConfig = (status) => {
104945
104956
  switch (status) {
104946
104957
  case "completed" /* COMPLETED */:
104947
104958
  return {
@@ -105081,7 +105092,7 @@ var init_TaskDetailModal = __esm({
105081
105092
  ] }, comment.id)) });
105082
105093
  };
105083
105094
  ActivityTab = ({ task, styles }) => {
105084
- const statusConfig2 = getStatusConfig2(task.status);
105095
+ const statusConfig2 = getStatusConfig(task.status);
105085
105096
  const timelineItems = [
105086
105097
  {
105087
105098
  dot: /* @__PURE__ */ (0, import_jsx_runtime235.jsx)("div", { className: styles.timelineDot, children: /* @__PURE__ */ (0, import_jsx_runtime235.jsx)(import_lucide_react43.GitCommit, { size: 16 }) }),
@@ -105122,7 +105133,7 @@ var init_TaskDetailModal = __esm({
105122
105133
  const { styles } = useStyles38();
105123
105134
  const [activeTab, setActiveTab] = (0, import_react126.useState)("comments");
105124
105135
  if (!task) return null;
105125
- const statusConfig2 = getStatusConfig2(task.status);
105136
+ const statusConfig2 = getStatusConfig(task.status);
105126
105137
  const tabItems = [
105127
105138
  {
105128
105139
  key: "comments",
@@ -107952,6 +107963,8 @@ var init_ProjectRoomComposer = __esm({
107952
107963
  import_lucide_react48 = require("lucide-react");
107953
107964
  init_suggestionNav();
107954
107965
  init_AuthContext();
107966
+ init_useMediaQuery();
107967
+ init_authStorage();
107955
107968
  init_LatticeChatShellContext();
107956
107969
  init_attachmentsMessage();
107957
107970
  init_projectRoomMentions();
@@ -107997,6 +108010,7 @@ var init_ProjectRoomComposer = __esm({
107997
108010
  const { styles } = useStyles46();
107998
108011
  const { config } = useLatticeChatShellContext();
107999
108012
  const { isAuthenticated, currentTenant } = useAuth();
108013
+ const isMobile = useMediaQuery("(max-width: 768px)");
108000
108014
  const [content, setContent] = (0, import_react135.useState)("");
108001
108015
  const contentRef = (0, import_react135.useRef)(content);
108002
108016
  contentRef.current = content;
@@ -108082,6 +108096,16 @@ var init_ProjectRoomComposer = __esm({
108082
108096
  setSending(false);
108083
108097
  }
108084
108098
  }, [canSend, sending, replyTo, onSend, onCancelReply, attachedFiles]);
108099
+ const attachButton = uploadAction === void 0 ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
108100
+ import_antd110.Button,
108101
+ {
108102
+ type: "text",
108103
+ icon: /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(import_lucide_react48.Paperclip, { size: 16 }),
108104
+ "aria-label": "Attach files",
108105
+ disabled: !canSend,
108106
+ onClick: () => setHeaderOpen((open) => !open)
108107
+ }
108108
+ );
108085
108109
  const senderHeader = uploadAction === void 0 ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(import_x9.Sender.Header, { title: "Attachments", open: headerOpen, onOpenChange: setHeaderOpen, forceRender: true, children: /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
108086
108110
  import_x9.Attachments,
108087
108111
  {
@@ -108093,7 +108117,7 @@ var init_ProjectRoomComposer = __esm({
108093
108117
  "x-tenant-id": currentTenant?.id || "default",
108094
108118
  "x-workspace-id": workspaceId ?? "",
108095
108119
  "x-project-id": projectId ?? "",
108096
- ...isAuthenticated && typeof sessionStorage !== "undefined" && sessionStorage.getItem("lattice_token") ? { Authorization: `Bearer ${sessionStorage.getItem("lattice_token")}` } : {}
108120
+ ...isAuthenticated && readAuthItem("lattice_token") ? { Authorization: `Bearer ${readAuthItem("lattice_token")}` } : {}
108097
108121
  },
108098
108122
  onChange: (info) => {
108099
108123
  const responseError = info.file.response?.error;
@@ -108195,19 +108219,11 @@ var init_ProjectRoomComposer = __esm({
108195
108219
  onSubmit: (next) => void submit(next),
108196
108220
  onKeyDown: handleSuggestionKeyDown,
108197
108221
  placeholder: "Message the room",
108198
- autoSize: { minRows: 2, maxRows: 8 },
108222
+ autoSize: isMobile ? { minRows: 1, maxRows: 1 } : { minRows: 2, maxRows: 8 },
108199
108223
  suffix: false,
108200
- footer: (actionNode) => /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(import_antd110.Flex, { justify: "space-between", align: "center", style: { padding: "8px 0 0" }, children: [
108201
- /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(import_antd110.Flex, { align: "center", gap: 8, children: uploadAction !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(
108202
- import_antd110.Button,
108203
- {
108204
- type: "text",
108205
- icon: /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(import_lucide_react48.Paperclip, { size: 16 }),
108206
- "aria-label": "Attach files",
108207
- disabled: !canSend,
108208
- onClick: () => setHeaderOpen((open) => !open)
108209
- }
108210
- ) }),
108224
+ prefix: isMobile ? attachButton : void 0,
108225
+ footer: isMobile ? void 0 : (actionNode) => /* @__PURE__ */ (0, import_jsx_runtime245.jsxs)(import_antd110.Flex, { justify: "space-between", align: "center", style: { padding: "8px 0 0" }, children: [
108226
+ /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(import_antd110.Flex, { align: "center", gap: 8, children: attachButton }),
108211
108227
  /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(import_antd110.Flex, { align: "center", gap: 8, children: actionNode })
108212
108228
  ] })
108213
108229
  }
@@ -140008,12 +140024,14 @@ __export(src_exports2, {
140008
140024
  applyResource: () => applyResource,
140009
140025
  applySendResult: () => applySendResult,
140010
140026
  applyStreamFrame: () => applyStreamFrame,
140027
+ authStorage: () => authStorage,
140011
140028
  axiomAntdTheme: () => axiomAntdTheme,
140012
140029
  axiomAntdThemeDark: () => axiomAntdThemeDark,
140013
140030
  axiomTokens: () => axiomTokens,
140014
140031
  buildAgentConfigGraphData: () => buildAgentConfigGraphData,
140015
140032
  buildAgentGraphData: () => buildAgentGraphData,
140016
140033
  buildAgentListItems: () => buildAgentListItems,
140034
+ clearAuthItems: () => clearAuthItems,
140017
140035
  colors: () => colors,
140018
140036
  createProjectRoomState: () => createProjectRoomState,
140019
140037
  deriveBotAvailability: () => deriveBotAvailability,
@@ -140023,9 +140041,12 @@ __export(src_exports2, {
140023
140041
  getAxiomAntdTheme: () => getAxiomAntdTheme,
140024
140042
  getElement: () => getElement,
140025
140043
  getRoundRepresentativeScore: () => getRoundRepresentativeScore,
140044
+ isStandalonePwa: () => isStandalonePwa,
140026
140045
  isTrainingRound: () => isTrainingRound,
140027
140046
  radius: () => radius,
140047
+ readAuthItem: () => readAuthItem,
140028
140048
  regsiterElement: () => regsiterElement,
140049
+ removeAuthItem: () => removeAuthItem,
140029
140050
  shadows: () => shadows,
140030
140051
  spacing: () => spacing,
140031
140052
  summarizeCapability: () => summarizeCapability,
@@ -140069,7 +140090,8 @@ __export(src_exports2, {
140069
140090
  useVoiceRecorder: () => useVoiceRecorder,
140070
140091
  useWebPush: () => useWebPush,
140071
140092
  useWorkspaceContext: () => useWorkspaceContext,
140072
- useWorkspaceContextOptional: () => useWorkspaceContextOptional
140093
+ useWorkspaceContextOptional: () => useWorkspaceContextOptional,
140094
+ writeAuthItem: () => writeAuthItem
140073
140095
  });
140074
140096
  module.exports = __toCommonJS(src_exports2);
140075
140097
 
@@ -143464,11 +143486,13 @@ init_ProjectRoomContext();
143464
143486
  init_projectRoomState();
143465
143487
  init_RoomEventsContext();
143466
143488
  init_useRoomNotifications();
143489
+ init_authStorage();
143467
143490
 
143468
143491
  // src/integrations/push/useWebPush.ts
143469
143492
  var import_react259 = require("react");
143470
143493
  init_LatticeChatShellContext();
143471
143494
  init_AuthContext();
143495
+ init_authStorage();
143472
143496
  function supported() {
143473
143497
  return typeof navigator !== "undefined" && "serviceWorker" in navigator && typeof window !== "undefined" && "PushManager" in window && "Notification" in window;
143474
143498
  }
@@ -143481,8 +143505,8 @@ function urlBase64ToUint8Array(base64) {
143481
143505
  return output.buffer;
143482
143506
  }
143483
143507
  function authToken() {
143484
- if (typeof sessionStorage === "undefined") return "";
143485
- return sessionStorage.getItem("lattice_token") ?? "";
143508
+ if (typeof window === "undefined") return "";
143509
+ return readAuthItem("lattice_token") ?? "";
143486
143510
  }
143487
143511
  function useWebPush(options = {}) {
143488
143512
  const { config } = useLatticeChatShellContext();
@@ -143709,12 +143733,14 @@ init_CoSpace();
143709
143733
  applyResource,
143710
143734
  applySendResult,
143711
143735
  applyStreamFrame,
143736
+ authStorage,
143712
143737
  axiomAntdTheme,
143713
143738
  axiomAntdThemeDark,
143714
143739
  axiomTokens,
143715
143740
  buildAgentConfigGraphData,
143716
143741
  buildAgentGraphData,
143717
143742
  buildAgentListItems,
143743
+ clearAuthItems,
143718
143744
  colors,
143719
143745
  createProjectRoomState,
143720
143746
  deriveBotAvailability,
@@ -143724,9 +143750,12 @@ init_CoSpace();
143724
143750
  getAxiomAntdTheme,
143725
143751
  getElement,
143726
143752
  getRoundRepresentativeScore,
143753
+ isStandalonePwa,
143727
143754
  isTrainingRound,
143728
143755
  radius,
143756
+ readAuthItem,
143729
143757
  regsiterElement,
143758
+ removeAuthItem,
143730
143759
  shadows,
143731
143760
  spacing,
143732
143761
  summarizeCapability,
@@ -143771,6 +143800,7 @@ init_CoSpace();
143771
143800
  useWebPush,
143772
143801
  useWorkspaceContext,
143773
143802
  useWorkspaceContextOptional,
143803
+ writeAuthItem,
143774
143804
  ...require("@axiom-lattice/protocols")
143775
143805
  });
143776
143806
  /*! Bundled license information: