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