emdash 0.36.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapters-CzL3H752.d.mts → adapters-BDQwg236.d.mts} +4 -2
- package/dist/{adapters-CzL3H752.d.mts.map → adapters-BDQwg236.d.mts.map} +1 -1
- package/dist/{allowed-origins-maylGaHv.mjs → allowed-origins-BGglilcs.mjs} +2 -2
- package/dist/{allowed-origins-maylGaHv.mjs.map → allowed-origins-BGglilcs.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.mjs +17 -17
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +5 -5
- package/dist/api-Dz6rgoa3.mjs +10040 -0
- package/dist/api-Dz6rgoa3.mjs.map +1 -0
- package/dist/{api-tokens-9YrrCoE6.mjs → api-tokens-BSsQACNe.mjs} +2 -2
- package/dist/{api-tokens-9YrrCoE6.mjs.map → api-tokens-BSsQACNe.mjs.map} +1 -1
- package/dist/{apply-B_VMpJ2P.mjs → apply-B4SIOxR1.mjs} +18 -18
- package/dist/{apply-B_VMpJ2P.mjs.map → apply-B4SIOxR1.mjs.map} +1 -1
- package/dist/astro/image-endpoint.mjs +2 -2
- package/dist/astro/image-endpoint.mjs.map +1 -1
- package/dist/astro/index.d.mts +12 -12
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +110 -37
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +10 -10
- package/dist/astro/middleware/auth.mjs +6 -6
- package/dist/astro/middleware/media-usage-write-fence.mjs +2 -2
- package/dist/astro/middleware/redirect.mjs +3 -3
- package/dist/astro/middleware/request-context.mjs +2 -2
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +10 -10
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +157 -195
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +6 -6
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +6 -6
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +3 -3
- package/dist/astro/routes/api/admin/api-tokens/index.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +5 -5
- package/dist/astro/routes/api/admin/api-tokens/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +3 -3
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +8 -8
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +8 -8
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +8 -8
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +14 -14
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +14 -14
- package/dist/astro/routes/api/admin/bylines/index.mjs +14 -14
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +12 -12
- package/dist/astro/routes/api/admin/comments/_id_.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/bulk.mjs +10 -10
- package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/index.mjs +10 -10
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +3 -3
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +2 -2
- package/dist/astro/routes/api/admin/media-usage/activation.mjs +10 -10
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +13 -13
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +13 -13
- package/dist/astro/routes/api/admin/media-usage/progress.mjs +11 -11
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +14 -14
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs +13 -13
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +13 -13
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +4 -4
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +49 -49
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +49 -49
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +47 -47
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +47 -47
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +48 -48
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +48 -48
- package/dist/astro/routes/api/admin/plugins/index.mjs +47 -47
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +47 -47
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +48 -48
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +47 -47
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +48 -48
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +54 -50
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +17 -16
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +55 -51
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/verify.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/registry/verify.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +93 -0
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/updates.mjs +47 -47
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +47 -47
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +47 -47
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +6 -6
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
- package/dist/astro/routes/api/admin/users/index.mjs +6 -6
- package/dist/astro/routes/api/auth/dev-bypass.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +10 -10
- package/dist/astro/routes/api/auth/invite/index.mjs +7 -7
- package/dist/astro/routes/api/auth/invite/register-options.mjs +9 -9
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +9 -9
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +7 -7
- package/dist/astro/routes/api/auth/mode.mjs +2 -2
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +3 -3
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +6 -6
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +11 -11
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +9 -9
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/verify.mjs +10 -10
- package/dist/astro/routes/api/auth/signup/complete.mjs +10 -10
- package/dist/astro/routes/api/auth/signup/request.mjs +9 -9
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +13 -13
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +14 -5
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +13 -10
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +15 -15
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +15 -15
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +14 -5
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/trash.mjs +7 -7
- package/dist/astro/routes/api/dashboard.mjs +7 -7
- package/dist/astro/routes/api/dev/emails.mjs +2 -2
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +15 -15
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +2 -2
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/execute.mjs +11 -11
- package/dist/astro/routes/api/import/wordpress/media.d.mts +10 -10
- package/dist/astro/routes/api/import/wordpress/media.mjs +9 -9
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +9 -9
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +10 -10
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +15 -15
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +22 -22
- package/dist/astro/routes/api/manifest.mjs +3 -3
- package/dist/astro/routes/api/manifest.mjs.map +1 -1
- package/dist/astro/routes/api/mcp.mjs +188 -65
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +9 -9
- package/dist/astro/routes/api/media/_id_/replace.d.mts +8 -0
- package/dist/astro/routes/api/media/_id_/replace.d.mts.map +1 -0
- package/dist/astro/routes/api/media/_id_/replace.mjs +91 -0
- package/dist/astro/routes/api/media/_id_/replace.mjs.map +1 -0
- package/dist/astro/routes/api/media/_id_/upload.mjs +5 -5
- package/dist/astro/routes/api/media/_id_/usage.mjs +16 -16
- package/dist/astro/routes/api/media/_id_.mjs +15 -15
- package/dist/astro/routes/api/media/file/_...key_.d.mts.map +1 -1
- package/dist/astro/routes/api/media/file/_...key_.mjs +3 -2
- package/dist/astro/routes/api/media/file/_...key_.mjs.map +1 -1
- package/dist/astro/routes/api/media/folders/_id_.mjs +8 -8
- package/dist/astro/routes/api/media/folders/index.mjs +8 -8
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +2 -2
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +2 -2
- package/dist/astro/routes/api/media/providers/index.mjs +2 -2
- package/dist/astro/routes/api/media/upload-url.mjs +15 -13
- package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
- package/dist/astro/routes/api/media.d.mts.map +1 -1
- package/dist/astro/routes/api/media.mjs +47 -24
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +20 -13
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.mjs +15 -11
- package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +15 -11
- package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.mjs +16 -12
- package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_.mjs +21 -14
- package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/index.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/index.mjs +15 -11
- package/dist/astro/routes/api/menus/index.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +5 -5
- package/dist/astro/routes/api/oauth/device/code.mjs +8 -8
- package/dist/astro/routes/api/oauth/device/token.mjs +7 -7
- package/dist/astro/routes/api/oauth/register.mjs +2 -2
- package/dist/astro/routes/api/oauth/token/refresh.mjs +5 -5
- package/dist/astro/routes/api/oauth/token/revoke.mjs +5 -5
- package/dist/astro/routes/api/oauth/token.mjs +5 -5
- package/dist/astro/routes/api/openapi.json.mjs +104 -38
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
- package/dist/astro/routes/api/redirects/404s/index.mjs +8 -8
- package/dist/astro/routes/api/redirects/404s/summary.mjs +8 -8
- package/dist/astro/routes/api/redirects/_id_.mjs +9 -9
- package/dist/astro/routes/api/redirects/index.mjs +9 -9
- package/dist/astro/routes/api/relations/_id_/index.mjs +15 -15
- package/dist/astro/routes/api/relations/_id_/translations.mjs +10 -10
- package/dist/astro/routes/api/relations/index.mjs +15 -15
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -2
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +3 -3
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +47 -47
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +47 -47
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +47 -47
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +47 -47
- package/dist/astro/routes/api/schema/collections/index.mjs +47 -47
- package/dist/astro/routes/api/schema/collections/reorder.mjs +47 -47
- package/dist/astro/routes/api/schema/index.mjs +8 -8
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +47 -47
- package/dist/astro/routes/api/schema/orphans/index.mjs +47 -47
- package/dist/astro/routes/api/search/enable.mjs +10 -10
- package/dist/astro/routes/api/search/index.mjs +9 -9
- package/dist/astro/routes/api/search/rebuild.mjs +10 -10
- package/dist/astro/routes/api/search/stats.mjs +5 -5
- package/dist/astro/routes/api/search/suggest.mjs +9 -9
- package/dist/astro/routes/api/sections/_slug_.mjs +9 -9
- package/dist/astro/routes/api/sections/index.mjs +9 -9
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +5 -5
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +4 -4
- package/dist/astro/routes/api/settings/backups/export.mjs +5 -5
- package/dist/astro/routes/api/settings/backups/index.mjs +6 -6
- package/dist/astro/routes/api/settings/email.mjs +4 -4
- package/dist/astro/routes/api/settings/email.mjs.map +1 -1
- package/dist/astro/routes/api/settings.d.mts.map +1 -1
- package/dist/astro/routes/api/settings.mjs +18 -14
- package/dist/astro/routes/api/settings.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.mjs +11 -11
- package/dist/astro/routes/api/setup/admin.mjs +10 -10
- package/dist/astro/routes/api/setup/dev-bypass.mjs +25 -25
- package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
- package/dist/astro/routes/api/setup/index.mjs +25 -25
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +6 -6
- package/dist/astro/routes/api/taxonomies/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +19 -15
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +20 -16
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +24 -17
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +19 -15
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_.mjs +25 -18
- package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.mjs +19 -15
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +4 -4
- package/dist/astro/routes/api/typegen.mjs +4 -4
- package/dist/astro/routes/api/well-known/auth.mjs +1 -1
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +10 -8
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +16 -12
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +14 -11
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_.mjs +7 -5
- package/dist/astro/routes/api/widget-areas/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/index.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/index.mjs +14 -11
- package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +5 -5
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +8 -8
- package/dist/astro/routes/sitemap.xml.mjs +6 -6
- package/dist/astro/types.d.mts +32 -17
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{authorize-ByYs-Uxs.mjs → authorize-Bkf_UHhD.mjs} +2 -2
- package/dist/{authorize-ByYs-Uxs.mjs.map → authorize-Bkf_UHhD.mjs.map} +1 -1
- package/dist/{backup-ChyHfIoX.mjs → backup-rwVAl9NI.mjs} +4 -4
- package/dist/{backup-ChyHfIoX.mjs.map → backup-rwVAl9NI.mjs.map} +1 -1
- package/dist/{bundle-DZFhFurR.mjs → bundle-C8S2Zl6U.mjs} +3 -3
- package/dist/{bundle-DZFhFurR.mjs.map → bundle-C8S2Zl6U.mjs.map} +1 -1
- package/dist/{byline-Cpnwrje1.mjs → byline-DuhF7NWl.mjs} +25 -12
- package/dist/byline-DuhF7NWl.mjs.map +1 -0
- package/dist/{byline-fields-CAyA_Umd.mjs → byline-fields-BovY4KYM.mjs} +1 -1
- package/dist/{byline-fields-CAyA_Umd.mjs.map → byline-fields-BovY4KYM.mjs.map} +1 -1
- package/dist/{bylines-BSo9B9RX.mjs → bylines-CJ5nd6Lw.mjs} +6 -6
- package/dist/{bylines-BSo9B9RX.mjs.map → bylines-CJ5nd6Lw.mjs.map} +1 -1
- package/dist/{bylines-CHjvehVX.mjs → bylines-RwBAeOF1.mjs} +3 -3
- package/dist/{bylines-CHjvehVX.mjs.map → bylines-RwBAeOF1.mjs.map} +1 -1
- package/dist/{cache-5VirJ2Cn.mjs → cache-BF5Kvn59.mjs} +2 -2
- package/dist/{cache-5VirJ2Cn.mjs.map → cache-BF5Kvn59.mjs.map} +1 -1
- package/dist/{challenge-store-D5pSY2S1.mjs → challenge-store-DQN_Yrck.mjs} +5 -3
- package/dist/challenge-store-DQN_Yrck.mjs.map +1 -0
- package/dist/chrome-tags-D8fiZG94.mjs +24 -0
- package/dist/chrome-tags-D8fiZG94.mjs.map +1 -0
- package/dist/{chunks-bNiX6_DR.mjs → chunks-C4szrD8o.mjs} +2 -2
- package/dist/{chunks-bNiX6_DR.mjs.map → chunks-C4szrD8o.mjs.map} +1 -1
- package/dist/cli/index.mjs +26 -26
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +2 -2
- package/dist/client/index.mjs +2 -2
- package/dist/{collection-deletion-m_oi2c0N.mjs → collection-deletion-Bj07NHbj.mjs} +2 -2
- package/dist/{collection-deletion-m_oi2c0N.mjs.map → collection-deletion-Bj07NHbj.mjs.map} +1 -1
- package/dist/{comment-reaction-CRuItEjt.mjs → comment-reaction-BhrvSHml.mjs} +2 -2
- package/dist/{comment-reaction-CRuItEjt.mjs.map → comment-reaction-BhrvSHml.mjs.map} +1 -1
- package/dist/{comment-DhvLEdhQ.mjs → comment-vxOzWbZN.mjs} +2 -2
- package/dist/{comment-DhvLEdhQ.mjs.map → comment-vxOzWbZN.mjs.map} +1 -1
- package/dist/{comments-CLj4bi8I.mjs → comments-Ct4ensnf.mjs} +2 -2
- package/dist/{comments-CLj4bi8I.mjs.map → comments-Ct4ensnf.mjs.map} +1 -1
- package/dist/{components-v4U4DT2y.mjs → components-DJbo1z0S.mjs} +1 -1
- package/dist/{components-v4U4DT2y.mjs.map → components-DJbo1z0S.mjs.map} +1 -1
- package/dist/{config-DrfghTPe.d.mts → config-B9eZ340f.d.mts} +1 -1
- package/dist/{config-DrfghTPe.d.mts.map → config-B9eZ340f.d.mts.map} +1 -1
- package/dist/config-it29yDLA.mjs +1163 -0
- package/dist/config-it29yDLA.mjs.map +1 -0
- package/dist/{content-CP-SeXNa.mjs → content-DjvM0T92.mjs} +84 -44
- package/dist/content-DjvM0T92.mjs.map +1 -0
- package/dist/{content-list-query-BhejKVqb.d.mts → content-list-query-Btqd4uV2.d.mts} +1 -1
- package/dist/{content-list-query-BhejKVqb.d.mts.map → content-list-query-Btqd4uV2.d.mts.map} +1 -1
- package/dist/{content-refresh-DLOfIhYc.mjs → content-refresh-Bwp-8yGy.mjs} +48 -21
- package/dist/content-refresh-Bwp-8yGy.mjs.map +1 -0
- package/dist/{content-repair-BCxzy0r4.mjs → content-repair-Czdp7jz5.mjs} +4 -4
- package/dist/{content-repair-BCxzy0r4.mjs.map → content-repair-Czdp7jz5.mjs.map} +1 -1
- package/dist/{context-BR5hRWiK.mjs → context-CX6gxOLW.mjs} +52 -17
- package/dist/context-CX6gxOLW.mjs.map +1 -0
- package/dist/{cron-CWfWrWKG.mjs → cron-C6o7VppJ.mjs} +1 -1
- package/dist/{cron-CWfWrWKG.mjs.map → cron-C6o7VppJ.mjs.map} +1 -1
- package/dist/{dashboard-CkIV2rnQ.mjs → dashboard-C2kTeeRI.mjs} +4 -4
- package/dist/{dashboard-CkIV2rnQ.mjs.map → dashboard-C2kTeeRI.mjs.map} +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +1 -1
- package/dist/db/index.mjs.map +1 -1
- package/dist/db/libsql-migrations.d.mts +1 -1
- package/dist/db/libsql-migrations.mjs +4 -4
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres-migrations.d.mts +1 -1
- package/dist/db/postgres-migrations.mjs +4 -4
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/postgres.d.mts.map +1 -1
- package/dist/db/postgres.mjs +19 -3
- package/dist/db/postgres.mjs.map +1 -1
- package/dist/db/sqlite-migrations.d.mts +1 -1
- package/dist/db/sqlite-migrations.mjs +4 -4
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.mjs +1 -1
- package/dist/{default-YMEfcQUx.mjs → default-Clra32mw.mjs} +1 -1
- package/dist/{default-YMEfcQUx.mjs.map → default-Clra32mw.mjs.map} +1 -1
- package/dist/{deferred-tasks-DfqxH5Xf.d.mts → deferred-tasks-CvDETTJO.d.mts} +1 -1
- package/dist/{deferred-tasks-DfqxH5Xf.d.mts.map → deferred-tasks-CvDETTJO.d.mts.map} +1 -1
- package/dist/dev-typegen-DzOPfsNj.mjs +29 -0
- package/dist/dev-typegen-DzOPfsNj.mjs.map +1 -0
- package/dist/{device-flow-CojjSBwb.mjs → device-flow-D2oCWvLJ.mjs} +4 -4
- package/dist/{device-flow-CojjSBwb.mjs.map → device-flow-D2oCWvLJ.mjs.map} +1 -1
- package/dist/{direct-executor-BWeWiRYB.mjs → direct-executor-Bfa5_ToE.mjs} +3 -3
- package/dist/{direct-executor-BWeWiRYB.mjs.map → direct-executor-Bfa5_ToE.mjs.map} +1 -1
- package/dist/{email-console-CEJgR_LB.mjs → email-console-Dzb6uGYa.mjs} +1 -1
- package/dist/{email-console-CEJgR_LB.mjs.map → email-console-Dzb6uGYa.mjs.map} +1 -1
- package/dist/{error-D9w94fjV.mjs → error-DFrQjppn.mjs} +2 -2
- package/dist/{error-D9w94fjV.mjs.map → error-DFrQjppn.mjs.map} +1 -1
- package/dist/{errors-n2j49uNf.mjs → errors-DsVoDUjJ.mjs} +3 -1
- package/dist/errors-DsVoDUjJ.mjs.map +1 -0
- package/dist/{escape-DN4Qmjsl.mjs → escape-HmHTC1Is.mjs} +1 -1
- package/dist/{escape-DN4Qmjsl.mjs.map → escape-HmHTC1Is.mjs.map} +1 -1
- package/dist/{field-defs-cache-Bh4q6oar.mjs → field-defs-cache-BM4SIRqH.mjs} +2 -2
- package/dist/{field-defs-cache-Bh4q6oar.mjs.map → field-defs-cache-BM4SIRqH.mjs.map} +1 -1
- package/dist/{fts-manager-BhOdW0bi.mjs → fts-manager-Do1BlW2r.mjs} +2 -2
- package/dist/{fts-manager-BhOdW0bi.mjs.map → fts-manager-Do1BlW2r.mjs.map} +1 -1
- package/dist/{hash-CTcngWvj.mjs → hash-3JJPlHF2.mjs} +1 -1
- package/dist/{hash-CTcngWvj.mjs.map → hash-3JJPlHF2.mjs.map} +1 -1
- package/dist/hook-result-DCh2WUpe.d.mts +31 -0
- package/dist/hook-result-DCh2WUpe.d.mts.map +1 -0
- package/dist/{hreflang-7pTHsLZJ.d.mts → hreflang-B6hbAuuO.d.mts} +2 -2
- package/dist/{hreflang-7pTHsLZJ.d.mts.map → hreflang-B6hbAuuO.d.mts.map} +1 -1
- package/dist/{hreflang-Huc6O5wa.mjs → hreflang-DQbPZliA.mjs} +6 -6
- package/dist/{hreflang-Huc6O5wa.mjs.map → hreflang-DQbPZliA.mjs.map} +1 -1
- package/dist/{identity-DXmb4aVp.mjs → identity-DksvEazf.mjs} +3 -3
- package/dist/{identity-DXmb4aVp.mjs.map → identity-DksvEazf.mjs.map} +1 -1
- package/dist/{import-C4_O3KXU.mjs → import-CJpaBBBT.mjs} +5 -5
- package/dist/{import-C4_O3KXU.mjs.map → import-CJpaBBBT.mjs.map} +1 -1
- package/dist/{index-DWbJrsAg.d.mts → index-BJNMCWmu.d.mts} +158 -49
- package/dist/index-BJNMCWmu.d.mts.map +1 -0
- package/dist/{index-6bRee8zb.d.mts → index-Du8K7bWa.d.mts} +3 -3
- package/dist/{index-6bRee8zb.d.mts.map → index-Du8K7bWa.d.mts.map} +1 -1
- package/dist/index.d.mts +22 -21
- package/dist/index.mjs +70 -70
- package/dist/{load-Bo7fZAbg.mjs → load-CawHjTOH.mjs} +2 -2
- package/dist/{load-Bo7fZAbg.mjs.map → load-CawHjTOH.mjs.map} +1 -1
- package/dist/{loader-ZsjE4paL.mjs → loader-Z8vl7zTq.mjs} +48 -13
- package/dist/loader-Z8vl7zTq.mjs.map +1 -0
- package/dist/{manifest-builder-QXuqvVMP.mjs → manifest-builder-COtzuca2.mjs} +2 -2
- package/dist/{manifest-builder-QXuqvVMP.mjs.map → manifest-builder-COtzuca2.mjs.map} +1 -1
- package/dist/{manifest-schema-CUYPfCEH.mjs → manifest-schema-BNWwR8Vd.mjs} +5 -5
- package/dist/manifest-schema-BNWwR8Vd.mjs.map +1 -0
- package/dist/media/image-endpoint.d.mts +4 -2
- package/dist/media/image-endpoint.d.mts.map +1 -1
- package/dist/media/image-endpoint.mjs +6 -4
- package/dist/media/image-endpoint.mjs.map +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +1 -1
- package/dist/media/local-runtime.d.mts +12 -12
- package/dist/media/local-runtime.mjs +4 -4
- package/dist/{media-D6SeAfBl.mjs → media-BBm8Wg3f.mjs} +30 -2
- package/dist/media-BBm8Wg3f.mjs.map +1 -0
- package/dist/{media-BjwNuLEu.mjs → media-BHjus86Y.mjs} +35 -5
- package/dist/media-BHjus86Y.mjs.map +1 -0
- package/dist/{media-allowlist-D35v7bmL.mjs → media-allowlist-CoTBWoDp.mjs} +1 -1
- package/dist/{media-allowlist-D35v7bmL.mjs.map → media-allowlist-CoTBWoDp.mjs.map} +1 -1
- package/dist/{media-folders-D-0CmRZj.mjs → media-folders-BGkATs8n.mjs} +1 -1
- package/dist/{media-folders-D-0CmRZj.mjs.map → media-folders-BGkATs8n.mjs.map} +1 -1
- package/dist/{media-upload-C7bLXGcI.mjs → media-upload-BCidR-EY.mjs} +6 -6
- package/dist/{media-upload-C7bLXGcI.mjs.map → media-upload-BCidR-EY.mjs.map} +1 -1
- package/dist/{media-url-DH7giMx_.mjs → media-url-DHoPr0hq.mjs} +1 -1
- package/dist/{media-url-DH7giMx_.mjs.map → media-url-DHoPr0hq.mjs.map} +1 -1
- package/dist/{media-usage-BTRJvS6V.mjs → media-usage-CdY5jhSR.mjs} +8 -8
- package/dist/{media-usage-BTRJvS6V.mjs.map → media-usage-CdY5jhSR.mjs.map} +1 -1
- package/dist/{media-usage-activation-Dx0kPV6b.mjs → media-usage-activation-BgeMtK5C.mjs} +2 -2
- package/dist/{media-usage-activation-Dx0kPV6b.mjs.map → media-usage-activation-BgeMtK5C.mjs.map} +1 -1
- package/dist/{media-usage-work-DWb2XPMI.mjs → media-usage-work-CnGCdHxx.mjs} +4 -4
- package/dist/{media-usage-work-DWb2XPMI.mjs.map → media-usage-work-CnGCdHxx.mjs.map} +1 -1
- package/dist/{media-usage-work-C-fhM30c.mjs → media-usage-work-D6D9sMCA.mjs} +1 -1
- package/dist/{media-usage-work-C-fhM30c.mjs.map → media-usage-work-D6D9sMCA.mjs.map} +1 -1
- package/dist/{media-usage-write-fence-BwoJVRDC.mjs → media-usage-write-fence-hjeD4u7s.mjs} +2 -2
- package/dist/{media-usage-write-fence-BwoJVRDC.mjs.map → media-usage-write-fence-hjeD4u7s.mjs.map} +1 -1
- package/dist/{menus-CNg0QlDt.mjs → menus-6qSwTNxG.mjs} +346 -94
- package/dist/menus-6qSwTNxG.mjs.map +1 -0
- package/dist/{menus-CD7EFLwz.mjs → menus-uvPLXMZf.mjs} +3 -3
- package/dist/{menus-CD7EFLwz.mjs.map → menus-uvPLXMZf.mjs.map} +1 -1
- package/dist/migrations/index.d.mts +1 -1
- package/dist/migrations/index.mjs +3 -3
- package/dist/{mode-DaUM_MB2.mjs → mode-DN_WneRx.mjs} +1 -1
- package/dist/{mode-DaUM_MB2.mjs.map → mode-DN_WneRx.mjs.map} +1 -1
- package/dist/{node-sqlite-compat-Udb4Y-rs.mjs → node-sqlite-compat-BuJXIeMz.mjs} +1 -1
- package/dist/{node-sqlite-compat-Udb4Y-rs.mjs.map → node-sqlite-compat-BuJXIeMz.mjs.map} +1 -1
- package/dist/{normalize-CSxdKBVa.mjs → normalize-C2xNjTSG.mjs} +15 -5
- package/dist/normalize-C2xNjTSG.mjs.map +1 -0
- package/dist/{oauth-authorization-Dpsb-fMJ.mjs → oauth-authorization-Dj6Kwc21.mjs} +4 -4
- package/dist/{oauth-authorization-Dpsb-fMJ.mjs.map → oauth-authorization-Dj6Kwc21.mjs.map} +1 -1
- package/dist/{oauth-clients-Bxnoe_67.mjs → oauth-clients-FD7I0J8m.mjs} +1 -1
- package/dist/{oauth-clients-Bxnoe_67.mjs.map → oauth-clients-FD7I0J8m.mjs.map} +1 -1
- package/dist/{oauth-state-store-0C4s0K6w.mjs → oauth-state-store-DkmDOmHs.mjs} +1 -1
- package/dist/{oauth-state-store-0C4s0K6w.mjs.map → oauth-state-store-DkmDOmHs.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-wlGYSeqX.mjs → oauth-user-lookup-CvIwGpYd.mjs} +1 -1
- package/dist/{oauth-user-lookup-wlGYSeqX.mjs.map → oauth-user-lookup-CvIwGpYd.mjs.map} +1 -1
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{object-cache-71tPfV4A.mjs → object-cache-DVKnyOfy.mjs} +19 -3
- package/dist/object-cache-DVKnyOfy.mjs.map +1 -0
- package/dist/{options-BhZIeFY1.d.mts → options-CYb4y7hM.d.mts} +24 -11
- package/dist/options-CYb4y7hM.d.mts.map +1 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-BRJg1kz8.mjs → parse-Ckpg-Qfp.mjs} +2 -2
- package/dist/{parse-BRJg1kz8.mjs.map → parse-Ckpg-Qfp.mjs.map} +1 -1
- package/dist/{passkey-config-B3P0nHRR.mjs → passkey-config-O_lj3y0k.mjs} +1 -1
- package/dist/{passkey-config-B3P0nHRR.mjs.map → passkey-config-O_lj3y0k.mjs.map} +1 -1
- package/dist/{placeholder-BR4ZhVJl.d.mts → placeholder-4X9BrRrp.d.mts} +1 -1
- package/dist/{placeholder-BR4ZhVJl.d.mts.map → placeholder-4X9BrRrp.d.mts.map} +1 -1
- package/dist/plugin-types.d.mts +8 -3
- package/dist/plugin-types.d.mts.map +1 -1
- package/dist/plugin-utils.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.mjs +2 -2
- package/dist/{policy-BVRganJQ.mjs → policy-Dhtwntrt.mjs} +2 -2
- package/dist/{policy-BVRganJQ.mjs.map → policy-Dhtwntrt.mjs.map} +1 -1
- package/dist/{portable-text-C8Tvp4_g.mjs → portable-text-U85hOafW.mjs} +1 -1
- package/dist/{portable-text-C8Tvp4_g.mjs.map → portable-text-U85hOafW.mjs.map} +1 -1
- package/dist/{preview-dn2dUyM0.mjs → preview-B_vJLvf8.mjs} +2 -2
- package/dist/{preview-dn2dUyM0.mjs.map → preview-B_vJLvf8.mjs.map} +1 -1
- package/dist/{protocol-CuBEsqgE.d.mts → protocol-JdD2YhY9.d.mts} +2 -2
- package/dist/{protocol-CuBEsqgE.d.mts.map → protocol-JdD2YhY9.d.mts.map} +1 -1
- package/dist/{public-url-DRz_AinV.mjs → public-url-CarhZJgf.mjs} +1 -1
- package/dist/{public-url-DRz_AinV.mjs.map → public-url-CarhZJgf.mjs.map} +1 -1
- package/dist/{query-D18vTdha.mjs → query-BZKZcG5b.mjs} +14 -14
- package/dist/{query-D18vTdha.mjs.map → query-BZKZcG5b.mjs.map} +1 -1
- package/dist/{query-tZDEdtCN.mjs → query-BndaFxxp.mjs} +4 -4
- package/dist/{query-tZDEdtCN.mjs.map → query-BndaFxxp.mjs.map} +1 -1
- package/dist/{rate-limit-on7KPo-v.mjs → rate-limit-BZmATC6W.mjs} +2 -2
- package/dist/{rate-limit-on7KPo-v.mjs.map → rate-limit-BZmATC6W.mjs.map} +1 -1
- package/dist/{redirect-DrbEmU9a.mjs → redirect-CzqnLxK-.mjs} +1 -1
- package/dist/{redirect-DrbEmU9a.mjs.map → redirect-CzqnLxK-.mjs.map} +1 -1
- package/dist/{redirects-CRIM55KH.mjs → redirects-BLNOWQTn.mjs} +63 -28
- package/dist/redirects-BLNOWQTn.mjs.map +1 -0
- package/dist/{redirects-BahWiu8Z.mjs → redirects-CqzNM0KM.mjs} +2 -2
- package/dist/{redirects-BahWiu8Z.mjs.map → redirects-CqzNM0KM.mjs.map} +1 -1
- package/dist/{registry-Cx-jEJOS.mjs → registry-AZAsRsor.mjs} +27 -9
- package/dist/registry-AZAsRsor.mjs.map +1 -0
- package/dist/{relation-A6wLF_DS.mjs → relation-04DfKRTO.mjs} +2 -2
- package/dist/{relation-A6wLF_DS.mjs.map → relation-04DfKRTO.mjs.map} +1 -1
- package/dist/{relations-BTPM2saV.mjs → relations-C4htk5sb.mjs} +7 -7
- package/dist/relations-C4htk5sb.mjs.map +1 -0
- package/dist/{relations-Cj5hZ6Zg.mjs → relations-CcFwDJdJ.mjs} +4 -4
- package/dist/{relations-Cj5hZ6Zg.mjs.map → relations-CcFwDJdJ.mjs.map} +1 -1
- package/dist/{relations-C7B46bcU.d.mts → relations-DnRK4YIT.d.mts} +175 -41
- package/dist/relations-DnRK4YIT.d.mts.map +1 -0
- package/dist/request-context.d.mts +1 -1
- package/dist/{request-meta-DRp5ENd_.mjs → request-meta-DYxLlnmz.mjs} +2 -2
- package/dist/{request-meta-DRp5ENd_.mjs.map → request-meta-DYxLlnmz.mjs.map} +1 -1
- package/dist/{resolve-DxUpTMmE.mjs → resolve-prZ3mP7l.mjs} +1 -1
- package/dist/{resolve-DxUpTMmE.mjs.map → resolve-prZ3mP7l.mjs.map} +1 -1
- package/dist/{runner-77GOZCnH.mjs → runner-BLIDKpmA.mjs} +351 -294
- package/dist/runner-BLIDKpmA.mjs.map +1 -0
- package/dist/{runner-zgqA_CqP.d.mts → runner-YKfIMnaF.d.mts} +3 -2
- package/dist/runner-YKfIMnaF.d.mts.map +1 -0
- package/dist/runtime.d.mts +11 -11
- package/dist/runtime.mjs +1 -1
- package/dist/{schema-BY-oVntF.mjs → schema-CGnBeLiW.mjs} +3 -3
- package/dist/{schema-BY-oVntF.mjs.map → schema-CGnBeLiW.mjs.map} +1 -1
- package/dist/{schema-Cw9kVK0I.mjs → schema-DYr-Vd-L.mjs} +5 -5
- package/dist/{schema-Cw9kVK0I.mjs.map → schema-DYr-Vd-L.mjs.map} +1 -1
- package/dist/{scopes-vMR1uIbt.mjs → scopes-BhWvBavj.mjs} +3 -3
- package/dist/{scopes-vMR1uIbt.mjs.map → scopes-BhWvBavj.mjs.map} +1 -1
- package/dist/{search-CfT3KxO5.mjs → search-C-qDk4kx.mjs} +4 -4
- package/dist/{search-CfT3KxO5.mjs.map → search-C-qDk4kx.mjs.map} +1 -1
- package/dist/{secrets-BH2Qow1-.mjs → secrets-rEtHt-6z.mjs} +1 -1
- package/dist/{secrets-BH2Qow1-.mjs.map → secrets-rEtHt-6z.mjs.map} +1 -1
- package/dist/{sections-DTfjyf1z.mjs → sections-B_nYvlwn.mjs} +2 -2
- package/dist/{sections-DTfjyf1z.mjs.map → sections-B_nYvlwn.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +18 -18
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +13 -13
- package/dist/{seo-Cm-dtvgk.mjs → seo-926NRIgt.mjs} +3 -3
- package/dist/{seo-Cm-dtvgk.mjs.map → seo-926NRIgt.mjs.map} +1 -1
- package/dist/{seo-BSiTIXzd.mjs → seo-CVWkdv6x.mjs} +1 -1
- package/dist/{seo-BSiTIXzd.mjs.map → seo-CVWkdv6x.mjs.map} +1 -1
- package/dist/{service-DYsDHEKe.mjs → service-CJl3ZAYs.mjs} +3 -3
- package/dist/{service-DYsDHEKe.mjs.map → service-CJl3ZAYs.mjs.map} +1 -1
- package/dist/{session-user-CNAfvsdw.mjs → session-user-BlMgqCHS.mjs} +1 -1
- package/dist/{session-user-CNAfvsdw.mjs.map → session-user-BlMgqCHS.mjs.map} +1 -1
- package/dist/{settings-BgN-0DT-.mjs → settings--wobrkkC.mjs} +18 -5
- package/dist/settings--wobrkkC.mjs.map +1 -0
- package/dist/{settings-DjtkUo__.mjs → settings-Cwm6o2jY.mjs} +3 -3
- package/dist/{settings-DjtkUo__.mjs.map → settings-Cwm6o2jY.mjs.map} +1 -1
- package/dist/{setup-complete-CcpXaPU7.mjs → setup-complete-DQbClIN2.mjs} +1 -1
- package/dist/{setup-complete-CcpXaPU7.mjs.map → setup-complete-DQbClIN2.mjs.map} +1 -1
- package/dist/{setup-nonce-Reyw30jg.mjs → setup-nonce-DZCFS2sn.mjs} +1 -1
- package/dist/{setup-nonce-Reyw30jg.mjs.map → setup-nonce-DZCFS2sn.mjs.map} +1 -1
- package/dist/{site-url-Cs_V9n3V.mjs → site-url-BrxA_E9H.mjs} +2 -2
- package/dist/{site-url-Cs_V9n3V.mjs.map → site-url-BrxA_E9H.mjs.map} +1 -1
- package/dist/{snapshot-DSB8P7Lm.mjs → snapshot--OCDTqdb.mjs} +1 -1
- package/dist/{snapshot-DSB8P7Lm.mjs.map → snapshot--OCDTqdb.mjs.map} +1 -1
- package/dist/{ssrf-DqebVE34.mjs → ssrf-5sIM5jzl.mjs} +4 -3
- package/dist/{ssrf-DqebVE34.mjs.map → ssrf-5sIM5jzl.mjs.map} +1 -1
- package/dist/{state-BJfU9Uzw.mjs → state-BpFVsJZB.mjs} +1 -1
- package/dist/{state-BJfU9Uzw.mjs.map → state-BpFVsJZB.mjs.map} +1 -1
- package/dist/{status-DDu8HIQl.mjs → status-B777-dXz.mjs} +1 -1
- package/dist/{status-DDu8HIQl.mjs.map → status-B777-dXz.mjs.map} +1 -1
- package/dist/storage/local.d.mts +2 -1
- package/dist/storage/local.d.mts.map +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/local.mjs.map +1 -1
- package/dist/storage/s3.d.mts +2 -1
- package/dist/storage/s3.d.mts.map +1 -1
- package/dist/storage/s3.mjs +3 -2
- package/dist/storage/s3.mjs.map +1 -1
- package/dist/{target-D0o26Azo.mjs → target-BmR0iTwz.mjs} +1 -1
- package/dist/{target-D0o26Azo.mjs.map → target-BmR0iTwz.mjs.map} +1 -1
- package/dist/{taxonomies-CPGxo-bn.mjs → taxonomies-DkAkMupr.mjs} +16 -13
- package/dist/taxonomies-DkAkMupr.mjs.map +1 -0
- package/dist/{taxonomies-kmyudNGP.mjs → taxonomies-Wfy_Lg12.mjs} +42 -16
- package/dist/taxonomies-Wfy_Lg12.mjs.map +1 -0
- package/dist/{taxonomy-8X09dLN5.mjs → taxonomy-tJepplLL.mjs} +4 -4
- package/dist/{taxonomy-8X09dLN5.mjs.map → taxonomy-tJepplLL.mjs.map} +1 -1
- package/dist/{tokens-gTS-IVUp.mjs → tokens-BCO1oruF.mjs} +1 -1
- package/dist/{tokens-gTS-IVUp.mjs.map → tokens-BCO1oruF.mjs.map} +1 -1
- package/dist/{transport-fX59xaJz.mjs → transport-Dr3qtwXC.mjs} +1 -1
- package/dist/{transport-fX59xaJz.mjs.map → transport-Dr3qtwXC.mjs.map} +1 -1
- package/dist/{transport-_6R1ub7t.d.mts → transport-xh6YKW2G.d.mts} +1 -1
- package/dist/{transport-_6R1ub7t.d.mts.map → transport-xh6YKW2G.d.mts.map} +1 -1
- package/dist/{trusted-proxy-fe6nEgR4.mjs → trusted-proxy-BR5F1Otp.mjs} +1 -1
- package/dist/{trusted-proxy-fe6nEgR4.mjs.map → trusted-proxy-BR5F1Otp.mjs.map} +1 -1
- package/dist/{types-BXUmsINL.mjs → types-3qNFPlci.mjs} +1 -1
- package/dist/{types-BXUmsINL.mjs.map → types-3qNFPlci.mjs.map} +1 -1
- package/dist/{types-Vg6f5i3s.d.mts → types-B6GrPic4.d.mts} +9 -3
- package/dist/{types-Vg6f5i3s.d.mts.map → types-B6GrPic4.d.mts.map} +1 -1
- package/dist/{types-DJQxln7q.d.mts → types-BuHW4xDE.d.mts} +11 -10
- package/dist/types-BuHW4xDE.d.mts.map +1 -0
- package/dist/{types-BzBd3PeX.d.mts → types-C00oyCZp.d.mts} +1 -1
- package/dist/{types-BzBd3PeX.d.mts.map → types-C00oyCZp.d.mts.map} +1 -1
- package/dist/{types-Blb-MRC3.d.mts → types-CDtkNSFQ.d.mts} +1 -1
- package/dist/{types-Blb-MRC3.d.mts.map → types-CDtkNSFQ.d.mts.map} +1 -1
- package/dist/{types-D5VVLr7J.d.mts → types-CPeXo1wF.d.mts} +1 -1
- package/dist/{types-D5VVLr7J.d.mts.map → types-CPeXo1wF.d.mts.map} +1 -1
- package/dist/types-CQPWhPxE.mjs.map +1 -1
- package/dist/{types-D_DWe7k9.d.mts → types-CXFkwEGC.d.mts} +3 -2
- package/dist/types-CXFkwEGC.d.mts.map +1 -0
- package/dist/{types-CLqvnd05.d.mts → types-DczELMop.d.mts} +1 -1
- package/dist/{types-CLqvnd05.d.mts.map → types-DczELMop.d.mts.map} +1 -1
- package/dist/types-DfuTR6dL.mjs +3 -0
- package/dist/{types-DHxzBjbD.d.mts → types-FV23hEoW.d.mts} +1 -1
- package/dist/{types-DHxzBjbD.d.mts.map → types-FV23hEoW.d.mts.map} +1 -1
- package/dist/{types-Br-ERaxh.d.mts → types-xDMtUFnO.d.mts} +1 -1
- package/dist/{types-Br-ERaxh.d.mts.map → types-xDMtUFnO.d.mts.map} +1 -1
- package/dist/{upload-attempts-CNyGSepg.mjs → upload-attempts-BsqoQ1fn.mjs} +1 -1
- package/dist/{upload-attempts-CNyGSepg.mjs.map → upload-attempts-BsqoQ1fn.mjs.map} +1 -1
- package/dist/{url-pattern-K-KdXcSe.mjs → url-pattern-D4c2czpJ.mjs} +1 -1
- package/dist/{url-pattern-K-KdXcSe.mjs.map → url-pattern-D4c2czpJ.mjs.map} +1 -1
- package/dist/{user-CtYY0tp2.mjs → user-BTZ40aq6.mjs} +2 -2
- package/dist/{user-CtYY0tp2.mjs.map → user-BTZ40aq6.mjs.map} +1 -1
- package/dist/{utils-HztC73hq.mjs → utils-BKvNjjhY.mjs} +1 -1
- package/dist/{utils-HztC73hq.mjs.map → utils-BKvNjjhY.mjs.map} +1 -1
- package/dist/{validate-Dd-IUjnZ.mjs → validate-DE_LRwo9.mjs} +2 -2
- package/dist/{validate-Dd-IUjnZ.mjs.map → validate-DE_LRwo9.mjs.map} +1 -1
- package/dist/{validate-DlqdOZXB.d.mts → validate-DUP27OYD.d.mts} +5 -5
- package/dist/{validate-DlqdOZXB.d.mts.map → validate-DUP27OYD.d.mts.map} +1 -1
- package/dist/{validation-D83n7Npi.mjs → validation-BMImFJ11.mjs} +8 -8
- package/dist/{validation-D83n7Npi.mjs.map → validation-BMImFJ11.mjs.map} +1 -1
- package/dist/version-Bii3suaO.mjs +7 -0
- package/dist/{version-ri-sCyAp.mjs.map → version-Bii3suaO.mjs.map} +1 -1
- package/dist/{widgets-CpmZd9Q-.mjs → widgets-D3gJ10xU.mjs} +17 -4
- package/dist/widgets-D3gJ10xU.mjs.map +1 -0
- package/dist/{wxr-taxonomies-BFd0y72_.d.mts → wxr-taxonomies-B2Og_6rU.d.mts} +1 -1
- package/dist/{wxr-taxonomies-BFd0y72_.d.mts.map → wxr-taxonomies-B2Og_6rU.d.mts.map} +1 -1
- package/dist/{wxr-taxonomies-Df4vxWcU.mjs → wxr-taxonomies-Cxngsjwo.mjs} +4 -4
- package/dist/{wxr-taxonomies-Df4vxWcU.mjs.map → wxr-taxonomies-Cxngsjwo.mjs.map} +1 -1
- package/dist/{zod-generator-DylzusHh.mjs → zod-generator-BuYSQJB7.mjs} +11 -7
- package/dist/zod-generator-BuYSQJB7.mjs.map +1 -0
- package/package.json +12 -9
- package/src/api/errors.ts +2 -0
- package/src/api/handlers/content.ts +49 -11
- package/src/api/handlers/index.ts +1 -0
- package/src/api/handlers/manifest.ts +161 -12
- package/src/api/handlers/media.ts +30 -0
- package/src/api/handlers/registry.ts +393 -289
- package/src/api/handlers/taxonomies.ts +16 -9
- package/src/api/openapi/document.ts +85 -5
- package/src/api/parse.ts +1 -1
- package/src/api/schemas/auth.ts +4 -4
- package/src/api/schemas/bylines.ts +3 -3
- package/src/api/schemas/comments.ts +1 -1
- package/src/api/schemas/common.ts +3 -2
- package/src/api/schemas/content.ts +78 -22
- package/src/api/schemas/media.ts +52 -0
- package/src/api/schemas/redirects.ts +6 -1
- package/src/api/schemas/schema.ts +4 -0
- package/src/api/schemas/setup.ts +1 -1
- package/src/api/schemas/taxonomies.ts +2 -2
- package/src/api/schemas/users.ts +1 -1
- package/src/api/types.ts +23 -10
- package/src/astro/dev-typegen.ts +35 -0
- package/src/astro/image-endpoint.ts +2 -2
- package/src/astro/integration/dev-typegen.ts +91 -0
- package/src/astro/integration/index.ts +9 -44
- package/src/astro/integration/routes.ts +5 -0
- package/src/astro/integration/vite-config.ts +21 -2
- package/src/astro/middleware.ts +5 -0
- package/src/astro/routes/api/admin/api-tokens/index.ts +4 -1
- package/src/astro/routes/api/admin/oauth-clients/[id].ts +1 -1
- package/src/astro/routes/api/admin/oauth-clients/index.ts +1 -1
- package/src/astro/routes/api/admin/plugins/registry/[id]/update.ts +4 -0
- package/src/astro/routes/api/admin/plugins/registry/artifact.ts +3 -7
- package/src/astro/routes/api/admin/plugins/registry/install.ts +4 -0
- package/src/astro/routes/api/admin/plugins/registry/verify.ts +60 -0
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +8 -2
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +6 -2
- package/src/astro/routes/api/manifest.ts +1 -1
- package/src/astro/routes/api/media/[id]/replace.ts +114 -0
- package/src/astro/routes/api/media/file/[...key].ts +4 -1
- package/src/astro/routes/api/media/upload-url.ts +8 -4
- package/src/astro/routes/api/media.ts +54 -8
- package/src/astro/routes/api/menus/[name]/items/[id].ts +7 -2
- package/src/astro/routes/api/menus/[name]/items.ts +4 -1
- package/src/astro/routes/api/menus/[name]/reorder.ts +4 -1
- package/src/astro/routes/api/menus/[name]/translations.ts +4 -1
- package/src/astro/routes/api/menus/[name].ts +7 -2
- package/src/astro/routes/api/menus/index.ts +4 -1
- package/src/astro/routes/api/settings/email.ts +1 -1
- package/src/astro/routes/api/settings.ts +4 -1
- package/src/astro/routes/api/taxonomies/[name]/reorder.ts +4 -1
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug]/translations.ts +4 -1
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug].ts +7 -2
- package/src/astro/routes/api/taxonomies/[name]/terms/index.ts +4 -1
- package/src/astro/routes/api/taxonomies/[name].ts +7 -2
- package/src/astro/routes/api/taxonomies/index.ts +4 -1
- package/src/astro/routes/api/widget-areas/[name]/reorder.ts +3 -1
- package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +5 -2
- package/src/astro/routes/api/widget-areas/[name]/widgets.ts +3 -1
- package/src/astro/routes/api/widget-areas/[name].ts +3 -1
- package/src/astro/routes/api/widget-areas/index.ts +3 -1
- package/src/astro/types.ts +23 -5
- package/src/auth/challenge-store.ts +3 -1
- package/src/aws-sdk.d.ts +1 -0
- package/src/cache/chrome-tags.ts +24 -0
- package/src/components/EmDashImage.astro +2 -1
- package/src/components/EmDashMedia.astro +2 -1
- package/src/components/InlinePortableTextEditor.tsx +6 -1
- package/src/components/widgets/Archives.astro +2 -37
- package/src/content/converters/index.ts +2 -0
- package/src/content/converters/mark-safety.ts +1 -0
- package/src/content/converters/portable-text-identity.ts +139 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +202 -69
- package/src/content/converters/prosemirror-to-portable-text.ts +96 -25
- package/src/content/converters/types.ts +1 -0
- package/src/database/migrations/017_authorization_codes.ts +14 -4
- package/src/database/migrations/074_content_deleted_scheduled_index.ts +55 -0
- package/src/database/migrations/runner.ts +3 -1
- package/src/database/repositories/byline.ts +32 -16
- package/src/database/repositories/content.ts +114 -47
- package/src/database/repositories/media-usage.ts +66 -37
- package/src/database/repositories/media.ts +60 -1
- package/src/database/repositories/plugin-storage.ts +74 -9
- package/src/database/repositories/types.ts +8 -7
- package/src/db/adapters.ts +8 -1
- package/src/db/postgres.ts +23 -0
- package/src/emdash-runtime.ts +80 -150
- package/src/fields/boolean.ts +1 -1
- package/src/fields/datetime.ts +1 -1
- package/src/fields/file.ts +1 -1
- package/src/fields/integer.ts +1 -1
- package/src/fields/json.ts +1 -1
- package/src/fields/multiselect.ts +1 -1
- package/src/fields/number.ts +1 -1
- package/src/fields/portable-text.ts +1 -1
- package/src/fields/richtext.ts +1 -1
- package/src/fields/select.ts +1 -1
- package/src/fields/slug.ts +1 -1
- package/src/fields/text.ts +1 -1
- package/src/fields/textarea.ts +1 -1
- package/src/fields/types.ts +2 -2
- package/src/index.ts +25 -3
- package/src/loader.ts +63 -10
- package/src/mcp/server.ts +228 -24
- package/src/media/image-endpoint.ts +5 -2
- package/src/media/normalize.ts +15 -4
- package/src/media/usage/cleanup.ts +9 -8
- package/src/menus/index.ts +16 -0
- package/src/object-cache/index.ts +44 -2
- package/src/plugin-types.ts +18 -1
- package/src/plugins/hooks.ts +4 -1
- package/src/plugins/index.ts +6 -0
- package/src/plugins/manager.ts +2 -1
- package/src/plugins/manifest-schema.ts +1 -1
- package/src/plugins/routes.ts +3 -1
- package/src/plugins/sandbox/hook-result.ts +52 -0
- package/src/plugins/sandbox/index.ts +10 -0
- package/src/plugins/types.ts +6 -0
- package/src/registry/artifact-checksum.ts +15 -0
- package/src/registry/artifact-verification.ts +85 -0
- package/src/registry/authoritative-records.ts +180 -0
- package/src/registry/record-labels.ts +28 -0
- package/src/schema/registry.ts +26 -3
- package/src/schema/zod-generator.ts +16 -13
- package/src/security/ssrf.ts +5 -2
- package/src/settings/index.ts +16 -0
- package/src/storage/local.ts +1 -0
- package/src/storage/s3.ts +2 -0
- package/src/storage/types.ts +2 -0
- package/src/taxonomies/index.ts +40 -20
- package/src/widgets/archives.ts +67 -0
- package/src/widgets/index.ts +16 -0
- package/dist/api-B0w3uBiG.mjs +0 -2269
- package/dist/api-B0w3uBiG.mjs.map +0 -1
- package/dist/byline-Cpnwrje1.mjs.map +0 -1
- package/dist/challenge-store-D5pSY2S1.mjs.map +0 -1
- package/dist/content-CP-SeXNa.mjs.map +0 -1
- package/dist/content-refresh-DLOfIhYc.mjs.map +0 -1
- package/dist/context-BR5hRWiK.mjs.map +0 -1
- package/dist/errors-n2j49uNf.mjs.map +0 -1
- package/dist/index-DWbJrsAg.d.mts.map +0 -1
- package/dist/loader-ZsjE4paL.mjs.map +0 -1
- package/dist/manifest-schema-CUYPfCEH.mjs.map +0 -1
- package/dist/media-BjwNuLEu.mjs.map +0 -1
- package/dist/media-D6SeAfBl.mjs.map +0 -1
- package/dist/menus-CNg0QlDt.mjs.map +0 -1
- package/dist/normalize-CSxdKBVa.mjs.map +0 -1
- package/dist/object-cache-71tPfV4A.mjs.map +0 -1
- package/dist/options-BhZIeFY1.d.mts.map +0 -1
- package/dist/redirects-CRIM55KH.mjs.map +0 -1
- package/dist/registry-BiO5WwPq.mjs +0 -2716
- package/dist/registry-BiO5WwPq.mjs.map +0 -1
- package/dist/registry-Cx-jEJOS.mjs.map +0 -1
- package/dist/relations-BTPM2saV.mjs.map +0 -1
- package/dist/relations-C7B46bcU.d.mts.map +0 -1
- package/dist/runner-77GOZCnH.mjs.map +0 -1
- package/dist/runner-zgqA_CqP.d.mts.map +0 -1
- package/dist/settings-BgN-0DT-.mjs.map +0 -1
- package/dist/taxonomies-CPGxo-bn.mjs.map +0 -1
- package/dist/taxonomies-kmyudNGP.mjs.map +0 -1
- package/dist/types-D6OcIp2P.mjs +0 -3
- package/dist/types-DJQxln7q.d.mts.map +0 -1
- package/dist/types-D_DWe7k9.d.mts.map +0 -1
- package/dist/version-ri-sCyAp.mjs +0 -7
- package/dist/widgets-CpmZd9Q-.mjs.map +0 -1
- package/dist/zod-generator-DylzusHh.mjs.map +0 -1
- /package/dist/{api-tokens-B5NHLNUN.mjs → api-tokens-BfYts-sq.mjs} +0 -0
- /package/dist/{ssrf-BPKzkm6O.mjs → ssrf-Dg3cIT-b.mjs} +0 -0
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import { t as validateIdentifier } from "./validate-BpwoDOgt.mjs";
|
|
2
|
-
import { n as cachedQuery, t as CacheNamespace } from "./object-cache-
|
|
3
|
-
import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-
|
|
2
|
+
import { n as cachedQuery, t as CacheNamespace } from "./object-cache-DVKnyOfy.mjs";
|
|
3
|
+
import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-C4szrD8o.mjs";
|
|
4
4
|
import { o as decodeCursor, s as encodeCursor } from "./types-CQPWhPxE.mjs";
|
|
5
|
-
import { t as CommentRepository } from "./comment-
|
|
5
|
+
import { t as CommentRepository } from "./comment-vxOzWbZN.mjs";
|
|
6
6
|
import { t as OptionsRepository } from "./options-BHPeIbBd.mjs";
|
|
7
|
-
import { t as PluginContextFactory } from "./context-
|
|
7
|
+
import { t as PluginContextFactory } from "./context-CX6gxOLW.mjs";
|
|
8
8
|
import { r as requestCached } from "./request-cache-DH9zdCOD.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
9
|
+
import { t as menuTag } from "./chrome-tags-D8fiZG94.mjs";
|
|
10
|
+
import { i as resolveLocaleChain, r as resolveLocale } from "./resolve-prZ3mP7l.mjs";
|
|
11
|
+
import { s as getDb } from "./loader-Z8vl7zTq.mjs";
|
|
12
|
+
import { i as normalizeCapabilities } from "./types-DfuTR6dL.mjs";
|
|
13
|
+
import { gt as sanitizeHref } from "./redirects-BLNOWQTn.mjs";
|
|
14
|
+
import { t as extractRequestMeta } from "./request-meta-DYxLlnmz.mjs";
|
|
15
|
+
import { r as setCronTasksEnabled } from "./cron-C6o7VppJ.mjs";
|
|
16
|
+
import { t as MediaUsageActivationWriteBlockedError } from "./media-usage-write-fence-hjeD4u7s.mjs";
|
|
17
|
+
import { t as CommentReactionRepository } from "./comment-reaction-BhrvSHml.mjs";
|
|
17
18
|
import { sql } from "kysely";
|
|
18
19
|
import { ulid } from "ulidx";
|
|
19
20
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
20
21
|
import { z } from "astro/zod";
|
|
22
|
+
import { z as z$1 } from "zod";
|
|
23
|
+
import { Extension, Mark, Node } from "@tiptap/core";
|
|
21
24
|
|
|
22
25
|
//#region src/database/repositories/audit.ts
|
|
23
26
|
/**
|
|
@@ -224,7 +227,7 @@ function reference(collection, options) {
|
|
|
224
227
|
const portableTextBlockSchema = z.object({
|
|
225
228
|
_type: z.string(),
|
|
226
229
|
_key: z.string()
|
|
227
|
-
}).
|
|
230
|
+
}).loose();
|
|
228
231
|
/**
|
|
229
232
|
* Portable Text field
|
|
230
233
|
* Stores structured content in Portable Text format
|
|
@@ -252,10 +255,10 @@ function sanitizeGalleryImages(value, generateKey) {
|
|
|
252
255
|
if (!Array.isArray(value)) return [];
|
|
253
256
|
const images = [];
|
|
254
257
|
for (const entry of value) {
|
|
255
|
-
if (!isRecord$
|
|
258
|
+
if (!isRecord$4(entry)) continue;
|
|
256
259
|
const record = entry;
|
|
257
260
|
const asset = record.asset;
|
|
258
|
-
if (!isRecord$
|
|
261
|
+
if (!isRecord$4(asset)) continue;
|
|
259
262
|
const assetRecord = asset;
|
|
260
263
|
const image = {
|
|
261
264
|
_type: "image",
|
|
@@ -279,7 +282,7 @@ function sanitizeGalleryImages(value, generateKey) {
|
|
|
279
282
|
}
|
|
280
283
|
return images;
|
|
281
284
|
}
|
|
282
|
-
function isRecord$
|
|
285
|
+
function isRecord$4(value) {
|
|
283
286
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
284
287
|
}
|
|
285
288
|
|
|
@@ -305,9 +308,10 @@ const SUPPORTED_PROSEMIRROR_MARKS = new Set([
|
|
|
305
308
|
"subscript",
|
|
306
309
|
"superscript",
|
|
307
310
|
"code",
|
|
308
|
-
"link"
|
|
311
|
+
"link",
|
|
312
|
+
"emdashPortableTextSpan"
|
|
309
313
|
]);
|
|
310
|
-
function isRecord$
|
|
314
|
+
function isRecord$3(value) {
|
|
311
315
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
312
316
|
}
|
|
313
317
|
function collectPortableTextMarks(value, inheritedMarkDefs, unsupported) {
|
|
@@ -315,11 +319,11 @@ function collectPortableTextMarks(value, inheritedMarkDefs, unsupported) {
|
|
|
315
319
|
for (const item of value) collectPortableTextMarks(item, inheritedMarkDefs, unsupported);
|
|
316
320
|
return;
|
|
317
321
|
}
|
|
318
|
-
if (!isRecord$
|
|
322
|
+
if (!isRecord$3(value)) return;
|
|
319
323
|
let markDefs = inheritedMarkDefs;
|
|
320
324
|
if (Array.isArray(value.markDefs)) {
|
|
321
325
|
const localMarkDefs = new Map(inheritedMarkDefs);
|
|
322
|
-
for (const markDef of value.markDefs) if (isRecord$
|
|
326
|
+
for (const markDef of value.markDefs) if (isRecord$3(markDef) && typeof markDef._key === "string") localMarkDefs.set(markDef._key, markDef);
|
|
323
327
|
markDefs = localMarkDefs;
|
|
324
328
|
}
|
|
325
329
|
if (value._type === "span" && Array.isArray(value.marks)) for (const mark of value.marks) {
|
|
@@ -474,6 +478,125 @@ function normalizeProseMirrorOrderedListJson(doc) {
|
|
|
474
478
|
return normalized;
|
|
475
479
|
}
|
|
476
480
|
|
|
481
|
+
//#endregion
|
|
482
|
+
//#region src/content/converters/portable-text-identity.ts
|
|
483
|
+
const PORTABLE_TEXT_BLOCK_NODE = "emdashPortableTextBlock";
|
|
484
|
+
const PORTABLE_TEXT_BLOCK_ATTR = "emdashPortableTextBlock";
|
|
485
|
+
const PORTABLE_TEXT_KEY_ATTR = "emdashPortableTextKey";
|
|
486
|
+
const PORTABLE_TEXT_SPAN_MARK = "emdashPortableTextSpan";
|
|
487
|
+
function isRecord$2(value) {
|
|
488
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
489
|
+
}
|
|
490
|
+
function attrsWithPortableTextKey(attrs, key) {
|
|
491
|
+
return {
|
|
492
|
+
...attrs,
|
|
493
|
+
[PORTABLE_TEXT_KEY_ATTR]: key
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
function portableTextKeyFromAttrs(attrs) {
|
|
497
|
+
const key = attrs?.[PORTABLE_TEXT_KEY_ATTR];
|
|
498
|
+
return typeof key === "string" && key ? key : void 0;
|
|
499
|
+
}
|
|
500
|
+
function portableTextSpanKeyFromMarks(marks) {
|
|
501
|
+
for (const mark of marks ?? []) {
|
|
502
|
+
if (!isRecord$2(mark) || mark.type !== PORTABLE_TEXT_SPAN_MARK || !isRecord$2(mark.attrs)) continue;
|
|
503
|
+
const key = mark.attrs.key;
|
|
504
|
+
if (typeof key === "string" && key) return key;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
function portableTextMarkDefsFromMarks(marks) {
|
|
508
|
+
const identity = (marks ?? []).find((mark) => isRecord$2(mark) && mark.type === PORTABLE_TEXT_SPAN_MARK && isRecord$2(mark.attrs));
|
|
509
|
+
if (!isRecord$2(identity) || !isRecord$2(identity.attrs) || !Array.isArray(identity.attrs.markDefs)) return [];
|
|
510
|
+
return identity.attrs.markDefs.filter((markDef) => isRecord$2(markDef) && typeof markDef._type === "string" && typeof markDef._key === "string");
|
|
511
|
+
}
|
|
512
|
+
function portableTextBlockFromAttrs(attrs) {
|
|
513
|
+
const block = attrs?.[PORTABLE_TEXT_BLOCK_ATTR];
|
|
514
|
+
if (!isRecord$2(block) || typeof block._type !== "string" || typeof block._key !== "string") return;
|
|
515
|
+
return {
|
|
516
|
+
...block,
|
|
517
|
+
_type: block._type,
|
|
518
|
+
_key: block._key
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
const PortableTextIdentityExtension = Extension.create({
|
|
522
|
+
name: "emdashPortableTextIdentity",
|
|
523
|
+
addGlobalAttributes() {
|
|
524
|
+
const hiddenAttribute = {
|
|
525
|
+
default: null,
|
|
526
|
+
rendered: false
|
|
527
|
+
};
|
|
528
|
+
return [{
|
|
529
|
+
types: [
|
|
530
|
+
"paragraph",
|
|
531
|
+
"heading",
|
|
532
|
+
"blockquote",
|
|
533
|
+
"codeBlock",
|
|
534
|
+
"htmlBlock",
|
|
535
|
+
"image",
|
|
536
|
+
"horizontalRule",
|
|
537
|
+
"gallery",
|
|
538
|
+
PORTABLE_TEXT_BLOCK_NODE
|
|
539
|
+
],
|
|
540
|
+
attributes: { [PORTABLE_TEXT_KEY_ATTR]: hiddenAttribute }
|
|
541
|
+
}];
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
const PortableTextSpanIdentity = Mark.create({
|
|
545
|
+
name: PORTABLE_TEXT_SPAN_MARK,
|
|
546
|
+
inclusive: false,
|
|
547
|
+
spanning: false,
|
|
548
|
+
addAttributes() {
|
|
549
|
+
return {
|
|
550
|
+
key: {
|
|
551
|
+
default: null,
|
|
552
|
+
rendered: false
|
|
553
|
+
},
|
|
554
|
+
markDefs: {
|
|
555
|
+
default: [],
|
|
556
|
+
rendered: false
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
},
|
|
560
|
+
parseHTML() {
|
|
561
|
+
return [];
|
|
562
|
+
},
|
|
563
|
+
renderHTML() {
|
|
564
|
+
return ["span", 0];
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
const PortableTextOpaqueBlock = Node.create({
|
|
568
|
+
name: PORTABLE_TEXT_BLOCK_NODE,
|
|
569
|
+
group: "block",
|
|
570
|
+
atom: true,
|
|
571
|
+
selectable: true,
|
|
572
|
+
draggable: true,
|
|
573
|
+
addAttributes() {
|
|
574
|
+
return { [PORTABLE_TEXT_BLOCK_ATTR]: {
|
|
575
|
+
default: null,
|
|
576
|
+
rendered: false
|
|
577
|
+
} };
|
|
578
|
+
},
|
|
579
|
+
parseHTML() {
|
|
580
|
+
return [{ tag: "div[data-emdash-portable-text-block]" }];
|
|
581
|
+
},
|
|
582
|
+
renderHTML({ node }) {
|
|
583
|
+
const blockType = portableTextBlockFromAttrs(node.attrs)?._type ?? "unknown";
|
|
584
|
+
return [
|
|
585
|
+
"div",
|
|
586
|
+
{
|
|
587
|
+
"data-emdash-portable-text-block": blockType,
|
|
588
|
+
contenteditable: "false"
|
|
589
|
+
},
|
|
590
|
+
`[Unknown block type: ${blockType}]`
|
|
591
|
+
];
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
const portableTextIdentityExtensions = [
|
|
595
|
+
PortableTextIdentityExtension,
|
|
596
|
+
PortableTextSpanIdentity,
|
|
597
|
+
PortableTextOpaqueBlock
|
|
598
|
+
];
|
|
599
|
+
|
|
477
600
|
//#endregion
|
|
478
601
|
//#region src/content/converters/prosemirror-to-portable-text.ts
|
|
479
602
|
/**
|
|
@@ -494,18 +617,33 @@ function prosemirrorToPortableText(doc) {
|
|
|
494
617
|
if (!doc || doc.type !== "doc" || !doc.content) return [];
|
|
495
618
|
assertProseMirrorMarksSupported(doc);
|
|
496
619
|
const blocks = [];
|
|
620
|
+
const usedBlockKeys = /* @__PURE__ */ new Set();
|
|
497
621
|
for (const [i, node] of doc.content.entries()) {
|
|
622
|
+
if (i === doc.content.length - 1 && isUnkeyedEmptyParagraph(node)) continue;
|
|
498
623
|
const converted = convertNode(node, `root:${i}`);
|
|
499
|
-
|
|
500
|
-
|
|
624
|
+
for (const block of converted ? Array.isArray(converted) ? converted : [converted] : []) {
|
|
625
|
+
let key = block._key;
|
|
626
|
+
if (usedBlockKeys.has(key)) do
|
|
627
|
+
key = generateKey();
|
|
628
|
+
while (usedBlockKeys.has(key));
|
|
629
|
+
usedBlockKeys.add(key);
|
|
630
|
+
blocks.push(key === block._key ? block : {
|
|
631
|
+
...block,
|
|
632
|
+
_key: key
|
|
633
|
+
});
|
|
634
|
+
}
|
|
501
635
|
}
|
|
502
636
|
return blocks;
|
|
503
637
|
}
|
|
638
|
+
function isUnkeyedEmptyParagraph(node) {
|
|
639
|
+
return node.type === "paragraph" && (node.content?.length ?? 0) === 0 && portableTextKeyFromAttrs(node.attrs) === void 0;
|
|
640
|
+
}
|
|
504
641
|
/**
|
|
505
642
|
* Convert a single ProseMirror node to Portable Text block(s)
|
|
506
643
|
*/
|
|
507
644
|
function convertNode(node, path) {
|
|
508
645
|
switch (node.type) {
|
|
646
|
+
case PORTABLE_TEXT_BLOCK_NODE: return portableTextBlockFromAttrs(node.attrs) ?? null;
|
|
509
647
|
case "paragraph": return convertParagraph(node);
|
|
510
648
|
case "heading": return convertHeading(node);
|
|
511
649
|
case "bulletList": return convertList$1(node, "bullet", path);
|
|
@@ -517,7 +655,7 @@ function convertNode(node, path) {
|
|
|
517
655
|
case "gallery": return convertGallery(node);
|
|
518
656
|
case "horizontalRule": return {
|
|
519
657
|
_type: "break",
|
|
520
|
-
_key: generateKey(),
|
|
658
|
+
_key: portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
521
659
|
style: "lineBreak"
|
|
522
660
|
};
|
|
523
661
|
default: return {
|
|
@@ -538,10 +676,10 @@ function convertParagraph(node) {
|
|
|
538
676
|
const textAlign = ta === "center" || ta === "right" || ta === "justify" ? ta : void 0;
|
|
539
677
|
return {
|
|
540
678
|
_type: "block",
|
|
541
|
-
_key: generateKey(),
|
|
679
|
+
_key: portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
542
680
|
style: "normal",
|
|
543
681
|
children,
|
|
544
|
-
markDefs
|
|
682
|
+
...markDefs.length > 0 ? { markDefs } : {},
|
|
545
683
|
...textAlign ? { textAlign } : {}
|
|
546
684
|
};
|
|
547
685
|
}
|
|
@@ -568,7 +706,7 @@ function convertHeading(node) {
|
|
|
568
706
|
const textAlign = ta === "center" || ta === "right" || ta === "justify" ? ta : void 0;
|
|
569
707
|
return {
|
|
570
708
|
_type: "block",
|
|
571
|
-
_key: generateKey(),
|
|
709
|
+
_key: portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
572
710
|
style,
|
|
573
711
|
children,
|
|
574
712
|
markDefs: markDefs.length > 0 ? markDefs : void 0,
|
|
@@ -596,7 +734,7 @@ function convertListItem$1(item, listItem, level, path, metadata) {
|
|
|
596
734
|
const { children, markDefs } = convertInlineContent(child.content || []);
|
|
597
735
|
if (children.length > 0) blocks.push({
|
|
598
736
|
_type: "block",
|
|
599
|
-
_key: generateKey(),
|
|
737
|
+
_key: portableTextKeyFromAttrs(child.attrs) ?? generateKey(),
|
|
600
738
|
style: "normal",
|
|
601
739
|
listItem,
|
|
602
740
|
level,
|
|
@@ -626,7 +764,7 @@ function convertBlockquote(node) {
|
|
|
626
764
|
const { children, markDefs } = convertInlineContent(child.content || []);
|
|
627
765
|
if (children.length > 0) blocks.push({
|
|
628
766
|
_type: "block",
|
|
629
|
-
_key: generateKey(),
|
|
767
|
+
_key: portableTextKeyFromAttrs(child.attrs) ?? portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
630
768
|
style: "blockquote",
|
|
631
769
|
children,
|
|
632
770
|
markDefs: markDefs.length > 0 ? markDefs : void 0
|
|
@@ -642,7 +780,7 @@ function convertCodeBlock$1(node) {
|
|
|
642
780
|
const language = typeof node.attrs?.language === "string" ? node.attrs.language : void 0;
|
|
643
781
|
return {
|
|
644
782
|
_type: "code",
|
|
645
|
-
_key: generateKey(),
|
|
783
|
+
_key: portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
646
784
|
code,
|
|
647
785
|
language: language || void 0
|
|
648
786
|
};
|
|
@@ -654,7 +792,7 @@ function convertHtmlBlock(node) {
|
|
|
654
792
|
const rawHtml = node.attrs?.html;
|
|
655
793
|
return {
|
|
656
794
|
_type: "htmlBlock",
|
|
657
|
-
_key: generateKey(),
|
|
795
|
+
_key: portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
658
796
|
html: typeof rawHtml === "string" ? rawHtml : ""
|
|
659
797
|
};
|
|
660
798
|
}
|
|
@@ -672,9 +810,10 @@ function convertImage$1(node) {
|
|
|
672
810
|
const height = typeof attrs?.height === "number" ? attrs.height : void 0;
|
|
673
811
|
const displayWidth = typeof attrs?.displayWidth === "number" ? attrs.displayWidth : void 0;
|
|
674
812
|
const displayHeight = typeof attrs?.displayHeight === "number" ? attrs.displayHeight : void 0;
|
|
813
|
+
const alignment = attrs?.alignment;
|
|
675
814
|
return {
|
|
676
815
|
_type: "image",
|
|
677
|
-
_key: generateKey(),
|
|
816
|
+
_key: portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
678
817
|
asset: {
|
|
679
818
|
_ref: mediaId || src || "",
|
|
680
819
|
url: src || "",
|
|
@@ -685,7 +824,8 @@ function convertImage$1(node) {
|
|
|
685
824
|
width: width || void 0,
|
|
686
825
|
height: height || void 0,
|
|
687
826
|
displayWidth: displayWidth || void 0,
|
|
688
|
-
displayHeight: displayHeight || void 0
|
|
827
|
+
displayHeight: displayHeight || void 0,
|
|
828
|
+
alignment: alignment === "left" || alignment === "center" || alignment === "right" || alignment === "wide" || alignment === "full" ? alignment : void 0
|
|
689
829
|
};
|
|
690
830
|
}
|
|
691
831
|
/**
|
|
@@ -695,7 +835,7 @@ function convertGallery(node) {
|
|
|
695
835
|
const columns = node.attrs?.columns;
|
|
696
836
|
return {
|
|
697
837
|
_type: "gallery",
|
|
698
|
-
_key: generateKey(),
|
|
838
|
+
_key: portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
699
839
|
images: sanitizeGalleryImages(node.attrs?.images, generateKey),
|
|
700
840
|
...typeof columns === "number" ? { columns } : {}
|
|
701
841
|
};
|
|
@@ -707,29 +847,50 @@ function convertInlineContent(nodes) {
|
|
|
707
847
|
const children = [];
|
|
708
848
|
const markDefs = [];
|
|
709
849
|
const markDefMap = /* @__PURE__ */ new Map();
|
|
850
|
+
const usedSpanKeys = /* @__PURE__ */ new Set();
|
|
851
|
+
const claimSpanKey = (preferred) => {
|
|
852
|
+
if (preferred && !usedSpanKeys.has(preferred)) {
|
|
853
|
+
usedSpanKeys.add(preferred);
|
|
854
|
+
return preferred;
|
|
855
|
+
}
|
|
856
|
+
let key;
|
|
857
|
+
do
|
|
858
|
+
key = generateKey();
|
|
859
|
+
while (usedSpanKeys.has(key));
|
|
860
|
+
usedSpanKeys.add(key);
|
|
861
|
+
return key;
|
|
862
|
+
};
|
|
710
863
|
for (const node of nodes) if (node.type === "text" && node.text) {
|
|
711
864
|
const marks = [];
|
|
865
|
+
const originalMarkDefs = portableTextMarkDefsFromMarks(node.marks);
|
|
712
866
|
for (const mark of node.marks || []) {
|
|
713
|
-
const markType = convertMark(mark, markDefs, markDefMap);
|
|
867
|
+
const markType = convertMark(mark, markDefs, markDefMap, originalMarkDefs);
|
|
714
868
|
if (markType) marks.push(markType);
|
|
715
869
|
}
|
|
870
|
+
const preferredKey = portableTextSpanKeyFromMarks(node.marks) ?? portableTextKeyFromAttrs(node.attrs);
|
|
871
|
+
const normalizedMarks = marks.length > 0 ? marks : void 0;
|
|
872
|
+
const previous = children.at(-1);
|
|
873
|
+
if (preferredKey && previous?._key === preferredKey && JSON.stringify(previous.marks) === JSON.stringify(normalizedMarks)) {
|
|
874
|
+
previous.text += node.text;
|
|
875
|
+
continue;
|
|
876
|
+
}
|
|
716
877
|
children.push({
|
|
717
878
|
_type: "span",
|
|
718
|
-
_key:
|
|
879
|
+
_key: claimSpanKey(preferredKey),
|
|
719
880
|
text: node.text,
|
|
720
|
-
marks:
|
|
881
|
+
marks: normalizedMarks
|
|
721
882
|
});
|
|
722
883
|
} else if (node.type === "hardBreak") if (children.length > 0) {
|
|
723
884
|
const lastChild = children.at(-1);
|
|
724
885
|
lastChild.text += "\n";
|
|
725
886
|
} else children.push({
|
|
726
887
|
_type: "span",
|
|
727
|
-
_key:
|
|
888
|
+
_key: claimSpanKey(portableTextSpanKeyFromMarks(node.marks) ?? portableTextKeyFromAttrs(node.attrs)),
|
|
728
889
|
text: "\n"
|
|
729
890
|
});
|
|
730
891
|
if (children.length === 0) children.push({
|
|
731
892
|
_type: "span",
|
|
732
|
-
_key:
|
|
893
|
+
_key: claimSpanKey(),
|
|
733
894
|
text: ""
|
|
734
895
|
});
|
|
735
896
|
return {
|
|
@@ -740,7 +901,7 @@ function convertInlineContent(nodes) {
|
|
|
740
901
|
/**
|
|
741
902
|
* Convert a ProseMirror mark to Portable Text mark
|
|
742
903
|
*/
|
|
743
|
-
function convertMark(mark, markDefs, markDefMap) {
|
|
904
|
+
function convertMark(mark, markDefs, markDefMap, originalMarkDefs) {
|
|
744
905
|
switch (mark.type) {
|
|
745
906
|
case "bold":
|
|
746
907
|
case "strong": return "strong";
|
|
@@ -752,17 +913,22 @@ function convertMark(mark, markDefs, markDefMap) {
|
|
|
752
913
|
case "subscript": return "subscript";
|
|
753
914
|
case "superscript": return "superscript";
|
|
754
915
|
case "code": return "code";
|
|
916
|
+
case PORTABLE_TEXT_SPAN_MARK: return null;
|
|
755
917
|
case "link": {
|
|
756
918
|
const href = (typeof mark.attrs?.href === "string" ? mark.attrs.href : "") || "";
|
|
757
|
-
|
|
758
|
-
const
|
|
919
|
+
const originalMarkDef = originalMarkDefs.find((markDef) => markDef._type === "link");
|
|
920
|
+
const mapKey = originalMarkDef ? `key:${originalMarkDef._key}` : `href:${href}`;
|
|
921
|
+
if (markDefMap.has(mapKey)) return markDefMap.get(mapKey);
|
|
922
|
+
const key = originalMarkDef?._key || generateKey();
|
|
923
|
+
const blank = mark.attrs?.target === "_blank";
|
|
759
924
|
markDefs.push({
|
|
925
|
+
...originalMarkDef,
|
|
760
926
|
_type: "link",
|
|
761
927
|
_key: key,
|
|
762
928
|
href,
|
|
763
|
-
blank
|
|
929
|
+
...blank || originalMarkDef && Object.hasOwn(originalMarkDef, "blank") ? { blank } : {}
|
|
764
930
|
});
|
|
765
|
-
markDefMap.set(
|
|
931
|
+
markDefMap.set(mapKey, key);
|
|
766
932
|
return key;
|
|
767
933
|
}
|
|
768
934
|
default: throw new UnsupportedPortableTextMarksError([mark.type]);
|
|
@@ -776,15 +942,14 @@ function convertMark(mark, markDefs, markDefMap) {
|
|
|
776
942
|
*
|
|
777
943
|
* Converts Portable Text to TipTap's ProseMirror JSON format for editing.
|
|
778
944
|
*/
|
|
779
|
-
/**
|
|
780
|
-
|
|
781
|
-
*/
|
|
782
|
-
function portableTextToProsemirror(blocks) {
|
|
945
|
+
/** Convert Portable Text to a ProseMirror document. */
|
|
946
|
+
function portableTextToProsemirror(blocks, options = {}) {
|
|
783
947
|
if (!blocks || blocks.length === 0) return {
|
|
784
948
|
type: "doc",
|
|
785
949
|
content: [{ type: "paragraph" }]
|
|
786
950
|
};
|
|
787
951
|
assertPortableTextMarksSupported(blocks);
|
|
952
|
+
const preserveIdentity = options.preserveIdentity === true;
|
|
788
953
|
const content = [];
|
|
789
954
|
let i = 0;
|
|
790
955
|
while (i < blocks.length) {
|
|
@@ -805,7 +970,7 @@ function portableTextToProsemirror(blocks) {
|
|
|
805
970
|
i++;
|
|
806
971
|
} else break;
|
|
807
972
|
}
|
|
808
|
-
content.push(convertList(listBlocks, listType, `root:${runStart}
|
|
973
|
+
content.push(convertList(listBlocks, listType, `root:${runStart}`, preserveIdentity));
|
|
809
974
|
} else if (isTextBlock(block) && block.style === "blockquote") {
|
|
810
975
|
const quoteBlocks = [];
|
|
811
976
|
while (i < blocks.length) {
|
|
@@ -817,15 +982,16 @@ function portableTextToProsemirror(blocks) {
|
|
|
817
982
|
content.push({
|
|
818
983
|
type: "blockquote",
|
|
819
984
|
content: quoteBlocks.map((quoteBlock) => {
|
|
820
|
-
const paragraph = convertSpans(quoteBlock.children, quoteBlock.markDefs || []);
|
|
985
|
+
const paragraph = convertSpans(quoteBlock.children, quoteBlock.markDefs || [], preserveIdentity);
|
|
821
986
|
return {
|
|
822
987
|
type: "paragraph",
|
|
988
|
+
attrs: identityAttrs(void 0, quoteBlock._key, preserveIdentity),
|
|
823
989
|
content: paragraph.length > 0 ? paragraph : void 0
|
|
824
990
|
};
|
|
825
991
|
})
|
|
826
992
|
});
|
|
827
993
|
} else {
|
|
828
|
-
const converted = convertBlock(block);
|
|
994
|
+
const converted = convertBlock(block, preserveIdentity);
|
|
829
995
|
if (converted) content.push(converted);
|
|
830
996
|
i++;
|
|
831
997
|
}
|
|
@@ -835,6 +1001,9 @@ function portableTextToProsemirror(blocks) {
|
|
|
835
1001
|
content: content.length > 0 ? content : [{ type: "paragraph" }]
|
|
836
1002
|
});
|
|
837
1003
|
}
|
|
1004
|
+
function identityAttrs(attrs, key, preserveIdentity) {
|
|
1005
|
+
return preserveIdentity ? attrsWithPortableTextKey(attrs, key) : attrs;
|
|
1006
|
+
}
|
|
838
1007
|
function getListMetadata(item, fallbackSeed) {
|
|
839
1008
|
const listId = normalizeListId(item.listId) ?? deriveLegacyListId(fallbackSeed);
|
|
840
1009
|
const listStart = normalizeListStart(item.listStart);
|
|
@@ -866,8 +1035,8 @@ function isImageBlock(block) {
|
|
|
866
1035
|
return block._type === "image" && "asset" in block && typeof block.asset === "object" && block.asset !== null;
|
|
867
1036
|
}
|
|
868
1037
|
/**
|
|
869
|
-
* Type guard for gallery blocks
|
|
870
|
-
* without one
|
|
1038
|
+
* Type guard for gallery blocks that carry a usable `images` array.
|
|
1039
|
+
* Galleries without one are handled separately in `convertBlock`.
|
|
871
1040
|
*/
|
|
872
1041
|
function isGalleryBlock(block) {
|
|
873
1042
|
return block._type === "gallery" && "images" in block && Array.isArray(block.images);
|
|
@@ -881,23 +1050,44 @@ function isCodeBlock(block) {
|
|
|
881
1050
|
/**
|
|
882
1051
|
* Convert a single Portable Text block to ProseMirror node
|
|
883
1052
|
*/
|
|
884
|
-
function convertBlock(block) {
|
|
885
|
-
if (isTextBlock(block)) return convertTextBlock(block);
|
|
886
|
-
if (isImageBlock(block)) return convertImage(block);
|
|
887
|
-
if (block._type === "image") return convertMalformedImage(block);
|
|
1053
|
+
function convertBlock(block, preserveIdentity) {
|
|
1054
|
+
if (isTextBlock(block)) return convertTextBlock(block, preserveIdentity);
|
|
1055
|
+
if (isImageBlock(block)) return convertImage(block, preserveIdentity);
|
|
1056
|
+
if (block._type === "image") return convertMalformedImage(block, preserveIdentity);
|
|
888
1057
|
if (isGalleryBlock(block)) return {
|
|
889
1058
|
type: "gallery",
|
|
890
|
-
attrs: {
|
|
1059
|
+
attrs: identityAttrs({
|
|
891
1060
|
images: sanitizeGalleryImages(block.images),
|
|
892
1061
|
columns: typeof block.columns === "number" ? block.columns : void 0
|
|
893
|
-
}
|
|
1062
|
+
}, block._key, preserveIdentity)
|
|
894
1063
|
};
|
|
895
|
-
if (isCodeBlock(block)) return convertCodeBlock(block);
|
|
1064
|
+
if (isCodeBlock(block)) return convertCodeBlock(block, preserveIdentity);
|
|
896
1065
|
if (block._type === "htmlBlock") return {
|
|
897
1066
|
type: "htmlBlock",
|
|
898
|
-
attrs: { html: block.html || "" }
|
|
1067
|
+
attrs: identityAttrs({ html: block.html || "" }, block._key, preserveIdentity)
|
|
1068
|
+
};
|
|
1069
|
+
if (block._type === "break") return {
|
|
1070
|
+
type: "horizontalRule",
|
|
1071
|
+
attrs: identityAttrs(void 0, block._key, preserveIdentity)
|
|
1072
|
+
};
|
|
1073
|
+
if (block._type === "gallery") {
|
|
1074
|
+
if (preserveIdentity) return {
|
|
1075
|
+
type: PORTABLE_TEXT_BLOCK_NODE,
|
|
1076
|
+
attrs: { [PORTABLE_TEXT_BLOCK_ATTR]: block }
|
|
1077
|
+
};
|
|
1078
|
+
return {
|
|
1079
|
+
type: "paragraph",
|
|
1080
|
+
content: [{
|
|
1081
|
+
type: "text",
|
|
1082
|
+
text: `[Unknown block type: ${block._type}]`,
|
|
1083
|
+
marks: [{ type: "code" }]
|
|
1084
|
+
}]
|
|
1085
|
+
};
|
|
1086
|
+
}
|
|
1087
|
+
if (preserveIdentity) return {
|
|
1088
|
+
type: PORTABLE_TEXT_BLOCK_NODE,
|
|
1089
|
+
attrs: { [PORTABLE_TEXT_BLOCK_ATTR]: block }
|
|
899
1090
|
};
|
|
900
|
-
if (block._type === "break") return { type: "horizontalRule" };
|
|
901
1091
|
return {
|
|
902
1092
|
type: "paragraph",
|
|
903
1093
|
content: [{
|
|
@@ -910,9 +1100,9 @@ function convertBlock(block) {
|
|
|
910
1100
|
/**
|
|
911
1101
|
* Convert text block to ProseMirror paragraph or heading
|
|
912
1102
|
*/
|
|
913
|
-
function convertTextBlock(block) {
|
|
1103
|
+
function convertTextBlock(block, preserveIdentity) {
|
|
914
1104
|
const { style = "normal", children, markDefs = [] } = block;
|
|
915
|
-
const content = convertSpans(children, markDefs);
|
|
1105
|
+
const content = convertSpans(children, markDefs, preserveIdentity);
|
|
916
1106
|
switch (style) {
|
|
917
1107
|
case "h1":
|
|
918
1108
|
case "h2":
|
|
@@ -921,14 +1111,15 @@ function convertTextBlock(block) {
|
|
|
921
1111
|
case "h5":
|
|
922
1112
|
case "h6": return {
|
|
923
1113
|
type: "heading",
|
|
924
|
-
attrs: {
|
|
1114
|
+
attrs: identityAttrs({
|
|
925
1115
|
level: parseInt(style.substring(1), 10),
|
|
926
1116
|
...block.textAlign ? { textAlign: block.textAlign } : {}
|
|
927
|
-
},
|
|
1117
|
+
}, block._key, preserveIdentity),
|
|
928
1118
|
content: content.length > 0 ? content : void 0
|
|
929
1119
|
};
|
|
930
1120
|
case "blockquote": return {
|
|
931
1121
|
type: "blockquote",
|
|
1122
|
+
attrs: identityAttrs(void 0, block._key, preserveIdentity),
|
|
932
1123
|
content: [{
|
|
933
1124
|
type: "paragraph",
|
|
934
1125
|
content: content.length > 0 ? content : void 0
|
|
@@ -936,7 +1127,7 @@ function convertTextBlock(block) {
|
|
|
936
1127
|
};
|
|
937
1128
|
default: return {
|
|
938
1129
|
type: "paragraph",
|
|
939
|
-
attrs: block.textAlign ? { textAlign: block.textAlign } : void 0,
|
|
1130
|
+
attrs: identityAttrs(block.textAlign ? { textAlign: block.textAlign } : void 0, block._key, preserveIdentity),
|
|
940
1131
|
content: content.length > 0 ? content : void 0
|
|
941
1132
|
};
|
|
942
1133
|
}
|
|
@@ -944,7 +1135,7 @@ function convertTextBlock(block) {
|
|
|
944
1135
|
/**
|
|
945
1136
|
* Convert list items to ProseMirror list
|
|
946
1137
|
*/
|
|
947
|
-
function convertList(items, listType, context) {
|
|
1138
|
+
function convertList(items, listType, context, preserveIdentity) {
|
|
948
1139
|
const rootItems = [];
|
|
949
1140
|
let i = 0;
|
|
950
1141
|
while (i < items.length) {
|
|
@@ -956,9 +1147,9 @@ function convertList(items, listType, context) {
|
|
|
956
1147
|
nestedItems.push(items[i]);
|
|
957
1148
|
i++;
|
|
958
1149
|
}
|
|
959
|
-
rootItems.push(convertListItem(item, nestedItems, listType, `${context}:${rootItems.length}
|
|
1150
|
+
rootItems.push(convertListItem(item, nestedItems, listType, `${context}:${rootItems.length}`, preserveIdentity));
|
|
960
1151
|
} else {
|
|
961
|
-
rootItems.push(convertListItem(item, [], listType, `${context}:${rootItems.length}
|
|
1152
|
+
rootItems.push(convertListItem(item, [], listType, `${context}:${rootItems.length}`, preserveIdentity));
|
|
962
1153
|
i++;
|
|
963
1154
|
}
|
|
964
1155
|
}
|
|
@@ -975,11 +1166,12 @@ function convertList(items, listType, context) {
|
|
|
975
1166
|
/**
|
|
976
1167
|
* Convert a single list item to ProseMirror
|
|
977
1168
|
*/
|
|
978
|
-
function convertListItem(item, nestedItems, parentListType, context) {
|
|
1169
|
+
function convertListItem(item, nestedItems, parentListType, context, preserveIdentity) {
|
|
979
1170
|
const content = [];
|
|
980
|
-
const spans = convertSpans(item.children, item.markDefs || []);
|
|
1171
|
+
const spans = convertSpans(item.children, item.markDefs || [], preserveIdentity);
|
|
981
1172
|
content.push({
|
|
982
1173
|
type: "paragraph",
|
|
1174
|
+
attrs: identityAttrs(void 0, item._key, preserveIdentity),
|
|
983
1175
|
content: spans.length > 0 ? spans : void 0
|
|
984
1176
|
});
|
|
985
1177
|
if (nestedItems.length > 0) {
|
|
@@ -1002,7 +1194,7 @@ function convertListItem(item, nestedItems, parentListType, context) {
|
|
|
1002
1194
|
...ni,
|
|
1003
1195
|
level: (ni.level || 2) - 1
|
|
1004
1196
|
}));
|
|
1005
|
-
content.push(convertList(adjustedGroup, anchorType, `${context}:nested:${j - nestedGroup.length}
|
|
1197
|
+
content.push(convertList(adjustedGroup, anchorType, `${context}:nested:${j - nestedGroup.length}`, preserveIdentity));
|
|
1006
1198
|
}
|
|
1007
1199
|
}
|
|
1008
1200
|
}
|
|
@@ -1014,16 +1206,24 @@ function convertListItem(item, nestedItems, parentListType, context) {
|
|
|
1014
1206
|
/**
|
|
1015
1207
|
* Convert Portable Text spans to ProseMirror text nodes
|
|
1016
1208
|
*/
|
|
1017
|
-
function convertSpans(spans, markDefs) {
|
|
1209
|
+
function convertSpans(spans, markDefs, preserveIdentity) {
|
|
1018
1210
|
const nodes = [];
|
|
1019
1211
|
const markDefsMap = new Map(markDefs.map((md) => [md._key, md]));
|
|
1020
1212
|
for (const span of spans) {
|
|
1021
1213
|
if (span._type !== "span") continue;
|
|
1214
|
+
const referencedMarkDefs = markDefs.filter((markDef) => span.marks?.includes(markDef._key));
|
|
1022
1215
|
const parts = span.text.split("\n");
|
|
1023
1216
|
for (let i = 0; i < parts.length; i++) {
|
|
1024
1217
|
const text = parts[i];
|
|
1025
1218
|
if (text.length > 0) {
|
|
1026
1219
|
const marks = convertMarks(span.marks || [], markDefsMap);
|
|
1220
|
+
if (preserveIdentity) marks.push({
|
|
1221
|
+
type: PORTABLE_TEXT_SPAN_MARK,
|
|
1222
|
+
attrs: {
|
|
1223
|
+
key: span._key,
|
|
1224
|
+
markDefs: referencedMarkDefs
|
|
1225
|
+
}
|
|
1226
|
+
});
|
|
1027
1227
|
const node = {
|
|
1028
1228
|
type: "text",
|
|
1029
1229
|
text
|
|
@@ -1031,7 +1231,16 @@ function convertSpans(spans, markDefs) {
|
|
|
1031
1231
|
if (marks.length > 0) node.marks = marks;
|
|
1032
1232
|
nodes.push(node);
|
|
1033
1233
|
}
|
|
1034
|
-
if (i < parts.length - 1) nodes.push(
|
|
1234
|
+
if (i < parts.length - 1) nodes.push(preserveIdentity ? {
|
|
1235
|
+
type: "hardBreak",
|
|
1236
|
+
marks: [{
|
|
1237
|
+
type: PORTABLE_TEXT_SPAN_MARK,
|
|
1238
|
+
attrs: {
|
|
1239
|
+
key: span._key,
|
|
1240
|
+
markDefs: referencedMarkDefs
|
|
1241
|
+
}
|
|
1242
|
+
}]
|
|
1243
|
+
} : { type: "hardBreak" });
|
|
1035
1244
|
}
|
|
1036
1245
|
}
|
|
1037
1246
|
return nodes;
|
|
@@ -1078,13 +1287,16 @@ function convertMarks(marks, markDefs) {
|
|
|
1078
1287
|
}
|
|
1079
1288
|
return pmMarks;
|
|
1080
1289
|
}
|
|
1290
|
+
function imageAlignment(value) {
|
|
1291
|
+
return value === "left" || value === "center" || value === "right" || value === "wide" || value === "full" ? value : void 0;
|
|
1292
|
+
}
|
|
1081
1293
|
/**
|
|
1082
1294
|
* Convert image block to ProseMirror
|
|
1083
1295
|
*/
|
|
1084
|
-
function convertImage(block) {
|
|
1296
|
+
function convertImage(block, preserveIdentity) {
|
|
1085
1297
|
return {
|
|
1086
1298
|
type: "image",
|
|
1087
|
-
attrs: {
|
|
1299
|
+
attrs: identityAttrs({
|
|
1088
1300
|
src: block.asset.url || block.asset._ref,
|
|
1089
1301
|
alt: block.alt || "",
|
|
1090
1302
|
title: block.caption || "",
|
|
@@ -1093,8 +1305,9 @@ function convertImage(block) {
|
|
|
1093
1305
|
width: block.width,
|
|
1094
1306
|
height: block.height,
|
|
1095
1307
|
displayWidth: block.displayWidth,
|
|
1096
|
-
displayHeight: block.displayHeight
|
|
1097
|
-
|
|
1308
|
+
displayHeight: block.displayHeight,
|
|
1309
|
+
alignment: imageAlignment(block.alignment)
|
|
1310
|
+
}, block._key, preserveIdentity)
|
|
1098
1311
|
};
|
|
1099
1312
|
}
|
|
1100
1313
|
/**
|
|
@@ -1102,10 +1315,10 @@ function convertImage(block) {
|
|
|
1102
1315
|
* Handles blocks like `{ _type: "image", url: "...", alt: "..." }` that may
|
|
1103
1316
|
* originate from migrations or third-party imports.
|
|
1104
1317
|
*/
|
|
1105
|
-
function convertMalformedImage(block) {
|
|
1318
|
+
function convertMalformedImage(block, preserveIdentity) {
|
|
1106
1319
|
return {
|
|
1107
1320
|
type: "image",
|
|
1108
|
-
attrs: {
|
|
1321
|
+
attrs: identityAttrs({
|
|
1109
1322
|
src: "url" in block && typeof block.url === "string" ? block.url : "",
|
|
1110
1323
|
alt: "alt" in block && typeof block.alt === "string" ? block.alt : "",
|
|
1111
1324
|
title: "caption" in block && typeof block.caption === "string" ? block.caption : "",
|
|
@@ -1114,17 +1327,18 @@ function convertMalformedImage(block) {
|
|
|
1114
1327
|
width: "width" in block && typeof block.width === "number" ? block.width : void 0,
|
|
1115
1328
|
height: "height" in block && typeof block.height === "number" ? block.height : void 0,
|
|
1116
1329
|
displayWidth: "displayWidth" in block && typeof block.displayWidth === "number" ? block.displayWidth : void 0,
|
|
1117
|
-
displayHeight: "displayHeight" in block && typeof block.displayHeight === "number" ? block.displayHeight : void 0
|
|
1118
|
-
|
|
1330
|
+
displayHeight: "displayHeight" in block && typeof block.displayHeight === "number" ? block.displayHeight : void 0,
|
|
1331
|
+
alignment: imageAlignment("alignment" in block ? block.alignment : void 0)
|
|
1332
|
+
}, block._key, preserveIdentity)
|
|
1119
1333
|
};
|
|
1120
1334
|
}
|
|
1121
1335
|
/**
|
|
1122
1336
|
* Convert code block to ProseMirror
|
|
1123
1337
|
*/
|
|
1124
|
-
function convertCodeBlock(block) {
|
|
1338
|
+
function convertCodeBlock(block, preserveIdentity) {
|
|
1125
1339
|
return {
|
|
1126
1340
|
type: "codeBlock",
|
|
1127
|
-
attrs: { language: block.language || null },
|
|
1341
|
+
attrs: identityAttrs({ language: block.language || null }, block._key, preserveIdentity),
|
|
1128
1342
|
content: block.code ? [{
|
|
1129
1343
|
type: "text",
|
|
1130
1344
|
text: block.code
|
|
@@ -1569,9 +1783,10 @@ var HookPipeline = class HookPipeline {
|
|
|
1569
1783
|
}
|
|
1570
1784
|
/**
|
|
1571
1785
|
* Run content:beforeSave hooks
|
|
1572
|
-
* Returns modified content from the pipeline
|
|
1786
|
+
* Returns modified content from the pipeline. `id` is the existing item's
|
|
1787
|
+
* ID when updating.
|
|
1573
1788
|
*/
|
|
1574
|
-
async runContentBeforeSave(content, collection, isNew) {
|
|
1789
|
+
async runContentBeforeSave(content, collection, isNew, id) {
|
|
1575
1790
|
const hooks = this.getTypedHooks("content:beforeSave");
|
|
1576
1791
|
const results = [];
|
|
1577
1792
|
let currentContent = content;
|
|
@@ -1582,6 +1797,7 @@ var HookPipeline = class HookPipeline {
|
|
|
1582
1797
|
collection,
|
|
1583
1798
|
isNew
|
|
1584
1799
|
};
|
|
1800
|
+
if (id !== void 0) event.id = id;
|
|
1585
1801
|
const ctx = this.getContext(hook.pluginId);
|
|
1586
1802
|
const start = Date.now();
|
|
1587
1803
|
try {
|
|
@@ -2539,7 +2755,7 @@ var PluginRouteHandler = class {
|
|
|
2539
2755
|
error: {
|
|
2540
2756
|
code: "VALIDATION_ERROR",
|
|
2541
2757
|
message: "Invalid request body",
|
|
2542
|
-
details: parseResult.error
|
|
2758
|
+
details: z$1.formatError(parseResult.error)
|
|
2543
2759
|
},
|
|
2544
2760
|
status: 400
|
|
2545
2761
|
};
|
|
@@ -2846,9 +3062,9 @@ var PluginManager = class {
|
|
|
2846
3062
|
/**
|
|
2847
3063
|
* Run content:beforeSave hooks across all active plugins
|
|
2848
3064
|
*/
|
|
2849
|
-
async runContentBeforeSave(content, collection, isNew) {
|
|
3065
|
+
async runContentBeforeSave(content, collection, isNew, id) {
|
|
2850
3066
|
this.ensureInitialized();
|
|
2851
|
-
return this.hookPipeline.runContentBeforeSave(content, collection, isNew);
|
|
3067
|
+
return this.hookPipeline.runContentBeforeSave(content, collection, isNew, id);
|
|
2852
3068
|
}
|
|
2853
3069
|
/**
|
|
2854
3070
|
* Run content:afterSave hooks across all active plugins
|
|
@@ -3242,14 +3458,14 @@ const SANDBOX_ROUTE_ERROR_DEFINITIONS = {
|
|
|
3242
3458
|
status: 503
|
|
3243
3459
|
}
|
|
3244
3460
|
};
|
|
3245
|
-
function isRecord(value) {
|
|
3461
|
+
function isRecord$1(value) {
|
|
3246
3462
|
return typeof value === "object" && value !== null;
|
|
3247
3463
|
}
|
|
3248
3464
|
function isSandboxRouteErrorCode(value) {
|
|
3249
3465
|
return typeof value === "string" && value in SANDBOX_ROUTE_ERROR_DEFINITIONS;
|
|
3250
3466
|
}
|
|
3251
3467
|
function getSandboxRouteErrorDetails(error) {
|
|
3252
|
-
if (!isRecord(error)) return null;
|
|
3468
|
+
if (!isRecord$1(error)) return null;
|
|
3253
3469
|
const propertyCode = isSandboxRouteErrorCode(error.code) ? error.code : null;
|
|
3254
3470
|
const nameCode = error instanceof Error && isSandboxRouteErrorCode(error.name) ? error.name : null;
|
|
3255
3471
|
if (propertyCode && nameCode && propertyCode !== nameCode) return null;
|
|
@@ -3275,7 +3491,7 @@ function createSandboxRouteErrorEnvelope(error) {
|
|
|
3275
3491
|
} : null;
|
|
3276
3492
|
}
|
|
3277
3493
|
function getSandboxRouteErrorEnvelope(value) {
|
|
3278
|
-
if (!isRecord(value) || value.__emdashSandboxRouteError !== true) return null;
|
|
3494
|
+
if (!isRecord$1(value) || value.__emdashSandboxRouteError !== true) return null;
|
|
3279
3495
|
const details = getSandboxRouteErrorDetails(value.error);
|
|
3280
3496
|
return details ? {
|
|
3281
3497
|
__emdashSandboxRouteError: true,
|
|
@@ -3293,6 +3509,30 @@ var SandboxUnavailableError = class extends Error {
|
|
|
3293
3509
|
}
|
|
3294
3510
|
};
|
|
3295
3511
|
|
|
3512
|
+
//#endregion
|
|
3513
|
+
//#region src/plugins/sandbox/hook-result.ts
|
|
3514
|
+
/** Current wire-format version for sandbox hook result envelopes. */
|
|
3515
|
+
const SANDBOX_HOOK_RESULT_VERSION = 1;
|
|
3516
|
+
/** Maximum editor-facing rejection reason accepted from a sandboxed plugin. */
|
|
3517
|
+
const MAX_SANDBOX_SAVE_REJECTION_REASON_LENGTH = 500;
|
|
3518
|
+
function isRecord(value) {
|
|
3519
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3520
|
+
}
|
|
3521
|
+
/** Validate and normalize an untrusted value returned across the sandbox boundary. */
|
|
3522
|
+
function inspectSandboxHookResult(value) {
|
|
3523
|
+
if (!isRecord(value) || !Object.hasOwn(value, "__emdashSandboxHookResult")) return { kind: "value" };
|
|
3524
|
+
if (value.__emdashSandboxHookResult !== true || value.version !== SANDBOX_HOOK_RESULT_VERSION || !isRecord(value.error) || value.error.code !== "SAVE_REJECTED" || typeof value.error.reason !== "string") return { kind: "malformed" };
|
|
3525
|
+
const reason = value.error.reason.trim();
|
|
3526
|
+
if (reason.length === 0 || reason.length > MAX_SANDBOX_SAVE_REJECTION_REASON_LENGTH) return { kind: "malformed" };
|
|
3527
|
+
return {
|
|
3528
|
+
kind: "error",
|
|
3529
|
+
error: {
|
|
3530
|
+
code: "SAVE_REJECTED",
|
|
3531
|
+
reason
|
|
3532
|
+
}
|
|
3533
|
+
};
|
|
3534
|
+
}
|
|
3535
|
+
|
|
3296
3536
|
//#endregion
|
|
3297
3537
|
//#region src/comments/ranking.ts
|
|
3298
3538
|
/**
|
|
@@ -3523,6 +3763,18 @@ async function getMenusWithDb(db, options = {}) {
|
|
|
3523
3763
|
return query.execute();
|
|
3524
3764
|
}
|
|
3525
3765
|
/**
|
|
3766
|
+
* Get a menu by name with a Workers edge-cache hint.
|
|
3767
|
+
*
|
|
3768
|
+
* Use the returned `cacheHint` with `Astro.cache.set()` so pages that render
|
|
3769
|
+
* this menu can be purged automatically when the menu is edited.
|
|
3770
|
+
*/
|
|
3771
|
+
async function getMenuWithCacheHint(name, options = {}) {
|
|
3772
|
+
return {
|
|
3773
|
+
data: await getMenu(name, options),
|
|
3774
|
+
cacheHint: { tags: [menuTag(name)] }
|
|
3775
|
+
};
|
|
3776
|
+
}
|
|
3777
|
+
/**
|
|
3526
3778
|
* Build a hierarchical menu tree from a flat list of items. Items are
|
|
3527
3779
|
* resolved against the given `locale` so references land on the right
|
|
3528
3780
|
* per-locale content rows.
|
|
@@ -3754,5 +4006,5 @@ function resolveTaxonomyUrl(referenceGroup, taxonomyLookup) {
|
|
|
3754
4006
|
}
|
|
3755
4007
|
|
|
3756
4008
|
//#endregion
|
|
3757
|
-
export {
|
|
3758
|
-
//# sourceMappingURL=menus-
|
|
4009
|
+
export { resolveExclusiveHooks as A, parseRouteInput as C, isContentSaveRejection as D, ContentSaveRejectedError as E, portableText as F, reference as I, file as L, portableTextToProsemirror as M, prosemirrorToPortableText as N, HookPipeline as O, portableTextIdentityExtensions as P, image as R, buildRouteMeta as S, EmailPipeline as T, NodeCronScheduler as _, getComments as a, PluginRouteError as b, inspectSandboxHookResult as c, createSandboxRouteErrorEnvelope as d, getSandboxRouteErrorDetails as f, createNoopSandboxRunner as g, SandboxNotAvailableError as h, getCommentCount as i, definePlugin as j, createHookPipeline as k, SandboxUnavailableError as l, NoopSandboxRunner as m, getMenuWithCacheHint as n, MAX_SANDBOX_SAVE_REJECTION_REASON_LENGTH as o, getSandboxRouteErrorEnvelope as p, getMenus as r, SANDBOX_HOOK_RESULT_VERSION as s, getMenu as t, createSandboxRouteError as u, PluginManager as v, toRouteCallerInfo as w, PluginRouteRegistry as x, createPluginManager as y, AuditRepository as z };
|
|
4010
|
+
//# sourceMappingURL=menus-6qSwTNxG.mjs.map
|