@contractspec/example.marketplace 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.
Files changed (60) hide show
  1. package/README.md +63 -131
  2. package/dist/browser/entities/index.js +470 -470
  3. package/dist/browser/index.js +945 -944
  4. package/dist/browser/order/index.js +155 -155
  5. package/dist/browser/order/order.event.js +1 -1
  6. package/dist/browser/payout/index.js +71 -71
  7. package/dist/browser/payout/payout.event.js +1 -1
  8. package/dist/browser/product/index.js +104 -104
  9. package/dist/browser/product/product.event.js +1 -1
  10. package/dist/browser/review/index.js +75 -75
  11. package/dist/browser/review/review.event.js +1 -1
  12. package/dist/browser/store/index.js +68 -68
  13. package/dist/browser/store/store.event.js +1 -1
  14. package/dist/browser/ui/MarketplaceDashboard.js +35 -35
  15. package/dist/browser/ui/hooks/index.js +1 -1
  16. package/dist/browser/ui/hooks/useMarketplaceData.js +1 -1
  17. package/dist/browser/ui/index.js +285 -284
  18. package/dist/entities/index.d.ts +110 -110
  19. package/dist/entities/index.js +470 -470
  20. package/dist/index.d.ts +3 -3
  21. package/dist/index.js +945 -944
  22. package/dist/node/entities/index.js +470 -470
  23. package/dist/node/index.js +945 -944
  24. package/dist/node/order/index.js +155 -155
  25. package/dist/node/order/order.event.js +1 -1
  26. package/dist/node/payout/index.js +71 -71
  27. package/dist/node/payout/payout.event.js +1 -1
  28. package/dist/node/product/index.js +104 -104
  29. package/dist/node/product/product.event.js +1 -1
  30. package/dist/node/review/index.js +75 -75
  31. package/dist/node/review/review.event.js +1 -1
  32. package/dist/node/store/index.js +68 -68
  33. package/dist/node/store/store.event.js +1 -1
  34. package/dist/node/ui/MarketplaceDashboard.js +35 -35
  35. package/dist/node/ui/hooks/index.js +1 -1
  36. package/dist/node/ui/hooks/useMarketplaceData.js +1 -1
  37. package/dist/node/ui/index.js +285 -284
  38. package/dist/order/index.d.ts +2 -2
  39. package/dist/order/index.js +155 -155
  40. package/dist/order/order.event.js +1 -1
  41. package/dist/payout/index.d.ts +2 -2
  42. package/dist/payout/index.js +71 -71
  43. package/dist/payout/payout.event.js +1 -1
  44. package/dist/product/index.d.ts +2 -2
  45. package/dist/product/index.js +104 -104
  46. package/dist/product/product.event.js +1 -1
  47. package/dist/review/index.d.ts +2 -2
  48. package/dist/review/index.js +75 -75
  49. package/dist/review/review.event.js +1 -1
  50. package/dist/store/index.d.ts +2 -2
  51. package/dist/store/index.js +68 -68
  52. package/dist/store/store.event.js +1 -1
  53. package/dist/ui/MarketplaceDashboard.js +35 -35
  54. package/dist/ui/hooks/index.d.ts +1 -1
  55. package/dist/ui/hooks/index.js +1 -1
  56. package/dist/ui/hooks/useMarketplaceData.js +1 -1
  57. package/dist/ui/index.d.ts +2 -2
  58. package/dist/ui/index.js +285 -284
  59. package/dist/ui/renderers/index.d.ts +1 -1
  60. package/package.json +6 -6
@@ -1,6 +1,6 @@
1
1
  // src/ui/hooks/useMarketplaceData.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 useMarketplaceData(projectId = "local-project") {
6
6
  const { handlers } = useTemplateRuntime();
@@ -53,7 +53,6 @@ function useMarketplaceData(projectId = "local-project") {
53
53
  }
54
54
 
55
55
  // src/ui/MarketplaceDashboard.tsx
56
- import { useState as useState2 } from "react";
57
56
  import {
58
57
  Button,
59
58
  ErrorState,
@@ -61,6 +60,7 @@ import {
61
60
  StatCard,
62
61
  StatCardGroup
63
62
  } from "@contractspec/lib.design-system";
63
+ import { useState as useState2 } from "react";
64
64
  import { jsxDEV } from "react/jsx-dev-runtime";
65
65
  "use client";
66
66
  var STATUS_COLORS = {
@@ -112,7 +112,7 @@ function MarketplaceDashboard() {
112
112
  className: "flex items-center justify-between",
113
113
  children: [
114
114
  /* @__PURE__ */ jsxDEV("h2", {
115
- className: "text-2xl font-bold",
115
+ className: "font-bold text-2xl",
116
116
  children: "Marketplace"
117
117
  }, undefined, false, undefined, this),
118
118
  /* @__PURE__ */ jsxDEV(Button, {
@@ -152,14 +152,14 @@ function MarketplaceDashboard() {
152
152
  ]
153
153
  }, undefined, true, undefined, this),
154
154
  /* @__PURE__ */ jsxDEV("nav", {
155
- className: "bg-muted flex gap-1 rounded-lg p-1",
155
+ className: "flex gap-1 rounded-lg bg-muted p-1",
156
156
  role: "tablist",
157
157
  children: tabs.map((tab) => /* @__PURE__ */ jsxDEV(Button, {
158
158
  type: "button",
159
159
  role: "tab",
160
160
  "aria-selected": activeTab === tab.id,
161
161
  onClick: () => setActiveTab(tab.id),
162
- 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"}`,
162
+ 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"}`,
163
163
  children: [
164
164
  /* @__PURE__ */ jsxDEV("span", {
165
165
  children: tab.icon
@@ -173,35 +173,35 @@ function MarketplaceDashboard() {
173
173
  role: "tabpanel",
174
174
  children: [
175
175
  activeTab === "stores" && /* @__PURE__ */ jsxDEV("div", {
176
- className: "border-border rounded-lg border",
176
+ className: "rounded-lg border border-border",
177
177
  children: /* @__PURE__ */ jsxDEV("table", {
178
178
  className: "w-full",
179
179
  children: [
180
180
  /* @__PURE__ */ jsxDEV("thead", {
181
- className: "border-border bg-muted/30 border-b",
181
+ className: "border-border border-b bg-muted/30",
182
182
  children: /* @__PURE__ */ jsxDEV("tr", {
183
183
  children: [
184
184
  /* @__PURE__ */ jsxDEV("th", {
185
- className: "px-4 py-3 text-left text-sm font-medium",
185
+ className: "px-4 py-3 text-left font-medium text-sm",
186
186
  children: "Store"
187
187
  }, undefined, false, undefined, this),
188
188
  /* @__PURE__ */ jsxDEV("th", {
189
- className: "px-4 py-3 text-left text-sm font-medium",
189
+ className: "px-4 py-3 text-left font-medium text-sm",
190
190
  children: "Status"
191
191
  }, undefined, false, undefined, this),
192
192
  /* @__PURE__ */ jsxDEV("th", {
193
- className: "px-4 py-3 text-left text-sm font-medium",
193
+ className: "px-4 py-3 text-left font-medium text-sm",
194
194
  children: "Rating"
195
195
  }, undefined, false, undefined, this),
196
196
  /* @__PURE__ */ jsxDEV("th", {
197
- className: "px-4 py-3 text-left text-sm font-medium",
197
+ className: "px-4 py-3 text-left font-medium text-sm",
198
198
  children: "Reviews"
199
199
  }, undefined, false, undefined, this)
200
200
  ]
201
201
  }, undefined, true, undefined, this)
202
202
  }, undefined, false, undefined, this),
203
203
  /* @__PURE__ */ jsxDEV("tbody", {
204
- className: "divide-border divide-y",
204
+ className: "divide-y divide-border",
205
205
  children: [
206
206
  stores.map((store) => /* @__PURE__ */ jsxDEV("tr", {
207
207
  className: "hover:bg-muted/50",
@@ -222,7 +222,7 @@ function MarketplaceDashboard() {
222
222
  /* @__PURE__ */ jsxDEV("td", {
223
223
  className: "px-4 py-3",
224
224
  children: /* @__PURE__ */ jsxDEV("span", {
225
- className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${STATUS_COLORS[store.status] ?? ""}`,
225
+ className: `inline-flex rounded-full px-2 py-0.5 font-medium text-xs ${STATUS_COLORS[store.status] ?? ""}`,
226
226
  children: store.status
227
227
  }, undefined, false, undefined, this)
228
228
  }, undefined, false, undefined, this),
@@ -237,7 +237,7 @@ function MarketplaceDashboard() {
237
237
  }, undefined, true, undefined, this)
238
238
  }, undefined, false, undefined, this),
239
239
  /* @__PURE__ */ jsxDEV("td", {
240
- className: "text-muted-foreground px-4 py-3 text-sm",
240
+ className: "px-4 py-3 text-muted-foreground text-sm",
241
241
  children: [
242
242
  store.reviewCount,
243
243
  " reviews"
@@ -248,7 +248,7 @@ function MarketplaceDashboard() {
248
248
  stores.length === 0 && /* @__PURE__ */ jsxDEV("tr", {
249
249
  children: /* @__PURE__ */ jsxDEV("td", {
250
250
  colSpan: 4,
251
- className: "text-muted-foreground px-4 py-8 text-center",
251
+ className: "px-4 py-8 text-center text-muted-foreground",
252
252
  children: "No stores found"
253
253
  }, undefined, false, undefined, this)
254
254
  }, undefined, false, undefined, this)
@@ -258,35 +258,35 @@ function MarketplaceDashboard() {
258
258
  }, undefined, true, undefined, this)
259
259
  }, undefined, false, undefined, this),
260
260
  activeTab === "products" && /* @__PURE__ */ jsxDEV("div", {
261
- className: "border-border rounded-lg border",
261
+ className: "rounded-lg border border-border",
262
262
  children: /* @__PURE__ */ jsxDEV("table", {
263
263
  className: "w-full",
264
264
  children: [
265
265
  /* @__PURE__ */ jsxDEV("thead", {
266
- className: "border-border bg-muted/30 border-b",
266
+ className: "border-border border-b bg-muted/30",
267
267
  children: /* @__PURE__ */ jsxDEV("tr", {
268
268
  children: [
269
269
  /* @__PURE__ */ jsxDEV("th", {
270
- className: "px-4 py-3 text-left text-sm font-medium",
270
+ className: "px-4 py-3 text-left font-medium text-sm",
271
271
  children: "Product"
272
272
  }, undefined, false, undefined, this),
273
273
  /* @__PURE__ */ jsxDEV("th", {
274
- className: "px-4 py-3 text-left text-sm font-medium",
274
+ className: "px-4 py-3 text-left font-medium text-sm",
275
275
  children: "Price"
276
276
  }, undefined, false, undefined, this),
277
277
  /* @__PURE__ */ jsxDEV("th", {
278
- className: "px-4 py-3 text-left text-sm font-medium",
278
+ className: "px-4 py-3 text-left font-medium text-sm",
279
279
  children: "Stock"
280
280
  }, undefined, false, undefined, this),
281
281
  /* @__PURE__ */ jsxDEV("th", {
282
- className: "px-4 py-3 text-left text-sm font-medium",
282
+ className: "px-4 py-3 text-left font-medium text-sm",
283
283
  children: "Status"
284
284
  }, undefined, false, undefined, this)
285
285
  ]
286
286
  }, undefined, true, undefined, this)
287
287
  }, undefined, false, undefined, this),
288
288
  /* @__PURE__ */ jsxDEV("tbody", {
289
- className: "divide-border divide-y",
289
+ className: "divide-y divide-border",
290
290
  children: [
291
291
  products.map((product) => /* @__PURE__ */ jsxDEV("tr", {
292
292
  className: "hover:bg-muted/50",
@@ -315,7 +315,7 @@ function MarketplaceDashboard() {
315
315
  /* @__PURE__ */ jsxDEV("td", {
316
316
  className: "px-4 py-3",
317
317
  children: /* @__PURE__ */ jsxDEV("span", {
318
- className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${STATUS_COLORS[product.status] ?? ""}`,
318
+ className: `inline-flex rounded-full px-2 py-0.5 font-medium text-xs ${STATUS_COLORS[product.status] ?? ""}`,
319
319
  children: product.status
320
320
  }, undefined, false, undefined, this)
321
321
  }, undefined, false, undefined, this)
@@ -324,7 +324,7 @@ function MarketplaceDashboard() {
324
324
  products.length === 0 && /* @__PURE__ */ jsxDEV("tr", {
325
325
  children: /* @__PURE__ */ jsxDEV("td", {
326
326
  colSpan: 4,
327
- className: "text-muted-foreground px-4 py-8 text-center",
327
+ className: "px-4 py-8 text-center text-muted-foreground",
328
328
  children: "No products found"
329
329
  }, undefined, false, undefined, this)
330
330
  }, undefined, false, undefined, this)
@@ -334,39 +334,39 @@ function MarketplaceDashboard() {
334
334
  }, undefined, true, undefined, this)
335
335
  }, undefined, false, undefined, this),
336
336
  activeTab === "orders" && /* @__PURE__ */ jsxDEV("div", {
337
- className: "border-border rounded-lg border",
337
+ className: "rounded-lg border border-border",
338
338
  children: /* @__PURE__ */ jsxDEV("table", {
339
339
  className: "w-full",
340
340
  children: [
341
341
  /* @__PURE__ */ jsxDEV("thead", {
342
- className: "border-border bg-muted/30 border-b",
342
+ className: "border-border border-b bg-muted/30",
343
343
  children: /* @__PURE__ */ jsxDEV("tr", {
344
344
  children: [
345
345
  /* @__PURE__ */ jsxDEV("th", {
346
- className: "px-4 py-3 text-left text-sm font-medium",
346
+ className: "px-4 py-3 text-left font-medium text-sm",
347
347
  children: "Order ID"
348
348
  }, undefined, false, undefined, this),
349
349
  /* @__PURE__ */ jsxDEV("th", {
350
- className: "px-4 py-3 text-left text-sm font-medium",
350
+ className: "px-4 py-3 text-left font-medium text-sm",
351
351
  children: "Customer"
352
352
  }, undefined, false, undefined, this),
353
353
  /* @__PURE__ */ jsxDEV("th", {
354
- className: "px-4 py-3 text-left text-sm font-medium",
354
+ className: "px-4 py-3 text-left font-medium text-sm",
355
355
  children: "Total"
356
356
  }, undefined, false, undefined, this),
357
357
  /* @__PURE__ */ jsxDEV("th", {
358
- className: "px-4 py-3 text-left text-sm font-medium",
358
+ className: "px-4 py-3 text-left font-medium text-sm",
359
359
  children: "Status"
360
360
  }, undefined, false, undefined, this),
361
361
  /* @__PURE__ */ jsxDEV("th", {
362
- className: "px-4 py-3 text-left text-sm font-medium",
362
+ className: "px-4 py-3 text-left font-medium text-sm",
363
363
  children: "Date"
364
364
  }, undefined, false, undefined, this)
365
365
  ]
366
366
  }, undefined, true, undefined, this)
367
367
  }, undefined, false, undefined, this),
368
368
  /* @__PURE__ */ jsxDEV("tbody", {
369
- className: "divide-border divide-y",
369
+ className: "divide-y divide-border",
370
370
  children: [
371
371
  orders.map((order) => /* @__PURE__ */ jsxDEV("tr", {
372
372
  className: "hover:bg-muted/50",
@@ -386,12 +386,12 @@ function MarketplaceDashboard() {
386
386
  /* @__PURE__ */ jsxDEV("td", {
387
387
  className: "px-4 py-3",
388
388
  children: /* @__PURE__ */ jsxDEV("span", {
389
- className: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${STATUS_COLORS[order.status] ?? ""}`,
389
+ className: `inline-flex rounded-full px-2 py-0.5 font-medium text-xs ${STATUS_COLORS[order.status] ?? ""}`,
390
390
  children: order.status
391
391
  }, undefined, false, undefined, this)
392
392
  }, undefined, false, undefined, this),
393
393
  /* @__PURE__ */ jsxDEV("td", {
394
- className: "text-muted-foreground px-4 py-3 text-sm",
394
+ className: "px-4 py-3 text-muted-foreground text-sm",
395
395
  children: order.createdAt.toLocaleDateString()
396
396
  }, undefined, false, undefined, this)
397
397
  ]
@@ -399,7 +399,7 @@ function MarketplaceDashboard() {
399
399
  orders.length === 0 && /* @__PURE__ */ jsxDEV("tr", {
400
400
  children: /* @__PURE__ */ jsxDEV("td", {
401
401
  colSpan: 5,
402
- className: "text-muted-foreground px-4 py-8 text-center",
402
+ className: "px-4 py-8 text-center text-muted-foreground",
403
403
  children: "No orders found"
404
404
  }, undefined, false, undefined, this)
405
405
  }, undefined, false, undefined, this)
@@ -1,6 +1,6 @@
1
1
  // src/ui/hooks/useMarketplaceData.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 useMarketplaceData(projectId = "local-project") {
6
6
  const { handlers } = useTemplateRuntime();
@@ -1,6 +1,6 @@
1
1
  // src/ui/hooks/useMarketplaceData.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 useMarketplaceData(projectId = "local-project") {
6
6
  const { handlers } = useTemplateRuntime();