@contractspec/example.marketplace 1.46.1 → 1.47.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 (112) hide show
  1. package/dist/entities/index.d.ts +296 -296
  2. package/dist/entities/index.js.map +1 -1
  3. package/dist/entities/order.d.ts +78 -78
  4. package/dist/entities/payout.d.ts +65 -65
  5. package/dist/entities/product.d.ts +70 -70
  6. package/dist/entities/review.d.ts +56 -56
  7. package/dist/entities/store.d.ts +41 -41
  8. package/dist/entities/store.d.ts.map +1 -1
  9. package/dist/example.d.ts +2 -2
  10. package/dist/example.d.ts.map +1 -1
  11. package/dist/example.js +4 -2
  12. package/dist/example.js.map +1 -1
  13. package/dist/handlers/index.d.ts +2 -0
  14. package/dist/handlers/index.js +3 -0
  15. package/dist/handlers/marketplace.handlers.d.ts +155 -0
  16. package/dist/handlers/marketplace.handlers.d.ts.map +1 -0
  17. package/dist/handlers/marketplace.handlers.js +329 -0
  18. package/dist/handlers/marketplace.handlers.js.map +1 -0
  19. package/dist/index.d.ts +6 -1
  20. package/dist/index.js +6 -1
  21. package/dist/marketplace.capability.d.ts +9 -0
  22. package/dist/marketplace.capability.d.ts.map +1 -0
  23. package/dist/marketplace.capability.js +34 -0
  24. package/dist/marketplace.capability.js.map +1 -0
  25. package/dist/marketplace.feature.d.ts +2 -2
  26. package/dist/marketplace.feature.d.ts.map +1 -1
  27. package/dist/marketplace.feature.js +7 -2
  28. package/dist/marketplace.feature.js.map +1 -1
  29. package/dist/order/order.enum.d.ts +2 -2
  30. package/dist/order/order.enum.d.ts.map +1 -1
  31. package/dist/order/order.event.d.ts +39 -39
  32. package/dist/order/order.event.d.ts.map +1 -1
  33. package/dist/order/order.event.js +1 -1
  34. package/dist/order/order.operations.d.ts +90 -90
  35. package/dist/order/order.operations.d.ts.map +1 -1
  36. package/dist/order/order.presentation.d.ts +4 -4
  37. package/dist/order/order.presentation.d.ts.map +1 -1
  38. package/dist/order/order.presentation.js +7 -7
  39. package/dist/order/order.presentation.js.map +1 -1
  40. package/dist/order/order.schema.d.ts +39 -39
  41. package/dist/payout/payout.enum.d.ts +2 -2
  42. package/dist/payout/payout.event.d.ts +17 -17
  43. package/dist/payout/payout.event.js +1 -1
  44. package/dist/payout/payout.operations.d.ts +24 -24
  45. package/dist/payout/payout.operations.d.ts.map +1 -1
  46. package/dist/payout/payout.presentation.d.ts +3 -3
  47. package/dist/payout/payout.presentation.d.ts.map +1 -1
  48. package/dist/payout/payout.presentation.js +5 -5
  49. package/dist/payout/payout.presentation.js.map +1 -1
  50. package/dist/payout/payout.schema.d.ts +37 -37
  51. package/dist/payout/payout.schema.d.ts.map +1 -1
  52. package/dist/product/product.enum.d.ts +2 -2
  53. package/dist/product/product.enum.d.ts.map +1 -1
  54. package/dist/product/product.event.d.ts +20 -20
  55. package/dist/product/product.event.d.ts.map +1 -1
  56. package/dist/product/product.event.js +1 -1
  57. package/dist/product/product.operations.d.ts +68 -68
  58. package/dist/product/product.operations.d.ts.map +1 -1
  59. package/dist/product/product.presentation.d.ts +4 -4
  60. package/dist/product/product.presentation.d.ts.map +1 -1
  61. package/dist/product/product.presentation.js +7 -7
  62. package/dist/product/product.presentation.js.map +1 -1
  63. package/dist/product/product.schema.d.ts +52 -52
  64. package/dist/review/review.enum.d.ts +2 -2
  65. package/dist/review/review.event.d.ts +15 -15
  66. package/dist/review/review.event.js +1 -1
  67. package/dist/review/review.operations.d.ts +59 -59
  68. package/dist/review/review.presentation.d.ts +3 -3
  69. package/dist/review/review.presentation.d.ts.map +1 -1
  70. package/dist/review/review.presentation.js +5 -5
  71. package/dist/review/review.presentation.js.map +1 -1
  72. package/dist/review/review.schema.d.ts +45 -45
  73. package/dist/review/review.schema.d.ts.map +1 -1
  74. package/dist/seeders/index.d.ts +10 -0
  75. package/dist/seeders/index.d.ts.map +1 -0
  76. package/dist/seeders/index.js +18 -0
  77. package/dist/seeders/index.js.map +1 -0
  78. package/dist/store/store.enum.d.ts +2 -2
  79. package/dist/store/store.event.d.ts +14 -14
  80. package/dist/store/store.event.d.ts.map +1 -1
  81. package/dist/store/store.event.js +1 -1
  82. package/dist/store/store.operations.d.ts +33 -33
  83. package/dist/store/store.operations.d.ts.map +1 -1
  84. package/dist/store/store.presentation.d.ts +3 -3
  85. package/dist/store/store.presentation.d.ts.map +1 -1
  86. package/dist/store/store.presentation.js +5 -5
  87. package/dist/store/store.presentation.js.map +1 -1
  88. package/dist/store/store.schema.d.ts +20 -20
  89. package/dist/store/store.schema.d.ts.map +1 -1
  90. package/dist/tests/operations.test-spec.d.ts +11 -0
  91. package/dist/tests/operations.test-spec.d.ts.map +1 -0
  92. package/dist/tests/operations.test-spec.js +152 -0
  93. package/dist/tests/operations.test-spec.js.map +1 -0
  94. package/dist/ui/MarketplaceDashboard.d.ts +7 -0
  95. package/dist/ui/MarketplaceDashboard.d.ts.map +1 -0
  96. package/dist/ui/MarketplaceDashboard.js +319 -0
  97. package/dist/ui/MarketplaceDashboard.js.map +1 -0
  98. package/dist/ui/hooks/index.d.ts +2 -0
  99. package/dist/ui/hooks/index.js +5 -0
  100. package/dist/ui/hooks/useMarketplaceData.d.ts +23 -0
  101. package/dist/ui/hooks/useMarketplaceData.d.ts.map +1 -0
  102. package/dist/ui/hooks/useMarketplaceData.js +64 -0
  103. package/dist/ui/hooks/useMarketplaceData.js.map +1 -0
  104. package/dist/ui/index.d.ts +6 -0
  105. package/dist/ui/index.js +6 -0
  106. package/dist/ui/renderers/index.d.ts +2 -0
  107. package/dist/ui/renderers/index.js +3 -0
  108. package/dist/ui/renderers/marketplace.markdown.d.ts +28 -0
  109. package/dist/ui/renderers/marketplace.markdown.d.ts.map +1 -0
  110. package/dist/ui/renderers/marketplace.markdown.js +244 -0
  111. package/dist/ui/renderers/marketplace.markdown.js.map +1 -0
  112. package/package.json +24 -8
@@ -0,0 +1,244 @@
1
+ //#region src/ui/renderers/marketplace.markdown.ts
2
+ const mockStores = [
3
+ {
4
+ id: "store-1",
5
+ name: "Tech Gadgets Store",
6
+ status: "ACTIVE",
7
+ productCount: 45,
8
+ rating: 4.8
9
+ },
10
+ {
11
+ id: "store-2",
12
+ name: "Home & Garden",
13
+ status: "ACTIVE",
14
+ productCount: 120,
15
+ rating: 4.5
16
+ },
17
+ {
18
+ id: "store-3",
19
+ name: "Fashion Boutique",
20
+ status: "PENDING",
21
+ productCount: 0,
22
+ rating: 0
23
+ }
24
+ ];
25
+ const mockProducts = [
26
+ {
27
+ id: "prod-1",
28
+ name: "Wireless Earbuds",
29
+ storeId: "store-1",
30
+ price: 79.99,
31
+ currency: "USD",
32
+ status: "ACTIVE",
33
+ stock: 150
34
+ },
35
+ {
36
+ id: "prod-2",
37
+ name: "Smart Watch",
38
+ storeId: "store-1",
39
+ price: 249.99,
40
+ currency: "USD",
41
+ status: "ACTIVE",
42
+ stock: 50
43
+ },
44
+ {
45
+ id: "prod-3",
46
+ name: "Garden Tools Set",
47
+ storeId: "store-2",
48
+ price: 89.99,
49
+ currency: "USD",
50
+ status: "ACTIVE",
51
+ stock: 30
52
+ },
53
+ {
54
+ id: "prod-4",
55
+ name: "Indoor Plant Kit",
56
+ storeId: "store-2",
57
+ price: 45.99,
58
+ currency: "USD",
59
+ status: "ACTIVE",
60
+ stock: 75
61
+ },
62
+ {
63
+ id: "prod-5",
64
+ name: "LED Desk Lamp",
65
+ storeId: "store-1",
66
+ price: 34.99,
67
+ currency: "USD",
68
+ status: "OUT_OF_STOCK",
69
+ stock: 0
70
+ }
71
+ ];
72
+ const mockOrders = [
73
+ {
74
+ id: "ord-1",
75
+ storeId: "store-1",
76
+ customerId: "cust-1",
77
+ total: 329.98,
78
+ currency: "USD",
79
+ status: "DELIVERED",
80
+ itemCount: 2,
81
+ createdAt: "2024-01-15T10:00:00Z"
82
+ },
83
+ {
84
+ id: "ord-2",
85
+ storeId: "store-2",
86
+ customerId: "cust-2",
87
+ total: 135.98,
88
+ currency: "USD",
89
+ status: "SHIPPED",
90
+ itemCount: 2,
91
+ createdAt: "2024-01-14T14:00:00Z"
92
+ },
93
+ {
94
+ id: "ord-3",
95
+ storeId: "store-1",
96
+ customerId: "cust-3",
97
+ total: 79.99,
98
+ currency: "USD",
99
+ status: "PROCESSING",
100
+ itemCount: 1,
101
+ createdAt: "2024-01-16T08:00:00Z"
102
+ },
103
+ {
104
+ id: "ord-4",
105
+ storeId: "store-2",
106
+ customerId: "cust-4",
107
+ total: 45.99,
108
+ currency: "USD",
109
+ status: "PENDING",
110
+ itemCount: 1,
111
+ createdAt: "2024-01-16T12:00:00Z"
112
+ }
113
+ ];
114
+ function formatCurrency(value, currency = "USD") {
115
+ return new Intl.NumberFormat("en-US", {
116
+ style: "currency",
117
+ currency,
118
+ minimumFractionDigits: 2
119
+ }).format(value);
120
+ }
121
+ /**
122
+ * Markdown renderer for Marketplace Dashboard
123
+ */
124
+ const marketplaceDashboardMarkdownRenderer = {
125
+ target: "markdown",
126
+ render: async (desc) => {
127
+ if (desc.source.type !== "component" || desc.source.componentKey !== "MarketplaceDashboard") throw new Error("marketplaceDashboardMarkdownRenderer: not MarketplaceDashboard");
128
+ const stores = mockStores;
129
+ const products = mockProducts;
130
+ const orders = mockOrders;
131
+ const activeStores = stores.filter((s) => s.status === "ACTIVE");
132
+ const activeProducts = products.filter((p) => p.status === "ACTIVE");
133
+ const totalRevenue = orders.reduce((sum, o) => sum + o.total, 0);
134
+ const pendingOrders = orders.filter((o) => o.status === "PENDING" || o.status === "PROCESSING");
135
+ const lines = [
136
+ "# Marketplace Dashboard",
137
+ "",
138
+ "> Two-sided marketplace overview",
139
+ "",
140
+ "## Summary",
141
+ "",
142
+ "| Metric | Value |",
143
+ "|--------|-------|",
144
+ `| Active Stores | ${activeStores.length} |`,
145
+ `| Active Products | ${activeProducts.length} |`,
146
+ `| Total Orders | ${orders.length} |`,
147
+ `| Total Revenue | ${formatCurrency(totalRevenue)} |`,
148
+ `| Pending Orders | ${pendingOrders.length} |`,
149
+ "",
150
+ "## Top Stores",
151
+ "",
152
+ "| Store | Products | Rating | Status |",
153
+ "|-------|----------|--------|--------|"
154
+ ];
155
+ for (const store of stores.slice(0, 5)) lines.push(`| ${store.name} | ${store.productCount} | ⭐ ${store.rating || "N/A"} | ${store.status} |`);
156
+ lines.push("");
157
+ lines.push("## Recent Orders");
158
+ lines.push("");
159
+ lines.push("| Order | Items | Total | Status | Date |");
160
+ lines.push("|-------|-------|-------|--------|------|");
161
+ for (const order of orders.slice(0, 10)) {
162
+ const date = new Date(order.createdAt).toLocaleDateString();
163
+ lines.push(`| ${order.id} | ${order.itemCount} | ${formatCurrency(order.total, order.currency)} | ${order.status} | ${date} |`);
164
+ }
165
+ return {
166
+ mimeType: "text/markdown",
167
+ body: lines.join("\n")
168
+ };
169
+ }
170
+ };
171
+ /**
172
+ * Markdown renderer for Product Catalog
173
+ */
174
+ const productCatalogMarkdownRenderer = {
175
+ target: "markdown",
176
+ render: async (desc) => {
177
+ if (desc.source.type !== "component" || desc.source.componentKey !== "ProductCatalog") throw new Error("productCatalogMarkdownRenderer: not ProductCatalog");
178
+ const products = mockProducts;
179
+ const stores = mockStores;
180
+ const lines = [
181
+ "# Product Catalog",
182
+ "",
183
+ "> Browse products across all marketplace stores",
184
+ ""
185
+ ];
186
+ for (const store of stores.filter((s) => s.status === "ACTIVE")) {
187
+ const storeProducts = products.filter((p) => p.storeId === store.id);
188
+ if (storeProducts.length === 0) continue;
189
+ lines.push(`## ${store.name}`);
190
+ lines.push("");
191
+ lines.push("| Product | Price | Stock | Status |");
192
+ lines.push("|---------|-------|-------|--------|");
193
+ for (const product of storeProducts) {
194
+ const stockStatus = product.stock > 0 ? `${product.stock} in stock` : "Out of stock";
195
+ lines.push(`| ${product.name} | ${formatCurrency(product.price, product.currency)} | ${stockStatus} | ${product.status} |`);
196
+ }
197
+ lines.push("");
198
+ }
199
+ return {
200
+ mimeType: "text/markdown",
201
+ body: lines.join("\n")
202
+ };
203
+ }
204
+ };
205
+ /**
206
+ * Markdown renderer for Order List
207
+ */
208
+ const orderListMarkdownRenderer = {
209
+ target: "markdown",
210
+ render: async (desc) => {
211
+ if (desc.source.type !== "component" || desc.source.componentKey !== "OrderList") throw new Error("orderListMarkdownRenderer: not OrderList");
212
+ const orders = mockOrders;
213
+ const stores = mockStores;
214
+ const lines = [
215
+ "# Orders",
216
+ "",
217
+ "> Manage marketplace orders",
218
+ "",
219
+ "| Order ID | Store | Items | Total | Status | Created |",
220
+ "|----------|-------|-------|-------|--------|---------|"
221
+ ];
222
+ for (const order of orders) {
223
+ const store = stores.find((s) => s.id === order.storeId);
224
+ const date = new Date(order.createdAt).toLocaleDateString();
225
+ lines.push(`| ${order.id} | ${store?.name ?? "Unknown"} | ${order.itemCount} | ${formatCurrency(order.total, order.currency)} | ${order.status} | ${date} |`);
226
+ }
227
+ lines.push("");
228
+ lines.push("## Order Status Legend");
229
+ lines.push("");
230
+ lines.push("- **PENDING**: Awaiting payment confirmation");
231
+ lines.push("- **PROCESSING**: Being prepared");
232
+ lines.push("- **SHIPPED**: In transit");
233
+ lines.push("- **DELIVERED**: Order completed");
234
+ lines.push("- **CANCELLED**: Order cancelled");
235
+ return {
236
+ mimeType: "text/markdown",
237
+ body: lines.join("\n")
238
+ };
239
+ }
240
+ };
241
+
242
+ //#endregion
243
+ export { marketplaceDashboardMarkdownRenderer, orderListMarkdownRenderer, productCatalogMarkdownRenderer };
244
+ //# sourceMappingURL=marketplace.markdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketplace.markdown.js","names":[],"sources":["../../../src/ui/renderers/marketplace.markdown.ts"],"sourcesContent":["/**\n * Markdown renderers for Marketplace presentations\n */\nimport type { PresentationRenderer } from '@contractspec/lib.contracts';\n\n// Mock data for marketplace rendering\nconst mockStores = [\n {\n id: 'store-1',\n name: 'Tech Gadgets Store',\n status: 'ACTIVE',\n productCount: 45,\n rating: 4.8,\n },\n {\n id: 'store-2',\n name: 'Home & Garden',\n status: 'ACTIVE',\n productCount: 120,\n rating: 4.5,\n },\n {\n id: 'store-3',\n name: 'Fashion Boutique',\n status: 'PENDING',\n productCount: 0,\n rating: 0,\n },\n];\n\nconst mockProducts = [\n {\n id: 'prod-1',\n name: 'Wireless Earbuds',\n storeId: 'store-1',\n price: 79.99,\n currency: 'USD',\n status: 'ACTIVE',\n stock: 150,\n },\n {\n id: 'prod-2',\n name: 'Smart Watch',\n storeId: 'store-1',\n price: 249.99,\n currency: 'USD',\n status: 'ACTIVE',\n stock: 50,\n },\n {\n id: 'prod-3',\n name: 'Garden Tools Set',\n storeId: 'store-2',\n price: 89.99,\n currency: 'USD',\n status: 'ACTIVE',\n stock: 30,\n },\n {\n id: 'prod-4',\n name: 'Indoor Plant Kit',\n storeId: 'store-2',\n price: 45.99,\n currency: 'USD',\n status: 'ACTIVE',\n stock: 75,\n },\n {\n id: 'prod-5',\n name: 'LED Desk Lamp',\n storeId: 'store-1',\n price: 34.99,\n currency: 'USD',\n status: 'OUT_OF_STOCK',\n stock: 0,\n },\n];\n\nconst mockOrders = [\n {\n id: 'ord-1',\n storeId: 'store-1',\n customerId: 'cust-1',\n total: 329.98,\n currency: 'USD',\n status: 'DELIVERED',\n itemCount: 2,\n createdAt: '2024-01-15T10:00:00Z',\n },\n {\n id: 'ord-2',\n storeId: 'store-2',\n customerId: 'cust-2',\n total: 135.98,\n currency: 'USD',\n status: 'SHIPPED',\n itemCount: 2,\n createdAt: '2024-01-14T14:00:00Z',\n },\n {\n id: 'ord-3',\n storeId: 'store-1',\n customerId: 'cust-3',\n total: 79.99,\n currency: 'USD',\n status: 'PROCESSING',\n itemCount: 1,\n createdAt: '2024-01-16T08:00:00Z',\n },\n {\n id: 'ord-4',\n storeId: 'store-2',\n customerId: 'cust-4',\n total: 45.99,\n currency: 'USD',\n status: 'PENDING',\n itemCount: 1,\n createdAt: '2024-01-16T12:00:00Z',\n },\n];\n\nfunction formatCurrency(value: number, currency = 'USD'): string {\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency,\n minimumFractionDigits: 2,\n }).format(value);\n}\n\n/**\n * Markdown renderer for Marketplace Dashboard\n */\nexport const marketplaceDashboardMarkdownRenderer: PresentationRenderer<{\n mimeType: string;\n body: string;\n}> = {\n target: 'markdown',\n render: async (desc) => {\n if (\n desc.source.type !== 'component' ||\n desc.source.componentKey !== 'MarketplaceDashboard'\n ) {\n throw new Error(\n 'marketplaceDashboardMarkdownRenderer: not MarketplaceDashboard'\n );\n }\n\n const stores = mockStores;\n const products = mockProducts;\n const orders = mockOrders;\n\n // Calculate stats\n const activeStores = stores.filter((s) => s.status === 'ACTIVE');\n const activeProducts = products.filter((p) => p.status === 'ACTIVE');\n const totalRevenue = orders.reduce((sum, o) => sum + o.total, 0);\n const pendingOrders = orders.filter(\n (o) => o.status === 'PENDING' || o.status === 'PROCESSING'\n );\n\n const lines: string[] = [\n '# Marketplace Dashboard',\n '',\n '> Two-sided marketplace overview',\n '',\n '## Summary',\n '',\n '| Metric | Value |',\n '|--------|-------|',\n `| Active Stores | ${activeStores.length} |`,\n `| Active Products | ${activeProducts.length} |`,\n `| Total Orders | ${orders.length} |`,\n `| Total Revenue | ${formatCurrency(totalRevenue)} |`,\n `| Pending Orders | ${pendingOrders.length} |`,\n '',\n '## Top Stores',\n '',\n '| Store | Products | Rating | Status |',\n '|-------|----------|--------|--------|',\n ];\n\n for (const store of stores.slice(0, 5)) {\n lines.push(\n `| ${store.name} | ${store.productCount} | ⭐ ${store.rating || 'N/A'} | ${store.status} |`\n );\n }\n\n lines.push('');\n lines.push('## Recent Orders');\n lines.push('');\n lines.push('| Order | Items | Total | Status | Date |');\n lines.push('|-------|-------|-------|--------|------|');\n\n for (const order of orders.slice(0, 10)) {\n const date = new Date(order.createdAt).toLocaleDateString();\n lines.push(\n `| ${order.id} | ${order.itemCount} | ${formatCurrency(order.total, order.currency)} | ${order.status} | ${date} |`\n );\n }\n\n return {\n mimeType: 'text/markdown',\n body: lines.join('\\n'),\n };\n },\n};\n\n/**\n * Markdown renderer for Product Catalog\n */\nexport const productCatalogMarkdownRenderer: PresentationRenderer<{\n mimeType: string;\n body: string;\n}> = {\n target: 'markdown',\n render: async (desc) => {\n if (\n desc.source.type !== 'component' ||\n desc.source.componentKey !== 'ProductCatalog'\n ) {\n throw new Error('productCatalogMarkdownRenderer: not ProductCatalog');\n }\n\n const products = mockProducts;\n const stores = mockStores;\n\n const lines: string[] = [\n '# Product Catalog',\n '',\n '> Browse products across all marketplace stores',\n '',\n ];\n\n // Group by store\n for (const store of stores.filter((s) => s.status === 'ACTIVE')) {\n const storeProducts = products.filter((p) => p.storeId === store.id);\n\n if (storeProducts.length === 0) continue;\n\n lines.push(`## ${store.name}`);\n lines.push('');\n lines.push('| Product | Price | Stock | Status |');\n lines.push('|---------|-------|-------|--------|');\n\n for (const product of storeProducts) {\n const stockStatus =\n product.stock > 0 ? `${product.stock} in stock` : 'Out of stock';\n lines.push(\n `| ${product.name} | ${formatCurrency(product.price, product.currency)} | ${stockStatus} | ${product.status} |`\n );\n }\n\n lines.push('');\n }\n\n return {\n mimeType: 'text/markdown',\n body: lines.join('\\n'),\n };\n },\n};\n\n/**\n * Markdown renderer for Order List\n */\nexport const orderListMarkdownRenderer: PresentationRenderer<{\n mimeType: string;\n body: string;\n}> = {\n target: 'markdown',\n render: async (desc) => {\n if (\n desc.source.type !== 'component' ||\n desc.source.componentKey !== 'OrderList'\n ) {\n throw new Error('orderListMarkdownRenderer: not OrderList');\n }\n\n const orders = mockOrders;\n const stores = mockStores;\n\n const lines: string[] = [\n '# Orders',\n '',\n '> Manage marketplace orders',\n '',\n '| Order ID | Store | Items | Total | Status | Created |',\n '|----------|-------|-------|-------|--------|---------|',\n ];\n\n for (const order of orders) {\n const store = stores.find((s) => s.id === order.storeId);\n const date = new Date(order.createdAt).toLocaleDateString();\n lines.push(\n `| ${order.id} | ${store?.name ?? 'Unknown'} | ${order.itemCount} | ${formatCurrency(order.total, order.currency)} | ${order.status} | ${date} |`\n );\n }\n\n lines.push('');\n lines.push('## Order Status Legend');\n lines.push('');\n lines.push('- **PENDING**: Awaiting payment confirmation');\n lines.push('- **PROCESSING**: Being prepared');\n lines.push('- **SHIPPED**: In transit');\n lines.push('- **DELIVERED**: Order completed');\n lines.push('- **CANCELLED**: Order cancelled');\n\n return {\n mimeType: 'text/markdown',\n body: lines.join('\\n'),\n };\n },\n};\n"],"mappings":";AAMA,MAAM,aAAa;CACjB;EACE,IAAI;EACJ,MAAM;EACN,QAAQ;EACR,cAAc;EACd,QAAQ;EACT;CACD;EACE,IAAI;EACJ,MAAM;EACN,QAAQ;EACR,cAAc;EACd,QAAQ;EACT;CACD;EACE,IAAI;EACJ,MAAM;EACN,QAAQ;EACR,cAAc;EACd,QAAQ;EACT;CACF;AAED,MAAM,eAAe;CACnB;EACE,IAAI;EACJ,MAAM;EACN,SAAS;EACT,OAAO;EACP,UAAU;EACV,QAAQ;EACR,OAAO;EACR;CACD;EACE,IAAI;EACJ,MAAM;EACN,SAAS;EACT,OAAO;EACP,UAAU;EACV,QAAQ;EACR,OAAO;EACR;CACD;EACE,IAAI;EACJ,MAAM;EACN,SAAS;EACT,OAAO;EACP,UAAU;EACV,QAAQ;EACR,OAAO;EACR;CACD;EACE,IAAI;EACJ,MAAM;EACN,SAAS;EACT,OAAO;EACP,UAAU;EACV,QAAQ;EACR,OAAO;EACR;CACD;EACE,IAAI;EACJ,MAAM;EACN,SAAS;EACT,OAAO;EACP,UAAU;EACV,QAAQ;EACR,OAAO;EACR;CACF;AAED,MAAM,aAAa;CACjB;EACE,IAAI;EACJ,SAAS;EACT,YAAY;EACZ,OAAO;EACP,UAAU;EACV,QAAQ;EACR,WAAW;EACX,WAAW;EACZ;CACD;EACE,IAAI;EACJ,SAAS;EACT,YAAY;EACZ,OAAO;EACP,UAAU;EACV,QAAQ;EACR,WAAW;EACX,WAAW;EACZ;CACD;EACE,IAAI;EACJ,SAAS;EACT,YAAY;EACZ,OAAO;EACP,UAAU;EACV,QAAQ;EACR,WAAW;EACX,WAAW;EACZ;CACD;EACE,IAAI;EACJ,SAAS;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AAS;EACf,MAAM,SAAS;EAEf,MAAM,QAAkB;GACtB;GACA;GACA;GACA;GACA;GACA;GACD;AAED,OAAK,MAAM,SAAS,QAAQ;GAC1B,MAAM,QAAQ,OAAO,MAAM,MAAM,EAAE,OAAO,MAAM,QAAQ;GACxD,MAAM,OAAO,IAAI,KAAK,MAAM,UAAU,CAAC,oBAAoB;AAC3D,SAAM,KACJ,KAAK,MAAM,GAAG,KAAK,OAAO,QAAQ,UAAU,KAAK,MAAM,UAAU,KAAK,eAAe,MAAM,OAAO,MAAM,SAAS,CAAC,KAAK,MAAM,OAAO,KAAK,KAAK,IAC/I;;AAGH,QAAM,KAAK,GAAG;AACd,QAAM,KAAK,yBAAyB;AACpC,QAAM,KAAK,GAAG;AACd,QAAM,KAAK,+CAA+C;AAC1D,QAAM,KAAK,mCAAmC;AAC9C,QAAM,KAAK,4BAA4B;AACvC,QAAM,KAAK,mCAAmC;AAC9C,QAAM,KAAK,mCAAmC;AAE9C,SAAO;GACL,UAAU;GACV,MAAM,MAAM,KAAK,KAAK;GACvB;;CAEJ"}
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@contractspec/example.marketplace",
3
- "version": "1.46.1",
3
+ "version": "1.47.0",
4
4
  "description": "Marketplace example with orders, payouts, and reviews for ContractSpec",
5
- "main": "./dist/index.js",
6
5
  "types": "./dist/index.d.ts",
7
6
  "type": "module",
8
7
  "scripts": {
@@ -18,13 +17,20 @@
18
17
  "lint:check": "eslint src"
19
18
  },
20
19
  "dependencies": {
21
- "@contractspec/lib.schema": "1.46.1",
22
- "@contractspec/lib.contracts": "1.46.1"
20
+ "@contractspec/lib.schema": "1.47.0",
21
+ "@contractspec/lib.contracts": "1.47.0",
22
+ "@contractspec/lib.example-shared-ui": "1.1.0",
23
+ "@contractspec/lib.design-system": "1.47.0",
24
+ "@contractspec/lib.runtime-sandbox": "0.2.0",
25
+ "react": "19.2.3",
26
+ "react-dom": "19.2.3"
23
27
  },
24
28
  "devDependencies": {
25
- "@contractspec/tool.typescript": "1.46.1",
26
- "@contractspec/tool.tsdown": "1.46.1",
27
- "typescript": "^5.9.3"
29
+ "@contractspec/tool.typescript": "1.47.0",
30
+ "@contractspec/tool.tsdown": "1.47.0",
31
+ "typescript": "^5.9.3",
32
+ "@types/react": "^19.2.8",
33
+ "@types/react-dom": "^19.2.2"
28
34
  },
29
35
  "exports": {
30
36
  ".": "./dist/index.js",
@@ -37,6 +43,9 @@
37
43
  "./entities/review": "./dist/entities/review.js",
38
44
  "./entities/store": "./dist/entities/store.js",
39
45
  "./example": "./dist/example.js",
46
+ "./handlers": "./dist/handlers/index.js",
47
+ "./handlers/marketplace.handlers": "./dist/handlers/marketplace.handlers.js",
48
+ "./marketplace.capability": "./dist/marketplace.capability.js",
40
49
  "./marketplace.feature": "./dist/marketplace.feature.js",
41
50
  "./order": "./dist/order/index.js",
42
51
  "./order/order.enum": "./dist/order/order.enum.js",
@@ -62,15 +71,22 @@
62
71
  "./review/review.operations": "./dist/review/review.operations.js",
63
72
  "./review/review.presentation": "./dist/review/review.presentation.js",
64
73
  "./review/review.schema": "./dist/review/review.schema.js",
74
+ "./seeders": "./dist/seeders/index.js",
65
75
  "./store": "./dist/store/index.js",
66
76
  "./store/store.enum": "./dist/store/store.enum.js",
67
77
  "./store/store.event": "./dist/store/store.event.js",
68
78
  "./store/store.operations": "./dist/store/store.operations.js",
69
79
  "./store/store.presentation": "./dist/store/store.presentation.js",
70
80
  "./store/store.schema": "./dist/store/store.schema.js",
81
+ "./tests/operations.test-spec": "./dist/tests/operations.test-spec.js",
82
+ "./ui": "./dist/ui/index.js",
83
+ "./ui/hooks": "./dist/ui/hooks/index.js",
84
+ "./ui/hooks/useMarketplaceData": "./dist/ui/hooks/useMarketplaceData.js",
85
+ "./ui/MarketplaceDashboard": "./dist/ui/MarketplaceDashboard.js",
86
+ "./ui/renderers": "./dist/ui/renderers/index.js",
87
+ "./ui/renderers/marketplace.markdown": "./dist/ui/renderers/marketplace.markdown.js",
71
88
  "./*": "./*"
72
89
  },
73
- "module": "./dist/index.js",
74
90
  "files": [
75
91
  "dist",
76
92
  "README.md"