fontdue-js 2.28.0 → 3.0.0-alpha10

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 (499) hide show
  1. package/.babelrc.cjs +72 -0
  2. package/README.md +639 -93
  3. package/dist/__generated__/AddToCartBannerQuery.graphql.js +1 -8
  4. package/dist/__generated__/AddToCartBanner_item.graphql.js +1 -8
  5. package/dist/__generated__/AddToCartBanner_order.graphql.js +1 -8
  6. package/dist/__generated__/AddressFieldsRefetchQuery.graphql.js +1 -8
  7. package/dist/__generated__/AddressFields_viewer.graphql.js +3 -11
  8. package/dist/__generated__/BuyButtonIDQuery.graphql.js +1 -8
  9. package/dist/__generated__/BuyButtonSlugQuery.graphql.js +1 -8
  10. package/dist/__generated__/BuyButton_collection.graphql.js +1 -8
  11. package/dist/__generated__/CartButtonQuery.graphql.js +1 -8
  12. package/dist/__generated__/CartButton_order.graphql.js +1 -8
  13. package/dist/__generated__/CartItemAdditionalLicenses_licenses.graphql.js +1 -8
  14. package/dist/__generated__/CartItemAdditionalLicenses_orderItem.graphql.js +1 -8
  15. package/dist/__generated__/CartItemLicense_selection.graphql.js +1 -8
  16. package/dist/__generated__/CartItemProduct_product.graphql.js +1 -8
  17. package/dist/__generated__/CartItemVariable_selection.graphql.js +1 -8
  18. package/dist/__generated__/CartItemVariable_variable.graphql.js +1 -8
  19. package/dist/__generated__/CartItem_node.graphql.js +1 -8
  20. package/dist/__generated__/CartOrderCompleteOrderMutation.graphql.js +1 -8
  21. package/dist/__generated__/CartOrderRemoveDiscountMutation.graphql.js +1 -8
  22. package/dist/__generated__/CartOrderUpdateMutation.graphql.js +1 -8
  23. package/dist/__generated__/CartOrder_UpdateErrors.graphql.js +1 -8
  24. package/dist/__generated__/CartOrder_order.graphql.js +1 -8
  25. package/dist/__generated__/CartOrder_viewer.graphql.js +1 -8
  26. package/dist/__generated__/CartQuery.graphql.js +1 -8
  27. package/dist/__generated__/CartStateRemoveDiscountMutation.graphql.js +1 -8
  28. package/dist/__generated__/CartStateUpdateMutation.graphql.js +1 -8
  29. package/dist/__generated__/CartState_order.graphql.js +1 -8
  30. package/dist/__generated__/CartTotals_order.graphql.js +1 -8
  31. package/dist/__generated__/CharacterViewerIDQuery.graphql.js +1 -8
  32. package/dist/__generated__/CharacterViewerSlugQuery.graphql.js +1 -8
  33. package/dist/__generated__/CharacterViewerStyleRefetchQuery.graphql.js +1 -8
  34. package/dist/__generated__/CharacterViewer_collection.graphql.js +1 -8
  35. package/dist/__generated__/CharacterViewer_family.graphql.js +1 -8
  36. package/dist/__generated__/CharacterViewer_style.graphql.js +3 -11
  37. package/dist/__generated__/CheckoutUpdateCustomerMutation.graphql.js +1 -8
  38. package/dist/__generated__/CheckoutUpdateOrderMutation.graphql.js +1 -8
  39. package/dist/__generated__/Checkout_UpdateOrderErrors.graphql.js +1 -8
  40. package/dist/__generated__/Checkout_identity.graphql.js +1 -8
  41. package/dist/__generated__/Checkout_order.graphql.js +1 -8
  42. package/dist/__generated__/Checkout_viewer.graphql.js +1 -8
  43. package/dist/__generated__/CollectionAa_Query.graphql.js +1 -8
  44. package/dist/__generated__/CollectionAa_product.graphql.js +1 -8
  45. package/dist/__generated__/CouponCodeInputApplyCouponMutation.graphql.js +1 -8
  46. package/dist/__generated__/CouponText_coupon.graphql.js +1 -8
  47. package/dist/__generated__/CustomerLoginFormLoginMutation.graphql.js +1 -8
  48. package/dist/__generated__/CustomerLoginFormQuery.graphql.js +1 -8
  49. package/dist/__generated__/DownloadRefetchQuery.graphql.js +1 -8
  50. package/dist/__generated__/Download_order.graphql.js +1 -8
  51. package/dist/__generated__/FamilyList_node.graphql.js +1 -8
  52. package/dist/__generated__/Family_node.graphql.js +1 -8
  53. package/dist/__generated__/FontFamiliesQuery.graphql.js +1 -8
  54. package/dist/__generated__/FontStyle_fontStyle.graphql.js +1 -8
  55. package/dist/__generated__/FontdueAdminToolbarStaffQuery.graphql.d.ts +20 -0
  56. package/dist/__generated__/{TestModeBannerQuery.graphql.js → FontdueAdminToolbarStaffQuery.graphql.js} +11 -18
  57. package/dist/__generated__/FontdueAdminToolbarTokenMutation.graphql.d.ts +18 -0
  58. package/dist/__generated__/FontdueAdminToolbarTokenMutation.graphql.js +56 -0
  59. package/dist/__generated__/FontdueProviderQuery.graphql.d.ts +19 -0
  60. package/dist/__generated__/FontdueProviderQuery.graphql.js +140 -0
  61. package/dist/__generated__/IdentityBox_identity.graphql.js +1 -8
  62. package/dist/__generated__/License_node.graphql.js +1 -8
  63. package/dist/__generated__/NewsletterSignupQuery.graphql.js +1 -8
  64. package/dist/__generated__/NewsletterSignupUpdateCustomerMutation.graphql.js +1 -8
  65. package/dist/__generated__/NodePasswordFormAccessNodeMutation.graphql.js +1 -8
  66. package/dist/__generated__/NodePasswordFormIDQuery.graphql.js +1 -8
  67. package/dist/__generated__/NodePasswordFormSlugQuery.graphql.js +1 -8
  68. package/dist/__generated__/OrderVariableSelectionReduxRefetchQuery.graphql.js +1 -8
  69. package/dist/__generated__/OrderVariableSelectionRedux_viewer.graphql.js +3 -11
  70. package/dist/__generated__/OrderVariableSelection_variables.graphql.js +1 -8
  71. package/dist/__generated__/PrecartAddToCartMutation.graphql.js +1 -8
  72. package/dist/__generated__/PrecartClearCartMutation.graphql.js +1 -8
  73. package/dist/__generated__/PrecartQuery.graphql.js +1 -8
  74. package/dist/__generated__/Precart_collection.graphql.js +1 -8
  75. package/dist/__generated__/Precart_license.graphql.js +1 -8
  76. package/dist/__generated__/Precart_viewer.graphql.js +1 -8
  77. package/dist/__generated__/PriceBarSectionRefetchQuery.graphql.js +1 -8
  78. package/dist/__generated__/PriceBarSection_node.graphql.js +3 -11
  79. package/dist/__generated__/PriceBar_node.graphql.js +1 -8
  80. package/dist/__generated__/Price_price.graphql.js +1 -8
  81. package/dist/__generated__/SKUPrice_sku.graphql.js +1 -8
  82. package/dist/__generated__/SelectButton_sku.graphql.js +1 -8
  83. package/dist/__generated__/ServerConfigProvider_viewer.graphql.d.ts +23 -0
  84. package/dist/__generated__/ServerConfigProvider_viewer.graphql.js +57 -0
  85. package/dist/__generated__/ShareCartCreateSnapshotMutation.graphql.js +1 -8
  86. package/dist/__generated__/SpecimenLinkQuery.graphql.js +1 -8
  87. package/dist/__generated__/StoreModalBundleButton_bundle.graphql.js +1 -8
  88. package/dist/__generated__/StoreModalCartQuery.graphql.js +1 -8
  89. package/dist/__generated__/StoreModalCheckoutQuery.graphql.js +1 -8
  90. package/dist/__generated__/StoreModalContainerQuery.graphql.js +1 -8
  91. package/dist/__generated__/StoreModalDownloadRefetchQuery.graphql.js +1 -8
  92. package/dist/__generated__/StoreModalDownload_order.graphql.js +1 -8
  93. package/dist/__generated__/StoreModalFamilyButton_collection.graphql.js +1 -8
  94. package/dist/__generated__/StoreModalFamily_collection.graphql.js +1 -8
  95. package/dist/__generated__/StoreModalIndexItem_fontCollection.graphql.js +1 -8
  96. package/dist/__generated__/StoreModalIndexQuery.graphql.js +1 -8
  97. package/dist/__generated__/StoreModalOrderVariableSelection_order.graphql.js +1 -8
  98. package/dist/__generated__/StoreModalOrderVariableSelection_viewer.graphql.js +1 -8
  99. package/dist/__generated__/StoreModalProductContent_collection.graphql.js +3 -11
  100. package/dist/__generated__/StoreModalProductLicenseSelection_collection.graphql.js +1 -8
  101. package/dist/__generated__/StoreModalProductLicense_license.graphql.js +1 -8
  102. package/dist/__generated__/StoreModalProductQuery.graphql.js +1 -8
  103. package/dist/__generated__/StoreModalProductRefetchQuery.graphql.js +1 -8
  104. package/dist/__generated__/StoreModalProductSummaryAddToCartMutation.graphql.js +1 -8
  105. package/dist/__generated__/StoreModalProductSummaryClearCartMutation.graphql.js +1 -8
  106. package/dist/__generated__/StoreModalProductSummaryRefetchQuery.graphql.js +1 -8
  107. package/dist/__generated__/StoreModalProductSummary_viewer.graphql.js +3 -11
  108. package/dist/__generated__/StoreModalReviewIdentity_identity.graphql.js +1 -8
  109. package/dist/__generated__/StoreModalStyleButton_fontStyle.graphql.js +1 -8
  110. package/dist/__generated__/StoreModalUnifiedCheckoutCompleteOrderMutation.graphql.js +1 -8
  111. package/dist/__generated__/StoreModalUnifiedCheckoutUpdateCustomerMutation.graphql.js +1 -8
  112. package/dist/__generated__/StoreModalUnifiedCheckoutUpdateOrderMutation.graphql.js +1 -8
  113. package/dist/__generated__/StoreModalUnifiedCheckout_order.graphql.js +1 -8
  114. package/dist/__generated__/StoreModalUnifiedCheckout_viewer.graphql.js +1 -8
  115. package/dist/__generated__/StripeProviderCreateCheckoutSessionMutation.graphql.js +1 -8
  116. package/dist/__generated__/StripeProvider_viewer.graphql.js +1 -8
  117. package/dist/__generated__/TestFontsFormUpdateCustomerMutation.graphql.js +1 -8
  118. package/dist/__generated__/TestFontsForm_Query.graphql.js +1 -8
  119. package/dist/__generated__/TestModeBanner_viewer.graphql.d.ts +19 -0
  120. package/dist/__generated__/TestModeBanner_viewer.graphql.js +36 -0
  121. package/dist/__generated__/ThemeConfig_viewer.graphql.d.ts +19 -0
  122. package/dist/__generated__/ThemeConfig_viewer.graphql.js +36 -0
  123. package/dist/__generated__/TypeTesterFamiliesQuery.graphql.js +1 -8
  124. package/dist/__generated__/TypeTesterFamiliesStylesQuery.graphql.js +1 -8
  125. package/dist/__generated__/TypeTesterFeaturesButton_fontStyle.graphql.js +1 -8
  126. package/dist/__generated__/TypeTesterFeatures_fontStyle.graphql.js +1 -8
  127. package/dist/__generated__/TypeTesterFloatingToolbar_testers.graphql.js +1 -8
  128. package/dist/__generated__/TypeTesterStandaloneChangedStylesQuery.graphql.js +1 -8
  129. package/dist/__generated__/TypeTesterStandaloneQuery.graphql.js +1 -8
  130. package/dist/__generated__/TypeTesterStyleSelectData_fontStyle.graphql.js +1 -8
  131. package/dist/__generated__/TypeTesterStyleSelectData_fontStyleData.graphql.js +1 -8
  132. package/dist/__generated__/TypeTesterToolbar_fontStyle.graphql.js +1 -8
  133. package/dist/__generated__/TypeTesterVariableAxes_fontStyle.graphql.js +1 -8
  134. package/dist/__generated__/TypeTester_fontStyle.graphql.js +1 -8
  135. package/dist/__generated__/TypeTestersChangedStylesQuery.graphql.js +1 -8
  136. package/dist/__generated__/TypeTestersIDQuery.graphql.js +1 -8
  137. package/dist/__generated__/TypeTestersRefetchQuery.graphql.js +1 -8
  138. package/dist/__generated__/TypeTestersSlugQuery.graphql.js +1 -8
  139. package/dist/__generated__/TypeTesters_collection.graphql.js +3 -11
  140. package/dist/__generated__/VariableTableAmounts_option.graphql.js +1 -8
  141. package/dist/__generated__/VariableTableAmounts_variable.graphql.js +1 -8
  142. package/dist/__generated__/orderTrackingUpdateOrderTrackingMutation.graphql.js +1 -8
  143. package/dist/__generated__/productState_Query.graphql.js +1 -8
  144. package/dist/__generated__/productState_bundle.graphql.js +1 -8
  145. package/dist/__generated__/productState_collection.graphql.js +1 -8
  146. package/dist/__generated__/productState_collectionBundle.graphql.js +1 -8
  147. package/dist/__generated__/productState_node.graphql.js +1 -8
  148. package/dist/__generated__/productState_sku.graphql.js +1 -8
  149. package/dist/__generated__/useFeaturesData_fontStyle.graphql.js +1 -8
  150. package/dist/__generated__/useFontStyle_fontStyle.graphql.js +1 -8
  151. package/dist/__generated__/useTotalStyles_fontCollection.graphql.js +1 -8
  152. package/dist/__tests__/collectionBundleSelection.test.js +221 -222
  153. package/dist/__tests__/fontLoader.test.js +24 -26
  154. package/dist/__tests__/licenseExclusions.test.js +27 -30
  155. package/dist/__tests__/networkFetch.test.js +66 -0
  156. package/dist/__tests__/nextAdapter.test.js +447 -0
  157. package/dist/components/AddToCartBanner/index.js +19 -29
  158. package/dist/components/BuyButton/index.d.ts +29 -6
  159. package/dist/components/BuyButton/index.js +98 -57
  160. package/dist/components/BuyButton/index.server.d.ts +9 -2
  161. package/dist/components/BuyButton/index.server.js +20 -17
  162. package/dist/components/BuyingOptions/index.d.ts +9 -0
  163. package/dist/components/BuyingOptions/index.js +4 -12
  164. package/dist/components/Cart/AddressFields.d.ts +2 -2
  165. package/dist/components/Cart/AddressFields.js +25 -35
  166. package/dist/components/Cart/CartItem/CartItemAdditionalLicenses.d.ts +2 -2
  167. package/dist/components/Cart/CartItem/CartItemAdditionalLicenses.js +9 -16
  168. package/dist/components/Cart/CartItem/CartItemLicense.d.ts +2 -2
  169. package/dist/components/Cart/CartItem/CartItemLicense.js +15 -24
  170. package/dist/components/Cart/CartItem/CartItemProduct.d.ts +1 -1
  171. package/dist/components/Cart/CartItem/CartItemProduct.js +16 -23
  172. package/dist/components/Cart/CartItem/CartItemVariable.d.ts +3 -3
  173. package/dist/components/Cart/CartItem/CartItemVariable.js +16 -23
  174. package/dist/components/Cart/CartItem/VariableTextInput.js +13 -21
  175. package/dist/components/Cart/CartItem/index.d.ts +2 -2
  176. package/dist/components/Cart/CartItem/index.js +18 -27
  177. package/dist/components/Cart/CartOrder.d.ts +2 -2
  178. package/dist/components/Cart/CartOrder.js +102 -113
  179. package/dist/components/Cart/CartState.d.ts +3 -3
  180. package/dist/components/Cart/CartState.js +18 -25
  181. package/dist/components/Cart/CartTotals.d.ts +1 -1
  182. package/dist/components/Cart/CartTotals.js +31 -38
  183. package/dist/components/Cart/Checkout.d.ts +3 -3
  184. package/dist/components/Cart/Checkout.js +109 -118
  185. package/dist/components/Cart/CheckoutSteps.js +1 -8
  186. package/dist/components/Cart/CouponCodeInput.js +22 -32
  187. package/dist/components/Cart/CustomerFields.d.ts +1 -1
  188. package/dist/components/Cart/CustomerFields.js +21 -31
  189. package/dist/components/Cart/Download.d.ts +1 -1
  190. package/dist/components/Cart/Download.js +17 -27
  191. package/dist/components/Cart/EmptyCart.js +15 -23
  192. package/dist/components/Cart/IdentityBox.d.ts +1 -1
  193. package/dist/components/Cart/IdentityBox.js +12 -19
  194. package/dist/components/Cart/ShareCart.js +24 -32
  195. package/dist/components/Cart/index.js +13 -21
  196. package/dist/components/Cart/injectRelayEnvironment.js +5 -13
  197. package/dist/components/Cart/orderTracking.js +8 -15
  198. package/dist/components/Cart/types.d.ts +1 -1
  199. package/dist/components/Cart/types.js +1 -5
  200. package/dist/components/Cart/utils.js +2 -9
  201. package/dist/components/CartButton/index.d.ts +5 -8
  202. package/dist/components/CartButton/index.js +53 -62
  203. package/dist/components/CharacterViewer/StyleSelect.d.ts +1 -1
  204. package/dist/components/CharacterViewer/StyleSelect.js +10 -17
  205. package/dist/components/CharacterViewer/index.d.ts +29 -6
  206. package/dist/components/CharacterViewer/index.js +150 -102
  207. package/dist/components/CharacterViewer/index.server.d.ts +9 -2
  208. package/dist/components/CharacterViewer/index.server.js +21 -17
  209. package/dist/components/Checkbox/index.js +9 -19
  210. package/dist/components/CollectionAa/index.d.ts +1 -1
  211. package/dist/components/CollectionAa/index.js +12 -21
  212. package/dist/components/ComponentsContext.d.ts +1 -1
  213. package/dist/components/ComponentsContext.js +4 -10
  214. package/dist/components/ConfigContext.d.ts +13 -12
  215. package/dist/components/ConfigContext.js +29 -11
  216. package/dist/components/ConsentBanner/consent.js +6 -17
  217. package/dist/components/ConsentBanner/index.js +19 -29
  218. package/dist/components/CookieNotification/index.d.ts +13 -0
  219. package/dist/components/CookieNotification/index.js +23 -31
  220. package/dist/components/CorsErrorModal.js +13 -20
  221. package/dist/components/CouponText/index.d.ts +1 -1
  222. package/dist/components/CouponText/index.js +9 -18
  223. package/dist/components/CustomerLoginForm/index.js +37 -38
  224. package/dist/components/Family/FamilyList.d.ts +1 -1
  225. package/dist/components/Family/FamilyList.js +10 -17
  226. package/dist/components/Family/index.d.ts +1 -1
  227. package/dist/components/Family/index.js +37 -46
  228. package/dist/components/FontFamilies/index.js +18 -28
  229. package/dist/components/FontStyle/index.d.ts +2 -2
  230. package/dist/components/FontStyle/index.js +8 -15
  231. package/dist/components/FontdueAdminToolbar/index.d.ts +2 -0
  232. package/dist/components/FontdueAdminToolbar/index.js +146 -0
  233. package/dist/components/FontdueContextProvider/index.d.ts +18 -0
  234. package/dist/components/FontdueContextProvider/index.js +148 -0
  235. package/dist/components/FontdueProvider/index.d.ts +19 -3
  236. package/dist/components/FontdueProvider/index.js +75 -13
  237. package/dist/components/FontdueProvider/index.server.d.ts +6 -3
  238. package/dist/components/FontdueProvider/index.server.js +37 -21
  239. package/dist/components/Icons/Align.js +13 -22
  240. package/dist/components/Icons/ArrowDownRight.js +5 -13
  241. package/dist/components/Icons/ArrowLeft.js +5 -13
  242. package/dist/components/Icons/ArrowRight.js +5 -13
  243. package/dist/components/Icons/CarrotDown.js +5 -13
  244. package/dist/components/Icons/CarrotUp.js +5 -13
  245. package/dist/components/Icons/Cart.js +7 -15
  246. package/dist/components/Icons/CartNew.js +7 -15
  247. package/dist/components/Icons/Check.js +5 -13
  248. package/dist/components/Icons/Checkbox.js +5 -13
  249. package/dist/components/Icons/CheckboxChecked.js +5 -13
  250. package/dist/components/Icons/CheckboxCrossed.js +6 -14
  251. package/dist/components/Icons/CircledCheck.js +6 -14
  252. package/dist/components/Icons/CircledInfo.js +6 -14
  253. package/dist/components/Icons/CircledMinus.js +6 -14
  254. package/dist/components/Icons/ColorPicker.js +5 -13
  255. package/dist/components/Icons/CreditCard.js +6 -14
  256. package/dist/components/Icons/DownArrow.js +5 -13
  257. package/dist/components/Icons/DownloadFonts.js +8 -16
  258. package/dist/components/Icons/FrowningFace.js +8 -16
  259. package/dist/components/Icons/License.js +5 -13
  260. package/dist/components/Icons/Receipt.js +8 -16
  261. package/dist/components/Icons/User.js +5 -13
  262. package/dist/components/Icons/X.js +5 -13
  263. package/dist/components/Icons/index.d.ts +23 -23
  264. package/dist/components/Icons/index.js +23 -167
  265. package/dist/components/NewsletterSignup/NewsletterSignupElement.d.ts +1 -1
  266. package/dist/components/NewsletterSignup/NewsletterSignupElement.js +4 -11
  267. package/dist/components/NewsletterSignup/index.d.ts +11 -6
  268. package/dist/components/NewsletterSignup/index.js +75 -60
  269. package/dist/components/NewsletterSignup/index.server.d.ts +7 -2
  270. package/dist/components/NewsletterSignup/index.server.js +17 -14
  271. package/dist/components/NodePasswordForm/index.js +25 -33
  272. package/dist/components/OrderVariableSelection/OrderVariableSelectionRedux.d.ts +1 -1
  273. package/dist/components/OrderVariableSelection/OrderVariableSelectionRedux.js +18 -27
  274. package/dist/components/OrderVariableSelection/index.d.ts +1 -1
  275. package/dist/components/OrderVariableSelection/index.js +28 -36
  276. package/dist/components/Precart/License.d.ts +1 -1
  277. package/dist/components/Precart/License.js +22 -30
  278. package/dist/components/Precart/index.js +64 -74
  279. package/dist/components/Price/index.d.ts +1 -1
  280. package/dist/components/Price/index.js +10 -20
  281. package/dist/components/PriceBar/PriceBarSection.d.ts +1 -1
  282. package/dist/components/PriceBar/PriceBarSection.js +23 -33
  283. package/dist/components/PriceBar/index.d.ts +1 -1
  284. package/dist/components/PriceBar/index.js +13 -23
  285. package/dist/components/Root/index.d.ts +1 -1
  286. package/dist/components/Root/index.js +41 -51
  287. package/dist/components/Root/productState.d.ts +1 -1
  288. package/dist/components/Root/productState.js +20 -29
  289. package/dist/components/SKUPrice/index.d.ts +2 -2
  290. package/dist/components/SKUPrice/index.js +12 -20
  291. package/dist/components/Select/index.js +9 -17
  292. package/dist/components/SelectButton/index.d.ts +2 -2
  293. package/dist/components/SelectButton/index.js +20 -29
  294. package/dist/components/ServerConfigProvider/index.d.ts +4 -2
  295. package/dist/components/ServerConfigProvider/index.js +12 -20
  296. package/dist/components/SpecimenLink/index.js +12 -20
  297. package/dist/components/StickyNav/index.js +16 -26
  298. package/dist/components/StoreModal/StoreModalBundleButton.d.ts +1 -1
  299. package/dist/components/StoreModal/StoreModalBundleButton.js +16 -23
  300. package/dist/components/StoreModal/StoreModalCart.d.ts +1 -1
  301. package/dist/components/StoreModal/StoreModalCart.js +29 -38
  302. package/dist/components/StoreModal/StoreModalCheckout.js +9 -17
  303. package/dist/components/StoreModal/StoreModalCheckoutContext.d.ts +1 -1
  304. package/dist/components/StoreModal/StoreModalCheckoutContext.js +6 -12
  305. package/dist/components/StoreModal/StoreModalContainer.js +25 -35
  306. package/dist/components/StoreModal/StoreModalDownload.d.ts +1 -1
  307. package/dist/components/StoreModal/StoreModalDownload.js +14 -24
  308. package/dist/components/StoreModal/StoreModalFamily.d.ts +1 -1
  309. package/dist/components/StoreModal/StoreModalFamily.js +14 -23
  310. package/dist/components/StoreModal/StoreModalFamilyButton.d.ts +1 -1
  311. package/dist/components/StoreModal/StoreModalFamilyButton.js +23 -30
  312. package/dist/components/StoreModal/StoreModalIndex.d.ts +1 -1
  313. package/dist/components/StoreModal/StoreModalIndex.js +9 -17
  314. package/dist/components/StoreModal/StoreModalIndexItem.d.ts +1 -1
  315. package/dist/components/StoreModal/StoreModalIndexItem.js +20 -30
  316. package/dist/components/StoreModal/StoreModalLicenseeIsBillingSelection.js +8 -17
  317. package/dist/components/StoreModal/StoreModalLoader.js +6 -15
  318. package/dist/components/StoreModal/StoreModalOrderVariableSelection.d.ts +3 -3
  319. package/dist/components/StoreModal/StoreModalOrderVariableSelection.js +12 -21
  320. package/dist/components/StoreModal/StoreModalProduct.d.ts +1 -1
  321. package/dist/components/StoreModal/StoreModalProduct.js +55 -65
  322. package/dist/components/StoreModal/StoreModalReviewIdentity.d.ts +1 -1
  323. package/dist/components/StoreModal/StoreModalReviewIdentity.js +6 -15
  324. package/dist/components/StoreModal/StoreModalRouter.js +12 -22
  325. package/dist/components/StoreModal/StoreModalStyleButton.d.ts +1 -1
  326. package/dist/components/StoreModal/StoreModalStyleButton.js +20 -27
  327. package/dist/components/StoreModal/index.d.ts +5 -1
  328. package/dist/components/StoreModal/index.js +24 -20
  329. package/dist/components/StoreModal/routes.d.ts +4 -4
  330. package/dist/components/StoreModal/routes.js +18 -26
  331. package/dist/components/StoreModal/types.js +1 -5
  332. package/dist/components/StoreModalProductLicenseSelection/LicenseElement.js +12 -22
  333. package/dist/components/StoreModalProductLicenseSelection/LicenseVariableElement.js +7 -15
  334. package/dist/components/StoreModalProductLicenseSelection/LicenseVariableRadioElement.js +9 -19
  335. package/dist/components/StoreModalProductLicenseSelection/StoreModalProductLicense.d.ts +1 -1
  336. package/dist/components/StoreModalProductLicenseSelection/StoreModalProductLicense.js +19 -28
  337. package/dist/components/StoreModalProductLicenseSelection/index.d.ts +1 -1
  338. package/dist/components/StoreModalProductLicenseSelection/index.js +10 -17
  339. package/dist/components/StoreModalProductSummary/index.d.ts +1 -1
  340. package/dist/components/StoreModalProductSummary/index.js +45 -55
  341. package/dist/components/StripeLogo.js +4 -11
  342. package/dist/components/StripeProvider/index.d.ts +1 -1
  343. package/dist/components/StripeProvider/index.js +19 -29
  344. package/dist/components/Switch/index.js +1 -7
  345. package/dist/components/TestFontsForm/TestFontsFormElement.js +4 -12
  346. package/dist/components/TestFontsForm/index.d.ts +11 -4
  347. package/dist/components/TestFontsForm/index.js +80 -65
  348. package/dist/components/TestFontsForm/index.server.d.ts +7 -2
  349. package/dist/components/TestFontsForm/index.server.js +17 -14
  350. package/dist/components/TestModeBanner/index.d.ts +4 -1
  351. package/dist/components/TestModeBanner/index.js +13 -27
  352. package/dist/components/TextField/index.js +9 -17
  353. package/dist/components/ThemeConfig/index.d.ts +3 -5
  354. package/dist/components/ThemeConfig/index.js +12 -36
  355. package/dist/components/Tracking/index.js +11 -18
  356. package/dist/components/TypeTester/TypeTesterAlignButtons.d.ts +1 -1
  357. package/dist/components/TypeTester/TypeTesterAlignButtons.js +8 -16
  358. package/dist/components/TypeTester/TypeTesterBullet.d.ts +1 -1
  359. package/dist/components/TypeTester/TypeTesterBullet.js +4 -12
  360. package/dist/components/TypeTester/TypeTesterContent.d.ts +2 -2
  361. package/dist/components/TypeTester/TypeTesterContent.js +22 -21
  362. package/dist/components/TypeTester/TypeTesterContext.d.ts +2 -2
  363. package/dist/components/TypeTester/TypeTesterContext.js +10 -17
  364. package/dist/components/TypeTester/TypeTesterEditAll.js +10 -20
  365. package/dist/components/TypeTester/TypeTesterFamilies.d.ts +1 -1
  366. package/dist/components/TypeTester/TypeTesterFamilies.js +26 -37
  367. package/dist/components/TypeTester/TypeTesterFeatures.d.ts +1 -1
  368. package/dist/components/TypeTester/TypeTesterFeatures.js +28 -37
  369. package/dist/components/TypeTester/TypeTesterFeaturesButton.d.ts +1 -1
  370. package/dist/components/TypeTester/TypeTesterFeaturesButton.js +20 -30
  371. package/dist/components/TypeTester/TypeTesterFitter.d.ts +1 -1
  372. package/dist/components/TypeTester/TypeTesterFitter.js +5 -13
  373. package/dist/components/TypeTester/TypeTesterFloatingToolbar.d.ts +1 -1
  374. package/dist/components/TypeTester/TypeTesterFloatingToolbar.js +19 -28
  375. package/dist/components/TypeTester/TypeTesterInput.js +12 -22
  376. package/dist/components/TypeTester/TypeTesterSlider.js +7 -16
  377. package/dist/components/TypeTester/TypeTesterStandalone.d.ts +20 -6
  378. package/dist/components/TypeTester/TypeTesterStandalone.js +49 -39
  379. package/dist/components/TypeTester/TypeTesterStandalone.server.d.ts +6 -2
  380. package/dist/components/TypeTester/TypeTesterStandalone.server.js +20 -16
  381. package/dist/components/TypeTester/TypeTesterStandaloneElement.js +7 -16
  382. package/dist/components/TypeTester/TypeTesterState.d.ts +2 -2
  383. package/dist/components/TypeTester/TypeTesterState.js +6 -14
  384. package/dist/components/TypeTester/TypeTesterStyleSelect.d.ts +1 -1
  385. package/dist/components/TypeTester/TypeTesterStyleSelect.js +9 -17
  386. package/dist/components/TypeTester/TypeTesterStyleSelectData.d.ts +3 -3
  387. package/dist/components/TypeTester/TypeTesterStyleSelectData.js +31 -40
  388. package/dist/components/TypeTester/TypeTesterToolbar.d.ts +2 -2
  389. package/dist/components/TypeTester/TypeTesterToolbar.js +29 -39
  390. package/dist/components/TypeTester/TypeTesterVariableAxes.d.ts +1 -1
  391. package/dist/components/TypeTester/TypeTesterVariableAxes.js +16 -24
  392. package/dist/components/TypeTester/features.js +1 -8
  393. package/dist/components/TypeTester/index.d.ts +2 -2
  394. package/dist/components/TypeTester/index.js +45 -55
  395. package/dist/components/TypeTester/types.js +3 -11
  396. package/dist/components/TypeTester/useFeaturesData.d.ts +1 -1
  397. package/dist/components/TypeTester/useFeaturesData.js +7 -15
  398. package/dist/components/TypeTester/useTypeTesterStyler.d.ts +3 -3
  399. package/dist/components/TypeTester/useTypeTesterStyler.js +6 -13
  400. package/dist/components/TypeTesters/TypeTestersElement.js +4 -12
  401. package/dist/components/TypeTesters/index.d.ts +22 -5
  402. package/dist/components/TypeTesters/index.js +118 -71
  403. package/dist/components/TypeTesters/index.server.d.ts +7 -2
  404. package/dist/components/TypeTesters/index.server.js +20 -17
  405. package/dist/components/UrlContext.js +6 -12
  406. package/dist/components/VariableTableAmounts/index.d.ts +2 -2
  407. package/dist/components/VariableTableAmounts/index.js +9 -16
  408. package/dist/components/elements/Button/index.js +3 -11
  409. package/dist/components/elements/EmptyCart/index.js +10 -20
  410. package/dist/components/elements/StoreModalCartLayout/index.js +10 -18
  411. package/dist/components/elements/StoreModalContainer/StoreModalContainerContext.js +3 -9
  412. package/dist/components/elements/StoreModalContainer/index.js +17 -27
  413. package/dist/components/elements/StoreModalDownloadLayout/index.js +7 -15
  414. package/dist/components/elements/StoreModalFamily/index.js +8 -16
  415. package/dist/components/elements/StoreModalFamilyButton/index.d.ts +1 -1
  416. package/dist/components/elements/StoreModalFamilyButton/index.js +11 -20
  417. package/dist/components/elements/StoreModalIndexItem/index.js +9 -17
  418. package/dist/components/elements/StoreModalLicenseeIsBillingIdentityElement.js +20 -29
  419. package/dist/components/elements/StoreModalLoadingScreen/index.js +4 -12
  420. package/dist/components/elements/StoreModalPageContainer/index.js +5 -13
  421. package/dist/components/elements/StoreModalStyleButton/index.d.ts +1 -1
  422. package/dist/components/elements/StoreModalStyleButton/index.js +10 -18
  423. package/dist/components/elements/StoreModalUnifiedCheckout.d.ts +2 -2
  424. package/dist/components/elements/StoreModalUnifiedCheckout.js +114 -122
  425. package/dist/components/useConsent.js +4 -9
  426. package/dist/components/useFont.d.ts +1 -1
  427. package/dist/components/useFont.js +8 -15
  428. package/dist/components/useFontStyle.d.ts +1 -1
  429. package/dist/components/useFontStyle.js +12 -20
  430. package/dist/components/useInterval.js +5 -12
  431. package/dist/components/useTotalStyles.d.ts +1 -1
  432. package/dist/components/useTotalStyles.js +4 -12
  433. package/dist/corsError.js +4 -14
  434. package/dist/data/unicodeData.js +1 -1
  435. package/dist/fontLoader.js +3 -11
  436. package/dist/fontdue.css +127 -12
  437. package/dist/global-shim.d.ts +1 -0
  438. package/dist/global-shim.js +8 -0
  439. package/dist/hooks/useAutofit.js +11 -19
  440. package/dist/hooks/useLicenseAndOrderVariables.d.ts +2 -2
  441. package/dist/hooks/useLicenseAndOrderVariables.js +7 -12
  442. package/dist/hooks/useRefetchOnLicenseChanges.d.ts +1 -1
  443. package/dist/hooks/useRefetchOnLicenseChanges.js +7 -13
  444. package/dist/hooks/useResizeObserver.d.ts +11 -0
  445. package/dist/hooks/useResizeObserver.js +23 -0
  446. package/dist/hooks.js +9 -16
  447. package/dist/index.d.ts +1 -0
  448. package/dist/index.js +1 -0
  449. package/dist/loadFontdueProviderQuery.d.ts +3 -0
  450. package/dist/loadFontdueProviderQuery.js +10 -0
  451. package/dist/next/config.d.ts +41 -0
  452. package/dist/next/config.js +193 -0
  453. package/dist/next/image-loader.d.ts +7 -0
  454. package/dist/next/image-loader.js +39 -0
  455. package/dist/next/index.d.ts +2 -0
  456. package/dist/next/index.js +10 -0
  457. package/dist/next/revalidate.d.ts +1 -0
  458. package/dist/next/revalidate.js +37 -0
  459. package/dist/next/tenant.d.ts +26 -0
  460. package/dist/next/tenant.js +169 -0
  461. package/dist/react-ranger.d.js +0 -1
  462. package/dist/react-ranger.js +17 -24
  463. package/dist/reducer.d.ts +5 -5
  464. package/dist/reducer.js +15 -36
  465. package/dist/relay/environment.d.ts +1 -0
  466. package/dist/relay/environment.js +74 -34
  467. package/dist/relay/loadSerializableQuery.d.ts +3 -1
  468. package/dist/relay/loadSerializableQuery.js +4 -8
  469. package/dist/relay/serverConfig.d.ts +16 -0
  470. package/dist/relay/serverConfig.js +38 -0
  471. package/dist/relay/useSerializablePreloadedQuery.d.ts +3 -3
  472. package/dist/relay/useSerializablePreloadedQuery.js +26 -22
  473. package/dist/retryImport.js +1 -7
  474. package/dist/scripts/updateUnicodeData.js +0 -2
  475. package/dist/utils.d.ts +2 -2
  476. package/dist/utils.js +14 -36
  477. package/dist/vanilla/FontStyle.js +3 -11
  478. package/dist/vanilla/TruncatedMarkdown.js +2 -9
  479. package/dist/vite.d.ts +2 -0
  480. package/dist/vite.js +141 -0
  481. package/package.json +13 -9
  482. package/scripts/addJsExtensionsBabelPlugin.cjs +62 -0
  483. package/types/globals.d.ts +3 -0
  484. package/types/next-cache.d.ts +6 -0
  485. package/types/next-navigation.d.ts +6 -0
  486. package/vitest.config.ts +4 -0
  487. package/dist/__generated__/ServerConfigProviderQuery.graphql.d.ts +0 -24
  488. package/dist/__generated__/ServerConfigProviderQuery.graphql.js +0 -108
  489. package/dist/__generated__/TestModeBannerQuery.graphql.d.ts +0 -20
  490. package/dist/__generated__/ThemeConfigQuery.graphql.d.ts +0 -20
  491. package/dist/__generated__/ThemeConfigQuery.graphql.js +0 -87
  492. package/dist/components/CartButton/index.server.d.ts +0 -3
  493. package/dist/components/CartButton/index.server.js +0 -18
  494. package/dist/components/FontdueProvider/FontdueProviderClientComponent.d.ts +0 -14
  495. package/dist/components/FontdueProvider/FontdueProviderClientComponent.js +0 -61
  496. package/dist/components/ThemeConfig/index.server.d.ts +0 -2
  497. package/dist/components/ThemeConfig/index.server.js +0 -17
  498. package/fontdue.css +0 -2733
  499. package/fontdue.css.map +0 -1
package/dist/reducer.js CHANGED
@@ -1,28 +1,9 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.collectionSkuIdWithDiscount = void 0;
7
- Object.defineProperty(exports, "collectionSkuIdsDifferences", {
8
- enumerable: true,
9
- get: function () {
10
- return _utils.collectionSkuIdsDifferences;
11
- }
12
- });
13
- exports.createDefaultStore = createDefaultStore;
14
- exports.default = void 0;
15
- Object.defineProperty(exports, "isSelected", {
16
- enumerable: true,
17
- get: function () {
18
- return _utils.isSelected;
19
- }
20
- });
21
- var _productState = require("./components/Root/productState");
22
- var _redux = require("redux");
23
- var _reactRedux = require("react-redux");
24
- var _utils = require("./utils");
25
- var _ConfigContext = require("./components/ConfigContext");
1
+ import { populateProductStateReducer } from './components/Root/productState.js';
2
+ import { createStore } from 'redux';
3
+ import { shallowEqual } from 'react-redux';
4
+ import { collectionSkuIdsDifferences, collTransitivelyContainsSkuId, isSelected } from './utils.js';
5
+ import { makeConfig } from './components/ConfigContext.js';
6
+ export { collectionSkuIdsDifferences, isSelected };
26
7
  const unselectLicense = (state, action) => {
27
8
  if (!(action.type === 'PRECART_UNSELECT_LICENSE' || action.type === 'PRECART_TOGGLE_LICENSE')) return state;
28
9
  return {
@@ -80,8 +61,8 @@ const selectLicenseOption = (state, action) => {
80
61
  })
81
62
  };
82
63
  };
83
- const collectionSkuIdWithDiscount = (state, skuId) => {
84
- const differences = (0, _utils.collectionSkuIdsDifferences)(state, skuId);
64
+ export const collectionSkuIdWithDiscount = (state, skuId) => {
65
+ const differences = collectionSkuIdsDifferences(state, skuId);
85
66
  const collectionId = Object.keys(differences).filter(collSkuId => differences[collSkuId] <= state.skuPrices[skuId]).reduce((smallest, key) => {
86
67
  if (!smallest || differences[key] < differences[smallest]) return key;
87
68
  if (differences[key] === differences[smallest]) {
@@ -103,8 +84,7 @@ const collectionSkuIdWithDiscount = (state, skuId) => {
103
84
  if (collectionId) return [collectionId, differences[collectionId]];
104
85
  return [null, null];
105
86
  };
106
- exports.collectionSkuIdWithDiscount = collectionSkuIdWithDiscount;
107
- const selectedCollectionSkuIdContainingSkuId = (state, skuId) => Object.keys(state.selectedSkuIds).filter(id => state.selectedSkuIds[id] === true).find(selectedSkuId => (0, _utils.collTransitivelyContainsSkuId)(state.collectionStyleSkus, selectedSkuId, skuId));
87
+ const selectedCollectionSkuIdContainingSkuId = (state, skuId) => Object.keys(state.selectedSkuIds).filter(id => state.selectedSkuIds[id] === true).find(selectedSkuId => collTransitivelyContainsSkuId(state.collectionStyleSkus, selectedSkuId, skuId));
108
88
  const setKeysFalse = (acc, key) => {
109
89
  acc[key] = false;
110
90
  return acc;
@@ -174,7 +154,7 @@ const unselectSkus = state => ({
174
154
  });
175
155
  const storeModalNavigate = (state, action) => {
176
156
  if (action.type !== 'STORE_MODAL_NAVIGATE') return state;
177
- if (state.storeModalRoute.name === action.route && (0, _reactRedux.shallowEqual)(state.storeModalRoute.variables, action.variables)) {
157
+ if (state.storeModalRoute.name === action.route && shallowEqual(state.storeModalRoute.variables, action.variables)) {
178
158
  return state;
179
159
  }
180
160
  return {
@@ -217,7 +197,7 @@ const reducer = (state, action) => {
217
197
  if (!state) throw 'Reducer called without state';
218
198
  switch (action.type) {
219
199
  case 'POPULATE_PRODUCT_STATE':
220
- return (0, _productState.populateProductStateReducer)(state, action);
200
+ return populateProductStateReducer(state, action);
221
201
  case 'PRECART_TOGGLE_LICENSE':
222
202
  return toggleLicense(state, action);
223
203
  case 'PRECART_UNSELECT_LICENSE':
@@ -267,8 +247,8 @@ const reducer = (state, action) => {
267
247
  return state;
268
248
  }
269
249
  };
270
- function createDefaultStore(config) {
271
- const configValue = (0, _ConfigContext.makeConfig)(config);
250
+ export function createDefaultStore(config) {
251
+ const configValue = makeConfig(config);
272
252
  const initialRoute = configValue.storeModal.hideAllCollections ? {
273
253
  name: 'cart'
274
254
  } : {
@@ -277,7 +257,7 @@ function createDefaultStore(config) {
277
257
  excludeTags: configValue.storeModal.indexExcludeTags
278
258
  }
279
259
  };
280
- return (0, _redux.createStore)(reducer, {
260
+ return createStore(reducer, {
281
261
  selectedSkuIds: {},
282
262
  // { [skuId]: Boolean }
283
263
  licenseOptions: [],
@@ -293,5 +273,4 @@ function createDefaultStore(config) {
293
273
  licenseeIsBillingIdentity: null
294
274
  });
295
275
  }
296
- var _default = reducer;
297
- exports.default = _default;
276
+ export default reducer;
@@ -1,4 +1,5 @@
1
1
  import { Environment, RequestParameters, QueryResponseCache, Variables, GraphQLResponse } from 'relay-runtime';
2
+ export declare function createNetworkFetch(options?: CreateRelayEnvironmentOptions): (request: RequestParameters, variables: Variables) => Promise<GraphQLResponse>;
2
3
  export declare const networkFetch: (request: RequestParameters, variables: Variables) => Promise<GraphQLResponse>;
3
4
  export declare const responseCache: QueryResponseCache | null;
4
5
  interface CreateRelayEnvironmentOptions {
@@ -1,46 +1,81 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createEnvironment = createEnvironment;
7
- exports.responseCache = exports.networkFetch = void 0;
8
- exports.useCurrentEnvironment = useCurrentEnvironment;
9
- var _react = require("react");
10
- var _relayRuntime = require("relay-runtime");
11
- var _corsError = require("../corsError");
12
- var _package = require("../../package.json");
13
- // @ts-ignore - JSON import
1
+ import { Environment, Network, RecordSource, Store, QueryResponseCache } from 'relay-runtime';
2
+ import { handlePossibleCorsError } from '../corsError.js';
3
+ import { getFontdueServerConfig } from './serverConfig.js';
14
4
 
5
+ // `__FONTDUE_JS_VERSION__` is replaced by an inline babel plugin
6
+ // (defineVersionPlugin in .babelrc.cjs) with the literal package.json#version.
7
+ const version = "3.0.0-alpha10";
15
8
  const IS_SERVER = typeof window === typeof undefined;
16
- const FONTDUE_URL = typeof process !== 'undefined' ? process.env.NEXT_PUBLIC_FONTDUE_URL : undefined;
17
- if (IS_SERVER && (FONTDUE_URL == null || FONTDUE_URL === '')) {
18
- throw new Error('fontdue-js requires a Fontdue URL to be configured via environment variables on the server, please set a NEXT_PUBLIC_FONTDUE_URL');
9
+
10
+ // Read env from either process.env (Node/Next.js) or import.meta.env (Vite/Astro).
11
+ // Prefer the framework-agnostic FONTDUE_URL name; fall back to NEXT_PUBLIC_FONTDUE_URL
12
+ // for backwards compatibility with existing Next.js integrations.
13
+ function readEnv(name) {
14
+ if (typeof process !== 'undefined' && process.env) {
15
+ const v = process.env[name];
16
+ if (v != null && v !== '') return v;
17
+ }
18
+ try {
19
+ // @ts-ignore - import.meta.env is Vite/Astro-specific
20
+ const metaEnv = typeof import.meta !== 'undefined' ? import.meta.env : undefined;
21
+ if (metaEnv) {
22
+ const v = metaEnv[name] ?? metaEnv[`PUBLIC_${name}`] ?? metaEnv[`VITE_${name}`];
23
+ if (v != null && v !== '') return v;
24
+ }
25
+ } catch {}
26
+ return undefined;
19
27
  }
20
- const STRIPE_INTEGRATION = typeof process !== 'undefined' ? process.env.NEXT_PUBLIC_FONTDUE_STRIPE_INTEGRATION : undefined;
28
+
29
+ // On Next.js client bundles, only LITERAL `process.env.NAME` accesses get
30
+ // inlined at build time — `process.env[dynamicName]` stays as a runtime
31
+ // lookup that returns undefined in the browser. Check literal references
32
+ // first so existing Next.js consumers keep working without changes.
33
+ const NEXT_PUBLIC_URL = typeof process !== 'undefined' && process.env ? process.env.NEXT_PUBLIC_FONTDUE_URL : undefined;
34
+ const NEXT_PUBLIC_STRIPE = typeof process !== 'undefined' && process.env ? process.env.NEXT_PUBLIC_FONTDUE_STRIPE_INTEGRATION : undefined;
35
+ const FONTDUE_URL = readEnv('FONTDUE_URL') ?? readEnv('NEXT_PUBLIC_FONTDUE_URL') ?? NEXT_PUBLIC_URL;
36
+ const STRIPE_INTEGRATION = readEnv('FONTDUE_STRIPE_INTEGRATION') ?? readEnv('NEXT_PUBLIC_FONTDUE_STRIPE_INTEGRATION') ?? NEXT_PUBLIC_STRIPE;
21
37
  const CACHE_TTL = 10 * 1000; // 10 seconds, to resolve preloaded results
22
38
 
23
- function createNetworkFetch(options) {
39
+ export function createNetworkFetch(options) {
24
40
  return async function networkFetch(request, variables) {
25
- const url = (FONTDUE_URL && `${FONTDUE_URL}/graphql`) ?? ((options === null || options === void 0 ? void 0 : options.url) ?? '') + '/graphql';
41
+ // Per-render server config (set via setFontdueServerConfig or the
42
+ // FontdueProvider server entrypoint). Resolved per call, not per
43
+ // createNetworkFetch, because module-level fetchers outlive renders.
44
+ const serverConfig = IS_SERVER ? getFontdueServerConfig() : undefined;
45
+ const base = (options === null || options === void 0 ? void 0 : options.url) ?? (serverConfig === null || serverConfig === void 0 ? void 0 : serverConfig.url) ?? FONTDUE_URL;
46
+ if (IS_SERVER && (base == null || base === '')) {
47
+ throw new Error('fontdue-js: no Fontdue URL configured for server-side fetch. ' + 'Set FONTDUE_URL / PUBLIC_FONTDUE_URL / VITE_FONTDUE_URL in your environment, ' + 'pass `url` to loadSerializableQuery, or call setFontdueServerConfig ' + '(or render <FontdueProvider url=…>) earlier in the server render.');
48
+ }
49
+ const url = `${base ?? ''}/graphql`;
26
50
  for (let attempt = 0; attempt <= 2; attempt++) {
27
51
  try {
28
52
  const resp = await fetch(url + `?queryName=${request.name}`, {
29
53
  method: 'POST',
30
54
  credentials: 'include',
31
55
  headers: {
56
+ ...(serverConfig === null || serverConfig === void 0 ? void 0 : serverConfig.headers),
32
57
  Accept: 'application/json',
33
58
  'Content-Type': 'application/json',
34
- 'fontdue-stripe-integration': STRIPE_INTEGRATION ?? ((options === null || options === void 0 ? void 0 : options.stripeIntegration) || 'dynamic'),
35
- 'fontdue-client-version': _package.version
59
+ 'fontdue-stripe-integration': (options === null || options === void 0 ? void 0 : options.stripeIntegration) ?? STRIPE_INTEGRATION ?? 'dynamic',
60
+ 'fontdue-client-version': version
36
61
  },
37
62
  body: JSON.stringify({
38
63
  query: request.text,
39
64
  variables
40
65
  }),
66
+ // Server-side fetches are all site content (per-session data is
67
+ // fetched client-side only), so opt them into Next's data cache —
68
+ // without this, Next 15 treats them as no-store and silently makes
69
+ // every page fully dynamic. The tags below let the revalidate
70
+ // handler purge them when content changes. Inert outside Next:
71
+ // Node's fetch accepts and ignores this cache mode, and the
72
+ // browser path doesn't set it.
73
+ ...(IS_SERVER ? {
74
+ cache: 'force-cache'
75
+ } : {}),
41
76
  // @ts-ignore
42
77
  next: {
43
- tags: ['graphql', `operation:${request.name}`]
78
+ tags: ['graphql', ...((serverConfig === null || serverConfig === void 0 ? void 0 : serverConfig.cacheTags) ?? []), `operation:${request.name}`]
44
79
  }
45
80
  });
46
81
  const json = await resp.json();
@@ -64,7 +99,7 @@ function createNetworkFetch(options) {
64
99
  await new Promise(resolve => setTimeout(resolve, 1000));
65
100
  continue;
66
101
  }
67
- if ((0, _corsError.handlePossibleCorsError)(error, url)) {
102
+ if (handlePossibleCorsError(error, url)) {
68
103
  return {
69
104
  data: undefined,
70
105
  errors: [{
@@ -80,13 +115,11 @@ function createNetworkFetch(options) {
80
115
  throw new Error('Unexpected: exhausted retries');
81
116
  };
82
117
  }
83
- const networkFetch = createNetworkFetch();
84
- exports.networkFetch = networkFetch;
85
- const responseCache = IS_SERVER ? null : new _relayRuntime.QueryResponseCache({
118
+ export const networkFetch = createNetworkFetch();
119
+ export const responseCache = IS_SERVER ? null : new QueryResponseCache({
86
120
  size: 250,
87
121
  ttl: CACHE_TTL
88
122
  });
89
- exports.responseCache = responseCache;
90
123
  function createNetwork(options) {
91
124
  async function fetchResponse(params, variables, cacheConfig) {
92
125
  const isQuery = params.operationKind === 'query';
@@ -101,20 +134,27 @@ function createNetwork(options) {
101
134
  }
102
135
  return createNetworkFetch(options)(params, variables);
103
136
  }
104
- const network = _relayRuntime.Network.create(fetchResponse);
137
+ const network = Network.create(fetchResponse);
105
138
  return network;
106
139
  }
107
- function createEnvironment(options) {
108
- return new _relayRuntime.Environment({
140
+ export function createEnvironment(options) {
141
+ return new Environment({
109
142
  network: createNetwork(options),
110
- store: new _relayRuntime.Store(_relayRuntime.RecordSource.create()),
143
+ store: new Store(RecordSource.create()),
111
144
  isServer: IS_SERVER
112
145
  });
113
146
  }
114
- function useCurrentEnvironment(options) {
147
+
148
+ // Client-side Relay environment is a module-level singleton so multiple
149
+ // FontdueProviders on a page (e.g. one per Astro island) share cache and
150
+ // data. Server-side stays per-render to avoid cross-request pollution.
151
+ let clientEnvironment = null;
152
+ export function useCurrentEnvironment(options) {
115
153
  if (IS_SERVER) {
116
154
  return createEnvironment(options);
117
155
  }
118
- const environmentRef = (0, _react.useRef)(createEnvironment(options));
119
- return environmentRef.current;
156
+ if (clientEnvironment == null) {
157
+ clientEnvironment = createEnvironment(options);
158
+ }
159
+ return clientEnvironment;
120
160
  }
@@ -43,5 +43,7 @@ export interface SerializablePreloadedQuery<TQuery extends OperationType> {
43
43
  type RequireAllWithNull<T> = {
44
44
  [K in keyof T]-?: T[K] | null;
45
45
  };
46
- export default function loadSerializableQuery<TQuery extends OperationType>(query: GraphQLTaggedNode, variables: RequireAllWithNull<VariablesOf<TQuery>>): Promise<SerializablePreloadedQuery<TQuery>>;
46
+ export default function loadSerializableQuery<TQuery extends OperationType>(query: GraphQLTaggedNode, variables: RequireAllWithNull<VariablesOf<TQuery>>, options?: {
47
+ url?: string;
48
+ }): Promise<SerializablePreloadedQuery<TQuery>>;
47
49
  export {};
@@ -1,10 +1,5 @@
1
- "use strict";
1
+ import { createNetworkFetch } from './environment.js';
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = loadSerializableQuery;
7
- var _environment = require("./environment");
8
3
  /**
9
4
  * RELAY CACHE KEY NORMALIZATION
10
5
  *
@@ -45,9 +40,10 @@ var _environment = require("./environment");
45
40
  // Call into raw network fetch to get serializable GraphQL query response
46
41
  // This response will be sent to the client to "warm" the QueryResponseCache
47
42
  // to avoid the client fetches.
48
- async function loadSerializableQuery(query, variables) {
43
+ export default async function loadSerializableQuery(query, variables, options) {
49
44
  if (!('params' in query)) throw new Error('Params not found in query, is it a fragment instead of a query?');
50
- const response = await (0, _environment.networkFetch)(query.params, variables);
45
+ const fetcher = createNetworkFetch(options);
46
+ const response = await fetcher(query.params, variables);
51
47
  return {
52
48
  params: query.params,
53
49
  variables,
@@ -0,0 +1,16 @@
1
+ export interface FontdueServerConfig {
2
+ /** Base URL for server-side GraphQL fetches, e.g. https://acme.fontdue.com */
3
+ url?: string;
4
+ /** Extra headers sent with every server-side GraphQL fetch. */
5
+ headers?: Record<string, string>;
6
+ /** Extra Next.js fetch cache tags applied to every server-side GraphQL fetch. */
7
+ cacheTags?: string[];
8
+ /**
9
+ * The site domain this render is for, when known. Set by
10
+ * fontdue-js/next's prepareFontdueRender so render-scoped helpers
11
+ * (currentFontdueEndpoint) can recover it.
12
+ */
13
+ domain?: string;
14
+ }
15
+ export declare function setFontdueServerConfig(config: FontdueServerConfig): void;
16
+ export declare function getFontdueServerConfig(): FontdueServerConfig | undefined;
@@ -0,0 +1,38 @@
1
+ // Per-render configuration for server-side GraphQL fetches.
2
+ //
3
+ // React Server Components have no context API, so a `<FontdueProvider url=…>`
4
+ // prop cannot reach the nested server components that preload queries — the
5
+ // prop historically only configured client-side fetches. What RSC does have
6
+ // is React.cache(): a memoization store scoped to one server render pass and
7
+ // shared by every server component in it. We use a single cache cell as a
8
+ // render-scoped mutable slot: the host app (or the FontdueProvider server
9
+ // entrypoint) writes the config early in the render, and every later
10
+ // server-side fetch in the same pass reads it.
11
+ //
12
+ // Unlike AsyncLocalStorage-based approaches (e.g. Next's headers()), reading
13
+ // this store does not opt the route into dynamic rendering, so static
14
+ // generation and ISR keep working. Each render pass gets a fresh store, so
15
+ // concurrent requests cannot leak config into each other.
16
+ //
17
+ // Caveat that callers must own: the write has to happen in the same render
18
+ // pass, before the fetch. A provider in a layout covers full-page renders,
19
+ // but an App Router soft navigation re-renders only the page segment — set
20
+ // the config at the top of each page (or in a shared data helper every page
21
+ // calls) when pages contain Fontdue components.
22
+ //
23
+ // Outside an RSC render (client bundles, SSR setups without React.cache
24
+ // semantics) the slot degrades to a throwaway object: writes become no-ops
25
+ // and the environment variables remain the configuration source.
26
+
27
+ import * as React from 'react';
28
+ const getSlot = typeof React.cache === 'function' ? React.cache(() => ({
29
+ current: undefined
30
+ })) : () => ({
31
+ current: undefined
32
+ });
33
+ export function setFontdueServerConfig(config) {
34
+ getSlot().current = config;
35
+ }
36
+ export function getFontdueServerConfig() {
37
+ return getSlot().current;
38
+ }
@@ -1,4 +1,4 @@
1
1
  import { PreloadedQuery, PreloadFetchPolicy } from "react-relay";
2
- import { OperationType } from "relay-runtime";
3
- import { SerializablePreloadedQuery } from "./loadSerializableQuery";
4
- export default function useSerializablePreloadedQuery<TQuery extends OperationType>(preloadQuery: SerializablePreloadedQuery<TQuery>, fetchPolicy?: PreloadFetchPolicy): PreloadedQuery<TQuery>;
2
+ import { GraphQLTaggedNode, OperationType } from "relay-runtime";
3
+ import { SerializablePreloadedQuery } from "./loadSerializableQuery.js";
4
+ export default function useSerializablePreloadedQuery<TQuery extends OperationType>(preloadQuery: SerializablePreloadedQuery<TQuery>, fetchPolicy?: PreloadFetchPolicy, query?: GraphQLTaggedNode): PreloadedQuery<TQuery>;
@@ -1,29 +1,33 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = useSerializablePreloadedQuery;
7
- var _react = require("react");
8
- var _reactRelay = require("react-relay");
9
- var _environment = require("./environment");
10
1
  // Convert preloaded query object (with raw GraphQL Response) into
11
2
  // Relay's PreloadedQuery.
12
3
 
13
- // This hook convert serializable preloaded query
14
- // into Relay's PreloadedQuery object.
15
- // It is also writes this serializable preloaded query
16
- // into QueryResponseCache, so we the network layer
17
- // can use these cache results when fetching data
18
- // in `usePreloadedQuery`.
19
- function useSerializablePreloadedQuery(
20
- //environment: IEnvironment,
21
- preloadQuery) {
4
+ import { useMemo } from "react";
5
+ import { useRelayEnvironment } from "react-relay";
6
+ import { createOperationDescriptor, getRequest } from "relay-runtime";
7
+ import { responseCache } from "./environment.js";
8
+ // This hook converts a serializable preloaded query into Relay's PreloadedQuery
9
+ // object. It primes Relay so that `usePreloadedQuery` resolves synchronously on
10
+ // both server and client:
11
+ // - On the client, it warms the QueryResponseCache so network-layer lookups hit.
12
+ // - When a `query` tagged node is provided, it also commits the response
13
+ // payload directly into the environment's Store via `commitPayload`. This is
14
+ // required for SSR frameworks (Astro, Vite SSR, etc.) whose non-streaming
15
+ // `renderToString` needs the data available synchronously during render.
16
+ export default function useSerializablePreloadedQuery(preloadQuery) {
22
17
  let fetchPolicy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "store-or-network";
23
- (0, _react.useMemo)(() => {
18
+ let query = arguments.length > 2 ? arguments[2] : undefined;
19
+ const environment = useRelayEnvironment();
20
+ useMemo(() => {
24
21
  writePreloadedQueryToCache(preloadQuery);
25
- }, [preloadQuery]);
26
- const environment = (0, _reactRelay.useRelayEnvironment)();
22
+ if (query != null) {
23
+ const response = preloadQuery.response;
24
+ const singular = Array.isArray(response) ? response[0] : response;
25
+ if ((singular === null || singular === void 0 ? void 0 : singular.data) != null) {
26
+ const operation = createOperationDescriptor(getRequest(query), preloadQuery.variables);
27
+ environment.commitPayload(operation, singular.data);
28
+ }
29
+ }
30
+ }, [preloadQuery, environment, query]);
27
31
  return {
28
32
  environment,
29
33
  fetchKey: preloadQuery.params.id ?? preloadQuery.params.cacheID,
@@ -40,5 +44,5 @@ preloadQuery) {
40
44
  function writePreloadedQueryToCache(preloadedQueryObject) {
41
45
  // @ts-ignore
42
46
  const cacheKey = preloadedQueryObject.params.id ?? preloadedQueryObject.params.cacheID;
43
- _environment.responseCache === null || _environment.responseCache === void 0 ? void 0 : _environment.responseCache.set(cacheKey, preloadedQueryObject.variables, preloadedQueryObject.response);
47
+ responseCache === null || responseCache === void 0 ? void 0 : responseCache.set(cacheKey, preloadedQueryObject.variables, preloadedQueryObject.response);
44
48
  }
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = retryImport;
7
1
  /**
8
2
  * Wraps a dynamic import in retry logic.
9
3
  *
@@ -16,7 +10,7 @@ exports.default = retryImport;
16
10
  *
17
11
  * See: https://github.com/whatwg/html/issues/6768
18
12
  */
19
- function retryImport(load) {
13
+ export default function retryImport(load) {
20
14
  let retries = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
21
15
  let delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1000;
22
16
  return load().catch(error => {
@@ -1,5 +1,3 @@
1
- "use strict";
2
-
3
1
  const https = require('https');
4
2
  const fs = require('fs');
5
3
  const path = require('path');
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { CollectionStyleSkus } from './components/Root/productState';
2
- import type { FontdueState } from './reducer';
1
+ import { CollectionStyleSkus } from './components/Root/productState.js';
2
+ import type { FontdueState } from './reducer.js';
3
3
  export declare const pluralize: (count: number, singular: string, plural?: string) => string;
4
4
  export declare function notEmpty<TValue>(value: TValue | null | undefined): value is TValue;
5
5
  export declare function kebabToCamel(str: string): string;
package/dist/utils.js CHANGED
@@ -1,46 +1,32 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.compareVariableSettings = exports.collectionSkuIdsDifferences = exports.collTransitivelyContainsSkuId = exports.collContainsSkuId = void 0;
7
- exports.getFeatureGlyphs = getFeatureGlyphs;
8
- exports.isSelected = exports.inspect = void 0;
9
- exports.kebabToCamel = kebabToCamel;
10
- exports.notEmpty = notEmpty;
11
- exports.variableSettingsCSS = exports.variableInstanceSettings = exports.variableInstanceCSS = exports.pluralize = exports.parseCustomProperties = void 0;
12
- const pluralize = (count, singular, plural) => {
1
+ export const pluralize = (count, singular, plural) => {
13
2
  if (count === 1) return `1 ${singular}`;
14
3
  if (!plural) return `${count} ${singular}s`;
15
4
  return `${count}\xa0${plural}`;
16
5
  };
17
- exports.pluralize = pluralize;
18
- function notEmpty(value) {
6
+ export function notEmpty(value) {
19
7
  return value !== null && value !== undefined;
20
8
  }
21
- function kebabToCamel(str) {
9
+ export function kebabToCamel(str) {
22
10
  return str.replace(/-([a-z])/g, function (g) {
23
11
  return g[1].toUpperCase();
24
12
  });
25
13
  }
26
14
 
27
15
  // where coll is a member of `collectionStyleSkus`;
28
- const collContainsSkuId = (coll, skuIdOrStyleId) => {
16
+ export const collContainsSkuId = (coll, skuIdOrStyleId) => {
29
17
  if (!coll) return false;
30
18
  return coll.childrenSkuIds.indexOf(skuIdOrStyleId) >= 0 || coll.fontStyleSkuIds.indexOf(skuIdOrStyleId) >= 0 || coll.fontStyleIds.indexOf(skuIdOrStyleId) >= 0;
31
19
  };
32
20
 
33
21
  // Transitive containment check — walks the collection hierarchy to find
34
22
  // if a SKU is contained at any depth (e.g., collection bundle → family → bundle)
35
- exports.collContainsSkuId = collContainsSkuId;
36
- const collTransitivelyContainsSkuId = (collectionStyleSkus, collSkuId, skuIdOrStyleId) => {
23
+ export const collTransitivelyContainsSkuId = (collectionStyleSkus, collSkuId, skuIdOrStyleId) => {
37
24
  const coll = collectionStyleSkus[collSkuId];
38
25
  if (!coll) return false;
39
26
  if (collContainsSkuId(coll, skuIdOrStyleId)) return true;
40
27
  return coll.childrenSkuIds.some(childSkuId => collTransitivelyContainsSkuId(collectionStyleSkus, childSkuId, skuIdOrStyleId));
41
28
  };
42
- exports.collTransitivelyContainsSkuId = collTransitivelyContainsSkuId;
43
- const isSelected = skuIdOrStyleId => state => {
29
+ export const isSelected = skuIdOrStyleId => state => {
44
30
  if (!skuIdOrStyleId) return false;
45
31
  if (state.selectedSkuIds[skuIdOrStyleId] === true) return true;
46
32
  // get the collections that contain this skuId as a fontStyle or child
@@ -53,8 +39,7 @@ const isSelected = skuIdOrStyleId => state => {
53
39
  // find any collection ancestors that contain this skuId,
54
40
  // then for each collection, sum the price of selected skus,
55
41
  // and return the delta between the collection price and the sum.
56
- exports.isSelected = isSelected;
57
- const collectionSkuIdsDifferences = (state, skuId) => Object.keys(state.collectionStyleSkus).filter(collectionSkuId => {
42
+ export const collectionSkuIdsDifferences = (state, skuId) => Object.keys(state.collectionStyleSkus).filter(collectionSkuId => {
58
43
  return skuId === collectionSkuId || collTransitivelyContainsSkuId(state.collectionStyleSkus, collectionSkuId, skuId);
59
44
  }).reduce((acc, collectionSkuId) => {
60
45
  const selectedSkuIdsInColl = Object.keys(state.selectedSkuIds).filter(selectedSkuId => state.selectedSkuIds[selectedSkuId] === true && collTransitivelyContainsSkuId(state.collectionStyleSkus, collectionSkuId, selectedSkuId));
@@ -62,8 +47,7 @@ const collectionSkuIdsDifferences = (state, skuId) => Object.keys(state.collecti
62
47
  acc[collectionSkuId] = (state.skuPrices[collectionSkuId] ?? 0) - sumOfSelectedSkuIdsInColl;
63
48
  return acc;
64
49
  }, {});
65
- exports.collectionSkuIdsDifferences = collectionSkuIdsDifferences;
66
- const variableInstanceSettings = instance => instance === null || instance === void 0 ? void 0 : instance.coordinates.reduce((acc, _ref) => {
50
+ export const variableInstanceSettings = instance => instance === null || instance === void 0 ? void 0 : instance.coordinates.reduce((acc, _ref) => {
67
51
  let {
68
52
  axis,
69
53
  value
@@ -71,14 +55,11 @@ const variableInstanceSettings = instance => instance === null || instance === v
71
55
  acc[axis] = value;
72
56
  return acc;
73
57
  }, {});
74
- exports.variableInstanceSettings = variableInstanceSettings;
75
- const compareVariableSettings = (instance, settings) => instance.coordinates.every(coord => settings[coord.axis] === coord.value);
76
- exports.compareVariableSettings = compareVariableSettings;
77
- const variableSettingsCSS = variableSettings => ({
58
+ export const compareVariableSettings = (instance, settings) => instance.coordinates.every(coord => settings[coord.axis] === coord.value);
59
+ export const variableSettingsCSS = variableSettings => ({
78
60
  fontVariationSettings: Object.keys(variableSettings).map(axis => `'${axis}' ${variableSettings[axis]}`).join(',')
79
61
  });
80
- exports.variableSettingsCSS = variableSettingsCSS;
81
- const variableInstanceCSS = variableInstance => ({
62
+ export const variableInstanceCSS = variableInstance => ({
82
63
  fontVariationSettings: variableInstance.coordinates.map(_ref2 => {
83
64
  let {
84
65
  axis,
@@ -87,8 +68,7 @@ const variableInstanceCSS = variableInstance => ({
87
68
  return `'${axis}' ${value}`;
88
69
  }).join(',')
89
70
  });
90
- exports.variableInstanceCSS = variableInstanceCSS;
91
- const parseCustomProperties = props => {
71
+ export const parseCustomProperties = props => {
92
72
  if (!props) return {};
93
73
  return props.reduce((acc, prop) => {
94
74
  const [key, val] = prop.split(':');
@@ -96,13 +76,11 @@ const parseCustomProperties = props => {
96
76
  return acc;
97
77
  }, {});
98
78
  };
99
- exports.parseCustomProperties = parseCustomProperties;
100
- const inspect = value => {
79
+ export const inspect = value => {
101
80
  console.log(value);
102
81
  return value;
103
82
  };
104
- exports.inspect = inspect;
105
- function getFeatureGlyphs(supportedLanguages) {
83
+ export function getFeatureGlyphs(supportedLanguages) {
106
84
  if (supportedLanguages !== null && supportedLanguages !== void 0 && supportedLanguages.includes('en')) return 'Aa';
107
85
  if (supportedLanguages !== null && supportedLanguages !== void 0 && supportedLanguages.includes('ar')) return 'ت';
108
86
  if (supportedLanguages !== null && supportedLanguages !== void 0 && supportedLanguages.includes('gr')) return 'Αα';
@@ -1,11 +1,4 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _fontfaceobserver = _interopRequireDefault(require("fontfaceobserver"));
8
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
1
+ import FontFaceObserver from 'fontfaceobserver';
9
2
  const FALLBACK_FAMILY = 'Fallback';
10
3
  const setStyle = ($el, _ref) => {
11
4
  let {
@@ -38,7 +31,7 @@ class FontStyle {
38
31
  fontWeight: 'normal',
39
32
  fontStyle: 'normal'
40
33
  });
41
- const observer = new _fontfaceobserver.default(fontFamily, {
34
+ const observer = new FontFaceObserver(fontFamily, {
42
35
  weight: fontWeight,
43
36
  style: fontStyle
44
37
  });
@@ -56,5 +49,4 @@ class FontStyle {
56
49
  });
57
50
  }
58
51
  }
59
- var _default = FontStyle;
60
- exports.default = _default;
52
+ export default FontStyle;
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
1
  function insertAfter(newNode, referenceNode) {
8
2
  referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
9
3
  }
@@ -19,10 +13,9 @@ const init = $element => {
19
13
  expand($element);
20
14
  });
21
15
  };
22
- class TruncatedMarkdown {
16
+ export default class TruncatedMarkdown {
23
17
  constructor() {
24
18
  this.$elements = [...document.querySelectorAll('[data-truncated-rest-text]')];
25
19
  this.$elements.forEach(init);
26
20
  }
27
- }
28
- exports.default = TruncatedMarkdown;
21
+ }
package/dist/vite.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import type { PluginOption } from 'vite';
2
+ export default function fontdueJs(): PluginOption[];