@businessdash/sdk 0.9.60

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 (268) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +899 -0
  3. package/dist/adapters-revalidate.d.ts +44 -0
  4. package/dist/adapters-revalidate.d.ts.map +1 -0
  5. package/dist/adapters-revalidate.js +68 -0
  6. package/dist/adapters-revalidate.js.map +1 -0
  7. package/dist/alpha.d.ts +21 -0
  8. package/dist/alpha.d.ts.map +1 -0
  9. package/dist/alpha.js +21 -0
  10. package/dist/alpha.js.map +1 -0
  11. package/dist/analytics-core.d.ts +34 -0
  12. package/dist/analytics-core.d.ts.map +1 -0
  13. package/dist/analytics-core.js +138 -0
  14. package/dist/analytics-core.js.map +1 -0
  15. package/dist/analytics-server.d.ts +54 -0
  16. package/dist/analytics-server.d.ts.map +1 -0
  17. package/dist/analytics-server.js +78 -0
  18. package/dist/analytics-server.js.map +1 -0
  19. package/dist/attribution-logo.d.ts +2 -0
  20. package/dist/attribution-logo.d.ts.map +1 -0
  21. package/dist/attribution-logo.js +5 -0
  22. package/dist/attribution-logo.js.map +1 -0
  23. package/dist/auth-handler.d.ts +92 -0
  24. package/dist/auth-handler.d.ts.map +1 -0
  25. package/dist/auth-handler.js +277 -0
  26. package/dist/auth-handler.js.map +1 -0
  27. package/dist/biab-forms.css +484 -0
  28. package/dist/cli.d.ts +46 -0
  29. package/dist/cli.d.ts.map +1 -0
  30. package/dist/cli.js +1824 -0
  31. package/dist/cli.js.map +1 -0
  32. package/dist/client.d.ts +1681 -0
  33. package/dist/client.d.ts.map +1 -0
  34. package/dist/client.js +2845 -0
  35. package/dist/client.js.map +1 -0
  36. package/dist/collections.d.ts +13 -0
  37. package/dist/collections.d.ts.map +1 -0
  38. package/dist/collections.js +13 -0
  39. package/dist/collections.js.map +1 -0
  40. package/dist/contracts.d.ts +14609 -0
  41. package/dist/contracts.d.ts.map +1 -0
  42. package/dist/contracts.js +2428 -0
  43. package/dist/contracts.js.map +1 -0
  44. package/dist/data-model-schema.d.ts +962 -0
  45. package/dist/data-model-schema.d.ts.map +1 -0
  46. package/dist/data-model-schema.js +2295 -0
  47. package/dist/data-model-schema.js.map +1 -0
  48. package/dist/distribution.d.ts +38 -0
  49. package/dist/distribution.d.ts.map +1 -0
  50. package/dist/distribution.js +61 -0
  51. package/dist/distribution.js.map +1 -0
  52. package/dist/element.d.ts +121 -0
  53. package/dist/element.d.ts.map +1 -0
  54. package/dist/element.js +276 -0
  55. package/dist/element.js.map +1 -0
  56. package/dist/enums.d.ts +25 -0
  57. package/dist/enums.d.ts.map +1 -0
  58. package/dist/enums.js +38 -0
  59. package/dist/enums.js.map +1 -0
  60. package/dist/errors.d.ts +195 -0
  61. package/dist/errors.d.ts.map +1 -0
  62. package/dist/errors.js +188 -0
  63. package/dist/errors.js.map +1 -0
  64. package/dist/forms-core/autocomplete.d.ts +37 -0
  65. package/dist/forms-core/autocomplete.d.ts.map +1 -0
  66. package/dist/forms-core/autocomplete.js +82 -0
  67. package/dist/forms-core/autocomplete.js.map +1 -0
  68. package/dist/forms-core/business-function.d.ts +61 -0
  69. package/dist/forms-core/business-function.d.ts.map +1 -0
  70. package/dist/forms-core/business-function.js +149 -0
  71. package/dist/forms-core/business-function.js.map +1 -0
  72. package/dist/forms-core/calculation.d.ts +72 -0
  73. package/dist/forms-core/calculation.d.ts.map +1 -0
  74. package/dist/forms-core/calculation.js +103 -0
  75. package/dist/forms-core/calculation.js.map +1 -0
  76. package/dist/forms-core/controller.d.ts +249 -0
  77. package/dist/forms-core/controller.d.ts.map +1 -0
  78. package/dist/forms-core/controller.js +590 -0
  79. package/dist/forms-core/controller.js.map +1 -0
  80. package/dist/forms-core/elements.d.ts +44 -0
  81. package/dist/forms-core/elements.d.ts.map +1 -0
  82. package/dist/forms-core/elements.js +68 -0
  83. package/dist/forms-core/elements.js.map +1 -0
  84. package/dist/forms-core/email-domains.d.ts +10 -0
  85. package/dist/forms-core/email-domains.d.ts.map +1 -0
  86. package/dist/forms-core/email-domains.js +69 -0
  87. package/dist/forms-core/email-domains.js.map +1 -0
  88. package/dist/forms-core/file-rules.d.ts +51 -0
  89. package/dist/forms-core/file-rules.d.ts.map +1 -0
  90. package/dist/forms-core/file-rules.js +105 -0
  91. package/dist/forms-core/file-rules.js.map +1 -0
  92. package/dist/forms-core/formula.d.ts +114 -0
  93. package/dist/forms-core/formula.d.ts.map +1 -0
  94. package/dist/forms-core/formula.js +1170 -0
  95. package/dist/forms-core/formula.js.map +1 -0
  96. package/dist/forms-core/index.d.ts +24 -0
  97. package/dist/forms-core/index.d.ts.map +1 -0
  98. package/dist/forms-core/index.js +28 -0
  99. package/dist/forms-core/index.js.map +1 -0
  100. package/dist/forms-core/units.d.ts +49 -0
  101. package/dist/forms-core/units.d.ts.map +1 -0
  102. package/dist/forms-core/units.js +255 -0
  103. package/dist/forms-core/units.js.map +1 -0
  104. package/dist/forms-core/us-states.d.ts +14 -0
  105. package/dist/forms-core/us-states.d.ts.map +1 -0
  106. package/dist/forms-core/us-states.js +66 -0
  107. package/dist/forms-core/us-states.js.map +1 -0
  108. package/dist/forms-core/validation.d.ts +266 -0
  109. package/dist/forms-core/validation.d.ts.map +1 -0
  110. package/dist/forms-core/validation.js +850 -0
  111. package/dist/forms-core/validation.js.map +1 -0
  112. package/dist/forms.d.ts +19 -0
  113. package/dist/forms.d.ts.map +1 -0
  114. package/dist/forms.js +29 -0
  115. package/dist/forms.js.map +1 -0
  116. package/dist/gallery-types.d.ts +32 -0
  117. package/dist/gallery-types.d.ts.map +1 -0
  118. package/dist/gallery-types.js +2 -0
  119. package/dist/gallery-types.js.map +1 -0
  120. package/dist/graphql.d.ts +97 -0
  121. package/dist/graphql.d.ts.map +1 -0
  122. package/dist/graphql.js +212 -0
  123. package/dist/graphql.js.map +1 -0
  124. package/dist/index.cjs +19448 -0
  125. package/dist/index.d.cts +19 -0
  126. package/dist/index.d.mts +19 -0
  127. package/dist/index.d.ts +19 -0
  128. package/dist/index.d.ts.map +1 -0
  129. package/dist/index.js +20 -0
  130. package/dist/index.js.map +1 -0
  131. package/dist/marketing-schema.d.ts +216 -0
  132. package/dist/marketing-schema.d.ts.map +1 -0
  133. package/dist/marketing-schema.js +200 -0
  134. package/dist/marketing-schema.js.map +1 -0
  135. package/dist/mcp.d.ts +42 -0
  136. package/dist/mcp.d.ts.map +1 -0
  137. package/dist/mcp.js +87 -0
  138. package/dist/mcp.js.map +1 -0
  139. package/dist/native.d.ts +45 -0
  140. package/dist/native.d.ts.map +1 -0
  141. package/dist/native.js +43 -0
  142. package/dist/native.js.map +1 -0
  143. package/dist/next-revalidate.d.ts +43 -0
  144. package/dist/next-revalidate.d.ts.map +1 -0
  145. package/dist/next-revalidate.js +84 -0
  146. package/dist/next-revalidate.js.map +1 -0
  147. package/dist/parallel-pages.d.ts +102 -0
  148. package/dist/parallel-pages.d.ts.map +1 -0
  149. package/dist/parallel-pages.js +108 -0
  150. package/dist/parallel-pages.js.map +1 -0
  151. package/dist/payment-icons.d.ts +66 -0
  152. package/dist/payment-icons.d.ts.map +1 -0
  153. package/dist/payment-icons.js +160 -0
  154. package/dist/payment-icons.js.map +1 -0
  155. package/dist/proxy.d.ts +67 -0
  156. package/dist/proxy.d.ts.map +1 -0
  157. package/dist/proxy.js +97 -0
  158. package/dist/proxy.js.map +1 -0
  159. package/dist/react-analytics.d.ts +39 -0
  160. package/dist/react-analytics.d.ts.map +1 -0
  161. package/dist/react-analytics.js +59 -0
  162. package/dist/react-analytics.js.map +1 -0
  163. package/dist/react-attribution.d.ts +99 -0
  164. package/dist/react-attribution.d.ts.map +1 -0
  165. package/dist/react-attribution.js +52 -0
  166. package/dist/react-attribution.js.map +1 -0
  167. package/dist/react-marketing.d.ts +181 -0
  168. package/dist/react-marketing.d.ts.map +1 -0
  169. package/dist/react-marketing.js +215 -0
  170. package/dist/react-marketing.js.map +1 -0
  171. package/dist/react.d.ts +727 -0
  172. package/dist/react.d.ts.map +1 -0
  173. package/dist/react.js +2418 -0
  174. package/dist/react.js.map +1 -0
  175. package/dist/reserved-paths.d.ts +24 -0
  176. package/dist/reserved-paths.d.ts.map +1 -0
  177. package/dist/reserved-paths.js +60 -0
  178. package/dist/reserved-paths.js.map +1 -0
  179. package/dist/revalidate-verify.d.ts +30 -0
  180. package/dist/revalidate-verify.d.ts.map +1 -0
  181. package/dist/revalidate-verify.js +74 -0
  182. package/dist/revalidate-verify.js.map +1 -0
  183. package/dist/sdk.d.ts +678 -0
  184. package/dist/sdk.d.ts.map +1 -0
  185. package/dist/sdk.js +801 -0
  186. package/dist/sdk.js.map +1 -0
  187. package/dist/seo.d.ts +218 -0
  188. package/dist/seo.d.ts.map +1 -0
  189. package/dist/seo.js +309 -0
  190. package/dist/seo.js.map +1 -0
  191. package/dist/socials.d.ts +47 -0
  192. package/dist/socials.d.ts.map +1 -0
  193. package/dist/socials.js +172 -0
  194. package/dist/socials.js.map +1 -0
  195. package/dist/static.d.ts +14 -0
  196. package/dist/static.d.ts.map +1 -0
  197. package/dist/static.js +14 -0
  198. package/dist/static.js.map +1 -0
  199. package/dist/url-pattern.d.ts +47 -0
  200. package/dist/url-pattern.d.ts.map +1 -0
  201. package/dist/url-pattern.js +124 -0
  202. package/dist/url-pattern.js.map +1 -0
  203. package/dist/vanilla.d.ts +77 -0
  204. package/dist/vanilla.d.ts.map +1 -0
  205. package/dist/vanilla.js +903 -0
  206. package/dist/vanilla.js.map +1 -0
  207. package/openapi.json +13779 -0
  208. package/package.json +204 -0
  209. package/src/adapters-revalidate.ts +88 -0
  210. package/src/alpha.ts +89 -0
  211. package/src/analytics-core.ts +175 -0
  212. package/src/analytics-server.ts +99 -0
  213. package/src/angular/biab-form.component.ts +1443 -0
  214. package/src/angular/index.ts +26 -0
  215. package/src/attribution-logo.ts +5 -0
  216. package/src/auth-handler.ts +352 -0
  217. package/src/cli.ts +2517 -0
  218. package/src/client.ts +3578 -0
  219. package/src/collections.ts +101 -0
  220. package/src/contracts.ts +3390 -0
  221. package/src/data-model-schema.ts +4042 -0
  222. package/src/distribution.ts +73 -0
  223. package/src/element.ts +321 -0
  224. package/src/enums.ts +65 -0
  225. package/src/errors.ts +338 -0
  226. package/src/forms-core/autocomplete.ts +97 -0
  227. package/src/forms-core/business-function.ts +209 -0
  228. package/src/forms-core/calculation.ts +167 -0
  229. package/src/forms-core/controller.ts +922 -0
  230. package/src/forms-core/elements.ts +86 -0
  231. package/src/forms-core/email-domains.ts +68 -0
  232. package/src/forms-core/file-rules.ts +123 -0
  233. package/src/forms-core/formula.ts +1339 -0
  234. package/src/forms-core/index.ts +122 -0
  235. package/src/forms-core/units.ts +308 -0
  236. package/src/forms-core/us-states.ts +68 -0
  237. package/src/forms-core/validation.ts +1037 -0
  238. package/src/forms.ts +63 -0
  239. package/src/gallery-types.ts +31 -0
  240. package/src/graphql.ts +295 -0
  241. package/src/index.ts +505 -0
  242. package/src/marketing-schema.ts +395 -0
  243. package/src/mcp.ts +108 -0
  244. package/src/native.ts +73 -0
  245. package/src/next-revalidate.ts +124 -0
  246. package/src/parallel-pages.ts +192 -0
  247. package/src/payment-icons.ts +205 -0
  248. package/src/proxy.ts +173 -0
  249. package/src/qwik.tsx +1234 -0
  250. package/src/react-analytics.tsx +76 -0
  251. package/src/react-attribution.tsx +192 -0
  252. package/src/react-marketing.tsx +338 -0
  253. package/src/react.tsx +5495 -0
  254. package/src/reserved-paths.ts +65 -0
  255. package/src/revalidate-verify.ts +98 -0
  256. package/src/sdk.ts +1671 -0
  257. package/src/seo.ts +488 -0
  258. package/src/socials.ts +230 -0
  259. package/src/solid.tsx +1466 -0
  260. package/src/static.ts +21 -0
  261. package/src/styles/biab-forms.css +484 -0
  262. package/src/svelte/BiabForm.svelte +1069 -0
  263. package/src/svelte/context.ts +57 -0
  264. package/src/svelte/index.ts +79 -0
  265. package/src/url-pattern.ts +153 -0
  266. package/src/vanilla.ts +1290 -0
  267. package/src/vue/BiabForm.vue +1538 -0
  268. package/src/vue/index.ts +119 -0
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Payment-method brand icons — framework-agnostic.
3
+ *
4
+ * The SDK ships the SVG path data for every payment method a Company Profile can
5
+ * enable, plus `paymentIconSvg()`, which returns a ready-to-inject `<svg>`
6
+ * markup string. No framework dependency: drop the string into React
7
+ * (`dangerouslySetInnerHTML`), Vue (`v-html`), Svelte (`{@html}`), Angular
8
+ * (`[innerHTML]`), or the DOM (`el.innerHTML`). For full control,
9
+ * `paymentIconData()` returns the raw `{ viewBox, paths }`.
10
+ *
11
+ * Theming — the icon is "the color of the text" by default:
12
+ * - default `fill="currentColor"` → inherits the surrounding text color, so it
13
+ * adapts to light/dark automatically.
14
+ * - `theme: "light" | "dark"` → lock to a fixed neutral permanently.
15
+ * - `color`: any CSS color (e.g. "#1a1a1a") → explicit; wins over `theme`.
16
+ * - text-only is simply not calling this — render the label by itself (icons are
17
+ * additive). Unknown / custom ("additional") methods return `null` so callers
18
+ * fall back to text.
19
+ *
20
+ * Icon sources: Font Awesome Free (CC BY 4.0) and Simple Icons (CC0).
21
+ *
22
+ * GENERATED from react-icons path data — do not edit the data by hand; see
23
+ * scripts that produced PAYMENT_ICONS.
24
+ */
25
+ /** Every payment method the Company Profile can toggle on. */
26
+ export type PaymentMethodIconKey = "cash" | "visa" | "mastercard" | "discover" | "americanExpress" | "personalCheck" | "paypal" | "venmo" | "cashApp" | "zelle" | "applePay";
27
+ export type PaymentIconData = {
28
+ /** SVG viewBox, e.g. "0 0 576 512". */
29
+ viewBox: string;
30
+ /** Human-readable label, e.g. "American Express". */
31
+ label: string;
32
+ /** One or more SVG path `d` strings, drawn with the resolved fill color. */
33
+ paths: string[];
34
+ };
35
+ /** Force a fixed neutral instead of inheriting the text color. */
36
+ export type PaymentIconTheme = "light" | "dark";
37
+ export type PaymentIconOptions = {
38
+ /** Explicit CSS color (e.g. "#1a1a1a" or "var(--brand)"). Wins over `theme`. */
39
+ color?: string;
40
+ /** Lock the icon to a fixed neutral: light bg → dark icon, dark bg → light. */
41
+ theme?: PaymentIconTheme;
42
+ /** Width/height. Number → px; string → used as-is. Default "1em". */
43
+ size?: number | string;
44
+ /** Accessible label. Defaults to the method label; pass "" to hide it. */
45
+ title?: string;
46
+ };
47
+ /** Brand icon data, keyed by Company Profile payment method. */
48
+ export declare const PAYMENT_ICONS: Record<PaymentMethodIconKey, PaymentIconData>;
49
+ /** All supported payment-method keys. */
50
+ export declare const PAYMENT_ICON_KEYS: PaymentMethodIconKey[];
51
+ /**
52
+ * Look up the raw icon data for a payment method. Returns `null` for unknown or
53
+ * custom methods so callers can fall back to a text-only label.
54
+ */
55
+ export declare function paymentIconData(method: string): PaymentIconData | null;
56
+ /**
57
+ * Render a payment-method icon as an `<svg>` markup string, ready to inject in
58
+ * any framework. Returns `null` for unknown/custom methods (render text instead).
59
+ *
60
+ * @example
61
+ * el.innerHTML = paymentIconSvg("visa") ?? ""; // currentColor
62
+ * paymentIconSvg("applePay", { theme: "dark", size: 28 }); // forced light icon
63
+ * paymentIconSvg("zelle", { color: "#6d1ed4" }); // brand color
64
+ */
65
+ export declare function paymentIconSvg(method: string, options?: PaymentIconOptions): string | null;
66
+ //# sourceMappingURL=payment-icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-icons.d.ts","sourceRoot":"","sources":["../src/payment-icons.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,8DAA8D;AAC9D,MAAM,MAAM,oBAAoB,GAC7B,MAAM,GACN,MAAM,GACN,YAAY,GACZ,UAAU,GACV,iBAAiB,GACjB,eAAe,GACf,QAAQ,GACR,OAAO,GACP,SAAS,GACT,OAAO,GACP,UAAU,CAAC;AAEd,MAAM,MAAM,eAAe,GAAG;IAC7B,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,KAAK,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,kEAAkE;AAClE,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhD,MAAM,MAAM,kBAAkB,GAAG;IAChC,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,qEAAqE;IACrE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,oBAAoB,EAAE,eAAe,CA8EvE,CAAC;AAEF,yCAAyC;AACzC,eAAO,MAAM,iBAAiB,EAEzB,oBAAoB,EAAE,CAAC;AAqB5B;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAGtE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC7B,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,kBAAuB,GAC9B,MAAM,GAAG,IAAI,CAgBf"}
@@ -0,0 +1,160 @@
1
+ /**
2
+ * Payment-method brand icons — framework-agnostic.
3
+ *
4
+ * The SDK ships the SVG path data for every payment method a Company Profile can
5
+ * enable, plus `paymentIconSvg()`, which returns a ready-to-inject `<svg>`
6
+ * markup string. No framework dependency: drop the string into React
7
+ * (`dangerouslySetInnerHTML`), Vue (`v-html`), Svelte (`{@html}`), Angular
8
+ * (`[innerHTML]`), or the DOM (`el.innerHTML`). For full control,
9
+ * `paymentIconData()` returns the raw `{ viewBox, paths }`.
10
+ *
11
+ * Theming — the icon is "the color of the text" by default:
12
+ * - default `fill="currentColor"` → inherits the surrounding text color, so it
13
+ * adapts to light/dark automatically.
14
+ * - `theme: "light" | "dark"` → lock to a fixed neutral permanently.
15
+ * - `color`: any CSS color (e.g. "#1a1a1a") → explicit; wins over `theme`.
16
+ * - text-only is simply not calling this — render the label by itself (icons are
17
+ * additive). Unknown / custom ("additional") methods return `null` so callers
18
+ * fall back to text.
19
+ *
20
+ * Icon sources: Font Awesome Free (CC BY 4.0) and Simple Icons (CC0).
21
+ *
22
+ * GENERATED from react-icons path data — do not edit the data by hand; see
23
+ * scripts that produced PAYMENT_ICONS.
24
+ */
25
+ /** Brand icon data, keyed by Company Profile payment method. */
26
+ export const PAYMENT_ICONS = {
27
+ cash: {
28
+ viewBox: "0 0 512 512",
29
+ label: "Cash",
30
+ paths: [
31
+ "M32 96v256h448V96H32zm160.5 224h-80.4c0-26.6-21.5-48.1-48.1-48.1V192c35.3 0 64-28.7 64-64h64.5c-19.9 23.5-32.5 57.8-32.5 96s12.6 72.5 32.5 96zM448 271.9c-26 0-48 21.5-48 48.1h-80.5c19.9-23.5 32.5-57.8 32.5-96s-12.6-72.5-32.5-96H384c0 35.3 28.7 64 64 64v79.9zM32 384h448v32H32z",
32
+ ],
33
+ },
34
+ visa: {
35
+ viewBox: "0 0 576 512",
36
+ label: "Visa",
37
+ paths: [
38
+ "M470.1 231.3s7.6 37.2 9.3 45H446c3.3-8.9 16-43.5 16-43.5-.2.3 3.3-9.1 5.3-14.9l2.8 13.4zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM152.5 331.2L215.7 176h-42.5l-39.3 106-4.3-21.5-14-71.4c-2.3-9.9-9.4-12.7-18.2-13.1H32.7l-.7 3.1c15.8 4 29.9 9.8 42.2 17.1l35.8 135h42.5zm94.4.2L272.1 176h-40.2l-25.1 155.4h40.1zm139.9-50.8c.2-17.7-10.6-31.2-33.7-42.3-14.1-7.1-22.7-11.9-22.7-19.2.2-6.6 7.3-13.4 23.1-13.4 13.1-.3 22.7 2.8 29.9 5.9l3.6 1.7 5.5-33.6c-7.9-3.1-20.5-6.6-36-6.6-39.7 0-67.6 21.2-67.8 51.4-.3 22.3 20 34.7 35.2 42.2 15.5 7.6 20.8 12.6 20.8 19.3-.2 10.4-12.6 15.2-24.1 15.2-16 0-24.6-2.5-37.7-8.3l-5.3-2.5-5.6 34.9c9.4 4.3 26.8 8.1 44.8 8.3 42.2.1 69.7-20.8 70-53zM528 331.4L495.6 176h-31.1c-9.6 0-16.9 2.8-21 12.9l-59.7 142.5H426s6.9-19.2 8.4-23.3H486c1.2 5.5 4.8 23.3 4.8 23.3H528z",
39
+ ],
40
+ },
41
+ mastercard: {
42
+ viewBox: "0 0 576 512",
43
+ label: "Mastercard",
44
+ paths: [
45
+ "M482.9 410.3c0 6.8-4.6 11.7-11.2 11.7-6.8 0-11.2-5.2-11.2-11.7 0-6.5 4.4-11.7 11.2-11.7 6.6 0 11.2 5.2 11.2 11.7zm-310.8-11.7c-7.1 0-11.2 5.2-11.2 11.7 0 6.5 4.1 11.7 11.2 11.7 6.5 0 10.9-4.9 10.9-11.7-.1-6.5-4.4-11.7-10.9-11.7zm117.5-.3c-5.4 0-8.7 3.5-9.5 8.7h19.1c-.9-5.7-4.4-8.7-9.6-8.7zm107.8.3c-6.8 0-10.9 5.2-10.9 11.7 0 6.5 4.1 11.7 10.9 11.7 6.8 0 11.2-4.9 11.2-11.7 0-6.5-4.4-11.7-11.2-11.7zm105.9 26.1c0 .3.3.5.3 1.1 0 .3-.3.5-.3 1.1-.3.3-.3.5-.5.8-.3.3-.5.5-1.1.5-.3.3-.5.3-1.1.3-.3 0-.5 0-1.1-.3-.3 0-.5-.3-.8-.5-.3-.3-.5-.5-.5-.8-.3-.5-.3-.8-.3-1.1 0-.5 0-.8.3-1.1 0-.5.3-.8.5-1.1.3-.3.5-.3.8-.5.5-.3.8-.3 1.1-.3.5 0 .8 0 1.1.3.5.3.8.3 1.1.5s.2.6.5 1.1zm-2.2 1.4c.5 0 .5-.3.8-.3.3-.3.3-.5.3-.8 0-.3 0-.5-.3-.8-.3 0-.5-.3-1.1-.3h-1.6v3.5h.8V426h.3l1.1 1.4h.8l-1.1-1.3zM576 81v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V81c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM64 220.6c0 76.5 62.1 138.5 138.5 138.5 27.2 0 53.9-8.2 76.5-23.1-72.9-59.3-72.4-171.2 0-230.5-22.6-15-49.3-23.1-76.5-23.1-76.4-.1-138.5 62-138.5 138.2zm224 108.8c70.5-55 70.2-162.2 0-217.5-70.2 55.3-70.5 162.6 0 217.5zm-142.3 76.3c0-8.7-5.7-14.4-14.7-14.7-4.6 0-9.5 1.4-12.8 6.5-2.4-4.1-6.5-6.5-12.2-6.5-3.8 0-7.6 1.4-10.6 5.4V392h-8.2v36.7h8.2c0-18.9-2.5-30.2 9-30.2 10.2 0 8.2 10.2 8.2 30.2h7.9c0-18.3-2.5-30.2 9-30.2 10.2 0 8.2 10 8.2 30.2h8.2v-23zm44.9-13.7h-7.9v4.4c-2.7-3.3-6.5-5.4-11.7-5.4-10.3 0-18.2 8.2-18.2 19.3 0 11.2 7.9 19.3 18.2 19.3 5.2 0 9-1.9 11.7-5.4v4.6h7.9V392zm40.5 25.6c0-15-22.9-8.2-22.9-15.2 0-5.7 11.9-4.8 18.5-1.1l3.3-6.5c-9.4-6.1-30.2-6-30.2 8.2 0 14.3 22.9 8.3 22.9 15 0 6.3-13.5 5.8-20.7.8l-3.5 6.3c11.2 7.6 32.6 6 32.6-7.5zm35.4 9.3l-2.2-6.8c-3.8 2.1-12.2 4.4-12.2-4.1v-16.6h13.1V392h-13.1v-11.2h-8.2V392h-7.6v7.3h7.6V416c0 17.6 17.3 14.4 22.6 10.9zm13.3-13.4h27.5c0-16.2-7.4-22.6-17.4-22.6-10.6 0-18.2 7.9-18.2 19.3 0 20.5 22.6 23.9 33.8 14.2l-3.8-6c-7.8 6.4-19.6 5.8-21.9-4.9zm59.1-21.5c-4.6-2-11.6-1.8-15.2 4.4V392h-8.2v36.7h8.2V408c0-11.6 9.5-10.1 12.8-8.4l2.4-7.6zm10.6 18.3c0-11.4 11.6-15.1 20.7-8.4l3.8-6.5c-11.6-9.1-32.7-4.1-32.7 15 0 19.8 22.4 23.8 32.7 15l-3.8-6.5c-9.2 6.5-20.7 2.6-20.7-8.6zm66.7-18.3H408v4.4c-8.3-11-29.9-4.8-29.9 13.9 0 19.2 22.4 24.7 29.9 13.9v4.6h8.2V392zm33.7 0c-2.4-1.2-11-2.9-15.2 4.4V392h-7.9v36.7h7.9V408c0-11 9-10.3 12.8-8.4l2.4-7.6zm40.3-14.9h-7.9v19.3c-8.2-10.9-29.9-5.1-29.9 13.9 0 19.4 22.5 24.6 29.9 13.9v4.6h7.9v-51.7zm7.6-75.1v4.6h.8V302h1.9v-.8h-4.6v.8h1.9zm6.6 123.8c0-.5 0-1.1-.3-1.6-.3-.3-.5-.8-.8-1.1-.3-.3-.8-.5-1.1-.8-.5 0-1.1-.3-1.6-.3-.3 0-.8.3-1.4.3-.5.3-.8.5-1.1.8-.5.3-.8.8-.8 1.1-.3.5-.3 1.1-.3 1.6 0 .3 0 .8.3 1.4 0 .3.3.8.8 1.1.3.3.5.5 1.1.8.5.3 1.1.3 1.4.3.5 0 1.1 0 1.6-.3.3-.3.8-.5 1.1-.8.3-.3.5-.8.8-1.1.3-.6.3-1.1.3-1.4zm3.2-124.7h-1.4l-1.6 3.5-1.6-3.5h-1.4v5.4h.8v-4.1l1.6 3.5h1.1l1.4-3.5v4.1h1.1v-5.4zm4.4-80.5c0-76.2-62.1-138.3-138.5-138.3-27.2 0-53.9 8.2-76.5 23.1 72.1 59.3 73.2 171.5 0 230.5 22.6 15 49.5 23.1 76.5 23.1 76.4.1 138.5-61.9 138.5-138.4z",
46
+ ],
47
+ },
48
+ discover: {
49
+ viewBox: "0 0 576 512",
50
+ label: "Discover",
51
+ paths: [
52
+ "M520.4 196.1c0-7.9-5.5-12.1-15.6-12.1h-4.9v24.9h4.7c10.3 0 15.8-4.4 15.8-12.8zM528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-44.1 138.9c22.6 0 52.9-4.1 52.9 24.4 0 12.6-6.6 20.7-18.7 23.2l25.8 34.4h-19.6l-22.2-32.8h-2.2v32.8h-16zm-55.9.1h45.3v14H444v18.2h28.3V217H444v22.2h29.3V253H428zm-68.7 0l21.9 55.2 22.2-55.2h17.5l-35.5 84.2h-8.6l-35-84.2zm-55.9-3c24.7 0 44.6 20 44.6 44.6 0 24.7-20 44.6-44.6 44.6-24.7 0-44.6-20-44.6-44.6 0-24.7 20-44.6 44.6-44.6zm-49.3 6.1v19c-20.1-20.1-46.8-4.7-46.8 19 0 25 27.5 38.5 46.8 19.2v19c-29.7 14.3-63.3-5.7-63.3-38.2 0-31.2 33.1-53 63.3-38zm-97.2 66.3c11.4 0 22.4-15.3-3.3-24.4-15-5.5-20.2-11.4-20.2-22.7 0-23.2 30.6-31.4 49.7-14.3l-8.4 10.8c-10.4-11.6-24.9-6.2-24.9 2.5 0 4.4 2.7 6.9 12.3 10.3 18.2 6.6 23.6 12.5 23.6 25.6 0 29.5-38.8 37.4-56.6 11.3l10.3-9.9c3.7 7.1 9.9 10.8 17.5 10.8zM55.4 253H32v-82h23.4c26.1 0 44.1 17 44.1 41.1 0 18.5-13.2 40.9-44.1 40.9zm67.5 0h-16v-82h16zM544 433c0 8.2-6.8 15-15 15H128c189.6-35.6 382.7-139.2 416-160zM74.1 191.6c-5.2-4.9-11.6-6.6-21.9-6.6H48v54.2h4.2c10.3 0 17-2 21.9-6.4 5.7-5.2 8.9-12.8 8.9-20.7s-3.2-15.5-8.9-20.5z",
53
+ ],
54
+ },
55
+ americanExpress: {
56
+ viewBox: "0 0 576 512",
57
+ label: "American Express",
58
+ paths: [
59
+ "M325.1 167.8c0-16.4-14.1-18.4-27.4-18.4l-39.1-.3v69.3H275v-25.1h18c18.4 0 14.5 10.3 14.8 25.1h16.6v-13.5c0-9.2-1.5-15.1-11-18.4 7.4-3 11.8-10.7 11.7-18.7zm-29.4 11.3H275v-15.3h21c5.1 0 10.7 1 10.7 7.4 0 6.6-5.3 7.9-11 7.9zM279 268.6h-52.7l-21 22.8-20.5-22.8h-66.5l-.1 69.3h65.4l21.3-23 20.4 23h32.2l.1-23.3c18.9 0 49.3 4.6 49.3-23.3 0-17.3-12.3-22.7-27.9-22.7zm-103.8 54.7h-40.6v-13.8h36.3v-14.1h-36.3v-12.5h41.7l17.9 20.2zm65.8 8.2l-25.3-28.1L241 276zm37.8-31h-21.2v-17.6h21.5c5.6 0 10.2 2.3 10.2 8.4 0 6.4-4.6 9.2-10.5 9.2zm-31.6-136.7v-14.6h-55.5v69.3h55.5v-14.3h-38.9v-13.8h37.8v-14.1h-37.8v-12.5zM576 255.4h-.2zm-194.6 31.9c0-16.4-14.1-18.7-27.1-18.7h-39.4l-.1 69.3h16.6l.1-25.3h17.6c11 0 14.8 2 14.8 13.8l-.1 11.5h16.6l.1-13.8c0-8.9-1.8-15.1-11-18.4 7.7-3.1 11.8-10.8 11.9-18.4zm-29.2 11.2h-20.7v-15.6h21c5.1 0 10.7 1 10.7 7.4 0 6.9-5.4 8.2-11 8.2zm-172.8-80v-69.3h-27.6l-19.7 47-21.7-47H83.3v65.7l-28.1-65.7H30.7L1 218.5h17.9l6.4-15.3h34.5l6.4 15.3H100v-54.2l24 54.2h14.6l24-54.2v54.2zM31.2 188.8l11.2-27.6 11.5 27.6zm477.4 158.9v-4.5c-10.8 5.6-3.9 4.5-156.7 4.5 0-25.2.1-23.9 0-25.2-1.7-.1-3.2-.1-9.4-.1 0 17.9-.1 6.8-.1 25.3h-39.6c0-12.1.1-15.3.1-29.2-10 6-22.8 6.4-34.3 6.2 0 14.7-.1 8.3-.1 23h-48.9c-5.1-5.7-2.7-3.1-15.4-17.4-3.2 3.5-12.8 13.9-16.1 17.4h-82v-92.3h83.1c5 5.6 2.8 3.1 15.5 17.2 3.2-3.5 12.2-13.4 15.7-17.2h58c9.8 0 18 1.9 24.3 5.6v-5.6c54.3 0 64.3-1.4 75.7 5.1v-5.1h78.2v5.2c11.4-6.9 19.6-5.2 64.9-5.2v5c10.3-5.9 16.6-5.2 54.3-5V80c0-26.5-21.5-48-48-48h-480c-26.5 0-48 21.5-48 48v109.8c9.4-21.9 19.7-46 23.1-53.9h39.7c4.3 10.1 1.6 3.7 9 21.1v-21.1h46c2.9 6.2 11.1 24 13.9 30 5.8-13.6 10.1-23.9 12.6-30h103c0-.1 11.5 0 11.6 0 43.7.2 53.6-.8 64.4 5.3v-5.3H363v9.3c7.6-6.1 17.9-9.3 30.7-9.3h27.6c0 .5 1.9.3 2.3.3H456c4.2 9.8 2.6 6 8.8 20.6v-20.6h43.3c4.9 8-1-1.8 11.2 18.4v-18.4h39.9v92h-41.6c-5.4-9-1.4-2.2-13.2-21.9v21.9h-52.8c-6.4-14.8-.1-.3-6.6-15.3h-19c-4.2 10-2.2 5.2-6.4 15.3h-26.8c-12.3 0-22.3-3-29.7-8.9v8.9h-66.5c-.3-13.9-.1-24.8-.1-24.8-1.8-.3-3.4-.2-9.8-.2v25.1H151.2v-11.4c-2.5 5.6-2.7 5.9-5.1 11.4h-29.5c-4-8.9-2.9-6.4-5.1-11.4v11.4H58.6c-4.2-10.1-2.2-5.3-6.4-15.3H33c-4.2 10-2.2 5.2-6.4 15.3H0V432c0 26.5 21.5 48 48 48h480.1c26.5 0 48-21.5 48-48v-90.4c-12.7 8.3-32.7 6.1-67.5 6.1zm36.3-64.5H575v-14.6h-32.9c-12.8 0-23.8 6.6-23.8 20.7 0 33 42.7 12.8 42.7 27.4 0 5.1-4.3 6.4-8.4 6.4h-32l-.1 14.8h32c8.4 0 17.6-1.8 22.5-8.9v-25.8c-10.5-13.8-39.3-1.3-39.3-13.5 0-5.8 4.6-6.5 9.2-6.5zm-57 39.8h-32.2l-.1 14.8h32.2c14.8 0 26.2-5.6 26.2-22 0-33.2-42.9-11.2-42.9-26.3 0-5.6 4.9-6.4 9.2-6.4h30.4v-14.6h-33.2c-12.8 0-23.5 6.6-23.5 20.7 0 33 42.7 12.5 42.7 27.4-.1 5.4-4.7 6.4-8.8 6.4zm-42.2-40.1v-14.3h-55.2l-.1 69.3h55.2l.1-14.3-38.6-.3v-13.8H445v-14.1h-37.8v-12.5zm-56.3-108.1c-.3.2-1.4 2.2-1.4 7.6 0 6 .9 7.7 1.1 7.9.2.1 1.1.5 3.4.5l7.3-16.9c-1.1 0-2.1-.1-3.1-.1-5.6 0-7 .7-7.3 1zm20.4-10.5h-.1zm-16.2-15.2c-23.5 0-34 12-34 35.3 0 22.2 10.2 34 33 34h19.2l6.4-15.3h34.3l6.6 15.3h33.7v-51.9l31.2 51.9h23.6v-69h-16.9v48.1l-29.1-48.1h-25.3v65.4l-27.9-65.4h-24.8l-23.5 54.5h-7.4c-13.3 0-16.1-8.1-16.1-19.9 0-23.8 15.7-20 33.1-19.7v-15.2zm42.1 12.1l11.2 27.6h-22.8zm-101.1-12v69.3h16.9v-69.3z",
60
+ ],
61
+ },
62
+ personalCheck: {
63
+ viewBox: "0 0 640 512",
64
+ label: "Personal Check",
65
+ paths: [
66
+ "M0 448c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V128H0v320zm448-208c0-8.84 7.16-16 16-16h96c8.84 0 16 7.16 16 16v32c0 8.84-7.16 16-16 16h-96c-8.84 0-16-7.16-16-16v-32zm0 120c0-4.42 3.58-8 8-8h112c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H456c-4.42 0-8-3.58-8-8v-16zM64 264c0-4.42 3.58-8 8-8h304c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16zm0 96c0-4.42 3.58-8 8-8h176c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8H72c-4.42 0-8-3.58-8-8v-16zM624 32H16C7.16 32 0 39.16 0 48v48h640V48c0-8.84-7.16-16-16-16z",
67
+ ],
68
+ },
69
+ paypal: {
70
+ viewBox: "0 0 576 512",
71
+ label: "PayPal",
72
+ paths: [
73
+ "M186.3 258.2c0 12.2-9.7 21.5-22 21.5-9.2 0-16-5.2-16-15 0-12.2 9.5-22 21.7-22 9.3 0 16.3 5.7 16.3 15.5zM80.5 209.7h-4.7c-1.5 0-3 1-3.2 2.7l-4.3 26.7 8.2-.3c11 0 19.5-1.5 21.5-14.2 2.3-13.4-6.2-14.9-17.5-14.9zm284 0H360c-1.8 0-3 1-3.2 2.7l-4.2 26.7 8-.3c13 0 22-3 22-18-.1-10.6-9.6-11.1-18.1-11.1zM576 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM128.3 215.4c0-21-16.2-28-34.7-28h-40c-2.5 0-5 2-5.2 4.7L32 294.2c-.3 2 1.2 4 3.2 4h19c2.7 0 5.2-2.9 5.5-5.7l4.5-26.6c1-7.2 13.2-4.7 18-4.7 28.6 0 46.1-17 46.1-45.8zm84.2 8.8h-19c-3.8 0-4 5.5-4.2 8.2-5.8-8.5-14.2-10-23.7-10-24.5 0-43.2 21.5-43.2 45.2 0 19.5 12.2 32.2 31.7 32.2 9 0 20.2-4.9 26.5-11.9-.5 1.5-1 4.7-1 6.2 0 2.3 1 4 3.2 4H200c2.7 0 5-2.9 5.5-5.7l10.2-64.3c.3-1.9-1.2-3.9-3.2-3.9zm40.5 97.9l63.7-92.6c.5-.5.5-1 .5-1.7 0-1.7-1.5-3.5-3.2-3.5h-19.2c-1.7 0-3.5 1-4.5 2.5l-26.5 39-11-37.5c-.8-2.2-3-4-5.5-4h-18.7c-1.7 0-3.2 1.8-3.2 3.5 0 1.2 19.5 56.8 21.2 62.1-2.7 3.8-20.5 28.6-20.5 31.6 0 1.8 1.5 3.2 3.2 3.2h19.2c1.8-.1 3.5-1.1 4.5-2.6zm159.3-106.7c0-21-16.2-28-34.7-28h-39.7c-2.7 0-5.2 2-5.5 4.7l-16.2 102c-.2 2 1.3 4 3.2 4h20.5c2 0 3.5-1.5 4-3.2l4.5-29c1-7.2 13.2-4.7 18-4.7 28.4 0 45.9-17 45.9-45.8zm84.2 8.8h-19c-3.8 0-4 5.5-4.3 8.2-5.5-8.5-14-10-23.7-10-24.5 0-43.2 21.5-43.2 45.2 0 19.5 12.2 32.2 31.7 32.2 9.3 0 20.5-4.9 26.5-11.9-.3 1.5-1 4.7-1 6.2 0 2.3 1 4 3.2 4H484c2.7 0 5-2.9 5.5-5.7l10.2-64.3c.3-1.9-1.2-3.9-3.2-3.9zm47.5-33.3c0-2-1.5-3.5-3.2-3.5h-18.5c-1.5 0-3 1.2-3.2 2.7l-16.2 104-.3.5c0 1.8 1.5 3.5 3.5 3.5h16.5c2.5 0 5-2.9 5.2-5.7L544 191.2v-.3zm-90 51.8c-12.2 0-21.7 9.7-21.7 22 0 9.7 7 15 16.2 15 12 0 21.7-9.2 21.7-21.5.1-9.8-6.9-15.5-16.2-15.5z",
74
+ ],
75
+ },
76
+ venmo: {
77
+ viewBox: "0 0 24 24",
78
+ label: "Venmo",
79
+ paths: [
80
+ "M21.772 13.119c-.267 0-.381-.251-.38-.655 0-.533.121-1.575.712-1.575.267 0 .357.243.357.598 0 .533-.13 1.632-.689 1.632Zm.502-3.377c-1.677 0-2.405 1.285-2.405 2.658 0 1.042.421 1.874 1.693 1.874 1.717 0 2.438-1.406 2.438-2.763 0-1.025-.462-1.769-1.726-1.769Zm-3.833 0c-.558 0-.964.17-1.393.477-.154-.275-.462-.477-.932-.477-.542 0-.947.219-1.247.437l-.04-.364H13.54l-.688 4.354h1.506l.479-3.053c.129-.065.323-.154.518-.154.145 0 .267.049.267.267 0 .056-.016.145-.024.218l-.429 2.722h1.498l.478-3.053c.138-.073.324-.154.51-.154.146 0 .268.049.268.267 0 .056-.017.145-.025.218l-.429 2.722h1.499l.461-2.908c.025-.153.049-.388.049-.549 0-.582-.267-.97-1.037-.97Zm-6.871 0c-.575 0-.98.219-1.287.421l-.017-.348H8.962l-.689 4.354H9.78l.478-3.053c.13-.065.324-.154.518-.154.147 0 .268.049.268.242 0 .081-.024.227-.032.299l-.422 2.666h1.499l.462-2.908c.024-.153.049-.388.049-.549 0-.582-.268-.97-1.03-.97Zm-5.631 1.834c.041-.485.413-.824.697-.824.162 0 .299.097.299.291 0 .404-.713.533-.996.533Zm.843-1.834c-1.604 0-2.382 1.39-2.382 2.698 0 1.01.478 1.817 1.814 1.817.527 0 1.07-.113 1.418-.282l.186-1.26c-.494.25-.874.347-1.271.347-.365 0-.64-.194-.64-.687.826-.008 2.252-.347 2.252-1.453 0-.687-.494-1.18-1.377-1.18Zm-4.239.267c.089.186.146.412.146.743 0 .606-.429 1.494-.777 2.06l-.373-2.989L0 9.969l.705 4.2h1.757c.77-1.01 1.718-2.448 1.718-3.554 0-.347-.073-.622-.235-.889l-1.402.283Z",
81
+ ],
82
+ },
83
+ cashApp: {
84
+ viewBox: "0 0 24 24",
85
+ label: "Cash App",
86
+ paths: [
87
+ "M23.59 3.475a5.1 5.1 0 00-3.05-3.05c-1.31-.42-2.5-.42-4.92-.42H8.36c-2.4 0-3.61 0-4.9.4a5.1 5.1 0 00-3.05 3.06C0 4.765 0 5.965 0 8.365v7.27c0 2.41 0 3.6.4 4.9a5.1 5.1 0 003.05 3.05c1.3.41 2.5.41 4.9.41h7.28c2.41 0 3.61 0 4.9-.4a5.1 5.1 0 003.06-3.06c.41-1.3.41-2.5.41-4.9v-7.25c0-2.41 0-3.61-.41-4.91zm-6.17 4.63l-.93.93a.5.5 0 01-.67.01 5 5 0 00-3.22-1.18c-.97 0-1.94.32-1.94 1.21 0 .9 1.04 1.2 2.24 1.65 2.1.7 3.84 1.58 3.84 3.64 0 2.24-1.74 3.78-4.58 3.95l-.26 1.2a.49.49 0 01-.48.39H9.63l-.09-.01a.5.5 0 01-.38-.59l.28-1.27a6.54 6.54 0 01-2.88-1.57v-.01a.48.48 0 010-.68l1-.97a.49.49 0 01.67 0c.91.86 2.13 1.34 3.39 1.32 1.3 0 2.17-.55 2.17-1.42 0-.87-.88-1.1-2.54-1.72-1.76-.63-3.43-1.52-3.43-3.6 0-2.42 2.01-3.6 4.39-3.71l.25-1.23a.48.48 0 01.48-.38h1.78l.1.01c.26.06.43.31.37.57l-.27 1.37c.9.3 1.75.77 2.48 1.39l.02.02c.19.2.19.5 0 .68z",
88
+ ],
89
+ },
90
+ zelle: {
91
+ viewBox: "0 0 24 24",
92
+ label: "Zelle",
93
+ paths: [
94
+ "M13.559 24h-2.841a.483.483 0 0 1-.483-.483v-2.765H5.638a.667.667 0 0 1-.666-.666v-2.234a.67.67 0 0 1 .142-.412l8.139-10.382h-7.25a.667.667 0 0 1-.667-.667V3.914c0-.367.299-.666.666-.666h4.23V.483c0-.266.217-.483.483-.483h2.841c.266 0 .483.217.483.483v2.765h4.323c.367 0 .666.299.666.666v2.137a.67.67 0 0 1-.141.41l-8.19 10.481h7.665c.367 0 .666.299.666.666v2.477a.667.667 0 0 1-.666.667h-4.32v2.765a.483.483 0 0 1-.483.483Z",
95
+ ],
96
+ },
97
+ applePay: {
98
+ viewBox: "0 0 576 512",
99
+ label: "Apple Pay",
100
+ paths: [
101
+ "M302.2 218.4c0 17.2-10.5 27.1-29 27.1h-24.3v-54.2h24.4c18.4 0 28.9 9.8 28.9 27.1zm47.5 62.6c0 8.3 7.2 13.7 18.5 13.7 14.4 0 25.2-9.1 25.2-21.9v-7.7l-23.5 1.5c-13.3.9-20.2 5.8-20.2 14.4zM576 79v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h480c26.5 0 48 21.5 48 48zM127.8 197.2c8.4.7 16.8-4.2 22.1-10.4 5.2-6.4 8.6-15 7.7-23.7-7.4.3-16.6 4.9-21.9 11.3-4.8 5.5-8.9 14.4-7.9 22.8zm60.6 74.5c-.2-.2-19.6-7.6-19.8-30-.2-18.7 15.3-27.7 16-28.2-8.8-13-22.4-14.4-27.1-14.7-12.2-.7-22.6 6.9-28.4 6.9-5.9 0-14.7-6.6-24.3-6.4-12.5.2-24.2 7.3-30.5 18.6-13.1 22.6-3.4 56 9.3 74.4 6.2 9.1 13.7 19.1 23.5 18.7 9.3-.4 13-6 24.2-6 11.3 0 14.5 6 24.3 5.9 10.2-.2 16.5-9.1 22.8-18.2 6.9-10.4 9.8-20.4 10-21zm135.4-53.4c0-26.6-18.5-44.8-44.9-44.8h-51.2v136.4h21.2v-46.6h29.3c26.8 0 45.6-18.4 45.6-45zm90 23.7c0-19.7-15.8-32.4-40-32.4-22.5 0-39.1 12.9-39.7 30.5h19.1c1.6-8.4 9.4-13.9 20-13.9 13 0 20.2 6 20.2 17.2v7.5l-26.4 1.6c-24.6 1.5-37.9 11.6-37.9 29.1 0 17.7 13.7 29.4 33.4 29.4 13.3 0 25.6-6.7 31.2-17.4h.4V310h19.6v-68zM516 210.9h-21.5l-24.9 80.6h-.4l-24.9-80.6H422l35.9 99.3-1.9 6c-3.2 10.2-8.5 14.2-17.9 14.2-1.7 0-4.9-.2-6.2-.3v16.4c1.2.4 6.5.5 8.1.5 20.7 0 30.4-7.9 38.9-31.8L516 210.9z",
102
+ ],
103
+ },
104
+ };
105
+ /** All supported payment-method keys. */
106
+ export const PAYMENT_ICON_KEYS = Object.keys(PAYMENT_ICONS);
107
+ const THEME_COLORS = {
108
+ light: "#1a1a1a",
109
+ dark: "#f5f5f5",
110
+ };
111
+ function resolveColor(options) {
112
+ if (options.color)
113
+ return options.color;
114
+ if (options.theme)
115
+ return THEME_COLORS[options.theme];
116
+ return "currentColor";
117
+ }
118
+ function escapeAttr(value) {
119
+ return value
120
+ .replace(/&/g, "&amp;")
121
+ .replace(/"/g, "&quot;")
122
+ .replace(/</g, "&lt;")
123
+ .replace(/>/g, "&gt;");
124
+ }
125
+ /**
126
+ * Look up the raw icon data for a payment method. Returns `null` for unknown or
127
+ * custom methods so callers can fall back to a text-only label.
128
+ */
129
+ export function paymentIconData(method) {
130
+ if (!method)
131
+ return null;
132
+ return PAYMENT_ICONS[method] ?? null;
133
+ }
134
+ /**
135
+ * Render a payment-method icon as an `<svg>` markup string, ready to inject in
136
+ * any framework. Returns `null` for unknown/custom methods (render text instead).
137
+ *
138
+ * @example
139
+ * el.innerHTML = paymentIconSvg("visa") ?? ""; // currentColor
140
+ * paymentIconSvg("applePay", { theme: "dark", size: 28 }); // forced light icon
141
+ * paymentIconSvg("zelle", { color: "#6d1ed4" }); // brand color
142
+ */
143
+ export function paymentIconSvg(method, options = {}) {
144
+ const data = paymentIconData(method);
145
+ if (!data)
146
+ return null;
147
+ const color = resolveColor(options);
148
+ const size = options.size === undefined
149
+ ? "1em"
150
+ : typeof options.size === "number"
151
+ ? String(options.size)
152
+ : options.size;
153
+ const title = options.title === undefined ? data.label : options.title;
154
+ const a11y = title
155
+ ? `role="img" aria-label="${escapeAttr(title)}"`
156
+ : 'aria-hidden="true" focusable="false"';
157
+ const body = data.paths.map((d) => `<path d="${d}"/>`).join("");
158
+ return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${data.viewBox}" width="${size}" height="${size}" fill="${color}" ${a11y}>${body}</svg>`;
159
+ }
160
+ //# sourceMappingURL=payment-icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-icons.js","sourceRoot":"","sources":["../src/payment-icons.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAuCH,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAkD;IAC3E,IAAI,EAAE;QACL,OAAO,EAAE,aAAa;QACtB,KAAK,EAAE,MAAM;QACb,KAAK,EAAE;YACN,sRAAsR;SACtR;KACD;IACD,IAAI,EAAE;QACL,OAAO,EAAE,aAAa;QACtB,KAAK,EAAE,MAAM;QACb,KAAK,EAAE;YACN,w1BAAw1B;SACx1B;KACD;IACD,UAAU,EAAE;QACX,OAAO,EAAE,aAAa;QACtB,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE;YACN,83FAA83F;SAC93F;KACD;IACD,QAAQ,EAAE;QACT,OAAO,EAAE,aAAa;QACtB,KAAK,E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AC,EAAE,CAAC,CAAC;IAChE,OAAO,oDAAoD,IAAI,CAAC,OAAO,YAAY,IAAI,aAAa,IAAI,WAAW,KAAK,KAAK,IAAI,IAAI,IAAI,QAAQ,CAAC;AACnJ,CAAC"}
@@ -0,0 +1,67 @@
1
+ import { BiabDevCustomerPortalClient } from "./client.js";
2
+ /**
3
+ * Browser-safe customer-portal client.
4
+ *
5
+ * The platform's Package API requires a bearer key — exposing it to a browser
6
+ * would let any visitor read all of the org's data. This client never sends
7
+ * the key directly; it calls a *same-origin* proxy route on your tenant
8
+ * server, and the proxy injects the key + customer-portal org pin server-side.
9
+ *
10
+ * Pattern (Next.js example) — your tenant ships:
11
+ * - this client in browser bundles, configured with `proxyBaseUrl`
12
+ * (e.g. `/api/biab/customer-portal`).
13
+ * - a route at that path that calls {@link createCustomerPortalProxyHandler}
14
+ * with your real BIAB API key + the BIAB org id this site is pinned to.
15
+ *
16
+ * The browser client only knows the proxy URL. The bearer key never leaves
17
+ * the tenant server.
18
+ */
19
+ export type BrowserCustomerPortalClientOptions = {
20
+ /** Same-origin proxy path or absolute URL (e.g. "/api/biab/customer-portal"). */
21
+ proxyBaseUrl: string;
22
+ fetch?: typeof fetch;
23
+ };
24
+ /**
25
+ * Browser-only client that talks to your tenant's same-origin proxy route.
26
+ * The proxy injects the BIAB API key and the `X-BIAB-Customer-Portal-Org`
27
+ * pin, so the browser never sees either secret.
28
+ */
29
+ export declare function createBrowserCustomerPortalClient(options: BrowserCustomerPortalClientOptions): BiabDevCustomerPortalClient;
30
+ /**
31
+ * Helper for the *server-side* proxy route a tenant ships. Returns a fetch
32
+ * handler that:
33
+ * - rewrites incoming request paths to the BIAB host's customer-portal API
34
+ * - injects the BIAB API key and `X-BIAB-Customer-Portal-Org` header
35
+ * - forwards the response unchanged.
36
+ *
37
+ * @example // app/api/biab/customer-portal/[...path]/route.ts
38
+ * export const GET = createCustomerPortalProxyHandler({
39
+ * biabBaseUrl: "https://biab.app/api/package/v1",
40
+ * apiKey: process.env.BIAB_API_KEY!,
41
+ * organizationId: process.env.BIAB_ORG_ID!,
42
+ * });
43
+ * export const POST = GET;
44
+ */
45
+ export type CustomerPortalProxyOptions = {
46
+ biabBaseUrl: string;
47
+ apiKey: string;
48
+ /** The BIAB organization id (`org.id` from the portal context) this site is
49
+ * pinned to. Sent as the `X-BIAB-Customer-Portal-Org` header. */
50
+ organizationId?: string;
51
+ /**
52
+ * @deprecated Use {@link organizationId} (the BIAB org id). Still accepted —
53
+ * the platform resolves the pin header by BIAB id or the legacy provider id —
54
+ * but new integrations should pass the BIAB org id and drop any
55
+ * provider-specific env var.
56
+ */
57
+ workosOrganizationId?: string;
58
+ fetch?: typeof fetch;
59
+ /**
60
+ * Origin to send to the platform. Required when the API key has Allowed
61
+ * Host configured on the host (server-to-server `fetch` does not send
62
+ * `Origin`). Accepts a full URL or bare hostname.
63
+ */
64
+ siteOrigin?: string;
65
+ };
66
+ export declare function createCustomerPortalProxyHandler(options: CustomerPortalProxyOptions): (request: Request) => Promise<Response>;
67
+ //# sourceMappingURL=proxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../src/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,2BAA2B,EAC3B,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAChD,iFAAiF;IACjF,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACrB,CAAC;AAiBF;;;;GAIG;AACH,wBAAgB,iCAAiC,CAChD,OAAO,EAAE,kCAAkC,+BAI3C;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf;sEACkE;IAClE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAmBF,wBAAgB,gCAAgC,CAC/C,OAAO,EAAE,0BAA0B,IAgBrB,SAAS,OAAO,uBA6C9B"}
package/dist/proxy.js ADDED
@@ -0,0 +1,97 @@
1
+ import { BiabDevClient, BiabDevCustomerPortalClient, } from "./client.js";
2
+ class BrowserBiabDevClient extends BiabDevClient {
3
+ constructor(options) {
4
+ // Pass a placeholder API key — the proxy ignores the Authorization
5
+ // header from the browser and substitutes its own.
6
+ const init = {
7
+ baseUrl: options.proxyBaseUrl,
8
+ apiKey: "browser-proxy",
9
+ };
10
+ if (options.fetch) {
11
+ init.fetch = options.fetch;
12
+ }
13
+ super(init);
14
+ }
15
+ }
16
+ /**
17
+ * Browser-only client that talks to your tenant's same-origin proxy route.
18
+ * The proxy injects the BIAB API key and the `X-BIAB-Customer-Portal-Org`
19
+ * pin, so the browser never sees either secret.
20
+ */
21
+ export function createBrowserCustomerPortalClient(options) {
22
+ const inner = new BrowserBiabDevClient(options);
23
+ return new BiabDevCustomerPortalClient(inner, null);
24
+ }
25
+ function normalizeSiteOriginForProxy(raw) {
26
+ if (!raw)
27
+ return undefined;
28
+ const trimmed = raw.trim();
29
+ if (!trimmed)
30
+ return undefined;
31
+ const withScheme = /^https?:\/\//i.test(trimmed)
32
+ ? trimmed
33
+ : `https://${trimmed}`;
34
+ try {
35
+ const url = new URL(withScheme);
36
+ return `${url.protocol}//${url.host}`;
37
+ }
38
+ catch {
39
+ return undefined;
40
+ }
41
+ }
42
+ export function createCustomerPortalProxyHandler(options) {
43
+ const fetchImpl = options.fetch ?? fetch;
44
+ const base = options.biabBaseUrl.endsWith("/")
45
+ ? options.biabBaseUrl
46
+ : `${options.biabBaseUrl}/`;
47
+ const siteOrigin = normalizeSiteOriginForProxy(options.siteOrigin);
48
+ // Prefer the BIAB org id; fall back to the deprecated provider-id alias so
49
+ // existing integrations keep working until they migrate.
50
+ const orgPin = options.organizationId ?? options.workosOrganizationId;
51
+ if (!orgPin) {
52
+ throw new Error("createCustomerPortalProxyHandler: `organizationId` is required.");
53
+ }
54
+ return async (request) => {
55
+ const reqUrl = new URL(request.url);
56
+ // Strip the tenant-side mount prefix and forward everything to the
57
+ // platform's `/customer-portal/...` namespace. The browser client
58
+ // always calls `<proxy>/<verb>` (e.g. `<proxy>/context`) so we just
59
+ // preserve the trailing path.
60
+ const tenantMount = reqUrl.pathname.split("/").pop() ?? "";
61
+ const upstreamPath = `customer-portal/${tenantMount}${reqUrl.search}`;
62
+ const upstream = new URL(upstreamPath, base);
63
+ const upstreamHeaders = new Headers();
64
+ upstreamHeaders.set("Authorization", `Bearer ${options.apiKey}`);
65
+ upstreamHeaders.set("X-BIAB-Customer-Portal-Org", orgPin);
66
+ upstreamHeaders.set("Accept", "application/json");
67
+ if (siteOrigin) {
68
+ upstreamHeaders.set("Origin", siteOrigin);
69
+ }
70
+ else {
71
+ const incomingOrigin = request.headers.get("origin");
72
+ if (incomingOrigin && incomingOrigin !== "null") {
73
+ upstreamHeaders.set("Origin", incomingOrigin);
74
+ }
75
+ }
76
+ const incomingContentType = request.headers.get("content-type");
77
+ if (incomingContentType) {
78
+ upstreamHeaders.set("Content-Type", incomingContentType);
79
+ }
80
+ const init = {
81
+ method: request.method,
82
+ headers: upstreamHeaders,
83
+ };
84
+ if (request.method !== "GET" && request.method !== "HEAD") {
85
+ init.body = await request.text();
86
+ }
87
+ const upstreamRes = await fetchImpl(upstream, init);
88
+ const body = await upstreamRes.text();
89
+ return new Response(body, {
90
+ status: upstreamRes.status,
91
+ headers: {
92
+ "content-type": upstreamRes.headers.get("content-type") ?? "application/json",
93
+ },
94
+ });
95
+ };
96
+ }
97
+ //# sourceMappingURL=proxy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"proxy.js","sourceRoot":"","sources":["../src/proxy.ts"],"names":[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AAC;QAC3C,CAAC;aAAM,CAAC;YACP,MAAM,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACrD,IAAI,cAAc,IAAI,cAAc,KAAK,MAAM,EAAE,CAAC;gBACjD,eAAe,CAAC,GAAG,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;YAC/C,CAAC;QACF,CAAC;QACD,MAAM,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAChE,IAAI,mBAAmB,EAAE,CAAC;YACzB,eAAe,CAAC,GAAG,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAAC;QAC1D,CAAC;QAED,MAAM,IAAI,GAAgB;YACzB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO,EAAE,eAAe;SACxB,CAAC;QACF,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YAC3D,IAAI,CAAC,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;QAClC,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACpD,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,CAAC;QACtC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE;YACzB,MAAM,EAAE,WAAW,CAAC,MAAM;YAC1B,OAAO,EAAE;gBACR,cAAc,EACb,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,kBAAkB;aAC9D;SACD,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { type InitBiabAnalyticsOptions } from "./analytics-core.js";
2
+ /**
3
+ * <BIABAnalytics /> — privacy-conscious site analytics for React
4
+ * SDK consumers. Thin wrapper over `initBiabAnalytics()`; non-React
5
+ * consumers can import that function directly from
6
+ * `@businessdash/sdk/analytics-core`.
7
+ *
8
+ * Drop into the root layout once:
9
+ *
10
+ * import { BIABAnalytics } from "@businessdash/sdk/react-analytics";
11
+ *
12
+ * <BIABAnalytics
13
+ * siteId={process.env.BIAB_SITE_ID!}
14
+ * baseUrl={process.env.BIAB_PACKAGE_API_BASE_URL!}
15
+ * apiKey={process.env.NEXT_PUBLIC_BIAB_PUBLIC_KEY!}
16
+ * />
17
+ *
18
+ * What it does + privacy posture: see analytics-core.ts.
19
+ */
20
+ export declare function BIABAnalytics(props: InitBiabAnalyticsOptions): null;
21
+ /** BusinessDash-era name for `<BIABAnalytics />` — same component; the
22
+ * original export stays for every existing consumer. */
23
+ export declare const BusinessDashAnalytics: typeof BIABAnalytics;
24
+ /**
25
+ * Fire a custom event (e.g. "newsletter_signup_clicked") from
26
+ * anywhere in the consumer site. The first call boots a tracker
27
+ * if one isn't already running on this page; subsequent calls
28
+ * piggyback on the existing one.
29
+ */
30
+ export declare function trackBiabEvent(input: {
31
+ siteId: string;
32
+ baseUrl: string;
33
+ apiKey: string;
34
+ customEventName: string;
35
+ path?: string;
36
+ }): void;
37
+ export type { InitBiabAnalyticsOptions } from "./analytics-core.js";
38
+ export { initBiabAnalytics } from "./analytics-core.js";
39
+ //# sourceMappingURL=react-analytics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-analytics.d.ts","sourceRoot":"","sources":["../src/react-analytics.tsx"],"names":[],"mappings":"AAIA,OAAO,EACN,KAAK,wBAAwB,EAE7B,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,wBAAwB,QAc5D;AAED;yDACyD;AACzD,eAAO,MAAM,qBAAqB,sBAAgB,CAAC;AAEnD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,GAAG,IAAI,CAYP;AAED,YAAY,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,59 @@
1
+ "use client";
2
+ import { useEffect } from "react";
3
+ import { initBiabAnalytics, } from "./analytics-core.js";
4
+ /**
5
+ * <BIABAnalytics /> — privacy-conscious site analytics for React
6
+ * SDK consumers. Thin wrapper over `initBiabAnalytics()`; non-React
7
+ * consumers can import that function directly from
8
+ * `@businessdash/sdk/analytics-core`.
9
+ *
10
+ * Drop into the root layout once:
11
+ *
12
+ * import { BIABAnalytics } from "@businessdash/sdk/react-analytics";
13
+ *
14
+ * <BIABAnalytics
15
+ * siteId={process.env.BIAB_SITE_ID!}
16
+ * baseUrl={process.env.BIAB_PACKAGE_API_BASE_URL!}
17
+ * apiKey={process.env.NEXT_PUBLIC_BIAB_PUBLIC_KEY!}
18
+ * />
19
+ *
20
+ * What it does + privacy posture: see analytics-core.ts.
21
+ */
22
+ export function BIABAnalytics(props) {
23
+ // Destructure so the effect closes over the individual config values (its real
24
+ // dependencies) rather than the `props` object identity, which changes every render.
25
+ const { siteId, baseUrl, apiKey, respectDnt } = props;
26
+ useEffect(() => {
27
+ const tracker = initBiabAnalytics({
28
+ siteId,
29
+ baseUrl,
30
+ apiKey,
31
+ ...(respectDnt !== undefined ? { respectDnt } : {}),
32
+ });
33
+ return () => tracker.stop();
34
+ }, [siteId, baseUrl, apiKey, respectDnt]);
35
+ return null;
36
+ }
37
+ /** BusinessDash-era name for `<BIABAnalytics />` — same component; the
38
+ * original export stays for every existing consumer. */
39
+ export const BusinessDashAnalytics = BIABAnalytics;
40
+ /**
41
+ * Fire a custom event (e.g. "newsletter_signup_clicked") from
42
+ * anywhere in the consumer site. The first call boots a tracker
43
+ * if one isn't already running on this page; subsequent calls
44
+ * piggyback on the existing one.
45
+ */
46
+ export function trackBiabEvent(input) {
47
+ if (typeof window === "undefined")
48
+ return;
49
+ const tracker = initBiabAnalytics({
50
+ siteId: input.siteId,
51
+ baseUrl: input.baseUrl,
52
+ apiKey: input.apiKey,
53
+ });
54
+ tracker.track(input.customEventName, input.path ? { path: input.path } : undefined);
55
+ tracker.stop();
56
+ }
57
+ // Re-export the core for non-React consumers convenience.
58
+ export { initBiabAnalytics } from "./analytics-core.js";
59
+ //# sourceMappingURL=react-analytics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-analytics.js","sourceRoot":"","sources":["../src/react-analytics.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAEN,iBAAiB,GACjB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,aAAa,CAAC,KAA+B;IAC5D,+EAA+E;IAC/E,qFAAqF;IACrF,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IACtD,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,OAAO,GAAG,iBAAiB,CAAC;YACjC,MAAM;YACN,OAAO;YACP,MAAM;YACN,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACnD,CAAC,CAAC;QACH,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IAC7B,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAC1C,OAAO,IAAI,CAAC;AACb,CAAC;AAED;yDACyD;AACzD,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAM9B;IACA,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO;IAC1C,MAAM,OAAO,GAAG,iBAAiB,CAAC;QACjC,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,MAAM,EAAE,KAAK,CAAC,MAAM;KACpB,CAAC,CAAC;IACH,OAAO,CAAC,KAAK,CACZ,KAAK,CAAC,eAAe,EACrB,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAC7C,CAAC;IACF,OAAO,CAAC,IAAI,EAAE,CAAC;AAChB,CAAC;AAGD,0DAA0D;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,99 @@
1
+ /**
2
+ * The "Powered by BusinessDash" attribution badge.
3
+ *
4
+ * Two exports:
5
+ * - {@link BusinessDashFooterBanner} — the presentational badge. Pure, server-
6
+ * renderable, no data fetching. Drop it in and pass `siteId`.
7
+ * - {@link BusinessDashFooter} — an async Server Component that reads the site's
8
+ * attribution policy first, so it renders the badge when required and lets a
9
+ * paid plan hide it. Prefer this in a Next.js Server Component.
10
+ *
11
+ * ── Why server-render it ──
12
+ *
13
+ * BusinessDash verifies the badge by fetching your live domain and looking for
14
+ * the backlink below. If the badge is server-rendered it's in the raw HTML the
15
+ * check sees; if it's client-only, the check would need a headless browser to
16
+ * find it. So rendering it server-side isn't about stopping tampering (you own
17
+ * your code) — it's about the badge being *visible to the verification*.
18
+ *
19
+ * The `?ref=<siteId>` on the link is that marker. Keep it.
20
+ */
21
+ type Variation = "block" | "inline" | "none";
22
+ export interface BusinessDashFooterBannerProps {
23
+ /**
24
+ * Your BusinessDash site id. Used to build the verifiable backlink
25
+ * (`biab.app/?ref=<siteId>`). Omitting it renders a plain link with no marker
26
+ * — fine visually, but a verification crawl won't credit it.
27
+ */
28
+ siteId?: string;
29
+ /** Company/brand name shown after the © symbol. */
30
+ companyName?: string;
31
+ /** Year shown after the © symbol. Defaults to the current year. */
32
+ year?: number;
33
+ /** Layout variation. Defaults to "block". */
34
+ variation?: Variation;
35
+ /**
36
+ * Override the link target. Defaults to `https://biab.app/?ref=<siteId>` (or
37
+ * `https://biab.app` without a siteId). Only override if you know you want to
38
+ * — a non-biab.app href won't verify.
39
+ */
40
+ href?: string;
41
+ /**
42
+ * Render nothing. Handy for a plan that's allowed to remove the badge — but
43
+ * note removal is only *permitted*, not enforced, by this prop. See
44
+ * {@link BusinessDashFooter}, which sets it from the live policy.
45
+ */
46
+ hidden?: boolean;
47
+ /** Extra classes applied to the outer wrapper. */
48
+ className?: string;
49
+ }
50
+ /**
51
+ * The default link: the verifiable backlink when we have a siteId. Exported for
52
+ * tests — the `?ref` marker is what a verification crawl matches on, so it's the
53
+ * one bit worth pinning.
54
+ */
55
+ export declare function resolveHref(siteId?: string, href?: string): string;
56
+ export declare function BusinessDashFooterBanner({ siteId, companyName, year, variation, href, hidden, className, }: BusinessDashFooterBannerProps): import("react").JSX.Element | null;
57
+ export default BusinessDashFooterBanner;
58
+ /** The slice of the site client this component needs — kept structural so it
59
+ * doesn't drag the whole client type in. */
60
+ export interface AttributionPolicyReader {
61
+ attribution: {
62
+ policy: () => Promise<{
63
+ siteId: string;
64
+ required: boolean;
65
+ }>;
66
+ };
67
+ }
68
+ export interface BusinessDashFooterProps extends Omit<BusinessDashFooterBannerProps, "siteId" | "hidden"> {
69
+ /** A configured site client, e.g. `biab.site(siteId)`. */
70
+ client: AttributionPolicyReader;
71
+ /**
72
+ * Ask to hide the badge. Honored ONLY when the plan permits removal
73
+ * (`policy.required === false`); on a plan that requires the badge this is
74
+ * ignored and the badge shows. Defaults to `false` (always show).
75
+ */
76
+ optOut?: boolean;
77
+ }
78
+ /**
79
+ * Policy-aware badge for a Next.js Server Component.
80
+ *
81
+ * Reads the live attribution policy, then renders {@link BusinessDashFooterBanner}
82
+ * with the right `siteId` (for the marker) and an auto-resolved `hidden`: a paid
83
+ * plan that passed `optOut` gets a blank; a plan that requires the badge always
84
+ * shows it, `optOut` or not.
85
+ *
86
+ * ```tsx
87
+ * // app/layout.tsx (Server Component)
88
+ * export default async function Layout({ children }) {
89
+ * return (
90
+ * <>
91
+ * {children}
92
+ * <BusinessDashFooter client={biab.site(SITE_ID)} companyName="Acme Co" />
93
+ * </>
94
+ * )
95
+ * }
96
+ * ```
97
+ */
98
+ export declare function BusinessDashFooter({ client, optOut, ...bannerProps }: BusinessDashFooterProps): Promise<import("react").JSX.Element>;
99
+ //# sourceMappingURL=react-attribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-attribution.d.ts","sourceRoot":"","sources":["../src/react-attribution.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,KAAK,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,6BAA6B;IAC7C;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAKlE;AAED,wBAAgB,wBAAwB,CAAC,EACxC,MAAM,EACN,WAA4B,EAC5B,IAA+B,EAC/B,SAAmB,EACnB,IAAI,EACJ,MAAc,EACd,SAAc,GACd,EAAE,6BAA6B,sCA2D/B;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