@contractspec/example.integration-hub 3.7.6 → 3.7.7

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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Sync domain - Sync configuration and execution.
3
3
  */
4
- export { SyncDirectionEnum, SyncStatusEnum, MappingTypeEnum, } from './sync.enum';
5
- export { FieldMappingModel, SyncConfigModel, SyncRunModel, CreateSyncConfigInputModel, AddFieldMappingInputModel, TriggerSyncInputModel, ListSyncRunsInputModel, ListSyncRunsOutputModel, } from './sync.schema';
6
- export { CreateSyncConfigContract, AddFieldMappingContract, TriggerSyncContract, ListSyncRunsContract, } from './sync.operations';
4
+ export { MappingTypeEnum, SyncDirectionEnum, SyncStatusEnum, } from './sync.enum';
5
+ export { AddFieldMappingContract, CreateSyncConfigContract, ListSyncRunsContract, TriggerSyncContract, } from './sync.operations';
6
+ export { AddFieldMappingInputModel, CreateSyncConfigInputModel, FieldMappingModel, ListSyncRunsInputModel, ListSyncRunsOutputModel, SyncConfigModel, SyncRunModel, TriggerSyncInputModel, } from './sync.schema';
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  // src/ui/hooks/useIntegrationData.ts
3
- import { useCallback, useEffect, useState } from "react";
4
3
  import { useTemplateRuntime } from "@contractspec/lib.example-shared-ui";
4
+ import { useCallback, useEffect, useState } from "react";
5
5
  "use client";
6
6
  function useIntegrationData(projectId = "local-project") {
7
7
  const { handlers } = useTemplateRuntime();
@@ -84,7 +84,6 @@ function IntegrationHubChat({
84
84
  }
85
85
 
86
86
  // src/ui/IntegrationDashboard.tsx
87
- import { useState as useState2 } from "react";
88
87
  import {
89
88
  Button,
90
89
  ErrorState,
@@ -92,6 +91,7 @@ import {
92
91
  StatCard,
93
92
  StatCardGroup
94
93
  } from "@contractspec/lib.design-system";
94
+ import { useState as useState2 } from "react";
95
95
  import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
96
96
  "use client";
97
97
  var STATUS_COLORS = {
@@ -148,7 +148,7 @@ function IntegrationDashboard() {
148
148
  className: "flex items-center justify-between",
149
149
  children: [
150
150
  /* @__PURE__ */ jsxDEV2("h2", {
151
- className: "text-2xl font-bold",
151
+ className: "font-bold text-2xl",
152
152
  children: "Integration Hub"
153
153
  }, undefined, false, undefined, this),
154
154
  /* @__PURE__ */ jsxDEV2(Button, {
@@ -183,14 +183,14 @@ function IntegrationDashboard() {
183
183
  ]
184
184
  }, undefined, true, undefined, this),
185
185
  /* @__PURE__ */ jsxDEV2("nav", {
186
- className: "bg-muted flex gap-1 rounded-lg p-1",
186
+ className: "flex gap-1 rounded-lg bg-muted p-1",
187
187
  role: "tablist",
188
188
  children: tabs.map((tab) => /* @__PURE__ */ jsxDEV2(Button, {
189
189
  type: "button",
190
190
  role: "tab",
191
191
  "aria-selected": activeTab === tab.id,
192
192
  onClick: () => setActiveTab(tab.id),
193
- className: `flex flex-1 items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-medium transition-colors ${activeTab === tab.id ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
193
+ className: `flex flex-1 items-center justify-center gap-2 rounded-md px-4 py-2 font-medium text-sm transition-colors ${activeTab === tab.id ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
194
194
  children: [
195
195
  /* @__PURE__ */ jsxDEV2("span", {
196
196
  children: tab.icon
@@ -207,7 +207,7 @@ function IntegrationDashboard() {
207
207
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
208
208
  children: [
209
209
  integrations.map((integration) => /* @__PURE__ */ jsxDEV2("div", {
210
- className: "border-border bg-card hover:bg-muted/50 cursor-pointer rounded-lg border p-4 transition-colors",
210
+ className: "cursor-pointer rounded-lg border border-border bg-card p-4 transition-colors hover:bg-muted/50",
211
211
  children: [
212
212
  /* @__PURE__ */ jsxDEV2("div", {
213
213
  className: "mb-3 flex items-center gap-3",
@@ -234,7 +234,7 @@ function IntegrationDashboard() {
234
234
  className: "flex items-center justify-between",
235
235
  children: [
236
236
  /* @__PURE__ */ jsxDEV2("span", {
237
- className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${STATUS_COLORS[integration.status] ?? ""}`,
237
+ className: `inline-flex rounded-full px-2 py-0.5 font-medium text-xs ${STATUS_COLORS[integration.status] ?? ""}`,
238
238
  children: integration.status
239
239
  }, undefined, false, undefined, this),
240
240
  /* @__PURE__ */ jsxDEV2("span", {
@@ -246,37 +246,37 @@ function IntegrationDashboard() {
246
246
  ]
247
247
  }, integration.id, true, undefined, this)),
248
248
  integrations.length === 0 && /* @__PURE__ */ jsxDEV2("div", {
249
- className: "text-muted-foreground col-span-full flex h-64 items-center justify-center",
249
+ className: "col-span-full flex h-64 items-center justify-center text-muted-foreground",
250
250
  children: "No integrations configured"
251
251
  }, undefined, false, undefined, this)
252
252
  ]
253
253
  }, undefined, true, undefined, this),
254
254
  activeTab === "connections" && /* @__PURE__ */ jsxDEV2("div", {
255
- className: "border-border rounded-lg border",
255
+ className: "rounded-lg border border-border",
256
256
  children: /* @__PURE__ */ jsxDEV2("table", {
257
257
  className: "w-full",
258
258
  children: [
259
259
  /* @__PURE__ */ jsxDEV2("thead", {
260
- className: "border-border bg-muted/30 border-b",
260
+ className: "border-border border-b bg-muted/30",
261
261
  children: /* @__PURE__ */ jsxDEV2("tr", {
262
262
  children: [
263
263
  /* @__PURE__ */ jsxDEV2("th", {
264
- className: "px-4 py-3 text-left text-sm font-medium",
264
+ className: "px-4 py-3 text-left font-medium text-sm",
265
265
  children: "Connection"
266
266
  }, undefined, false, undefined, this),
267
267
  /* @__PURE__ */ jsxDEV2("th", {
268
- className: "px-4 py-3 text-left text-sm font-medium",
268
+ className: "px-4 py-3 text-left font-medium text-sm",
269
269
  children: "Status"
270
270
  }, undefined, false, undefined, this),
271
271
  /* @__PURE__ */ jsxDEV2("th", {
272
- className: "px-4 py-3 text-left text-sm font-medium",
272
+ className: "px-4 py-3 text-left font-medium text-sm",
273
273
  children: "Last Sync"
274
274
  }, undefined, false, undefined, this)
275
275
  ]
276
276
  }, undefined, true, undefined, this)
277
277
  }, undefined, false, undefined, this),
278
278
  /* @__PURE__ */ jsxDEV2("tbody", {
279
- className: "divide-border divide-y",
279
+ className: "divide-y divide-border",
280
280
  children: [
281
281
  connections.map((conn) => /* @__PURE__ */ jsxDEV2("tr", {
282
282
  className: "hover:bg-muted/50",
@@ -291,12 +291,12 @@ function IntegrationDashboard() {
291
291
  /* @__PURE__ */ jsxDEV2("td", {
292
292
  className: "px-4 py-3",
293
293
  children: /* @__PURE__ */ jsxDEV2("span", {
294
- className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${STATUS_COLORS[conn.status] ?? ""}`,
294
+ className: `inline-flex rounded-full px-2 py-0.5 font-medium text-xs ${STATUS_COLORS[conn.status] ?? ""}`,
295
295
  children: conn.status
296
296
  }, undefined, false, undefined, this)
297
297
  }, undefined, false, undefined, this),
298
298
  /* @__PURE__ */ jsxDEV2("td", {
299
- className: "text-muted-foreground px-4 py-3 text-sm",
299
+ className: "px-4 py-3 text-muted-foreground text-sm",
300
300
  children: conn.lastSyncAt?.toLocaleString() ?? "Never"
301
301
  }, undefined, false, undefined, this)
302
302
  ]
@@ -304,7 +304,7 @@ function IntegrationDashboard() {
304
304
  connections.length === 0 && /* @__PURE__ */ jsxDEV2("tr", {
305
305
  children: /* @__PURE__ */ jsxDEV2("td", {
306
306
  colSpan: 3,
307
- className: "text-muted-foreground px-4 py-8 text-center",
307
+ className: "px-4 py-8 text-center text-muted-foreground",
308
308
  children: "No connections found"
309
309
  }, undefined, false, undefined, this)
310
310
  }, undefined, false, undefined, this)
@@ -324,35 +324,35 @@ function IntegrationDashboard() {
324
324
  className: "min-h-[400px]"
325
325
  }, undefined, false, undefined, this),
326
326
  activeTab === "syncs" && /* @__PURE__ */ jsxDEV2("div", {
327
- className: "border-border rounded-lg border",
327
+ className: "rounded-lg border border-border",
328
328
  children: /* @__PURE__ */ jsxDEV2("table", {
329
329
  className: "w-full",
330
330
  children: [
331
331
  /* @__PURE__ */ jsxDEV2("thead", {
332
- className: "border-border bg-muted/30 border-b",
332
+ className: "border-border border-b bg-muted/30",
333
333
  children: /* @__PURE__ */ jsxDEV2("tr", {
334
334
  children: [
335
335
  /* @__PURE__ */ jsxDEV2("th", {
336
- className: "px-4 py-3 text-left text-sm font-medium",
336
+ className: "px-4 py-3 text-left font-medium text-sm",
337
337
  children: "Sync Config"
338
338
  }, undefined, false, undefined, this),
339
339
  /* @__PURE__ */ jsxDEV2("th", {
340
- className: "px-4 py-3 text-left text-sm font-medium",
340
+ className: "px-4 py-3 text-left font-medium text-sm",
341
341
  children: "Frequency"
342
342
  }, undefined, false, undefined, this),
343
343
  /* @__PURE__ */ jsxDEV2("th", {
344
- className: "px-4 py-3 text-left text-sm font-medium",
344
+ className: "px-4 py-3 text-left font-medium text-sm",
345
345
  children: "Status"
346
346
  }, undefined, false, undefined, this),
347
347
  /* @__PURE__ */ jsxDEV2("th", {
348
- className: "px-4 py-3 text-left text-sm font-medium",
348
+ className: "px-4 py-3 text-left font-medium text-sm",
349
349
  children: "Records"
350
350
  }, undefined, false, undefined, this)
351
351
  ]
352
352
  }, undefined, true, undefined, this)
353
353
  }, undefined, false, undefined, this),
354
354
  /* @__PURE__ */ jsxDEV2("tbody", {
355
- className: "divide-border divide-y",
355
+ className: "divide-y divide-border",
356
356
  children: [
357
357
  syncConfigs.map((sync) => /* @__PURE__ */ jsxDEV2("tr", {
358
358
  className: "hover:bg-muted/50",
@@ -381,12 +381,12 @@ function IntegrationDashboard() {
381
381
  /* @__PURE__ */ jsxDEV2("td", {
382
382
  className: "px-4 py-3",
383
383
  children: /* @__PURE__ */ jsxDEV2("span", {
384
- className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${STATUS_COLORS[sync.status] ?? ""}`,
384
+ className: `inline-flex rounded-full px-2 py-0.5 font-medium text-xs ${STATUS_COLORS[sync.status] ?? ""}`,
385
385
  children: sync.status
386
386
  }, undefined, false, undefined, this)
387
387
  }, undefined, false, undefined, this),
388
388
  /* @__PURE__ */ jsxDEV2("td", {
389
- className: "text-muted-foreground px-4 py-3 text-sm",
389
+ className: "px-4 py-3 text-muted-foreground text-sm",
390
390
  children: sync.recordsSynced.toLocaleString()
391
391
  }, undefined, false, undefined, this)
392
392
  ]
@@ -394,7 +394,7 @@ function IntegrationDashboard() {
394
394
  syncConfigs.length === 0 && /* @__PURE__ */ jsxDEV2("tr", {
395
395
  children: /* @__PURE__ */ jsxDEV2("td", {
396
396
  colSpan: 4,
397
- className: "text-muted-foreground px-4 py-8 text-center",
397
+ className: "px-4 py-8 text-center text-muted-foreground",
398
398
  children: "No sync configurations found"
399
399
  }, undefined, false, undefined, this)
400
400
  }, undefined, false, undefined, this)
@@ -1 +1 @@
1
- export { useIntegrationData, type IntegrationStats, } from './useIntegrationData';
1
+ export { type IntegrationStats, useIntegrationData, } from './useIntegrationData';
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  // src/ui/hooks/useIntegrationData.ts
3
- import { useCallback, useEffect, useState } from "react";
4
3
  import { useTemplateRuntime } from "@contractspec/lib.example-shared-ui";
4
+ import { useCallback, useEffect, useState } from "react";
5
5
  "use client";
6
6
  function useIntegrationData(projectId = "local-project") {
7
7
  const { handlers } = useTemplateRuntime();
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  // src/ui/hooks/useIntegrationData.ts
3
- import { useCallback, useEffect, useState } from "react";
4
3
  import { useTemplateRuntime } from "@contractspec/lib.example-shared-ui";
4
+ import { useCallback, useEffect, useState } from "react";
5
5
  "use client";
6
6
  function useIntegrationData(projectId = "local-project") {
7
7
  const { handlers } = useTemplateRuntime();
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Integration Hub Template Components
3
3
  */
4
- export * from './renderers';
4
+ export * from './hooks';
5
5
  export { IntegrationDashboard } from './IntegrationDashboard';
6
6
  export { IntegrationHubChat } from './IntegrationHubChat';
7
- export * from './hooks';
7
+ export * from './renderers';