@dudousxd/nestjs-catalog-react 0.35.0 → 0.37.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 (132) hide show
  1. package/{LICENSE-bklit → LICENSE} +1 -1
  2. package/README.md +12 -3
  3. package/THIRD_PARTY_NOTICES.md +34 -0
  4. package/dist/AccessConsole.js +14 -14
  5. package/dist/CatalogManager.d.ts +21 -1
  6. package/dist/CatalogManager.js +67 -25
  7. package/dist/EditableField.d.ts +7 -1
  8. package/dist/EditableField.js +7 -1
  9. package/dist/FlowView.js +1 -1
  10. package/dist/GovernanceTimeline.js +5 -3
  11. package/dist/LoadExpectationSection.d.ts +7 -1
  12. package/dist/LoadExpectationSection.js +5 -5
  13. package/dist/ObjectExplorer.d.ts +16 -1
  14. package/dist/ObjectExplorer.js +32 -16
  15. package/dist/TraceExplorer.d.ts +3 -2
  16. package/dist/TraceExplorer.js +19 -11
  17. package/dist/charts/bklit/animation.d.ts +1 -1
  18. package/dist/charts/bklit/area-chart-loading.js +1 -1
  19. package/dist/charts/bklit/area-chart.js +1 -1
  20. package/dist/charts/bklit/area-gradient-defs.d.ts +1 -1
  21. package/dist/charts/bklit/area-gradient-defs.js +1 -1
  22. package/dist/charts/bklit/area.js +1 -1
  23. package/dist/charts/bklit/bar-chart-loading.js +1 -1
  24. package/dist/charts/bklit/bar-chart.js +1 -1
  25. package/dist/charts/bklit/bar-depth-geometry.d.ts +1 -1
  26. package/dist/charts/bklit/bar-depth-geometry.js +1 -1
  27. package/dist/charts/bklit/bar-squares-layout.d.ts +1 -1
  28. package/dist/charts/bklit/bar-x-axis.js +1 -1
  29. package/dist/charts/bklit/bar-y-axis.js +1 -1
  30. package/dist/charts/bklit/chart-child-passthrough.d.ts +1 -1
  31. package/dist/charts/bklit/chart-child-passthrough.js +1 -1
  32. package/dist/charts/bklit/chart-config-context.d.ts +1 -1
  33. package/dist/charts/bklit/chart-config-context.js +1 -1
  34. package/dist/charts/bklit/chart-context.d.ts +1 -1
  35. package/dist/charts/bklit/chart-defs.d.ts +1 -1
  36. package/dist/charts/bklit/chart-defs.js +1 -1
  37. package/dist/charts/bklit/chart-formatters.d.ts +1 -1
  38. package/dist/charts/bklit/chart-formatters.js +1 -1
  39. package/dist/charts/bklit/chart-legend-hover.d.ts +1 -1
  40. package/dist/charts/bklit/chart-legend-hover.js +1 -1
  41. package/dist/charts/bklit/chart-loading-label.js +1 -1
  42. package/dist/charts/bklit/chart-phase.d.ts +1 -1
  43. package/dist/charts/bklit/chart-reveal-clip.d.ts +1 -1
  44. package/dist/charts/bklit/dash-tail-stroke.js +1 -1
  45. package/dist/charts/bklit/decimate-time-series.d.ts +1 -1
  46. package/dist/charts/bklit/decimate-time-series.js +1 -1
  47. package/dist/charts/bklit/fade-edges.d.ts +1 -1
  48. package/dist/charts/bklit/filter-data-by-x-domain.d.ts +1 -1
  49. package/dist/charts/bklit/filter-data-by-x-domain.js +1 -1
  50. package/dist/charts/bklit/generate-chart-skeleton-data.d.ts +1 -1
  51. package/dist/charts/bklit/generate-chart-skeleton-data.js +1 -1
  52. package/dist/charts/bklit/grid.js +1 -1
  53. package/dist/charts/bklit/highlight-segment-bounds.d.ts +1 -1
  54. package/dist/charts/bklit/highlight-segment.d.ts +1 -1
  55. package/dist/charts/bklit/highlight-segment.js +1 -1
  56. package/dist/charts/bklit/indicator-fade.d.ts +1 -1
  57. package/dist/charts/bklit/line-chart-loading.js +1 -1
  58. package/dist/charts/bklit/line-chart.js +1 -1
  59. package/dist/charts/bklit/line-loading-pulse.js +1 -1
  60. package/dist/charts/bklit/line-loading-timing.d.ts +1 -1
  61. package/dist/charts/bklit/line-loading-timing.js +1 -1
  62. package/dist/charts/bklit/line-series-terminal-marker.js +1 -1
  63. package/dist/charts/bklit/line.js +1 -1
  64. package/dist/charts/bklit/loading-sweep.js +1 -1
  65. package/dist/charts/bklit/motion-utils.d.ts +1 -1
  66. package/dist/charts/bklit/path-stroke-utils.d.ts +1 -1
  67. package/dist/charts/bklit/path-stroke-utils.js +1 -1
  68. package/dist/charts/bklit/pattern-area.js +1 -1
  69. package/dist/charts/bklit/pattern-preset.d.ts +1 -1
  70. package/dist/charts/bklit/projection-config.d.ts +1 -1
  71. package/dist/charts/bklit/projection-config.js +1 -1
  72. package/dist/charts/bklit/projection-line-end-marker.js +1 -1
  73. package/dist/charts/bklit/projection-line.js +1 -1
  74. package/dist/charts/bklit/projection-utils.d.ts +1 -1
  75. package/dist/charts/bklit/reference-area-config.d.ts +1 -1
  76. package/dist/charts/bklit/reference-area-config.js +1 -1
  77. package/dist/charts/bklit/reference-area-registration-context.js +1 -1
  78. package/dist/charts/bklit/series-bar-layout.d.ts +1 -1
  79. package/dist/charts/bklit/series-bar-layout.js +1 -1
  80. package/dist/charts/bklit/series-dash-tail-overlay.js +1 -1
  81. package/dist/charts/bklit/series-highlight-layer.d.ts +1 -1
  82. package/dist/charts/bklit/series-hover-dim.js +1 -1
  83. package/dist/charts/bklit/series-markers.js +1 -1
  84. package/dist/charts/bklit/series-path-utils.js +1 -1
  85. package/dist/charts/bklit/static-chart-preview-context.d.ts +1 -1
  86. package/dist/charts/bklit/static-chart-preview-context.js +1 -1
  87. package/dist/charts/bklit/time-series-chart-shell.js +1 -1
  88. package/dist/charts/bklit/tooltip/chart-tooltip.js +1 -1
  89. package/dist/charts/bklit/tooltip/date-ticker.js +1 -1
  90. package/dist/charts/bklit/tooltip/index.d.ts +1 -1
  91. package/dist/charts/bklit/tooltip/index.js +1 -1
  92. package/dist/charts/bklit/tooltip/tooltip-box.d.ts +1 -1
  93. package/dist/charts/bklit/tooltip/tooltip-box.js +1 -1
  94. package/dist/charts/bklit/tooltip/tooltip-content.d.ts +1 -1
  95. package/dist/charts/bklit/tooltip/tooltip-dot.js +1 -1
  96. package/dist/charts/bklit/tooltip/tooltip-indicator.js +1 -1
  97. package/dist/charts/bklit/use-animated-series-path.js +1 -1
  98. package/dist/charts/bklit/use-animated-y-domains.js +1 -1
  99. package/dist/charts/bklit/use-chart-interaction.js +1 -1
  100. package/dist/charts/bklit/use-chart-phase-orchestrator.js +1 -1
  101. package/dist/charts/bklit/use-enter-complete.d.ts +1 -1
  102. package/dist/charts/bklit/use-grid-shimmer.js +1 -1
  103. package/dist/charts/bklit/use-highlight-segment.d.ts +1 -1
  104. package/dist/charts/bklit/use-highlight-segment.js +1 -1
  105. package/dist/charts/bklit/use-mount-progress.d.ts +1 -1
  106. package/dist/charts/bklit/use-mount-progress.js +1 -1
  107. package/dist/charts/bklit/use-scheduled-tooltip.js +1 -1
  108. package/dist/charts/bklit/visx-pattern.d.ts +1 -1
  109. package/dist/charts/bklit/visx-pattern.js +1 -1
  110. package/dist/charts/bklit/x-axis.js +1 -1
  111. package/dist/charts/bklit/y-axis-scales.d.ts +1 -1
  112. package/dist/charts/bklit/y-axis-scales.js +1 -1
  113. package/dist/charts/bklit/y-axis-ticks.d.ts +1 -1
  114. package/dist/charts/bklit/y-axis-ticks.js +1 -1
  115. package/dist/charts/bklit/y-domain-utils.js +1 -1
  116. package/dist/charts/bklit.js +1 -1
  117. package/dist/charts/components/shimmering-text.d.ts +1 -1
  118. package/dist/charts/components/shimmering-text.js +1 -1
  119. package/dist/context.d.ts +47 -21
  120. package/dist/context.js +47 -15
  121. package/dist/index.d.ts +1 -1
  122. package/dist/index.js +1 -1
  123. package/dist/manager.d.ts +13 -0
  124. package/dist/manager.js +13 -0
  125. package/dist/routes.d.ts +3 -2
  126. package/dist/routes.js +4 -4
  127. package/dist/search-console.d.ts +2 -2
  128. package/dist/search-console.js +5 -5
  129. package/dist/ui/rich-text-field.d.ts +3 -1
  130. package/dist/ui/rich-text-field.js +4 -1
  131. package/dist/workflow/runs.js +1 -1
  132. package/package.json +15 -6
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Vendored from bklit-ui — https://github.com/bklit/bklit-ui
3
3
  * Copyright (c) 2026 uixmat. Released under the MIT licence; the full text is in
4
- * LICENSE-bklit at the root of this package.
4
+ * THIRD_PARTY_NOTICES.md at the root of this package.
5
5
  *
6
6
  * Local change: the `@/lib/utils` import was repointed at this package's own
7
7
  * `cn`, which is the same function. Nothing else is modified, so re-syncing
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  /**
4
4
  * Vendored from bklit-ui — https://github.com/bklit/bklit-ui
5
5
  * Copyright (c) 2026 uixmat. Released under the MIT licence; the full text is in
6
- * LICENSE-bklit at the root of this package.
6
+ * THIRD_PARTY_NOTICES.md at the root of this package.
7
7
  *
8
8
  * Local change: the `@/lib/utils` import was repointed at this package's own
9
9
  * `cn`, which is the same function. Nothing else is modified, so re-syncing
package/dist/context.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { CallableWorkflowRef, CatalogAuditEvent, CatalogConnection, CatalogConnector, CatalogObjectPage, CatalogQueryRelation, CatalogQueryResult, CatalogReusableNode, CatalogRevision, CatalogSearchResult, CatalogSnapshot, CatalogTrace, CatalogTraceList, CatalogTransform, ConnectionCheck, ConnectorRun, Dashboard, DashboardCard, DeleteReconciliation, LoadExpectation, LoadExpectationInput, ObjectQueryParams, PropertyPatch, ResolvedLoadExpectation, ReusableNodeBody, RowCountBound, SaveQueryInput, SavedQuery, SnapshotRef, StoredLoadExpectation, TraceQuery, TransformLanguage, TransformMode, TransformResult, TypePatch } from '@dudousxd/nestjs-catalog/client';
1
+ import type { CallableWorkflowRef, CatalogAuditEvent, CatalogConnection, CatalogConnector, CatalogObjectPage, CatalogQueryRelation, CatalogQueryResult, CatalogReusableNode, CatalogRevision, CatalogSearchResponse, CatalogSnapshot, CatalogTrace, CatalogTraceOutcome, CatalogTracePage, CatalogTransform, ConnectionCheck, ConnectorRun, Dashboard, DashboardCard, DeleteReconciliation, LoadExpectation, LoadExpectationInput, ObjectQueryParams, OffsetPage, PropertyPatch, ResolvedLoadExpectation, ReusableNodeBody, RowCountBound, SaveQueryInput, SavedQuery, SnapshotRef, StoredLoadExpectation, TransformLanguage, TransformMode, TransformResult, TypePatch } from '@dudousxd/nestjs-catalog/client';
2
2
  import { type ReactNode } from 'react';
3
3
  import type { EmbeddedChartPayload, EmbeddedDashboardPayload } from './embed/payload.js';
4
4
  import { type PeopleQuery } from './routes.js';
@@ -383,13 +383,37 @@ export interface CatalogPrincipalSummary {
383
383
  lastSeenAt: string | null;
384
384
  ownedTypes: string[];
385
385
  }
386
- export interface CatalogPeoplePage {
387
- people: CatalogPersonSummary[];
388
- /** How many match, ignoring the page. */
389
- total: number;
390
- limit: number;
391
- offset: number;
386
+ /**
387
+ * One page of people, in the Aviary offset list envelope. `meta.total` is how
388
+ * many match, ignoring the page.
389
+ */
390
+ export type CatalogPeoplePage = OffsetPage<CatalogPersonSummary>;
391
+ /**
392
+ * What the audit feed can be narrowed by. Sent as `filter[event]`,
393
+ * `filter[type]`, `filter[principal]` and `filter[occurredAt][gte]`.
394
+ */
395
+ export interface AuditEventFilters {
396
+ event?: string;
397
+ typeName?: string;
398
+ principalId?: string;
399
+ /** ISO timestamp; events at or after it. */
400
+ since?: string;
392
401
  }
402
+ /** `GET events`: the newest `size` events, newest first. */
403
+ export interface EventListQuery extends AuditEventFilters {
404
+ size?: number;
405
+ }
406
+ /** `GET events/traces`: one offset page of traces. */
407
+ export interface TraceListQuery extends AuditEventFilters {
408
+ /** One outcome, or any of several. Sent as `filter[outcome]=a,b`. */
409
+ outcome?: CatalogTraceOutcome | CatalogTraceOutcome[];
410
+ page?: number;
411
+ size?: number;
412
+ }
413
+ /** The `filter[...]` query parameters for the audit filters. Empty values are left out. */
414
+ export declare function auditFilterParams(query: AuditEventFilters & {
415
+ outcome?: TraceListQuery['outcome'];
416
+ }): Record<string, string>;
393
417
  /** A person: signs in, and acts through an application that caps them. */
394
418
  export interface CatalogPersonSummary {
395
419
  email: string;
@@ -461,11 +485,12 @@ export interface CatalogClient {
461
485
  * would live in whichever screen was written last — see the block above
462
486
  * `CatalogService.search`, which makes the argument where the code is.
463
487
  *
464
- * `limit` is the caller's request and the server's decision: it caps whatever
465
- * is asked for, and the answer carries `total` and `truncated` so a screen can
466
- * say "50 of 312" rather than implying the list it drew is the list.
488
+ * `size` is the caller's request and the server's decision: it caps whatever
489
+ * is asked for, and the answer carries `total` and `truncated` beside the hits
490
+ * in `data`, so a screen can say "50 of 312" rather than implying the list it
491
+ * drew is the list.
467
492
  */
468
- search(term: string, limit?: number): Promise<CatalogSearchResult>;
493
+ search(term: string, size?: number): Promise<CatalogSearchResponse>;
469
494
  workspaceCapabilities(): Promise<{
470
495
  workspace: boolean;
471
496
  query: boolean;
@@ -549,12 +574,10 @@ export interface CatalogClient {
549
574
  */
550
575
  embedChart(id: string): Promise<EmbeddedChartPayload>;
551
576
  embedDashboard(id: string): Promise<EmbeddedDashboardPayload>;
552
- listEvents(query: {
553
- event?: string;
554
- typeName?: string;
555
- principalId?: string;
556
- limit?: number;
557
- }): Promise<CatalogAuditEvent[]>;
577
+ /** The newest events, newest first, as `{ data }` — the feed has no pages. */
578
+ listEvents(query: EventListQuery): Promise<{
579
+ data: CatalogAuditEvent[];
580
+ }>;
558
581
  /**
559
582
  * The same events, grouped into one causal story each.
560
583
  *
@@ -562,7 +585,7 @@ export interface CatalogClient {
562
585
  * happened recently" and a trace answers "what happened during that load",
563
586
  * and collapsing the two would cost the first question its answer.
564
587
  */
565
- listTraces(query: TraceQuery): Promise<CatalogTraceList>;
588
+ listTraces(query: TraceListQuery): Promise<CatalogTracePage>;
566
589
  /**
567
590
  * One trace, with the event payloads `listTraces` leaves behind.
568
591
  *
@@ -674,7 +697,10 @@ export interface CatalogClient {
674
697
  * having done nothing.
675
698
  */
676
699
  publishType(name: string, schema: unknown): Promise<unknown>;
677
- listRuns(connectorId?: string): Promise<ConnectorRun[]>;
700
+ /** The newest runs, optionally of one connector, as `{ data }`. */
701
+ listRuns(connectorId?: string, size?: number): Promise<{
702
+ data: ConnectorRun[];
703
+ }>;
678
704
  /**
679
705
  * What one type promises about deletes and row counts, resolved.
680
706
  *
@@ -946,7 +972,7 @@ export declare function useCatalogClient(): CatalogClient;
946
972
  export declare const catalogQueryKeys: {
947
973
  all: readonly ["nestjs-catalog"];
948
974
  snapshot: readonly ["nestjs-catalog", "snapshot"];
949
- objects: (type: string, params: ObjectQueryParams) => readonly ["nestjs-catalog", "objects", string, ObjectQueryParams];
975
+ objects: (type: string, params: ObjectQueryParams) => readonly ["nestjs-catalog", "objects", string, import("@dudousxd/nestjs-catalog").CatalogObjectListParams];
950
976
  /**
951
977
  * A type's loads, keyed by type and NOT by the read's parameters.
952
978
  *
@@ -966,7 +992,7 @@ export declare const catalogQueryKeys: {
966
992
  * reload should invalidate `catalogQueryKeys.all`, which is what that prefix
967
993
  * is for.
968
994
  */
969
- search: (term: string, limit?: number) => readonly ["nestjs-catalog", "search", string, number | null];
995
+ search: (term: string, size?: number) => readonly ["nestjs-catalog", "search", string, number | null];
970
996
  /**
971
997
  * The pipeline keys are nested under one prefix so a host — or a screen that
972
998
  * just ran a pipeline — can invalidate the whole of it at once. Running one
package/dist/context.js CHANGED
@@ -1,7 +1,34 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { catalogRoutes } from '@dudousxd/nestjs-catalog/client';
2
+ import { catalogRoutes, objectQueryParams } from '@dudousxd/nestjs-catalog/client';
3
3
  import { createContext, useContext, useMemo } from 'react';
4
4
  import { DEFAULT_ACCESS_BASE_PATH, DEFAULT_PIPELINE_BASE_PATH, DEFAULT_PUBLISH_BASE_PATH, accessRoutes, embedRoutes, pipelineRoutes, } from './routes.js';
5
+ /** The `filter[...]` query parameters for the audit filters. Empty values are left out. */
6
+ export function auditFilterParams(query) {
7
+ const out = {};
8
+ if (query.event)
9
+ out['filter[event]'] = query.event;
10
+ if (query.typeName)
11
+ out['filter[type]'] = query.typeName;
12
+ if (query.principalId)
13
+ out['filter[principal]'] = query.principalId;
14
+ if (query.since)
15
+ out['filter[occurredAt][gte]'] = query.since;
16
+ const outcomes = query.outcome === undefined
17
+ ? []
18
+ : Array.isArray(query.outcome)
19
+ ? query.outcome
20
+ : [query.outcome];
21
+ if (outcomes.length > 0)
22
+ out['filter[outcome]'] = outcomes.join(',');
23
+ return out;
24
+ }
25
+ /** Page params, omitted when unset so a transport never sends `size=`. */
26
+ function pageParams(query) {
27
+ return {
28
+ ...(query.page === undefined ? {} : { page: query.page }),
29
+ ...(query.size === undefined ? {} : { size: query.size }),
30
+ };
31
+ }
5
32
  const CatalogContext = createContext(null);
6
33
  export function CatalogProvider({ transport, pipelineBasePath = DEFAULT_PIPELINE_BASE_PATH, publishBasePath = DEFAULT_PUBLISH_BASE_PATH, accessBasePath = DEFAULT_ACCESS_BASE_PATH, children, }) {
7
34
  const client = useMemo(() => {
@@ -9,23 +36,19 @@ export function CatalogProvider({ transport, pipelineBasePath = DEFAULT_PIPELINE
9
36
  const access = accessRoutes(accessBasePath);
10
37
  return {
11
38
  snapshot: () => transport.get(catalogRoutes.snapshot()),
12
- objects: (type, params) => transport.get(catalogRoutes.objects(type), {
13
- ...params,
14
- }),
39
+ objects: (type, params) => transport.get(catalogRoutes.objects(type), objectQueryParams(params)),
15
40
  snapshots: (type) => transport.get(catalogRoutes.snapshots(type)),
16
41
  patchType: (name, patch) => transport.patch(catalogRoutes.type(name), patch),
17
42
  patchProperty: (name, property, patch) => transport.patch(catalogRoutes.property(name, property), patch),
18
43
  reset: () => transport.post(catalogRoutes.reset()),
19
44
  queryRelations: () => transport.get(catalogRoutes.queryRelations()),
20
45
  runQuery: (input) => transport.post(catalogRoutes.query(), input),
21
- // `limit` is omitted rather than sent undefined when nobody asked for
46
+ // `size` is omitted rather than sent undefined when nobody asked for
22
47
  // one, for the reason `listRuns` states below: a transport that
23
- // serialises `limit=` hands the server an empty string, and `Number('')`
24
- // is 0 — which the route would floor back to 1 and answer with a single
25
- // row that reads as "there is only one match".
26
- search: (term, limit) => transport.get(catalogRoutes.search(), {
27
- q: term,
28
- ...(limit === undefined ? {} : { limit }),
48
+ // serialises `size=` hands the server an empty string.
49
+ search: (term, size) => transport.get(catalogRoutes.search(), {
50
+ search: term,
51
+ ...pageParams({ size }),
29
52
  }),
30
53
  workspaceCapabilities: () => transport.get(catalogRoutes.workspaceCapabilities()),
31
54
  listSavedQueries: () => transport.get(catalogRoutes.savedQueries()),
@@ -49,8 +72,14 @@ export function CatalogProvider({ transport, pipelineBasePath = DEFAULT_PIPELINE
49
72
  deleteDashboard: (id) => transport.delete(catalogRoutes.dashboard(id)),
50
73
  embedChart: (id) => transport.get(embedRoutes.chart(id)),
51
74
  embedDashboard: (id) => transport.get(embedRoutes.dashboard(id)),
52
- listEvents: (query) => transport.get(catalogRoutes.events(), { ...query }),
53
- listTraces: (query) => transport.get(catalogRoutes.traces(), { ...query }),
75
+ listEvents: (query) => transport.get(catalogRoutes.events(), {
76
+ ...auditFilterParams(query),
77
+ ...pageParams(query),
78
+ }),
79
+ listTraces: (query) => transport.get(catalogRoutes.traces(), {
80
+ ...auditFilterParams(query),
81
+ ...pageParams(query),
82
+ }),
54
83
  getTrace: (id) => transport.get(catalogRoutes.trace(id)),
55
84
  pipelineCapabilities: () => transport.get(pipeline.capabilities()),
56
85
  listCallableWorkflows: () => transport.get(pipeline.callableWorkflows()),
@@ -73,7 +102,10 @@ export function CatalogProvider({ transport, pipelineBasePath = DEFAULT_PIPELINE
73
102
  // named, because a transport that serialises `connector=` turns "every
74
103
  // run" into "runs of the connector whose id is the empty string", which
75
104
  // is an empty list that looks like a system that has never run anything.
76
- listRuns: (connectorId) => transport.get(pipeline.runs(), connectorId ? { connector: connectorId } : undefined),
105
+ listRuns: (connectorId, size) => transport.get(pipeline.runs(), {
106
+ ...(connectorId ? { 'filter[connector]': connectorId } : {}),
107
+ ...pageParams({ size }),
108
+ }),
77
109
  loadExpectation: (typeName) => transport.get(pipeline.loadExpectation(typeName)),
78
110
  setLoadExpectation: (typeName, input) => {
79
111
  if (!transport.put) {
@@ -181,7 +213,7 @@ export const catalogQueryKeys = {
181
213
  * reload should invalidate `catalogQueryKeys.all`, which is what that prefix
182
214
  * is for.
183
215
  */
184
- search: (term, limit) => ['nestjs-catalog', 'search', term, limit ?? null],
216
+ search: (term, size) => ['nestjs-catalog', 'search', term, size ?? null],
185
217
  /**
186
218
  * The pipeline keys are nested under one prefix so a host — or a screen that
187
219
  * just ran a pipeline — can invalidate the whole of it at once. Running one
package/dist/index.d.ts CHANGED
@@ -29,7 +29,7 @@ export { WORKFLOW_NAME } from './workflow/name.js';
29
29
  export { checkShapes, type ShapeKnowledge, type SourceColumn, type SourceShape, type TargetProperty, type TargetShape, } from './workflow/shape.js';
30
30
  export { canConnect, type ConnectionVerdict, edgeId, hasBlockingProblem, problemsByNode, type ValidateOptions, validateWorkflow, type WorkflowDraft, type WorkflowProblem, type WorkflowProblemCode, type WorkflowProblemLevel, wouldCycle, } from './workflow/validate.js';
31
31
  export { attachTransformIds, buildWorkflowTemplate, type EnrichOptions, enrichWithLookup, fanOutTypes, type FanOutOptions, type FanOutTarget, FILE_DROP_KINDS, type FileDropOptions, joinSources, type JoinOptions, loadFileDrop, type PeriodicFullReloadOptions, periodicFullReload, planIsRunnable, planToWorkflowInput, refuseUnusableColumnNames, RELOAD_CADENCE_IDS, RELOAD_CADENCES, type ReloadCadence, replicateTable, type ReplicateTableOptions, SOURCE_KINDS, type TemplateDeclaration, type TemplateExpectation, type TemplateOutcome, type TemplatePlan, type TemplateRefusal, type TemplateRefusalCode, type TemplateRequest, type TemplateSchedule, type TemplateTransformRequest, withinMsFor, WORKFLOW_TEMPLATE_IDS, WORKFLOW_TEMPLATES, type WorkflowTemplateId, type WorkflowTemplateMeta, } from './workflow/templates.js';
32
- export { type CatalogClient, type CatalogIdentity, type CatalogRevision, type CatalogPeoplePage, type CatalogPersonRole, type CatalogPersonSummary, type CatalogPrincipalSummary, CatalogProvider, type CatalogProviderProps, type CatalogTransport, type ConnectionInput, type ConnectionUse, catalogQueryKeys, type DeleteReconciliation, type LoadExpectation, type LoadExpectationInput, type ResolvedLoadExpectation, type RowCountBound, type StoredLoadExpectation, type PersonInput, type PersonUpsertResult, type PipelineCapabilities, type CallableWorkflowList, type ScheduledWorkflow, type TransformInput, type ListedReusableNode, type ReusableNodeInput, type ReusableNodeUsage, type SavedNodeAsReusable, type WorkflowReleaseInput, type WorkflowRunOptions, type WorkflowScheduleInput, useCatalogClient, } from './context.js';
32
+ export { type CatalogClient, type CatalogIdentity, type CatalogRevision, type CatalogPeoplePage, type AuditEventFilters, auditFilterParams, type EventListQuery, type TraceListQuery, type CatalogPersonRole, type CatalogPersonSummary, type CatalogPrincipalSummary, CatalogProvider, type CatalogProviderProps, type CatalogTransport, type ConnectionInput, type ConnectionUse, catalogQueryKeys, type DeleteReconciliation, type LoadExpectation, type LoadExpectationInput, type ResolvedLoadExpectation, type RowCountBound, type StoredLoadExpectation, type PersonInput, type PersonUpsertResult, type PipelineCapabilities, type CallableWorkflowList, type ScheduledWorkflow, type TransformInput, type ListedReusableNode, type ReusableNodeInput, type ReusableNodeUsage, type SavedNodeAsReusable, type WorkflowReleaseInput, type WorkflowRunOptions, type WorkflowScheduleInput, useCatalogClient, } from './context.js';
33
33
  export { type AccessRoutes, accessRoutes, DEFAULT_ACCESS_BASE_PATH, DEFAULT_PIPELINE_BASE_PATH, DEFAULT_PUBLISH_BASE_PATH, embedRoutes, type PeopleQuery, type PipelineRoutes, pipelineRoutes, } from './routes.js';
34
34
  export { ConfirmDialog } from './ui/dialog.js';
35
35
  export { FieldGroup, TextAreaField, TextField } from './ui/field.js';
package/dist/index.js CHANGED
@@ -137,7 +137,7 @@ export { canConnect, edgeId, hasBlockingProblem, problemsByNode, validateWorkflo
137
137
  // what it would decide — without installing a canvas to do it. Whether a screen
138
138
  // then draws the result is the canvas's business, not the template's.
139
139
  export { attachTransformIds, buildWorkflowTemplate, enrichWithLookup, fanOutTypes, FILE_DROP_KINDS, joinSources, loadFileDrop, periodicFullReload, planIsRunnable, planToWorkflowInput, refuseUnusableColumnNames, RELOAD_CADENCE_IDS, RELOAD_CADENCES, replicateTable, SOURCE_KINDS, withinMsFor, WORKFLOW_TEMPLATE_IDS, WORKFLOW_TEMPLATES, } from './workflow/templates.js';
140
- export { CatalogProvider, catalogQueryKeys, useCatalogClient, } from './context.js';
140
+ export { auditFilterParams, CatalogProvider, catalogQueryKeys, useCatalogClient, } from './context.js';
141
141
  // The paths behind the pipeline and access screens, exported so a host can
142
142
  // mount those endpoints wherever it likes and tell the provider where they are.
143
143
  // See routes.ts for why they are here rather than in the server package.
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The Model screen alone.
3
+ *
4
+ * `@dudousxd/nestjs-catalog-react/manager` exists for a host that mounts this one
5
+ * screen and nothing else. The root entry re-exports every screen in the package,
6
+ * and a bundler that cannot prove a module side-effect free keeps it, so a host
7
+ * importing `CatalogManager` from the root could end up shipping the workflow
8
+ * canvas, the diff viewer and the code editor with it. This entry reaches only
9
+ * what the screen itself imports. The provider and client come from the root
10
+ * entry as before; `CatalogProvider` and its hooks are one module instance either
11
+ * way, because both entries import the same `context.js`.
12
+ */
13
+ export { CatalogManager, type CatalogManagerProps } from './CatalogManager.js';
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The Model screen alone.
3
+ *
4
+ * `@dudousxd/nestjs-catalog-react/manager` exists for a host that mounts this one
5
+ * screen and nothing else. The root entry re-exports every screen in the package,
6
+ * and a bundler that cannot prove a module side-effect free keeps it, so a host
7
+ * importing `CatalogManager` from the root could end up shipping the workflow
8
+ * canvas, the diff viewer and the code editor with it. This entry reaches only
9
+ * what the screen itself imports. The provider and client come from the root
10
+ * entry as before; `CatalogProvider` and its hooks are one module instance either
11
+ * way, because both entries import the same `context.js`.
12
+ */
13
+ export { CatalogManager } from './CatalogManager.js';
package/dist/routes.d.ts CHANGED
@@ -328,9 +328,10 @@ export interface AccessRoutes {
328
328
  */
329
329
  people(query?: PeopleQuery): string;
330
330
  }
331
+ /** `search`, plus the Aviary offset paging params `page` (1-based) and `size`. */
331
332
  export interface PeopleQuery {
332
333
  search?: string;
333
- limit?: number;
334
- offset?: number;
334
+ page?: number;
335
+ size?: number;
335
336
  }
336
337
  export declare function accessRoutes(basePath?: string): AccessRoutes;
package/dist/routes.js CHANGED
@@ -170,10 +170,10 @@ export function accessRoutes(basePath = DEFAULT_ACCESS_BASE_PATH) {
170
170
  const params = new URLSearchParams();
171
171
  if (query?.search)
172
172
  params.set('search', query.search);
173
- if (query?.limit !== undefined)
174
- params.set('limit', String(query.limit));
175
- if (query?.offset !== undefined)
176
- params.set('offset', String(query.offset));
173
+ if (query?.page !== undefined)
174
+ params.set('page', String(query.page));
175
+ if (query?.size !== undefined)
176
+ params.set('size', String(query.size));
177
177
  const search = params.toString();
178
178
  return search ? `${base}/people?${search}` : `${base}/people`;
179
179
  },
@@ -14,10 +14,10 @@ export interface CatalogSearchProps {
14
14
  /** Where a dashboard opens. Omit to render dashboard rows as plain rows. */
15
15
  dashboardHref?: (id: string) => string;
16
16
  /** How many rows to ask for. The server caps whatever this says. */
17
- limit?: number;
17
+ size?: number;
18
18
  placeholder?: string;
19
19
  /** Heading copy, so the host can call this whatever its users call it. */
20
20
  title?: string;
21
21
  eyebrow?: string;
22
22
  }
23
- export declare function CatalogSearch({ explorerHref, savedQueryHref, dashboardHref, limit, placeholder, title, eyebrow, }: CatalogSearchProps): import("react").JSX.Element;
23
+ export declare function CatalogSearch({ explorerHref, savedQueryHref, dashboardHref, size, placeholder, title, eyebrow, }: CatalogSearchProps): import("react").JSX.Element;
@@ -66,7 +66,7 @@ const RANK_TONE = {
66
66
  * is not instant, and above the interval at which anybody types.
67
67
  */
68
68
  const DEBOUNCE_MS = 200;
69
- export function CatalogSearch({ explorerHref, savedQueryHref, dashboardHref, limit, placeholder = 'A type, a column, a report — whatever you remember', title = 'Search', eyebrow = 'Across the catalog', }) {
69
+ export function CatalogSearch({ explorerHref, savedQueryHref, dashboardHref, size, placeholder = 'A type, a column, a report — whatever you remember', title = 'Search', eyebrow = 'Across the catalog', }) {
70
70
  const client = useCatalogClient();
71
71
  const [term, setTerm] = useState('');
72
72
  const [debounced, setDebounced] = useState('');
@@ -76,8 +76,8 @@ export function CatalogSearch({ explorerHref, savedQueryHref, dashboardHref, lim
76
76
  }, [term]);
77
77
  const trimmed = debounced.trim();
78
78
  const { data, isFetching, isError } = useQuery({
79
- queryKey: catalogQueryKeys.search(trimmed, limit),
80
- queryFn: () => client.search(trimmed, limit),
79
+ queryKey: catalogQueryKeys.search(trimmed, size),
80
+ queryFn: () => client.search(trimmed, size),
81
81
  // An empty box asks nothing. The route answers an empty term with an empty
82
82
  // result rather than a 400, so this is politeness rather than protection —
83
83
  // but a request fired on mount, before anybody has typed, is a request the
@@ -89,7 +89,7 @@ export function CatalogSearch({ explorerHref, savedQueryHref, dashboardHref, lim
89
89
  staleTime: 15_000,
90
90
  });
91
91
  const grouped = useMemo(() => {
92
- const hits = data?.hits ?? [];
92
+ const hits = data?.data ?? [];
93
93
  return KIND_ORDER.map((kind) => [kind, hits.filter((hit) => hit.kind === kind)]).filter(([, rows]) => rows.length > 0);
94
94
  }, [data]);
95
95
  function hrefFor(hit) {
@@ -103,7 +103,7 @@ export function CatalogSearch({ explorerHref, savedQueryHref, dashboardHref, lim
103
103
  return savedQueryHref?.(hit.id);
104
104
  return dashboardHref?.(hit.id);
105
105
  }
106
- return (_jsxs("div", { className: "mx-auto flex h-full max-w-3xl flex-col px-6 py-8", children: [_jsxs("header", { className: "shrink-0", children: [_jsx("p", { className: cn('font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: eyebrow }), _jsx("h2", { className: "mt-1 text-2xl font-semibold tracking-tight", children: title })] }), _jsxs("div", { className: "relative mt-5 shrink-0", children: [_jsx(Search, { size: 14, className: cn('pointer-events-none absolute right-2.5 top-[1.9rem] z-10', MUTED) }), _jsx(TextField, { label: "Search the catalog", value: term, onChange: setTerm, placeholder: placeholder })] }), _jsxs("div", { className: "mt-4 min-h-0 flex-1 overflow-y-auto", children: [_jsx(Status, { term: trimmed, isError: isError, isFetching: isFetching, total: data?.total, shown: data?.hits.length, truncated: data?.truncated }), grouped.map(([kind, rows]) => (_jsxs("section", { className: "mb-5", children: [_jsxs("div", { className: cn('flex items-baseline justify-between border-b px-1 pb-1', RULE), children: [_jsx("span", { className: cn('font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: KIND_LABEL[kind] }), _jsx("span", { className: cn('font-mono text-[10px]', MUTED), children: rows.length })] }), rows.map((hit) => (_jsx(Row, { hit: hit, href: hrefFor(hit) }, `${hit.kind}:${hit.typeName ?? ''}:${hit.id}`)))] }, kind)))] })] }));
106
+ return (_jsxs("div", { className: "mx-auto flex h-full max-w-3xl flex-col px-6 py-8", children: [_jsxs("header", { className: "shrink-0", children: [_jsx("p", { className: cn('font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: eyebrow }), _jsx("h2", { className: "mt-1 text-2xl font-semibold tracking-tight", children: title })] }), _jsxs("div", { className: "relative mt-5 shrink-0", children: [_jsx(Search, { size: 14, className: cn('pointer-events-none absolute right-2.5 top-[1.9rem] z-10', MUTED) }), _jsx(TextField, { label: "Search the catalog", value: term, onChange: setTerm, placeholder: placeholder })] }), _jsxs("div", { className: "mt-4 min-h-0 flex-1 overflow-y-auto", children: [_jsx(Status, { term: trimmed, isError: isError, isFetching: isFetching, total: data?.total, shown: data?.data.length, truncated: data?.truncated }), grouped.map(([kind, rows]) => (_jsxs("section", { className: "mb-5", children: [_jsxs("div", { className: cn('flex items-baseline justify-between border-b px-1 pb-1', RULE), children: [_jsx("span", { className: cn('font-mono text-[10px] uppercase tracking-[0.14em]', MUTED), children: KIND_LABEL[kind] }), _jsx("span", { className: cn('font-mono text-[10px]', MUTED), children: rows.length })] }), rows.map((hit) => (_jsx(Row, { hit: hit, href: hrefFor(hit) }, `${hit.kind}:${hit.typeName ?? ''}:${hit.id}`)))] }, kind)))] })] }));
107
107
  }
108
108
  /**
109
109
  * The line above the results, which has four things to say and must not confuse
@@ -12,8 +12,10 @@ export interface RichTextFieldProps {
12
12
  label: string;
13
13
  placeholder?: string;
14
14
  className?: string;
15
+ /** Show the text and offer no editor. See `EditableField`'s `readOnly`. */
16
+ readOnly?: boolean;
15
17
  }
16
- export declare function RichTextField({ value, onSave, label, placeholder, className, }: RichTextFieldProps): import("react").JSX.Element;
18
+ export declare function RichTextField({ value, onSave, label, placeholder, className, readOnly, }: RichTextFieldProps): import("react").JSX.Element;
17
19
  /** Read-only, through the same editor, so one parser decides what the text means. */
18
20
  export declare function RichTextView({ value, className }: {
19
21
  value: string;
@@ -53,8 +53,11 @@ const EXTENSIONS = [
53
53
  * documents.
54
54
  */
55
55
  const PROSE = cn('[&_p]:my-0 [&_p+p]:mt-2', '[&_strong]:font-semibold', '[&_em]:italic', '[&_code]:rounded [&_code]:bg-zinc-100 [&_code]:px-1 [&_code]:font-mono [&_code]:text-[0.9em]', 'dark:[&_code]:bg-zinc-800', '[&_ul]:my-1 [&_ul]:list-disc [&_ul]:pl-4', '[&_ol]:my-1 [&_ol]:list-decimal [&_ol]:pl-4', '[&_li]:my-0.5');
56
- export function RichTextField({ value, onSave, label, placeholder = '—', className, }) {
56
+ export function RichTextField({ value, onSave, label, placeholder = '—', className, readOnly = false, }) {
57
57
  const [editing, setEditing] = useState(false);
58
+ if (readOnly) {
59
+ return (_jsx("div", { className: cn('w-full px-1.5 py-0.5 text-left', className), children: value ? (_jsx(RichTextView, { value: value })) : (_jsx("span", { className: "text-zinc-400 dark:text-zinc-500", children: placeholder })) }));
60
+ }
58
61
  if (!editing) {
59
62
  return (_jsx("button", { type: "button", onClick: () => setEditing(true), "aria-label": `Edit ${label}`, className: cn('w-full rounded-sm px-1.5 py-0.5 text-left', 'hover:bg-zinc-100 dark:hover:bg-zinc-800', className), children: value ? (_jsx(RichTextView, { value: value })) : (_jsx("span", { className: "text-zinc-400 dark:text-zinc-500", children: placeholder })) }));
60
63
  }
@@ -60,7 +60,7 @@ function RecentRuns({ connectorId, transforms, }) {
60
60
  const [comparing, setComparing] = useState(null);
61
61
  const { data: runs = [] } = useQuery({
62
62
  queryKey: catalogQueryKeys.runs(connectorId),
63
- queryFn: () => client.listRuns(connectorId),
63
+ queryFn: () => client.listRuns(connectorId).then((page) => page.data),
64
64
  });
65
65
  const only = transforms.length === 1 ? transforms[0] : undefined;
66
66
  if (runs.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dudousxd/nestjs-catalog-react",
3
- "version": "0.35.0",
3
+ "version": "0.37.0",
4
4
  "description": "Ready-made React screens for @dudousxd/nestjs-catalog — a model manager and a generic object explorer you can drop into your own app shell.",
5
5
  "license": "MIT",
6
6
  "author": "Davide Carvalho",
@@ -22,11 +22,19 @@
22
22
  "type": "module",
23
23
  "main": "dist/index.js",
24
24
  "types": "dist/index.d.ts",
25
+ "//sideEffects": "Only WorkflowCanvas is marked: it is the one module that imports CSS (React Flow's stylesheet), and a bundler told it was pure could drop that import and leave the canvas unstyled with no error. Nothing else runs at import time. Chart renderers are registered by the host calling registerChartRenderer, never by importing a module, and every other export is a component, a hook, a pure function or a declaration. Lets a host that mounts one screen, through ./manager or the root entry, drop the rest.",
26
+ "sideEffects": [
27
+ "./dist/WorkflowCanvas.js"
28
+ ],
25
29
  "exports": {
26
30
  ".": {
27
31
  "types": "./dist/index.d.ts",
28
32
  "default": "./dist/index.js"
29
33
  },
34
+ "./manager": {
35
+ "types": "./dist/manager.d.ts",
36
+ "default": "./dist/manager.js"
37
+ },
30
38
  "./recharts": {
31
39
  "types": "./dist/charts/recharts.d.ts",
32
40
  "default": "./dist/charts/recharts.js"
@@ -46,7 +54,8 @@
46
54
  },
47
55
  "files": [
48
56
  "dist",
49
- "LICENSE-bklit"
57
+ "LICENSE",
58
+ "THIRD_PARTY_NOTICES.md"
50
59
  ],
51
60
  "peerDependencies": {
52
61
  "@base-ui/react": ">=1.6.0",
@@ -54,7 +63,7 @@
54
63
  "@dnd-kit/core": ">=6",
55
64
  "@dnd-kit/sortable": ">=10",
56
65
  "@dnd-kit/utilities": ">=3",
57
- "@dudousxd/nestjs-catalog": ">=0.1.0",
66
+ "@dudousxd/nestjs-catalog": ">=0.36.0",
58
67
  "@tanstack/react-query": ">=5",
59
68
  "@tanstack/react-table": ">=9",
60
69
  "@tiptap/core": ">=3",
@@ -103,8 +112,8 @@
103
112
  "@visx/shape": "4.0.1-alpha.0",
104
113
  "@xyflow/react": "12.11.6",
105
114
  "clsx": "2.1.1",
106
- "d3-array": "3.2.4",
107
- "d3-shape": "3.2.0",
115
+ "d3-array": "3.2.5",
116
+ "d3-shape": "3.2.1",
108
117
  "lucide-react": "0.577.0",
109
118
  "motion": "12.43.0",
110
119
  "react": "19.3.1",
@@ -113,7 +122,7 @@
113
122
  "tailwind-merge": "3.7.0",
114
123
  "tiptap-markdown": "0.9.0",
115
124
  "typescript": "5.9.3",
116
- "@dudousxd/nestjs-catalog": "0.35.0"
125
+ "@dudousxd/nestjs-catalog": "0.37.0"
117
126
  },
118
127
  "dependencies": {
119
128
  "clsx": "2.1.1",