dineway 0.1.45 → 0.1.46

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 (387) hide show
  1. package/dist/{activity-events-CpcTzKpF.mjs → activity-events-CNk3clTT.mjs} +1 -1
  2. package/dist/{allowed-origins-3RuuoFjC.mjs → allowed-origins-DhipQNLb.mjs} +1 -1
  3. package/dist/api/route-utils.d.mts +9 -10
  4. package/dist/api/route-utils.mjs +13 -13
  5. package/dist/api/schemas/index.d.mts +2 -2
  6. package/dist/api/schemas/index.mjs +4 -4
  7. package/dist/{api-DkFSCD74.mjs → api-Bmfii2mH.mjs} +101 -56
  8. package/dist/{api-tokens-BFg7tiOQ.mjs → api-tokens-DtvdtIkm.mjs} +1 -1
  9. package/dist/{apply-TIoQ00aH.mjs → apply-BpRBCqUt.mjs} +76 -31
  10. package/dist/astro/index.d.mts +10 -11
  11. package/dist/astro/index.mjs +23 -3
  12. package/dist/astro/middleware/auth.d.mts +9 -10
  13. package/dist/astro/middleware/auth.mjs +5 -5
  14. package/dist/astro/middleware/redirect.mjs +13 -7
  15. package/dist/astro/middleware/request-context.mjs +3 -3
  16. package/dist/astro/middleware/seed.d.mts +1 -1
  17. package/dist/astro/middleware/seed.mjs +2 -2
  18. package/dist/astro/middleware/setup.mjs +1 -1
  19. package/dist/astro/middleware.mjs +120 -82
  20. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +5 -5
  21. package/dist/astro/routes/api/admin/allowed-domains/index.mjs +5 -5
  22. package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
  23. package/dist/astro/routes/api/admin/api-tokens/index.mjs +6 -6
  24. package/dist/astro/routes/api/admin/briefing.mjs +17 -17
  25. package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.d.mts +7 -0
  26. package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +17 -0
  27. package/dist/astro/routes/api/admin/byline-fields/_slug_.d.mts +9 -0
  28. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +38 -0
  29. package/dist/astro/routes/api/admin/byline-fields/index.d.mts +8 -0
  30. package/dist/astro/routes/api/admin/byline-fields/index.mjs +31 -0
  31. package/dist/astro/routes/api/admin/byline-fields/reorder.d.mts +7 -0
  32. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +24 -0
  33. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +27 -27
  34. package/dist/astro/routes/api/admin/bylines/_id_/translations.d.mts +8 -0
  35. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +57 -0
  36. package/dist/astro/routes/api/admin/bylines/index.mjs +30 -26
  37. package/dist/astro/routes/api/admin/comments/_id_/status.mjs +11 -11
  38. package/dist/astro/routes/api/admin/comments/_id_.mjs +5 -5
  39. package/dist/astro/routes/api/admin/comments/bulk.mjs +9 -9
  40. package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
  41. package/dist/astro/routes/api/admin/comments/index.mjs +9 -9
  42. package/dist/astro/routes/api/admin/context/_id_/history.mjs +23 -23
  43. package/dist/astro/routes/api/admin/context/_id_/index.mjs +23 -23
  44. package/dist/astro/routes/api/admin/context/_id_/review.mjs +27 -27
  45. package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +27 -27
  46. package/dist/astro/routes/api/admin/context/diff.mjs +26 -26
  47. package/dist/astro/routes/api/admin/context/index.mjs +27 -27
  48. package/dist/astro/routes/api/admin/context/stale.mjs +26 -26
  49. package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +23 -23
  50. package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +26 -26
  51. package/dist/astro/routes/api/admin/hitl-requests/index.mjs +26 -26
  52. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +24 -24
  53. package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +2 -2
  54. package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +6 -6
  55. package/dist/astro/routes/api/admin/oauth-clients/index.mjs +6 -6
  56. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +48 -44
  57. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +48 -44
  58. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +42 -38
  59. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +47 -43
  60. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +47 -43
  61. package/dist/astro/routes/api/admin/plugins/index.mjs +42 -38
  62. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
  63. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +42 -38
  64. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +47 -43
  65. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +42 -38
  66. package/dist/astro/routes/api/admin/plugins/updates.mjs +42 -38
  67. package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +5 -5
  68. package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +26 -26
  69. package/dist/astro/routes/api/admin/review-requests/index.mjs +9 -9
  70. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +42 -38
  71. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
  72. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +42 -38
  73. package/dist/astro/routes/api/admin/users/_id_/disable.mjs +1 -1
  74. package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
  75. package/dist/astro/routes/api/admin/users/_id_/index.mjs +5 -5
  76. package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
  77. package/dist/astro/routes/api/admin/users/index.mjs +5 -5
  78. package/dist/astro/routes/api/auth/dev-bypass.mjs +5 -5
  79. package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
  80. package/dist/astro/routes/api/auth/invite/complete.mjs +9 -9
  81. package/dist/astro/routes/api/auth/invite/index.mjs +6 -6
  82. package/dist/astro/routes/api/auth/invite/register-options.mjs +8 -8
  83. package/dist/astro/routes/api/auth/logout.mjs +2 -2
  84. package/dist/astro/routes/api/auth/magic-link/send.mjs +8 -8
  85. package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
  86. package/dist/astro/routes/api/auth/me.mjs +20 -11
  87. package/dist/astro/routes/api/auth/mode.mjs +1 -1
  88. package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +2 -2
  89. package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
  90. package/dist/astro/routes/api/auth/passkey/_id_.mjs +5 -5
  91. package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
  92. package/dist/astro/routes/api/auth/passkey/options.mjs +10 -10
  93. package/dist/astro/routes/api/auth/passkey/register/options.mjs +8 -8
  94. package/dist/astro/routes/api/auth/passkey/register/verify.mjs +9 -9
  95. package/dist/astro/routes/api/auth/passkey/verify.mjs +9 -9
  96. package/dist/astro/routes/api/auth/setup-token/index.mjs +5 -5
  97. package/dist/astro/routes/api/auth/setup-token/verify.mjs +2 -2
  98. package/dist/astro/routes/api/auth/signup/complete.mjs +9 -9
  99. package/dist/astro/routes/api/auth/signup/request.mjs +8 -8
  100. package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
  101. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +12 -12
  102. package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
  103. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +5 -5
  104. package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +5 -5
  105. package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +5 -5
  106. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +11 -11
  107. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +9 -9
  108. package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +5 -5
  109. package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
  110. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +9 -9
  111. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +20 -14
  112. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
  113. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +5 -5
  114. package/dist/astro/routes/api/content/_collection_/_id_.mjs +12 -10
  115. package/dist/astro/routes/api/content/_collection_/index.mjs +9 -9
  116. package/dist/astro/routes/api/content/_collection_/trash.mjs +6 -6
  117. package/dist/astro/routes/api/dashboard.mjs +8 -8
  118. package/dist/astro/routes/api/dev/emails.mjs +2 -2
  119. package/dist/astro/routes/api/health.mjs +1 -1
  120. package/dist/astro/routes/api/import/probe.d.mts +3 -3
  121. package/dist/astro/routes/api/import/probe.mjs +10 -10
  122. package/dist/astro/routes/api/import/wordpress/analyze.mjs +7 -7
  123. package/dist/astro/routes/api/import/wordpress/execute.mjs +29 -28
  124. package/dist/astro/routes/api/import/wordpress/media.mjs +10 -10
  125. package/dist/astro/routes/api/import/wordpress/prepare.mjs +31 -31
  126. package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts +5 -1
  127. package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.mjs +16 -1
  128. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +30 -30
  129. package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
  130. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +13 -13
  131. package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +1 -1
  132. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +31 -30
  133. package/dist/astro/routes/api/manifest.mjs +4 -4
  134. package/dist/astro/routes/api/mcp.mjs +75 -50
  135. package/dist/astro/routes/api/media/_id_/confirm.mjs +8 -8
  136. package/dist/astro/routes/api/media/_id_.mjs +6 -6
  137. package/dist/astro/routes/api/media/file/_...key_.mjs +1 -1
  138. package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +2 -2
  139. package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +2 -2
  140. package/dist/astro/routes/api/media/providers/index.mjs +2 -2
  141. package/dist/astro/routes/api/media/upload-url.mjs +10 -10
  142. package/dist/astro/routes/api/media.mjs +14 -13
  143. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +27 -27
  144. package/dist/astro/routes/api/menus/_name_/items.mjs +27 -27
  145. package/dist/astro/routes/api/menus/_name_/reorder.mjs +27 -27
  146. package/dist/astro/routes/api/menus/_name_/translations.mjs +27 -27
  147. package/dist/astro/routes/api/menus/_name_.mjs +27 -27
  148. package/dist/astro/routes/api/menus/index.mjs +27 -27
  149. package/dist/astro/routes/api/oauth/authorize.mjs +7 -7
  150. package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
  151. package/dist/astro/routes/api/oauth/device/code.mjs +9 -9
  152. package/dist/astro/routes/api/oauth/device/token.mjs +8 -8
  153. package/dist/astro/routes/api/oauth/register.mjs +4 -4
  154. package/dist/astro/routes/api/oauth/token/refresh.mjs +6 -6
  155. package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
  156. package/dist/astro/routes/api/oauth/token.mjs +6 -6
  157. package/dist/astro/routes/api/openapi.json.mjs +10 -7
  158. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +3 -3
  159. package/dist/astro/routes/api/redirects/404s/index.mjs +10 -10
  160. package/dist/astro/routes/api/redirects/404s/summary.mjs +10 -10
  161. package/dist/astro/routes/api/redirects/_id_.mjs +28 -28
  162. package/dist/astro/routes/api/redirects/index.mjs +28 -28
  163. package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -2
  164. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +2 -2
  165. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +43 -39
  166. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +43 -39
  167. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +43 -39
  168. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +43 -39
  169. package/dist/astro/routes/api/schema/collections/index.mjs +43 -39
  170. package/dist/astro/routes/api/schema/index.mjs +7 -7
  171. package/dist/astro/routes/api/schema/orphans/_slug_.mjs +42 -38
  172. package/dist/astro/routes/api/schema/orphans/index.mjs +42 -38
  173. package/dist/astro/routes/api/search/enable.mjs +11 -11
  174. package/dist/astro/routes/api/search/index.mjs +10 -10
  175. package/dist/astro/routes/api/search/rebuild.mjs +11 -11
  176. package/dist/astro/routes/api/search/stats.mjs +7 -7
  177. package/dist/astro/routes/api/search/suggest.mjs +10 -10
  178. package/dist/astro/routes/api/sections/_slug_.mjs +27 -27
  179. package/dist/astro/routes/api/sections/index.mjs +27 -27
  180. package/dist/astro/routes/api/settings/email.mjs +3 -3
  181. package/dist/astro/routes/api/settings.mjs +27 -27
  182. package/dist/astro/routes/api/setup/admin-verify.mjs +11 -11
  183. package/dist/astro/routes/api/setup/admin.mjs +9 -9
  184. package/dist/astro/routes/api/setup/dev-bypass.mjs +24 -23
  185. package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
  186. package/dist/astro/routes/api/setup/index.mjs +25 -24
  187. package/dist/astro/routes/api/setup/status.mjs +3 -3
  188. package/dist/astro/routes/api/snapshot.mjs +7 -6
  189. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +30 -29
  190. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +30 -29
  191. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +30 -29
  192. package/dist/astro/routes/api/taxonomies/index.mjs +30 -29
  193. package/dist/astro/routes/api/themes/preview.mjs +4 -4
  194. package/dist/astro/routes/api/typegen.mjs +4 -4
  195. package/dist/astro/routes/api/well-known/auth.mjs +2 -2
  196. package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +3 -3
  197. package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +3 -3
  198. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +26 -26
  199. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +27 -27
  200. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +27 -27
  201. package/dist/astro/routes/api/widget-areas/_name_.mjs +25 -25
  202. package/dist/astro/routes/api/widget-areas/index.mjs +27 -27
  203. package/dist/astro/routes/api/widget-components.mjs +2 -2
  204. package/dist/astro/routes/robots.txt.mjs +7 -7
  205. package/dist/astro/routes/sitemap-_collection_.xml.mjs +59 -15
  206. package/dist/astro/routes/sitemap.xml.mjs +8 -8
  207. package/dist/astro/session-driver.d.mts +1 -1
  208. package/dist/astro/session-driver.mjs +3 -3
  209. package/dist/astro/types.d.mts +16 -14
  210. package/dist/{audit-NgiRzqP9.mjs → audit-DuRbTm8L.mjs} +1 -1
  211. package/dist/auth/providers/github.d.mts +1 -1
  212. package/dist/auth/providers/google.d.mts +1 -1
  213. package/dist/{auth-control-guard-1FHtkDP6.mjs → auth-control-guard-Dr14I98m.mjs} +1 -1
  214. package/dist/{authorize-BbIhZi3a.mjs → authorize-BLO0m7fW.mjs} +1 -1
  215. package/dist/{briefing-Jsxs587i.mjs → briefing-BFEWeJtR.mjs} +6 -6
  216. package/dist/{briefing-DD82WaEy.mjs → briefing-C4fJSVYW.mjs} +1 -1
  217. package/dist/byline-CXQcMsBu.mjs +628 -0
  218. package/dist/{bylines-BU6b8jSi.d.mts → byline-fields-CaF_xfpj.d.mts} +146 -15
  219. package/dist/{import-Br7aP9yh.mjs → byline-fields-D7TJ_oHF.mjs} +57 -3
  220. package/dist/byline-fields-Dc7L6Yry.mjs +113 -0
  221. package/dist/byline-registry-CL8BxPPp.mjs +287 -0
  222. package/dist/bylines-BgriNlW7.mjs +165 -0
  223. package/dist/bylines-D2vqm1aZ.mjs +163 -0
  224. package/dist/{cache-DQyZ-QaB.mjs → cache-GRK71jOU.mjs} +2 -2
  225. package/dist/{chunks-D8KL0nCY.mjs → chunks-DgEw12Bc.mjs} +1 -1
  226. package/dist/cli/index.mjs +958 -89
  227. package/dist/client/external-auth-headers.d.mts +1 -1
  228. package/dist/client/index.d.mts +2 -1
  229. package/dist/client/index.mjs +5 -2
  230. package/dist/{comment-BmJXz3lc.mjs → comment-ogMaF1gk.mjs} +1 -1
  231. package/dist/{comments-yTbeIYc2.mjs → comments-CTSOKrZq.mjs} +1 -1
  232. package/dist/{connection-BCNICDWN.mjs → connection-CiJWiWya.mjs} +44 -13
  233. package/dist/{content-DvpMad_N.mjs → content-BfyjOiMi.mjs} +24 -4
  234. package/dist/content-index-names-Bbu1FY1r.mjs +26 -0
  235. package/dist/{context-DgqEfcWz.mjs → context-DRhmPCiE.mjs} +2 -2
  236. package/dist/{context-Ufrm1lOv.mjs → context-ZMHhwzkG.mjs} +8 -8
  237. package/dist/{context-route-helpers-Dq5U_AXp.mjs → context-route-helpers-YLWx2N1j.mjs} +1 -1
  238. package/dist/{dashboard-BC9bgPOH.mjs → dashboard-D0gWuzNp.mjs} +4 -4
  239. package/dist/db/index.d.mts +3 -3
  240. package/dist/db/index.mjs +2 -2
  241. package/dist/db/libsql.d.mts +1 -1
  242. package/dist/db/libsql.mjs +1 -1
  243. package/dist/db/postgres.d.mts +1 -1
  244. package/dist/db/sqlite.d.mts +1 -1
  245. package/dist/db/sqlite.mjs +1 -1
  246. package/dist/{device-flow-CTS91g4A.mjs → device-flow-BL5ZRlc1.mjs} +4 -4
  247. package/dist/{dialect-helpers-TkdbkFad.mjs → dialect-helpers-fk43GbDb.mjs} +13 -3
  248. package/dist/{fts-manager-DnfOsF4s.mjs → fts-manager-EHY2Kes9.mjs} +2 -2
  249. package/dist/{hitl-requests-DaRuZ7tb.mjs → hitl-requests-B4Hkt0TO.mjs} +2 -2
  250. package/dist/{hitl-route-helpers-DcPySbZ3.mjs → hitl-route-helpers-CHjdfQ0s.mjs} +4 -4
  251. package/dist/{import-DSXK3aQF.mjs → import-CvHY6sf5.mjs} +3 -3
  252. package/dist/{index-BwOO3vu2.d.mts → index-DJVaYiUV.d.mts} +2 -2
  253. package/dist/index.d.mts +16 -17
  254. package/dist/index.mjs +69 -65
  255. package/dist/{jsonld-CLbYsYYH.d.mts → jsonld-AcPnCEGD.d.mts} +2 -2
  256. package/dist/{load-BCCcmoW9.mjs → load-BdbvtoDb.mjs} +1 -1
  257. package/dist/{loader-p2imNN98.mjs → loader-Y0QvC_QO.mjs} +167 -61
  258. package/dist/media/index.d.mts +1 -2
  259. package/dist/media/index.mjs +2 -2
  260. package/dist/media/local-runtime.d.mts +11 -12
  261. package/dist/media/local-runtime.mjs +2 -2
  262. package/dist/{media-Cg4zc9fq.mjs → media-DhBwiCYR.mjs} +6 -1
  263. package/dist/{media-allowlist-D8gsm8_t.mjs → media-allowlist-BsXkT9RK.mjs} +1 -1
  264. package/dist/{menus-DOaL6NaF.mjs → menus-BzGQpw9d.mjs} +2 -2
  265. package/dist/{menus-DzG3-9tQ.mjs → menus-fqqzXyHd.mjs} +5 -5
  266. package/dist/{oauth-authorization-DyOFXQWq.mjs → oauth-authorization-Dk3_LOfj.mjs} +4 -4
  267. package/dist/{oauth-clients-BMs_bmoz.mjs → oauth-clients-CzeMGyUU.mjs} +2 -2
  268. package/dist/page/index.d.mts +2 -2
  269. package/dist/page/index.mjs +1 -1
  270. package/dist/{parse-D7Tu6ku4.mjs → parse-CneSgl7-.mjs} +1 -1
  271. package/dist/{types-cn-fvYQ1.d.mts → placeholder-CXfoCtCd.d.mts} +38 -1
  272. package/dist/plugin-utils.d.mts +22 -10
  273. package/dist/plugin-utils.mjs +8 -10
  274. package/dist/plugins/adapt-sandbox-entry.d.mts +9 -10
  275. package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
  276. package/dist/{plugins-DCDVDF4B.mjs → plugins-BQ5Joz6v.mjs} +36 -6
  277. package/dist/{preview-BhgxNRWI.mjs → preview-D5rvDhRt.mjs} +7 -7
  278. package/dist/{provider-loader-B19YyyBp.d.mts → provider-loader-B5PMjpN7.d.mts} +1 -1
  279. package/dist/{query-BnRpB09I.mjs → query-BJuUydtD.mjs} +3 -3
  280. package/dist/{query-DHvNhBhi.mjs → query-CSx0EdSW.mjs} +30 -18
  281. package/dist/{rate-limit-BWP_kKiZ.mjs → rate-limit-i0G3IAOX.mjs} +2 -2
  282. package/dist/{redirect-BaVvo2te.mjs → redirect-BqFMj67n.mjs} +20 -6
  283. package/dist/{redirects-Ba-lJA5j.mjs → redirects-CJwHl_YG.mjs} +3 -3
  284. package/dist/{redirects-x5ol_Qj9.mjs → redirects-q_cToaHv.mjs} +29 -8
  285. package/dist/{registry-i__XP2WV.mjs → registry-Cq3QRBW2.mjs} +14 -5
  286. package/dist/{request-cache-BpwuE2ix.mjs → request-cache-w5cj5itT.mjs} +9 -1
  287. package/dist/{request-meta-DUGfAeXy.mjs → request-meta-DAb6xaP9.mjs} +1 -1
  288. package/dist/resolve-DTuDyYKs.mjs +100 -0
  289. package/dist/{review-requests-DuIxM4YM.mjs → review-requests-GYqjl2jO.mjs} +1 -1
  290. package/dist/{review-requests-CTUU_RJm.mjs → review-requests-tPw8_pAO.mjs} +1 -1
  291. package/dist/{runner-FhUNNaqA.d.mts → runner-Cnz4dl0f.d.mts} +1 -1
  292. package/dist/{runner-DF2DgD_B.mjs → runner-DTfG5v0G.mjs} +574 -196
  293. package/dist/{runtime-1bE80cmL.d.mts → runtime-Cd-kjPfN.d.mts} +1155 -273
  294. package/dist/runtime.d.mts +10 -11
  295. package/dist/runtime.mjs +4 -4
  296. package/dist/schema-DmHMWnSA.mjs +8 -0
  297. package/dist/{search-Cl9preJT.mjs → search-BAiFLz81.mjs} +3 -3
  298. package/dist/{sections-Zx-2q9IH.mjs → sections-DsuIrFDC.mjs} +2 -2
  299. package/dist/seed/index.d.mts +2 -2
  300. package/dist/seed/index.mjs +18 -17
  301. package/dist/seo/index.d.mts +1 -1
  302. package/dist/seo/index.mjs +1 -0
  303. package/dist/{seo-CJBiMDkj.mjs → seo-5lJOtB5J.mjs} +4 -2
  304. package/dist/{seo-BPb_reaG.mjs → seo-uMFBaR8G.mjs} +1 -1
  305. package/dist/{service-wPGgmbUa.mjs → service-CifrxCru.mjs} +2 -2
  306. package/dist/{settings-nr15a8uv.mjs → settings-BYGdocdj.mjs} +2 -2
  307. package/dist/{settings-DORe02PC.mjs → settings-DNRQuX3d.mjs} +3 -3
  308. package/dist/{site-activity-KFZprBZM.mjs → site-activity-6x1JccoR.mjs} +1 -1
  309. package/dist/{site-context-DuBQk6Mp.mjs → site-context-sN12ehZF.mjs} +13 -13
  310. package/dist/storage/local.d.mts +1 -1
  311. package/dist/storage/local.mjs +1 -1
  312. package/dist/storage/s3.d.mts +1 -1
  313. package/dist/storage/s3.mjs +1 -1
  314. package/dist/{taxonomies-DGaw_-aU.mjs → taxonomies-CQFmkP5u.mjs} +3 -3
  315. package/dist/{taxonomies-BVBKoXRf.mjs → taxonomies-faQVeMgj.mjs} +7 -32
  316. package/dist/{taxonomy-BvXRL85P.mjs → taxonomy-BnH-6VsX.mjs} +2 -2
  317. package/dist/{types-DvwHUku7.d.mts → types-B7_vSiPD.d.mts} +16 -0
  318. package/dist/{types-D1DjBFA9.mjs → types-Ck7-WoUD.mjs} +1 -1
  319. package/dist/{types-t7_nCCA9.d.mts → types-DEAQG87T.d.mts} +2 -56
  320. package/dist/{types-C-CMfzSl.d.mts → types-DYKtk8f1.d.mts} +31 -0
  321. package/dist/{types-C3Em8xpG.mjs → types-DbZhHtqS.mjs} +23 -1
  322. package/dist/{types-BIM7jwxr.d.mts → types-UGmU5sWx.d.mts} +1 -1
  323. package/dist/types-nP9vGUFq.d.mts +56 -0
  324. package/dist/ui/server-runtime.d.mts +13 -7
  325. package/dist/ui/server-runtime.mjs +18 -17
  326. package/dist/{user-2aI21yV1.mjs → user-CqZwN21P.mjs} +1 -1
  327. package/dist/{validate-CvQ6cvHH.d.mts → validate-BJuG-ISL.d.mts} +21 -3
  328. package/dist/{validate-JE-WfUQ5.mjs → validate-CK4a1sIF.mjs} +22 -2
  329. package/dist/version-Cg6ur4zS.mjs +6 -0
  330. package/dist/{widgets-Cj6ULpED.mjs → widgets-CdDvF4fV.mjs} +2 -2
  331. package/dist/{wordpress-slugs-hqItqJrQ.mjs → wordpress-slugs-B6Gw9q3Q.mjs} +1 -1
  332. package/dist/{zod-generator-C4BgFBZV.mjs → zod-generator-D1ROBNuC.mjs} +2 -2
  333. package/package.json +7 -8
  334. package/src/components/InlinePortableTextEditor.tsx +66 -0
  335. package/src/components/code-block-languages.ts +76 -0
  336. package/src/components/inline-code-block.tsx +241 -0
  337. package/dist/byline-DpNNSjET.mjs +0 -219
  338. package/dist/bylines-75_STR73.mjs +0 -114
  339. package/dist/chunk-ClPoSABd.mjs +0 -21
  340. package/dist/db-errors-DHJCB_gY.mjs +0 -23
  341. package/dist/index-Ct0pjZwW.d.mts +0 -835
  342. package/dist/placeholder-BZpCpid_.d.mts +0 -40
  343. package/dist/schema-U-SeFWwn.mjs +0 -8
  344. package/dist/version-DTpFm69w.mjs +0 -6
  345. /package/dist/{adapters-kZjS7plb.d.mts → adapters-OQCImOL7.d.mts} +0 -0
  346. /package/dist/{api-tokens-L0o9Bd7v.mjs → api-tokens-CYUoFGo7.mjs} +0 -0
  347. /package/dist/{challenge-store-cJam-E5R.mjs → challenge-store-CRSz-Xim.mjs} +0 -0
  348. /package/dist/{components-BJfa-F6n.mjs → components--pg6zBvu.mjs} +0 -0
  349. /package/dist/{config-XW5tMrH8.mjs → config-CVssduLe.mjs} +0 -0
  350. /package/dist/{context-types-BrSQNye5.mjs → context-types-DQh_XKkn.mjs} +0 -0
  351. /package/dist/{cron-D7FDsRu-.mjs → cron-DxCAU_Sn.mjs} +0 -0
  352. /package/dist/{default-5A3XVR7L.mjs → default-BHauvIdG.mjs} +0 -0
  353. /package/dist/{email-console-Bs1qKx59.mjs → email-console-BOVqIYpB.mjs} +0 -0
  354. /package/dist/{error-DLkgOP5m.mjs → error-DCSuUAZW.mjs} +0 -0
  355. /package/dist/{escape-r8_GbEU2.mjs → escape-BDgouFFY.mjs} +0 -0
  356. /package/dist/{experimental-workflows-BbZbIEZp.mjs → experimental-workflows-Dh4DUoD_.mjs} +0 -0
  357. /package/dist/{hash-DFFrkivP.mjs → hash-BPmX6P8I.mjs} +0 -0
  358. /package/dist/{manifest-schema-C6fzQoWn.mjs → manifest-schema-qh2P7RDX.mjs} +0 -0
  359. /package/dist/{mime-DYP4V5Ks.mjs → mime-8pAB8-77.mjs} +0 -0
  360. /package/dist/{mode-Bd55iLcP.mjs → mode-CpyEz8pe.mjs} +0 -0
  361. /package/dist/{normalize-BY_EJnd9.mjs → normalize-O-hi3a27.mjs} +0 -0
  362. /package/dist/{oauth-state-store-BRSUEkmx.mjs → oauth-state-store-qncPB_IU.mjs} +0 -0
  363. /package/dist/{oauth-user-lookup-DdcI8ZVL.mjs → oauth-user-lookup-BFjWF8wK.mjs} +0 -0
  364. /package/dist/{parser-egIGEco-.mjs → parser-DxfsARXL.mjs} +0 -0
  365. /package/dist/{passkey-config-AX4sjpQ4.mjs → passkey-config-DzHQK90v.mjs} +0 -0
  366. /package/dist/{patterns-CiyXeDgr.mjs → patterns-D9iDO3j8.mjs} +0 -0
  367. /package/dist/{placeholder-b0Ufu0La.mjs → placeholder-BDo81Is5.mjs} +0 -0
  368. /package/dist/{provider-loader-BdRV01gr.mjs → provider-loader-DzUxejk7.mjs} +0 -0
  369. /package/dist/{public-url-BL2r8dmQ.mjs → public-url-DLUM5OOv.mjs} +0 -0
  370. /package/dist/{redirect-Ce_6Yb6z.mjs → redirect-BjIBtDWY.mjs} +0 -0
  371. /package/dist/{secrets-DfeNNoLa.mjs → secrets-CN6FCpcB.mjs} +0 -0
  372. /package/dist/{seo-contributions-C0LXoWw3.mjs → seo-contributions-CqVvReEj.mjs} +0 -0
  373. /package/dist/{setup-complete-C2ztsNhJ.mjs → setup-complete-BytMc6HO.mjs} +0 -0
  374. /package/dist/{setup-nonce-BTKq7uBi.mjs → setup-nonce-pyGfc9hV.mjs} +0 -0
  375. /package/dist/{sidecar-client-lrf7ErYJ.mjs → sidecar-client-mJxwayYN.mjs} +0 -0
  376. /package/dist/{site-url-C18yBhtv.mjs → site-url-C-cu8Ff2.mjs} +0 -0
  377. /package/dist/{ssrf-KAIQS48_.mjs → ssrf-DiKqWd3N.mjs} +0 -0
  378. /package/dist/{tokens-CsP8Se8S.mjs → tokens-CjSgb0AC.mjs} +0 -0
  379. /package/dist/{transport-nNEGdHkI.d.mts → transport-DidKKxvW.d.mts} +0 -0
  380. /package/dist/{transport-B7kO-4ee.mjs → transport-LSdZVXHF.mjs} +0 -0
  381. /package/dist/{trusted-proxy-Bbm6PLR6.mjs → trusted-proxy-BgIIcbsN.mjs} +0 -0
  382. /package/dist/{types-CNNQ8l0v.mjs → types-Cg276-3z.mjs} +0 -0
  383. /package/dist/{types-BYjPylrZ.d.mts → types-DZpT-PnG.d.mts} +0 -0
  384. /package/dist/{types-BgE6gMFI.d.mts → types-Dryvv7LH.d.mts} +0 -0
  385. /package/dist/{types-BBETcziA.d.mts → types-GaCtZ1k9.d.mts} +0 -0
  386. /package/dist/{url-BzhfYtRn.mjs → url-w7Mp5qAD.mjs} +0 -0
  387. /package/dist/{utils-FEbQMgB5.mjs → utils-wv-zvC-Y.mjs} +0 -0
@@ -1,835 +0,0 @@
1
- import { t as Database } from "./types-C-CMfzSl.mjs";
2
- import { a as Collection, h as FieldValidation, i as SiteSettings, r as SiteSettingKey } from "./types-t7_nCCA9.mjs";
3
- import { m as MediaValue } from "./types-cn-fvYQ1.mjs";
4
- import { Kysely } from "kysely";
5
- import { z } from "astro/zod";
6
-
7
- //#region src/database/repositories/comment.d.ts
8
- /** Public-facing comment shape — no private fields */
9
- interface PublicComment {
10
- id: string;
11
- parentId: string | null;
12
- authorName: string;
13
- isRegisteredUser: boolean;
14
- body: string;
15
- createdAt: string;
16
- replies?: PublicComment[];
17
- }
18
- //#endregion
19
- //#region src/fields/types.d.ts
20
- /**
21
- * SQLite column types that map from field types
22
- */
23
- type ColumnType = "TEXT" | "REAL" | "INTEGER" | "JSON";
24
- /**
25
- * Base field definition
26
- *
27
- * Note: schema uses z.ZodTypeAny to accommodate optional/default wrappers
28
- */
29
- interface FieldDefinition<_T = unknown> {
30
- type: string;
31
- /**
32
- * The SQLite column type to use when storing this field
33
- */
34
- columnType: ColumnType;
35
- schema: z.ZodTypeAny;
36
- options?: unknown;
37
- ui?: FieldUIHints;
38
- validation?: FieldValidation;
39
- }
40
- /**
41
- * UI hints for admin rendering
42
- */
43
- interface FieldUIHints {
44
- widget?: string;
45
- placeholder?: string;
46
- helpText?: string;
47
- rows?: number;
48
- min?: number | string;
49
- max?: number | string;
50
- [key: string]: unknown;
51
- }
52
- /**
53
- * Portable Text block structure
54
- */
55
- interface PortableTextBlock {
56
- _type: string;
57
- _key: string;
58
- [key: string]: unknown;
59
- }
60
- /**
61
- * @deprecated Use MediaValue instead. ImageValue is an alias for backwards compatibility.
62
- */
63
- type ImageValue = MediaValue;
64
- /**
65
- * File field value
66
- */
67
- interface FileValue {
68
- id: string;
69
- url: string;
70
- filename: string;
71
- mimeType: string;
72
- size: number;
73
- }
74
- //#endregion
75
- //#region src/fields/image.d.ts
76
- /**
77
- * Image field
78
- * References media items from the media library
79
- */
80
- declare function image(options?: {
81
- required?: boolean;
82
- maxSize?: number;
83
- allowedTypes?: string[];
84
- }): FieldDefinition<ImageValue | undefined>;
85
- //#endregion
86
- //#region src/fields/reference.d.ts
87
- /**
88
- * Reference field
89
- * References another content item by ID
90
- */
91
- declare function reference(collection: string, options?: {
92
- required?: boolean;
93
- }): FieldDefinition<string | undefined>;
94
- //#endregion
95
- //#region src/fields/portable-text.d.ts
96
- /**
97
- * Portable Text field
98
- * Stores structured content in Portable Text format
99
- */
100
- declare function portableText(options?: {
101
- required?: boolean;
102
- }): FieldDefinition<PortableTextBlock[] | undefined>;
103
- //#endregion
104
- //#region src/schema/query.d.ts
105
- /**
106
- * Get collection metadata by slug.
107
- *
108
- * @example
109
- * ```ts
110
- * import { getCollectionInfo } from "dineway";
111
- *
112
- * const info = await getCollectionInfo("posts");
113
- * if (info?.commentsEnabled) {
114
- * // render comment UI
115
- * }
116
- * ```
117
- */
118
- declare function getCollectionInfo(slug: string): Promise<Collection | null>;
119
- //#endregion
120
- //#region src/utils/url.d.ts
121
- /**
122
- * URL scheme validation utilities
123
- *
124
- * Prevents XSS via dangerous URL schemes (javascript:, data:, vbscript:, etc.)
125
- * by allowlisting known-safe schemes before rendering into href attributes.
126
- */
127
- /**
128
- * Returns the URL unchanged if it uses a safe scheme, otherwise returns "#".
129
- *
130
- * Use this at the render layer as the primary defense against XSS via
131
- * dangerous URL schemes like `javascript:`, `data:`, or `vbscript:`.
132
- *
133
- * @example
134
- * ```ts
135
- * sanitizeHref("https://example.com") // "https://example.com"
136
- * sanitizeHref("/about") // "/about"
137
- * sanitizeHref("#section") // "#section"
138
- * sanitizeHref("mailto:a@b.com") // "mailto:a@b.com"
139
- * sanitizeHref("javascript:alert(1)") // "#"
140
- * sanitizeHref("data:text/html,<script>") // "#"
141
- * sanitizeHref("") // "#"
142
- * ```
143
- */
144
- declare function sanitizeHref(url: string | undefined | null): string;
145
- /**
146
- * Returns true if the URL uses a safe scheme for rendering in href attributes.
147
- */
148
- declare function isSafeHref(url: string): boolean;
149
- //#endregion
150
- //#region src/visual-editing/editable.d.ts
151
- /**
152
- * Visual editing annotation system
153
- *
154
- * Creates Proxy objects that emit data-dineway-ref attributes when spread onto elements.
155
- */
156
- interface CMSAnnotation {
157
- collection: string;
158
- id: string;
159
- field?: string;
160
- /** Entry status — only present on entry-level annotations (not field-level) */
161
- status?: string;
162
- /** Whether the entry has unpublished draft changes */
163
- hasDraft?: boolean;
164
- }
165
- /** The shape returned when spreading an edit annotation onto an element */
166
- interface FieldAnnotation {
167
- "data-dineway-ref": string;
168
- }
169
- interface EditableOptions {
170
- /** Entry status: "draft", "published", "scheduled" */
171
- status?: string;
172
- /** true when draftRevisionId exists and differs from liveRevisionId */
173
- hasDraft?: boolean;
174
- }
175
- /**
176
- * Create an editable proxy for an entry.
177
- *
178
- * Usage:
179
- * - `{...entry.edit}` - entry-level annotation (includes status/hasDraft)
180
- * - `{...entry.edit.title}` - field-level annotation
181
- * - `{...entry.edit['nested.field']}` - nested field (bracket notation)
182
- */
183
- declare function createEditable(collection: string, id: string, options?: EditableOptions): EditProxy;
184
- /**
185
- * Create a noop proxy for production mode.
186
- * Spreading this produces no attributes.
187
- */
188
- declare function createNoop(): EditProxy;
189
- /**
190
- * Visual editing proxy type.
191
- *
192
- * Spread directly onto elements for entry-level annotations: `{...entry.edit}`
193
- * Access a field for field-level annotations: `{...entry.edit.title}`
194
- *
195
- * In production, spreading produces no attributes (noop).
196
- */
197
- type EditProxy = {
198
- readonly [field: string]: Partial<FieldAnnotation>;
199
- };
200
- //#endregion
201
- //#region src/query.d.ts
202
- /**
203
- * Collection type registry for type-safe queries.
204
- *
205
- * This interface is extended by the generated dineway-env.d.ts file
206
- * to provide type inference for collection names and their data shapes.
207
- *
208
- * @example
209
- * ```ts
210
- * // In dineway-env.d.ts (generated):
211
- * declare module "dineway" {
212
- * interface DinewayCollections {
213
- * posts: { title: string; content: PortableTextBlock[]; };
214
- * pages: { title: string; body: PortableTextBlock[]; };
215
- * }
216
- * }
217
- *
218
- * // Then in your code:
219
- * const { entries } = await getDinewayCollection("posts");
220
- * // entries[0].data.title is typed as string
221
- * ```
222
- */
223
- interface DinewayCollections {}
224
- /**
225
- * Helper type to infer the data type for a collection.
226
- * Returns the registered type if known, otherwise falls back to Record<string, unknown>.
227
- */
228
- type InferCollectionData<T extends string> = T extends keyof DinewayCollections ? DinewayCollections[T] : Record<string, unknown>;
229
- /**
230
- * Sort direction
231
- */
232
- type SortDirection = "asc" | "desc";
233
- /**
234
- * Order by specification - field name to direction
235
- * @example { created_at: "desc" } - Sort by created_at descending
236
- * @example { title: "asc" } - Sort by title ascending
237
- * @example { published_at: "desc", title: "asc" } - Multi-field sort
238
- */
239
- type OrderBySpec = Record<string, SortDirection>;
240
- interface CollectionFilter {
241
- status?: "draft" | "published" | "archived";
242
- limit?: number;
243
- /**
244
- * Opaque cursor for keyset pagination.
245
- * Pass the `nextCursor` value from a previous result to fetch the next page.
246
- * @example
247
- * ```ts
248
- * const cursor = Astro.url.searchParams.get("cursor") ?? undefined;
249
- * const { entries, nextCursor } = await getDinewayCollection("posts", {
250
- * limit: 10,
251
- * cursor,
252
- * });
253
- * ```
254
- */
255
- cursor?: string;
256
- /**
257
- * Filter by field values or taxonomy terms
258
- * @example { category: 'news' } - Filter by taxonomy term
259
- * @example { category: ['news', 'featured'] } - Filter by multiple terms (OR)
260
- */
261
- where?: Record<string, string | string[]>;
262
- /**
263
- * Order results by field(s)
264
- * @default { created_at: "desc" }
265
- * @example { created_at: "desc" } - Sort by created_at descending (default)
266
- * @example { title: "asc" } - Sort by title ascending
267
- * @example { published_at: "desc", title: "asc" } - Multi-field sort
268
- */
269
- orderBy?: OrderBySpec;
270
- /**
271
- * Filter by locale. When set, only returns entries in this locale.
272
- * Only relevant when i18n is configured.
273
- * @example "en" — English entries only
274
- * @example "fr" — French entries only
275
- */
276
- locale?: string;
277
- }
278
- interface ContentEntry<T = Record<string, unknown>> {
279
- id: string;
280
- data: T;
281
- /** Visual editing annotations. Spread onto elements: {...entry.edit.title} */
282
- edit: EditProxy;
283
- }
284
- /** Cache hint returned by the content loader for route caching */
285
- interface CacheHint {
286
- tags?: string[];
287
- lastModified?: Date;
288
- }
289
- /**
290
- * Result from getDinewayCollection
291
- */
292
- interface CollectionResult<T> {
293
- /** The entries (empty array if error or none found) */
294
- entries: ContentEntry<T>[];
295
- /** Error if the query failed */
296
- error?: Error;
297
- /** Cache hint for route caching (pass to Astro.cache.set()) */
298
- cacheHint: CacheHint;
299
- /**
300
- * Opaque cursor for the next page.
301
- * Undefined when there are no more results.
302
- * Pass this as `cursor` in the next query to get the next page.
303
- */
304
- nextCursor?: string;
305
- }
306
- /**
307
- * Result from getDinewayEntry
308
- */
309
- interface EntryResult<T> {
310
- /** The entry, or null if not found */
311
- entry: ContentEntry<T> | null;
312
- /** Error if the query failed (not set for "not found", only for actual errors) */
313
- error?: Error;
314
- /** Whether we're in preview mode (valid token was provided) */
315
- isPreview: boolean;
316
- /** Set when a fallback locale was used instead of the requested locale */
317
- fallbackLocale?: string;
318
- /** Cache hint for route caching (pass to Astro.cache.set()) */
319
- cacheHint: CacheHint;
320
- }
321
- /** Edit metadata attached to PT arrays in edit mode */
322
- interface EditFieldMeta {
323
- collection: string;
324
- id: string;
325
- field: string;
326
- }
327
- /**
328
- * Read edit metadata from a value (returns undefined if not tagged).
329
- * Uses Object.getOwnPropertyDescriptor to access Symbol-keyed property
330
- * without an unsafe type assertion.
331
- */
332
- declare function getEditMeta(value: unknown): EditFieldMeta | undefined;
333
- /**
334
- * Get all entries of a content type
335
- *
336
- * Returns { entries, error } for graceful error handling.
337
- *
338
- * When dineway-env.d.ts is generated, the collection name will be
339
- * type-checked and the return type will be inferred automatically.
340
- *
341
- * @example
342
- * ```ts
343
- * import { getDinewayCollection } from "dineway";
344
- *
345
- * const { entries: posts, error } = await getDinewayCollection("posts");
346
- * if (error) {
347
- * console.error("Failed to load posts:", error);
348
- * return;
349
- * }
350
- * // posts[0].data.title is typed (if dineway-env.d.ts exists)
351
- *
352
- * // With filters
353
- * const { entries: drafts } = await getDinewayCollection("posts", { status: "draft" });
354
- * ```
355
- */
356
- declare function getDinewayCollection<T extends string, D = InferCollectionData<T>>(type: T, filter?: CollectionFilter): Promise<CollectionResult<D>>;
357
- /**
358
- * Get a single entry by type and ID/slug
359
- *
360
- * Returns { entry, error, isPreview } for graceful error handling.
361
- * - entry is null if not found (not an error)
362
- * - error is set only for actual errors (db issues, etc.)
363
- *
364
- * Preview mode is detected automatically from request context (ALS).
365
- * When the URL has a valid `_preview` token, the middleware sets preview
366
- * context and this function serves draft revision data if available.
367
- *
368
- * @example
369
- * ```ts
370
- * import { getDinewayEntry } from "dineway";
371
- *
372
- * // Simple usage — preview just works via middleware
373
- * const { entry: post, isPreview, error } = await getDinewayEntry("posts", "my-slug");
374
- * if (!post) return Astro.redirect("/404");
375
- * ```
376
- */
377
- declare function getDinewayEntry<T extends string, D = InferCollectionData<T>>(type: T, id: string, options?: {
378
- locale?: string;
379
- }): Promise<EntryResult<D>>;
380
- /**
381
- * Translation summary for a single locale variant
382
- */
383
- interface TranslationSummary {
384
- /** Content item ID */
385
- id: string;
386
- /** Locale code (e.g. "en", "fr") */
387
- locale: string;
388
- /** URL slug */
389
- slug: string | null;
390
- /** Current status */
391
- status: string;
392
- }
393
- /**
394
- * Result from getTranslations
395
- */
396
- interface TranslationsResult {
397
- /** The translation group ID (shared across locales) */
398
- translationGroup: string;
399
- /** All locale variants in this group */
400
- translations: TranslationSummary[];
401
- /** Error if the query failed */
402
- error?: Error;
403
- }
404
- /**
405
- * Get all translations of a content item.
406
- *
407
- * Given a content entry, returns all locale variants that share the same
408
- * translation group. This is useful for building language switcher UI.
409
- *
410
- * @example
411
- * ```ts
412
- * import { getDinewayEntry, getTranslations } from "dineway";
413
- *
414
- * const { entry: post } = await getDinewayEntry("posts", "hello-world", { locale: "en" });
415
- * const { translations } = await getTranslations("posts", post.data.id);
416
- * // translations = [{ id: "...", locale: "en", slug: "hello-world", status: "published" }, ...]
417
- * ```
418
- */
419
- declare function getTranslations(type: string, id: string): Promise<TranslationsResult>;
420
- /**
421
- * Result from resolveDinewayPath
422
- */
423
- interface ResolvePathResult<T = Record<string, unknown>> {
424
- /** The matched entry */
425
- entry: ContentEntry<T>;
426
- /** The collection slug that matched */
427
- collection: string;
428
- /** Extracted parameters from the URL pattern (e.g. { slug: "my-post" }) */
429
- params: Record<string, string>;
430
- }
431
- /**
432
- * Resolve a URL path to a content entry by matching against collection URL patterns.
433
- *
434
- * Loads all collections with a `urlPattern` set, converts each pattern to a regex,
435
- * and tests the given path. On match, extracts the slug and fetches the entry.
436
- *
437
- * @example
438
- * ```ts
439
- * import { resolveDinewayPath } from "dineway";
440
- *
441
- * // Given pages with urlPattern "/{slug}" and posts with "/blog/{slug}":
442
- * const result = await resolveDinewayPath("/blog/hello-world");
443
- * if (result) {
444
- * console.log(result.collection); // "posts"
445
- * console.log(result.params.slug); // "hello-world"
446
- * console.log(result.entry.data); // post data
447
- * }
448
- * ```
449
- */
450
- declare function resolveDinewayPath<T = Record<string, unknown>>(path: string): Promise<ResolvePathResult<T> | null>;
451
- //#endregion
452
- //#region src/settings/index.d.ts
453
- /**
454
- * Get a single site setting by key
455
- *
456
- * Returns `undefined` if the setting has not been configured.
457
- * For media settings (logo, favicon), the URL is resolved automatically.
458
- *
459
- * @param key - The setting key (e.g., "title", "logo", "social")
460
- * @returns The setting value, or undefined if not set
461
- *
462
- * @example
463
- * ```ts
464
- * import { getSiteSetting } from "dineway";
465
- *
466
- * const title = await getSiteSetting("title");
467
- * const logo = await getSiteSetting("logo");
468
- * console.log(logo?.url); // Resolved URL
469
- * ```
470
- */
471
- declare function getSiteSetting<K extends SiteSettingKey>(key: K): Promise<SiteSettings[K] | undefined>;
472
- /**
473
- * Get all site settings
474
- *
475
- * Returns all configured settings. Unset values are undefined.
476
- * Media references (logo/favicon) are resolved to include URLs.
477
- *
478
- * @example
479
- * ```ts
480
- * import { getSiteSettings } from "dineway";
481
- *
482
- * const settings = await getSiteSettings();
483
- * console.log(settings.title); // "My Site"
484
- * console.log(settings.logo?.url); // "/_dineway/api/media/file/abc123"
485
- * ```
486
- */
487
- declare function getSiteSettings(): Promise<Partial<SiteSettings>>;
488
- /**
489
- * Set site settings (internal function used by admin API)
490
- *
491
- * Merges provided settings with existing ones. Only provided fields are updated.
492
- * Media references should include just the mediaId; URLs are resolved on read.
493
- *
494
- * @param settings - Partial settings object with values to update
495
- * @param db - Kysely database instance
496
- * @returns Promise that resolves when settings are saved
497
- *
498
- * @internal
499
- *
500
- * @example
501
- * ```ts
502
- * // Update multiple settings at once
503
- * await setSiteSettings({
504
- * title: "My Site",
505
- * tagline: "Welcome",
506
- * logo: { mediaId: "med_123", alt: "Logo" }
507
- * }, db);
508
- * ```
509
- */
510
- declare function setSiteSettings(settings: Partial<SiteSettings>, db: Kysely<Database>): Promise<void>;
511
- /**
512
- * Get a single plugin setting by key.
513
- *
514
- * Plugin settings are stored in the options table under
515
- * `plugin:<pluginId>:settings:<key>`.
516
- */
517
- declare function getPluginSetting<T = unknown>(pluginId: string, key: string): Promise<T | undefined>;
518
- /**
519
- * Get all persisted plugin settings for a plugin.
520
- *
521
- * Defaults declared in `admin.settingsSchema` are not materialized
522
- * automatically; callers should apply their own fallback defaults.
523
- */
524
- declare function getPluginSettings(pluginId: string): Promise<Record<string, unknown>>;
525
- //#endregion
526
- //#region src/comments/query.d.ts
527
- interface GetCommentsOptions {
528
- collection: string;
529
- contentId: string;
530
- threaded?: boolean;
531
- }
532
- interface GetCommentsResult {
533
- items: PublicComment[];
534
- total: number;
535
- }
536
- /**
537
- * Get approved comments for a content item.
538
- *
539
- * @example
540
- * ```ts
541
- * import { getComments } from "dineway";
542
- *
543
- * const { items, total } = await getComments({
544
- * collection: "posts",
545
- * contentId: post.id,
546
- * threaded: true,
547
- * });
548
- * ```
549
- */
550
- declare function getComments(options: GetCommentsOptions): Promise<GetCommentsResult>;
551
- /**
552
- * Get the count of approved comments for a content item.
553
- *
554
- * @example
555
- * ```ts
556
- * import { getCommentCount } from "dineway";
557
- *
558
- * const count = await getCommentCount("posts", post.id);
559
- * ```
560
- */
561
- declare function getCommentCount(collection: string, contentId: string): Promise<number>;
562
- //#endregion
563
- //#region src/menus/types.d.ts
564
- /**
565
- * Menu item types
566
- */
567
- type MenuItemType = string;
568
- /**
569
- * Menu item as returned to templates (with resolved URL)
570
- */
571
- interface MenuItem {
572
- id: string;
573
- label: string;
574
- url: string;
575
- target?: string;
576
- titleAttr?: string;
577
- cssClasses?: string;
578
- children: MenuItem[];
579
- }
580
- /**
581
- * Menu as returned to templates
582
- */
583
- interface Menu {
584
- id: string;
585
- name: string;
586
- label: string;
587
- items: MenuItem[];
588
- locale: string;
589
- translationGroup: string | null;
590
- }
591
- /**
592
- * Input for creating a menu item
593
- */
594
- interface CreateMenuItemInput {
595
- type: MenuItemType;
596
- label: string;
597
- /**
598
- * Identifier of the referenced entity. For content and taxonomy items it is
599
- * the target row's translation_group.
600
- */
601
- referenceCollection?: string;
602
- referenceId?: string;
603
- customUrl?: string;
604
- target?: string;
605
- titleAttr?: string;
606
- cssClasses?: string;
607
- parentId?: string;
608
- sortOrder?: number;
609
- }
610
- /**
611
- * Input for updating a menu item
612
- */
613
- interface UpdateMenuItemInput {
614
- label?: string;
615
- customUrl?: string;
616
- target?: string;
617
- titleAttr?: string;
618
- cssClasses?: string;
619
- parentId?: string | null;
620
- sortOrder?: number;
621
- }
622
- /**
623
- * Input for creating a menu
624
- */
625
- interface CreateMenuInput {
626
- name: string;
627
- label: string;
628
- locale?: string;
629
- /** Existing menu id to join as a locale translation. */
630
- translationOf?: string;
631
- }
632
- /**
633
- * Input for updating a menu
634
- */
635
- interface UpdateMenuInput {
636
- label?: string;
637
- }
638
- /**
639
- * Input for reordering menu items
640
- */
641
- interface ReorderMenuItemsInput {
642
- items: Array<{
643
- id: string;
644
- parentId: string | null;
645
- sortOrder: number;
646
- }>;
647
- }
648
- //#endregion
649
- //#region src/menus/index.d.ts
650
- interface MenuQueryOptions {
651
- locale?: string;
652
- }
653
- /**
654
- * Get menu by name with resolved URLs.
655
- */
656
- declare function getMenu(name: string, options?: MenuQueryOptions): Promise<Menu | null>;
657
- /**
658
- * Get all menus without items.
659
- */
660
- declare function getMenus(options?: MenuQueryOptions): Promise<Array<{
661
- id: string;
662
- name: string;
663
- label: string;
664
- locale: string;
665
- }>>;
666
- //#endregion
667
- //#region src/taxonomies/types.d.ts
668
- /**
669
- * Taxonomy types for Dineway Agentic Web builder
670
- */
671
- /**
672
- * Taxonomy definition - describes a taxonomy like "category" or "tag"
673
- */
674
- interface TaxonomyDef {
675
- id: string;
676
- name: string;
677
- label: string;
678
- labelSingular?: string;
679
- hierarchical: boolean;
680
- collections: string[];
681
- locale: string;
682
- translationGroup: string | null;
683
- }
684
- /**
685
- * Taxonomy term - a specific term within a taxonomy (e.g., "News" in "category")
686
- */
687
- interface TaxonomyTerm {
688
- id: string;
689
- name: string;
690
- slug: string;
691
- label: string;
692
- parentId?: string;
693
- description?: string;
694
- children: TaxonomyTerm[];
695
- count?: number;
696
- locale: string;
697
- translationGroup: string | null;
698
- }
699
- /**
700
- * Flat version for DB row
701
- */
702
- interface TaxonomyTermRow {
703
- id: string;
704
- name: string;
705
- slug: string;
706
- label: string;
707
- parent_id: string | null;
708
- data: string | null;
709
- locale: string;
710
- translation_group: string | null;
711
- }
712
- /**
713
- * Input for creating a term
714
- */
715
- interface CreateTermInput {
716
- slug: string;
717
- label: string;
718
- parentId?: string;
719
- description?: string;
720
- locale?: string;
721
- /** Existing term id to join as a locale translation. */
722
- translationOf?: string;
723
- }
724
- /**
725
- * Input for updating a term
726
- */
727
- interface UpdateTermInput {
728
- slug?: string;
729
- label?: string;
730
- parentId?: string | null;
731
- description?: string;
732
- }
733
- //#endregion
734
- //#region src/taxonomies/index.d.ts
735
- interface TaxonomyQueryOptions {
736
- locale?: string;
737
- }
738
- /**
739
- * Get every taxonomy definition for the active locale.
740
- */
741
- declare function getTaxonomyDefs(options?: TaxonomyQueryOptions): Promise<TaxonomyDef[]>;
742
- /**
743
- * Get a single taxonomy definition by name, following the locale fallback chain.
744
- */
745
- declare function getTaxonomyDef(name: string, options?: TaxonomyQueryOptions): Promise<TaxonomyDef | null>;
746
- /**
747
- * Get all terms for a taxonomy in the active locale.
748
- */
749
- declare function getTaxonomyTerms(taxonomyName: string, options?: TaxonomyQueryOptions): Promise<TaxonomyTerm[]>;
750
- /**
751
- * Get a single term by taxonomy and slug, following the locale fallback chain.
752
- */
753
- declare function getTerm(taxonomyName: string, slug: string, options?: TaxonomyQueryOptions): Promise<TaxonomyTerm | null>;
754
- /**
755
- * Get terms assigned to an entry, resolved into the active locale.
756
- */
757
- declare function getEntryTerms(collection: string, entryId: string, taxonomyName?: string, options?: TaxonomyQueryOptions): Promise<TaxonomyTerm[]>;
758
- /**
759
- * Get terms for multiple entries in one taxonomy.
760
- */
761
- declare function getTermsForEntries(collection: string, entryIds: string[], taxonomyName: string, options?: TaxonomyQueryOptions): Promise<Map<string, TaxonomyTerm[]>>;
762
- /**
763
- * Get entries by term.
764
- */
765
- declare function getEntriesByTerm(collection: string, taxonomyName: string, termSlug: string, options?: TaxonomyQueryOptions): Promise<Array<{
766
- id: string;
767
- data: Record<string, unknown>;
768
- }>>;
769
- //#endregion
770
- //#region src/widgets/types.d.ts
771
- type WidgetType = "content" | "menu" | "component";
772
- interface Widget {
773
- id: string;
774
- type: WidgetType;
775
- title?: string;
776
- content?: PortableTextBlock[];
777
- menuName?: string;
778
- componentId?: string;
779
- componentProps?: Record<string, unknown>;
780
- }
781
- interface WidgetArea {
782
- id: string;
783
- name: string;
784
- label: string;
785
- description?: string;
786
- widgets: Widget[];
787
- }
788
- interface WidgetComponentDef {
789
- id: string;
790
- label: string;
791
- description?: string;
792
- props: Record<string, PropDef>;
793
- }
794
- interface PropDef {
795
- type: "string" | "number" | "boolean" | "select";
796
- label: string;
797
- default?: unknown;
798
- options?: Array<{
799
- value: string;
800
- label: string;
801
- }>;
802
- }
803
- interface CreateWidgetAreaInput {
804
- name: string;
805
- label: string;
806
- description?: string;
807
- }
808
- interface CreateWidgetInput {
809
- type: WidgetType;
810
- title?: string;
811
- content?: PortableTextBlock[];
812
- menuName?: string;
813
- componentId?: string;
814
- componentProps?: Record<string, unknown>;
815
- }
816
- interface UpdateWidgetInput extends Partial<CreateWidgetInput> {}
817
- interface ReorderWidgetsInput {
818
- widgetIds: string[];
819
- }
820
- //#endregion
821
- //#region src/widgets/index.d.ts
822
- /**
823
- * Get a widget area by name, with all its widgets
824
- */
825
- declare function getWidgetArea(name: string): Promise<WidgetArea | null>;
826
- /**
827
- * Get all widget areas with their widgets
828
- */
829
- declare function getWidgetAreas(): Promise<WidgetArea[]>;
830
- /**
831
- * Get available widget components (for admin UI)
832
- */
833
- declare function getWidgetComponents(): WidgetComponentDef[];
834
- //#endregion
835
- export { TranslationSummary as $, MenuItem as A, getPluginSettings as B, TaxonomyTermRow as C, CreateMenuInput as D, getMenus as E, GetCommentsOptions as F, CollectionFilter as G, getSiteSettings as H, GetCommentsResult as I, DinewayCollections as J, CollectionResult as K, getCommentCount as L, ReorderMenuItemsInput as M, UpdateMenuInput as N, CreateMenuItemInput as O, UpdateMenuItemInput as P, ResolvePathResult as Q, getComments as R, TaxonomyTerm as S, PublicComment as St, getMenu as T, setSiteSettings as U, getSiteSetting as V, CacheHint as W, EntryResult as X, EditFieldMeta as Y, InferCollectionData as Z, getTaxonomyTerms as _, FieldDefinition as _t, CreateWidgetInput as a, resolveDinewayPath as at, CreateTermInput as b, ImageValue as bt, UpdateWidgetInput as c, FieldAnnotation as ct, WidgetComponentDef as d, isSafeHref as dt, TranslationsResult as et, WidgetType as f, sanitizeHref as ft, getTaxonomyDefs as g, image as gt, getTaxonomyDef as h, reference as ht, CreateWidgetAreaInput as i, getTranslations as it, MenuItemType as j, Menu as k, Widget as l, createEditable as lt, getEntryTerms as m, portableText as mt, getWidgetAreas as n, getDinewayEntry as nt, PropDef as o, CMSAnnotation as ot, getEntriesByTerm as p, getCollectionInfo as pt, ContentEntry as q, getWidgetComponents as r, getEditMeta as rt, ReorderWidgetsInput as s, EditProxy as st, getWidgetArea as t, getDinewayCollection as tt, WidgetArea as u, createNoop as ut, getTerm as v, FieldUIHints as vt, UpdateTermInput as w, TaxonomyDef as x, PortableTextBlock as xt, getTermsForEntries as y, FileValue as yt, getPluginSetting as z };