@lumerahq/ui 0.13.0-dev.2 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +29 -21
  2. package/dist/{RecordSheet-CawHELpB.js → RecordSheet-BGs3rudM.js} +9146 -5815
  3. package/dist/{automations-EgDXJ43_.js → automations-DGUEnAYR.js} +199 -38
  4. package/dist/components/audit-log/AuditLog.d.ts +51 -0
  5. package/dist/components/audit-log/AuditLog.d.ts.map +1 -0
  6. package/dist/components/audit-log/AuditLogEntry.d.ts +19 -0
  7. package/dist/components/audit-log/AuditLogEntry.d.ts.map +1 -0
  8. package/dist/components/audit-log/index.d.ts +2 -0
  9. package/dist/components/audit-log/index.d.ts.map +1 -0
  10. package/dist/components/index.d.ts +1 -0
  11. package/dist/components/index.d.ts.map +1 -1
  12. package/dist/components/index.js +6 -5
  13. package/dist/{highlighted-body-OFNGDK62-TFNZl-GI.js → highlighted-body-OFNGDK62-V6FEuBTg.js} +1 -1
  14. package/dist/hooks/index.d.ts +1 -2
  15. package/dist/hooks/index.d.ts.map +1 -1
  16. package/dist/hooks/index.js +6 -7
  17. package/dist/hooks/use-audit-log.d.ts +18 -0
  18. package/dist/hooks/use-audit-log.d.ts.map +1 -0
  19. package/dist/index.js +55 -65
  20. package/dist/lib/audit-log-core.d.ts +46 -40
  21. package/dist/lib/audit-log-core.d.ts.map +1 -1
  22. package/dist/lib/audit-log.d.ts +5 -5
  23. package/dist/lib/audit-log.d.ts.map +1 -1
  24. package/dist/lib/bridge.d.ts +28 -0
  25. package/dist/lib/bridge.d.ts.map +1 -1
  26. package/dist/lib/index.d.ts +1 -2
  27. package/dist/lib/index.d.ts.map +1 -1
  28. package/dist/lib/index.js +36 -46
  29. package/dist/mermaid-GHXKKRXX-AvjGDhsO.js +4 -0
  30. package/dist/ui.css +185 -1
  31. package/dist/{use-automation-run-IypX1vtN.js → use-automation-run-D6DIaHy3.js} +189 -3
  32. package/dist/{use-sql-table-By700ZAo.js → use-sql-table-BfA0A-w3.js} +3 -72
  33. package/package.json +1 -1
  34. package/dist/audit-log-BPvip04_.js +0 -128
  35. package/dist/hooks/use-record-audit-log-snapshot.d.ts +0 -15
  36. package/dist/hooks/use-record-audit-log-snapshot.d.ts.map +0 -1
  37. package/dist/hooks/use-record-audit-log.d.ts +0 -23
  38. package/dist/hooks/use-record-audit-log.d.ts.map +0 -1
  39. package/dist/mermaid-GHXKKRXX-9ec0sPET.js +0 -4
@@ -428,6 +428,143 @@ const directApiStream = (request2, handlers) => {
428
428
  close: () => controller.abort()
429
429
  };
430
430
  };
431
+ const isDirectMode = () => typeof window !== "undefined" && !isEmbedded() && !isStandaloneDevMode() && !isPlaygroundMode();
432
+ const directHostApiRequest = async (request2) => {
433
+ log("Direct mode: same-origin fetch", { url: request2.url, method: request2.method });
434
+ try {
435
+ const built = buildFetchBodyAndHeaders(request2);
436
+ const response = await fetch(request2.url, {
437
+ method: request2.method,
438
+ credentials: "same-origin",
439
+ headers: {
440
+ ...built.headers,
441
+ "X-Lumera-Client": "lumera-custom-app"
442
+ },
443
+ body: built.body
444
+ });
445
+ const text = await response.text();
446
+ let body = text;
447
+ try {
448
+ body = JSON.parse(text);
449
+ } catch {
450
+ }
451
+ return {
452
+ id: "direct-host",
453
+ ok: response.ok,
454
+ status: response.status,
455
+ body,
456
+ error: response.ok ? void 0 : text
457
+ };
458
+ } catch (err) {
459
+ return {
460
+ id: "direct-host",
461
+ ok: false,
462
+ status: 0,
463
+ error: err instanceof Error ? err.message : "Network error"
464
+ };
465
+ }
466
+ };
467
+ const directHostApiStream = (request2, handlers) => {
468
+ const id = generateId();
469
+ const controller = new AbortController();
470
+ void (async () => {
471
+ try {
472
+ const response = await fetch(request2.url, {
473
+ method: request2.method,
474
+ credentials: "same-origin",
475
+ headers: {
476
+ "Content-Type": "application/json",
477
+ Accept: "text/event-stream",
478
+ "X-Lumera-Client": "lumera-custom-app",
479
+ ...request2.headers
480
+ },
481
+ body: request2.body ? JSON.stringify(request2.body) : void 0,
482
+ signal: controller.signal
483
+ });
484
+ if (!response.ok) {
485
+ if (response.status === 409) {
486
+ return;
487
+ }
488
+ const message = await response.text().catch(() => `HTTP ${response.status}`);
489
+ handlers.onError?.(new BridgeError(message || `HTTP ${response.status}`, response.status));
490
+ return;
491
+ }
492
+ handlers.onOpen?.({
493
+ id,
494
+ ok: response.ok,
495
+ status: response.status,
496
+ headers: responseHeadersToRecord(response.headers)
497
+ });
498
+ const reader = response.body?.getReader();
499
+ if (!reader) {
500
+ handlers.onError?.(new BridgeError("Streaming response had no body", response.status));
501
+ return;
502
+ }
503
+ const decoder = new TextDecoder();
504
+ for (; ; ) {
505
+ const { done, value } = await reader.read();
506
+ if (done) break;
507
+ handlers.onChunk(decoder.decode(value, { stream: true }));
508
+ }
509
+ const trailing = decoder.decode();
510
+ if (trailing) handlers.onChunk(trailing);
511
+ } catch (err) {
512
+ if (err instanceof Error && err.name === "AbortError") return;
513
+ handlers.onError?.(new BridgeError(err instanceof Error ? err.message : "Network error"));
514
+ } finally {
515
+ handlers.onClose?.();
516
+ }
517
+ })();
518
+ return {
519
+ id,
520
+ close: () => controller.abort()
521
+ };
522
+ };
523
+ let directModeInitFired = false;
524
+ const fireDirectModeInit = () => {
525
+ if (directModeInitFired || !isDirectMode()) return;
526
+ directModeInitFired = true;
527
+ void (async () => {
528
+ let payload;
529
+ try {
530
+ const response = await fetch("/api/me", { credentials: "same-origin" });
531
+ if (response.ok || response.status === 401) {
532
+ let me;
533
+ try {
534
+ me = await response.json();
535
+ } catch {
536
+ me = void 0;
537
+ }
538
+ if (me) {
539
+ payload = {
540
+ company: me.company_id ? { id: me.company_id, apiName: me.company_api_name } : void 0,
541
+ user: me.user ?? void 0,
542
+ app: {
543
+ projectExternalId: me.project_external_id,
544
+ accessLevel: me.access_level
545
+ },
546
+ subjectType: me.subject_type
547
+ };
548
+ }
549
+ }
550
+ } catch (err) {
551
+ log("Direct mode: /api/me failed", err);
552
+ }
553
+ if (hasStoredHostPayload) return;
554
+ log("Direct mode: firing init payload", payload);
555
+ cacheHostPayload(payload, { origin: window.location.origin });
556
+ initListeners.forEach((listener) => listener(payload));
557
+ })();
558
+ };
559
+ const redirectToLogin = (returnTo) => {
560
+ if (typeof window === "undefined") return;
561
+ const target = returnTo ?? window.location.pathname + window.location.search;
562
+ window.location.href = `/api/auth/app-session/login?return_to=${encodeURIComponent(target)}`;
563
+ };
564
+ const logout = async () => {
565
+ if (typeof window === "undefined") return;
566
+ await fetch("/api/auth/app-session/logout", { method: "POST", credentials: "same-origin" });
567
+ };
431
568
  const fireDevModeInit = () => {
432
569
  if (devModeInitFired || !isStandaloneDevMode()) return;
433
570
  devModeInitFired = true;
@@ -628,6 +765,12 @@ const postReadyMessage = () => {
628
765
  fireDevModeInit();
629
766
  return;
630
767
  }
768
+ if (isDirectMode()) {
769
+ log("Direct mode: skipping postMessage, resolving identity from /api/me");
770
+ ensureListener();
771
+ fireDirectModeInit();
772
+ return;
773
+ }
631
774
  ensureListener();
632
775
  if (isPlaygroundMode()) {
633
776
  log("Playground mode: initializing via VirtualBackend");
@@ -687,6 +830,16 @@ const onInitMessage = (listener) => {
687
830
  fireDevModeInit();
688
831
  return () => initListeners.delete(listener);
689
832
  }
833
+ if (isDirectMode()) {
834
+ ensureListener();
835
+ initListeners.add(listener);
836
+ if (hasStoredHostPayload) {
837
+ setTimeout(() => listener(storedHostPayload), 0);
838
+ } else {
839
+ fireDirectModeInit();
840
+ }
841
+ return () => initListeners.delete(listener);
842
+ }
690
843
  ensureListener();
691
844
  initListeners.add(listener);
692
845
  if (hasStoredHostPayload) {
@@ -701,8 +854,11 @@ const parentApiRequest = async (request2) => {
701
854
  if (isPlaygroundMode()) {
702
855
  return playgroundApiRequest(request2);
703
856
  }
704
- if (typeof window === "undefined" || !isEmbedded()) {
705
- throw new BridgeError("App must be embedded in the Lumera host to make API requests");
857
+ if (typeof window === "undefined") {
858
+ throw new BridgeError("Bridge API requests are only available in the browser");
859
+ }
860
+ if (!isEmbedded()) {
861
+ return directHostApiRequest(request2);
706
862
  }
707
863
  ensureListener();
708
864
  const id = generateId();
@@ -744,8 +900,11 @@ const parentApiStream = (request2, handlers) => {
744
900
  if (isPlaygroundMode()) {
745
901
  return playgroundApiStream(handlers);
746
902
  }
747
- if (typeof window === "undefined" || !isEmbedded()) {
748
- throw new BridgeError("App must be embedded in the Lumera host to stream API responses");
903
+ if (typeof window === "undefined") {
904
+ throw new BridgeError("Bridge API streams are only available in the browser");
905
+ }
906
+ if (!isEmbedded()) {
907
+ return directHostApiStream(request2, handlers);
749
908
  }
750
909
  ensureListener();
751
910
  const id = generateId();
@@ -1264,30 +1423,32 @@ async function listRunsByExternalId(params) {
1264
1423
  });
1265
1424
  }
1266
1425
  export {
1267
- cancelAutomationRun as A,
1426
+ uploadFile as A,
1268
1427
  BridgeError as B,
1269
- cancelRun as C,
1270
- clearAutomationCache as D,
1428
+ automationStatuses as C,
1429
+ cancelAutomationRun as D,
1271
1430
  EXPECTED_PARENT_ORIGIN as E,
1272
- createAutomationRun as F,
1273
- createRun as G,
1274
- ensureAutomationRun as H,
1275
- ensureRun as I,
1276
- getAutomationByExternalId as J,
1277
- getAutomationRun as K,
1278
- getAutomationRunFileDownloadUrl as L,
1279
- getRun as M,
1280
- getRunFiles as N,
1281
- getRunFileUrl as O,
1282
- isActiveStatus as P,
1283
- isTerminalStatus as Q,
1284
- listAutomationRunFiles as R,
1285
- listRuns as S,
1286
- listRunsByAgent as T,
1287
- listRunsByExternalId as U,
1288
- pollAutomationRun as V,
1289
- pollRun as W,
1290
- requestApi as X,
1431
+ cancelRun as F,
1432
+ clearAutomationCache as G,
1433
+ createAutomationRun as H,
1434
+ createRun as I,
1435
+ ensureAutomationRun as J,
1436
+ ensureRun as K,
1437
+ getAutomationByExternalId as L,
1438
+ getAutomationRun as M,
1439
+ getAutomationRunFileDownloadUrl as N,
1440
+ getRun as O,
1441
+ getRunFiles as P,
1442
+ getRunFileUrl as Q,
1443
+ isActiveStatus as R,
1444
+ isTerminalStatus as S,
1445
+ listAutomationRunFiles as T,
1446
+ listRuns as U,
1447
+ listRunsByAgent as V,
1448
+ listRunsByExternalId as W,
1449
+ pollAutomationRun as X,
1450
+ pollRun as Y,
1451
+ requestApi as Z,
1291
1452
  getShareableAppUrl as a,
1292
1453
  buildShareableAppUrl as b,
1293
1454
  configureBridge as c,
@@ -1299,19 +1460,19 @@ export {
1299
1460
  isEmbedded as i,
1300
1461
  pbBulkDelete as j,
1301
1462
  pbBulkUpdate as k,
1302
- pbCreate as l,
1303
- pbDelete as m,
1304
- pbGet as n,
1463
+ logout as l,
1464
+ pbCreate as m,
1465
+ pbDelete as n,
1305
1466
  onInitMessage as o,
1306
1467
  parentApiRequest as p,
1307
- pbList as q,
1308
- pbSearch as r,
1468
+ pbGet as q,
1469
+ redirectToLogin as r,
1309
1470
  serializeBridgeRuntimeConfig as s,
1310
- pbSql as t,
1311
- pbUpdate as u,
1312
- pbUpdateRecord as v,
1313
- pbUpsert as w,
1314
- sendEmail as x,
1315
- uploadFile as y,
1316
- automationStatuses as z
1471
+ pbList as t,
1472
+ pbSearch as u,
1473
+ pbSql as v,
1474
+ pbUpdate as w,
1475
+ pbUpdateRecord as x,
1476
+ pbUpsert as y,
1477
+ sendEmail as z
1317
1478
  };
@@ -0,0 +1,51 @@
1
+ import { ReactNode } from 'react';
2
+ import { AuditLogEntry as AuditLogEntryData, AuditLogFilterState as AuditLogFilterStateData } from '../../lib/audit-log';
3
+ export type AuditLogDensity = 'compact' | 'comfortable';
4
+ export type AuditLogFilterState = AuditLogFilterStateData;
5
+ export type AuditLogRecord = AuditLogEntryData;
6
+ export type AuditLogProps = {
7
+ /** Collections whose combined record history should be shown (maximum 20). */
8
+ collections: readonly string[];
9
+ /** Friendly display names keyed by collection API name. */
10
+ collectionLabels?: Readonly<Record<string, string>>;
11
+ /** Singular activity nouns keyed by collection API name, e.g. "invoice" or "payment". */
12
+ activityNouns?: Readonly<Record<string, string>>;
13
+ /** Controlled filter state. */
14
+ filters?: AuditLogFilterState;
15
+ /** Initial filters when the component manages its own state. */
16
+ defaultFilters?: Partial<AuditLogFilterState>;
17
+ /** Called after any user filter change, in controlled and uncontrolled modes. */
18
+ onFiltersChange?: (filters: AuditLogFilterState) => void;
19
+ /** Rows fetched per page. Defaults to 50; the API maximum is 200. */
20
+ pageSize?: number;
21
+ /** Maximum rows in one CSV export. Defaults to 10,000 and cannot exceed it. */
22
+ exportMaxRows?: number;
23
+ /** Download name for CSV exports. Defaults to a date-stamped name. */
24
+ exportFilename?: string;
25
+ /** Header text. Defaults to "Activity". */
26
+ title?: string;
27
+ /** Row spacing. Defaults to "compact". */
28
+ density?: AuditLogDensity;
29
+ /** Show the collection column. Defaults to true. */
30
+ showCollectionColumn?: boolean;
31
+ /** Show the actor column. Defaults to true. */
32
+ showActorColumn?: boolean;
33
+ /** Include record system fields in before/after values. Defaults to true. */
34
+ showSystemFields?: boolean;
35
+ /** Friendly labels keyed by a field's API key or current label. */
36
+ fieldLabels?: Readonly<Record<string, string>>;
37
+ /** Return an app-specific destination for an audit entry's record. */
38
+ getRecordHref?: (entry: AuditLogEntryData) => string | undefined;
39
+ /** Called when the app-specific record action is selected. */
40
+ onRecordClick?: (entry: AuditLogEntryData) => void;
41
+ /** Optional replacement for the built-in loading state. */
42
+ loadingState?: ReactNode;
43
+ /** Optional replacement for the built-in empty state. */
44
+ emptyState?: ReactNode;
45
+ /** Optional replacement for an API error state. */
46
+ errorState?: (error: Error) => ReactNode;
47
+ /** Optional classes for the outer container. */
48
+ className?: string;
49
+ };
50
+ export declare function AuditLog({ collections, collectionLabels, activityNouns, filters: controlledFilters, defaultFilters, onFiltersChange, pageSize, exportMaxRows, exportFilename, title, density, showCollectionColumn, showActorColumn, showSystemFields, fieldLabels, getRecordHref, onRecordClick, loadingState, emptyState, errorState, className, }: AuditLogProps): import("react/jsx-runtime").JSX.Element;
51
+ //# sourceMappingURL=AuditLog.d.ts.map
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;IAC/B,+CAA+C;IAC/C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,6EAA6E;IAC7E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mEAAmE;IACnE,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,sEAAsE;IACtE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,MAAM,GAAG,SAAS,CAAC;IACjE,8DAA8D;IAC9D,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACnD,2DAA2D;IAC3D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,yDAAyD;IACzD,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,mDAAmD;IACnD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC;IACzC,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA4FF,wBAAgB,QAAQ,CAAC,EACvB,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,OAAO,EAAE,iBAAiB,EAC1B,cAAc,EACd,eAAe,EACf,QAAa,EACb,aAAa,EACb,cAAc,EACd,KAAkB,EAClB,OAAmB,EACnB,oBAA2B,EAC3B,eAAsB,EACtB,gBAAuB,EACvB,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,UAAU,EACV,UAAU,EACV,SAAS,GACV,EAAE,aAAa,2CAyiBf"}
@@ -0,0 +1,19 @@
1
+ import { AuditLogDensity } from './AuditLog';
2
+ import { AuditLogEntry as AuditLogEntryData } from '../../lib/audit-log';
3
+ type AuditLogEntryProps = {
4
+ entry: AuditLogEntryData;
5
+ collectionApiName: string;
6
+ collectionLabel: string;
7
+ activityCollectionLabel?: string;
8
+ density: AuditLogDensity;
9
+ showCollectionColumn: boolean;
10
+ showActorColumn: boolean;
11
+ showSystemFields: boolean;
12
+ fieldLabels?: Readonly<Record<string, string>>;
13
+ columnCount: number;
14
+ getRecordHref?: (entry: AuditLogEntryData) => string | undefined;
15
+ onRecordClick?: (entry: AuditLogEntryData) => void;
16
+ };
17
+ export declare function AuditLogEntry({ entry, collectionApiName, collectionLabel, activityCollectionLabel, density, showCollectionColumn, showActorColumn, showSystemFields, fieldLabels, columnCount, getRecordHref, onRecordClick, }: AuditLogEntryProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
19
+ //# sourceMappingURL=AuditLogEntry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuditLogEntry.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/AuditLogEntry.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGvE,OAAO,EACL,KAAK,aAAa,IAAI,iBAAiB,EAMxC,MAAM,iBAAiB,CAAC;AA6KzB,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,iBAAiB,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,OAAO,EAAE,eAAe,CAAC;IACzB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,MAAM,GAAG,SAAS,CAAC;IACjE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACpD,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,iBAAiB,EACjB,eAAe,EACf,uBAAuB,EACvB,OAAO,EACP,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,GACd,EAAE,kBAAkB,2CA6HpB"}
@@ -0,0 +1,2 @@
1
+ export { AuditLog, type AuditLogDensity, type AuditLogFilterState, type AuditLogProps, type AuditLogRecord, } from './AuditLog';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,YAAY,CAAC"}
@@ -2,6 +2,7 @@ export type { ColumnType, FormatOptions } from '../lib/formatters';
2
2
  export type { AgentChatAbortRequest, AgentChatAction, AgentChatActionBlock, AgentChatActiveStatus, AgentChatAgentProfile, AgentChatAgentRequest, AgentChatBlockRendererProps, AgentChatCollectionMap, AgentChatComposerActions, AgentChatComposerRendererProps, AgentChatComposerState, AgentChatContentBlock, AgentChatCustomBlock, AgentChatFeatureFlags, AgentChatFile, AgentChatFileBlock, AgentChatHistoryPage, AgentChatHistoryRequest, AgentChatHistoryResult, AgentChatID, AgentChatInfoBlock, AgentChatLabels, AgentChatLoadEarlierRequest, AgentChatMessage, AgentChatMessageRendererProps, AgentChatMessageRole, AgentChatMetadata, AgentChatOperationStatus, AgentChatPendingFile, AgentChatPhase, AgentChatProps, AgentChatRenameSessionRequest, AgentChatRenderers, AgentChatResizableWidthOptions, AgentChatSession, AgentChatSessionListRequest, AgentChatSessionListResult, AgentChatStreamEvent, AgentChatStreamHandlers, AgentChatSubmitInput, AgentChatSubmitResult, AgentChatSubscription, AgentChatTerminalStatus, AgentChatTextBlock, AgentChatThinkingBlock, AgentChatTokenUsage, AgentChatToolCall, AgentChatToolCallBlock, AgentChatToolCallLike, AgentChatToolRenderer, AgentChatTransport, AgentChatTurn, AgentChatTurnStatus, LumeraAgentChatTransportOptions, } from './agent-chat';
3
3
  export { AgentChat, ArtifactCard, createLumeraAgentChatTransport, defaultToolRenderers, findRenderer, getCollectionMap, humanizeCollectionName, isExploratoryToolCallError, ToolCallCard, type ToolCallCardProps, ToolRenderersProvider, warmCollectionCache, } from './agent-chat';
4
4
  export { AssistantChat, type AssistantChatProps, AssistantPage, type AssistantPageProps, AssistantWidget, type AssistantWidgetProps, type ComposerChip as AssistantComposerChip, isMutatingToolCall, useDataSyncTransport, withDataSync, } from './assistant';
5
+ export { AuditLog, type AuditLogDensity, type AuditLogFilterState, type AuditLogProps, type AuditLogRecord, } from './audit-log';
5
6
  export { AutomationRunList } from './automation/AutomationRunList';
6
7
  export { AutomationRunner } from './automation/AutomationRunner';
7
8
  export { type ColumnDef, DataTable, DataTableFilters, type DataTableFiltersProps, DataTablePagination, type DataTablePaginationProps, type DataTableProps, type FilterColumn, RecordSheet, type RecordSheetProps, } from './data-table';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAClE,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,EACtB,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,2BAA2B,EAC3B,gBAAgB,EAChB,6BAA6B,EAC7B,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,6BAA6B,EAC7B,kBAAkB,EAClB,8BAA8B,EAC9B,gBAAgB,EAChB,2BAA2B,EAC3B,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,+BAA+B,GAChC,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,SAAS,EACT,YAAY,EACZ,8BAA8B,EAC9B,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,0BAA0B,EAC1B,YAAY,EACZ,KAAK,iBAAiB,EACtB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,aAAa,EACb,KAAK,kBAAkB,EACvB,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,YAAY,IAAI,qBAAqB,EAC1C,kBAAkB,EAClB,oBAAoB,EACpB,YAAY,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EACL,KAAK,SAAS,EACd,SAAS,EACT,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAClE,YAAY,EACV,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EAC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,cAAc,GACpB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EACL,KAAK,SAAS,EACd,SAAS,EACT,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAC"}
@@ -1,15 +1,16 @@
1
- import { A, a, e, j, k, n, o, D, p, q, R, T, b, c, d, f, g, h, i, l, u, w, m } from "../RecordSheet-CawHELpB.js";
1
+ import { A, a, e, j, k, n, o, p, D, q, r, R, T, b, c, d, f, g, h, i, l, u, w, m } from "../RecordSheet-BGs3rudM.js";
2
2
  export {
3
3
  A as AgentChat,
4
4
  a as ArtifactCard,
5
5
  e as AssistantChat,
6
6
  j as AssistantPage,
7
7
  k as AssistantWidget,
8
- n as AutomationRunList,
9
- o as AutomationRunner,
8
+ n as AuditLog,
9
+ o as AutomationRunList,
10
+ p as AutomationRunner,
10
11
  D as DataTable,
11
- p as DataTableFilters,
12
- q as DataTablePagination,
12
+ q as DataTableFilters,
13
+ r as DataTablePagination,
13
14
  R as RecordSheet,
14
15
  T as ToolCallCard,
15
16
  b as ToolRenderersProvider,
@@ -1,4 +1,4 @@
1
- import { s as R$1, L as Li, t as At } from "./RecordSheet-CawHELpB.js";
1
+ import { t as R$1, L as Li, v as At } from "./RecordSheet-BGs3rudM.js";
2
2
  import { useContext, useState, useEffect } from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  var R = ({ code: s, language: e, raw: t, className: h, startLine: d, lineNumbers: m, ...p }) => {
@@ -1,10 +1,9 @@
1
1
  export { type UseAgentChatOptions, type UseAgentChatResult, useAgentChat, } from './use-agent-chat';
2
2
  export { type UseAgentChatSessionsOptions, type UseAgentChatSessionsResult, useAgentChatSessions, } from './use-agent-chat-sessions';
3
+ export { type UseAuditLogOptions, type UseAuditLogResult, useAuditLog, } from './use-audit-log';
3
4
  export { useAutomationAgent } from './use-automation-agent';
4
5
  export { useAutomationRun } from './use-automation-run';
5
6
  export { type UploadStatus, type UseFileUploadOptions, type UseFileUploadReturn, useFileUpload, } from './use-file-upload';
6
7
  export { useLumeraUser, usePbSql, usePbUpdate } from './use-lumera-api';
7
- export { type UseRecordAuditLogParams, type UseRecordAuditLogResult, useRecordAuditLog, } from './use-record-audit-log';
8
- export { type UseRecordAuditLogSnapshotParams, type UseRecordAuditLogSnapshotResult, useRecordAuditLogSnapshot, } from './use-record-audit-log-snapshot';
9
8
  export { type SortDirection, type TableFilter, type TableSort, type UseSqlTableOptions, type UseSqlTableResult, useSqlTable, } from './use-sql-table';
10
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,iBAAiB,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,WAAW,GACZ,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,YAAY,GACb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,WAAW,GACZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,WAAW,GACZ,MAAM,iBAAiB,CAAC"}
@@ -1,15 +1,14 @@
1
- import { u, a, b } from "../use-automation-run-IypX1vtN.js";
2
- import { u as u2, a as a2, b as b2, c, d, e, f, g } from "../use-sql-table-By700ZAo.js";
1
+ import { u, a, b, c } from "../use-automation-run-D6DIaHy3.js";
2
+ import { u as u2, a as a2, b as b2, c as c2, d, e } from "../use-sql-table-BfA0A-w3.js";
3
3
  export {
4
4
  u as useAgentChat,
5
5
  a as useAgentChatSessions,
6
+ b as useAuditLog,
6
7
  u2 as useAutomationAgent,
7
- b as useAutomationRun,
8
+ c as useAutomationRun,
8
9
  a2 as useFileUpload,
9
10
  b2 as useLumeraUser,
10
- c as usePbSql,
11
+ c2 as usePbSql,
11
12
  d as usePbUpdate,
12
- e as useRecordAuditLog,
13
- f as useRecordAuditLogSnapshot,
14
- g as useSqlTable
13
+ e as useSqlTable
15
14
  };
@@ -0,0 +1,18 @@
1
+ import { AuditLogCollectionStatus, AuditLogEntry, AuditLogFilters } from '../lib/audit-log';
2
+ export type UseAuditLogOptions = {
3
+ pageSize?: number;
4
+ enabled?: boolean;
5
+ };
6
+ export type UseAuditLogResult = {
7
+ entries: AuditLogEntry[];
8
+ collectionStatus: AuditLogCollectionStatus[];
9
+ error: Error | null;
10
+ isLoading: boolean;
11
+ isFetching: boolean;
12
+ isLoadingMore: boolean;
13
+ hasMore: boolean;
14
+ loadMore: () => Promise<void>;
15
+ refresh: () => Promise<void>;
16
+ };
17
+ export declare function useAuditLog(collections: readonly string[], filters?: AuditLogFilters, options?: UseAuditLogOptions): UseAuditLogResult;
18
+ //# sourceMappingURL=use-audit-log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-audit-log.d.ts","sourceRoot":"","sources":["../../src/hooks/use-audit-log.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,eAAe,EAKrB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,gBAAgB,EAAE,wBAAwB,EAAE,CAAC;IAC7C,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B,CAAC;AAEF,wBAAgB,WAAW,CACzB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,OAAO,GAAE,eAAoB,EAC7B,OAAO,GAAE,kBAAuB,GAC/B,iBAAiB,CA+CnB"}