@dudousxd/nestjs-catalog-react 0.34.2 → 0.36.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 (191) hide show
  1. package/README.md +1 -0
  2. package/dist/AccessConsole.d.ts +1 -1
  3. package/dist/AccessConsole.js +19 -19
  4. package/dist/CatalogManager.js +11 -11
  5. package/dist/ConnectionPanel.js +9 -9
  6. package/dist/CoverageLedger.js +1 -1
  7. package/dist/DashboardBoard.js +10 -10
  8. package/dist/EditableField.js +1 -1
  9. package/dist/FlowView.js +4 -4
  10. package/dist/GovernanceTimeline.d.ts +1 -1
  11. package/dist/GovernanceTimeline.js +10 -8
  12. package/dist/LoadExpectationSection.js +6 -6
  13. package/dist/LoadedBySection.d.ts +1 -1
  14. package/dist/LoadedBySection.js +4 -4
  15. package/dist/ObjectExplorer.js +20 -18
  16. package/dist/PipelineConsole.js +9 -9
  17. package/dist/QueryConsole.js +7 -7
  18. package/dist/SavedQueryPanel.js +7 -7
  19. package/dist/TraceExplorer.d.ts +3 -2
  20. package/dist/TraceExplorer.js +22 -14
  21. package/dist/TransformEditor.js +8 -8
  22. package/dist/WorkflowCanvas.js +30 -30
  23. package/dist/charts/bklit/area-chart-loading.d.ts +2 -2
  24. package/dist/charts/bklit/area-chart-loading.js +4 -4
  25. package/dist/charts/bklit/area-chart.d.ts +3 -3
  26. package/dist/charts/bklit/area-chart.js +7 -7
  27. package/dist/charts/bklit/area-gradient-defs.d.ts +1 -1
  28. package/dist/charts/bklit/area-gradient-defs.js +1 -1
  29. package/dist/charts/bklit/area.d.ts +4 -4
  30. package/dist/charts/bklit/area.js +11 -11
  31. package/dist/charts/bklit/bar-chart-loading.d.ts +1 -1
  32. package/dist/charts/bklit/bar-chart-loading.js +1 -1
  33. package/dist/charts/bklit/bar-chart.d.ts +2 -2
  34. package/dist/charts/bklit/bar-chart.js +12 -12
  35. package/dist/charts/bklit/bar-squares.d.ts +1 -1
  36. package/dist/charts/bklit/bar-squares.js +5 -5
  37. package/dist/charts/bklit/bar-x-axis.js +2 -2
  38. package/dist/charts/bklit/bar-y-axis.js +2 -2
  39. package/dist/charts/bklit/bar.js +4 -4
  40. package/dist/charts/bklit/chart-context.d.ts +4 -4
  41. package/dist/charts/bklit/chart-context.js +1 -1
  42. package/dist/charts/bklit/chart-loading-label.js +3 -3
  43. package/dist/charts/bklit/chart-reveal-clip.js +1 -1
  44. package/dist/charts/bklit/grid.js +3 -3
  45. package/dist/charts/bklit/highlight-segment-bounds.d.ts +2 -2
  46. package/dist/charts/bklit/line-chart-loading.d.ts +2 -2
  47. package/dist/charts/bklit/line-chart-loading.js +4 -4
  48. package/dist/charts/bklit/line-chart.d.ts +3 -3
  49. package/dist/charts/bklit/line-chart.js +6 -6
  50. package/dist/charts/bklit/line-loading-pulse.d.ts +1 -1
  51. package/dist/charts/bklit/line-loading-pulse.js +3 -3
  52. package/dist/charts/bklit/line-series-terminal-marker.js +2 -2
  53. package/dist/charts/bklit/line.d.ts +4 -4
  54. package/dist/charts/bklit/line.js +11 -11
  55. package/dist/charts/bklit/loading-sweep.js +2 -2
  56. package/dist/charts/bklit/motion-utils.js +1 -1
  57. package/dist/charts/bklit/pattern-area.js +1 -1
  58. package/dist/charts/bklit/pattern-preset.js +1 -1
  59. package/dist/charts/bklit/projection-config.d.ts +1 -1
  60. package/dist/charts/bklit/projection-config.js +3 -3
  61. package/dist/charts/bklit/projection-line-end-marker.d.ts +1 -1
  62. package/dist/charts/bklit/projection-line-end-marker.js +1 -1
  63. package/dist/charts/bklit/projection-line.d.ts +1 -1
  64. package/dist/charts/bklit/projection-line.js +2 -2
  65. package/dist/charts/bklit/reference-area-config.js +1 -1
  66. package/dist/charts/bklit/reference-area-registration-context.d.ts +1 -1
  67. package/dist/charts/bklit/series-dash-tail-overlay.js +2 -2
  68. package/dist/charts/bklit/series-highlight-layer.js +3 -3
  69. package/dist/charts/bklit/series-hover-dim.js +2 -2
  70. package/dist/charts/bklit/series-markers.d.ts +1 -1
  71. package/dist/charts/bklit/series-markers.js +4 -4
  72. package/dist/charts/bklit/series-point-marker.js +1 -1
  73. package/dist/charts/bklit/time-series-chart-shell.d.ts +2 -2
  74. package/dist/charts/bklit/time-series-chart-shell.js +20 -20
  75. package/dist/charts/bklit/tooltip/chart-tooltip.d.ts +4 -4
  76. package/dist/charts/bklit/tooltip/chart-tooltip.js +8 -8
  77. package/dist/charts/bklit/tooltip/index.d.ts +6 -6
  78. package/dist/charts/bklit/tooltip/index.js +6 -6
  79. package/dist/charts/bklit/tooltip/tooltip-box.d.ts +1 -1
  80. package/dist/charts/bklit/tooltip/tooltip-box.js +3 -3
  81. package/dist/charts/bklit/tooltip/tooltip-content.js +1 -1
  82. package/dist/charts/bklit/tooltip/tooltip-dot.d.ts +1 -1
  83. package/dist/charts/bklit/tooltip/tooltip-dot.js +2 -2
  84. package/dist/charts/bklit/tooltip/tooltip-indicator.d.ts +2 -2
  85. package/dist/charts/bklit/tooltip/tooltip-indicator.js +3 -3
  86. package/dist/charts/bklit/use-animated-series-path.js +2 -2
  87. package/dist/charts/bklit/use-animated-y-domains.d.ts +2 -2
  88. package/dist/charts/bklit/use-animated-y-domains.js +2 -2
  89. package/dist/charts/bklit/use-chart-interaction.d.ts +1 -1
  90. package/dist/charts/bklit/use-chart-interaction.js +2 -2
  91. package/dist/charts/bklit/use-chart-phase-orchestrator.d.ts +1 -1
  92. package/dist/charts/bklit/use-chart-phase-orchestrator.js +1 -1
  93. package/dist/charts/bklit/use-grid-shimmer.js +1 -1
  94. package/dist/charts/bklit/use-highlight-segment.js +3 -3
  95. package/dist/charts/bklit/use-mount-progress.js +1 -1
  96. package/dist/charts/bklit/x-axis.js +5 -5
  97. package/dist/charts/bklit/y-axis-scales.d.ts +1 -1
  98. package/dist/charts/bklit/y-domain-utils.d.ts +2 -2
  99. package/dist/charts/bklit/y-domain-utils.js +2 -2
  100. package/dist/charts/bklit.d.ts +1 -1
  101. package/dist/charts/bklit.js +11 -11
  102. package/dist/charts/body.js +4 -4
  103. package/dist/charts/components/shimmering-text.js +1 -1
  104. package/dist/charts/css.d.ts +2 -2
  105. package/dist/charts/css.js +1 -1
  106. package/dist/charts/recharts.d.ts +1 -1
  107. package/dist/charts/recharts.js +2 -2
  108. package/dist/charts/skeleton.js +1 -1
  109. package/dist/connection-form.js +3 -3
  110. package/dist/context.d.ts +50 -24
  111. package/dist/context.js +48 -16
  112. package/dist/diff/RevisionDiff.d.ts +1 -1
  113. package/dist/diff/RevisionDiff.js +7 -7
  114. package/dist/embed/EmbeddedChart.d.ts +2 -2
  115. package/dist/embed/EmbeddedChart.js +4 -4
  116. package/dist/embed/EmbeddedDashboard.d.ts +2 -2
  117. package/dist/embed/EmbeddedDashboard.js +6 -6
  118. package/dist/embed/actions.d.ts +1 -1
  119. package/dist/embed/actions.js +2 -2
  120. package/dist/embed/chart-card.d.ts +2 -2
  121. package/dist/embed/chart-card.js +7 -7
  122. package/dist/embed/index.d.ts +5 -5
  123. package/dist/embed/index.js +4 -4
  124. package/dist/embed/slots.js +1 -1
  125. package/dist/export/index.d.ts +6 -6
  126. package/dist/export/index.js +6 -6
  127. package/dist/export/pdf.d.ts +2 -2
  128. package/dist/export/pdf.js +2 -2
  129. package/dist/export/png.d.ts +1 -1
  130. package/dist/export/png.js +1 -1
  131. package/dist/export/serialize.js +1 -1
  132. package/dist/export/use-pdf-export.d.ts +2 -2
  133. package/dist/export/use-pdf-export.js +3 -3
  134. package/dist/export/use-png-export.d.ts +1 -1
  135. package/dist/export/use-png-export.js +1 -1
  136. package/dist/index.d.ts +46 -46
  137. package/dist/index.js +46 -46
  138. package/dist/routes.d.ts +3 -2
  139. package/dist/routes.js +4 -4
  140. package/dist/schema-discovery.js +2 -2
  141. package/dist/search-console.d.ts +2 -2
  142. package/dist/search-console.js +8 -8
  143. package/dist/sharing.js +2 -2
  144. package/dist/source-connection.d.ts +1 -1
  145. package/dist/source-connection.js +6 -6
  146. package/dist/source-fields.d.ts +2 -2
  147. package/dist/source-fields.js +6 -6
  148. package/dist/ui/button.js +1 -1
  149. package/dist/ui/chart.js +1 -1
  150. package/dist/ui/code-editor.d.ts +2 -2
  151. package/dist/ui/code-editor.js +2 -2
  152. package/dist/ui/combobox.js +1 -1
  153. package/dist/ui/data-table.js +1 -1
  154. package/dist/ui/dialog.js +1 -1
  155. package/dist/ui/field.js +1 -1
  156. package/dist/ui/rich-text-field.js +2 -2
  157. package/dist/ui/select.js +1 -1
  158. package/dist/ui/sheet.js +2 -2
  159. package/dist/ui/switch.js +1 -1
  160. package/dist/ui/tabs.js +1 -1
  161. package/dist/ui/tooltip.js +1 -1
  162. package/dist/workflow/canvas-menu.d.ts +1 -1
  163. package/dist/workflow/canvas-menu.js +4 -4
  164. package/dist/workflow/create.d.ts +1 -1
  165. package/dist/workflow/create.js +4 -4
  166. package/dist/workflow/edges.d.ts +1 -1
  167. package/dist/workflow/edges.js +1 -1
  168. package/dist/workflow/graph.d.ts +2 -2
  169. package/dist/workflow/graph.js +2 -2
  170. package/dist/workflow/history.d.ts +1 -1
  171. package/dist/workflow/history.js +6 -6
  172. package/dist/workflow/index.d.ts +4 -4
  173. package/dist/workflow/index.js +4 -4
  174. package/dist/workflow/lifecycle.d.ts +2 -2
  175. package/dist/workflow/lifecycle.js +8 -8
  176. package/dist/workflow/menu.d.ts +2 -2
  177. package/dist/workflow/menu.js +3 -3
  178. package/dist/workflow/nodes.d.ts +2 -2
  179. package/dist/workflow/nodes.js +3 -3
  180. package/dist/workflow/place.d.ts +1 -1
  181. package/dist/workflow/place.js +1 -1
  182. package/dist/workflow/removal.d.ts +1 -1
  183. package/dist/workflow/removal.js +1 -1
  184. package/dist/workflow/runs.js +6 -6
  185. package/dist/workflow/shape.d.ts +1 -1
  186. package/dist/workflow/shape.js +1 -1
  187. package/dist/workflow/validate.d.ts +1 -1
  188. package/dist/workflow/validate.js +3 -3
  189. package/dist/workflow/wiring.d.ts +1 -1
  190. package/dist/workflow/wiring.js +4 -4
  191. package/package.json +9 -6
@@ -1,4 +1,4 @@
1
- import { type ChartRendererProps } from './registry';
1
+ import { type ChartRendererProps } from './registry.js';
2
2
  /**
3
3
  * The shadcn/ui chart renderer.
4
4
  *
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Area, AreaChart, Bar, BarChart, CartesianGrid, Line, LineChart, XAxis, YAxis, } from 'recharts';
3
- import { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent, } from '../ui/chart';
4
- import { seriesFrom } from './registry';
3
+ import { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent, } from '../ui/chart.js';
4
+ import { seriesFrom } from './registry.js';
5
5
  /**
6
6
  * The shadcn/ui chart renderer.
7
7
  *
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from '../cn';
2
+ import { cn } from '../cn.js';
3
3
  /** Deterministic, so the skeleton does not reshuffle on every render. */
4
4
  function heights(count) {
5
5
  const pattern = [0.55, 0.8, 0.42, 0.95, 0.62, 0.74, 0.35, 0.86, 0.5, 0.68];
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { CONNECTOR_KINDS, REDACTED_SECRET } from '@dudousxd/nestjs-catalog/client';
3
3
  import { CircleCheck, CircleX } from 'lucide-react';
4
- import { cn } from './cn';
5
- import { FieldGroup, TextField } from './ui/field';
6
- import { Switch } from './ui/switch';
4
+ import { cn } from './cn.js';
5
+ import { FieldGroup, TextField } from './ui/field.js';
6
+ import { Switch } from './ui/switch.js';
7
7
  /**
8
8
  * Describing where a *shared address* lives, in one place.
9
9
  *
package/dist/context.d.ts CHANGED
@@ -1,8 +1,8 @@
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
- import type { EmbeddedChartPayload, EmbeddedDashboardPayload } from './embed/payload';
4
- import { type PeopleQuery } from './routes';
5
- import type { CatalogWorkflow, CatalogWorkflowRelease, StorageAvailability, WorkflowDurability, WorkflowInput, WorkflowRun } from './workflow/model';
3
+ import type { EmbeddedChartPayload, EmbeddedDashboardPayload } from './embed/payload.js';
4
+ import { type PeopleQuery } from './routes.js';
5
+ import type { CatalogWorkflow, CatalogWorkflowRelease, StorageAvailability, WorkflowDurability, WorkflowInput, WorkflowRun } from './workflow/model.js';
6
6
  /**
7
7
  * How these screens talk to the server.
8
8
  *
@@ -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
- import { DEFAULT_ACCESS_BASE_PATH, DEFAULT_PIPELINE_BASE_PATH, DEFAULT_PUBLISH_BASE_PATH, accessRoutes, embedRoutes, pipelineRoutes, } from './routes';
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
@@ -1,4 +1,4 @@
1
- import type { CatalogCodeLanguage } from '../ui/code-languages';
1
+ import type { CatalogCodeLanguage } from '../ui/code-languages.js';
2
2
  /** Which of the two editable things in this catalog is being compared. */
3
3
  export type RevisionSubjectKind = 'transform' | 'saved-query';
4
4
  export interface RevisionSubject {
@@ -5,13 +5,13 @@ import { MultiFileDiff } from '@pierre/diffs/react';
5
5
  import { useQuery } from '@tanstack/react-query';
6
6
  import { GitCompare, History } from 'lucide-react';
7
7
  import { useMemo, useState } from 'react';
8
- import { cn } from '../cn';
9
- import { catalogQueryKeys, useCatalogClient } from '../context';
10
- import { Button } from '../ui/button';
11
- import { codeOptions } from '../ui/code-editor';
12
- import { useCodeThemeType } from '../ui/code-theme';
13
- import { SelectField } from '../ui/select';
14
- import { Sheet } from '../ui/sheet';
8
+ import { cn } from '../cn.js';
9
+ import { catalogQueryKeys, useCatalogClient } from '../context.js';
10
+ import { Button } from '../ui/button.js';
11
+ import { codeOptions } from '../ui/code-editor.js';
12
+ import { useCodeThemeType } from '../ui/code-theme.js';
13
+ import { SelectField } from '../ui/select.js';
14
+ import { Sheet } from '../ui/sheet.js';
15
15
  /**
16
16
  * Why a load came out different from the last one.
17
17
  *
@@ -1,5 +1,5 @@
1
- import type { EmbedActions } from './actions';
2
- import { type EmbedFailureSlot, type EmbedLoadingSlot } from './slots';
1
+ import type { EmbedActions } from './actions.js';
2
+ import { type EmbedFailureSlot, type EmbedLoadingSlot } from './slots.js';
3
3
  /**
4
4
  * One shared chart, for a host application's own page.
5
5
  *
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useQuery } from '@tanstack/react-query';
3
- import { cn } from '../cn';
4
- import { catalogQueryKeys, useCatalogClient } from '../context';
5
- import { EmbeddedChartCard } from './chart-card';
6
- import { renderFailure, renderLoading, } from './slots';
3
+ import { cn } from '../cn.js';
4
+ import { catalogQueryKeys, useCatalogClient } from '../context.js';
5
+ import { EmbeddedChartCard } from './chart-card.js';
6
+ import { renderFailure, renderLoading, } from './slots.js';
7
7
  export function EmbeddedChart({ chartId, actions, loading, failure, height = 200, className, }) {
8
8
  const client = useCatalogClient();
9
9
  const { data, isPending, error } = useQuery({
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { EmbedActions } from './actions';
3
- import { type EmbedFailureSlot, type EmbedLoadingSlot } from './slots';
2
+ import type { EmbedActions } from './actions.js';
3
+ import { type EmbedFailureSlot, type EmbedLoadingSlot } from './slots.js';
4
4
  /**
5
5
  * A whole shared dashboard, in a host application's own page.
6
6
  *
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useQuery } from '@tanstack/react-query';
3
- import { CHART_GRID, chartSpan } from '../charts/grid';
4
- import { cn } from '../cn';
5
- import { catalogQueryKeys, useCatalogClient } from '../context';
6
- import { EmbeddedChartCard } from './chart-card';
7
- import { chartsInLayoutOrder } from './payload';
8
- import { renderFailure, renderLoading, } from './slots';
3
+ import { CHART_GRID, chartSpan } from '../charts/grid.js';
4
+ import { cn } from '../cn.js';
5
+ import { catalogQueryKeys, useCatalogClient } from '../context.js';
6
+ import { EmbeddedChartCard } from './chart-card.js';
7
+ import { chartsInLayoutOrder } from './payload.js';
8
+ import { renderFailure, renderLoading, } from './slots.js';
9
9
  export function EmbeddedDashboard({ dashboardId, actions, loading, failure, height = 200, empty, className, }) {
10
10
  const client = useCatalogClient();
11
11
  const { data, isPending, error } = useQuery({
@@ -1,4 +1,4 @@
1
- import { type PngExportTarget } from '../export/use-png-export';
1
+ import { type PngExportTarget } from '../export/use-png-export.js';
2
2
  /**
3
3
  * What an embedded chart's toolbar may offer.
4
4
  *
@@ -1,5 +1,5 @@
1
- import { usePdfExport } from '../export/use-pdf-export';
2
- import { useHasExportableSvg } from '../export/use-png-export';
1
+ import { usePdfExport } from '../export/use-pdf-export.js';
2
+ import { useHasExportableSvg } from '../export/use-png-export.js';
3
3
  /**
4
4
  * Every action, in the order a toolbar draws them.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { type EmbedActions } from './actions';
2
- import type { EmbeddedChartPayload } from './payload';
1
+ import { type EmbedActions } from './actions.js';
2
+ import type { EmbeddedChartPayload } from './payload.js';
3
3
  /**
4
4
  * One embedded chart, drawn from a payload that has already arrived.
5
5
  *
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Download, FileDown, ImageDown } from 'lucide-react';
3
3
  import { useRef } from 'react';
4
- import { ChartBody } from '../charts/body';
5
- import { cn } from '../cn';
6
- import { useCatalogClient } from '../context';
7
- import { usePdfExport } from '../export/use-pdf-export';
8
- import { usePngExport } from '../export/use-png-export';
9
- import { useAvailableEmbedActions } from './actions';
10
- import { resultFromEmbed } from './payload';
4
+ import { ChartBody } from '../charts/body.js';
5
+ import { cn } from '../cn.js';
6
+ import { useCatalogClient } from '../context.js';
7
+ import { usePdfExport } from '../export/use-pdf-export.js';
8
+ import { usePngExport } from '../export/use-png-export.js';
9
+ import { useAvailableEmbedActions } from './actions.js';
10
+ import { resultFromEmbed } from './payload.js';
11
11
  const MUTED = 'text-zinc-400 dark:text-zinc-500';
12
12
  /**
13
13
  * One embedded chart, drawn from a payload that has already arrived.
@@ -5,8 +5,8 @@
5
5
  * same drawing code (`charts/body.tsx`), and differ in exactly one way: nothing
6
6
  * here can change anything. See `actions.ts` for what that rules out and why.
7
7
  */
8
- export { EMBED_ACTIONS, type EmbedAction, type EmbedActions, resolveEmbedActions, } from './actions';
9
- export { EmbeddedChart, type EmbeddedChartProps } from './EmbeddedChart';
10
- export { EmbeddedDashboard, type EmbeddedDashboardProps } from './EmbeddedDashboard';
11
- export { chartsInLayoutOrder, type EmbeddedChartPayload, type EmbeddedDashboardPayload, } from './payload';
12
- export type { EmbedFailureSlot, EmbedLoadingSlot } from './slots';
8
+ export { EMBED_ACTIONS, type EmbedAction, type EmbedActions, resolveEmbedActions, } from './actions.js';
9
+ export { EmbeddedChart, type EmbeddedChartProps } from './EmbeddedChart.js';
10
+ export { EmbeddedDashboard, type EmbeddedDashboardProps } from './EmbeddedDashboard.js';
11
+ export { chartsInLayoutOrder, type EmbeddedChartPayload, type EmbeddedDashboardPayload, } from './payload.js';
12
+ export type { EmbedFailureSlot, EmbedLoadingSlot } from './slots.js';
@@ -5,7 +5,7 @@
5
5
  * same drawing code (`charts/body.tsx`), and differ in exactly one way: nothing
6
6
  * here can change anything. See `actions.ts` for what that rules out and why.
7
7
  */
8
- export { EMBED_ACTIONS, resolveEmbedActions, } from './actions';
9
- export { EmbeddedChart } from './EmbeddedChart';
10
- export { EmbeddedDashboard } from './EmbeddedDashboard';
11
- export { chartsInLayoutOrder, } from './payload';
8
+ export { EMBED_ACTIONS, resolveEmbedActions, } from './actions.js';
9
+ export { EmbeddedChart } from './EmbeddedChart.js';
10
+ export { EmbeddedDashboard } from './EmbeddedDashboard.js';
11
+ export { chartsInLayoutOrder, } from './payload.js';
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { ChartFailed } from '../charts/skeleton';
2
+ import { ChartFailed } from '../charts/skeleton.js';
3
3
  /**
4
4
  * The default is empty space of the right height, not a spinner.
5
5
  *
@@ -13,9 +13,9 @@
13
13
  * real dimensions, and where nobody registered one there is no PDF action at
14
14
  * all — the rule `registeredChartLibraries()` already follows.
15
15
  */
16
- export { collectCustomProperties, resolveCssVariables, THEME_CUSTOM_PROPERTIES, } from './css-variables';
17
- export { type ExportBackground, resolveAncestorBackground, resolveSvgSize, type SerializedSvg, type SerializeSvgOptions, serializeSvg, svgToDataUri, } from './serialize';
18
- export { defaultPngFilename, downloadSvgAsPng, findExportableSvg, type PngExportOptions, rasteriseSerializedSvg, resolveScale, svgToPngBlob, triggerDownload, } from './png';
19
- export { canRasterise, type PngExport, type PngExportTarget, useHasExportableSvg, usePngExport, type UsePngExportOptions, } from './use-png-export';
20
- export { buildChartPdfSource, type ChartPdfExporter, type ChartPdfSource, exportSvgAsPdf, getPdfExporter, type PdfSourceOptions, registerPdfExporter, subscribeToPdfExporter, type SvgRasteriser, } from './pdf';
21
- export { type PdfExport, usePdfExport, type UsePdfExportOptions, } from './use-pdf-export';
16
+ export { collectCustomProperties, resolveCssVariables, THEME_CUSTOM_PROPERTIES, } from './css-variables.js';
17
+ export { type ExportBackground, resolveAncestorBackground, resolveSvgSize, type SerializedSvg, type SerializeSvgOptions, serializeSvg, svgToDataUri, } from './serialize.js';
18
+ export { defaultPngFilename, downloadSvgAsPng, findExportableSvg, type PngExportOptions, rasteriseSerializedSvg, resolveScale, svgToPngBlob, triggerDownload, } from './png.js';
19
+ export { canRasterise, type PngExport, type PngExportTarget, useHasExportableSvg, usePngExport, type UsePngExportOptions, } from './use-png-export.js';
20
+ export { buildChartPdfSource, type ChartPdfExporter, type ChartPdfSource, exportSvgAsPdf, getPdfExporter, type PdfSourceOptions, registerPdfExporter, subscribeToPdfExporter, type SvgRasteriser, } from './pdf.js';
21
+ export { type PdfExport, usePdfExport, type UsePdfExportOptions, } from './use-pdf-export.js';
@@ -13,9 +13,9 @@
13
13
  * real dimensions, and where nobody registered one there is no PDF action at
14
14
  * all — the rule `registeredChartLibraries()` already follows.
15
15
  */
16
- export { collectCustomProperties, resolveCssVariables, THEME_CUSTOM_PROPERTIES, } from './css-variables';
17
- export { resolveAncestorBackground, resolveSvgSize, serializeSvg, svgToDataUri, } from './serialize';
18
- export { defaultPngFilename, downloadSvgAsPng, findExportableSvg, rasteriseSerializedSvg, resolveScale, svgToPngBlob, triggerDownload, } from './png';
19
- export { canRasterise, useHasExportableSvg, usePngExport, } from './use-png-export';
20
- export { buildChartPdfSource, exportSvgAsPdf, getPdfExporter, registerPdfExporter, subscribeToPdfExporter, } from './pdf';
21
- export { usePdfExport, } from './use-pdf-export';
16
+ export { collectCustomProperties, resolveCssVariables, THEME_CUSTOM_PROPERTIES, } from './css-variables.js';
17
+ export { resolveAncestorBackground, resolveSvgSize, serializeSvg, svgToDataUri, } from './serialize.js';
18
+ export { defaultPngFilename, downloadSvgAsPng, findExportableSvg, rasteriseSerializedSvg, resolveScale, svgToPngBlob, triggerDownload, } from './png.js';
19
+ export { canRasterise, useHasExportableSvg, usePngExport, } from './use-png-export.js';
20
+ export { buildChartPdfSource, exportSvgAsPdf, getPdfExporter, registerPdfExporter, subscribeToPdfExporter, } from './pdf.js';
21
+ export { usePdfExport, } from './use-pdf-export.js';
@@ -1,5 +1,5 @@
1
- import { type PngExportOptions } from './png';
2
- import { type SerializedSvg } from './serialize';
1
+ import { type PngExportOptions } from './png.js';
2
+ import { type SerializedSvg } from './serialize.js';
3
3
  /**
4
4
  * PDF export, as a seam the host fills rather than a dependency this package takes.
5
5
  *
@@ -1,5 +1,5 @@
1
- import { rasteriseSerializedSvg } from './png';
2
- import { serializeSvg } from './serialize';
1
+ import { rasteriseSerializedSvg } from './png.js';
2
+ import { serializeSvg } from './serialize.js';
3
3
  /**
4
4
  * One slot, not a map by name.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { type SerializeSvgOptions, type SerializedSvg } from './serialize';
1
+ import { type SerializeSvgOptions, type SerializedSvg } from './serialize.js';
2
2
  /**
3
3
  * SVG chart → PNG, in the browser, with no dependency.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { serializeSvg, svgToDataUri, } from './serialize';
1
+ import { serializeSvg, svgToDataUri, } from './serialize.js';
2
2
  /**
3
3
  * The per-side limit every current browser enforces on a canvas.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { THEME_CUSTOM_PROPERTIES, collectCustomProperties, resolveCssVariables, } from './css-variables';
1
+ import { THEME_CUSTOM_PROPERTIES, collectCustomProperties, resolveCssVariables, } from './css-variables.js';
2
2
  /**
3
3
  * Turning a live chart `<svg>` into standalone markup that renders the same.
4
4
  *
@@ -1,5 +1,5 @@
1
- import { type ChartPdfSource, type PdfSourceOptions } from './pdf';
2
- import { type PngExportTarget } from './use-png-export';
1
+ import { type ChartPdfSource, type PdfSourceOptions } from './pdf.js';
2
+ import { type PngExportTarget } from './use-png-export.js';
3
3
  /**
4
4
  * The PDF action, as a toolbar actually needs it.
5
5
  *
@@ -1,7 +1,7 @@
1
1
  import { useCallback, useEffect, useRef, useState, useSyncExternalStore } from 'react';
2
- import { exportSvgAsPdf, getPdfExporter, subscribeToPdfExporter, } from './pdf';
3
- import { findExportableSvg } from './png';
4
- import { canRasterise, toExportError, unwrapExportTarget, useHasExportableSvg, } from './use-png-export';
2
+ import { exportSvgAsPdf, getPdfExporter, subscribeToPdfExporter, } from './pdf.js';
3
+ import { findExportableSvg } from './png.js';
4
+ import { canRasterise, toExportError, unwrapExportTarget, useHasExportableSvg, } from './use-png-export.js';
5
5
  export function usePdfExport(target, options = {}) {
6
6
  const [exporting, setExporting] = useState(false);
7
7
  const [error, setError] = useState(null);
@@ -1,4 +1,4 @@
1
- import { type PngExportOptions } from './png';
1
+ import { type PngExportOptions } from './png.js';
2
2
  /**
3
3
  * The export action, as a component actually needs it.
4
4
  *
@@ -1,5 +1,5 @@
1
1
  import { useCallback, useEffect, useRef, useState } from 'react';
2
- import { defaultPngFilename, downloadSvgAsPng, findExportableSvg, svgToPngBlob, } from './png';
2
+ import { defaultPngFilename, downloadSvgAsPng, findExportableSvg, svgToPngBlob, } from './png.js';
3
3
  /**
4
4
  * The element behind a target, whichever of the two forms it came in.
5
5
  *