@redeemid/emdash 0.0.17 → 0.0.19

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 (50) hide show
  1. package/README.md +50 -18
  2. package/bin/redeemid-emdash.mjs +13 -1
  3. package/docs/developer-api.md +126 -0
  4. package/package.json +3 -1
  5. package/src/agents.ts +55 -0
  6. package/src/api-version.ts +6 -0
  7. package/src/blocks/CollectionBlock.astro +4 -1
  8. package/src/blocks/SearchBlock.astro +14 -0
  9. package/src/blocks/index.ts +2 -0
  10. package/src/blocks-names.ts +1 -0
  11. package/src/cart-ops.ts +164 -0
  12. package/src/catalog.ts +287 -0
  13. package/src/checkout.ts +73 -0
  14. package/src/client/redeemid.ts +563 -0
  15. package/src/components/BrowseControls.astro +87 -0
  16. package/src/components/Cart.astro +11 -5
  17. package/src/components/CartDrawer.astro +59 -0
  18. package/src/components/CartView.astro +1 -0
  19. package/src/components/Collection.astro +22 -17
  20. package/src/components/Content.astro +3 -2
  21. package/src/components/LockedPanel.astro +4 -2
  22. package/src/components/Notices.astro +2 -27
  23. package/src/components/Product.astro +115 -24
  24. package/src/components/ProductGrid.astro +52 -0
  25. package/src/components/ProductSearch.astro +83 -0
  26. package/src/components/Recommendations.astro +45 -0
  27. package/src/components/RedeemIDClient.astro +45 -0
  28. package/src/config.ts +14 -0
  29. package/src/contract.ts +50 -0
  30. package/src/files.ts +39 -1
  31. package/src/guard.ts +10 -3
  32. package/src/index.ts +3 -0
  33. package/src/log.ts +10 -3
  34. package/src/notices.ts +29 -0
  35. package/src/plugin.ts +32 -2
  36. package/src/rate-limit.ts +7 -0
  37. package/src/routes/api/cart.ts +84 -0
  38. package/src/routes/api/search.ts +49 -0
  39. package/src/routes/api/shared.ts +4 -0
  40. package/src/routes/api/state.ts +69 -0
  41. package/src/routes/buy.ts +4 -3
  42. package/src/routes/callback.ts +4 -2
  43. package/src/routes/cart-edit.ts +15 -66
  44. package/src/routes/cart.ts +4 -2
  45. package/src/routes/shared.ts +11 -0
  46. package/src/routes/webhook.ts +20 -2
  47. package/src/shopify.ts +37 -1
  48. package/src/storefront.ts +231 -59
  49. package/src/text.ts +43 -2
  50. package/src/version.ts +1 -1
package/src/text.ts CHANGED
@@ -41,7 +41,7 @@ export const STRINGS = {
41
41
  "Taxes and shipping are worked out at checkout.",
42
42
  "Checkout",
43
43
  ],
44
- collection: ["From {price}", "Sold out"],
44
+ collection: ["From {price}", "Sold out", "Add to cart"],
45
45
  contribution: ["Give", "Another amount ({currency})", "Quantity ({price} each)"],
46
46
  meter: ["This is your last free read this week.", "This is your last free read this month.", "You have 1 free read left this week.", "You have 1 free read left this month.", "You have {count} free reads left this week.", "You have {count} free reads left this month."],
47
47
  wall: [
@@ -113,7 +113,48 @@ export const STRINGS = {
113
113
  ],
114
114
  plan: ["Join", "You're on this plan.", "Not available right now."],
115
115
  preferences: ["Your preferences", "Save preferences", "Your preferences can't be loaded right now. Try again in a few minutes.", "Not set", "Yes", "No", "One per line."],
116
- product: ["Add to cart", "Buy now", "Option", "{option} ({price})", "{option} ({price}) sold out", "Quantity", "Sold out."],
116
+ product: [
117
+ "Add to cart",
118
+ "Buy now",
119
+ "Quantity",
120
+ "Sold out.",
121
+ "Image {number} of {count}",
122
+ "Purchase options",
123
+ "One-time purchase",
124
+ "{group}: {plan}",
125
+ "Not available in this combination.",
126
+ "Pair it with",
127
+ "You may also like",
128
+ ],
129
+ drawer: ["Your cart", "Close", "Loading your cart…"],
130
+ search: [
131
+ "Search products",
132
+ "Search",
133
+ "{count} suggestions",
134
+ "Search isn't available right now. Try again in a few minutes.",
135
+ "No products match “{query}”.",
136
+ "1 result for “{query}”",
137
+ "{count} results for “{query}”",
138
+ "Sort and filter",
139
+ "Sort by",
140
+ "Featured",
141
+ "Relevance",
142
+ "Best selling",
143
+ "Newest",
144
+ "Price, low to high",
145
+ "Price, high to low",
146
+ "Title, A to Z",
147
+ "Title, Z to A",
148
+ "{label} ({count})",
149
+ "Price",
150
+ "From",
151
+ "To",
152
+ "Apply",
153
+ "Clear filters",
154
+ "Pages",
155
+ "Previous page",
156
+ "Next page",
157
+ ],
117
158
  files: ["File not available", "Sign in to download this file.", "Sign in", "Your membership doesn't include this file."],
118
159
  } as const;
119
160
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.0.17";
1
+ export const VERSION = "0.0.19";