@aglyn/plugins-commerce 1.0.0-beta.229 → 1.0.0-beta.231

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 (590) hide show
  1. package/package.json +13 -13
  2. package/src/index.d.ts +0 -1
  3. package/src/index.js +0 -1
  4. package/src/index.js.map +1 -1
  5. package/src/lib/barcode/barcode-decode.d.ts +71 -0
  6. package/src/lib/barcode/barcode-decode.js +498 -0
  7. package/src/lib/barcode/barcode-decode.js.map +1 -0
  8. package/src/lib/barcode/barcode-encode.d.ts +44 -0
  9. package/src/lib/barcode/barcode-encode.js +138 -0
  10. package/src/lib/barcode/barcode-encode.js.map +1 -0
  11. package/src/lib/barcode/barcode-scanner.component.d.ts +23 -0
  12. package/src/lib/barcode/barcode-scanner.component.js +260 -0
  13. package/src/lib/barcode/barcode-scanner.component.js.map +1 -0
  14. package/src/lib/barcode/scan-button.component.d.ts +10 -0
  15. package/src/lib/barcode/scan-button.component.js +62 -0
  16. package/src/lib/barcode/scan-button.component.js.map +1 -0
  17. package/src/lib/barcode/scanner-wedge.d.ts +35 -0
  18. package/src/lib/barcode/scanner-wedge.js +108 -0
  19. package/src/lib/barcode/scanner-wedge.js.map +1 -0
  20. package/src/lib/components/account.js +10 -1
  21. package/src/lib/components/account.js.map +1 -1
  22. package/src/lib/components/cart-extras.d.ts +45 -0
  23. package/src/lib/components/cart-extras.js +127 -0
  24. package/src/lib/components/cart-extras.js.map +1 -0
  25. package/src/lib/components/cart.js +82 -15
  26. package/src/lib/components/cart.js.map +1 -1
  27. package/src/lib/components/checkout-return-notice.d.ts +26 -0
  28. package/src/lib/components/checkout-return-notice.js +48 -0
  29. package/src/lib/components/checkout-return-notice.js.map +1 -0
  30. package/src/lib/components/commerce-console-page.js +124 -0
  31. package/src/lib/components/commerce-console-page.js.map +1 -1
  32. package/src/lib/components/commerce-console-sections.d.ts +1 -1
  33. package/src/lib/components/commerce-console-sections.js +4 -0
  34. package/src/lib/components/commerce-console-sections.js.map +1 -1
  35. package/src/lib/components/console/bulk-fulfill.d.ts +44 -0
  36. package/src/lib/components/console/bulk-fulfill.js +84 -0
  37. package/src/lib/components/console/bulk-fulfill.js.map +1 -0
  38. package/src/lib/components/console/customer-notifications-card.component.d.ts +19 -0
  39. package/src/lib/components/console/customer-notifications-card.component.js +149 -0
  40. package/src/lib/components/console/customer-notifications-card.component.js.map +1 -0
  41. package/src/lib/components/console/host-orders-card.component.js +84 -5
  42. package/src/lib/components/console/host-orders-card.component.js.map +1 -1
  43. package/src/lib/components/console/locations-card.component.js +164 -57
  44. package/src/lib/components/console/locations-card.component.js.map +1 -1
  45. package/src/lib/components/console/order-detail-dialog.component.js +209 -61
  46. package/src/lib/components/console/order-detail-dialog.component.js.map +1 -1
  47. package/src/lib/components/console/order-fulfillment-panel.component.d.ts +48 -0
  48. package/src/lib/components/console/order-fulfillment-panel.component.js +542 -0
  49. package/src/lib/components/console/order-fulfillment-panel.component.js.map +1 -0
  50. package/src/lib/components/console/order-invoice.component.d.ts +33 -0
  51. package/src/lib/components/console/order-invoice.component.js +81 -0
  52. package/src/lib/components/console/order-invoice.component.js.map +1 -0
  53. package/src/lib/components/console/order-receipt-resend.component.d.ts +21 -0
  54. package/src/lib/components/console/order-receipt-resend.component.js +203 -0
  55. package/src/lib/components/console/order-receipt-resend.component.js.map +1 -0
  56. package/src/lib/components/console/order-returns.component.d.ts +36 -0
  57. package/src/lib/components/console/order-returns.component.js +142 -0
  58. package/src/lib/components/console/order-returns.component.js.map +1 -0
  59. package/src/lib/components/console/order-shipping-actions.component.d.ts +54 -0
  60. package/src/lib/components/console/order-shipping-actions.component.js +149 -0
  61. package/src/lib/components/console/order-shipping-actions.component.js.map +1 -0
  62. package/src/lib/components/console/order-webhooks-card.component.d.ts +50 -0
  63. package/src/lib/components/console/order-webhooks-card.component.js +623 -0
  64. package/src/lib/components/console/order-webhooks-card.component.js.map +1 -0
  65. package/src/lib/components/console/order-zones.d.ts +155 -0
  66. package/src/lib/components/console/order-zones.js +40 -0
  67. package/src/lib/components/console/order-zones.js.map +1 -0
  68. package/src/lib/components/console/payment-methods-card.component.d.ts +67 -0
  69. package/src/lib/components/console/payment-methods-card.component.js +395 -0
  70. package/src/lib/components/console/payment-methods-card.component.js.map +1 -0
  71. package/src/lib/components/console/pos/pos-api.d.ts +124 -0
  72. package/src/lib/components/console/pos/pos-api.js +101 -0
  73. package/src/lib/components/console/pos/pos-api.js.map +1 -0
  74. package/src/lib/components/console/pos/pos-cart-panel.component.d.ts +36 -0
  75. package/src/lib/components/console/pos/pos-cart-panel.component.js +160 -0
  76. package/src/lib/components/console/pos/pos-cart-panel.component.js.map +1 -0
  77. package/src/lib/components/console/pos/pos-item-dialog.component.d.ts +39 -0
  78. package/src/lib/components/console/pos/pos-item-dialog.component.js +352 -0
  79. package/src/lib/components/console/pos/pos-item-dialog.component.js.map +1 -0
  80. package/src/lib/components/console/pos/pos-product-grid.component.d.ts +47 -0
  81. package/src/lib/components/console/pos/pos-product-grid.component.js +272 -0
  82. package/src/lib/components/console/pos/pos-product-grid.component.js.map +1 -0
  83. package/src/lib/components/console/pos/pos-receipt-panel.component.d.ts +27 -0
  84. package/src/lib/components/console/pos/pos-receipt-panel.component.js +282 -0
  85. package/src/lib/components/console/pos/pos-receipt-panel.component.js.map +1 -0
  86. package/src/lib/components/console/pos/pos-tender-dialogs.component.d.ts +53 -0
  87. package/src/lib/components/console/pos/pos-tender-dialogs.component.js +445 -0
  88. package/src/lib/components/console/pos/pos-tender-dialogs.component.js.map +1 -0
  89. package/src/lib/components/console/pos/pos-tender-panel.component.d.ts +31 -0
  90. package/src/lib/components/console/pos/pos-tender-panel.component.js +640 -0
  91. package/src/lib/components/console/pos/pos-tender-panel.component.js.map +1 -0
  92. package/src/lib/components/console/pos/use-pos-display.d.ts +43 -0
  93. package/src/lib/components/console/pos/use-pos-display.js +161 -0
  94. package/src/lib/components/console/pos/use-pos-display.js.map +1 -0
  95. package/src/lib/components/console/pos-devices-card.component.d.ts +14 -0
  96. package/src/lib/components/console/pos-devices-card.component.js +546 -0
  97. package/src/lib/components/console/pos-devices-card.component.js.map +1 -0
  98. package/src/lib/components/console/pos-display/brand-screen.d.ts +33 -0
  99. package/src/lib/components/console/pos-display/brand-screen.js +85 -0
  100. package/src/lib/components/console/pos-display/brand-screen.js.map +1 -0
  101. package/src/lib/components/console/pos-display/cart-screen.d.ts +29 -0
  102. package/src/lib/components/console/pos-display/cart-screen.js +166 -0
  103. package/src/lib/components/console/pos-display/cart-screen.js.map +1 -0
  104. package/src/lib/components/console/pos-display/pairing-screen.d.ts +24 -0
  105. package/src/lib/components/console/pos-display/pairing-screen.js +127 -0
  106. package/src/lib/components/console/pos-display/pairing-screen.js.map +1 -0
  107. package/src/lib/components/console/pos-display/pos-display-api.d.ts +90 -0
  108. package/src/lib/components/console/pos-display/pos-display-api.js +140 -0
  109. package/src/lib/components/console/pos-display/pos-display-api.js.map +1 -0
  110. package/src/lib/components/console/pos-display/receipt-screen.d.ts +35 -0
  111. package/src/lib/components/console/pos-display/receipt-screen.js +200 -0
  112. package/src/lib/components/console/pos-display/receipt-screen.js.map +1 -0
  113. package/src/lib/components/console/pos-display/tip-screen.d.ts +36 -0
  114. package/src/lib/components/console/pos-display/tip-screen.js +211 -0
  115. package/src/lib/components/console/pos-display/tip-screen.js.map +1 -0
  116. package/src/lib/components/console/pos-display-page.component.d.ts +16 -0
  117. package/src/lib/components/console/pos-display-page.component.js +407 -0
  118. package/src/lib/components/console/pos-display-page.component.js.map +1 -0
  119. package/src/lib/components/console/pos-ops/pos-customer-lookup.component.d.ts +40 -0
  120. package/src/lib/components/console/pos-ops/pos-customer-lookup.component.js +289 -0
  121. package/src/lib/components/console/pos-ops/pos-customer-lookup.component.js.map +1 -0
  122. package/src/lib/components/console/pos-ops/pos-last-receipt.component.d.ts +34 -0
  123. package/src/lib/components/console/pos-ops/pos-last-receipt.component.js +61 -0
  124. package/src/lib/components/console/pos-ops/pos-last-receipt.component.js.map +1 -0
  125. package/src/lib/components/console/pos-ops/pos-operations-bar.component.d.ts +38 -0
  126. package/src/lib/components/console/pos-ops/pos-operations-bar.component.js +129 -0
  127. package/src/lib/components/console/pos-ops/pos-operations-bar.component.js.map +1 -0
  128. package/src/lib/components/console/pos-ops/pos-ops-api.d.ts +37 -0
  129. package/src/lib/components/console/pos-ops/pos-ops-api.js +60 -0
  130. package/src/lib/components/console/pos-ops/pos-ops-api.js.map +1 -0
  131. package/src/lib/components/console/pos-ops/pos-pin-pad.component.d.ts +48 -0
  132. package/src/lib/components/console/pos-ops/pos-pin-pad.component.js +220 -0
  133. package/src/lib/components/console/pos-ops/pos-pin-pad.component.js.map +1 -0
  134. package/src/lib/components/console/pos-ops/pos-receipt-actions.component.d.ts +63 -0
  135. package/src/lib/components/console/pos-ops/pos-receipt-actions.component.js +186 -0
  136. package/src/lib/components/console/pos-ops/pos-receipt-actions.component.js.map +1 -0
  137. package/src/lib/components/console/pos-ops/pos-receipt.d.ts +39 -0
  138. package/src/lib/components/console/pos-ops/pos-receipt.js +182 -0
  139. package/src/lib/components/console/pos-ops/pos-receipt.js.map +1 -0
  140. package/src/lib/components/console/pos-ops/pos-return-dialog.component.d.ts +40 -0
  141. package/src/lib/components/console/pos-ops/pos-return-dialog.component.js +465 -0
  142. package/src/lib/components/console/pos-ops/pos-return-dialog.component.js.map +1 -0
  143. package/src/lib/components/console/pos-ops/pos-shift-history-card.component.d.ts +29 -0
  144. package/src/lib/components/console/pos-ops/pos-shift-history-card.component.js +253 -0
  145. package/src/lib/components/console/pos-ops/pos-shift-history-card.component.js.map +1 -0
  146. package/src/lib/components/console/pos-ops/pos-shift-panel.component.d.ts +34 -0
  147. package/src/lib/components/console/pos-ops/pos-shift-panel.component.js +494 -0
  148. package/src/lib/components/console/pos-ops/pos-shift-panel.component.js.map +1 -0
  149. package/src/lib/components/console/pos-ops/pos-shift-report.component.d.ts +37 -0
  150. package/src/lib/components/console/pos-ops/pos-shift-report.component.js +102 -0
  151. package/src/lib/components/console/pos-ops/pos-shift-report.component.js.map +1 -0
  152. package/src/lib/components/console/pos-ops/pos-staff-pins-card.component.d.ts +30 -0
  153. package/src/lib/components/console/pos-ops/pos-staff-pins-card.component.js +277 -0
  154. package/src/lib/components/console/pos-ops/pos-staff-pins-card.component.js.map +1 -0
  155. package/src/lib/components/console/pos-ops/register-ops.d.ts +28 -0
  156. package/src/lib/components/console/pos-ops/register-ops.js +28 -0
  157. package/src/lib/components/console/pos-ops/register-ops.js.map +1 -0
  158. package/src/lib/components/console/pos-ops/use-pos-cashier.d.ts +46 -0
  159. package/src/lib/components/console/pos-ops/use-pos-cashier.js +128 -0
  160. package/src/lib/components/console/pos-ops/use-pos-cashier.js.map +1 -0
  161. package/src/lib/components/console/pos-ops/use-pos-sale-receipt.d.ts +36 -0
  162. package/src/lib/components/console/pos-ops/use-pos-sale-receipt.js +64 -0
  163. package/src/lib/components/console/pos-ops/use-pos-sale-receipt.js.map +1 -0
  164. package/src/lib/components/console/pos-page.component.d.ts +13 -5
  165. package/src/lib/components/console/pos-page.component.js +729 -657
  166. package/src/lib/components/console/pos-page.component.js.map +1 -1
  167. package/src/lib/components/console/product-editor-dialog.component.js +51 -7
  168. package/src/lib/components/console/product-editor-dialog.component.js.map +1 -1
  169. package/src/lib/components/console/product-labels-dialog.component.d.ts +13 -0
  170. package/src/lib/components/console/product-labels-dialog.component.js +197 -0
  171. package/src/lib/components/console/product-labels-dialog.component.js.map +1 -0
  172. package/src/lib/components/console/product-register-fields.component.d.ts +19 -0
  173. package/src/lib/components/console/product-register-fields.component.js +241 -0
  174. package/src/lib/components/console/product-register-fields.component.js.map +1 -0
  175. package/src/lib/components/console/product-zones.d.ts +58 -2
  176. package/src/lib/components/console/product-zones.js +10 -2
  177. package/src/lib/components/console/product-zones.js.map +1 -1
  178. package/src/lib/components/console/products-hub-card.component.js +51 -11
  179. package/src/lib/components/console/products-hub-card.component.js.map +1 -1
  180. package/src/lib/components/console/register-hardware-card.component.d.ts +33 -0
  181. package/src/lib/components/console/register-hardware-card.component.js +826 -0
  182. package/src/lib/components/console/register-hardware-card.component.js.map +1 -0
  183. package/src/lib/components/console/registers-card.component.js +24 -5
  184. package/src/lib/components/console/registers-card.component.js.map +1 -1
  185. package/src/lib/components/console/return-actions.d.ts +38 -0
  186. package/src/lib/components/console/return-actions.js +76 -0
  187. package/src/lib/components/console/return-actions.js.map +1 -0
  188. package/src/lib/components/console/return-detail-dialog.component.d.ts +34 -0
  189. package/src/lib/components/console/return-detail-dialog.component.js +718 -0
  190. package/src/lib/components/console/return-detail-dialog.component.js.map +1 -0
  191. package/src/lib/components/console/return-settings-card.component.d.ts +34 -0
  192. package/src/lib/components/console/return-settings-card.component.js +195 -0
  193. package/src/lib/components/console/return-settings-card.component.js.map +1 -0
  194. package/src/lib/components/console/return-zones.d.ts +87 -0
  195. package/src/lib/components/console/return-zones.js +31 -0
  196. package/src/lib/components/console/return-zones.js.map +1 -0
  197. package/src/lib/components/console/returns-card.component.d.ts +45 -0
  198. package/src/lib/components/console/returns-card.component.js +159 -0
  199. package/src/lib/components/console/returns-card.component.js.map +1 -0
  200. package/src/lib/components/console/shipping-settings-card.component.js +161 -5
  201. package/src/lib/components/console/shipping-settings-card.component.js.map +1 -1
  202. package/src/lib/components/console/shippingeasy-card.component.d.ts +59 -0
  203. package/src/lib/components/console/shippingeasy-card.component.js +378 -0
  204. package/src/lib/components/console/shippingeasy-card.component.js.map +1 -0
  205. package/src/lib/components/console/shipstation-card.component.d.ts +35 -0
  206. package/src/lib/components/console/shipstation-card.component.js +345 -0
  207. package/src/lib/components/console/shipstation-card.component.js.map +1 -0
  208. package/src/lib/components/console/start-return-dialog.component.d.ts +40 -0
  209. package/src/lib/components/console/start-return-dialog.component.js +243 -0
  210. package/src/lib/components/console/start-return-dialog.component.js.map +1 -0
  211. package/src/lib/components/console/stock-movements-card.component.js +2 -1
  212. package/src/lib/components/console/stock-movements-card.component.js.map +1 -1
  213. package/src/lib/components/console/store-settings-card.component.js +2 -66
  214. package/src/lib/components/console/store-settings-card.component.js.map +1 -1
  215. package/src/lib/components/console/store-zones.d.ts +42 -0
  216. package/src/lib/components/console/store-zones.js +39 -0
  217. package/src/lib/components/console/store-zones.js.map +1 -0
  218. package/src/lib/components/order-status.d.ts +36 -0
  219. package/src/lib/components/order-status.js +502 -0
  220. package/src/lib/components/order-status.js.map +1 -0
  221. package/src/lib/components/product-detail.js +44 -2
  222. package/src/lib/components/product-detail.js.map +1 -1
  223. package/src/lib/components/return-request.d.ts +32 -0
  224. package/src/lib/components/return-request.js +576 -0
  225. package/src/lib/components/return-request.js.map +1 -0
  226. package/src/lib/components/storefront-payment-appearance.d.ts +32 -0
  227. package/src/lib/components/storefront-payment-appearance.js +114 -0
  228. package/src/lib/components/storefront-payment-appearance.js.map +1 -0
  229. package/src/lib/components/storefront-payment-element.d.ts +57 -1
  230. package/src/lib/components/storefront-payment-element.js +332 -33
  231. package/src/lib/components/storefront-payment-element.js.map +1 -1
  232. package/src/lib/constants/order-status.d.ts +22 -0
  233. package/src/lib/constants/order-status.js +22 -0
  234. package/src/lib/constants/order-status.js.map +1 -0
  235. package/src/lib/constants/return-request.d.ts +27 -0
  236. package/src/lib/constants/return-request.js +32 -0
  237. package/src/lib/constants/return-request.js.map +1 -0
  238. package/src/lib/constants/stock-movement-query.js +2 -1
  239. package/src/lib/constants/stock-movement-query.js.map +1 -1
  240. package/src/lib/declarations.console-server.js +9 -0
  241. package/src/lib/declarations.console-server.js.map +1 -1
  242. package/src/lib/declarations.server.d.ts +2 -1
  243. package/src/lib/declarations.server.js +47 -1
  244. package/src/lib/declarations.server.js.map +1 -1
  245. package/src/lib/model/buyer-notifications.d.ts +59 -0
  246. package/src/lib/model/buyer-notifications.js +97 -0
  247. package/src/lib/model/buyer-notifications.js.map +1 -0
  248. package/src/lib/model/commerce-orders.d.ts +127 -1
  249. package/src/lib/model/commerce-orders.js +24 -15
  250. package/src/lib/model/commerce-orders.js.map +1 -1
  251. package/src/lib/model/commerce-payment-methods.d.ts +146 -0
  252. package/src/lib/model/commerce-payment-methods.js +247 -0
  253. package/src/lib/model/commerce-payment-methods.js.map +1 -0
  254. package/src/lib/model/commerce-pos-ops.d.ts +437 -0
  255. package/src/lib/model/commerce-pos-ops.js +721 -0
  256. package/src/lib/model/commerce-pos-ops.js.map +1 -0
  257. package/src/lib/model/commerce-pos.d.ts +263 -0
  258. package/src/lib/model/commerce-pos.js +375 -0
  259. package/src/lib/model/commerce-pos.js.map +1 -0
  260. package/src/lib/model/commerce-printers.d.ts +211 -0
  261. package/src/lib/model/commerce-printers.js +181 -0
  262. package/src/lib/model/commerce-printers.js.map +1 -0
  263. package/src/lib/model/commerce-receipt.d.ts +97 -0
  264. package/src/lib/model/commerce-receipt.js +180 -0
  265. package/src/lib/model/commerce-receipt.js.map +1 -0
  266. package/src/lib/model/commerce-returns.d.ts +207 -0
  267. package/src/lib/model/commerce-returns.js +300 -0
  268. package/src/lib/model/commerce-returns.js.map +1 -0
  269. package/src/lib/model/commerce-shipping.d.ts +44 -1
  270. package/src/lib/model/commerce-shipping.js +53 -9
  271. package/src/lib/model/commerce-shipping.js.map +1 -1
  272. package/src/lib/model/commerce-tax-engine.d.ts +90 -0
  273. package/src/lib/model/commerce-tax-engine.js +129 -0
  274. package/src/lib/model/commerce-tax-engine.js.map +1 -0
  275. package/src/lib/model/commerce.d.ts +88 -2
  276. package/src/lib/model/commerce.js +89 -1
  277. package/src/lib/model/commerce.js.map +1 -1
  278. package/src/lib/model/index.d.ts +15 -0
  279. package/src/lib/model/index.js +15 -0
  280. package/src/lib/model/index.js.map +1 -1
  281. package/src/lib/model/order-events.d.ts +154 -0
  282. package/src/lib/model/order-events.js +153 -0
  283. package/src/lib/model/order-events.js.map +1 -0
  284. package/src/lib/model/order-fulfillment.d.ts +117 -0
  285. package/src/lib/model/order-fulfillment.js +217 -0
  286. package/src/lib/model/order-fulfillment.js.map +1 -0
  287. package/src/lib/model/order-history.d.ts +58 -0
  288. package/src/lib/model/order-history.js +22 -0
  289. package/src/lib/model/order-history.js.map +1 -0
  290. package/src/lib/model/order-list-fields.d.ts +9 -1
  291. package/src/lib/model/order-list-fields.js +7 -1
  292. package/src/lib/model/order-list-fields.js.map +1 -1
  293. package/src/lib/model/order-shipping-export.d.ts +91 -0
  294. package/src/lib/model/order-shipping-export.js +192 -0
  295. package/src/lib/model/order-shipping-export.js.map +1 -0
  296. package/src/lib/model/order-status-view.d.ts +103 -0
  297. package/src/lib/model/order-status-view.js +156 -0
  298. package/src/lib/model/order-status-view.js.map +1 -0
  299. package/src/lib/model/order-webhooks.d.ts +142 -0
  300. package/src/lib/model/order-webhooks.js +91 -0
  301. package/src/lib/model/order-webhooks.js.map +1 -0
  302. package/src/lib/model/product-channel.d.ts +56 -0
  303. package/src/lib/model/product-channel.js +86 -0
  304. package/src/lib/model/product-channel.js.map +1 -0
  305. package/src/lib/model/product-modifiers.d.ts +80 -0
  306. package/src/lib/model/product-modifiers.js +140 -0
  307. package/src/lib/model/product-modifiers.js.map +1 -0
  308. package/src/lib/model/shippingeasy.d.ts +94 -0
  309. package/src/lib/model/shippingeasy.js +267 -0
  310. package/src/lib/model/shippingeasy.js.map +1 -0
  311. package/src/lib/model/shipstation.d.ts +125 -0
  312. package/src/lib/model/shipstation.js +399 -0
  313. package/src/lib/model/shipstation.js.map +1 -0
  314. package/src/lib/model/smart-collection-reads.d.ts +32 -0
  315. package/src/lib/model/smart-collection-reads.js +63 -0
  316. package/src/lib/model/smart-collection-reads.js.map +1 -0
  317. package/src/lib/model/tracking-url.d.ts +74 -0
  318. package/src/lib/model/tracking-url.js +159 -0
  319. package/src/lib/model/tracking-url.js.map +1 -0
  320. package/src/lib/plugin-config.d.ts +13 -0
  321. package/src/lib/plugin-config.js +77 -5
  322. package/src/lib/plugin-config.js.map +1 -1
  323. package/src/lib/plugin.js +23 -0
  324. package/src/lib/plugin.js.map +1 -1
  325. package/src/lib/pos-ops-config.d.ts +39 -0
  326. package/src/lib/pos-ops-config.js +88 -0
  327. package/src/lib/pos-ops-config.js.map +1 -0
  328. package/src/lib/printing/print-document.d.ts +106 -0
  329. package/src/lib/printing/print-document.js +464 -0
  330. package/src/lib/printing/print-document.js.map +1 -0
  331. package/src/lib/printing/product-labels.d.ts +58 -0
  332. package/src/lib/printing/product-labels.js +116 -0
  333. package/src/lib/printing/product-labels.js.map +1 -0
  334. package/src/lib/printing/render-epson.d.ts +57 -0
  335. package/src/lib/printing/render-epson.js +135 -0
  336. package/src/lib/printing/render-epson.js.map +1 -0
  337. package/src/lib/printing/render-star.d.ts +45 -0
  338. package/src/lib/printing/render-star.js +100 -0
  339. package/src/lib/printing/render-star.js.map +1 -0
  340. package/src/lib/printing/render-text.d.ts +25 -0
  341. package/src/lib/printing/render-text.js +53 -0
  342. package/src/lib/printing/render-text.js.map +1 -0
  343. package/src/lib/server/api-v1/openapi.js +27 -4
  344. package/src/lib/server/api-v1/openapi.js.map +1 -1
  345. package/src/lib/server/api-v1/order-view.d.ts +67 -0
  346. package/src/lib/server/api-v1/order-view.js +120 -0
  347. package/src/lib/server/api-v1/order-view.js.map +1 -0
  348. package/src/lib/server/api-v1/orders-and-products.js +58 -65
  349. package/src/lib/server/api-v1/orders-and-products.js.map +1 -1
  350. package/src/lib/server/billing-webhook.js +135 -28
  351. package/src/lib/server/billing-webhook.js.map +1 -1
  352. package/src/lib/server/cancel-order.js +29 -0
  353. package/src/lib/server/cancel-order.js.map +1 -1
  354. package/src/lib/server/carrier-rates-availability.d.ts +26 -0
  355. package/src/lib/server/carrier-rates-availability.js +76 -0
  356. package/src/lib/server/carrier-rates-availability.js.map +1 -0
  357. package/src/lib/server/carrier-shipping.d.ts +84 -0
  358. package/src/lib/server/carrier-shipping.js +135 -0
  359. package/src/lib/server/carrier-shipping.js.map +1 -0
  360. package/src/lib/server/cart-checkout.d.ts +2 -0
  361. package/src/lib/server/cart-checkout.js +226 -22
  362. package/src/lib/server/cart-checkout.js.map +1 -1
  363. package/src/lib/server/checkout-extras.d.ts +64 -0
  364. package/src/lib/server/checkout-extras.js +157 -0
  365. package/src/lib/server/checkout-extras.js.map +1 -0
  366. package/src/lib/server/{feed.d.ts → checkout-status.d.ts} +2 -7
  367. package/src/lib/server/checkout-status.js +111 -0
  368. package/src/lib/server/checkout-status.js.map +1 -0
  369. package/src/lib/server/checkout.js +86 -9
  370. package/src/lib/server/checkout.js.map +1 -1
  371. package/src/lib/server/draft-order.js +34 -5
  372. package/src/lib/server/draft-order.js.map +1 -1
  373. package/src/lib/server/fulfill-order.d.ts +127 -10
  374. package/src/lib/server/fulfill-order.js +451 -49
  375. package/src/lib/server/fulfill-order.js.map +1 -1
  376. package/src/lib/server/legacy-feed.d.ts +28 -0
  377. package/src/lib/server/legacy-feed.js +52 -0
  378. package/src/lib/server/legacy-feed.js.map +1 -0
  379. package/src/lib/server/native-checkout.d.ts +34 -15
  380. package/src/lib/server/native-checkout.js +32 -17
  381. package/src/lib/server/native-checkout.js.map +1 -1
  382. package/src/lib/server/order-event-host-emit.d.ts +23 -0
  383. package/src/lib/server/order-event-host-emit.js +30 -0
  384. package/src/lib/server/order-event-host-emit.js.map +1 -0
  385. package/src/lib/server/order-event-triggers.d.ts +37 -0
  386. package/src/lib/server/order-event-triggers.js +119 -0
  387. package/src/lib/server/order-event-triggers.js.map +1 -0
  388. package/src/lib/server/order-events.d.ts +62 -0
  389. package/src/lib/server/order-events.js +109 -0
  390. package/src/lib/server/order-events.js.map +1 -0
  391. package/src/lib/server/order-history.d.ts +23 -0
  392. package/src/lib/server/order-history.js +65 -0
  393. package/src/lib/server/order-history.js.map +1 -0
  394. package/src/lib/server/order-notifications.d.ts +185 -0
  395. package/src/lib/server/order-notifications.js +567 -0
  396. package/src/lib/server/order-notifications.js.map +1 -0
  397. package/src/lib/server/order-receipt-send.d.ts +39 -0
  398. package/src/lib/server/order-receipt-send.js +151 -0
  399. package/src/lib/server/order-receipt-send.js.map +1 -0
  400. package/src/lib/server/order-status-token.d.ts +31 -0
  401. package/src/lib/server/order-status-token.js +75 -0
  402. package/src/lib/server/order-status-token.js.map +1 -0
  403. package/src/lib/server/order-status.d.ts +58 -0
  404. package/src/lib/server/order-status.js +141 -0
  405. package/src/lib/server/order-status.js.map +1 -0
  406. package/src/lib/server/order-webhooks.d.ts +108 -0
  407. package/src/lib/server/order-webhooks.js +622 -0
  408. package/src/lib/server/order-webhooks.js.map +1 -0
  409. package/src/lib/server/orders-shipping-prepare.d.ts +26 -0
  410. package/src/lib/server/orders-shipping-prepare.js +121 -0
  411. package/src/lib/server/orders-shipping-prepare.js.map +1 -0
  412. package/src/lib/server/payment-method-domains.d.ts +209 -0
  413. package/src/lib/server/payment-method-domains.js +444 -0
  414. package/src/lib/server/payment-method-domains.js.map +1 -0
  415. package/src/lib/server/payment-methods.d.ts +77 -0
  416. package/src/lib/server/payment-methods.js +284 -0
  417. package/src/lib/server/payment-methods.js.map +1 -0
  418. package/src/lib/server/pos-auth.d.ts +50 -0
  419. package/src/lib/server/pos-auth.js +121 -0
  420. package/src/lib/server/pos-auth.js.map +1 -0
  421. package/src/lib/server/pos-customer.d.ts +49 -0
  422. package/src/lib/server/pos-customer.js +257 -0
  423. package/src/lib/server/pos-customer.js.map +1 -0
  424. package/src/lib/server/pos-display.d.ts +57 -0
  425. package/src/lib/server/pos-display.js +419 -0
  426. package/src/lib/server/pos-display.js.map +1 -0
  427. package/src/lib/server/pos-fee-month.d.ts +34 -0
  428. package/src/lib/server/pos-fee-month.js +36 -0
  429. package/src/lib/server/pos-fee-month.js.map +1 -0
  430. package/src/lib/server/pos-ops-gate.d.ts +161 -0
  431. package/src/lib/server/pos-ops-gate.js +295 -0
  432. package/src/lib/server/pos-ops-gate.js.map +1 -0
  433. package/src/lib/server/pos-ops-routes.d.ts +22 -0
  434. package/src/lib/server/pos-ops-routes.js +36 -0
  435. package/src/lib/server/pos-ops-routes.js.map +1 -0
  436. package/src/lib/server/pos-order.d.ts +1 -18
  437. package/src/lib/server/pos-order.js +222 -42
  438. package/src/lib/server/pos-order.js.map +1 -1
  439. package/src/lib/server/pos-payment.d.ts +39 -0
  440. package/src/lib/server/pos-payment.js +922 -0
  441. package/src/lib/server/pos-payment.js.map +1 -0
  442. package/src/lib/server/pos-print.d.ts +82 -0
  443. package/src/lib/server/pos-print.js +193 -0
  444. package/src/lib/server/pos-print.js.map +1 -0
  445. package/src/lib/server/pos-readers.d.ts +27 -0
  446. package/src/lib/server/pos-readers.js +276 -0
  447. package/src/lib/server/pos-readers.js.map +1 -0
  448. package/src/lib/server/pos-refund-authority.d.ts +60 -0
  449. package/src/lib/server/pos-refund-authority.js +72 -0
  450. package/src/lib/server/pos-refund-authority.js.map +1 -0
  451. package/src/lib/server/pos-return.d.ts +58 -0
  452. package/src/lib/server/pos-return.js +891 -0
  453. package/src/lib/server/pos-return.js.map +1 -0
  454. package/src/lib/server/pos-sale-stamp.d.ts +66 -0
  455. package/src/lib/server/pos-sale-stamp.js +84 -0
  456. package/src/lib/server/pos-sale-stamp.js.map +1 -0
  457. package/src/lib/server/pos-sale.d.ts +170 -0
  458. package/src/lib/server/pos-sale.js +461 -0
  459. package/src/lib/server/pos-sale.js.map +1 -0
  460. package/src/lib/server/pos-shift.d.ts +45 -0
  461. package/src/lib/server/pos-shift.js +484 -0
  462. package/src/lib/server/pos-shift.js.map +1 -0
  463. package/src/lib/server/pos-staff-pin.d.ts +26 -0
  464. package/src/lib/server/pos-staff-pin.js +339 -0
  465. package/src/lib/server/pos-staff-pin.js.map +1 -0
  466. package/src/lib/server/pos-stripe.d.ts +91 -0
  467. package/src/lib/server/pos-stripe.js +129 -0
  468. package/src/lib/server/pos-stripe.js.map +1 -0
  469. package/src/lib/server/pos-terminal-connection-token.d.ts +48 -0
  470. package/src/lib/server/pos-terminal-connection-token.js +166 -0
  471. package/src/lib/server/pos-terminal-connection-token.js.map +1 -0
  472. package/src/lib/server/pos-terminal.d.ts +218 -0
  473. package/src/lib/server/pos-terminal.js +1014 -0
  474. package/src/lib/server/pos-terminal.js.map +1 -0
  475. package/src/lib/server/print-queue.d.ts +124 -0
  476. package/src/lib/server/print-queue.js +301 -0
  477. package/src/lib/server/print-queue.js.map +1 -0
  478. package/src/lib/server/printer-poll.d.ts +75 -0
  479. package/src/lib/server/printer-poll.js +325 -0
  480. package/src/lib/server/printer-poll.js.map +1 -0
  481. package/src/lib/server/printer-secret.d.ts +39 -0
  482. package/src/lib/server/printer-secret.js +56 -0
  483. package/src/lib/server/printer-secret.js.map +1 -0
  484. package/src/lib/server/printers.d.ts +114 -0
  485. package/src/lib/server/printers.js +546 -0
  486. package/src/lib/server/printers.js.map +1 -0
  487. package/src/lib/server/product-ai-capability.d.ts +42 -0
  488. package/src/lib/server/product-ai-capability.js +159 -0
  489. package/src/lib/server/product-ai-capability.js.map +1 -0
  490. package/src/lib/server/product-catalog.d.ts +42 -0
  491. package/src/lib/server/product-catalog.js +305 -0
  492. package/src/lib/server/product-catalog.js.map +1 -0
  493. package/src/lib/server/product-drafts.d.ts +119 -0
  494. package/src/lib/server/product-drafts.js +384 -0
  495. package/src/lib/server/product-drafts.js.map +1 -0
  496. package/src/lib/server/refund.js +110 -45
  497. package/src/lib/server/refund.js.map +1 -1
  498. package/src/lib/server/reserve.js +2 -0
  499. package/src/lib/server/reserve.js.map +1 -1
  500. package/src/lib/server/return-status-action.d.ts +37 -0
  501. package/src/lib/server/return-status-action.js +57 -0
  502. package/src/lib/server/return-status-action.js.map +1 -0
  503. package/src/lib/server/returns.d.ts +119 -0
  504. package/src/lib/server/returns.js +938 -0
  505. package/src/lib/server/returns.js.map +1 -0
  506. package/src/lib/server/shipment-records.d.ts +36 -0
  507. package/src/lib/server/shipment-records.js +289 -0
  508. package/src/lib/server/shipment-records.js.map +1 -0
  509. package/src/lib/server/shipping-connector-gates.d.ts +40 -0
  510. package/src/lib/server/shipping-connector-gates.js +97 -0
  511. package/src/lib/server/shipping-connector-gates.js.map +1 -0
  512. package/src/lib/server/shipping-connectors.d.ts +29 -0
  513. package/src/lib/server/shipping-connectors.js +236 -0
  514. package/src/lib/server/shipping-connectors.js.map +1 -0
  515. package/src/lib/server/shippingeasy.d.ts +238 -0
  516. package/src/lib/server/shippingeasy.js +787 -0
  517. package/src/lib/server/shippingeasy.js.map +1 -0
  518. package/src/lib/server/shipstation.d.ts +129 -0
  519. package/src/lib/server/shipstation.js +483 -0
  520. package/src/lib/server/shipstation.js.map +1 -0
  521. package/src/lib/server/site-page-resolver.d.ts +5 -0
  522. package/src/lib/server/site-page-resolver.js +156 -1
  523. package/src/lib/server/site-page-resolver.js.map +1 -1
  524. package/src/lib/server/stock-levels.d.ts +21 -0
  525. package/src/lib/server/stock-levels.js +263 -0
  526. package/src/lib/server/stock-levels.js.map +1 -0
  527. package/src/lib/server/stripe-refund.d.ts +47 -0
  528. package/src/lib/server/stripe-refund.js +87 -0
  529. package/src/lib/server/stripe-refund.js.map +1 -0
  530. package/src/lib/server/supplier-update.js +46 -5
  531. package/src/lib/server/supplier-update.js.map +1 -1
  532. package/src/lib/server/tax-engine-quote.d.ts +47 -0
  533. package/src/lib/server/tax-engine-quote.js +105 -0
  534. package/src/lib/server/tax-engine-quote.js.map +1 -0
  535. package/src/lib/server.js +146 -2
  536. package/src/lib/server.js.map +1 -1
  537. package/src/lib/site.js +12 -0
  538. package/src/lib/site.js.map +1 -1
  539. package/src/lib/subprocessors.d.ts +26 -0
  540. package/src/lib/subprocessors.js +50 -0
  541. package/src/lib/subprocessors.js.map +1 -0
  542. package/src/lib/tenant-emails.js +461 -3
  543. package/src/lib/tenant-emails.js.map +1 -1
  544. package/src/lib/testing/fake-firestore.d.ts +45 -0
  545. package/src/lib/testing/fake-firestore.js +189 -0
  546. package/src/lib/testing/fake-firestore.js.map +1 -0
  547. package/src/lib/testing/memory-firestore.d.ts +123 -0
  548. package/src/lib/testing/memory-firestore.js +274 -0
  549. package/src/lib/testing/memory-firestore.js.map +1 -0
  550. package/src/lib/testing/pos-ops-harness.d.ts +50 -0
  551. package/src/lib/testing/pos-ops-harness.js +184 -0
  552. package/src/lib/testing/pos-ops-harness.js.map +1 -0
  553. package/src/lib/testing/pos-ops-memory-firestore.d.ts +55 -0
  554. package/src/lib/testing/pos-ops-memory-firestore.js +376 -0
  555. package/src/lib/testing/pos-ops-memory-firestore.js.map +1 -0
  556. package/src/lib/transfer/records-transfer.d.ts +11 -1
  557. package/src/lib/transfer/records-transfer.js +127 -5
  558. package/src/lib/transfer/records-transfer.js.map +1 -1
  559. package/src/lib/transfer/records.server.d.ts +9 -2
  560. package/src/lib/transfer/records.server.js +58 -7
  561. package/src/lib/transfer/records.server.js.map +1 -1
  562. package/src/lib/transfer/register-transfer-resources.js +40 -1
  563. package/src/lib/transfer/register-transfer-resources.js.map +1 -1
  564. package/src/lib/transfer/register-transfer-ui.js +4 -1
  565. package/src/lib/transfer/register-transfer-ui.js.map +1 -1
  566. package/src/lib/transfer/shipping-presets.d.ts +23 -0
  567. package/src/lib/transfer/shipping-presets.js +156 -0
  568. package/src/lib/transfer/shipping-presets.js.map +1 -0
  569. package/src/lib/transfer/tracking-transfer.d.ts +101 -0
  570. package/src/lib/transfer/tracking-transfer.js +546 -0
  571. package/src/lib/transfer/tracking-transfer.js.map +1 -0
  572. package/src/lib/transfer/tracking.server.d.ts +37 -0
  573. package/src/lib/transfer/tracking.server.js +393 -0
  574. package/src/lib/transfer/tracking.server.js.map +1 -0
  575. package/src/lib/transfer/transfer-keys.d.ts +2 -1
  576. package/src/lib/transfer/transfer-keys.js +6 -2
  577. package/src/lib/transfer/transfer-keys.js.map +1 -1
  578. package/src/lib/utils/code128.d.ts +37 -0
  579. package/src/lib/utils/code128.js +199 -0
  580. package/src/lib/utils/code128.js.map +1 -0
  581. package/src/lib/utils/order-invoice.d.ts +55 -0
  582. package/src/lib/utils/order-invoice.js +127 -0
  583. package/src/lib/utils/order-invoice.js.map +1 -0
  584. package/src/lib/utils/use-checkout-return-notice.d.ts +34 -0
  585. package/src/lib/utils/use-checkout-return-notice.js +78 -0
  586. package/src/lib/utils/use-checkout-return-notice.js.map +1 -0
  587. package/src/lib/utils/use-storefront-purchase-event.js +4 -0
  588. package/src/lib/utils/use-storefront-purchase-event.js.map +1 -1
  589. package/src/lib/server/feed.js +0 -69
  590. package/src/lib/server/feed.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/plugins-commerce",
3
- "version": "1.0.0-beta.229",
3
+ "version": "1.0.0-beta.231",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -25,18 +25,18 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/aglyn": "1.0.0-beta.229",
29
- "@aglyn/shared-data-mdi": "1.0.0-beta.229",
30
- "@aglyn/shared-ui-jsx": "1.0.0-beta.229",
31
- "@aglyn/shared-ui-next": "1.0.0-beta.229",
32
- "@aglyn/shared-ui-snackstack": "1.0.0-beta.229",
33
- "@aglyn/shared-util-email": "1.0.0-beta.229",
34
- "@aglyn/shared-util-http": "1.0.0-beta.229",
35
- "@aglyn/shared-util-timestamp": "1.0.0-beta.229",
36
- "@aglyn/shared-util-tools": "1.0.0-beta.229",
37
- "@aglyn/tenant-data-admin": "1.0.0-beta.229",
38
- "@aglyn/tenant-feature-instance": "1.0.0-beta.229",
39
- "@aglyn/tenant-runtime": "1.0.0-beta.229",
28
+ "@aglyn/aglyn": "1.0.0-beta.231",
29
+ "@aglyn/shared-data-mdi": "1.0.0-beta.231",
30
+ "@aglyn/shared-ui-jsx": "1.0.0-beta.231",
31
+ "@aglyn/shared-ui-next": "1.0.0-beta.231",
32
+ "@aglyn/shared-ui-snackstack": "1.0.0-beta.231",
33
+ "@aglyn/shared-util-email": "1.0.0-beta.231",
34
+ "@aglyn/shared-util-http": "1.0.0-beta.231",
35
+ "@aglyn/shared-util-timestamp": "1.0.0-beta.231",
36
+ "@aglyn/shared-util-tools": "1.0.0-beta.231",
37
+ "@aglyn/tenant-data-admin": "1.0.0-beta.231",
38
+ "@aglyn/tenant-feature-instance": "1.0.0-beta.231",
39
+ "@aglyn/tenant-runtime": "1.0.0-beta.231",
40
40
  "@stripe/react-stripe-js": "^6.12.0",
41
41
  "@stripe/stripe-js": "^9.17.0",
42
42
  "@swc/helpers": "0.5.23",
package/src/index.d.ts CHANGED
@@ -15,7 +15,6 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  export * from './lib/constants/bundle-common';
18
- export * from './lib/model';
19
18
  export * from './lib/plugin';
20
19
  /**
21
20
  * ⛔ No console surface may be re-exported here (AGL-1151).
package/src/index.js CHANGED
@@ -14,7 +14,6 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */ export * from "./lib/constants/bundle-common.js";
17
- export * from "./lib/model/index.js";
18
17
  export * from "./lib/plugin.js";
19
18
 
20
19
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../libs/plugins/commerce/src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './lib/constants/bundle-common'\nexport * from './lib/model'\nexport * from './lib/plugin'\n/**\n * ⛔ No console surface may be re-exported here (AGL-1151).\n *\n * The tenant's generated loader activates the site half of this plugin with\n * `import('@aglyn/plugins-commerce')` — this file. Anything this barrel names\n * statically is therefore in the chunk a PUBLISHED site downloads, evaluates\n * and hydrates, whether or not the page has a storefront on it.\n *\n * The console cards are the expensive case: they carry `firebase/firestore`\n * and `@aglyn/tenant-feature-instance`, so one re-export line put roughly\n * 700 KB of database and identity client onto every visitor's first paint to\n * render markup that queries nothing. It is the shape `compress()` already\n * carries a note about, one level up — a VALUE re-export, for a component the\n * site half never renders.\n *\n * Console consumers deep-import the component they need\n * (`@aglyn/plugins-commerce/components/console/...`), which reaches the same\n * module without routing it through the site half's entry point.\n */\n// Type-only (AGL-3080): the plugin's entitlement keys are declared by module\n// augmentation in this module, so every program that loads the package\n// type-checks them. The figures reach core through the manifest generator.\nexport type { commercePlanEntitlements } from './lib/plan-entitlements'\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,cAAc,mCAA+B;AAC7C,cAAc,uBAAa;AAC3B,cAAc,kBAAc"}
1
+ {"version":3,"sources":["../../../../../libs/plugins/commerce/src/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './lib/constants/bundle-common'\nexport * from './lib/plugin'\n// The model (`./lib/model`) is not re-exported: nothing reaches it through\n// this entry, and naming it here put every model module — the ShipStation,\n// POS and printing ones among them — into the chunk every site loads.\n// Callers deep-import the model module they need.\n/**\n * ⛔ No console surface may be re-exported here (AGL-1151).\n *\n * The tenant's generated loader activates the site half of this plugin with\n * `import('@aglyn/plugins-commerce')` — this file. Anything this barrel names\n * statically is therefore in the chunk a PUBLISHED site downloads, evaluates\n * and hydrates, whether or not the page has a storefront on it.\n *\n * The console cards are the expensive case: they carry `firebase/firestore`\n * and `@aglyn/tenant-feature-instance`, so one re-export line put roughly\n * 700 KB of database and identity client onto every visitor's first paint to\n * render markup that queries nothing. It is the shape `compress()` already\n * carries a note about, one level up — a VALUE re-export, for a component the\n * site half never renders.\n *\n * Console consumers deep-import the component they need\n * (`@aglyn/plugins-commerce/components/console/...`), which reaches the same\n * module without routing it through the site half's entry point.\n */\n// Type-only (AGL-3080): the plugin's entitlement keys are declared by module\n// augmentation in this module, so every program that loads the package\n// type-checks them. The figures reach core through the manifest generator.\nexport type { commercePlanEntitlements } from './lib/plan-entitlements'\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,cAAc,mCAA+B;AAC7C,cAAc,kBAAc"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * A small 1D barcode reader for camera frames (AGL-3619): the fallback the
19
+ * camera scanner uses where the browser has no `BarcodeDetector` — Safari on
20
+ * the iPad a register most often runs on, and Chrome on Windows.
21
+ *
22
+ * Why not zxing: its WebAssembly build cannot be compiled under the console's
23
+ * enforcing `script-src` (no `'wasm-unsafe-eval'`), and its JavaScript build
24
+ * is ~400 KB that does not tree-shake. A counter scans three symbologies —
25
+ * EAN-13 / UPC-A on retail goods, EAN-8 on small packs, and Code128 on the
26
+ * order number Aglyn prints and on most warehouse labels — and reading those
27
+ * from a horizontal pass needs a few kilobytes, loaded only when the scanner
28
+ * opens on a browser that lacks the native detector.
29
+ *
30
+ * The reader takes LUMINANCE ROWS, binarizes each against its local mean,
31
+ * turns it into bar/space runs and tries each symbology in both directions.
32
+ * Every symbology carries a check digit and every candidate must pass it, so
33
+ * a misread is rejected rather than returned; the scanner additionally waits
34
+ * for two agreeing reads.
35
+ */
36
+ export type DecodedFormat = 'ean_13' | 'upc_a' | 'ean_8' | 'code_128';
37
+ export interface DecodedBarcode {
38
+ format: DecodedFormat;
39
+ text: string;
40
+ }
41
+ interface Run {
42
+ dark: boolean;
43
+ width: number;
44
+ }
45
+ /** Bar/space runs of a binarized row; `dark` is a bar. */
46
+ export declare function rowRuns(dark: ArrayLike<boolean>): Run[];
47
+ /**
48
+ * A row binarized against a local mean, so a shadow across the label or a
49
+ * glossy hot spot does not swallow half the bars. Rows with too little
50
+ * contrast to hold a barcode answer `null`.
51
+ */
52
+ export declare function binarizeRow(luma: ArrayLike<number>): boolean[] | null;
53
+ export declare function eanCheckDigitValid(code: string): boolean;
54
+ /** Bar-space widths of symbol values 0-105 (each 11 modules); 106 is STOP (13 modules). */
55
+ export declare const CODE128_PATTERNS: readonly (readonly number[])[];
56
+ /** The barcode in one luminance row, read in either direction, or `null`. */
57
+ export declare function decodeLumaRow(luma: ArrayLike<number>): DecodedBarcode | null;
58
+ /**
59
+ * The barcode in an RGBA frame (a canvas `ImageData`), sampling horizontal
60
+ * rows across the band a barcode is held in. The middle rows go first: that
61
+ * is where the on-screen guide asks for the label.
62
+ */
63
+ export declare function decodeImageData(image: {
64
+ data: ArrayLike<number>;
65
+ width: number;
66
+ height: number;
67
+ }, options?: {
68
+ rows?: number;
69
+ band?: number;
70
+ }): DecodedBarcode | null;
71
+ export {};
@@ -0,0 +1,498 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ /**
17
+ * A small 1D barcode reader for camera frames (AGL-3619): the fallback the
18
+ * camera scanner uses where the browser has no `BarcodeDetector` — Safari on
19
+ * the iPad a register most often runs on, and Chrome on Windows.
20
+ *
21
+ * Why not zxing: its WebAssembly build cannot be compiled under the console's
22
+ * enforcing `script-src` (no `'wasm-unsafe-eval'`), and its JavaScript build
23
+ * is ~400 KB that does not tree-shake. A counter scans three symbologies —
24
+ * EAN-13 / UPC-A on retail goods, EAN-8 on small packs, and Code128 on the
25
+ * order number Aglyn prints and on most warehouse labels — and reading those
26
+ * from a horizontal pass needs a few kilobytes, loaded only when the scanner
27
+ * opens on a browser that lacks the native detector.
28
+ *
29
+ * The reader takes LUMINANCE ROWS, binarizes each against its local mean,
30
+ * turns it into bar/space runs and tries each symbology in both directions.
31
+ * Every symbology carries a check digit and every candidate must pass it, so
32
+ * a misread is rejected rather than returned; the scanner additionally waits
33
+ * for two agreeing reads.
34
+ */ /** Bar/space runs of a binarized row; `dark` is a bar. */ export function rowRuns(dark) {
35
+ const runs = [];
36
+ for(let index = 0; index < dark.length; index += 1){
37
+ const value = Boolean(dark[index]);
38
+ const last = runs[runs.length - 1];
39
+ if (last && last.dark === value) last.width += 1;
40
+ else runs.push({
41
+ dark: value,
42
+ width: 1
43
+ });
44
+ }
45
+ return runs;
46
+ }
47
+ /**
48
+ * A row binarized against a local mean, so a shadow across the label or a
49
+ * glossy hot spot does not swallow half the bars. Rows with too little
50
+ * contrast to hold a barcode answer `null`.
51
+ */ export function binarizeRow(luma) {
52
+ const length = luma.length;
53
+ if (length < 32) return null;
54
+ let min = Infinity;
55
+ let max = -Infinity;
56
+ const smooth = new Float32Array(length);
57
+ for(let index = 0; index < length; index += 1){
58
+ const value = (Number(luma[Math.max(0, index - 1)]) + 2 * Number(luma[index]) + Number(luma[Math.min(length - 1, index + 1)])) / 4;
59
+ smooth[index] = value;
60
+ if (value < min) min = value;
61
+ if (value > max) max = value;
62
+ }
63
+ if (max - min < 24) return null;
64
+ const half = Math.max(8, Math.round(length / 24));
65
+ const prefix = new Float64Array(length + 1);
66
+ for(let index = 0; index < length; index += 1)prefix[index + 1] = prefix[index] + smooth[index];
67
+ const globalMid = (min + max) / 2;
68
+ const out = new Array(length);
69
+ for(let index = 0; index < length; index += 1){
70
+ const from = Math.max(0, index - half);
71
+ const to = Math.min(length, index + half + 1);
72
+ const local = (prefix[to] - prefix[from]) / (to - from);
73
+ // Lean on the global midpoint in flat stretches (quiet zones), where a
74
+ // local mean would turn paper grain into bars.
75
+ const threshold = 0.6 * local + 0.4 * globalMid;
76
+ out[index] = smooth[index] < threshold;
77
+ }
78
+ return out;
79
+ }
80
+ /** Distance between measured run widths and a pattern, both scaled to the same total. */ function patternError(widths, pattern, modules) {
81
+ const total = widths.reduce((sum, width)=>sum + width, 0);
82
+ if (!total) return Infinity;
83
+ const scale = modules / total;
84
+ let error = 0;
85
+ for(let index = 0; index < pattern.length; index += 1){
86
+ error += Math.abs(widths[index] * scale - pattern[index]);
87
+ }
88
+ return error;
89
+ }
90
+ function bestMatch(widths, patterns, modules, maxError) {
91
+ let best = -1;
92
+ let bestError = maxError;
93
+ for(let index = 0; index < patterns.length; index += 1){
94
+ const error = patternError(widths, patterns[index], modules);
95
+ if (error < bestError) {
96
+ bestError = error;
97
+ best = index;
98
+ }
99
+ }
100
+ return best;
101
+ }
102
+ const digits = (spec)=>spec.split('').map(Number);
103
+ /*==========================================
104
+ * EAN-13 / UPC-A / EAN-8
105
+ *=========================================*/ /** Space-bar-space-bar widths of the odd-parity (L) left-hand digits 0-9. */ const EAN_L = [
106
+ '3211',
107
+ '2221',
108
+ '2122',
109
+ '1411',
110
+ '1132',
111
+ '1231',
112
+ '1114',
113
+ '1312',
114
+ '1213',
115
+ '3112'
116
+ ].map(digits);
117
+ /** Even parity (G) is L reversed. */ const EAN_G = EAN_L.map((pattern)=>[
118
+ ...pattern
119
+ ].reverse());
120
+ /** Left-half parity of an EAN-13 per first digit; 1 = G. */ const EAN_FIRST_DIGIT_PARITY = [
121
+ '000000',
122
+ '001011',
123
+ '001101',
124
+ '001110',
125
+ '010011',
126
+ '011001',
127
+ '011100',
128
+ '010101',
129
+ '010110',
130
+ '011010'
131
+ ];
132
+ export function eanCheckDigitValid(code) {
133
+ if (!/^\d+$/.test(code)) return false;
134
+ const body = code.slice(0, -1);
135
+ let sum = 0;
136
+ for(let index = 0; index < body.length; index += 1){
137
+ // Weights run 3,1,3,1… from the digit nearest the check digit.
138
+ const fromRight = body.length - 1 - index;
139
+ sum += Number(body[index]) * (fromRight % 2 === 0 ? 3 : 1);
140
+ }
141
+ return (10 - sum % 10) % 10 === Number(code[code.length - 1]);
142
+ }
143
+ const GUARD = [
144
+ 1,
145
+ 1,
146
+ 1
147
+ ];
148
+ const MIDDLE = [
149
+ 1,
150
+ 1,
151
+ 1,
152
+ 1,
153
+ 1
154
+ ];
155
+ function widthsAt(runs, start, count) {
156
+ if (start + count > runs.length) return null;
157
+ return runs.slice(start, start + count).map((run)=>run.width);
158
+ }
159
+ function guardOk(runs, start, count, moduleWidth) {
160
+ const widths = widthsAt(runs, start, count);
161
+ if (!widths) return false;
162
+ return widths.every((width)=>width > moduleWidth * 0.35 && width < moduleWidth * 2.2);
163
+ }
164
+ function quietBefore(runs, start, moduleWidth) {
165
+ return start === 0 || runs[start - 1].width >= moduleWidth * 2.5;
166
+ }
167
+ function decodeEanDigits(runs, start, count, leftHalf) {
168
+ const out = [];
169
+ let parity = '';
170
+ for(let index = 0; index < count; index += 1){
171
+ const widths = widthsAt(runs, start + index * 4, 4);
172
+ if (!widths) return null;
173
+ if (leftHalf) {
174
+ const l = bestMatch(widths, EAN_L, 7, 2.2);
175
+ const g = bestMatch(widths, EAN_G, 7, 2.2);
176
+ const lError = l < 0 ? Infinity : patternError(widths, EAN_L[l], 7);
177
+ const gError = g < 0 ? Infinity : patternError(widths, EAN_G[g], 7);
178
+ if (l < 0 && g < 0) return null;
179
+ if (lError <= gError) {
180
+ out.push(l);
181
+ parity += '0';
182
+ } else {
183
+ out.push(g);
184
+ parity += '1';
185
+ }
186
+ } else {
187
+ const r = bestMatch(widths, EAN_L, 7, 2.2);
188
+ if (r < 0) return null;
189
+ out.push(r);
190
+ }
191
+ }
192
+ return {
193
+ digits: out,
194
+ parity
195
+ };
196
+ }
197
+ function decodeEan13At(runs, start) {
198
+ if (start + 59 > runs.length || !runs[start].dark) return null;
199
+ const total = runs.slice(start, start + 59).reduce((sum, run)=>sum + run.width, 0);
200
+ const moduleWidth = total / 95;
201
+ if (!quietBefore(runs, start, moduleWidth)) return null;
202
+ if (!guardOk(runs, start, 3, moduleWidth) || !guardOk(runs, start + 27, 5, moduleWidth) || !guardOk(runs, start + 56, 3, moduleWidth)) {
203
+ return null;
204
+ }
205
+ if (patternError(widthsAt(runs, start, 3), GUARD, 3) > 1.2) return null;
206
+ if (patternError(widthsAt(runs, start + 27, 5), MIDDLE, 5) > 1.6) return null;
207
+ const left = decodeEanDigits(runs, start + 3, 6, true);
208
+ const right = decodeEanDigits(runs, start + 32, 6, false);
209
+ if (!left || !right) return null;
210
+ const first = EAN_FIRST_DIGIT_PARITY.indexOf(left.parity);
211
+ if (first < 0) return null;
212
+ const code = [
213
+ first,
214
+ ...left.digits,
215
+ ...right.digits
216
+ ].join('');
217
+ if (!eanCheckDigitValid(code)) return null;
218
+ // An EAN-13 that starts with 0 IS a UPC-A, and a UPC-A is what a keyboard
219
+ // scanner types and what most product records hold: twelve digits.
220
+ return code.startsWith('0') ? {
221
+ format: 'upc_a',
222
+ text: code.slice(1)
223
+ } : {
224
+ format: 'ean_13',
225
+ text: code
226
+ };
227
+ }
228
+ function decodeEan8At(runs, start) {
229
+ if (start + 43 > runs.length || !runs[start].dark) return null;
230
+ const total = runs.slice(start, start + 43).reduce((sum, run)=>sum + run.width, 0);
231
+ const moduleWidth = total / 67;
232
+ if (!quietBefore(runs, start, moduleWidth)) return null;
233
+ if (!guardOk(runs, start, 3, moduleWidth) || !guardOk(runs, start + 19, 5, moduleWidth) || !guardOk(runs, start + 40, 3, moduleWidth)) {
234
+ return null;
235
+ }
236
+ const left = decodeEanDigits(runs, start + 3, 4, true);
237
+ const right = decodeEanDigits(runs, start + 24, 4, false);
238
+ if (!left || !right || left.parity !== '0000') return null;
239
+ const code = [
240
+ ...left.digits,
241
+ ...right.digits
242
+ ].join('');
243
+ return eanCheckDigitValid(code) ? {
244
+ format: 'ean_8',
245
+ text: code
246
+ } : null;
247
+ }
248
+ /*==========================================
249
+ * CODE 128
250
+ *=========================================*/ /** Bar-space widths of symbol values 0-105 (each 11 modules); 106 is STOP (13 modules). */ export const CODE128_PATTERNS = [
251
+ '212222',
252
+ '222122',
253
+ '222221',
254
+ '121223',
255
+ '121322',
256
+ '131222',
257
+ '122213',
258
+ '122312',
259
+ '132212',
260
+ '221213',
261
+ '221312',
262
+ '231212',
263
+ '112232',
264
+ '122132',
265
+ '122231',
266
+ '113222',
267
+ '123122',
268
+ '123221',
269
+ '223211',
270
+ '221132',
271
+ '221231',
272
+ '213212',
273
+ '223112',
274
+ '312131',
275
+ '311222',
276
+ '321122',
277
+ '321221',
278
+ '312212',
279
+ '322112',
280
+ '322211',
281
+ '212123',
282
+ '212321',
283
+ '232121',
284
+ '111323',
285
+ '131123',
286
+ '131321',
287
+ '112313',
288
+ '132113',
289
+ '132311',
290
+ '211313',
291
+ '231113',
292
+ '231311',
293
+ '112133',
294
+ '112331',
295
+ '132131',
296
+ '113123',
297
+ '113321',
298
+ '133121',
299
+ '313121',
300
+ '211331',
301
+ '231131',
302
+ '213113',
303
+ '213311',
304
+ '213131',
305
+ '311123',
306
+ '311321',
307
+ '331121',
308
+ '312113',
309
+ '312311',
310
+ '332111',
311
+ '314111',
312
+ '221411',
313
+ '431111',
314
+ '111224',
315
+ '111422',
316
+ '121124',
317
+ '121421',
318
+ '141122',
319
+ '141221',
320
+ '112214',
321
+ '112412',
322
+ '122114',
323
+ '122411',
324
+ '142112',
325
+ '142211',
326
+ '241211',
327
+ '221114',
328
+ '413111',
329
+ '241112',
330
+ '134111',
331
+ '111242',
332
+ '121142',
333
+ '121241',
334
+ '114212',
335
+ '124112',
336
+ '124211',
337
+ '411212',
338
+ '421112',
339
+ '421211',
340
+ '212141',
341
+ '214121',
342
+ '412121',
343
+ '111143',
344
+ '111341',
345
+ '131141',
346
+ '114113',
347
+ '114311',
348
+ '411113',
349
+ '411311',
350
+ '113141',
351
+ '114131',
352
+ '311141',
353
+ '411131',
354
+ '211412',
355
+ '211214',
356
+ '211232',
357
+ '2331112'
358
+ ].map(digits);
359
+ const CODE128_DATA = CODE128_PATTERNS.slice(0, 106);
360
+ const START_A = 103;
361
+ const START_B = 104;
362
+ const START_C = 105;
363
+ const STOP = CODE128_PATTERNS[106];
364
+ function decodeCode128At(runs, start) {
365
+ var _runs_start;
366
+ if (!((_runs_start = runs[start]) == null ? void 0 : _runs_start.dark)) return null;
367
+ const startWidths = widthsAt(runs, start, 6);
368
+ if (!startWidths) return null;
369
+ const startValue = bestMatch(startWidths, CODE128_DATA, 11, 2.0);
370
+ if (startValue < START_A) return null;
371
+ const moduleWidth = startWidths.reduce((sum, width)=>sum + width, 0) / 11;
372
+ if (!quietBefore(runs, start, moduleWidth)) return null;
373
+ const values = [
374
+ startValue
375
+ ];
376
+ let at = start + 6;
377
+ for(let guard = 0; guard < 60; guard += 1){
378
+ const widths = widthsAt(runs, at, 6);
379
+ const value = widths ? bestMatch(widths, CODE128_DATA, 11, 2.0) : -1;
380
+ const dataError = value >= 0 && widths ? patternError(widths, CODE128_DATA[value], 11) : Infinity;
381
+ // STOP is seven runs and ends the symbol at a quiet zone. A data symbol
382
+ // and the bar after it can look like one, so it wins only where it fits
383
+ // better than any data symbol AND white space follows it.
384
+ const stop = widthsAt(runs, at, 7);
385
+ if (stop) {
386
+ const stopError = patternError(stop, STOP, 13);
387
+ const stopModule = stop.reduce((sum, width)=>sum + width, 0) / 13;
388
+ const after = runs[at + 7];
389
+ const quietAfter = !after || after.width >= moduleWidth * 2.5;
390
+ if (stopError < 2.2 && stopError < dataError && quietAfter) {
391
+ if (Math.abs(stopModule - moduleWidth) > moduleWidth * 0.4) return null;
392
+ return finishCode128(values);
393
+ }
394
+ }
395
+ if (!widths || value < 0 || value >= START_A) return null;
396
+ const symbolModule = widths.reduce((sum, width)=>sum + width, 0) / 11;
397
+ if (Math.abs(symbolModule - moduleWidth) > moduleWidth * 0.4) return null;
398
+ values.push(value);
399
+ at += 6;
400
+ }
401
+ return null;
402
+ }
403
+ function finishCode128(values) {
404
+ if (values.length < 3) return null;
405
+ const check = values[values.length - 1];
406
+ const data = values.slice(1, -1);
407
+ let sum = values[0];
408
+ data.forEach((value, index)=>{
409
+ sum += value * (index + 1);
410
+ });
411
+ if (sum % 103 !== check) return null;
412
+ let set = values[0] === START_A ? 'A' : values[0] === START_B ? 'B' : 'C';
413
+ let shift = false;
414
+ let text = '';
415
+ for (const value of data){
416
+ const current = shift ? set === 'A' ? 'B' : 'A' : set;
417
+ shift = false;
418
+ if (current === 'C') {
419
+ if (value < 100) text += String(value).padStart(2, '0');
420
+ else if (value === 100) set = 'B';
421
+ else if (value === 101) set = 'A';
422
+ continue;
423
+ }
424
+ if (value < 96) {
425
+ if (current === 'B') text += String.fromCharCode(value + 32);
426
+ else text += String.fromCharCode(value < 64 ? value + 32 : value - 64);
427
+ continue;
428
+ }
429
+ if (value === 98) shift = true;
430
+ else if (value === 99) set = 'C';
431
+ else if (value === 100 && current === 'A') set = 'B';
432
+ else if (value === 101 && current === 'B') set = 'A';
433
+ // 96, 97 and the remaining FNC codes carry nothing printable.
434
+ }
435
+ // Control characters (set A) are not something a product lookup types.
436
+ text = Array.from(text).filter((char)=>char.charCodeAt(0) >= 0x20).join('');
437
+ return text ? {
438
+ format: 'code_128',
439
+ text
440
+ } : null;
441
+ }
442
+ /*==========================================
443
+ * A ROW
444
+ *=========================================*/ const DECODERS = [
445
+ decodeEan13At,
446
+ decodeEan8At,
447
+ decodeCode128At
448
+ ];
449
+ function decodeRuns(runs) {
450
+ for(let start = 0; start < runs.length; start += 1){
451
+ if (!runs[start].dark) continue;
452
+ for (const decode of DECODERS){
453
+ const found = decode(runs, start);
454
+ if (found) return found;
455
+ }
456
+ }
457
+ return null;
458
+ }
459
+ /** The barcode in one luminance row, read in either direction, or `null`. */ export function decodeLumaRow(luma) {
460
+ var _decodeRuns;
461
+ const dark = binarizeRow(luma);
462
+ if (!dark) return null;
463
+ const runs = rowRuns(dark);
464
+ return (_decodeRuns = decodeRuns(runs)) != null ? _decodeRuns : decodeRuns([
465
+ ...runs
466
+ ].reverse());
467
+ }
468
+ /**
469
+ * The barcode in an RGBA frame (a canvas `ImageData`), sampling horizontal
470
+ * rows across the band a barcode is held in. The middle rows go first: that
471
+ * is where the on-screen guide asks for the label.
472
+ */ export function decodeImageData(image, options = {}) {
473
+ var _options_rows, _options_band;
474
+ const { width, height, data } = image;
475
+ const rows = (_options_rows = options.rows) != null ? _options_rows : 15;
476
+ const band = Math.min(1, Math.max(0.05, (_options_band = options.band) != null ? _options_band : 0.5));
477
+ const centre = height / 2;
478
+ const spread = height * band / 2;
479
+ const order = [];
480
+ for(let index = 0; index < rows; index += 1){
481
+ const step = Math.ceil(index / 2) * (index % 2 ? -1 : 1);
482
+ order.push(Math.round(centre + step * spread / Math.ceil(rows / 2)));
483
+ }
484
+ const luma = new Float32Array(width);
485
+ for (const y of order){
486
+ if (y < 0 || y >= height) continue;
487
+ const offset = y * width * 4;
488
+ for(let x = 0; x < width; x += 1){
489
+ const pixel = offset + x * 4;
490
+ luma[x] = 0.299 * Number(data[pixel]) + 0.587 * Number(data[pixel + 1]) + 0.114 * Number(data[pixel + 2]);
491
+ }
492
+ const found = decodeLumaRow(luma);
493
+ if (found) return found;
494
+ }
495
+ return null;
496
+ }
497
+
498
+ //# sourceMappingURL=barcode-decode.js.map