@open-mercato/checkout 0.6.7-develop.6758.1.697eade236 → 0.6.7-develop.6768.1.9d2c4efc43

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.
@@ -0,0 +1,68 @@
1
+ import {
2
+ componentExtensionHost,
3
+ dataTableExtensionHost,
4
+ defineModuleExtensionPoints,
5
+ injectionExtensionHost
6
+ } from "@open-mercato/shared/modules/widgets/extension-points";
7
+ const payPageSpot = (spotId) => injectionExtensionHost({
8
+ family: "detail",
9
+ spotId,
10
+ supported: ["render-widget"],
11
+ contextContract: "checkout.pay-page.v1",
12
+ source: "components/PayPage.tsx"
13
+ });
14
+ const payPageComponent = (componentId) => componentExtensionHost({
15
+ componentId,
16
+ propsContract: "checkout.pay-page.v1",
17
+ source: "components/PayPage.tsx"
18
+ });
19
+ const extensionPoints = defineModuleExtensionPoints({
20
+ moduleId: "checkout",
21
+ hosts: {
22
+ linksTable: dataTableExtensionHost({ tableId: "checkout-links", source: "backend/checkout/pay-links/page.tsx" }),
23
+ templatesTable: dataTableExtensionHost({ tableId: "checkout-templates", source: "backend/checkout/templates/page.tsx" }),
24
+ transactionsTable: dataTableExtensionHost({ tableId: "checkout-transactions", source: "backend/checkout/transactions/page.tsx" }),
25
+ gatewayWidgetBefore: payPageSpot("checkout.pay-page:gateway-widget:before"),
26
+ gatewayRendererBefore: payPageSpot("checkout.pay-page:gateway-widget:renderer:before"),
27
+ gatewayRendererAfter: payPageSpot("checkout.pay-page:gateway-widget:renderer:after"),
28
+ gatewayActionsBefore: payPageSpot("checkout.pay-page:gateway-widget:actions:before"),
29
+ gatewayActionsAfter: payPageSpot("checkout.pay-page:gateway-widget:actions:after"),
30
+ gatewayWidgetAfter: payPageSpot("checkout.pay-page:gateway-widget:after"),
31
+ headerBefore: payPageSpot("checkout.pay-page:header:before"),
32
+ headerAfter: payPageSpot("checkout.pay-page:header:after"),
33
+ descriptionAfter: payPageSpot("checkout.pay-page:description:after"),
34
+ customerFieldsBefore: payPageSpot("checkout.pay-page:customer-fields:before"),
35
+ customerFieldsAfter: payPageSpot("checkout.pay-page:customer-fields:after"),
36
+ pricingBefore: payPageSpot("checkout.pay-page:pricing:before"),
37
+ pricingAfter: payPageSpot("checkout.pay-page:pricing:after"),
38
+ summaryBefore: payPageSpot("checkout.pay-page:summary:before"),
39
+ summaryAfter: payPageSpot("checkout.pay-page:summary:after"),
40
+ legalConsentBefore: payPageSpot("checkout.pay-page:legal-consent:before"),
41
+ legalConsentAfter: payPageSpot("checkout.pay-page:legal-consent:after"),
42
+ submitBefore: payPageSpot("checkout.pay-page:submit:before"),
43
+ submitAfter: payPageSpot("checkout.pay-page:submit:after"),
44
+ helpBefore: payPageSpot("checkout.pay-page:help:before"),
45
+ helpAfter: payPageSpot("checkout.pay-page:help:after"),
46
+ paymentBefore: payPageSpot("checkout.pay-page:payment:before"),
47
+ paymentAfter: payPageSpot("checkout.pay-page:payment:after"),
48
+ footerBefore: payPageSpot("checkout.pay-page:footer:before"),
49
+ footerAfter: payPageSpot("checkout.pay-page:footer:after"),
50
+ payPage: payPageComponent("page:checkout.pay-page"),
51
+ header: payPageComponent("section:checkout.pay-page.header"),
52
+ description: payPageComponent("section:checkout.pay-page.description"),
53
+ summary: payPageComponent("section:checkout.pay-page.summary"),
54
+ pricing: payPageComponent("section:checkout.pay-page.pricing"),
55
+ payment: payPageComponent("section:checkout.pay-page.payment"),
56
+ customerForm: payPageComponent("section:checkout.pay-page.customer-form"),
57
+ legalConsent: payPageComponent("section:checkout.pay-page.legal-consent"),
58
+ gatewayForm: payPageComponent("section:checkout.pay-page.gateway-form"),
59
+ help: payPageComponent("section:checkout.pay-page.help"),
60
+ footer: payPageComponent("section:checkout.pay-page.footer")
61
+ }
62
+ });
63
+ var extension_points_default = extensionPoints;
64
+ export {
65
+ extension_points_default as default,
66
+ extensionPoints
67
+ };
68
+ //# sourceMappingURL=extension-points.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/modules/checkout/extension-points.ts"],
4
+ "sourcesContent": ["import {\n componentExtensionHost,\n dataTableExtensionHost,\n defineModuleExtensionPoints,\n injectionExtensionHost,\n} from '@open-mercato/shared/modules/widgets/extension-points'\n\nconst payPageSpot = (spotId: string) => injectionExtensionHost({\n family: 'detail',\n spotId,\n supported: ['render-widget'],\n contextContract: 'checkout.pay-page.v1',\n source: 'components/PayPage.tsx',\n})\n\nconst payPageComponent = (componentId: string) => componentExtensionHost({\n componentId,\n propsContract: 'checkout.pay-page.v1',\n source: 'components/PayPage.tsx',\n})\n\nexport const extensionPoints = defineModuleExtensionPoints({\n moduleId: 'checkout',\n hosts: {\n linksTable: dataTableExtensionHost({ tableId: 'checkout-links', source: 'backend/checkout/pay-links/page.tsx' }),\n templatesTable: dataTableExtensionHost({ tableId: 'checkout-templates', source: 'backend/checkout/templates/page.tsx' }),\n transactionsTable: dataTableExtensionHost({ tableId: 'checkout-transactions', source: 'backend/checkout/transactions/page.tsx' }),\n gatewayWidgetBefore: payPageSpot('checkout.pay-page:gateway-widget:before'),\n gatewayRendererBefore: payPageSpot('checkout.pay-page:gateway-widget:renderer:before'),\n gatewayRendererAfter: payPageSpot('checkout.pay-page:gateway-widget:renderer:after'),\n gatewayActionsBefore: payPageSpot('checkout.pay-page:gateway-widget:actions:before'),\n gatewayActionsAfter: payPageSpot('checkout.pay-page:gateway-widget:actions:after'),\n gatewayWidgetAfter: payPageSpot('checkout.pay-page:gateway-widget:after'),\n headerBefore: payPageSpot('checkout.pay-page:header:before'),\n headerAfter: payPageSpot('checkout.pay-page:header:after'),\n descriptionAfter: payPageSpot('checkout.pay-page:description:after'),\n customerFieldsBefore: payPageSpot('checkout.pay-page:customer-fields:before'),\n customerFieldsAfter: payPageSpot('checkout.pay-page:customer-fields:after'),\n pricingBefore: payPageSpot('checkout.pay-page:pricing:before'),\n pricingAfter: payPageSpot('checkout.pay-page:pricing:after'),\n summaryBefore: payPageSpot('checkout.pay-page:summary:before'),\n summaryAfter: payPageSpot('checkout.pay-page:summary:after'),\n legalConsentBefore: payPageSpot('checkout.pay-page:legal-consent:before'),\n legalConsentAfter: payPageSpot('checkout.pay-page:legal-consent:after'),\n submitBefore: payPageSpot('checkout.pay-page:submit:before'),\n submitAfter: payPageSpot('checkout.pay-page:submit:after'),\n helpBefore: payPageSpot('checkout.pay-page:help:before'),\n helpAfter: payPageSpot('checkout.pay-page:help:after'),\n paymentBefore: payPageSpot('checkout.pay-page:payment:before'),\n paymentAfter: payPageSpot('checkout.pay-page:payment:after'),\n footerBefore: payPageSpot('checkout.pay-page:footer:before'),\n footerAfter: payPageSpot('checkout.pay-page:footer:after'),\n payPage: payPageComponent('page:checkout.pay-page'),\n header: payPageComponent('section:checkout.pay-page.header'),\n description: payPageComponent('section:checkout.pay-page.description'),\n summary: payPageComponent('section:checkout.pay-page.summary'),\n pricing: payPageComponent('section:checkout.pay-page.pricing'),\n payment: payPageComponent('section:checkout.pay-page.payment'),\n customerForm: payPageComponent('section:checkout.pay-page.customer-form'),\n legalConsent: payPageComponent('section:checkout.pay-page.legal-consent'),\n gatewayForm: payPageComponent('section:checkout.pay-page.gateway-form'),\n help: payPageComponent('section:checkout.pay-page.help'),\n footer: payPageComponent('section:checkout.pay-page.footer'),\n },\n})\n\nexport default extensionPoints\n"],
5
+ "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,cAAc,CAAC,WAAmB,uBAAuB;AAAA,EAC7D,QAAQ;AAAA,EACR;AAAA,EACA,WAAW,CAAC,eAAe;AAAA,EAC3B,iBAAiB;AAAA,EACjB,QAAQ;AACV,CAAC;AAED,MAAM,mBAAmB,CAAC,gBAAwB,uBAAuB;AAAA,EACvE;AAAA,EACA,eAAe;AAAA,EACf,QAAQ;AACV,CAAC;AAEM,MAAM,kBAAkB,4BAA4B;AAAA,EACzD,UAAU;AAAA,EACV,OAAO;AAAA,IACL,YAAY,uBAAuB,EAAE,SAAS,kBAAkB,QAAQ,sCAAsC,CAAC;AAAA,IAC/G,gBAAgB,uBAAuB,EAAE,SAAS,sBAAsB,QAAQ,sCAAsC,CAAC;AAAA,IACvH,mBAAmB,uBAAuB,EAAE,SAAS,yBAAyB,QAAQ,yCAAyC,CAAC;AAAA,IAChI,qBAAqB,YAAY,yCAAyC;AAAA,IAC1E,uBAAuB,YAAY,kDAAkD;AAAA,IACrF,sBAAsB,YAAY,iDAAiD;AAAA,IACnF,sBAAsB,YAAY,iDAAiD;AAAA,IACnF,qBAAqB,YAAY,gDAAgD;AAAA,IACjF,oBAAoB,YAAY,wCAAwC;AAAA,IACxE,cAAc,YAAY,iCAAiC;AAAA,IAC3D,aAAa,YAAY,gCAAgC;AAAA,IACzD,kBAAkB,YAAY,qCAAqC;AAAA,IACnE,sBAAsB,YAAY,0CAA0C;AAAA,IAC5E,qBAAqB,YAAY,yCAAyC;AAAA,IAC1E,eAAe,YAAY,kCAAkC;AAAA,IAC7D,cAAc,YAAY,iCAAiC;AAAA,IAC3D,eAAe,YAAY,kCAAkC;AAAA,IAC7D,cAAc,YAAY,iCAAiC;AAAA,IAC3D,oBAAoB,YAAY,wCAAwC;AAAA,IACxE,mBAAmB,YAAY,uCAAuC;AAAA,IACtE,cAAc,YAAY,iCAAiC;AAAA,IAC3D,aAAa,YAAY,gCAAgC;AAAA,IACzD,YAAY,YAAY,+BAA+B;AAAA,IACvD,WAAW,YAAY,8BAA8B;AAAA,IACrD,eAAe,YAAY,kCAAkC;AAAA,IAC7D,cAAc,YAAY,iCAAiC;AAAA,IAC3D,cAAc,YAAY,iCAAiC;AAAA,IAC3D,aAAa,YAAY,gCAAgC;AAAA,IACzD,SAAS,iBAAiB,wBAAwB;AAAA,IAClD,QAAQ,iBAAiB,kCAAkC;AAAA,IAC3D,aAAa,iBAAiB,uCAAuC;AAAA,IACrE,SAAS,iBAAiB,mCAAmC;AAAA,IAC7D,SAAS,iBAAiB,mCAAmC;AAAA,IAC7D,SAAS,iBAAiB,mCAAmC;AAAA,IAC7D,cAAc,iBAAiB,yCAAyC;AAAA,IACxE,cAAc,iBAAiB,yCAAyC;AAAA,IACxE,aAAa,iBAAiB,wCAAwC;AAAA,IACtE,MAAM,iBAAiB,gCAAgC;AAAA,IACvD,QAAQ,iBAAiB,kCAAkC;AAAA,EAC7D;AACF,CAAC;AAED,IAAO,2BAAQ;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mercato/checkout",
3
- "version": "0.6.7-develop.6758.1.697eade236",
3
+ "version": "0.6.7-develop.6768.1.9d2c4efc43",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -62,18 +62,18 @@
62
62
  }
63
63
  },
64
64
  "dependencies": {
65
- "@open-mercato/core": "0.6.7-develop.6758.1.697eade236",
66
- "@open-mercato/ui": "0.6.7-develop.6758.1.697eade236",
65
+ "@open-mercato/core": "0.6.7-develop.6768.1.9d2c4efc43",
66
+ "@open-mercato/ui": "0.6.7-develop.6768.1.9d2c4efc43",
67
67
  "bcryptjs": "^3.0.3"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "@mikro-orm/postgresql": "^7.0.14",
71
- "@open-mercato/shared": "0.6.7-develop.6758.1.697eade236",
71
+ "@open-mercato/shared": "0.6.7-develop.6768.1.9d2c4efc43",
72
72
  "react": "^19.0.0",
73
73
  "react-dom": "^19.0.0"
74
74
  },
75
75
  "devDependencies": {
76
- "@open-mercato/shared": "0.6.7-develop.6758.1.697eade236",
76
+ "@open-mercato/shared": "0.6.7-develop.6768.1.9d2c4efc43",
77
77
  "@types/jest": "^30.0.0",
78
78
  "@types/react": "^19.2.17",
79
79
  "@types/react-dom": "^19.2.3",
@@ -1,5 +1,6 @@
1
1
  "use client"
2
2
  import * as React from 'react'
3
+ import { extensionPoints } from '@open-mercato/checkout/modules/checkout/extension-points'
3
4
  import Link from 'next/link'
4
5
  import { Plus } from 'lucide-react'
5
6
  import type { ColumnDef } from '@tanstack/react-table'
@@ -197,7 +198,7 @@ export default function CheckoutPayLinksPage() {
197
198
  onFiltersClear={() => { setFilters({}); setPage(1) }}
198
199
  pagination={{ page, pageSize: 25, total, totalPages, onPageChange: setPage }}
199
200
  isLoading={loading}
200
- perspective={{ tableId: 'checkout-links' }}
201
+ perspective={{ tableId: extensionPoints.hosts.linksTable.tableId }}
201
202
  actions={(
202
203
  <Button asChild>
203
204
  <Link href="/backend/checkout/pay-links/create">
@@ -1,5 +1,6 @@
1
1
  "use client"
2
2
  import * as React from 'react'
3
+ import { extensionPoints } from '@open-mercato/checkout/modules/checkout/extension-points'
3
4
  import Link from 'next/link'
4
5
  import { Plus } from 'lucide-react'
5
6
  import type { ColumnDef } from '@tanstack/react-table'
@@ -121,7 +122,7 @@ export default function CheckoutTemplatesPage() {
121
122
  onFiltersApply={(next) => { setFilters(next); setPage(1) }}
122
123
  onFiltersClear={() => { setFilters({}); setPage(1) }}
123
124
  pagination={{ page, pageSize: 25, total, totalPages, onPageChange: setPage }}
124
- perspective={{ tableId: 'checkout-templates' }}
125
+ perspective={{ tableId: extensionPoints.hosts.templatesTable.tableId }}
125
126
  actions={(
126
127
  <Button asChild>
127
128
  <Link href="/backend/checkout/templates/create">
@@ -1,5 +1,6 @@
1
1
  "use client"
2
2
  import * as React from 'react'
3
+ import { extensionPoints } from '@open-mercato/checkout/modules/checkout/extension-points'
3
4
  import { useSearchParams } from 'next/navigation'
4
5
  import type { ColumnDef } from '@tanstack/react-table'
5
6
  import { useT } from '@open-mercato/shared/lib/i18n/context'
@@ -237,7 +238,7 @@ export default function CheckoutTransactionsPage() {
237
238
  onFiltersApply={(next) => { setFilters(next); setPage(1) }}
238
239
  onFiltersClear={() => { setFilters({}); setPage(1) }}
239
240
  pagination={{ page, pageSize: 25, total, totalPages, onPageChange: setPage }}
240
- perspective={{ tableId: 'checkout-transactions' }}
241
+ perspective={{ tableId: extensionPoints.hosts.transactionsTable.tableId }}
241
242
  rowClickActionIds={['view']}
242
243
  rowActions={(row) => <RowActions items={[{ id: 'view', label: t('checkout.admin.transactions.actions.viewDetail'), href: `/backend/checkout/transactions/${encodeURIComponent(row.id)}` }]} />}
243
244
  />
@@ -1,9 +1,9 @@
1
1
  "use client"
2
2
 
3
3
  import * as React from 'react'
4
+ import { extensionPoints } from '@open-mercato/checkout/modules/checkout/extension-points'
4
5
  import Link from 'next/link'
5
6
  import { useParams, useRouter, useSearchParams } from 'next/navigation'
6
- import { ComponentReplacementHandles } from '@open-mercato/shared/modules/widgets/component-registry'
7
7
  import { useLocale, useT } from '@open-mercato/shared/lib/i18n/context'
8
8
  import { locales, type Locale } from '@open-mercato/shared/lib/i18n/config'
9
9
  import type { CustomFieldDisplayEntry } from '@open-mercato/shared/lib/crud/custom-fields'
@@ -270,17 +270,17 @@ export type PayPageFooterProps = {
270
270
  themeTokens: PayPageThemeTokens
271
271
  }
272
272
 
273
- const PAGE_HANDLE = ComponentReplacementHandles.page('checkout.pay-page')
274
- const HEADER_HANDLE = ComponentReplacementHandles.section('checkout.pay-page', 'header')
275
- const DESCRIPTION_HANDLE = ComponentReplacementHandles.section('checkout.pay-page', 'description')
276
- const SUMMARY_HANDLE = ComponentReplacementHandles.section('checkout.pay-page', 'summary')
277
- const PRICING_HANDLE = ComponentReplacementHandles.section('checkout.pay-page', 'pricing')
278
- const PAYMENT_HANDLE = ComponentReplacementHandles.section('checkout.pay-page', 'payment')
279
- const CUSTOMER_FORM_HANDLE = ComponentReplacementHandles.section('checkout.pay-page', 'customer-form')
280
- const LEGAL_CONSENT_HANDLE = ComponentReplacementHandles.section('checkout.pay-page', 'legal-consent')
281
- const GATEWAY_FORM_HANDLE = ComponentReplacementHandles.section('checkout.pay-page', 'gateway-form')
282
- const HELP_HANDLE = ComponentReplacementHandles.section('checkout.pay-page', 'help')
283
- const FOOTER_HANDLE = ComponentReplacementHandles.section('checkout.pay-page', 'footer')
273
+ const PAGE_HANDLE = extensionPoints.hosts.payPage.componentId
274
+ const HEADER_HANDLE = extensionPoints.hosts.header.componentId
275
+ const DESCRIPTION_HANDLE = extensionPoints.hosts.description.componentId
276
+ const SUMMARY_HANDLE = extensionPoints.hosts.summary.componentId
277
+ const PRICING_HANDLE = extensionPoints.hosts.pricing.componentId
278
+ const PAYMENT_HANDLE = extensionPoints.hosts.payment.componentId
279
+ const CUSTOMER_FORM_HANDLE = extensionPoints.hosts.customerForm.componentId
280
+ const LEGAL_CONSENT_HANDLE = extensionPoints.hosts.legalConsent.componentId
281
+ const GATEWAY_FORM_HANDLE = extensionPoints.hosts.gatewayForm.componentId
282
+ const HELP_HANDLE = extensionPoints.hosts.help.componentId
283
+ const FOOTER_HANDLE = extensionPoints.hosts.footer.componentId
284
284
 
285
285
  // Checkout supports merchant branding defaults; keep those theme fallbacks isolated from general UI state colors.
286
286
  const CHECKOUT_THEME_FALLBACKS = {
@@ -1222,10 +1222,10 @@ export function PayPagePaymentForm({
1222
1222
  </Alert>
1223
1223
  ) : null}
1224
1224
 
1225
- <InjectionSpot spotId="checkout.pay-page:gateway-widget:before" context={injectionContext} />
1225
+ <InjectionSpot spotId={extensionPoints.hosts.gatewayWidgetBefore.spotId} context={injectionContext} />
1226
1226
  {embeddedPaymentSession && embeddedRenderer ? (
1227
1227
  <>
1228
- <InjectionSpot spotId="checkout.pay-page:gateway-widget:renderer:before" context={injectionContext} />
1228
+ <InjectionSpot spotId={extensionPoints.hosts.gatewayRendererBefore.spotId} context={injectionContext} />
1229
1229
  {React.createElement(embeddedRenderer, {
1230
1230
  providerKey: embeddedPaymentSession.providerKey ?? '',
1231
1231
  transactionId: activeTransactionId ?? '',
@@ -1235,11 +1235,11 @@ export function PayPagePaymentForm({
1235
1235
  onComplete,
1236
1236
  onError,
1237
1237
  })}
1238
- <InjectionSpot spotId="checkout.pay-page:gateway-widget:renderer:after" context={injectionContext} />
1238
+ <InjectionSpot spotId={extensionPoints.hosts.gatewayRendererAfter.spotId} context={injectionContext} />
1239
1239
  </>
1240
1240
  ) : (
1241
1241
  <>
1242
- <InjectionSpot spotId="checkout.pay-page:gateway-widget:actions:before" context={injectionContext} />
1242
+ <InjectionSpot spotId={extensionPoints.hosts.gatewayActionsBefore.spotId} context={injectionContext} />
1243
1243
  <Button
1244
1244
  type="button"
1245
1245
  className="h-12 w-full rounded-xl text-base"
@@ -1256,10 +1256,10 @@ export function PayPagePaymentForm({
1256
1256
  : t('checkout.payPage.actions.payNow', 'Pay now')}
1257
1257
  </span>
1258
1258
  </Button>
1259
- <InjectionSpot spotId="checkout.pay-page:gateway-widget:actions:after" context={injectionContext} />
1259
+ <InjectionSpot spotId={extensionPoints.hosts.gatewayActionsAfter.spotId} context={injectionContext} />
1260
1260
  </>
1261
1261
  )}
1262
- <InjectionSpot spotId="checkout.pay-page:gateway-widget:after" context={injectionContext} />
1262
+ <InjectionSpot spotId={extensionPoints.hosts.gatewayWidgetAfter.spotId} context={injectionContext} />
1263
1263
 
1264
1264
  {paymentSession ? (
1265
1265
  <Button
@@ -2144,11 +2144,11 @@ export function PayPage({
2144
2144
 
2145
2145
  const leftColumn = (
2146
2146
  <div className="space-y-6">
2147
- <InjectionSpot spotId="checkout.pay-page:header:before" context={injectionContext} />
2147
+ <InjectionSpot spotId={extensionPoints.hosts.headerBefore.spotId} context={injectionContext} />
2148
2148
  <div data-component-handle={HEADER_HANDLE}>
2149
2149
  <HeaderComponent payload={payload} preview={isPreview} themeTokens={themeTokens} />
2150
2150
  </div>
2151
- <InjectionSpot spotId="checkout.pay-page:header:after" context={injectionContext} />
2151
+ <InjectionSpot spotId={extensionPoints.hosts.headerAfter.spotId} context={injectionContext} />
2152
2152
 
2153
2153
  {(payload.description || publicCustomFields.length > 0) ? (
2154
2154
  <>
@@ -2159,11 +2159,11 @@ export function PayPage({
2159
2159
  themeTokens={themeTokens}
2160
2160
  />
2161
2161
  </div>
2162
- <InjectionSpot spotId="checkout.pay-page:description:after" context={injectionContext} />
2162
+ <InjectionSpot spotId={extensionPoints.hosts.descriptionAfter.spotId} context={injectionContext} />
2163
2163
  </>
2164
2164
  ) : null}
2165
2165
 
2166
- <InjectionSpot spotId="checkout.pay-page:customer-fields:before" context={injectionContext} />
2166
+ <InjectionSpot spotId={extensionPoints.hosts.customerFieldsBefore.spotId} context={injectionContext} />
2167
2167
  {shouldCollectCustomerDetails ? (
2168
2168
  <div data-component-handle={CUSTOMER_FORM_HANDLE}>
2169
2169
  <CustomerFormComponent
@@ -2177,13 +2177,13 @@ export function PayPage({
2177
2177
  />
2178
2178
  </div>
2179
2179
  ) : null}
2180
- <InjectionSpot spotId="checkout.pay-page:customer-fields:after" context={injectionContext} />
2180
+ <InjectionSpot spotId={extensionPoints.hosts.customerFieldsAfter.spotId} context={injectionContext} />
2181
2181
  </div>
2182
2182
  )
2183
2183
 
2184
2184
  const paymentFlow = (
2185
2185
  <>
2186
- <InjectionSpot spotId="checkout.pay-page:pricing:before" context={injectionContext} />
2186
+ <InjectionSpot spotId={extensionPoints.hosts.pricingBefore.spotId} context={injectionContext} />
2187
2187
  <div data-component-handle={PRICING_HANDLE}>
2188
2188
  <PricingComponent
2189
2189
  payload={payload}
@@ -2215,9 +2215,9 @@ export function PayPage({
2215
2215
  themeTokens={themeTokens}
2216
2216
  />
2217
2217
  </div>
2218
- <InjectionSpot spotId="checkout.pay-page:pricing:after" context={injectionContext} />
2218
+ <InjectionSpot spotId={extensionPoints.hosts.pricingAfter.spotId} context={injectionContext} />
2219
2219
 
2220
- <InjectionSpot spotId="checkout.pay-page:summary:before" context={injectionContext} />
2220
+ <InjectionSpot spotId={extensionPoints.hosts.summaryBefore.spotId} context={injectionContext} />
2221
2221
  <div data-component-handle={SUMMARY_HANDLE}>
2222
2222
  <SummaryComponent
2223
2223
  payload={payload}
@@ -2228,9 +2228,9 @@ export function PayPage({
2228
2228
  themeTokens={themeTokens}
2229
2229
  />
2230
2230
  </div>
2231
- <InjectionSpot spotId="checkout.pay-page:summary:after" context={injectionContext} />
2231
+ <InjectionSpot spotId={extensionPoints.hosts.summaryAfter.spotId} context={injectionContext} />
2232
2232
 
2233
- <InjectionSpot spotId="checkout.pay-page:legal-consent:before" context={injectionContext} />
2233
+ <InjectionSpot spotId={extensionPoints.hosts.legalConsentBefore.spotId} context={injectionContext} />
2234
2234
  <div data-component-handle={LEGAL_CONSENT_HANDLE}>
2235
2235
  <LegalConsentComponent
2236
2236
  payload={payload}
@@ -2242,9 +2242,9 @@ export function PayPage({
2242
2242
  themeTokens={themeTokens}
2243
2243
  />
2244
2244
  </div>
2245
- <InjectionSpot spotId="checkout.pay-page:legal-consent:after" context={injectionContext} />
2245
+ <InjectionSpot spotId={extensionPoints.hosts.legalConsentAfter.spotId} context={injectionContext} />
2246
2246
 
2247
- <InjectionSpot spotId="checkout.pay-page:submit:before" context={injectionContext} />
2247
+ <InjectionSpot spotId={extensionPoints.hosts.submitBefore.spotId} context={injectionContext} />
2248
2248
  <div data-component-handle={GATEWAY_FORM_HANDLE}>
2249
2249
  <PaymentFormComponent
2250
2250
  payload={payload}
@@ -2272,35 +2272,35 @@ export function PayPage({
2272
2272
  themeTokens={themeTokens}
2273
2273
  />
2274
2274
  </div>
2275
- <InjectionSpot spotId="checkout.pay-page:submit:after" context={injectionContext} />
2275
+ <InjectionSpot spotId={extensionPoints.hosts.submitAfter.spotId} context={injectionContext} />
2276
2276
 
2277
- <InjectionSpot spotId="checkout.pay-page:help:before" context={injectionContext} />
2277
+ <InjectionSpot spotId={extensionPoints.hosts.helpBefore.spotId} context={injectionContext} />
2278
2278
  <div data-component-handle={HELP_HANDLE}>
2279
2279
  <HelpComponent payload={payload} preview={isPreview} themeTokens={themeTokens} />
2280
2280
  </div>
2281
- <InjectionSpot spotId="checkout.pay-page:help:after" context={injectionContext} />
2281
+ <InjectionSpot spotId={extensionPoints.hosts.helpAfter.spotId} context={injectionContext} />
2282
2282
  </>
2283
2283
  )
2284
2284
 
2285
2285
  const rightColumn = (
2286
2286
  <>
2287
- <InjectionSpot spotId="checkout.pay-page:payment:before" context={injectionContext} />
2287
+ <InjectionSpot spotId={extensionPoints.hosts.paymentBefore.spotId} context={injectionContext} />
2288
2288
  <div data-component-handle={PAYMENT_HANDLE}>
2289
2289
  <PaymentSectionComponent payload={payload} preview={isPreview} themeTokens={themeTokens}>
2290
2290
  {paymentFlow}
2291
2291
  </PaymentSectionComponent>
2292
2292
  </div>
2293
- <InjectionSpot spotId="checkout.pay-page:payment:after" context={injectionContext} />
2293
+ <InjectionSpot spotId={extensionPoints.hosts.paymentAfter.spotId} context={injectionContext} />
2294
2294
  </>
2295
2295
  )
2296
2296
 
2297
2297
  const footer = (
2298
2298
  <>
2299
- <InjectionSpot spotId="checkout.pay-page:footer:before" context={injectionContext} />
2299
+ <InjectionSpot spotId={extensionPoints.hosts.footerBefore.spotId} context={injectionContext} />
2300
2300
  <div data-component-handle={FOOTER_HANDLE}>
2301
2301
  <FooterComponent payload={payload} themeTokens={themeTokens} />
2302
2302
  </div>
2303
- <InjectionSpot spotId="checkout.pay-page:footer:after" context={injectionContext} />
2303
+ <InjectionSpot spotId={extensionPoints.hosts.footerAfter.spotId} context={injectionContext} />
2304
2304
  </>
2305
2305
  )
2306
2306
 
@@ -0,0 +1,67 @@
1
+ import {
2
+ componentExtensionHost,
3
+ dataTableExtensionHost,
4
+ defineModuleExtensionPoints,
5
+ injectionExtensionHost,
6
+ } from '@open-mercato/shared/modules/widgets/extension-points'
7
+
8
+ const payPageSpot = (spotId: string) => injectionExtensionHost({
9
+ family: 'detail',
10
+ spotId,
11
+ supported: ['render-widget'],
12
+ contextContract: 'checkout.pay-page.v1',
13
+ source: 'components/PayPage.tsx',
14
+ })
15
+
16
+ const payPageComponent = (componentId: string) => componentExtensionHost({
17
+ componentId,
18
+ propsContract: 'checkout.pay-page.v1',
19
+ source: 'components/PayPage.tsx',
20
+ })
21
+
22
+ export const extensionPoints = defineModuleExtensionPoints({
23
+ moduleId: 'checkout',
24
+ hosts: {
25
+ linksTable: dataTableExtensionHost({ tableId: 'checkout-links', source: 'backend/checkout/pay-links/page.tsx' }),
26
+ templatesTable: dataTableExtensionHost({ tableId: 'checkout-templates', source: 'backend/checkout/templates/page.tsx' }),
27
+ transactionsTable: dataTableExtensionHost({ tableId: 'checkout-transactions', source: 'backend/checkout/transactions/page.tsx' }),
28
+ gatewayWidgetBefore: payPageSpot('checkout.pay-page:gateway-widget:before'),
29
+ gatewayRendererBefore: payPageSpot('checkout.pay-page:gateway-widget:renderer:before'),
30
+ gatewayRendererAfter: payPageSpot('checkout.pay-page:gateway-widget:renderer:after'),
31
+ gatewayActionsBefore: payPageSpot('checkout.pay-page:gateway-widget:actions:before'),
32
+ gatewayActionsAfter: payPageSpot('checkout.pay-page:gateway-widget:actions:after'),
33
+ gatewayWidgetAfter: payPageSpot('checkout.pay-page:gateway-widget:after'),
34
+ headerBefore: payPageSpot('checkout.pay-page:header:before'),
35
+ headerAfter: payPageSpot('checkout.pay-page:header:after'),
36
+ descriptionAfter: payPageSpot('checkout.pay-page:description:after'),
37
+ customerFieldsBefore: payPageSpot('checkout.pay-page:customer-fields:before'),
38
+ customerFieldsAfter: payPageSpot('checkout.pay-page:customer-fields:after'),
39
+ pricingBefore: payPageSpot('checkout.pay-page:pricing:before'),
40
+ pricingAfter: payPageSpot('checkout.pay-page:pricing:after'),
41
+ summaryBefore: payPageSpot('checkout.pay-page:summary:before'),
42
+ summaryAfter: payPageSpot('checkout.pay-page:summary:after'),
43
+ legalConsentBefore: payPageSpot('checkout.pay-page:legal-consent:before'),
44
+ legalConsentAfter: payPageSpot('checkout.pay-page:legal-consent:after'),
45
+ submitBefore: payPageSpot('checkout.pay-page:submit:before'),
46
+ submitAfter: payPageSpot('checkout.pay-page:submit:after'),
47
+ helpBefore: payPageSpot('checkout.pay-page:help:before'),
48
+ helpAfter: payPageSpot('checkout.pay-page:help:after'),
49
+ paymentBefore: payPageSpot('checkout.pay-page:payment:before'),
50
+ paymentAfter: payPageSpot('checkout.pay-page:payment:after'),
51
+ footerBefore: payPageSpot('checkout.pay-page:footer:before'),
52
+ footerAfter: payPageSpot('checkout.pay-page:footer:after'),
53
+ payPage: payPageComponent('page:checkout.pay-page'),
54
+ header: payPageComponent('section:checkout.pay-page.header'),
55
+ description: payPageComponent('section:checkout.pay-page.description'),
56
+ summary: payPageComponent('section:checkout.pay-page.summary'),
57
+ pricing: payPageComponent('section:checkout.pay-page.pricing'),
58
+ payment: payPageComponent('section:checkout.pay-page.payment'),
59
+ customerForm: payPageComponent('section:checkout.pay-page.customer-form'),
60
+ legalConsent: payPageComponent('section:checkout.pay-page.legal-consent'),
61
+ gatewayForm: payPageComponent('section:checkout.pay-page.gateway-form'),
62
+ help: payPageComponent('section:checkout.pay-page.help'),
63
+ footer: payPageComponent('section:checkout.pay-page.footer'),
64
+ },
65
+ })
66
+
67
+ export default extensionPoints