@mmailaender/convex-creem 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +1176 -0
  3. package/dist/client/helpers.d.ts +17 -0
  4. package/dist/client/helpers.d.ts.map +1 -0
  5. package/dist/client/helpers.js +43 -0
  6. package/dist/client/helpers.js.map +1 -0
  7. package/dist/client/index.d.ts +1041 -0
  8. package/dist/client/index.d.ts.map +1 -0
  9. package/dist/client/index.js +1068 -0
  10. package/dist/client/index.js.map +1 -0
  11. package/dist/client/parsers.d.ts +45 -0
  12. package/dist/client/parsers.d.ts.map +1 -0
  13. package/dist/client/parsers.js +138 -0
  14. package/dist/client/parsers.js.map +1 -0
  15. package/dist/client/polyfill.d.ts +2 -0
  16. package/dist/client/polyfill.d.ts.map +1 -0
  17. package/dist/client/polyfill.js +3 -0
  18. package/dist/client/polyfill.js.map +1 -0
  19. package/dist/component/_generated/api.d.ts +36 -0
  20. package/dist/component/_generated/api.d.ts.map +1 -0
  21. package/dist/component/_generated/api.js +31 -0
  22. package/dist/component/_generated/api.js.map +1 -0
  23. package/dist/component/_generated/component.d.ts +542 -0
  24. package/dist/component/_generated/component.d.ts.map +1 -0
  25. package/dist/component/_generated/component.js +11 -0
  26. package/dist/component/_generated/component.js.map +1 -0
  27. package/dist/component/_generated/dataModel.d.ts +46 -0
  28. package/dist/component/_generated/dataModel.d.ts.map +1 -0
  29. package/dist/component/_generated/dataModel.js +11 -0
  30. package/dist/component/_generated/dataModel.js.map +1 -0
  31. package/dist/component/_generated/server.d.ts +121 -0
  32. package/dist/component/_generated/server.d.ts.map +1 -0
  33. package/dist/component/_generated/server.js +78 -0
  34. package/dist/component/_generated/server.js.map +1 -0
  35. package/dist/component/convex.config.d.ts +3 -0
  36. package/dist/component/convex.config.d.ts.map +1 -0
  37. package/dist/component/convex.config.js +3 -0
  38. package/dist/component/convex.config.js.map +1 -0
  39. package/dist/component/lib.d.ts +1005 -0
  40. package/dist/component/lib.d.ts.map +1 -0
  41. package/dist/component/lib.js +647 -0
  42. package/dist/component/lib.js.map +1 -0
  43. package/dist/component/schema.d.ts +191 -0
  44. package/dist/component/schema.d.ts.map +1 -0
  45. package/dist/component/schema.js +104 -0
  46. package/dist/component/schema.js.map +1 -0
  47. package/dist/component/util.d.ts +61 -0
  48. package/dist/component/util.d.ts.map +1 -0
  49. package/dist/component/util.js +142 -0
  50. package/dist/component/util.js.map +1 -0
  51. package/dist/core/catalog.d.ts +18 -0
  52. package/dist/core/catalog.d.ts.map +1 -0
  53. package/dist/core/catalog.js +82 -0
  54. package/dist/core/catalog.js.map +1 -0
  55. package/dist/core/index.d.ts +9 -0
  56. package/dist/core/index.d.ts.map +1 -0
  57. package/dist/core/index.js +9 -0
  58. package/dist/core/index.js.map +1 -0
  59. package/dist/core/markdown.d.ts +12 -0
  60. package/dist/core/markdown.d.ts.map +1 -0
  61. package/dist/core/markdown.js +26 -0
  62. package/dist/core/markdown.js.map +1 -0
  63. package/dist/core/payments.d.ts +11 -0
  64. package/dist/core/payments.d.ts.map +1 -0
  65. package/dist/core/payments.js +27 -0
  66. package/dist/core/payments.js.map +1 -0
  67. package/dist/core/pendingCheckout.d.ts +15 -0
  68. package/dist/core/pendingCheckout.d.ts.map +1 -0
  69. package/dist/core/pendingCheckout.js +40 -0
  70. package/dist/core/pendingCheckout.js.map +1 -0
  71. package/dist/core/resolver.d.ts +11 -0
  72. package/dist/core/resolver.d.ts.map +1 -0
  73. package/dist/core/resolver.js +106 -0
  74. package/dist/core/resolver.js.map +1 -0
  75. package/dist/core/selectors.d.ts +12 -0
  76. package/dist/core/selectors.d.ts.map +1 -0
  77. package/dist/core/selectors.js +18 -0
  78. package/dist/core/selectors.js.map +1 -0
  79. package/dist/core/subscriptionUpdate.d.ts +20 -0
  80. package/dist/core/subscriptionUpdate.d.ts.map +1 -0
  81. package/dist/core/subscriptionUpdate.js +64 -0
  82. package/dist/core/subscriptionUpdate.js.map +1 -0
  83. package/dist/core/types.d.ts +170 -0
  84. package/dist/core/types.d.ts.map +1 -0
  85. package/dist/core/types.js +15 -0
  86. package/dist/core/types.js.map +1 -0
  87. package/dist/design-system/colors/color-utils.d.ts +10 -0
  88. package/dist/design-system/colors/color-utils.d.ts.map +1 -0
  89. package/dist/design-system/colors/color-utils.js +91 -0
  90. package/dist/design-system/colors/color-utils.js.map +1 -0
  91. package/dist/design-system/colors/config.d.ts +33 -0
  92. package/dist/design-system/colors/config.d.ts.map +1 -0
  93. package/dist/design-system/colors/config.js +224 -0
  94. package/dist/design-system/colors/config.js.map +1 -0
  95. package/dist/design-system/colors/index.d.ts +3 -0
  96. package/dist/design-system/colors/index.d.ts.map +1 -0
  97. package/dist/design-system/colors/index.js +3 -0
  98. package/dist/design-system/colors/index.js.map +1 -0
  99. package/dist/design-system/rounded/config.d.ts +31 -0
  100. package/dist/design-system/rounded/config.d.ts.map +1 -0
  101. package/dist/design-system/rounded/config.js +76 -0
  102. package/dist/design-system/rounded/config.js.map +1 -0
  103. package/dist/design-system/rounded/index.d.ts +2 -0
  104. package/dist/design-system/rounded/index.d.ts.map +1 -0
  105. package/dist/design-system/rounded/index.js +2 -0
  106. package/dist/design-system/rounded/index.js.map +1 -0
  107. package/dist/design-system/typography/config.d.ts +55 -0
  108. package/dist/design-system/typography/config.d.ts.map +1 -0
  109. package/dist/design-system/typography/config.js +308 -0
  110. package/dist/design-system/typography/config.js.map +1 -0
  111. package/dist/design-system/typography/index.d.ts +3 -0
  112. package/dist/design-system/typography/index.d.ts.map +1 -0
  113. package/dist/design-system/typography/index.js +3 -0
  114. package/dist/design-system/typography/index.js.map +1 -0
  115. package/dist/design-system/typography/tokens.d.ts +23 -0
  116. package/dist/design-system/typography/tokens.d.ts.map +1 -0
  117. package/dist/design-system/typography/tokens.js +99 -0
  118. package/dist/design-system/typography/tokens.js.map +1 -0
  119. package/dist/react/hooks/useCheckoutSuccessParams.d.ts +2 -0
  120. package/dist/react/hooks/useCheckoutSuccessParams.d.ts.map +1 -0
  121. package/dist/react/hooks/useCheckoutSuccessParams.js +5 -0
  122. package/dist/react/hooks/useCheckoutSuccessParams.js.map +1 -0
  123. package/dist/react/index.d.ts +25 -0
  124. package/dist/react/index.d.ts.map +1 -0
  125. package/dist/react/index.js +22 -0
  126. package/dist/react/index.js.map +1 -0
  127. package/dist/react/primitives/BillingGate.d.ts +8 -0
  128. package/dist/react/primitives/BillingGate.d.ts.map +1 -0
  129. package/dist/react/primitives/BillingGate.js +13 -0
  130. package/dist/react/primitives/BillingGate.js.map +1 -0
  131. package/dist/react/primitives/BillingToggle.d.ts +8 -0
  132. package/dist/react/primitives/BillingToggle.d.ts.map +1 -0
  133. package/dist/react/primitives/BillingToggle.js +12 -0
  134. package/dist/react/primitives/BillingToggle.js.map +1 -0
  135. package/dist/react/primitives/CheckoutButton.d.ts +11 -0
  136. package/dist/react/primitives/CheckoutButton.d.ts.map +1 -0
  137. package/dist/react/primitives/CheckoutButton.js +21 -0
  138. package/dist/react/primitives/CheckoutButton.js.map +1 -0
  139. package/dist/react/primitives/CheckoutSuccessSummary.d.ts +7 -0
  140. package/dist/react/primitives/CheckoutSuccessSummary.d.ts.map +1 -0
  141. package/dist/react/primitives/CheckoutSuccessSummary.js +11 -0
  142. package/dist/react/primitives/CheckoutSuccessSummary.js.map +1 -0
  143. package/dist/react/primitives/CustomerPortalButton.d.ts +8 -0
  144. package/dist/react/primitives/CustomerPortalButton.d.ts.map +1 -0
  145. package/dist/react/primitives/CustomerPortalButton.js +21 -0
  146. package/dist/react/primitives/CustomerPortalButton.js.map +1 -0
  147. package/dist/react/primitives/NumberInput.d.ts +11 -0
  148. package/dist/react/primitives/NumberInput.d.ts.map +1 -0
  149. package/dist/react/primitives/NumberInput.js +18 -0
  150. package/dist/react/primitives/NumberInput.js.map +1 -0
  151. package/dist/react/primitives/OneTimeCheckoutButton.d.ts +11 -0
  152. package/dist/react/primitives/OneTimeCheckoutButton.d.ts.map +1 -0
  153. package/dist/react/primitives/OneTimeCheckoutButton.js +4 -0
  154. package/dist/react/primitives/OneTimeCheckoutButton.js.map +1 -0
  155. package/dist/react/primitives/OneTimePaymentStatusBadge.d.ts +6 -0
  156. package/dist/react/primitives/OneTimePaymentStatusBadge.d.ts.map +1 -0
  157. package/dist/react/primitives/OneTimePaymentStatusBadge.js +11 -0
  158. package/dist/react/primitives/OneTimePaymentStatusBadge.js.map +1 -0
  159. package/dist/react/primitives/PaymentWarningBanner.d.ts +7 -0
  160. package/dist/react/primitives/PaymentWarningBanner.d.ts.map +1 -0
  161. package/dist/react/primitives/PaymentWarningBanner.js +18 -0
  162. package/dist/react/primitives/PaymentWarningBanner.js.map +1 -0
  163. package/dist/react/primitives/PricingCard.d.ts +37 -0
  164. package/dist/react/primitives/PricingCard.d.ts.map +1 -0
  165. package/dist/react/primitives/PricingCard.js +125 -0
  166. package/dist/react/primitives/PricingCard.js.map +1 -0
  167. package/dist/react/primitives/PricingSection.d.ts +39 -0
  168. package/dist/react/primitives/PricingSection.d.ts.map +1 -0
  169. package/dist/react/primitives/PricingSection.js +24 -0
  170. package/dist/react/primitives/PricingSection.js.map +1 -0
  171. package/dist/react/primitives/ScheduledChangeBanner.d.ts +8 -0
  172. package/dist/react/primitives/ScheduledChangeBanner.d.ts.map +1 -0
  173. package/dist/react/primitives/ScheduledChangeBanner.js +13 -0
  174. package/dist/react/primitives/ScheduledChangeBanner.js.map +1 -0
  175. package/dist/react/primitives/SegmentControl.d.ts +11 -0
  176. package/dist/react/primitives/SegmentControl.d.ts.map +1 -0
  177. package/dist/react/primitives/SegmentControl.js +8 -0
  178. package/dist/react/primitives/SegmentControl.js.map +1 -0
  179. package/dist/react/primitives/SegmentGroup.d.ts +14 -0
  180. package/dist/react/primitives/SegmentGroup.d.ts.map +1 -0
  181. package/dist/react/primitives/SegmentGroup.js +11 -0
  182. package/dist/react/primitives/SegmentGroup.js.map +1 -0
  183. package/dist/react/primitives/TrialLimitBanner.d.ts +7 -0
  184. package/dist/react/primitives/TrialLimitBanner.d.ts.map +1 -0
  185. package/dist/react/primitives/TrialLimitBanner.js +14 -0
  186. package/dist/react/primitives/TrialLimitBanner.js.map +1 -0
  187. package/dist/react/shared.d.ts +28 -0
  188. package/dist/react/shared.d.ts.map +1 -0
  189. package/dist/react/shared.js +109 -0
  190. package/dist/react/shared.js.map +1 -0
  191. package/dist/react/widgets/BillingPortal.d.ts +9 -0
  192. package/dist/react/widgets/BillingPortal.d.ts.map +1 -0
  193. package/dist/react/widgets/BillingPortal.js +30 -0
  194. package/dist/react/widgets/BillingPortal.js.map +1 -0
  195. package/dist/react/widgets/ProductItem.d.ts +8 -0
  196. package/dist/react/widgets/ProductItem.d.ts.map +1 -0
  197. package/dist/react/widgets/ProductItem.js +14 -0
  198. package/dist/react/widgets/ProductItem.js.map +1 -0
  199. package/dist/react/widgets/ProductRoot.d.ts +16 -0
  200. package/dist/react/widgets/ProductRoot.d.ts.map +1 -0
  201. package/dist/react/widgets/ProductRoot.js +171 -0
  202. package/dist/react/widgets/ProductRoot.js.map +1 -0
  203. package/dist/react/widgets/SubscriptionItem.d.ts +27 -0
  204. package/dist/react/widgets/SubscriptionItem.d.ts.map +1 -0
  205. package/dist/react/widgets/SubscriptionItem.js +32 -0
  206. package/dist/react/widgets/SubscriptionItem.js.map +1 -0
  207. package/dist/react/widgets/SubscriptionRoot.d.ts +16 -0
  208. package/dist/react/widgets/SubscriptionRoot.d.ts.map +1 -0
  209. package/dist/react/widgets/SubscriptionRoot.js +405 -0
  210. package/dist/react/widgets/SubscriptionRoot.js.map +1 -0
  211. package/dist/react/widgets/index.d.ts +19 -0
  212. package/dist/react/widgets/index.d.ts.map +1 -0
  213. package/dist/react/widgets/index.js +16 -0
  214. package/dist/react/widgets/index.js.map +1 -0
  215. package/dist/react/widgets/productGroupContext.d.ts +6 -0
  216. package/dist/react/widgets/productGroupContext.d.ts.map +1 -0
  217. package/dist/react/widgets/productGroupContext.js +3 -0
  218. package/dist/react/widgets/productGroupContext.js.map +1 -0
  219. package/dist/react/widgets/subscriptionContext.d.ts +6 -0
  220. package/dist/react/widgets/subscriptionContext.d.ts.map +1 -0
  221. package/dist/react/widgets/subscriptionContext.js +3 -0
  222. package/dist/react/widgets/subscriptionContext.js.map +1 -0
  223. package/dist/react/widgets/types.d.ts +171 -0
  224. package/dist/react/widgets/types.d.ts.map +1 -0
  225. package/dist/react/widgets/types.js +2 -0
  226. package/dist/react/widgets/types.js.map +1 -0
  227. package/dist/svelte/index.d.ts +22 -0
  228. package/dist/svelte/index.d.ts.map +1 -0
  229. package/dist/svelte/index.js +20 -0
  230. package/dist/svelte/index.js.map +1 -0
  231. package/dist/svelte/primitives/BillingGate.svelte +28 -0
  232. package/dist/svelte/primitives/BillingToggle.svelte +27 -0
  233. package/dist/svelte/primitives/CheckoutButton.svelte +60 -0
  234. package/dist/svelte/primitives/CheckoutSuccessSummary.svelte +34 -0
  235. package/dist/svelte/primitives/CustomerPortalButton.svelte +60 -0
  236. package/dist/svelte/primitives/NumberInput.svelte +71 -0
  237. package/dist/svelte/primitives/OneTimeCheckoutButton.svelte +37 -0
  238. package/dist/svelte/primitives/OneTimePaymentStatusBadge.svelte +20 -0
  239. package/dist/svelte/primitives/PaymentWarningBanner.svelte +30 -0
  240. package/dist/svelte/primitives/PricingCard.svelte +356 -0
  241. package/dist/svelte/primitives/PricingSection.svelte +121 -0
  242. package/dist/svelte/primitives/ScheduledChangeBanner.svelte +46 -0
  243. package/dist/svelte/primitives/SegmentControl.svelte +38 -0
  244. package/dist/svelte/primitives/SegmentGroup.svelte +52 -0
  245. package/dist/svelte/primitives/TrialLimitBanner.svelte +32 -0
  246. package/dist/svelte/primitives/shared.d.ts +13 -0
  247. package/dist/svelte/primitives/shared.d.ts.map +1 -0
  248. package/dist/svelte/primitives/shared.js +87 -0
  249. package/dist/svelte/primitives/shared.js.map +1 -0
  250. package/dist/svelte/widgets/BillingPortal.svelte +55 -0
  251. package/dist/svelte/widgets/Product.svelte +35 -0
  252. package/dist/svelte/widgets/ProductRoot.svelte +428 -0
  253. package/dist/svelte/widgets/Subscription.svelte +52 -0
  254. package/dist/svelte/widgets/SubscriptionRoot.svelte +690 -0
  255. package/dist/svelte/widgets/index.d.ts +19 -0
  256. package/dist/svelte/widgets/index.d.ts.map +1 -0
  257. package/dist/svelte/widgets/index.js +16 -0
  258. package/dist/svelte/widgets/index.js.map +1 -0
  259. package/dist/svelte/widgets/productGroupContext.d.ts +6 -0
  260. package/dist/svelte/widgets/productGroupContext.d.ts.map +1 -0
  261. package/dist/svelte/widgets/productGroupContext.js +2 -0
  262. package/dist/svelte/widgets/productGroupContext.js.map +1 -0
  263. package/dist/svelte/widgets/subscriptionContext.d.ts +6 -0
  264. package/dist/svelte/widgets/subscriptionContext.d.ts.map +1 -0
  265. package/dist/svelte/widgets/subscriptionContext.js +2 -0
  266. package/dist/svelte/widgets/subscriptionContext.js.map +1 -0
  267. package/dist/svelte/widgets/types.d.ts +171 -0
  268. package/dist/svelte/widgets/types.d.ts.map +1 -0
  269. package/dist/svelte/widgets/types.js +2 -0
  270. package/dist/svelte/widgets/types.js.map +1 -0
  271. package/package.json +182 -0
  272. package/src/client/helpers.test.ts +139 -0
  273. package/src/client/helpers.ts +51 -0
  274. package/src/client/index.test.ts +1554 -0
  275. package/src/client/index.ts +1504 -0
  276. package/src/client/parsers.test.ts +1017 -0
  277. package/src/client/parsers.ts +182 -0
  278. package/src/client/polyfill.ts +2 -0
  279. package/src/component/_generated/api.ts +52 -0
  280. package/src/component/_generated/component.ts +619 -0
  281. package/src/component/_generated/dataModel.ts +60 -0
  282. package/src/component/_generated/server.ts +156 -0
  283. package/src/component/convex.config.ts +3 -0
  284. package/src/component/lib.test.ts +1359 -0
  285. package/src/component/lib.ts +726 -0
  286. package/src/component/schema.ts +112 -0
  287. package/src/component/util.test.ts +281 -0
  288. package/src/component/util.ts +228 -0
  289. package/src/core/catalog.test.ts +212 -0
  290. package/src/core/catalog.ts +119 -0
  291. package/src/core/index.ts +8 -0
  292. package/src/core/markdown.test.ts +43 -0
  293. package/src/core/markdown.ts +26 -0
  294. package/src/core/payments.test.ts +69 -0
  295. package/src/core/payments.ts +33 -0
  296. package/src/core/pendingCheckout.test.ts +44 -0
  297. package/src/core/pendingCheckout.ts +40 -0
  298. package/src/core/resolver.test.ts +283 -0
  299. package/src/core/resolver.ts +160 -0
  300. package/src/core/selectors.test.ts +119 -0
  301. package/src/core/selectors.ts +35 -0
  302. package/src/core/subscriptionUpdate.test.ts +164 -0
  303. package/src/core/subscriptionUpdate.ts +102 -0
  304. package/src/core/types.ts +220 -0
  305. package/src/design-system/README.md +40 -0
  306. package/src/design-system/base.css +27 -0
  307. package/src/design-system/colors/color-utils.ts +110 -0
  308. package/src/design-system/colors/config.ts +282 -0
  309. package/src/design-system/colors/index.ts +2 -0
  310. package/src/design-system/colors/utilities.css +2328 -0
  311. package/src/design-system/components/badges.css +65 -0
  312. package/src/design-system/components/buttons.css +256 -0
  313. package/src/design-system/components/dialog.css +218 -0
  314. package/src/design-system/components/icon-buttons.css +115 -0
  315. package/src/design-system/components/inputs.css +94 -0
  316. package/src/design-system/components/links.css +53 -0
  317. package/src/design-system/components/prose.css +67 -0
  318. package/src/design-system/components/segment-control.css +303 -0
  319. package/src/design-system/index.css +21 -0
  320. package/src/design-system/rounded/config.ts +91 -0
  321. package/src/design-system/rounded/index.ts +1 -0
  322. package/src/design-system/rounded/utilities.css +37 -0
  323. package/src/design-system/typography/config.ts +340 -0
  324. package/src/design-system/typography/index.ts +2 -0
  325. package/src/design-system/typography/tokens.ts +148 -0
  326. package/src/design-system/typography/utilities.css +728 -0
  327. package/src/library.css +20 -0
  328. package/src/react/hooks/useCheckoutSuccessParams.ts +7 -0
  329. package/src/react/index.tsx +47 -0
  330. package/src/react/primitives/BillingGate.tsx +26 -0
  331. package/src/react/primitives/BillingToggle.tsx +29 -0
  332. package/src/react/primitives/CheckoutButton.tsx +47 -0
  333. package/src/react/primitives/CheckoutSuccessSummary.tsx +36 -0
  334. package/src/react/primitives/CustomerPortalButton.tsx +50 -0
  335. package/src/react/primitives/NumberInput.tsx +83 -0
  336. package/src/react/primitives/OneTimeCheckoutButton.tsx +27 -0
  337. package/src/react/primitives/OneTimePaymentStatusBadge.tsx +18 -0
  338. package/src/react/primitives/PaymentWarningBanner.tsx +33 -0
  339. package/src/react/primitives/PricingCard.tsx +421 -0
  340. package/src/react/primitives/PricingSection.tsx +129 -0
  341. package/src/react/primitives/ScheduledChangeBanner.tsx +52 -0
  342. package/src/react/primitives/SegmentControl.tsx +32 -0
  343. package/src/react/primitives/SegmentGroup.tsx +53 -0
  344. package/src/react/primitives/TrialLimitBanner.tsx +32 -0
  345. package/src/react/shared.ts +138 -0
  346. package/src/react/widgets/BillingPortal.tsx +56 -0
  347. package/src/react/widgets/ProductItem.tsx +26 -0
  348. package/src/react/widgets/ProductRoot.tsx +441 -0
  349. package/src/react/widgets/SubscriptionItem.tsx +71 -0
  350. package/src/react/widgets/SubscriptionRoot.tsx +759 -0
  351. package/src/react/widgets/index.ts +36 -0
  352. package/src/react/widgets/productGroupContext.ts +10 -0
  353. package/src/react/widgets/subscriptionContext.ts +10 -0
  354. package/src/react/widgets/types.ts +179 -0
  355. package/src/svelte/index.ts +43 -0
  356. package/src/svelte/primitives/BillingGate.svelte +28 -0
  357. package/src/svelte/primitives/BillingToggle.svelte +27 -0
  358. package/src/svelte/primitives/CheckoutButton.svelte +60 -0
  359. package/src/svelte/primitives/CheckoutSuccessSummary.svelte +34 -0
  360. package/src/svelte/primitives/CustomerPortalButton.svelte +60 -0
  361. package/src/svelte/primitives/NumberInput.svelte +71 -0
  362. package/src/svelte/primitives/OneTimeCheckoutButton.svelte +37 -0
  363. package/src/svelte/primitives/OneTimePaymentStatusBadge.svelte +20 -0
  364. package/src/svelte/primitives/PaymentWarningBanner.svelte +30 -0
  365. package/src/svelte/primitives/PricingCard.svelte +356 -0
  366. package/src/svelte/primitives/PricingSection.svelte +121 -0
  367. package/src/svelte/primitives/ScheduledChangeBanner.svelte +46 -0
  368. package/src/svelte/primitives/SegmentControl.svelte +38 -0
  369. package/src/svelte/primitives/SegmentGroup.svelte +52 -0
  370. package/src/svelte/primitives/TrialLimitBanner.svelte +32 -0
  371. package/src/svelte/primitives/shared.ts +113 -0
  372. package/src/svelte/svelte.d.ts +6 -0
  373. package/src/svelte/widgets/BillingPortal.svelte +55 -0
  374. package/src/svelte/widgets/Product.svelte +35 -0
  375. package/src/svelte/widgets/ProductRoot.svelte +428 -0
  376. package/src/svelte/widgets/Subscription.svelte +52 -0
  377. package/src/svelte/widgets/SubscriptionRoot.svelte +690 -0
  378. package/src/svelte/widgets/index.ts +36 -0
  379. package/src/svelte/widgets/productGroupContext.ts +7 -0
  380. package/src/svelte/widgets/subscriptionContext.ts +7 -0
  381. package/src/svelte/widgets/types.ts +179 -0
  382. package/src/tailwind.css +6 -0
  383. package/src/test.ts +18 -0
@@ -0,0 +1,170 @@
1
+ /** Category of a billing plan. Determines default UI behavior and available actions. */
2
+ export type PlanCategory = "free" | "trial" | "paid" | "enterprise" | "custom";
3
+ /** Billing model type. `"recurring"` for subscriptions, `"onetime"` for single purchases. */
4
+ export type BillingType = "recurring" | "onetime" | "custom";
5
+ /** Billing cycles supported by the Creem API. */
6
+ export type SupportedRecurringCycle = "every-month" | "every-three-months" | "every-six-months" | "every-year";
7
+ /** Billing cycle including a `"custom"` fallback for unrecognized intervals. */
8
+ export type RecurringCycle = SupportedRecurringCycle | "custom";
9
+ /** Status of a one-time payment order. */
10
+ export type OneTimePaymentStatus = "pending" | "paid" | "refunded" | "partially_refunded";
11
+ /**
12
+ * Actions the current billing entity is allowed to perform.
13
+ * Resolved by `resolveBillingSnapshot` based on subscription state.
14
+ * Use with `<BillingGate requiredActions="...">` for conditional UI rendering.
15
+ */
16
+ export type AvailableAction = "checkout" | "portal" | "cancel" | "reactivate" | "switch_interval" | "update_seats" | "contact_sales";
17
+ /** A single plan definition in the billing catalog. */
18
+ export type PlanCatalogEntry = {
19
+ /** Unique plan identifier (e.g. `"basic"`, `"premium"`). */
20
+ planId: string;
21
+ /** Plan category — drives default UI behavior and action resolution. */
22
+ category: PlanCategory;
23
+ /** Billing model. Defaults to `"recurring"` if omitted. */
24
+ billingType?: BillingType;
25
+ /** Supported billing cycles for this plan (e.g. `["every-month", "every-year"]`). */
26
+ billingCycles?: RecurringCycle[];
27
+ /** Pricing model — `"seat"` enables per-seat controls in widgets. */
28
+ pricingModel?: "flat" | "seat";
29
+ /** Map of billing cycle → Creem product ID (e.g. `{ "every-month": "prod_xxx" }`). */
30
+ creemProductIds?: Record<string, string>;
31
+ /** "Contact sales" URL for enterprise plans. */
32
+ contactUrl?: string;
33
+ /** Highlight this plan as recommended in the UI. */
34
+ recommended?: boolean;
35
+ /** Arbitrary metadata for custom logic. */
36
+ metadata?: Record<string, unknown>;
37
+ };
38
+ /** Plan catalog entry enriched with resolved UI display fields from Creem product data. */
39
+ export type UIPlanEntry = PlanCatalogEntry & {
40
+ /** Display title (auto-resolved from Creem product name if omitted). */
41
+ title?: string;
42
+ /** Display description (auto-resolved from Creem product description, rendered as Markdown). */
43
+ description?: string;
44
+ };
45
+ /** Static plan catalog configuration. Defines available plans and their Creem product mappings. */
46
+ export type PlanCatalog = {
47
+ /** Catalog version string (included in `BillingSnapshot.catalogVersion`). */
48
+ version: string;
49
+ /** Ordered list of plan definitions. */
50
+ plans: PlanCatalogEntry[];
51
+ /** Plan ID to use when no subscription is active (e.g. `"free"`). */
52
+ defaultPlanId?: string;
53
+ };
54
+ /** Lightweight subscription state used by the billing resolver. */
55
+ export type SubscriptionSnapshot = {
56
+ /** Creem subscription ID. */
57
+ id?: string;
58
+ /** Creem product ID of the subscribed plan. */
59
+ productId?: string;
60
+ /** Subscription status (e.g. `"active"`, `"trialing"`, `"canceled"`, `"paused"`, `"scheduled_cancel"`). */
61
+ status?: string;
62
+ /** Billing interval (e.g. `"every-month"`, `"every-year"`). */
63
+ recurringInterval?: string | null;
64
+ /** Number of seats (for seat-based pricing). */
65
+ seats?: number | null;
66
+ /** Whether the subscription is set to cancel at the end of the current period. */
67
+ cancelAtPeriodEnd?: boolean;
68
+ /** ISO timestamp of the current period end. */
69
+ currentPeriodEnd?: string | null;
70
+ /** ISO timestamp when the trial expires. */
71
+ trialEnd?: string | null;
72
+ };
73
+ /** Snapshot of a one-time payment, parsed from checkout success query params. */
74
+ export type PaymentSnapshot = {
75
+ /** Payment status. */
76
+ status: OneTimePaymentStatus;
77
+ /** Creem checkout ID. */
78
+ checkoutId?: string;
79
+ /** Creem order ID. */
80
+ orderId?: string;
81
+ /** Creem customer ID. */
82
+ customerId?: string;
83
+ /** Creem product ID. */
84
+ productId?: string;
85
+ /** Your custom request ID (passed via checkout metadata). */
86
+ requestId?: string;
87
+ };
88
+ /** Query parameters from a Creem checkout success redirect URL. Parsed by `parseCheckoutSuccessParams`. */
89
+ export type CheckoutSuccessParams = {
90
+ /** Creem checkout session ID (`checkout_id` query param). */
91
+ checkoutId?: string;
92
+ /** Creem order ID (`order_id` query param). */
93
+ orderId?: string;
94
+ /** Creem customer ID (`customer_id` query param). */
95
+ customerId?: string;
96
+ /** Creem product ID (`product_id` query param). */
97
+ productId?: string;
98
+ /** Your custom request ID (`request_id` query param). */
99
+ requestId?: string;
100
+ /** Creem signature for verification (`signature` query param). */
101
+ signature?: string;
102
+ };
103
+ /**
104
+ * Resolved billing state for a billing entity.
105
+ * Central data structure consumed by widgets and `<BillingGate>`.
106
+ * Produced by `creem.getBillingSnapshot()` or `resolveBillingSnapshot()`.
107
+ */
108
+ export type BillingSnapshot = {
109
+ /** ISO timestamp when this snapshot was resolved. */
110
+ resolvedAt: string;
111
+ /** Version of the plan catalog used for resolution (if a catalog was provided). */
112
+ catalogVersion?: string;
113
+ /** ID of the currently active plan (from the catalog), or `null` if none matched. */
114
+ activePlanId: string | null;
115
+ /** Category of the active plan (e.g. `"free"`, `"paid"`, `"trial"`, `"enterprise"`). */
116
+ activeCategory: PlanCategory;
117
+ /** Current billing model. */
118
+ billingType: BillingType;
119
+ /** Current billing interval (e.g. `"every-month"`). */
120
+ recurringCycle?: RecurringCycle;
121
+ /** All billing cycles available for the active plan. Used by `<BillingToggle>`. */
122
+ availableBillingCycles: RecurringCycle[];
123
+ /** Raw subscription status string (e.g. `"active"`, `"trialing"`, `"canceled"`). */
124
+ subscriptionState?: string;
125
+ /** Current seat count for seat-based subscriptions. */
126
+ seats?: number;
127
+ /** One-time payment state, or `null` if not applicable. */
128
+ payment: PaymentSnapshot | null;
129
+ /** Actions the billing entity is allowed to perform. */
130
+ availableActions: AvailableAction[];
131
+ /** Additional metadata (cancelAtPeriodEnd, currentPeriodEnd, trialEnd, userContext). */
132
+ metadata?: Record<string, unknown>;
133
+ };
134
+ /**
135
+ * Intent object passed to `onBeforeCheckout` and stored by `pendingCheckout`.
136
+ * Represents the product and optional seat count the user wants to purchase.
137
+ */
138
+ export type CheckoutIntent = {
139
+ /** Creem product ID to purchase. */
140
+ productId: string;
141
+ /** Number of seats/units (for seat-based plans). */
142
+ units?: number;
143
+ };
144
+ /**
145
+ * How the Creem API handles plan switches and seat changes.
146
+ * - `"proration-charge-immediately"` — prorate and charge the difference now
147
+ * - `"proration-charge"` — prorate, charge on next invoice
148
+ * - `"proration-none"` — no proration, change takes effect on next billing cycle
149
+ */
150
+ export type UpdateBehavior = "proration-charge-immediately" | "proration-charge" | "proration-none";
151
+ /** Get a human-readable description for a plan switch based on the proration behavior. */
152
+ export declare const getSwitchPlanDescription: (updateBehavior: UpdateBehavior, planTitle?: string) => string;
153
+ /** Arbitrary user context passed through to the billing resolver. */
154
+ export type BillingUserContext = Record<string, unknown>;
155
+ /** Input for `resolveBillingSnapshot()`. Provide subscription + catalog data to resolve the billing state. */
156
+ export type BillingResolverInput = {
157
+ /** Optional plan catalog for plan-aware resolution. */
158
+ catalog?: PlanCatalog;
159
+ /** The entity's current (primary) subscription, or `null` if none. */
160
+ currentSubscription?: SubscriptionSnapshot | null;
161
+ /** All subscriptions for the entity (including ended). */
162
+ allSubscriptions?: SubscriptionSnapshot[];
163
+ /** One-time payment state (from checkout success params). */
164
+ payment?: PaymentSnapshot | null;
165
+ /** Arbitrary user context passed through to `metadata.userContext`. */
166
+ userContext?: BillingUserContext;
167
+ /** Override for the current timestamp (ISO string). Defaults to `new Date().toISOString()`. */
168
+ now?: string;
169
+ };
170
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE/E,6FAA6F;AAC7F,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE7D,iDAAiD;AACjD,MAAM,MAAM,uBAAuB,GAC/B,aAAa,GACb,oBAAoB,GACpB,kBAAkB,GAClB,YAAY,CAAC;AAEjB,gFAAgF;AAChF,MAAM,MAAM,cAAc,GAAG,uBAAuB,GAAG,QAAQ,CAAC;AAEhE,0CAA0C;AAC1C,MAAM,MAAM,oBAAoB,GAC5B,SAAS,GACT,MAAM,GACN,UAAU,GACV,oBAAoB,CAAC;AAEzB;;;;GAIG;AACH,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,YAAY,GACZ,iBAAiB,GACjB,cAAc,GACd,eAAe,CAAC;AAEpB,uDAAuD;AACvD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,QAAQ,EAAE,YAAY,CAAC;IACvB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,qFAAqF;IACrF,aAAa,CAAC,EAAE,cAAc,EAAE,CAAC;IACjC,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAA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CAAC;IAChC,wDAAwD;IACxD,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,wFAAwF;IACxF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GACtB,8BAA8B,GAC9B,kBAAkB,GAClB,gBAAgB,CAAC;AAErB,0FAA0F;AAC1F,eAAO,MAAM,wBAAwB,GACnC,gBAAgB,cAAc,EAC9B,YAAY,MAAM,KACjB,MAaF,CAAC;AAEF,qEAAqE;AACrE,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEzD,8GAA8G;AAC9G,MAAM,MAAM,oBAAoB,GAAG;IACjC,uDAAuD;IACvD,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAClD,0DAA0D;IAC1D,gBAAgB,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAC1C,6DAA6D;IAC7D,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACjC,uEAAuE;IACvE,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,+FAA+F;IAC/F,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,15 @@
1
+ /** Get a human-readable description for a plan switch based on the proration behavior. */
2
+ export const getSwitchPlanDescription = (updateBehavior, planTitle) => {
3
+ const prefix = planTitle
4
+ ? `You are about to switch to the ${planTitle} plan.`
5
+ : "You are about to switch your plan.";
6
+ switch (updateBehavior) {
7
+ case "proration-charge-immediately":
8
+ return `${prefix} The price difference will be prorated and charged immediately.`;
9
+ case "proration-charge":
10
+ return `${prefix} The price difference will be prorated and applied to your next invoice.`;
11
+ case "proration-none":
12
+ return `${prefix} The new price will take effect at your next billing cycle.`;
13
+ }
14
+ };
15
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAuLA,0FAA0F;AAC1F,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,cAA8B,EAC9B,SAAkB,EACV,EAAE;IACV,MAAM,MAAM,GAAG,SAAS;QACtB,CAAC,CAAC,kCAAkC,SAAS,QAAQ;QACrD,CAAC,CAAC,oCAAoC,CAAC;IAEzC,QAAQ,cAAc,EAAE,CAAC;QACvB,KAAK,8BAA8B;YACjC,OAAO,GAAG,MAAM,iEAAiE,CAAC;QACpF,KAAK,kBAAkB;YACrB,OAAO,GAAG,MAAM,0EAA0E,CAAC;QAC7F,KAAK,gBAAgB;YACnB,OAAO,GAAG,MAAM,6DAA6D,CAAC;IAClF,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare function normalizeHex(input: string): string;
2
+ export declare function hexToOklch(hexInput: string): string;
3
+ export declare function parseOklch(input: string): {
4
+ l: number;
5
+ c: number;
6
+ h: number;
7
+ } | null;
8
+ export declare function normalizeOklch(input: string): string;
9
+ export declare function oklchToHex(input: string): string;
10
+ //# sourceMappingURL=color-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-utils.d.ts","sourceRoot":"","sources":["../../../src/design-system/colors/color-utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CASlD;AAsBD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CA2BnD;AAED,wBAAgB,UAAU,CACxB,KAAK,EAAE,MAAM,GACZ;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAa5C;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKpD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAyBhD"}
@@ -0,0 +1,91 @@
1
+ export function normalizeHex(input) {
2
+ const raw = input.trim().replace(/^#/, "").toUpperCase();
3
+ if (/^[0-9A-F]{6}$/.test(raw))
4
+ return `#${raw}`;
5
+ if (/^[0-9A-F]{3}$/.test(raw))
6
+ return `#${raw
7
+ .split("")
8
+ .map((c) => c + c)
9
+ .join("")}`;
10
+ return "#000000";
11
+ }
12
+ function srgbToLinear(c) {
13
+ return c <= 0.04045 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
14
+ }
15
+ function linearToSrgb(c) {
16
+ return c <= 0.0031308 ? 12.92 * c : 1.055 * Math.pow(c, 1 / 2.4) - 0.055;
17
+ }
18
+ function clamp01(n) {
19
+ return Math.min(1, Math.max(0, n));
20
+ }
21
+ function clampChannel(n) {
22
+ return Math.round(clamp01(n) * 255);
23
+ }
24
+ function toHex(n) {
25
+ return n.toString(16).padStart(2, "0").toUpperCase();
26
+ }
27
+ export function hexToOklch(hexInput) {
28
+ const hex = normalizeHex(hexInput);
29
+ const r = parseInt(hex.slice(1, 3), 16) / 255;
30
+ const g = parseInt(hex.slice(3, 5), 16) / 255;
31
+ const b = parseInt(hex.slice(5, 7), 16) / 255;
32
+ const lr = srgbToLinear(r);
33
+ const lg = srgbToLinear(g);
34
+ const lb = srgbToLinear(b);
35
+ const l = 0.4122214708 * lr + 0.5363325363 * lg + 0.0514459929 * lb;
36
+ const m = 0.2119034982 * lr + 0.6806995451 * lg + 0.1073969566 * lb;
37
+ const s = 0.0883024619 * lr + 0.2817188376 * lg + 0.6299787005 * lb;
38
+ const l_ = Math.cbrt(l);
39
+ const m_ = Math.cbrt(m);
40
+ const s_ = Math.cbrt(s);
41
+ const L = 0.2104542553 * l_ + 0.793617785 * m_ - 0.0040720468 * s_;
42
+ const a = 1.9779984951 * l_ - 2.428592205 * m_ + 0.4505937099 * s_;
43
+ const b2 = 0.0259040371 * l_ + 0.7827717662 * m_ - 0.808675766 * s_;
44
+ const C = Math.sqrt(a * a + b2 * b2);
45
+ let h = (Math.atan2(b2, a) * 180) / Math.PI;
46
+ if (h < 0)
47
+ h += 360;
48
+ return `oklch(${L.toFixed(4)} ${C.toFixed(4)} ${h.toFixed(2)})`;
49
+ }
50
+ export function parseOklch(input) {
51
+ const m = input
52
+ .trim()
53
+ .match(/^oklch\(\s*([0-9]*\.?[0-9]+)\s+([0-9]*\.?[0-9]+)\s+([0-9]*\.?[0-9]+)(?:deg)?\s*\)$/i);
54
+ if (!m)
55
+ return null;
56
+ const l = Number(m[1]);
57
+ const c = Number(m[2]);
58
+ const h = Number(m[3]);
59
+ if (!Number.isFinite(l) || !Number.isFinite(c) || !Number.isFinite(h))
60
+ return null;
61
+ return { l, c, h };
62
+ }
63
+ export function normalizeOklch(input) {
64
+ const parsed = parseOklch(input);
65
+ if (!parsed)
66
+ return input;
67
+ const h = ((parsed.h % 360) + 360) % 360;
68
+ return `oklch(${parsed.l.toFixed(4)} ${parsed.c.toFixed(4)} ${h.toFixed(2)})`;
69
+ }
70
+ export function oklchToHex(input) {
71
+ const parsed = parseOklch(input);
72
+ if (!parsed)
73
+ return "#000000";
74
+ const hRad = (parsed.h * Math.PI) / 180;
75
+ const a = parsed.c * Math.cos(hRad);
76
+ const b = parsed.c * Math.sin(hRad);
77
+ const l_ = parsed.l + 0.3963377774 * a + 0.2158037573 * b;
78
+ const m_ = parsed.l - 0.1055613458 * a - 0.0638541728 * b;
79
+ const s_ = parsed.l - 0.0894841775 * a - 1.291485548 * b;
80
+ const l = l_ * l_ * l_;
81
+ const m = m_ * m_ * m_;
82
+ const s = s_ * s_ * s_;
83
+ const lr = 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s;
84
+ const lg = -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s;
85
+ const lb = -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s;
86
+ const r = clampChannel(linearToSrgb(lr));
87
+ const g = clampChannel(linearToSrgb(lg));
88
+ const bHex = clampChannel(linearToSrgb(lb));
89
+ return `#${toHex(r)}${toHex(g)}${toHex(bHex)}`;
90
+ }
91
+ //# sourceMappingURL=color-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-utils.js","sourceRoot":"","sources":["../../../src/design-system/colors/color-utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IACzD,IAAI,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,GAAG,EAAE,CAAC;IAChD,IAAI,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC;QAC3B,OAAO,IAAI,GAAG;aACX,KAAK,CAAC,EAAE,CAAC;aACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;aACjB,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;IAChB,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,YAAY,CAAC,CAAS;IAC7B,OAAO,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC;AACvE,CAAC;AAED,SAAS,YAAY,CAAC,CAAS;IAC7B,OAAO,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAA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CAAC;AACjD,CAAC"}
@@ -0,0 +1,33 @@
1
+ export declare const COLOR_STEPS: readonly [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140];
2
+ export type ColorStep = (typeof COLOR_STEPS)[number];
3
+ export type Palette = {
4
+ id: string;
5
+ name: string;
6
+ colors: Record<ColorStep, string>;
7
+ };
8
+ export type ColorRef = {
9
+ paletteId: string;
10
+ step: ColorStep;
11
+ };
12
+ export type SemanticRoleModeMap = {
13
+ light: ColorRef;
14
+ dark: ColorRef;
15
+ };
16
+ export type StateLayerRef = {
17
+ light: ColorRef;
18
+ dark: ColorRef;
19
+ opacityLight: number;
20
+ opacityDark: number;
21
+ };
22
+ export declare const DEFAULT_PALETTES: Palette[];
23
+ export declare const SEMANTIC_ROLE_ORDER: readonly ["surface.base", "surface.subtle", "surface.elevated", "surface.tonal", "surface.filled", "surface.backdrop", "border.subtle", "border.default", "foreground.default", "foreground.muted", "foreground.placeholder", "foreground.on-filled", "foreground.on-tonal", "surface.inverse", "foreground.on-inverse-primary", "foreground.on-inverse-secondary"];
24
+ export type SemanticRole = (typeof SEMANTIC_ROLE_ORDER)[number];
25
+ export declare const DEFAULT_SEMANTIC_ROLES: Record<SemanticRole, SemanticRoleModeMap>;
26
+ export declare const PALETTE_SEMANTIC_ROLE_OVERRIDES: Partial<Record<string, Partial<Record<SemanticRole, SemanticRoleModeMap>>>>;
27
+ export declare const STATE_LAYER_ORDER: readonly ["hover", "pressed", "focus-ring", "border-active", "drag", "disabled"];
28
+ export type StateLayerRole = (typeof STATE_LAYER_ORDER)[number];
29
+ export declare const DEFAULT_STATE_LAYERS: Record<StateLayerRole, StateLayerRef | {
30
+ opacityLight: number;
31
+ opacityDark: number;
32
+ }>;
33
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/design-system/colors/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,2EAE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MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAoC9D,CAAC"}
@@ -0,0 +1,224 @@
1
+ export const COLOR_STEPS = [
2
+ 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140,
3
+ ];
4
+ const ref = (paletteId, step) => ({
5
+ paletteId,
6
+ step,
7
+ });
8
+ const role = (light, dark) => ({
9
+ light,
10
+ dark,
11
+ });
12
+ export const DEFAULT_PALETTES = [
13
+ {
14
+ id: "neutral",
15
+ name: "Neutral",
16
+ colors: {
17
+ 0: "oklch(0.2404 0.0015 17.26)",
18
+ 10: "oklch(0.2861 0.0015 17.24)",
19
+ 20: "oklch(0.3300 0.0014 17.23)",
20
+ 30: "oklch(0.3562 0.0000 89.88)",
21
+ 40: "oklch(0.3942 0.0000 89.88)",
22
+ 50: "oklch(0.4640 0.0000 89.88)",
23
+ 60: "oklch(0.6066 0.0000 89.88)",
24
+ 70: "oklch(0.7252 0.0000 89.88)",
25
+ 80: "oklch(0.7889 0.0000 89.88)",
26
+ 90: "oklch(0.8853 0.0000 89.88)",
27
+ 100: "oklch(0.9067 0.0000 89.88)",
28
+ 110: "oklch(0.9249 0.0000 89.88)",
29
+ 120: "oklch(0.9461 0.0000 89.88)",
30
+ 130: "oklch(0.9612 0.0000 89.88)",
31
+ 140: "oklch(0.9851 0.0000 89.88)",
32
+ },
33
+ },
34
+ {
35
+ id: "primary",
36
+ name: "Primary",
37
+ colors: {
38
+ 0: "oklch(0.2393 0.1035 267.86)",
39
+ 10: "oklch(0.2779 0.1284 267.40)",
40
+ 20: "oklch(0.3486 0.1710 266.59)",
41
+ 30: "oklch(0.3887 0.1943 266.54)",
42
+ 40: "oklch(0.4603 0.2332 266.15)",
43
+ 50: "oklch(0.5075 0.2521 266.56)",
44
+ 60: "oklch(0.5572 0.2221 268.76)",
45
+ 70: "oklch(0.6180 0.1883 271.07)",
46
+ 80: "oklch(0.6986 0.1411 273.24)",
47
+ 90: "oklch(0.8270 0.0785 274.99)",
48
+ 100: "oklch(0.8795 0.0545 276.10)",
49
+ 110: "oklch(0.9165 0.0373 275.70)",
50
+ 120: "oklch(0.9389 0.0262 274.11)",
51
+ 130: "oklch(0.9577 0.0189 279.53)",
52
+ 140: "oklch(0.9766 0.0096 273.36)",
53
+ },
54
+ },
55
+ {
56
+ id: "success",
57
+ name: "Success",
58
+ colors: {
59
+ 0: "oklch(0.2481 0.0527 149.95)",
60
+ 10: "oklch(0.3087 0.0659 149.58)",
61
+ 20: "oklch(0.3659 0.0802 149.07)",
62
+ 30: "oklch(0.4447 0.1057 147.39)",
63
+ 40: "oklch(0.5150 0.1252 146.76)",
64
+ 50: "oklch(0.5858 0.1454 146.29)",
65
+ 60: "oklch(0.6549 0.1305 147.84)",
66
+ 70: "oklch(0.7268 0.1093 149.35)",
67
+ 80: "oklch(0.8069 0.0778 152.59)",
68
+ 90: "oklch(0.8877 0.0484 154.56)",
69
+ 100: "oklch(0.9200 0.0369 150.26)",
70
+ 110: "oklch(0.9447 0.0259 150.77)",
71
+ 120: "oklch(0.9637 0.0190 152.82)",
72
+ 130: "oklch(0.9794 0.0132 152.61)",
73
+ 140: "oklch(0.9922 0.0074 151.89)",
74
+ },
75
+ },
76
+ {
77
+ id: "warning",
78
+ name: "Warning",
79
+ colors: {
80
+ 0: "oklch(0.2693 0.0489 78.79)",
81
+ 10: "oklch(0.3310 0.0619 77.75)",
82
+ 20: "oklch(0.3960 0.0765 75.73)",
83
+ 30: "oklch(0.4747 0.0942 74.38)",
84
+ 40: "oklch(0.5523 0.1110 74.37)",
85
+ 50: "oklch(0.6273 0.1267 74.22)",
86
+ 60: "oklch(0.7054 0.1250 77.42)",
87
+ 70: "oklch(0.7718 0.1075 79.76)",
88
+ 80: "oklch(0.8384 0.0836 81.23)",
89
+ 90: "oklch(0.9071 0.0556 83.98)",
90
+ 100: "oklch(0.9344 0.0423 85.96)",
91
+ 110: "oklch(0.9520 0.0313 84.59)",
92
+ 120: "oklch(0.9696 0.0204 81.78)",
93
+ 130: "oklch(0.9827 0.0126 86.83)",
94
+ 140: "oklch(0.9945 0.0057 84.57)",
95
+ },
96
+ },
97
+ {
98
+ id: "error",
99
+ name: "Error",
100
+ colors: {
101
+ 0: "oklch(0.2397 0.0707 17.94)",
102
+ 10: "oklch(0.2928 0.0940 18.41)",
103
+ 20: "oklch(0.3560 0.1189 19.66)",
104
+ 30: "oklch(0.4207 0.1444 20.13)",
105
+ 40: "oklch(0.4841 0.1679 20.24)",
106
+ 50: "oklch(0.5450 0.1913 19.79)",
107
+ 60: "oklch(0.6051 0.1741 15.61)",
108
+ 70: "oklch(0.6835 0.1350 11.37)",
109
+ 80: "oklch(0.7805 0.0854 9.02)",
110
+ 90: "oklch(0.8817 0.0426 5.18)",
111
+ 100: "oklch(0.9172 0.0294 4.55)",
112
+ 110: "oklch(0.9412 0.0213 3.09)",
113
+ 120: "oklch(0.9577 0.0154 7.49)",
114
+ 130: "oklch(0.9725 0.0110 3.49)",
115
+ 140: "oklch(0.9870 0.0065 5.62)",
116
+ },
117
+ },
118
+ ];
119
+ export const SEMANTIC_ROLE_ORDER = [
120
+ "surface.base",
121
+ "surface.subtle",
122
+ "surface.elevated",
123
+ "surface.tonal",
124
+ "surface.filled",
125
+ "surface.backdrop",
126
+ "border.subtle",
127
+ "border.default",
128
+ "foreground.default",
129
+ "foreground.muted",
130
+ "foreground.placeholder",
131
+ "foreground.on-filled",
132
+ "foreground.on-tonal",
133
+ "surface.inverse",
134
+ "foreground.on-inverse-primary",
135
+ "foreground.on-inverse-secondary",
136
+ ];
137
+ export const DEFAULT_SEMANTIC_ROLES = {
138
+ // Surface
139
+ "surface.base": role(ref("neutral", 140), ref("neutral", 0)),
140
+ "surface.subtle": role(ref("neutral", 130), ref("neutral", 10)),
141
+ "surface.elevated": role(ref("neutral", 120), ref("neutral", 20)),
142
+ "surface.tonal": role(ref("neutral", 110), ref("neutral", 30)),
143
+ "surface.filled": role(ref("neutral", 10), ref("neutral", 130)),
144
+ "surface.backdrop": role(ref("neutral", 70), ref("neutral", 30)),
145
+ // Border
146
+ "border.subtle": role(ref("neutral", 100), ref("neutral", 40)),
147
+ "border.default": role(ref("neutral", 90), ref("neutral", 50)),
148
+ // Foreground
149
+ "foreground.default": role(ref("neutral", 0), ref("neutral", 140)),
150
+ "foreground.muted": role(ref("neutral", 50), ref("neutral", 90)),
151
+ "foreground.placeholder": role(ref("neutral", 70), ref("neutral", 60)),
152
+ "foreground.on-filled": role(ref("neutral", 140), ref("neutral", 0)),
153
+ "foreground.on-tonal": role(ref("neutral", 10), ref("neutral", 130)),
154
+ // Inverse
155
+ "surface.inverse": role(ref("neutral", 0), ref("neutral", 140)),
156
+ "foreground.on-inverse-primary": role(ref("neutral", 140), ref("neutral", 0)),
157
+ "foreground.on-inverse-secondary": role(ref("neutral", 80), ref("neutral", 50)),
158
+ };
159
+ // Palette-specific semantic-role overrides when a palette does not follow
160
+ // the default neutral step mapping 1:1.
161
+ export const PALETTE_SEMANTIC_ROLE_OVERRIDES = {
162
+ primary: {
163
+ "surface.base": role(ref("primary", 140), ref("primary", 0)),
164
+ "surface.subtle": role(ref("primary", 130), ref("primary", 10)),
165
+ "surface.elevated": role(ref("primary", 120), ref("primary", 20)),
166
+ "surface.tonal": role(ref("primary", 110), ref("primary", 30)),
167
+ "surface.filled": role(ref("primary", 60), ref("primary", 70)),
168
+ "border.subtle": role(ref("primary", 100), ref("primary", 40)),
169
+ "border.default": role(ref("primary", 90), ref("primary", 50)),
170
+ "foreground.default": role(ref("primary", 10), ref("primary", 130)),
171
+ "foreground.muted": role(ref("primary", 30), ref("primary", 110)),
172
+ "foreground.placeholder": role(ref("primary", 40), ref("primary", 100)),
173
+ "foreground.on-tonal": role(ref("primary", 60), ref("primary", 90)),
174
+ "foreground.on-filled": role(ref("primary", 140), ref("primary", 0)),
175
+ "surface.inverse": role(ref("primary", 0), ref("primary", 140)),
176
+ "foreground.on-inverse-primary": role(ref("primary", 140), ref("primary", 0)),
177
+ "foreground.on-inverse-secondary": role(ref("primary", 80), ref("primary", 50)),
178
+ },
179
+ };
180
+ export const STATE_LAYER_ORDER = [
181
+ "hover",
182
+ "pressed",
183
+ "focus-ring",
184
+ "border-active",
185
+ "drag",
186
+ "disabled",
187
+ ];
188
+ export const DEFAULT_STATE_LAYERS = {
189
+ hover: {
190
+ light: ref("neutral", 0),
191
+ dark: ref("neutral", 140),
192
+ opacityLight: 8,
193
+ opacityDark: 8,
194
+ },
195
+ pressed: {
196
+ light: ref("neutral", 0),
197
+ dark: ref("neutral", 140),
198
+ opacityLight: 10,
199
+ opacityDark: 10,
200
+ },
201
+ "focus-ring": {
202
+ light: ref("neutral", 60),
203
+ dark: ref("neutral", 60),
204
+ opacityLight: 100,
205
+ opacityDark: 100,
206
+ },
207
+ "border-active": {
208
+ light: ref("neutral", 40),
209
+ dark: ref("neutral", 90),
210
+ opacityLight: 100,
211
+ opacityDark: 100,
212
+ },
213
+ drag: {
214
+ light: ref("neutral", 0),
215
+ dark: ref("neutral", 140),
216
+ opacityLight: 16,
217
+ opacityDark: 16,
218
+ },
219
+ disabled: {
220
+ opacityLight: 50,
221
+ opacityDark: 50,
222
+ },
223
+ };
224
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/design-system/colors/config.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;CACtD,CAAC;AA2BX,MAAM,GAAG,GAAG,CAAC,SAAiB,EAAE,IAAe,EAAY,EAAE,CAAC,CAAC;IAC7D,SAAS;IACT,IAAI;CACL,CAAC,CAAC;AACH,MAAM,IAAI,GAAG,CAAC,KAAe,EAAE,IA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AC;QACxB,YAAY,EAAE,GAAG;QACjB,WAAW,EAAE,GAAG;KACjB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;QACxB,IAAI,EAAE,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC;QACzB,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,EAAE;KAChB;IACD,QAAQ,EAAE;QACR,YAAY,EAAE,EAAE;QAChB,WAAW,EAAE,EAAE;KAChB;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./config.js";
2
+ export * from "./color-utils.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/design-system/colors/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./config.js";
2
+ export * from "./color-utils.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/design-system/colors/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,31 @@
1
+ export declare const RADIUS_TOKENS: {
2
+ readonly "rounded-sm": {
3
+ readonly label: "rounded-sm";
4
+ readonly px: 6;
5
+ };
6
+ readonly rounded: {
7
+ readonly label: "rounded";
8
+ readonly px: 8;
9
+ };
10
+ readonly "rounded-lg": {
11
+ readonly label: "rounded-lg";
12
+ readonly px: 12;
13
+ };
14
+ readonly "rounded-xl": {
15
+ readonly label: "rounded-xl";
16
+ readonly px: 16;
17
+ };
18
+ readonly "rounded-full": {
19
+ readonly label: "rounded-full";
20
+ readonly px: 9999;
21
+ };
22
+ };
23
+ export type RadiusTokenKey = keyof typeof RADIUS_TOKENS;
24
+ export type RadiusSemanticRole = "S" | "M" | "L" | "XL" | "Full";
25
+ export declare const SEMANTIC_ROLE_ORDER: RadiusSemanticRole[];
26
+ export declare const DEFAULT_SEMANTIC_RADIUS_TOKENS: Record<RadiusSemanticRole, RadiusTokenKey>;
27
+ export declare const COMPONENT_ORDER: readonly ["checkbox", "keyboard-shortcut", "tag", "badge", "small-button", "button", "menu-item", "tab", "textarea", "input", "large-button", "card", "dropdown", "popover", "tooltip", "modal", "drawer", "table", "image", "avatar", "toggle", "progress-bar"];
28
+ export type RadiusComponent = (typeof COMPONENT_ORDER)[number];
29
+ export declare const DEFAULT_COMPONENT_SEMANTIC: Record<RadiusComponent, RadiusSemanticRole>;
30
+ export declare function titleizeComponentName(name: RadiusComponent): string;
31
+ //# sourceMappingURL=config.d.ts.map