@velastack/patterns 0.13.0 → 0.13.2

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 (228) hide show
  1. package/dist/chunks/{_layout-DQhSAhfF.js → _layout-xBzFhszN.js} +36 -20
  2. package/dist/chunks/_layout-xBzFhszN.js.map +1 -0
  3. package/dist/chunks/{_page-C7kGoW7_.js → _page-44USwLXO.js} +2 -3
  4. package/dist/chunks/{_page-C7kGoW7_.js.map → _page-44USwLXO.js.map} +1 -1
  5. package/dist/chunks/{_page-DoPdZgZv.js → _page-Bt37d4uo.js} +2 -3
  6. package/dist/chunks/_page-Bt37d4uo.js.map +1 -0
  7. package/dist/chunks/{_page-B6yd6_Vl.js → _page-DcbEFpyw.js} +2 -3
  8. package/dist/chunks/_page-DcbEFpyw.js.map +1 -0
  9. package/dist/chunks/{auth-pages-jsyDV1GR.js → auth-pages-BW3_yluN.js} +6 -9
  10. package/dist/chunks/{auth-pages-jsyDV1GR.js.map → auth-pages-BW3_yluN.js.map} +1 -1
  11. package/dist/chunks/{collections-DZOuRpvS.js → collections-CFW9ZqUE.js} +5 -7
  12. package/dist/chunks/{collections-DZOuRpvS.js.map → collections-CFW9ZqUE.js.map} +1 -1
  13. package/dist/chunks/{collections-zEoRuILr.js → collections-D-xbHi4M.js} +39 -45
  14. package/dist/chunks/{collections-zEoRuILr.js.map → collections-D-xbHi4M.js.map} +1 -1
  15. package/dist/chunks/{compose-handle-BBlamPfx.js → compose-handle-Da7m6lV_.js} +3 -4
  16. package/dist/chunks/{compose-handle-BBlamPfx.js.map → compose-handle-Da7m6lV_.js.map} +1 -1
  17. package/dist/chunks/{config-target-BgyFkbFL.js → config-target-DJbVHwHl.js} +3 -4
  18. package/dist/chunks/{config-target-BgyFkbFL.js.map → config-target-DJbVHwHl.js.map} +1 -1
  19. package/dist/chunks/{constants-CUv536Rj.js → constants-DpK-r_m5.js} +2 -4
  20. package/dist/chunks/{constants-CUv536Rj.js.map → constants-DpK-r_m5.js.map} +1 -1
  21. package/dist/chunks/{currency.server-DygAf6a1.js → currency.server-BwuXG0a9.js} +9 -11
  22. package/dist/chunks/{currency.server-DygAf6a1.js.map → currency.server-BwuXG0a9.js.map} +1 -1
  23. package/dist/chunks/{dedent-Gq6Krl4n.js → dedent-CCUOcPFW.js} +2 -3
  24. package/dist/chunks/{dedent-Gq6Krl4n.js.map → dedent-CCUOcPFW.js.map} +1 -1
  25. package/dist/chunks/{dispatch-BIvOwbKN.js → dispatch-BxlKS_5v.js} +2 -3
  26. package/dist/chunks/{dispatch-BIvOwbKN.js.map → dispatch-BxlKS_5v.js.map} +1 -1
  27. package/dist/chunks/{env-BugddEjd.js → env-AxyRWcC_.js} +2 -3
  28. package/dist/chunks/{env-BugddEjd.js.map → env-AxyRWcC_.js.map} +1 -1
  29. package/dist/chunks/{env-vars-mnRA0hOe.js → env-vars-CUh4mLM_.js} +2 -3
  30. package/dist/chunks/{env-vars-mnRA0hOe.js.map → env-vars-CUh4mLM_.js.map} +1 -1
  31. package/dist/chunks/{env-vars-XvAeH6u5.js → env-vars-CVn2076k.js} +58 -59
  32. package/dist/chunks/{env-vars-XvAeH6u5.js.map → env-vars-CVn2076k.js.map} +1 -1
  33. package/dist/chunks/{env-vars-Cr4lbMD_.js → env-vars-T3_7JNSg.js} +3 -4
  34. package/dist/chunks/{env-vars-Cr4lbMD_.js.map → env-vars-T3_7JNSg.js.map} +1 -1
  35. package/dist/chunks/{env-vars-file-B_6esJW3.js → env-vars-file-B2zHQZqO.js} +2 -3
  36. package/dist/chunks/{env-vars-file-B_6esJW3.js.map → env-vars-file-B2zHQZqO.js.map} +1 -1
  37. package/dist/chunks/{env.preview-uMRKT5Pc.js → env.preview-C676UTOP.js} +2 -3
  38. package/dist/chunks/{env.preview-uMRKT5Pc.js.map → env.preview-C676UTOP.js.map} +1 -1
  39. package/dist/chunks/{errors-DR3gF_7a.js → errors-DdSUZI8f.js} +2 -3
  40. package/dist/chunks/{errors-DR3gF_7a.js.map → errors-DdSUZI8f.js.map} +1 -1
  41. package/dist/chunks/{format-result-BVoLVknk.js → format-result-CojavkIZ.js} +2 -3
  42. package/dist/chunks/{format-result-BVoLVknk.js.map → format-result-CojavkIZ.js.map} +1 -1
  43. package/dist/chunks/{generate-Cbg-Z3sA.js → generate-BCYvhyF9.js} +62 -63
  44. package/dist/chunks/{generate-Cbg-Z3sA.js.map → generate-BCYvhyF9.js.map} +1 -1
  45. package/dist/chunks/{generate-DyV5R8NP.js → generate-CKuUg3p-.js} +3 -4
  46. package/dist/chunks/{generate-DyV5R8NP.js.map → generate-CKuUg3p-.js.map} +1 -1
  47. package/dist/chunks/{generate-DjuhSibA.js → generate-CY_Ii_bz.js} +61 -64
  48. package/dist/chunks/{generate-DjuhSibA.js.map → generate-CY_Ii_bz.js.map} +1 -1
  49. package/dist/chunks/generate-CuOm66dn.js +57 -0
  50. package/dist/chunks/{generate-BtWZCvuO.js.map → generate-CuOm66dn.js.map} +1 -1
  51. package/dist/chunks/{generate-BrOPb9tW.js → generate-DYq5Oj58.js} +3 -4
  52. package/dist/chunks/{generate-BrOPb9tW.js.map → generate-DYq5Oj58.js.map} +1 -1
  53. package/dist/chunks/{generate-Crdzw45a.js → generate-F4FDWvFo.js} +13 -14
  54. package/dist/chunks/{generate-Crdzw45a.js.map → generate-F4FDWvFo.js.map} +1 -1
  55. package/dist/chunks/{generate-DgZhFNjO.js → generate-oZ1QeqPr.js} +17 -19
  56. package/dist/chunks/{generate-DgZhFNjO.js.map → generate-oZ1QeqPr.js.map} +1 -1
  57. package/dist/chunks/{generate.runtime-ByC9kOl2.js → generate.runtime-22jW8aVT.js} +37 -41
  58. package/dist/chunks/{generate.runtime-ByC9kOl2.js.map → generate.runtime-22jW8aVT.js.map} +1 -1
  59. package/dist/chunks/{generate.runtime-BfQlxsWK.js → generate.runtime-B06rPt_j.js} +103 -108
  60. package/dist/chunks/{generate.runtime-BfQlxsWK.js.map → generate.runtime-B06rPt_j.js.map} +1 -1
  61. package/dist/chunks/{generate.runtime-s9ai7PxV.js → generate.runtime-B6FeCL5I.js} +85 -90
  62. package/dist/chunks/{generate.runtime-s9ai7PxV.js.map → generate.runtime-B6FeCL5I.js.map} +1 -1
  63. package/dist/chunks/{generate.runtime-DzCVGruq.js → generate.runtime-BgGeOqYG.js} +19 -21
  64. package/dist/chunks/{generate.runtime-DzCVGruq.js.map → generate.runtime-BgGeOqYG.js.map} +1 -1
  65. package/dist/chunks/{generate.runtime-USnFqTbU.js → generate.runtime-Bv_16lWi.js} +94 -99
  66. package/dist/chunks/{generate.runtime-USnFqTbU.js.map → generate.runtime-Bv_16lWi.js.map} +1 -1
  67. package/dist/chunks/generate.runtime-Bz9z0VPR.js +108 -0
  68. package/dist/chunks/{generate.runtime-DVUj1LJK.js.map → generate.runtime-Bz9z0VPR.js.map} +1 -1
  69. package/dist/chunks/{generate.runtime-CHaE6Mm9.js → generate.runtime-C37djibw.js} +25 -27
  70. package/dist/chunks/{generate.runtime-CHaE6Mm9.js.map → generate.runtime-C37djibw.js.map} +1 -1
  71. package/dist/chunks/{generate.runtime-BsjcGBme.js → generate.runtime-CM3bj0nP.js} +12 -14
  72. package/dist/chunks/{generate.runtime-BsjcGBme.js.map → generate.runtime-CM3bj0nP.js.map} +1 -1
  73. package/dist/chunks/generate.runtime-CMuxVUIY.js +46 -0
  74. package/dist/chunks/{generate.runtime-BfM3dX_R.js.map → generate.runtime-CMuxVUIY.js.map} +1 -1
  75. package/dist/chunks/{generate.runtime-DRZDjZqw.js → generate.runtime-CVqPHddZ.js} +44 -46
  76. package/dist/chunks/generate.runtime-CVqPHddZ.js.map +1 -0
  77. package/dist/chunks/{generate.runtime-CEd3qCtW.js → generate.runtime-C_SdcnRs.js} +44 -47
  78. package/dist/chunks/generate.runtime-C_SdcnRs.js.map +1 -0
  79. package/dist/chunks/generate.runtime-Cco2mFW2.js +63 -0
  80. package/dist/chunks/{generate.runtime-taYl9Tg5.js.map → generate.runtime-Cco2mFW2.js.map} +1 -1
  81. package/dist/chunks/generate.runtime-Cg-dfN9B.js +48 -0
  82. package/dist/chunks/{generate.runtime-TKR-qAJM.js.map → generate.runtime-Cg-dfN9B.js.map} +1 -1
  83. package/dist/chunks/{generate.runtime-DqYYJXAz.js → generate.runtime-CjqX4tDg.js} +5 -6
  84. package/dist/chunks/{generate.runtime-DqYYJXAz.js.map → generate.runtime-CjqX4tDg.js.map} +1 -1
  85. package/dist/chunks/generate.runtime-Cry-DBNl.js +111 -0
  86. package/dist/chunks/{generate.runtime-2GD2E1NK.js.map → generate.runtime-Cry-DBNl.js.map} +1 -1
  87. package/dist/chunks/{generate.runtime-DGmpjkRe.js → generate.runtime-Ct7cG8va.js} +76 -79
  88. package/dist/chunks/generate.runtime-Ct7cG8va.js.map +1 -0
  89. package/dist/chunks/generate.runtime-Cxg1b_BK.js +63 -0
  90. package/dist/chunks/{generate.runtime-CXGiQWDK.js.map → generate.runtime-Cxg1b_BK.js.map} +1 -1
  91. package/dist/chunks/{generate.runtime-4TxcYKld.js → generate.runtime-CyWuhV6m.js} +16 -18
  92. package/dist/chunks/{generate.runtime-4TxcYKld.js.map → generate.runtime-CyWuhV6m.js.map} +1 -1
  93. package/dist/chunks/generate.runtime-CzYArKUA.js +42 -0
  94. package/dist/chunks/{generate.runtime-g6qaIY3k.js.map → generate.runtime-CzYArKUA.js.map} +1 -1
  95. package/dist/chunks/{generate.runtime-C_5Ghjri.js → generate.runtime-D769VJFt.js} +3 -4
  96. package/dist/chunks/{generate.runtime-C_5Ghjri.js.map → generate.runtime-D769VJFt.js.map} +1 -1
  97. package/dist/chunks/{generate.runtime-C9yduilW.js → generate.runtime-DICcLOts.js} +19 -22
  98. package/dist/chunks/{generate.runtime-C9yduilW.js.map → generate.runtime-DICcLOts.js.map} +1 -1
  99. package/dist/chunks/generate.runtime-DLg2CKxQ.js +341 -0
  100. package/dist/chunks/generate.runtime-DLg2CKxQ.js.map +1 -0
  101. package/dist/chunks/{generate.runtime-C2pIioyZ.js → generate.runtime-DaPA2NNL.js} +47 -50
  102. package/dist/chunks/{generate.runtime-C2pIioyZ.js.map → generate.runtime-DaPA2NNL.js.map} +1 -1
  103. package/dist/chunks/{generate.runtime-B2DI0x05.js → generate.runtime-DfHFd8xs.js} +36 -44
  104. package/dist/chunks/{generate.runtime-B2DI0x05.js.map → generate.runtime-DfHFd8xs.js.map} +1 -1
  105. package/dist/chunks/generate.runtime-Dfl-07VS.js +428 -0
  106. package/dist/chunks/generate.runtime-Dfl-07VS.js.map +1 -0
  107. package/dist/chunks/{generate.runtime-BO1KyRcJ.js → generate.runtime-DhNspd-h.js} +64 -76
  108. package/dist/chunks/generate.runtime-DhNspd-h.js.map +1 -0
  109. package/dist/chunks/{generate.runtime-BPVZsAL0.js → generate.runtime-DkS7CBmK.js} +8 -10
  110. package/dist/chunks/{generate.runtime-BPVZsAL0.js.map → generate.runtime-DkS7CBmK.js.map} +1 -1
  111. package/dist/chunks/generate.runtime-Dtae524O.js +34 -0
  112. package/dist/chunks/{generate.runtime-Du8puIJQ.js.map → generate.runtime-Dtae524O.js.map} +1 -1
  113. package/dist/chunks/{generate.runtime-CvtSK0E1.js → generate.runtime-EB8vpc7D.js} +57 -66
  114. package/dist/chunks/{generate.runtime-CvtSK0E1.js.map → generate.runtime-EB8vpc7D.js.map} +1 -1
  115. package/dist/chunks/{generate.runtime-UrLaWKvN.js → generate.runtime-TCVlsBbJ.js} +7 -8
  116. package/dist/chunks/{generate.runtime-UrLaWKvN.js.map → generate.runtime-TCVlsBbJ.js.map} +1 -1
  117. package/dist/chunks/{generate.runtime-B8y_l-6N.js → generate.runtime-YFyuyFhh.js} +108 -132
  118. package/dist/chunks/generate.runtime-YFyuyFhh.js.map +1 -0
  119. package/dist/chunks/{generate.runtime-bWGwyz2U.js → generate.runtime-cYh0CQ5d.js} +36 -41
  120. package/dist/chunks/{generate.runtime-bWGwyz2U.js.map → generate.runtime-cYh0CQ5d.js.map} +1 -1
  121. package/dist/chunks/generate.runtime-erWI6j7m.js +64 -0
  122. package/dist/chunks/{generate.runtime-B-WOQsda.js.map → generate.runtime-erWI6j7m.js.map} +1 -1
  123. package/dist/chunks/{generate.runtime-DI73x08q.js → generate.runtime-hq8xt0m_.js} +21 -23
  124. package/dist/chunks/generate.runtime-hq8xt0m_.js.map +1 -0
  125. package/dist/chunks/{generate.runtime-C4hyve9h.js → generate.runtime-i3tMIA1A.js} +85 -108
  126. package/dist/chunks/{generate.runtime-C4hyve9h.js.map → generate.runtime-i3tMIA1A.js.map} +1 -1
  127. package/dist/chunks/generate.runtime-j_5K3Uue.js +120 -0
  128. package/dist/chunks/generate.runtime-j_5K3Uue.js.map +1 -0
  129. package/dist/chunks/{generate.runtime-BEvi6bml.js → generate.runtime-mE0knt2T.js} +34 -38
  130. package/dist/chunks/{generate.runtime-BEvi6bml.js.map → generate.runtime-mE0knt2T.js.map} +1 -1
  131. package/dist/chunks/{layout.svelte-Cb12mxua.js → layout.svelte-B6wOQ7SM.js} +10 -11
  132. package/dist/chunks/{layout.svelte-Cb12mxua.js.map → layout.svelte-B6wOQ7SM.js.map} +1 -1
  133. package/dist/chunks/{lib-specifier-Cngo1zF_.js → lib-specifier-C3M0WTev.js} +2 -3
  134. package/dist/chunks/{lib-specifier-Cngo1zF_.js.map → lib-specifier-C3M0WTev.js.map} +1 -1
  135. package/dist/chunks/{load-function-Dmkhg1pQ.js → load-function-BFvIVsh7.js} +3 -4
  136. package/dist/chunks/{load-function-Dmkhg1pQ.js.map → load-function-BFvIVsh7.js.map} +1 -1
  137. package/dist/chunks/{logger-CQONztPm.js → logger-t1HxmpG2.js} +2 -3
  138. package/dist/chunks/{logger-CQONztPm.js.map → logger-t1HxmpG2.js.map} +1 -1
  139. package/dist/chunks/{modify-file-D9U2LXEa.js → modify-file-CRZ_gMg0.js} +7 -10
  140. package/dist/chunks/{modify-file-D9U2LXEa.js.map → modify-file-CRZ_gMg0.js.map} +1 -1
  141. package/dist/chunks/{modify-nav-user-CJ1LevSU.js → modify-nav-user--7OwY9fI.js} +7 -16
  142. package/dist/chunks/{modify-nav-user-CJ1LevSU.js.map → modify-nav-user--7OwY9fI.js.map} +1 -1
  143. package/dist/chunks/{modify-nav-user-iUpv2lm-.js → modify-nav-user-D42kWyU6.js} +8 -14
  144. package/dist/chunks/{modify-nav-user-iUpv2lm-.js.map → modify-nav-user-D42kWyU6.js.map} +1 -1
  145. package/dist/chunks/modify-svelte-config-remote-wE5K2bU_.js +20 -0
  146. package/dist/chunks/{modify-svelte-config-remote-CEyYydL7.js.map → modify-svelte-config-remote-wE5K2bU_.js.map} +1 -1
  147. package/dist/chunks/{modify-user-signup-DLtopazD.js → modify-user-signup-ENhadGKH.js} +5 -6
  148. package/dist/chunks/{modify-user-signup-DLtopazD.js.map → modify-user-signup-ENhadGKH.js.map} +1 -1
  149. package/dist/chunks/{modify-utils-Cw-on_cL.js → modify-utils--zro3IGe.js} +3 -4
  150. package/dist/chunks/{modify-utils-Cw-on_cL.js.map → modify-utils--zro3IGe.js.map} +1 -1
  151. package/dist/chunks/{package-imports-B9Asv3ZH.js → package-imports-CcIIHbp5.js} +3 -4
  152. package/dist/chunks/{package-imports-B9Asv3ZH.js.map → package-imports-CcIIHbp5.js.map} +1 -1
  153. package/dist/chunks/{pocketbase-C5GS-Dh5.js → pocketbase-CvsJYXj-.js} +2 -3
  154. package/dist/chunks/{pocketbase-C5GS-Dh5.js.map → pocketbase-CvsJYXj-.js.map} +1 -1
  155. package/dist/chunks/{pocketbase-DpudAAmd.js → pocketbase-YG9yht8R.js} +2 -3
  156. package/dist/chunks/{pocketbase-DpudAAmd.js.map → pocketbase-YG9yht8R.js.map} +1 -1
  157. package/dist/chunks/{pocketbase-BTR3gI8o.js → pocketbase-gUn2UrDd.js} +6 -14
  158. package/dist/chunks/{pocketbase-BTR3gI8o.js.map → pocketbase-gUn2UrDd.js.map} +1 -1
  159. package/dist/chunks/{providers-CpRRQdMg.js → providers-BB3Z2TrN.js} +4 -5
  160. package/dist/chunks/{providers-CpRRQdMg.js.map → providers-BB3Z2TrN.js.map} +1 -1
  161. package/dist/chunks/{providers-CL9kQ4hp.js → providers-tjlFH5di.js} +4 -5
  162. package/dist/chunks/{providers-CL9kQ4hp.js.map → providers-tjlFH5di.js.map} +1 -1
  163. package/dist/chunks/{rolldown-runtime-5HNE8Q1r.js → rolldown-runtime-CwxnZyOB.js} +1 -2
  164. package/dist/chunks/{root-layout.svelte-CUVbnlX-.js → root-layout.svelte-DE0c_y-T.js} +12 -16
  165. package/dist/chunks/{root-layout.svelte-CUVbnlX-.js.map → root-layout.svelte-DE0c_y-T.js.map} +1 -1
  166. package/dist/chunks/{shared-CAjLx_8Z.js → shared-DE-J_b1j.js} +4 -5
  167. package/dist/chunks/{shared-CAjLx_8Z.js.map → shared-DE-J_b1j.js.map} +1 -1
  168. package/dist/chunks/{site-D0IuWkAR.js → site-B9hDxucR.js} +11 -12
  169. package/dist/chunks/{site-D0IuWkAR.js.map → site-B9hDxucR.js.map} +1 -1
  170. package/dist/chunks/{stripe-customer-B3tP8gtD.js → stripe-customer-5S-nOXP1.js} +2 -3
  171. package/dist/chunks/stripe-customer-5S-nOXP1.js.map +1 -0
  172. package/dist/chunks/{svelte-file-Dv5-bl79.js → svelte-file-DfplF3BU.js} +2 -3
  173. package/dist/chunks/{svelte-file-Dv5-bl79.js.map → svelte-file-DfplF3BU.js.map} +1 -1
  174. package/dist/chunks/{table-core-BKBoEStB.js → table-core-BXmnfjln.js} +26 -33
  175. package/dist/chunks/{table-core-BKBoEStB.js.map → table-core-BXmnfjln.js.map} +1 -1
  176. package/dist/chunks/{taggedTemplateLiteral-KSUnuvOk.js → taggedTemplateLiteral-CLenToGE.js} +1 -2
  177. package/dist/chunks/test-setup-cZj1tqaf.js +176 -0
  178. package/dist/chunks/test-setup-cZj1tqaf.js.map +1 -0
  179. package/dist/chunks/{ts-morph-helpers-CHI9wAil.js → ts-morph-helpers-B4KZXP44.js} +2 -3
  180. package/dist/chunks/{ts-morph-helpers-CHI9wAil.js.map → ts-morph-helpers-B4KZXP44.js.map} +1 -1
  181. package/dist/chunks/{ui-DD4NltyN.js → ui-D5xgIDR_.js} +3 -4
  182. package/dist/chunks/{ui-DD4NltyN.js.map → ui-D5xgIDR_.js.map} +1 -1
  183. package/dist/chunks/{ui-B3Db8cQg.js → ui-IkdkLwmB.js} +53 -55
  184. package/dist/chunks/{ui-B3Db8cQg.js.map → ui-IkdkLwmB.js.map} +1 -1
  185. package/dist/chunks/{unmodify-load-Buak-r1f.js → unmodify-load-CdWXJ_Ac.js} +3 -4
  186. package/dist/chunks/{unmodify-load-Buak-r1f.js.map → unmodify-load-CdWXJ_Ac.js.map} +1 -1
  187. package/dist/chunks/{util-BLYliuUK.js → util-ILWdjRAd.js} +2 -3
  188. package/dist/chunks/{util-BLYliuUK.js.map → util-ILWdjRAd.js.map} +1 -1
  189. package/dist/chunks/{whatsapp-Pya8Zi07.js → whatsapp-Bt4o4_q2.js} +3 -4
  190. package/dist/chunks/{whatsapp-Pya8Zi07.js.map → whatsapp-Bt4o4_q2.js.map} +1 -1
  191. package/dist/chunks/write-result-C1GYInL8.js +499 -0
  192. package/dist/chunks/write-result-C1GYInL8.js.map +1 -0
  193. package/dist/chunks/{wuchale-config-c3Q4JVSF.js → wuchale-config-CNXoq4rc.js} +2 -3
  194. package/dist/chunks/{wuchale-config-c3Q4JVSF.js.map → wuchale-config-CNXoq4rc.js.map} +1 -1
  195. package/dist/index.js +1497 -1581
  196. package/dist/index.js.map +1 -1
  197. package/package.json +1 -1
  198. package/dist/chunks/_layout-DQhSAhfF.js.map +0 -1
  199. package/dist/chunks/_page-B6yd6_Vl.js.map +0 -1
  200. package/dist/chunks/_page-DoPdZgZv.js.map +0 -1
  201. package/dist/chunks/generate-BtWZCvuO.js +0 -58
  202. package/dist/chunks/generate.runtime-2GD2E1NK.js +0 -114
  203. package/dist/chunks/generate.runtime-7sU7RzIA.js +0 -483
  204. package/dist/chunks/generate.runtime-7sU7RzIA.js.map +0 -1
  205. package/dist/chunks/generate.runtime-B-WOQsda.js +0 -67
  206. package/dist/chunks/generate.runtime-B8y_l-6N.js.map +0 -1
  207. package/dist/chunks/generate.runtime-BO1KyRcJ.js.map +0 -1
  208. package/dist/chunks/generate.runtime-BfM3dX_R.js +0 -48
  209. package/dist/chunks/generate.runtime-CEd3qCtW.js.map +0 -1
  210. package/dist/chunks/generate.runtime-CXGiQWDK.js +0 -64
  211. package/dist/chunks/generate.runtime-DGmpjkRe.js.map +0 -1
  212. package/dist/chunks/generate.runtime-DI73x08q.js.map +0 -1
  213. package/dist/chunks/generate.runtime-DIkM5xIB.js +0 -326
  214. package/dist/chunks/generate.runtime-DIkM5xIB.js.map +0 -1
  215. package/dist/chunks/generate.runtime-DRZDjZqw.js.map +0 -1
  216. package/dist/chunks/generate.runtime-DVUj1LJK.js +0 -112
  217. package/dist/chunks/generate.runtime-Deg1Tz9u.js +0 -124
  218. package/dist/chunks/generate.runtime-Deg1Tz9u.js.map +0 -1
  219. package/dist/chunks/generate.runtime-Du8puIJQ.js +0 -35
  220. package/dist/chunks/generate.runtime-TKR-qAJM.js +0 -50
  221. package/dist/chunks/generate.runtime-g6qaIY3k.js +0 -43
  222. package/dist/chunks/generate.runtime-taYl9Tg5.js +0 -65
  223. package/dist/chunks/modify-svelte-config-remote-CEyYydL7.js +0 -42
  224. package/dist/chunks/stripe-customer-B3tP8gtD.js.map +0 -1
  225. package/dist/chunks/test-setup-CbCXmPkE.js +0 -179
  226. package/dist/chunks/test-setup-CbCXmPkE.js.map +0 -1
  227. package/dist/chunks/write-result-BWXq9RRn.js +0 -499
  228. package/dist/chunks/write-result-BWXq9RRn.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"env-vars-file-B_6esJW3.js","names":["ENV_DECL_CANDIDATES","ENV_MODULE","OPTIONAL_SCHEMA","stringLiteral","other","preferred","quote","value","envVarEntry","options","indent","fields","spec","field","indentTail","text","prefix","envVarsFile","seen","entries","specs","body"],"sources":["../../src/runtime/env-vars-file.ts"],"sourcesContent":["/**\n * The text half of `env-vars.ts`: no Node or ts-morph imports, so the\n * package's browser-safe entry can export it.\n */\n\n/** Where SvelteKit 3 looks for the `variables` declarations, in order. */\nexport const ENV_DECL_CANDIDATES = [\"src/env.ts\", \"src/env.js\"];\n\n/** The module `defineEnvVars` is imported from. */\nexport const ENV_MODULE = \"@sveltejs/kit/env\";\n\n/** One variable to declare in `src/env.ts`. */\nexport interface EnvVarSpec {\n /** The variable's name, as `.env` and `$app/env/*` spell it. */\n name: string;\n /** Importable from `$app/env/public` (and so sent to the browser). */\n public?: boolean;\n /** Inlined at build time rather than read when the app starts. */\n static?: boolean;\n /**\n * Default `true`: declared with `schema: (value) => value ?? ''`, so a\n * missing value reads as `''` and the app builds and starts with an empty\n * `.env`. `false` leaves the schema out, which SvelteKit treats as required.\n */\n optional?: boolean;\n /** Shown on hover where the variable is imported. */\n description?: string;\n}\n\n/** What an optional variable is declared with, as `sv` and the templates write it. */\nexport const OPTIONAL_SCHEMA = \"(value) => value ?? ''\";\n\nfunction stringLiteral(preferred: \"'\" | '\"', value: string): string {\n // Prettier's rule: the other quote when it means fewer escapes.\n const other = preferred === \"'\" ? '\"' : \"'\";\n const quote =\n value.split(preferred).length > value.split(other).length\n ? other\n : preferred;\n const escaped = value\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\\r/g, \"\\\\r\")\n .replace(/\\n/g, \"\\\\n\")\n .split(quote)\n .join(`\\\\${quote}`);\n return `${quote}${escaped}${quote}`;\n}\n\n/**\n * One `NAME: { ... }` property, without a trailing comma. Nested lines are\n * indented with `indent`, one level deeper than the property itself.\n */\nexport function envVarEntry(\n spec: EnvVarSpec,\n options: { quote?: \"'\" | '\"'; indent?: string } = {},\n): string {\n const quote = options.quote ?? \"'\";\n const indent = options.indent ?? \"\\t\";\n const fields: string[] = [];\n if (spec.public) fields.push(\"public: true\");\n if (spec.static) fields.push(\"static: true\");\n if (spec.optional !== false) {\n fields.push(`schema: ${OPTIONAL_SCHEMA.replace(/'/g, quote)}`);\n }\n if (spec.description) {\n fields.push(`description: ${stringLiteral(quote, spec.description)}`);\n }\n if (fields.length === 0) return `${spec.name}: {}`;\n return `${spec.name}: {\\n${fields.map((field) => `${indent}${field}`).join(\",\\n\")}\\n}`;\n}\n\n/** Indent every line after the first by `prefix`. */\nfunction indentTail(text: string, prefix: string): string {\n return text.split(\"\\n\").join(`\\n${prefix}`);\n}\n\n/**\n * A new `src/env.ts` declaring `specs`, written the way the CLI's templates\n * write theirs: tabs, single quotes, one documented `defineEnvVars` call.\n */\nexport function envVarsFile(specs: EnvVarSpec[]): string {\n const seen = new Set<string>();\n const entries = specs\n .filter((spec) => !seen.has(spec.name) && !!seen.add(spec.name))\n .map((spec) => `\\t${indentTail(envVarEntry(spec), \"\\t\")}`);\n const body = entries.length > 0 ? `{\\n${entries.join(\",\\n\")}\\n}` : \"{}\";\n return [\n `import { defineEnvVars } from '${ENV_MODULE}';`,\n \"\",\n \"/**\",\n \" * Every environment variable the app reads. SvelteKit exposes only what is\",\n \" * declared here, through `$app/env/private` (and `$app/env/public` for\",\n \" * `public: true`).\",\n \" *\",\n \" * Each schema turns a missing value into `''`, so the app builds and starts\",\n \" * with an empty `.env`, and a default belongs at the call site as `X || fallback`.\",\n \" */\",\n `export const variables = defineEnvVars(${body});`,\n \"\",\n ].join(\"\\n\");\n}\n"],"mappings":";AAMA,IAAaA,IAAsB,CAAC,cAAc,YAAY,GAGjDC,IAAa,qBAqBbC,IAAkB;AAE/B,SAASC,EAAc,GAAsB,GAAuB;CAElE,IAAMC,IAAQC,MAAc,MAAM,OAAM,KAClCC,IACJC,EAAM,MAAMF,CAAS,CAAC,CAAC,SAASE,EAAM,MAAMH,CAAK,CAAC,CAAC,SAC/CA,IACAC;CAON,OAAO,GAAGC,IANMC,EACb,QAAQ,OAAO,MAAM,CAAC,CACtB,QAAQ,OAAO,KAAK,CAAC,CACrB,QAAQ,OAAO,KAAK,CAAC,CACrB,MAAMD,CAAK,CAAC,CACZ,KAAK,KAAKA,GACK,IAAUA;AAC9B;AAMA,SAAgBE,EACd,GACA,IAAkD,CAAC,GAC3C;CACR,IAAMF,IAAQG,EAAQ,SAAS,KACzBC,IAASD,EAAQ,UAAU,KAC3BE,IAAmB,CAAC;CAU1B,OATIC,EAAK,UAAQD,EAAO,KAAK,cAAc,GACvCC,EAAK,UAAQD,EAAO,KAAK,cAAc,GACvCC,EAAK,aAAa,MACpBD,EAAO,KAAK,WAAWT,EAAgB,QAAQ,MAAMI,CAAK,GAAG,GAE3DM,EAAK,eACPD,EAAO,KAAK,gBAAgBR,EAAcG,GAAOM,EAAK,WAAW,GAAG,GAElED,EAAO,WAAW,IAAU,GAAGC,EAAK,KAAK,QACtC,GAAGA,EAAK,KAAK,OAAOD,EAAO,KAAK,MAAU,GAAGD,IAASG,GAAO,CAAC,CAAC,KAAK,KAAK,EAAE;AACpF;AAGA,SAASC,EAAW,GAAc,GAAwB;CACxD,OAAOC,EAAK,MAAM,IAAI,CAAC,CAAC,KAAK,KAAKC,GAAQ;AAC5C;AAMA,SAAgBC,EAAY,GAA6B;CACvD,IAAMC,oBAAO,IAAI,IAAY,GACvBC,IAAUC,EACb,QAAQ,MAAS,CAACF,EAAK,IAAIN,EAAK,IAAI,KAAK,CAAC,CAACM,EAAK,IAAIN,EAAK,IAAI,CAAC,CAAC,CAC/D,KAAK,MAAS,KAAKE,EAAWN,EAAYI,CAAI,GAAG,GAAI,GAAG,GACrDS,IAAOF,EAAQ,SAAS,IAAI,MAAMA,EAAQ,KAAK,KAAK,EAAE,OAAO;CACnE,OAAO;EACL,kCAAkClB,EAAW;EAC7C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,0CAA0CoB,EAAK;EAC/C;CACF,CAAC,CAAC,KAAK,IAAI;AACb"}
1
+ {"version":3,"file":"env-vars-file-B2zHQZqO.js","names":["ENV_DECL_CANDIDATES","ENV_MODULE","OPTIONAL_SCHEMA","stringLiteral","other","preferred","quote","value","envVarEntry","options","indent","fields","spec","field","indentTail","text","prefix","envVarsFile","seen","entries","specs","body"],"sources":["../../src/runtime/env-vars-file.ts"],"sourcesContent":["/**\n * The text half of `env-vars.ts`: no Node or ts-morph imports, so the\n * package's browser-safe entry can export it.\n */\n\n/** Where SvelteKit 3 looks for the `variables` declarations, in order. */\nexport const ENV_DECL_CANDIDATES = [\"src/env.ts\", \"src/env.js\"];\n\n/** The module `defineEnvVars` is imported from. */\nexport const ENV_MODULE = \"@sveltejs/kit/env\";\n\n/** One variable to declare in `src/env.ts`. */\nexport interface EnvVarSpec {\n /** The variable's name, as `.env` and `$app/env/*` spell it. */\n name: string;\n /** Importable from `$app/env/public` (and so sent to the browser). */\n public?: boolean;\n /** Inlined at build time rather than read when the app starts. */\n static?: boolean;\n /**\n * Default `true`: declared with `schema: (value) => value ?? ''`, so a\n * missing value reads as `''` and the app builds and starts with an empty\n * `.env`. `false` leaves the schema out, which SvelteKit treats as required.\n */\n optional?: boolean;\n /** Shown on hover where the variable is imported. */\n description?: string;\n}\n\n/** What an optional variable is declared with, as `sv` and the templates write it. */\nexport const OPTIONAL_SCHEMA = \"(value) => value ?? ''\";\n\nfunction stringLiteral(preferred: \"'\" | '\"', value: string): string {\n // Prettier's rule: the other quote when it means fewer escapes.\n const other = preferred === \"'\" ? '\"' : \"'\";\n const quote =\n value.split(preferred).length > value.split(other).length\n ? other\n : preferred;\n const escaped = value\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\\r/g, \"\\\\r\")\n .replace(/\\n/g, \"\\\\n\")\n .split(quote)\n .join(`\\\\${quote}`);\n return `${quote}${escaped}${quote}`;\n}\n\n/**\n * One `NAME: { ... }` property, without a trailing comma. Nested lines are\n * indented with `indent`, one level deeper than the property itself.\n */\nexport function envVarEntry(\n spec: EnvVarSpec,\n options: { quote?: \"'\" | '\"'; indent?: string } = {},\n): string {\n const quote = options.quote ?? \"'\";\n const indent = options.indent ?? \"\\t\";\n const fields: string[] = [];\n if (spec.public) fields.push(\"public: true\");\n if (spec.static) fields.push(\"static: true\");\n if (spec.optional !== false) {\n fields.push(`schema: ${OPTIONAL_SCHEMA.replace(/'/g, quote)}`);\n }\n if (spec.description) {\n fields.push(`description: ${stringLiteral(quote, spec.description)}`);\n }\n if (fields.length === 0) return `${spec.name}: {}`;\n return `${spec.name}: {\\n${fields.map((field) => `${indent}${field}`).join(\",\\n\")}\\n}`;\n}\n\n/** Indent every line after the first by `prefix`. */\nfunction indentTail(text: string, prefix: string): string {\n return text.split(\"\\n\").join(`\\n${prefix}`);\n}\n\n/**\n * A new `src/env.ts` declaring `specs`, written the way the CLI's templates\n * write theirs: tabs, single quotes, one documented `defineEnvVars` call.\n */\nexport function envVarsFile(specs: EnvVarSpec[]): string {\n const seen = new Set<string>();\n const entries = specs\n .filter((spec) => !seen.has(spec.name) && !!seen.add(spec.name))\n .map((spec) => `\\t${indentTail(envVarEntry(spec), \"\\t\")}`);\n const body = entries.length > 0 ? `{\\n${entries.join(\",\\n\")}\\n}` : \"{}\";\n return [\n `import { defineEnvVars } from '${ENV_MODULE}';`,\n \"\",\n \"/**\",\n \" * Every environment variable the app reads. SvelteKit exposes only what is\",\n \" * declared here, through `$app/env/private` (and `$app/env/public` for\",\n \" * `public: true`).\",\n \" *\",\n \" * Each schema turns a missing value into `''`, so the app builds and starts\",\n \" * with an empty `.env`, and a default belongs at the call site as `X || fallback`.\",\n \" */\",\n `export const variables = defineEnvVars(${body});`,\n \"\",\n ].join(\"\\n\");\n}\n"],"mappings":";AAMA,IAAaA,IAAsB,CAAC,cAAc,YAAY,GAGjDC,IAAa,qBAqBbC,IAAkB;AAE/B,SAASC,EAAc,GAAsB,GAAuB;CAElE,IAAMC,IAAQC,MAAc,MAAM,OAAM,KAClCC,IACJC,EAAM,MAAMF,CAAS,CAAC,CAAC,SAASE,EAAM,MAAMH,CAAK,CAAC,CAAC,SAC/CA,IACAC;CAON,OAAO,GAAGC,IANMC,EACb,QAAQ,OAAO,MAAM,CAAC,CACtB,QAAQ,OAAO,KAAK,CAAC,CACrB,QAAQ,OAAO,KAAK,CAAC,CACrB,MAAMD,CAAK,CAAC,CACZ,KAAK,KAAKA,GACK,IAAUA;AAC9B;AAMA,SAAgBE,EACd,GACA,IAAkD,CAAC,GAC3C;CACR,IAAMF,IAAQG,EAAQ,SAAS,KACzBC,IAASD,EAAQ,UAAU,KAC3BE,IAAmB,CAAC;CAU1B,OATIC,EAAK,UAAQD,EAAO,KAAK,cAAc,GACvCC,EAAK,UAAQD,EAAO,KAAK,cAAc,GACvCC,EAAK,aAAa,MACpBD,EAAO,KAAK,WAAWT,EAAgB,QAAQ,MAAMI,CAAK,GAAG,GAE3DM,EAAK,eACPD,EAAO,KAAK,gBAAgBR,EAAcG,GAAOM,EAAK,WAAW,GAAG,GAElED,EAAO,WAAW,IAAU,GAAGC,EAAK,KAAK,QACtC,GAAGA,EAAK,KAAK,OAAOD,EAAO,KAAK,MAAU,GAAGD,IAASG,GAAO,CAAC,CAAC,KAAK,KAAK,EAAE;AACpF;AAGA,SAASC,EAAW,GAAc,GAAwB;CACxD,OAAOC,EAAK,MAAM,IAAI,CAAC,CAAC,KAAK,KAAKC,GAAQ;AAC5C;AAMA,SAAgBC,EAAY,GAA6B;CACvD,IAAMC,oBAAO,IAAI,IAAY,GACvBC,IAAUC,EACb,QAAQ,MAAS,CAACF,EAAK,IAAIN,EAAK,IAAI,KAAK,CAAC,CAACM,EAAK,IAAIN,EAAK,IAAI,CAAC,CAAC,CAC/D,KAAK,MAAS,KAAKE,EAAWN,EAAYI,CAAI,GAAG,GAAI,GAAG,GACrDS,IAAOF,EAAQ,SAAS,IAAI,MAAMA,EAAQ,KAAK,KAAK,EAAE,OAAO;CACnE,OAAO;EACL,kCAAkClB,EAAW;EAC7C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,0CAA0CoB,EAAK;EAC/C;CACF,CAAC,CAAC,KAAK,IAAI;AACb"}
@@ -1,4 +1,4 @@
1
- //#region src/parse/env.preview.ts
1
+ // src/parse/env.preview.ts
2
2
  function e(e) {
3
3
  let t = [];
4
4
  return e.features.auth && t.push({
@@ -26,7 +26,6 @@ function e(e) {
26
26
  }]
27
27
  }), t;
28
28
  }
29
- //#endregion
30
29
  export { e as getPreviewCollections };
31
30
 
32
- //# sourceMappingURL=env.preview-uMRKT5Pc.js.map
31
+ //# sourceMappingURL=env.preview-C676UTOP.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"env.preview-uMRKT5Pc.js","names":["getPreviewCollections","collections","options"],"sources":["../../src/parse/env.preview.ts"],"sourcesContent":["import type { Options } from \"../core/types\";\nimport type { Collection } from \"./types\";\n\nexport function getPreviewCollections(\n options: Pick<Options, \"features\">,\n): Collection[] {\n const collections: Collection[] = [];\n if (options.features.auth) {\n collections.push({\n id: \"users_preview\",\n name: \"users\",\n type: \"auth\",\n fields: [\n { name: \"email\", type: \"email\" },\n { name: \"name\", type: \"text\" },\n ],\n });\n }\n if (options.features.teams) {\n collections.push({\n id: \"teams_preview\",\n name: \"teams\",\n type: \"base\",\n fields: [\n { name: \"name\", type: \"text\" },\n { name: \"owner\", type: \"relation\", collectionId: \"users_preview\" },\n ],\n });\n }\n return collections;\n}\n"],"mappings":";AAGA,SAAgBA,EACd,GACc;CACd,IAAMC,IAA4B,CAAC;CAuBnC,OAtBIC,EAAQ,SAAS,QACnBD,EAAY,KAAK;EACf,IAAI;EACJ,MAAM;EACN,MAAM;EACN,QAAQ,CACN;GAAE,MAAM;GAAS,MAAM;EAAQ,GAC/B;GAAE,MAAM;GAAQ,MAAM;EAAO,CAC/B;CACF,CAAC,GAECC,EAAQ,SAAS,SACnBD,EAAY,KAAK;EACf,IAAI;EACJ,MAAM;EACN,MAAM;EACN,QAAQ,CACN;GAAE,MAAM;GAAQ,MAAM;EAAO,GAC7B;GAAE,MAAM;GAAS,MAAM;GAAY,cAAc;EAAgB,CACnE;CACF,CAAC,GAEIA;AACT"}
1
+ {"version":3,"file":"env.preview-C676UTOP.js","names":["getPreviewCollections","collections","options"],"sources":["../../src/parse/env.preview.ts"],"sourcesContent":["import type { Options } from \"../core/types\";\nimport type { Collection } from \"./types\";\n\nexport function getPreviewCollections(\n options: Pick<Options, \"features\">,\n): Collection[] {\n const collections: Collection[] = [];\n if (options.features.auth) {\n collections.push({\n id: \"users_preview\",\n name: \"users\",\n type: \"auth\",\n fields: [\n { name: \"email\", type: \"email\" },\n { name: \"name\", type: \"text\" },\n ],\n });\n }\n if (options.features.teams) {\n collections.push({\n id: \"teams_preview\",\n name: \"teams\",\n type: \"base\",\n fields: [\n { name: \"name\", type: \"text\" },\n { name: \"owner\", type: \"relation\", collectionId: \"users_preview\" },\n ],\n });\n }\n return collections;\n}\n"],"mappings":";AAGA,SAAgBA,EACd,GACc;CACd,IAAMC,IAA4B,CAAC;CAuBnC,OAtBIC,EAAQ,SAAS,QACnBD,EAAY,KAAK;EACf,IAAI;EACJ,MAAM;EACN,MAAM;EACN,QAAQ,CACN;GAAE,MAAM;GAAS,MAAM;EAAQ,GAC/B;GAAE,MAAM;GAAQ,MAAM;EAAO,CAC/B;CACF,CAAC,GAECC,EAAQ,SAAS,SACnBD,EAAY,KAAK;EACf,IAAI;EACJ,MAAM;EACN,MAAM;EACN,QAAQ,CACN;GAAE,MAAM;GAAQ,MAAM;EAAO,GAC7B;GAAE,MAAM;GAAS,MAAM;GAAY,cAAc;EAAgB,CACnE;CACF,CAAC,GAEIA;AACT"}
@@ -1,4 +1,4 @@
1
- //#region src/core/errors.ts
1
+ // src/core/errors.ts
2
2
  var e = class extends Error {
3
3
  constructor(e) {
4
4
  super(e), this.name = "InvalidArgumentError";
@@ -12,7 +12,6 @@ var e = class extends Error {
12
12
  super(`${e} needs shadcn-svelte, and this project has no components.json.\n\nSet it up with \`npx shadcn-svelte@latest init\` (it needs Tailwind CSS: \`npx sv add tailwindcss\`), then run this again.`), this.name = "MissingShadcnError";
13
13
  }
14
14
  };
15
- //#endregion
16
15
  export { n, t as r, e as t };
17
16
 
18
- //# sourceMappingURL=errors-DR3gF_7a.js.map
17
+ //# sourceMappingURL=errors-DdSUZI8f.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors-DR3gF_7a.js","names":["InvalidArgumentError","message","RegistryUnavailableError","url","reason","MissingShadcnError","what"],"sources":["../../src/core/errors.ts"],"sourcesContent":["export class InvalidArgumentError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"InvalidArgumentError\";\n }\n}\n\n/**\n * The shadcn-svelte registry could not be read (offline, a proxy, an outage).\n * Callers that only need the registry for a nicety, such as name checks or a\n * listing, catch this and degrade; callers that cannot proceed without it let\n * it surface as-is.\n */\nexport class RegistryUnavailableError extends Error {\n readonly url: string;\n\n constructor(url: string, reason: string) {\n super(`Could not read the shadcn-svelte registry at ${url}: ${reason}`);\n this.name = \"RegistryUnavailableError\";\n this.url = url;\n }\n}\n\n/**\n * The project has no shadcn-svelte setup (`components.json`), and what was\n * asked for cannot be done without one. Raised before anything is written, so\n * the project is left as it was.\n */\nexport class MissingShadcnError extends Error {\n constructor(what: string) {\n super(\n `${what} needs shadcn-svelte, and this project has no components.json.\\n\\n` +\n \"Set it up with `npx shadcn-svelte@latest init` (it needs Tailwind CSS: `npx sv add tailwindcss`), then run this again.\",\n );\n this.name = \"MissingShadcnError\";\n }\n}\n"],"mappings":";AAAA,IAAaA,IAAb,cAA0C,MAAM;CAC9C,YAAY,GAAiB;EAE3B,AADA,MAAMC,CAAO,GACb,KAAK,OAAO;CACd;AACF,GAQaC,IAAb,cAA8C,MAAM;CAGlD,YAAY,GAAa,GAAgB;EAGvC,AAFA,MAAM,gDAAgDC,EAAI,IAAIC,GAAQ,GACtE,KAAK,OAAO,4BACZ,KAAK,MAAMD;CACb;AACF,GAOaE,IAAb,cAAwC,MAAM;CAC5C,YAAY,GAAc;EAKxB,AAJA,MACE,GAAGC,EAAK,6LAEV,GACA,KAAK,OAAO;CACd;AACF"}
1
+ {"version":3,"file":"errors-DdSUZI8f.js","names":["InvalidArgumentError","message","RegistryUnavailableError","url","reason","MissingShadcnError","what"],"sources":["../../src/core/errors.ts"],"sourcesContent":["export class InvalidArgumentError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"InvalidArgumentError\";\n }\n}\n\n/**\n * The shadcn-svelte registry could not be read (offline, a proxy, an outage).\n * Callers that only need the registry for a nicety, such as name checks or a\n * listing, catch this and degrade; callers that cannot proceed without it let\n * it surface as-is.\n */\nexport class RegistryUnavailableError extends Error {\n readonly url: string;\n\n constructor(url: string, reason: string) {\n super(`Could not read the shadcn-svelte registry at ${url}: ${reason}`);\n this.name = \"RegistryUnavailableError\";\n this.url = url;\n }\n}\n\n/**\n * The project has no shadcn-svelte setup (`components.json`), and what was\n * asked for cannot be done without one. Raised before anything is written, so\n * the project is left as it was.\n */\nexport class MissingShadcnError extends Error {\n constructor(what: string) {\n super(\n `${what} needs shadcn-svelte, and this project has no components.json.\\n\\n` +\n \"Set it up with `npx shadcn-svelte@latest init` (it needs Tailwind CSS: `npx sv add tailwindcss`), then run this again.\",\n );\n this.name = \"MissingShadcnError\";\n }\n}\n"],"mappings":";AAAA,IAAaA,IAAb,cAA0C,MAAM;CAC9C,YAAY,GAAiB;EAE3B,AADA,MAAMC,CAAO,GACb,KAAK,OAAO;CACd;AACF,GAQaC,IAAb,cAA8C,MAAM;CAGlD,YAAY,GAAa,GAAgB;EAGvC,AAFA,MAAM,gDAAgDC,EAAI,IAAIC,GAAQ,GACtE,KAAK,OAAO,4BACZ,KAAK,MAAMD;CACb;AACF,GAOaE,IAAb,cAAwC,MAAM;CAC5C,YAAY,GAAc;EAKxB,AAJA,MACE,GAAGC,EAAK,6LAEV,GACA,KAAK,OAAO;CACd;AACF"}
@@ -2,7 +2,7 @@ import { readFileSync as e } from "node:fs";
2
2
  import t from "node:path";
3
3
  import n from "prettier";
4
4
  import r from "prettier-plugin-svelte";
5
- //#region src/core/format-result.ts
5
+ // src/core/format-result.ts
6
6
  function i(e) {
7
7
  return e.language === "ts" || e.language === "js" || e.language === "svelte" || e.path.endsWith(".json") || e.path.endsWith(".md");
8
8
  }
@@ -66,7 +66,6 @@ async function f(e, t) {
66
66
  modifies: r
67
67
  };
68
68
  }
69
- //#endregion
70
69
  export { l as n, f as t };
71
70
 
72
- //# sourceMappingURL=format-result-BVoLVknk.js.map
71
+ //# sourceMappingURL=format-result-CojavkIZ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"format-result-BVoLVknk.js","names":["path","prettier","sveltePlugin","canFormatFile","file","dependsOnPrettier","pkg","readFileSync","root","usesPrettier","target","projectOptions","context","resolved","plugins","plugin","MAX_FORMAT_PASSES","formatSource","options","filePath","created","content","format","source","formatted","pass","again","formatFile","formatFiles","files","formatResult","creates","modifies","result"],"sources":["../../src/core/format-result.ts"],"sourcesContent":["import { readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport prettier from \"prettier\";\nimport type { File, Options, Result } from \"./types\";\nimport sveltePlugin from \"prettier-plugin-svelte\";\n\n/** What the formatter needs to know about the run: where the project is, and whether it exists at all. */\nexport type FormatContext = Pick<Options, \"env\" | \"root\">;\n\nfunction canFormatFile(file: File): boolean {\n return (\n file.language === \"ts\" ||\n file.language === \"js\" ||\n file.language === \"svelte\" ||\n file.path.endsWith(\".json\") ||\n // A README's code blocks are checked by `prettier --check` like the code.\n file.path.endsWith(\".md\")\n );\n}\n\nfunction dependsOnPrettier(root: string): boolean {\n try {\n const pkg = JSON.parse(\n readFileSync(path.join(root, \"package.json\"), \"utf8\"),\n ) as {\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n };\n return Boolean(pkg.dependencies?.prettier || pkg.devDependencies?.prettier);\n } catch {\n return false;\n }\n}\n\n/**\n * Whether the project formats with prettier: it depends on it, or prettier\n * finds a config file for the target (a monorepo may keep one at its root).\n * A project with neither, like a bare `sv create`, has a style of its own\n * that prettier's defaults would rewrite in every file a pattern edits.\n */\nasync function usesPrettier(root: string, target: string): Promise<boolean> {\n if (dependsOnPrettier(root)) return true;\n return (await prettier.resolveConfigFile(target)) !== null;\n}\n\n/**\n * The target project's own prettier settings (`.prettierrc`, `.editorconfig`,\n * `package.json#prettier`), so pattern output matches what `npm run lint`\n * expects there; `null` when the project does not use prettier. Preview runs\n * have no project and use prettier's defaults.\n *\n * The svelte plugin is always supplied as a module: a project's config names\n * it by string, which would resolve relative to this package instead.\n */\nasync function projectOptions(\n file: Pick<File, \"path\">,\n context?: FormatContext,\n): Promise<prettier.Options | null> {\n if (context?.env !== \"runtime\" || !context.root) return {};\n const target = path.isAbsolute(file.path)\n ? file.path\n : path.join(context.root, file.path);\n if (!(await usesPrettier(context.root, target))) return null;\n const resolved = await prettier.resolveConfig(target, { editorconfig: true });\n if (!resolved) return {};\n const plugins = (resolved.plugins ?? []).filter(\n (plugin) => plugin !== \"prettier-plugin-svelte\",\n );\n return { ...resolved, plugins };\n}\n\nconst MAX_FORMAT_PASSES = 3;\n\n/**\n * Formats one source text the way pattern output is formatted; the content\n * comes back unchanged when prettier cannot parse it, or when the project\n * does not use prettier and the file is not `created`. A file a generator\n * created is formatted either way, with prettier's defaults if need be: it\n * relies on formatting for its indentation and has no style of its own to\n * keep. Also used for component files that arrive on disk from\n * `shadcn-svelte add` or the bundled components, so `npm run lint` in the\n * project stays clean after an install.\n */\nexport async function formatSource(\n content: string,\n filePath: string,\n context?: FormatContext,\n { created = false }: { created?: boolean } = {},\n): Promise<string> {\n try {\n const options =\n (await projectOptions({ path: filePath }, context)) ??\n (created ? {} : null);\n if (!options) return content;\n const format = (source: string) =>\n prettier.format(source, {\n ...options,\n filepath: filePath,\n plugins: [...(options.plugins ?? []), sveltePlugin],\n });\n // Prettier is not always idempotent: a long one-line member chain\n // (`await context.admin.collection(\"x\").create({ ... })`) comes out broken\n // across lines on the first pass and joined on the second, which the\n // project's `prettier --check` would flag. Format until it settles.\n let formatted = await format(content);\n for (let pass = 1; pass < MAX_FORMAT_PASSES; pass++) {\n const again = await format(formatted);\n if (again === formatted) break;\n formatted = again;\n }\n return formatted;\n } catch {\n return content;\n }\n}\n\nasync function formatFile(\n file: File,\n context: FormatContext | undefined,\n created: boolean,\n): Promise<File> {\n if (file.status !== \"success\" || !canFormatFile(file)) {\n return file;\n }\n return {\n ...file,\n content: await formatSource(file.content, file.path, context, { created }),\n };\n}\n\nasync function formatFiles(\n files: File[],\n context: FormatContext | undefined,\n created: boolean,\n): Promise<File[]> {\n return Promise.all(files.map((file) => formatFile(file, context, created)));\n}\n\nexport async function formatResult(\n result: Result,\n context?: FormatContext,\n): Promise<Result> {\n const [creates, modifies] = await Promise.all([\n formatFiles(result.creates, context, true),\n formatFiles(result.modifies, context, false),\n ]);\n\n return {\n ...result,\n creates,\n modifies,\n };\n}\n"],"mappings":";;;;;AASA,SAASG,EAAc,GAAqB;CAC1C,OACEC,EAAK,aAAa,QAClBA,EAAK,aAAa,QAClBA,EAAK,aAAa,YAClBA,EAAK,KAAK,SAAS,OAAO,KAE1BA,EAAK,KAAK,SAAS,KAAK;AAE5B;AAEA,SAASC,EAAkB,GAAuB;CAChD,IAAI;EACF,IAAMC,IAAM,KAAK,MACfC,EAAaP,EAAK,KAAKQ,GAAM,cAAc,GAAG,MAAM,CACtD;EAIA,OAAO,GAAQF,EAAI,cAAc,YAAYA,EAAI,iBAAiB;CACpE,QAAQ;EACN,OAAO;CACT;AACF;AAQA,eAAeG,EAAa,GAAc,GAAkC;CAE1E,OADIJ,EAAkBG,CAAI,IAAU,KAC5B,MAAMP,EAAS,kBAAkBS,CAAM,MAAO;AACxD;AAWA,eAAeC,EACb,GACA,GACkC;CAClC,IAAIC,GAAS,QAAQ,aAAa,CAACA,EAAQ,MAAM,OAAO,CAAC;CACzD,IAAMF,IAASV,EAAK,WAAWI,EAAK,IAAI,IACpCA,EAAK,OACLJ,EAAK,KAAKY,EAAQ,MAAMR,EAAK,IAAI;CACrC,IAAI,CAAE,MAAMK,EAAaG,EAAQ,MAAMF,CAAM,GAAI,OAAO;CACxD,IAAMG,IAAW,MAAMZ,EAAS,cAAcS,GAAQ,EAAE,cAAc,GAAK,CAAC;CAC5E,IAAI,CAACG,GAAU,OAAO,CAAC;CACvB,IAAMC,KAAWD,EAAS,WAAW,CAAC,EAAA,CAAG,QACtC,MAAWE,MAAW,wBACzB;CACA,OAAO;EAAE,GAAGF;EAAU;CAAQ;AAChC;AAEA,IAAMG,IAAoB;AAY1B,eAAsBC,EACpB,GACA,GACA,GACA,EAAE,aAAU,OAAiC,CAAC,GAC7B;CACjB,IAAI;EACF,IAAMC,IACH,MAAMP,EAAe,EAAE,MAAMQ,EAAS,GAAGP,CAAO,MAChDQ,IAAU,CAAC,IAAI;EAClB,IAAI,CAACF,GAAS,OAAOG;EACrB,IAAMC,KAAU,MACdrB,EAAS,OAAOsB,GAAQ;GACtB,GAAGL;GACH,UAAUC;GACV,SAAS,CAAC,GAAID,EAAQ,WAAW,CAAC,GAAIhB,CAAY;EACpD,CAAC,GAKCsB,IAAY,MAAMF,EAAOD,CAAO;EACpC,KAAK,IAAII,IAAO,GAAGA,IAAOT,GAAmB,KAAQ;GACnD,IAAMU,IAAQ,MAAMJ,EAAOE,CAAS;GACpC,IAAIE,MAAUF,GAAW;GACzB,IAAYE;EACd;EACA,OAAOF;CACT,QAAQ;EACN,OAAOH;CACT;AACF;AAEA,eAAeM,EACb,GACA,GACA,GACe;CAIf,OAHIvB,EAAK,WAAW,aAAa,CAACD,EAAcC,CAAI,IAC3CA,IAEF;EACL,GAAGA;EACH,SAAS,MAAMa,EAAab,EAAK,SAASA,EAAK,MAAMQ,GAAS,EAAE,WAAQ,CAAC;CAC3E;AACF;AAEA,eAAegB,EACb,GACA,GACA,GACiB;CACjB,OAAO,QAAQ,IAAIC,EAAM,KAAK,MAASF,EAAWvB,GAAMQ,GAASQ,CAAO,CAAC,CAAC;AAC5E;AAEA,eAAsBU,EACpB,GACA,GACiB;CACjB,IAAM,CAACC,GAASC,KAAY,MAAM,QAAQ,IAAI,CAC5CJ,EAAYK,EAAO,SAASrB,GAAS,EAAI,GACzCgB,EAAYK,EAAO,UAAUrB,GAAS,EAAK,CAC7C,CAAC;CAED,OAAO;EACL,GAAGqB;EACH;EACA;CACF;AACF"}
1
+ {"version":3,"file":"format-result-CojavkIZ.js","names":["path","prettier","sveltePlugin","canFormatFile","file","dependsOnPrettier","pkg","readFileSync","root","usesPrettier","target","projectOptions","context","resolved","plugins","plugin","MAX_FORMAT_PASSES","formatSource","options","filePath","created","content","format","source","formatted","pass","again","formatFile","formatFiles","files","formatResult","creates","modifies","result"],"sources":["../../src/core/format-result.ts"],"sourcesContent":["import { readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport prettier from \"prettier\";\nimport type { File, Options, Result } from \"./types\";\nimport sveltePlugin from \"prettier-plugin-svelte\";\n\n/** What the formatter needs to know about the run: where the project is, and whether it exists at all. */\nexport type FormatContext = Pick<Options, \"env\" | \"root\">;\n\nfunction canFormatFile(file: File): boolean {\n return (\n file.language === \"ts\" ||\n file.language === \"js\" ||\n file.language === \"svelte\" ||\n file.path.endsWith(\".json\") ||\n // A README's code blocks are checked by `prettier --check` like the code.\n file.path.endsWith(\".md\")\n );\n}\n\nfunction dependsOnPrettier(root: string): boolean {\n try {\n const pkg = JSON.parse(\n readFileSync(path.join(root, \"package.json\"), \"utf8\"),\n ) as {\n dependencies?: Record<string, string>;\n devDependencies?: Record<string, string>;\n };\n return Boolean(pkg.dependencies?.prettier || pkg.devDependencies?.prettier);\n } catch {\n return false;\n }\n}\n\n/**\n * Whether the project formats with prettier: it depends on it, or prettier\n * finds a config file for the target (a monorepo may keep one at its root).\n * A project with neither, like a bare `sv create`, has a style of its own\n * that prettier's defaults would rewrite in every file a pattern edits.\n */\nasync function usesPrettier(root: string, target: string): Promise<boolean> {\n if (dependsOnPrettier(root)) return true;\n return (await prettier.resolveConfigFile(target)) !== null;\n}\n\n/**\n * The target project's own prettier settings (`.prettierrc`, `.editorconfig`,\n * `package.json#prettier`), so pattern output matches what `npm run lint`\n * expects there; `null` when the project does not use prettier. Preview runs\n * have no project and use prettier's defaults.\n *\n * The svelte plugin is always supplied as a module: a project's config names\n * it by string, which would resolve relative to this package instead.\n */\nasync function projectOptions(\n file: Pick<File, \"path\">,\n context?: FormatContext,\n): Promise<prettier.Options | null> {\n if (context?.env !== \"runtime\" || !context.root) return {};\n const target = path.isAbsolute(file.path)\n ? file.path\n : path.join(context.root, file.path);\n if (!(await usesPrettier(context.root, target))) return null;\n const resolved = await prettier.resolveConfig(target, { editorconfig: true });\n if (!resolved) return {};\n const plugins = (resolved.plugins ?? []).filter(\n (plugin) => plugin !== \"prettier-plugin-svelte\",\n );\n return { ...resolved, plugins };\n}\n\nconst MAX_FORMAT_PASSES = 3;\n\n/**\n * Formats one source text the way pattern output is formatted; the content\n * comes back unchanged when prettier cannot parse it, or when the project\n * does not use prettier and the file is not `created`. A file a generator\n * created is formatted either way, with prettier's defaults if need be: it\n * relies on formatting for its indentation and has no style of its own to\n * keep. Also used for component files that arrive on disk from\n * `shadcn-svelte add` or the bundled components, so `npm run lint` in the\n * project stays clean after an install.\n */\nexport async function formatSource(\n content: string,\n filePath: string,\n context?: FormatContext,\n { created = false }: { created?: boolean } = {},\n): Promise<string> {\n try {\n const options =\n (await projectOptions({ path: filePath }, context)) ??\n (created ? {} : null);\n if (!options) return content;\n const format = (source: string) =>\n prettier.format(source, {\n ...options,\n filepath: filePath,\n plugins: [...(options.plugins ?? []), sveltePlugin],\n });\n // Prettier is not always idempotent: a long one-line member chain\n // (`await context.admin.collection(\"x\").create({ ... })`) comes out broken\n // across lines on the first pass and joined on the second, which the\n // project's `prettier --check` would flag. Format until it settles.\n let formatted = await format(content);\n for (let pass = 1; pass < MAX_FORMAT_PASSES; pass++) {\n const again = await format(formatted);\n if (again === formatted) break;\n formatted = again;\n }\n return formatted;\n } catch {\n return content;\n }\n}\n\nasync function formatFile(\n file: File,\n context: FormatContext | undefined,\n created: boolean,\n): Promise<File> {\n if (file.status !== \"success\" || !canFormatFile(file)) {\n return file;\n }\n return {\n ...file,\n content: await formatSource(file.content, file.path, context, { created }),\n };\n}\n\nasync function formatFiles(\n files: File[],\n context: FormatContext | undefined,\n created: boolean,\n): Promise<File[]> {\n return Promise.all(files.map((file) => formatFile(file, context, created)));\n}\n\nexport async function formatResult(\n result: Result,\n context?: FormatContext,\n): Promise<Result> {\n const [creates, modifies] = await Promise.all([\n formatFiles(result.creates, context, true),\n formatFiles(result.modifies, context, false),\n ]);\n\n return {\n ...result,\n creates,\n modifies,\n };\n}\n"],"mappings":";;;;;AASA,SAASG,EAAc,GAAqB;CAC1C,OACEC,EAAK,aAAa,QAClBA,EAAK,aAAa,QAClBA,EAAK,aAAa,YAClBA,EAAK,KAAK,SAAS,OAAO,KAE1BA,EAAK,KAAK,SAAS,KAAK;AAE5B;AAEA,SAASC,EAAkB,GAAuB;CAChD,IAAI;EACF,IAAMC,IAAM,KAAK,MACfC,EAAaP,EAAK,KAAKQ,GAAM,cAAc,GAAG,MAAM,CACtD;EAIA,OAAO,GAAQF,EAAI,cAAc,YAAYA,EAAI,iBAAiB;CACpE,QAAQ;EACN,OAAO;CACT;AACF;AAQA,eAAeG,EAAa,GAAc,GAAkC;CAE1E,OADIJ,EAAkBG,CAAI,IAAU,KAC5B,MAAMP,EAAS,kBAAkBS,CAAM,MAAO;AACxD;AAWA,eAAeC,EACb,GACA,GACkC;CAClC,IAAIC,GAAS,QAAQ,aAAa,CAACA,EAAQ,MAAM,OAAO,CAAC;CACzD,IAAMF,IAASV,EAAK,WAAWI,EAAK,IAAI,IACpCA,EAAK,OACLJ,EAAK,KAAKY,EAAQ,MAAMR,EAAK,IAAI;CACrC,IAAI,CAAE,MAAMK,EAAaG,EAAQ,MAAMF,CAAM,GAAI,OAAO;CACxD,IAAMG,IAAW,MAAMZ,EAAS,cAAcS,GAAQ,EAAE,cAAc,GAAK,CAAC;CAC5E,IAAI,CAACG,GAAU,OAAO,CAAC;CACvB,IAAMC,KAAWD,EAAS,WAAW,CAAC,EAAA,CAAG,QACtC,MAAWE,MAAW,wBACzB;CACA,OAAO;EAAE,GAAGF;EAAU;CAAQ;AAChC;AAEA,IAAMG,IAAoB;AAY1B,eAAsBC,EACpB,GACA,GACA,GACA,EAAE,aAAU,OAAiC,CAAC,GAC7B;CACjB,IAAI;EACF,IAAMC,IACH,MAAMP,EAAe,EAAE,MAAMQ,EAAS,GAAGP,CAAO,MAChDQ,IAAU,CAAC,IAAI;EAClB,IAAI,CAACF,GAAS,OAAOG;EACrB,IAAMC,KAAU,MACdrB,EAAS,OAAOsB,GAAQ;GACtB,GAAGL;GACH,UAAUC;GACV,SAAS,CAAC,GAAID,EAAQ,WAAW,CAAC,GAAIhB,CAAY;EACpD,CAAC,GAKCsB,IAAY,MAAMF,EAAOD,CAAO;EACpC,KAAK,IAAII,IAAO,GAAGA,IAAOT,GAAmB,KAAQ;GACnD,IAAMU,IAAQ,MAAMJ,EAAOE,CAAS;GACpC,IAAIE,MAAUF,GAAW;GACzB,IAAYE;EACd;EACA,OAAOF;CACT,QAAQ;EACN,OAAOH;CACT;AACF;AAEA,eAAeM,EACb,GACA,GACA,GACe;CAIf,OAHIvB,EAAK,WAAW,aAAa,CAACD,EAAcC,CAAI,IAC3CA,IAEF;EACL,GAAGA;EACH,SAAS,MAAMa,EAAab,EAAK,SAASA,EAAK,MAAMQ,GAAS,EAAE,WAAQ,CAAC;CAC3E;AACF;AAEA,eAAegB,EACb,GACA,GACA,GACiB;CACjB,OAAO,QAAQ,IAAIC,EAAM,KAAK,MAASF,EAAWvB,GAAMQ,GAASQ,CAAO,CAAC,CAAC;AAC5E;AAEA,eAAsBU,EACpB,GACA,GACiB;CACjB,IAAM,CAACC,GAASC,KAAY,MAAM,QAAQ,IAAI,CAC5CJ,EAAYK,EAAO,SAASrB,GAAS,EAAI,GACzCgB,EAAYK,EAAO,UAAUrB,GAAS,EAAK,CAC7C,CAAC;CAED,OAAO;EACL,GAAGqB;EACH;EACA;CACF;AACF"}
@@ -1,75 +1,75 @@
1
- import { a as e, r as t } from "./util-BLYliuUK.js";
2
- import { t as n } from "./providers-CL9kQ4hp.js";
3
- import { A as r, B as i, C as a, D as o, E as s, F as c, G as l, H as u, I as d, K as f, L as p, M as m, N as h, O as g, P as _, R as v, S as y, T as b, U as x, V as S, W as C, _ as w, b as T, c as E, d as D, f as ee, g as O, h as k, i as A, j, k as M, l as N, m as P, n as F, p as I, s as L, t as R, u as z, v as B, w as V, x as H, y as U, z as W } from "./currency.server-DygAf6a1.js";
4
- import { t as G } from "./stripe-customer-B3tP8gtD.js";
5
- import { n as K, t as q } from "./_page-DoPdZgZv.js";
6
- //#region src/patterns/disable/payments/generate.ts
1
+ import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, K as l, L as u, M as d, N as f, O as p, P as m, R as h, S as g, T as _, U as v, V as y, W as b, _ as x, b as S, c as C, d as w, f as T, g as E, h as D, i as O, j as k, k as A, l as ee, m as j, n as M, p as N, s as P, t as F, u as I, v as L, w as R, x as z, y as B, z as V } from "./currency.server-BwuXG0a9.js";
2
+ import { t as H } from "./stripe-customer-5S-nOXP1.js";
3
+ import { n as U, t as W } from "./_page-Bt37d4uo.js";
4
+ import { t as G } from "./providers-tjlFH5di.js";
5
+ import { a as K, r as q } from "./util-ILWdjRAd.js";
6
+ // src/patterns/disable/payments/generate.ts
7
7
  var J = /* #__PURE__ */ Object.assign({
8
- "../../enable/payments/providers/shopify/src/lib/components/payments/buy-button.svelte": C,
9
- "../../enable/payments/providers/shopify/src/lib/shopify.ts": x,
10
- "../../enable/payments/providers/stripe/src/lib/components/payments/confirm-dialog.svelte": u,
11
- "../../enable/payments/providers/stripe/src/lib/components/payments/payment-button.svelte": S,
12
- "../../enable/payments/providers/stripe/src/lib/components/payments/payment-dialog.svelte": i,
13
- "../../enable/payments/providers/stripe/src/lib/components/payments/stripe-constants.ts": W,
14
- "../../enable/payments/providers/stripe/src/lib/components/payments/stripe-payment-form.svelte": v,
15
- "../../enable/payments/providers/stripe/src/lib/components/payments/use-payment-intent.svelte.ts": p,
16
- "../../enable/payments/providers/stripe/src/lib/components/payments/use-stripe.svelte.ts": d,
17
- "../../enable/payments/providers/stripe/src/lib/stripe.ts": c,
18
- "../../enable/payments/providers/stripe/src/lib/workflows/stripe-event.ts": _,
19
- "../../enable/payments/providers/stripe/src/lib/workflows/sync-stripe-catalog.ts": h,
20
- "../../enable/payments/providers/stripe/src/routes/api/stripe/payment-intent/+server.ts": m,
21
- "../../enable/payments/providers/stripe/src/routes/api/stripe/payment-intent/server.test.ts": j,
22
- "../../enable/payments/providers/stripe/src/routes/webhooks/stripe/+server.ts": r,
23
- "../../enable/payments/providers/stripe/src/routes/webhooks/stripe/handlers/dispatch.ts": M,
24
- "../../enable/payments/providers/stripe/src/routes/webhooks/stripe/handlers/payment-intent/server.test.ts": g,
25
- "../../enable/payments/providers/stripe/src/routes/webhooks/stripe/handlers/payment-intent/succeeded.ts": o,
26
- "../../enable/payments/providers/stripe/src/routes/webhooks/stripe/server.test.ts": s,
27
- "../../enable/payments/providers/whatsapp/src/lib/components/payments/customer-fields.svelte": b,
28
- "../../enable/payments/providers/whatsapp/src/lib/components/payments/order-button.svelte": V,
29
- "../../enable/payments/providers/whatsapp/src/lib/order.test.ts": a,
30
- "../../enable/payments/providers/whatsapp/src/lib/order.ts": y,
31
- "../../enable/payments/providers-app-mode/stripe/src/lib/components/payments/setup-button.svelte": H,
32
- "../../enable/payments/providers-app-mode/stripe/src/lib/components/payments/setup-dialog.svelte": T,
33
- "../../enable/payments/providers-app-mode/stripe/src/lib/server/stripe-customer.ts": G,
34
- "../../enable/payments/providers-app-mode/stripe/src/lib/workflows/link-stripe-customer.ts": U,
35
- "../../enable/payments/providers-app-mode/stripe/src/lib/workflows/sync-stripe-customers.ts": B,
36
- "../../enable/payments/providers-app-mode/stripe/src/routes/(app)/billing/+layout.server.ts": w,
37
- "../../enable/payments/providers-app-mode/stripe/src/routes/(app)/billing/+page.server.ts": K,
38
- "../../enable/payments/providers-app-mode/stripe/src/routes/(app)/billing/+page.svelte": q,
39
- "../../enable/payments/providers-app-mode/stripe/src/routes/(app)/billing/README.md": O,
40
- "../../enable/payments/providers-app-mode/stripe/src/routes/api/stripe/payment-intent/+server.ts": k,
41
- "../../enable/payments/providers-app-mode/stripe/src/routes/api/stripe/payment-intent/server.test.ts": P,
42
- "../../enable/payments/providers-app-mode/stripe/src/routes/api/stripe/setup-intent/+server.ts": I,
43
- "../../enable/payments/providers-app-mode/stripe/src/routes/api/stripe/setup-intent/server.test.ts": ee,
44
- "../../enable/payments/providers-app-mode/stripe/src/routes/webhooks/stripe/handlers/dispatch.ts": D,
45
- "../../enable/payments/providers-app-mode/stripe/src/routes/webhooks/stripe/handlers/payment-intent/server.test.ts": z,
46
- "../../enable/payments/providers-app-mode/stripe/src/routes/webhooks/stripe/handlers/payment-intent/succeeded.ts": N,
47
- "../../enable/payments/providers-app-mode/stripe/src/routes/webhooks/stripe/handlers/payment-method/attached.ts": E,
48
- "../../enable/payments/providers-app-mode/stripe/src/routes/webhooks/stripe/handlers/payment-method/server.test.ts": L
8
+ "../../enable/payments/providers/shopify/src/lib/components/payments/buy-button.svelte": b,
9
+ "../../enable/payments/providers/shopify/src/lib/shopify.ts": v,
10
+ "../../enable/payments/providers/stripe/src/lib/components/payments/confirm-dialog.svelte": s,
11
+ "../../enable/payments/providers/stripe/src/lib/components/payments/payment-button.svelte": y,
12
+ "../../enable/payments/providers/stripe/src/lib/components/payments/payment-dialog.svelte": t,
13
+ "../../enable/payments/providers/stripe/src/lib/components/payments/stripe-constants.ts": V,
14
+ "../../enable/payments/providers/stripe/src/lib/components/payments/stripe-payment-form.svelte": h,
15
+ "../../enable/payments/providers/stripe/src/lib/components/payments/use-payment-intent.svelte.ts": u,
16
+ "../../enable/payments/providers/stripe/src/lib/components/payments/use-stripe.svelte.ts": c,
17
+ "../../enable/payments/providers/stripe/src/lib/stripe.ts": a,
18
+ "../../enable/payments/providers/stripe/src/lib/workflows/stripe-event.ts": m,
19
+ "../../enable/payments/providers/stripe/src/lib/workflows/sync-stripe-catalog.ts": f,
20
+ "../../enable/payments/providers/stripe/src/routes/api/stripe/payment-intent/+server.ts": d,
21
+ "../../enable/payments/providers/stripe/src/routes/api/stripe/payment-intent/server.test.ts": k,
22
+ "../../enable/payments/providers/stripe/src/routes/webhooks/stripe/+server.ts": e,
23
+ "../../enable/payments/providers/stripe/src/routes/webhooks/stripe/handlers/dispatch.ts": A,
24
+ "../../enable/payments/providers/stripe/src/routes/webhooks/stripe/handlers/payment-intent/server.test.ts": p,
25
+ "../../enable/payments/providers/stripe/src/routes/webhooks/stripe/handlers/payment-intent/succeeded.ts": r,
26
+ "../../enable/payments/providers/stripe/src/routes/webhooks/stripe/server.test.ts": i,
27
+ "../../enable/payments/providers/whatsapp/src/lib/components/payments/customer-fields.svelte": _,
28
+ "../../enable/payments/providers/whatsapp/src/lib/components/payments/order-button.svelte": R,
29
+ "../../enable/payments/providers/whatsapp/src/lib/order.test.ts": n,
30
+ "../../enable/payments/providers/whatsapp/src/lib/order.ts": g,
31
+ "../../enable/payments/providers-app-mode/stripe/src/lib/components/payments/setup-button.svelte": z,
32
+ "../../enable/payments/providers-app-mode/stripe/src/lib/components/payments/setup-dialog.svelte": S,
33
+ "../../enable/payments/providers-app-mode/stripe/src/lib/server/stripe-customer.ts": H,
34
+ "../../enable/payments/providers-app-mode/stripe/src/lib/workflows/link-stripe-customer.ts": B,
35
+ "../../enable/payments/providers-app-mode/stripe/src/lib/workflows/sync-stripe-customers.ts": L,
36
+ "../../enable/payments/providers-app-mode/stripe/src/routes/(app)/billing/+layout.server.ts": x,
37
+ "../../enable/payments/providers-app-mode/stripe/src/routes/(app)/billing/+page.server.ts": U,
38
+ "../../enable/payments/providers-app-mode/stripe/src/routes/(app)/billing/+page.svelte": W,
39
+ "../../enable/payments/providers-app-mode/stripe/src/routes/(app)/billing/README.md": E,
40
+ "../../enable/payments/providers-app-mode/stripe/src/routes/api/stripe/payment-intent/+server.ts": D,
41
+ "../../enable/payments/providers-app-mode/stripe/src/routes/api/stripe/payment-intent/server.test.ts": j,
42
+ "../../enable/payments/providers-app-mode/stripe/src/routes/api/stripe/setup-intent/+server.ts": N,
43
+ "../../enable/payments/providers-app-mode/stripe/src/routes/api/stripe/setup-intent/server.test.ts": T,
44
+ "../../enable/payments/providers-app-mode/stripe/src/routes/webhooks/stripe/handlers/dispatch.ts": w,
45
+ "../../enable/payments/providers-app-mode/stripe/src/routes/webhooks/stripe/handlers/payment-intent/server.test.ts": I,
46
+ "../../enable/payments/providers-app-mode/stripe/src/routes/webhooks/stripe/handlers/payment-intent/succeeded.ts": ee,
47
+ "../../enable/payments/providers-app-mode/stripe/src/routes/webhooks/stripe/handlers/payment-method/attached.ts": C,
48
+ "../../enable/payments/providers-app-mode/stripe/src/routes/webhooks/stripe/handlers/payment-method/server.test.ts": P
49
49
  }), Y = /* #__PURE__ */ Object.assign({
50
- "../../enable/payments/creates/src/lib/components/currency-select.svelte": f,
51
- "../../enable/payments/creates/src/lib/currency.svelte.ts": l
50
+ "../../enable/payments/creates/src/lib/components/currency-select.svelte": l,
51
+ "../../enable/payments/creates/src/lib/currency.svelte.ts": o
52
52
  }), X = /* #__PURE__ */ Object.assign({
53
- "../../enable/payments/creates-server/src/lib/currency.server.test.ts": F,
54
- "../../enable/payments/creates-server/src/lib/currency.server.ts": R
53
+ "../../enable/payments/creates-server/src/lib/currency.server.test.ts": M,
54
+ "../../enable/payments/creates-server/src/lib/currency.server.ts": F
55
55
  }), Z = "src/routes/(public)/payment/+page.svelte";
56
56
  function Q(e) {
57
- let t = e.providers?.payments, n = A.filter((e) => e.id === t);
58
- return n.length > 0 ? n : A;
57
+ let t = e.providers?.payments, n = O.filter((e) => e.id === t);
58
+ return n.length > 0 ? n : O;
59
59
  }
60
- async function $(r) {
61
- let i = /* @__PURE__ */ new Set([
60
+ async function $(e) {
61
+ let t = /* @__PURE__ */ new Set([
62
62
  Z,
63
- ...Object.keys(t(Y, "../../enable/payments/creates/")),
64
- ...Object.keys(t(X, "../../enable/payments/creates-server/"))
63
+ ...Object.keys(q(Y, "../../enable/payments/creates/")),
64
+ ...Object.keys(q(X, "../../enable/payments/creates-server/"))
65
65
  ]);
66
- for (let e of Q(r)) for (let t of n(J, e.id)) i.add(t);
66
+ for (let n of Q(e)) for (let e of G(J, n.id)) t.add(e);
67
67
  return {
68
68
  creates: [],
69
69
  modifies: [],
70
- deletes: [...i].sort().map((t) => ({
71
- path: t,
72
- language: e(t),
70
+ deletes: [...t].sort().map((e) => ({
71
+ path: e,
72
+ language: K(e),
73
73
  content: "",
74
74
  status: "success"
75
75
  })),
@@ -80,7 +80,6 @@ async function $(r) {
80
80
  collectionDrops: []
81
81
  };
82
82
  }
83
- //#endregion
84
83
  export { Q as n, $ as t };
85
84
 
86
- //# sourceMappingURL=generate-Cbg-Z3sA.js.map
85
+ //# sourceMappingURL=generate-BCYvhyF9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-Cbg-Z3sA.js","names":["__import_glob__0_0_","__import_glob__0_1_","__import_glob__0_2_","__import_glob__0_3_","__import_glob__0_4_","__import_glob__0_5_","__import_glob__0_6_","__import_glob__0_7_","__import_glob__0_8_","__import_glob__0_9_","__import_glob__0_10_","__import_glob__0_11_","__import_glob__0_12_","__import_glob__0_13_","__import_glob__0_14_","__import_glob__0_15_","__import_glob__0_16_","__import_glob__0_17_","__import_glob__0_18_","__import_glob__0_19_","__import_glob__0_20_","__import_glob__0_21_","__import_glob__0_22_","__import_glob__0_23_","__import_glob__0_24_","__import_glob__0_25_","__import_glob__0_26_","__import_glob__0_27_","__import_glob__0_28_","__import_glob__0_29_","__import_glob__0_30_","__import_glob__0_31_","__import_glob__0_32_","__import_glob__0_33_","__import_glob__0_34_","__import_glob__0_35_","__import_glob__0_36_","__import_glob__0_37_","__import_glob__0_38_","__import_glob__0_39_","__import_glob__0_40_","__import_glob__1_0_","__import_glob__1_1_","__import_glob__2_0_","__import_glob__2_1_","languageFromPath","filesFromGlob","allProviderPaths","_server_default$1","payment_dialog_default","order_test_default","succeeded_default","server_test_default$2","stripe_default","currency_svelte_default","confirm_dialog_default","use_stripe_svelte_default","currency_select_default","use_payment_intent_svelte_default","_server_default","sync_stripe_catalog_default","server_test_default$1","stripe_event_default","stripe_payment_form_default","order_default","customer_fields_default","shopify_default","payment_button_default","buy_button_default","_layout_server_default","setup_dialog_default","attached_default","dispatch_default$1","server_test_default$4","README_default","_server_default$2","PROVIDERS","dispatch_default","succeeded_default$1","server_test_default$3","currency_server_test_default","_server_default$3","server_test_default$6","currency_server_default","server_test_default$5","sync_stripe_customers_default","order_button_default","setup_button_default","link_stripe_customer_default","stripe_constants_default","stripe_customer_default","_page_server_default","_page_default","providersRaw","server_test_default","createsRaw","createsServerRaw","DEMO_PAGE","providersToRemove","detected","options","match","provider","generate","paths","path"],"sources":["../../src/patterns/disable/payments/generate.ts"],"sourcesContent":["import type { File, Options, Provider, Result } from \"../../../core/types\";\nimport { allProviderPaths } from \"../../../core/providers\";\nimport { filesFromGlob, languageFromPath } from \"../../../core/util\";\nimport { PROVIDERS } from \"../../enable/payments/generate\";\n\nconst providersRaw = import.meta.glob<string>(\n [\n \"../../enable/payments/providers/**\",\n \"../../enable/payments/providers-app-mode/**\",\n ],\n { query: \"?raw\", import: \"default\", eager: true },\n);\n\n// Shared by every provider: the currency store and its select, and the server\n// half enable-payments adds to a project with a server load.\nconst createsRaw = import.meta.glob<string>(\n \"../../enable/payments/creates/**\",\n { query: \"?raw\", import: \"default\", eager: true },\n);\nconst createsServerRaw = import.meta.glob<string>(\n \"../../enable/payments/creates-server/**\",\n { query: \"?raw\", import: \"default\", eager: true },\n);\n\n// The demo page enable-payments writes at runtime (it carries the price or\n// variant id), so it is in no template tree: without the payment components it\n// would no longer build.\nconst DEMO_PAGE = \"src/routes/(public)/payment/+page.svelte\";\n\n/**\n * The provider whose files to remove: the one detected, else every one.\n * Removing every provider's files is safe, since a missing path is skipped.\n */\nexport function providersToRemove(\n options: Pick<Options, \"providers\">,\n): Provider[] {\n const detected = options.providers?.payments;\n const match = PROVIDERS.filter((provider) => provider.id === detected);\n return match.length > 0 ? match : PROVIDERS;\n}\n\nexport async function generate(options: Options) {\n // Both the plain and the app-mode files go, whatever auth is now: auth may\n // have been turned on or off since payments was enabled.\n const paths = new Set([\n DEMO_PAGE,\n ...Object.keys(filesFromGlob(createsRaw, \"../../enable/payments/creates/\")),\n ...Object.keys(\n filesFromGlob(createsServerRaw, \"../../enable/payments/creates-server/\"),\n ),\n ]);\n for (const provider of providersToRemove(options)) {\n for (const path of allProviderPaths(providersRaw, provider.id)) {\n paths.add(path);\n }\n }\n\n const deletes: File[] = [...paths].sort().map((path) => ({\n path,\n language: languageFromPath(path),\n content: \"\",\n status: \"success\",\n }));\n\n return {\n creates: [],\n modifies: [],\n deletes,\n components: [],\n packages: [],\n collections: [],\n collectionPatches: [],\n collectionDrops: [],\n } satisfies Result;\n}\n"],"mappings":";;;;;;AAKA,IAAM6F,IAAe,uBAAA,OAAA;CAAA,yFAAA7F;CAAA,8DAAAC;CAAA,4FAAAC;CAAA,4FAAAC;CAAA,4FAAAC;CAAA,0FAAAC;CAAA,iGAAAC;CAAA,mGAAAC;CAAA,2FAAAC;CAAA,4DAAAC;CAAA,4EAAAC;CAAA,mFAAAC;CAAA,0FAAAC;CAAA,8FAAAC;CAAA,gFAAAC;CAAA,0FAAAC;CAAA,4GAAAC;CAAA,0GAAAC;CAAA,oFAAAC;CAAA,+FAAAC;CAAA,4FAAAC;CAAA,kEAAAC;CAAA,6DAAAC;CAAA,mGAAAC;CAAA,mGAAAC;CAAA,qFAAAC;CAAA,6FAAAC;CAAA,8FAAAC;CAAA,8FAAAC;CAAA,4FAAAC;CAAA,yFAAAC;CAAA,sFAAAC;CAAA,mGAAAC;CAAA,uGAAAC;CAAA,iGAAAC;CAAA,qGAAAC;CAAA,mGAAAC;CAAA,qHAAAC;CAAA,mHAAAC;CAAA,kHAAAC;CAAA,qHAAAC;AAMrB,CAAA,GAIMuD,IAAa,uBAAA,OAAA;CAAA,2EAAAtD;CAAA,4DAAAC;AAGnB,CAAA,GACMsD,IAAmB,uBAAA,OAAA;CAAA,wEAAArD;CAAA,mEAAAC;AAGzB,CAAA,GAKMqD,IAAY;AAMlB,SAAgBC,EACd,GACY;CACZ,IAAMC,IAAWC,EAAQ,WAAW,UAC9BC,IAAQzB,EAAU,QAAQ,MAAa0B,EAAS,OAAOH,CAAQ;CACrE,OAAOE,EAAM,SAAS,IAAIA,IAAQzB;AACpC;AAEA,eAAsB2B,EAAS,GAAkB;CAG/C,IAAMC,oBAAQ,IAAI,IAAI;EACpBP;EACA,GAAG,OAAO,KAAKnD,EAAciD,GAAY,gCAAgC,CAAC;EAC1E,GAAG,OAAO,KACRjD,EAAckD,GAAkB,uCAAuC,CACzE;CACF,CAAC;CACD,KAAK,IAAMM,KAAYJ,EAAkBE,CAAO,GAC9C,KAAK,IAAMK,KAAQ1D,EAAiB8C,GAAcS,EAAS,EAAE,GAC3D,EAAM,IAAIG,CAAI;CAWlB,OAAO;EACL,SAAS,CAAC;EACV,UAAU,CAAC;EACX,SAVsB,CAAC,GAAGD,CAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,OAAU;GACvD;GACA,UAAU3D,EAAiB4D,CAAI;GAC/B,SAAS;GACT,QAAQ;EACV,EAKE;EACA,YAAY,CAAC;EACb,UAAU,CAAC;EACX,aAAa,CAAC;EACd,mBAAmB,CAAC;EACpB,iBAAiB,CAAC;CACpB;AACF"}
1
+ {"version":3,"file":"generate-BCYvhyF9.js","names":["__import_glob__0_0_","__import_glob__0_1_","__import_glob__0_2_","__import_glob__0_3_","__import_glob__0_4_","__import_glob__0_5_","__import_glob__0_6_","__import_glob__0_7_","__import_glob__0_8_","__import_glob__0_9_","__import_glob__0_10_","__import_glob__0_11_","__import_glob__0_12_","__import_glob__0_13_","__import_glob__0_14_","__import_glob__0_15_","__import_glob__0_16_","__import_glob__0_17_","__import_glob__0_18_","__import_glob__0_19_","__import_glob__0_20_","__import_glob__0_21_","__import_glob__0_22_","__import_glob__0_23_","__import_glob__0_24_","__import_glob__0_25_","__import_glob__0_26_","__import_glob__0_27_","__import_glob__0_28_","__import_glob__0_29_","__import_glob__0_30_","__import_glob__0_31_","__import_glob__0_32_","__import_glob__0_33_","__import_glob__0_34_","__import_glob__0_35_","__import_glob__0_36_","__import_glob__0_37_","__import_glob__0_38_","__import_glob__0_39_","__import_glob__0_40_","__import_glob__1_0_","__import_glob__1_1_","__import_glob__2_0_","__import_glob__2_1_","_server_default$1","payment_dialog_default","order_test_default","succeeded_default","server_test_default$2","stripe_default","currency_svelte_default","confirm_dialog_default","use_stripe_svelte_default","currency_select_default","use_payment_intent_svelte_default","_server_default","sync_stripe_catalog_default","server_test_default$1","stripe_event_default","stripe_payment_form_default","order_default","customer_fields_default","shopify_default","payment_button_default","buy_button_default","_layout_server_default","setup_dialog_default","attached_default","dispatch_default$1","server_test_default$4","README_default","_server_default$2","PROVIDERS","server_test_default","dispatch_default","succeeded_default$1","server_test_default$3","currency_server_test_default","_server_default$3","server_test_default$6","currency_server_default","server_test_default$5","sync_stripe_customers_default","order_button_default","setup_button_default","link_stripe_customer_default","stripe_constants_default","stripe_customer_default","_page_server_default","_page_default","allProviderPaths","languageFromPath","filesFromGlob","providersRaw","createsRaw","createsServerRaw","DEMO_PAGE","providersToRemove","detected","options","match","provider","generate","paths","path"],"sources":["../../src/patterns/disable/payments/generate.ts"],"sourcesContent":["import type { File, Options, Provider, Result } from \"../../../core/types\";\nimport { allProviderPaths } from \"../../../core/providers\";\nimport { filesFromGlob, languageFromPath } from \"../../../core/util\";\nimport { PROVIDERS } from \"../../enable/payments/generate\";\n\nconst providersRaw = import.meta.glob<string>(\n [\n \"../../enable/payments/providers/**\",\n \"../../enable/payments/providers-app-mode/**\",\n ],\n { query: \"?raw\", import: \"default\", eager: true },\n);\n\n// Shared by every provider: the currency store and its select, and the server\n// half enable-payments adds to a project with a server load.\nconst createsRaw = import.meta.glob<string>(\n \"../../enable/payments/creates/**\",\n { query: \"?raw\", import: \"default\", eager: true },\n);\nconst createsServerRaw = import.meta.glob<string>(\n \"../../enable/payments/creates-server/**\",\n { query: \"?raw\", import: \"default\", eager: true },\n);\n\n// The demo page enable-payments writes at runtime (it carries the price or\n// variant id), so it is in no template tree: without the payment components it\n// would no longer build.\nconst DEMO_PAGE = \"src/routes/(public)/payment/+page.svelte\";\n\n/**\n * The provider whose files to remove: the one detected, else every one.\n * Removing every provider's files is safe, since a missing path is skipped.\n */\nexport function providersToRemove(\n options: Pick<Options, \"providers\">,\n): Provider[] {\n const detected = options.providers?.payments;\n const match = PROVIDERS.filter((provider) => provider.id === detected);\n return match.length > 0 ? match : PROVIDERS;\n}\n\nexport async function generate(options: Options) {\n // Both the plain and the app-mode files go, whatever auth is now: auth may\n // have been turned on or off since payments was enabled.\n const paths = new Set([\n DEMO_PAGE,\n ...Object.keys(filesFromGlob(createsRaw, \"../../enable/payments/creates/\")),\n ...Object.keys(\n filesFromGlob(createsServerRaw, \"../../enable/payments/creates-server/\"),\n ),\n ]);\n for (const provider of providersToRemove(options)) {\n for (const path of allProviderPaths(providersRaw, provider.id)) {\n paths.add(path);\n }\n }\n\n const deletes: File[] = [...paths].sort().map((path) => ({\n path,\n language: languageFromPath(path),\n content: \"\",\n status: \"success\",\n }));\n\n return {\n creates: [],\n modifies: [],\n deletes,\n components: [],\n packages: [],\n collections: [],\n collectionPatches: [],\n collectionDrops: [],\n } satisfies Result;\n}\n"],"mappings":";;;;;;AAKA,IAAM8F,IAAe,uBAAA,OAAA;CAAA,yFAAA9F;CAAA,8DAAAC;CAAA,4FAAAC;CAAA,4FAAAC;CAAA,4FAAAC;CAAA,0FAAAC;CAAA,iGAAAC;CAAA,mGAAAC;CAAA,2FAAAC;CAAA,4DAAAC;CAAA,4EAAAC;CAAA,mFAAAC;CAAA,0FAAAC;CAAA,8FAAAC;CAAA,gFAAAC;CAAA,0FAAAC;CAAA,4GAAAC;CAAA,0GAAAC;CAAA,oFAAAC;CAAA,+FAAAC;CAAA,4FAAAC;CAAA,kEAAAC;CAAA,6DAAAC;CAAA,mGAAAC;CAAA,mGAAAC;CAAA,qFAAAC;CAAA,6FAAAC;CAAA,8FAAAC;CAAA,8FAAAC;CAAA,4FAAAC;CAAA,yFAAAC;CAAA,sFAAAC;CAAA,mGAAAC;CAAA,uGAAAC;CAAA,iGAAAC;CAAA,qGAAAC;CAAA,mGAAAC;CAAA,qHAAAC;CAAA,mHAAAC;CAAA,kHAAAC;CAAA,qHAAAC;AAMrB,CAAA,GAIMuD,IAAa,uBAAA,OAAA;CAAA,2EAAAtD;CAAA,4DAAAC;AAGnB,CAAA,GACMsD,IAAmB,uBAAA,OAAA;CAAA,wEAAArD;CAAA,mEAAAC;AAGzB,CAAA,GAKMqD,IAAY;AAMlB,SAAgBC,EACd,GACY;CACZ,IAAMC,IAAWC,EAAQ,WAAW,UAC9BC,IAAQ5B,EAAU,QAAQ,MAAa6B,EAAS,OAAOH,CAAQ;CACrE,OAAOE,EAAM,SAAS,IAAIA,IAAQ5B;AACpC;AAEA,eAAsB8B,EAAS,GAAkB;CAG/C,IAAMC,oBAAQ,IAAI,IAAI;EACpBP;EACA,GAAG,OAAO,KAAKJ,EAAcE,GAAY,gCAAgC,CAAC;EAC1E,GAAG,OAAO,KACRF,EAAcG,GAAkB,uCAAuC,CACzE;CACF,CAAC;CACD,KAAK,IAAMM,KAAYJ,EAAkBE,CAAO,GAC9C,KAAK,IAAMK,KAAQd,EAAiBG,GAAcQ,EAAS,EAAE,GAC3D,EAAM,IAAIG,CAAI;CAWlB,OAAO;EACL,SAAS,CAAC;EACV,UAAU,CAAC;EACX,SAVsB,CAAC,GAAGD,CAAK,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,OAAU;GACvD;GACA,UAAUZ,EAAiBa,CAAI;GAC/B,SAAS;GACT,QAAQ;EACV,EAKE;EACA,YAAY,CAAC;EACb,UAAU,CAAC;EACX,aAAa,CAAC;EACd,mBAAmB,CAAC;EACpB,iBAAiB,CAAC;CACpB;AACF"}
@@ -1,5 +1,5 @@
1
- import { c as e, i as t, r as n } from "./providers-CL9kQ4hp.js";
2
- //#region src/patterns/enable/analytics/providers/google/src/lib/components/analytics/analytics.svelte?raw
1
+ import { c as e, i as t, r as n } from "./providers-tjlFH5di.js";
2
+ // src/patterns/enable/analytics/providers/google/src/lib/components/analytics/analytics.svelte?raw
3
3
  var r = "<script lang=\"ts\">\n import { afterNavigate } from '$app/navigation';\n import { PUBLIC_GA_MEASUREMENT_ID } from '$app/env/public';\n import { pageView } from './gtag';\n\n // PUBLIC_GA_MEASUREMENT_ID looks like G-XXXXXXXXXX. Nothing loads until it\n // is set.\n const measurementId = PUBLIC_GA_MEASUREMENT_ID;\n\n // The tag is configured with send_page_view: false; page views are sent\n // from here instead. afterNavigate runs after the first render and after\n // every client-side navigation, so each route change is counted once.\n afterNavigate(() => pageView(measurementId));\n<\/script>\n\n<svelte:head>\n {#if measurementId}\n <script async src=\"https://www.googletagmanager.com/gtag/js?id={measurementId}\"><\/script>\n {/if}\n</svelte:head>\n", i = "import { browser } from '$app/env';\n\ndeclare global {\n interface Window {\n dataLayer: unknown[];\n }\n}\n\nlet configured = false;\n\n/**\n * Google's `gtag()`: pushes the `arguments` object onto `dataLayer`, which\n * gtag.js drains once it has loaded. It has to be `arguments`, not a rest\n * array; gtag.js ignores plain arrays. Call it from anywhere in the app:\n * `gtag('event', 'sign_up', { method: 'email' })`.\n */\nexport function gtag(..._args: unknown[]): void {\n window.dataLayer = window.dataLayer ?? [];\n // eslint-disable-next-line prefer-rest-params\n window.dataLayer.push(arguments);\n}\n\n/** Configures the tag on first use, then reports the current page. */\nexport function pageView(measurementId: string): void {\n if (!browser || !measurementId) return;\n if (!configured) {\n gtag('js', new Date());\n gtag('config', measurementId, { send_page_view: false });\n configured = true;\n }\n gtag('event', 'page_view', {\n page_location: location.href,\n page_title: document.title\n });\n}\n", a = "<script lang=\"ts\">\n import { PUBLIC_PLAUSIBLE_DOMAIN } from '$app/env/public';\n\n // PUBLIC_PLAUSIBLE_DOMAIN is the site as registered in Plausible, e.g.\n // `example.com`. Nothing loads until it is set. The script tracks\n // client-side navigations itself, so no SvelteKit wiring is needed.\n // Self-hosting? Point `src` at your instance instead of plausible.io.\n const domain = PUBLIC_PLAUSIBLE_DOMAIN;\n<\/script>\n\n<svelte:head>\n {#if domain}\n <script defer data-domain={domain} src=\"https://plausible.io/js/script.js\"><\/script>\n {/if}\n</svelte:head>\n", o = "<script lang=\"ts\">\n import { onMount } from 'svelte';\n import posthog from 'posthog-js';\n import { PUBLIC_POSTHOG_KEY, PUBLIC_POSTHOG_HOST } from '$app/env/public';\n\n // PUBLIC_POSTHOG_KEY is the project API key (phc_...). PUBLIC_POSTHOG_HOST\n // is the ingestion host: US cloud by default, https://eu.i.posthog.com for\n // EU projects, or your own instance. Nothing initialises until the key is\n // set.\n const key = PUBLIC_POSTHOG_KEY;\n const host = PUBLIC_POSTHOG_HOST || 'https://us.i.posthog.com';\n\n // `defaults: '2025-05-24'` captures a pageview on every history change, so\n // SvelteKit's client-side navigations are counted without extra wiring.\n // Import `posthog` elsewhere for custom events: posthog.capture('sign_up').\n onMount(() => {\n if (!key) return;\n posthog.init(key, { api_host: host, defaults: '2025-05-24' });\n });\n<\/script>\n", s = [
4
4
  {
5
5
  id: "plausible",
@@ -62,7 +62,6 @@ async function f(t) {
62
62
  collectionDrops: []
63
63
  };
64
64
  }
65
- //#endregion
66
65
  export { o as a, r as c, f as i, s as n, a as o, u as r, i as s, l as t };
67
66
 
68
- //# sourceMappingURL=generate-DyV5R8NP.js.map
67
+ //# sourceMappingURL=generate-CKuUg3p-.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generate-DyV5R8NP.js","names":["__import_glob__0_0_","__import_glob__0_1_","__import_glob__0_2_","__import_glob__0_3_","resolveProvider","providerEnvEdits","providerCreates","analytics_default$2","gtag_default","analytics_default$1","analytics_default","PROVIDERS","PACKAGES","META","envEditsFor","provider","supplied","providersRaw","generate","options"],"sources":["../../src/patterns/enable/analytics/generate.ts"],"sourcesContent":["import type { Options, Package, Provider, Result } from \"../../../core/types\";\nimport type { EnvEdit } from \"../../../runtime/env\";\nimport {\n providerCreates,\n providerEnvEdits,\n resolveProvider,\n} from \"../../../core/providers\";\n\n/** Every provider ships the same component, so the root layout mounts one path. */\nexport const COMPONENT_PATH = \"src/lib/components/analytics/analytics.svelte\";\n\n/**\n * The providers in prompt order. Each one's `env` keys are what the CLI asks\n * for, what `generate.runtime.ts` writes to `.env` and declares in\n * `src/env.ts` (`public: true`, since the browser reads them); the generated\n * component imports them from `$app/env/public` and stays inert while they\n * are blank.\n */\nexport const PROVIDERS: Provider[] = [\n {\n id: \"plausible\",\n label: \"Plausible\",\n env: [\n {\n key: \"PUBLIC_PLAUSIBLE_DOMAIN\",\n public: true,\n label: \"Plausible site domain\",\n placeholder: \"example.com\",\n },\n ],\n },\n {\n id: \"google\",\n label: \"Google Analytics\",\n env: [\n {\n key: \"PUBLIC_GA_MEASUREMENT_ID\",\n public: true,\n label: \"Google Analytics measurement ID\",\n placeholder: \"G-XXXXXXXXXX\",\n },\n ],\n },\n {\n id: \"posthog\",\n label: \"PostHog\",\n env: [\n {\n key: \"PUBLIC_POSTHOG_KEY\",\n public: true,\n label: \"PostHog project API key\",\n placeholder: \"phc_...\",\n },\n {\n key: \"PUBLIC_POSTHOG_HOST\",\n public: true,\n label: \"PostHog host\",\n default: \"https://us.i.posthog.com\",\n },\n ],\n },\n];\n\nconst PACKAGES: Record<string, Package[]> = {\n posthog: [\"posthog-js\"],\n};\n\n/** What `resolveProvider` needs; `index.ts` spreads the rest of the metadata. */\nexport const META = { slug: \"enable-analytics\", providers: PROVIDERS };\n\n/** The `.env` lines for a provider, under a `# <Label> analytics` heading. */\nexport function envEditsFor(\n provider: Provider,\n supplied: Record<string, string> = {},\n): EnvEdit[] {\n return providerEnvEdits(provider, `${provider.label} analytics`, supplied);\n}\n\nconst providersRaw = import.meta.glob<string>(\"./providers/**\", {\n query: \"?raw\",\n import: \"default\",\n eager: true,\n});\n\nexport async function generate(options: Options) {\n const provider = resolveProvider(META, options);\n\n return {\n creates: providerCreates(providersRaw, provider.id),\n modifies: [],\n deletes: [],\n components: [],\n packages: PACKAGES[provider.id] ?? [],\n collections: [],\n collectionPatches: [],\n collectionDrops: [],\n } satisfies Result;\n}\n"],"mappings":";;A,msGAkBaW,IAAwB;CACnC;EACE,IAAI;EACJ,OAAO;EACP,KAAK,CACH;GACE,KAAK;GACL,QAAQ;GACR,OAAO;GACP,aAAa;EACf,CACF;CACF;CACA;EACE,IAAI;EACJ,OAAO;EACP,KAAK,CACH;GACE,KAAK;GACL,QAAQ;GACR,OAAO;GACP,aAAa;EACf,CACF;CACF;CACA;EACE,IAAI;EACJ,OAAO;EACP,KAAK,CACH;GACE,KAAK;GACL,QAAQ;GACR,OAAO;GACP,aAAa;EACf,GACA;GACE,KAAK;GACL,QAAQ;GACR,OAAO;GACP,SAAS;EACX,CACF;CACF;AACF,GAEMC,IAAsC,EAC1C,SAAS,CAAC,YAAY,EACxB,GAGaC,IAAO;CAAE,MAAM;CAAoB,WAAWF;AAAU;AAGrE,SAAgBG,EACd,GACA,IAAmC,CAAC,GACzB;CACX,OAAOT,EAAiBU,GAAU,GAAGA,EAAS,MAAM,aAAaC,CAAQ;AAC3E;AAEA,IAAMC,IAAe,uBAAA,OAAA;CAAA,oEAAAjB;CAAA,2DAAAC;CAAA,uEAAAC;CAAA,qEAAAC;AAIpB,CAAA;AAED,eAAsBe,EAAS,GAAkB;CAC/C,IAAMH,IAAWX,EAAgBS,GAAMM,CAAO;CAE9C,OAAO;EACL,SAASb,EAAgBW,GAAcF,EAAS,EAAE;EAClD,UAAU,CAAC;EACX,SAAS,CAAC;EACV,YAAY,CAAC;EACb,UAAUH,EAASG,EAAS,OAAO,CAAC;EACpC,aAAa,CAAC;EACd,mBAAmB,CAAC;EACpB,iBAAiB,CAAC;CACpB;AACF"}
1
+ {"version":3,"file":"generate-CKuUg3p-.js","names":["__import_glob__0_0_","__import_glob__0_1_","__import_glob__0_2_","__import_glob__0_3_","resolveProvider","providerEnvEdits","providerCreates","analytics_default$2","gtag_default","analytics_default$1","analytics_default","PROVIDERS","PACKAGES","META","envEditsFor","provider","supplied","providersRaw","generate","options"],"sources":["../../src/patterns/enable/analytics/generate.ts"],"sourcesContent":["import type { Options, Package, Provider, Result } from \"../../../core/types\";\nimport type { EnvEdit } from \"../../../runtime/env\";\nimport {\n providerCreates,\n providerEnvEdits,\n resolveProvider,\n} from \"../../../core/providers\";\n\n/** Every provider ships the same component, so the root layout mounts one path. */\nexport const COMPONENT_PATH = \"src/lib/components/analytics/analytics.svelte\";\n\n/**\n * The providers in prompt order. Each one's `env` keys are what the CLI asks\n * for, what `generate.runtime.ts` writes to `.env` and declares in\n * `src/env.ts` (`public: true`, since the browser reads them); the generated\n * component imports them from `$app/env/public` and stays inert while they\n * are blank.\n */\nexport const PROVIDERS: Provider[] = [\n {\n id: \"plausible\",\n label: \"Plausible\",\n env: [\n {\n key: \"PUBLIC_PLAUSIBLE_DOMAIN\",\n public: true,\n label: \"Plausible site domain\",\n placeholder: \"example.com\",\n },\n ],\n },\n {\n id: \"google\",\n label: \"Google Analytics\",\n env: [\n {\n key: \"PUBLIC_GA_MEASUREMENT_ID\",\n public: true,\n label: \"Google Analytics measurement ID\",\n placeholder: \"G-XXXXXXXXXX\",\n },\n ],\n },\n {\n id: \"posthog\",\n label: \"PostHog\",\n env: [\n {\n key: \"PUBLIC_POSTHOG_KEY\",\n public: true,\n label: \"PostHog project API key\",\n placeholder: \"phc_...\",\n },\n {\n key: \"PUBLIC_POSTHOG_HOST\",\n public: true,\n label: \"PostHog host\",\n default: \"https://us.i.posthog.com\",\n },\n ],\n },\n];\n\nconst PACKAGES: Record<string, Package[]> = {\n posthog: [\"posthog-js\"],\n};\n\n/** What `resolveProvider` needs; `index.ts` spreads the rest of the metadata. */\nexport const META = { slug: \"enable-analytics\", providers: PROVIDERS };\n\n/** The `.env` lines for a provider, under a `# <Label> analytics` heading. */\nexport function envEditsFor(\n provider: Provider,\n supplied: Record<string, string> = {},\n): EnvEdit[] {\n return providerEnvEdits(provider, `${provider.label} analytics`, supplied);\n}\n\nconst providersRaw = import.meta.glob<string>(\"./providers/**\", {\n query: \"?raw\",\n import: \"default\",\n eager: true,\n});\n\nexport async function generate(options: Options) {\n const provider = resolveProvider(META, options);\n\n return {\n creates: providerCreates(providersRaw, provider.id),\n modifies: [],\n deletes: [],\n components: [],\n packages: PACKAGES[provider.id] ?? [],\n collections: [],\n collectionPatches: [],\n collectionDrops: [],\n } satisfies Result;\n}\n"],"mappings":";;A,msGAkBaW,IAAwB;CACnC;EACE,IAAI;EACJ,OAAO;EACP,KAAK,CACH;GACE,KAAK;GACL,QAAQ;GACR,OAAO;GACP,aAAa;EACf,CACF;CACF;CACA;EACE,IAAI;EACJ,OAAO;EACP,KAAK,CACH;GACE,KAAK;GACL,QAAQ;GACR,OAAO;GACP,aAAa;EACf,CACF;CACF;CACA;EACE,IAAI;EACJ,OAAO;EACP,KAAK,CACH;GACE,KAAK;GACL,QAAQ;GACR,OAAO;GACP,aAAa;EACf,GACA;GACE,KAAK;GACL,QAAQ;GACR,OAAO;GACP,SAAS;EACX,CACF;CACF;AACF,GAEMC,IAAsC,EAC1C,SAAS,CAAC,YAAY,EACxB,GAGaC,IAAO;CAAE,MAAM;CAAoB,WAAWF;AAAU;AAGrE,SAAgBG,EACd,GACA,IAAmC,CAAC,GACzB;CACX,OAAOT,EAAiBU,GAAU,GAAGA,EAAS,MAAM,aAAaC,CAAQ;AAC3E;AAEA,IAAMC,IAAe,uBAAA,OAAA;CAAA,oEAAAjB;CAAA,2DAAAC;CAAA,uEAAAC;CAAA,qEAAAC;AAIpB,CAAA;AAED,eAAsBe,EAAS,GAAkB;CAC/C,IAAMH,IAAWX,EAAgBS,GAAMM,CAAO;CAE9C,OAAO;EACL,SAASb,EAAgBW,GAAcF,EAAS,EAAE;EAClD,UAAU,CAAC;EACX,SAAS,CAAC;EACV,YAAY,CAAC;EACb,UAAUH,EAASG,EAAS,OAAO,CAAC;EACpC,aAAa,CAAC;EACd,mBAAmB,CAAC;EACpB,iBAAiB,CAAC;CACpB;AACF"}