emdash 0.35.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/activation-K0kGBWuJ.mjs +382 -0
- package/dist/activation-K0kGBWuJ.mjs.map +1 -0
- package/dist/{adapters-Bb1vG41D.d.mts → adapters-BDQwg236.d.mts} +6 -4
- package/dist/{adapters-Bb1vG41D.d.mts.map → adapters-BDQwg236.d.mts.map} +1 -1
- package/dist/{allowed-origins-DW7sYyqg.mjs → allowed-origins-BGglilcs.mjs} +2 -2
- package/dist/{allowed-origins-DW7sYyqg.mjs.map → allowed-origins-BGglilcs.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.mjs +23 -21
- package/dist/api/route-utils.mjs.map +1 -1
- 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-KO24G1Fd.mjs → api-tokens-BSsQACNe.mjs} +2 -2
- package/dist/{api-tokens-KO24G1Fd.mjs.map → api-tokens-BSsQACNe.mjs.map} +1 -1
- package/dist/{apply-kUDt80-G.mjs → apply-B4SIOxR1.mjs} +34 -35
- package/dist/{apply-kUDt80-G.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 +128 -44
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +10 -10
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +10 -7
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/media-usage-write-fence.mjs +2 -2
- package/dist/astro/middleware/redirect.mjs +4 -4
- package/dist/astro/middleware/request-context.mjs +3 -3
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +11 -12
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +237 -1412
- 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 +4 -4
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +9 -9
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +9 -9
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +9 -9
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +16 -16
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +16 -16
- package/dist/astro/routes/api/admin/bylines/index.mjs +16 -16
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +13 -13
- 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 +4 -4
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +3 -3
- package/dist/astro/routes/api/admin/media-usage/activation.d.mts +9 -0
- package/dist/astro/routes/api/admin/media-usage/activation.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/activation.mjs +46 -0
- package/dist/astro/routes/api/admin/media-usage/activation.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +14 -13
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +14 -13
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/progress.d.mts +9 -0
- package/dist/astro/routes/api/admin/media-usage/progress.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/progress.mjs +44 -0
- package/dist/astro/routes/api/admin/media-usage/progress.mjs.map +1 -0
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +16 -11
- package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs +14 -13
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +14 -13
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs.map +1 -1
- 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 +55 -49
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +55 -49
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +53 -47
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +53 -47
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +54 -48
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +54 -48
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +53 -47
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +53 -47
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +54 -48
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +53 -47
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +54 -48
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
- 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 +60 -50
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +179 -139
- 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 +61 -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 +53 -47
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +53 -47
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +53 -47
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +7 -7
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +3 -3
- 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 +11 -11
- package/dist/astro/routes/api/auth/invite/index.mjs +8 -8
- package/dist/astro/routes/api/auth/invite/register-options.mjs +10 -10
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +10 -10
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.d.mts.map +1 -1
- package/dist/astro/routes/api/auth/me.mjs +19 -9
- package/dist/astro/routes/api/auth/me.mjs.map +1 -1
- package/dist/astro/routes/api/auth/mode.mjs +2 -2
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +4 -4
- 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 +12 -12
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +11 -11
- package/dist/astro/routes/api/auth/passkey/verify.mjs +11 -11
- package/dist/astro/routes/api/auth/signup/complete.mjs +11 -11
- package/dist/astro/routes/api/auth/signup/request.mjs +10 -10
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +14 -14
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +13 -13
- 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 +11 -11
- 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 +17 -15
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +17 -15
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
- 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 +14 -14
- 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 +8 -8
- 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 +17 -17
- 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 +13 -13
- package/dist/astro/routes/api/import/wordpress/media.d.mts +10 -10
- package/dist/astro/routes/api/import/wordpress/media.mjs +11 -11
- 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 +12 -10
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +17 -17
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +27 -27
- package/dist/astro/routes/api/manifest.mjs +4 -4
- 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 +11 -11
- 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 +6 -6
- package/dist/astro/routes/api/media/_id_/usage.mjs +18 -13
- package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +21 -13
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
- 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_.d.mts +10 -0
- package/dist/astro/routes/api/media/folders/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/media/folders/_id_.mjs +52 -0
- package/dist/astro/routes/api/media/folders/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/media/folders/index.d.mts +9 -0
- package/dist/astro/routes/api/media/folders/index.d.mts.map +1 -0
- package/dist/astro/routes/api/media/folders/index.mjs +41 -0
- package/dist/astro/routes/api/media/folders/index.mjs.map +1 -0
- 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 +16 -14
- 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 +59 -27
- 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 +253 -40
- 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 +10 -10
- package/dist/astro/routes/api/redirects/404s/summary.mjs +10 -10
- package/dist/astro/routes/api/redirects/_id_.mjs +11 -11
- package/dist/astro/routes/api/redirects/index.mjs +11 -11
- package/dist/astro/routes/api/relations/_id_/index.mjs +17 -15
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/translations.mjs +12 -10
- package/dist/astro/routes/api/relations/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/relations/index.mjs +17 -15
- package/dist/astro/routes/api/relations/index.mjs.map +1 -1
- 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 +53 -47
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +53 -47
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +53 -47
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +53 -47
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +53 -47
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.mjs +53 -47
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +10 -8
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +53 -47
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +53 -47
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- 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 +6 -6
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +5 -5
- package/dist/astro/routes/api/settings/backups/export.mjs +6 -6
- package/dist/astro/routes/api/settings/backups/index.mjs +7 -7
- package/dist/astro/routes/api/settings/email.mjs +5 -5
- 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 +20 -16
- package/dist/astro/routes/api/settings.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.mjs +12 -12
- package/dist/astro/routes/api/setup/admin.mjs +11 -11
- package/dist/astro/routes/api/setup/dev-bypass.d.mts.map +1 -1
- package/dist/astro/routes/api/setup/dev-bypass.mjs +35 -28
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
- package/dist/astro/routes/api/setup/index.mjs +32 -30
- package/dist/astro/routes/api/setup/index.mjs.map +1 -1
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +7 -7
- package/dist/astro/routes/api/taxonomies/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +20 -16
- 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 +21 -17
- 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 +25 -18
- 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 +20 -16
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +14 -14
- package/dist/astro/routes/api/taxonomies/_name_.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_.mjs +26 -19
- 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 +20 -16
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +5 -5
- package/dist/astro/routes/api/typegen.mjs +4 -4
- package/dist/astro/routes/api/well-known/auth.mjs +2 -2
- 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 +17 -13
- 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 +15 -12
- 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 +8 -6
- 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 +15 -12
- 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 +7 -7
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +10 -10
- package/dist/astro/routes/sitemap.xml.mjs +8 -8
- package/dist/astro/types.d.mts +37 -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-DUElxgOQ.mjs → authorize-Bkf_UHhD.mjs} +2 -2
- package/dist/{authorize-DUElxgOQ.mjs.map → authorize-Bkf_UHhD.mjs.map} +1 -1
- package/dist/{backup-DWYpJlLj.mjs → backup-rwVAl9NI.mjs} +5 -5
- package/dist/{backup-DWYpJlLj.mjs.map → backup-rwVAl9NI.mjs.map} +1 -1
- package/dist/{bundle-vn56sLos.mjs → bundle-C8S2Zl6U.mjs} +4 -4
- package/dist/{bundle-vn56sLos.mjs.map → bundle-C8S2Zl6U.mjs.map} +1 -1
- package/dist/{byline-yjvWq4ip.mjs → byline-DuhF7NWl.mjs} +27 -14
- package/dist/byline-DuhF7NWl.mjs.map +1 -0
- package/dist/{byline-fields-txaLGoME.mjs → byline-fields-BovY4KYM.mjs} +2 -2
- package/dist/{byline-fields-txaLGoME.mjs.map → byline-fields-BovY4KYM.mjs.map} +1 -1
- package/dist/{byline-registry-DDun8sxh.mjs → byline-registry-Bpu9-MVs.mjs} +2 -2
- package/dist/{byline-registry-DDun8sxh.mjs.map → byline-registry-Bpu9-MVs.mjs.map} +1 -1
- package/dist/{bylines-DjXS5p0P.mjs → bylines-CJ5nd6Lw.mjs} +7 -7
- package/dist/{bylines-DjXS5p0P.mjs.map → bylines-CJ5nd6Lw.mjs.map} +1 -1
- package/dist/{bylines-Bu7pchQ4.mjs → bylines-RwBAeOF1.mjs} +3 -3
- package/dist/{bylines-Bu7pchQ4.mjs.map → bylines-RwBAeOF1.mjs.map} +1 -1
- package/dist/{cache-C46-3Irl.mjs → cache-BF5Kvn59.mjs} +4 -4
- package/dist/{cache-C46-3Irl.mjs.map → cache-BF5Kvn59.mjs.map} +1 -1
- package/dist/capture-triggers-CNW1q3HK.mjs +362 -0
- package/dist/capture-triggers-CNW1q3HK.mjs.map +1 -0
- package/dist/{challenge-store-SIL5DsF2.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-fiZ8G9RJ.mjs → chunks-C4szrD8o.mjs} +2 -2
- package/dist/{chunks-fiZ8G9RJ.mjs.map → chunks-C4szrD8o.mjs.map} +1 -1
- package/dist/cli/index.mjs +37 -53
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +74 -4
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +54 -2
- package/dist/client/index.mjs.map +1 -1
- package/dist/{collection-deletion-DQPvMD8R.mjs → collection-deletion-Bj07NHbj.mjs} +13 -356
- package/dist/collection-deletion-Bj07NHbj.mjs.map +1 -0
- package/dist/{comment-reaction-D-2J84UE.mjs → comment-reaction-BhrvSHml.mjs} +2 -2
- package/dist/{comment-reaction-D-2J84UE.mjs.map → comment-reaction-BhrvSHml.mjs.map} +1 -1
- package/dist/{comment-Dxlep6cE.mjs → comment-vxOzWbZN.mjs} +2 -2
- package/dist/{comment-Dxlep6cE.mjs.map → comment-vxOzWbZN.mjs.map} +1 -1
- package/dist/{comments-CTfZtLmM.mjs → comments-Ct4ensnf.mjs} +2 -2
- package/dist/{comments-CTfZtLmM.mjs.map → comments-Ct4ensnf.mjs.map} +1 -1
- package/dist/{components-CQy3lh9x.mjs → components-DJbo1z0S.mjs} +1 -1
- package/dist/{components-CQy3lh9x.mjs.map → components-DJbo1z0S.mjs.map} +1 -1
- package/dist/{config-COQzTe5Q.d.mts → config-B9eZ340f.d.mts} +1 -1
- package/dist/{config-COQzTe5Q.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-ZHCc1ngN.mjs → content-DjvM0T92.mjs} +86 -45
- package/dist/content-DjvM0T92.mjs.map +1 -0
- package/dist/{content-list-query-wJ2WN8Vp.d.mts → content-list-query-Btqd4uV2.d.mts} +1 -1
- package/dist/{content-list-query-wJ2WN8Vp.d.mts.map → content-list-query-Btqd4uV2.d.mts.map} +1 -1
- package/dist/{content-refresh-B_8SJzuU.mjs → content-refresh-Bwp-8yGy.mjs} +1139 -111
- package/dist/content-refresh-Bwp-8yGy.mjs.map +1 -0
- package/dist/{media-usage-BZCydfvu.mjs → content-repair-Czdp7jz5.mjs} +5 -196
- package/dist/content-repair-Czdp7jz5.mjs.map +1 -0
- package/dist/{context-ZldbZcle.mjs → context-CX6gxOLW.mjs} +55 -20
- package/dist/context-CX6gxOLW.mjs.map +1 -0
- package/dist/{cron-Y9aLtgrA.mjs → cron-C6o7VppJ.mjs} +1 -1
- package/dist/{cron-Y9aLtgrA.mjs.map → cron-C6o7VppJ.mjs.map} +1 -1
- package/dist/{dashboard-DvHbk_cv.mjs → dashboard-C2kTeeRI.mjs} +5 -5
- package/dist/{dashboard-DvHbk_cv.mjs.map → dashboard-C2kTeeRI.mjs.map} +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +3 -3
- 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 +3 -3
- package/dist/db/sqlite.mjs.map +1 -1
- package/dist/{default-DdDl3fxv.mjs → default-Clra32mw.mjs} +1 -1
- package/dist/{default-DdDl3fxv.mjs.map → default-Clra32mw.mjs.map} +1 -1
- package/dist/{deferred-tasks-SDWxrgzJ.d.mts → deferred-tasks-CvDETTJO.d.mts} +1 -1
- package/dist/{deferred-tasks-SDWxrgzJ.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-C0GdD_z8.mjs → device-flow-D2oCWvLJ.mjs} +5 -5
- package/dist/{device-flow-C0GdD_z8.mjs.map → device-flow-D2oCWvLJ.mjs.map} +1 -1
- package/dist/{direct-executor-CDXeJCSs.mjs → direct-executor-Bfa5_ToE.mjs} +3 -3
- package/dist/{direct-executor-CDXeJCSs.mjs.map → direct-executor-Bfa5_ToE.mjs.map} +1 -1
- package/dist/{dist-D_6CKR8z.mjs → dist-89xCrGqi.mjs} +1 -1
- package/dist/{dist-D_6CKR8z.mjs.map → dist-89xCrGqi.mjs.map} +1 -1
- package/dist/{email-console-BHNjIwiB.mjs → email-console-Dzb6uGYa.mjs} +1 -1
- package/dist/{email-console-BHNjIwiB.mjs.map → email-console-Dzb6uGYa.mjs.map} +1 -1
- package/dist/{enrich-_ySMEvEE.mjs → enrich-BX0IDp4z.mjs} +3 -3
- package/dist/{enrich-_ySMEvEE.mjs.map → enrich-BX0IDp4z.mjs.map} +1 -1
- package/dist/{error-DupyJZE2.mjs → error-DFrQjppn.mjs} +2 -2
- package/dist/{error-DupyJZE2.mjs.map → error-DFrQjppn.mjs.map} +1 -1
- package/dist/{errors-CLUPm7aD.mjs → errors-DsVoDUjJ.mjs} +24 -2
- package/dist/errors-DsVoDUjJ.mjs.map +1 -0
- package/dist/{escape-DUY2r2Zs.mjs → escape-HmHTC1Is.mjs} +1 -1
- package/dist/{escape-DUY2r2Zs.mjs.map → escape-HmHTC1Is.mjs.map} +1 -1
- package/dist/{field-defs-cache-BzwBlJrR.mjs → field-defs-cache-BM4SIRqH.mjs} +5 -5
- package/dist/{field-defs-cache-BzwBlJrR.mjs.map → field-defs-cache-BM4SIRqH.mjs.map} +1 -1
- package/dist/focal-point-BeWFo6Xx.mjs +23 -0
- package/dist/focal-point-BeWFo6Xx.mjs.map +1 -0
- package/dist/{fts-manager-DyZEohZC.mjs → fts-manager-Do1BlW2r.mjs} +3 -3
- package/dist/{fts-manager-DyZEohZC.mjs.map → fts-manager-Do1BlW2r.mjs.map} +1 -1
- package/dist/{hash-Cg0TXJPV.mjs → hash-3JJPlHF2.mjs} +1 -1
- package/dist/{hash-Cg0TXJPV.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-DwT2E0Sa.d.mts → hreflang-B6hbAuuO.d.mts} +2 -2
- package/dist/{hreflang-DwT2E0Sa.d.mts.map → hreflang-B6hbAuuO.d.mts.map} +1 -1
- package/dist/{hreflang-BBe83kKa.mjs → hreflang-DQbPZliA.mjs} +7 -7
- package/dist/{hreflang-BBe83kKa.mjs.map → hreflang-DQbPZliA.mjs.map} +1 -1
- package/dist/{identity-Ys6Dlc9C.mjs → identity-DksvEazf.mjs} +3 -3
- package/dist/{identity-Ys6Dlc9C.mjs.map → identity-DksvEazf.mjs.map} +1 -1
- package/dist/{import-DPkLmeXO.mjs → import-CJpaBBBT.mjs} +6 -6
- package/dist/{import-DPkLmeXO.mjs.map → import-CJpaBBBT.mjs.map} +1 -1
- package/dist/{index-BVBZj4-7.d.mts → index-BJNMCWmu.d.mts} +267 -82
- package/dist/index-BJNMCWmu.d.mts.map +1 -0
- package/dist/{index-C9KuQyO-.d.mts → index-Du8K7bWa.d.mts} +3 -3
- package/dist/{index-C9KuQyO-.d.mts.map → index-Du8K7bWa.d.mts.map} +1 -1
- package/dist/index.d.mts +22 -21
- package/dist/index.mjs +79 -73
- package/dist/{init-lock-6b309ZrF.mjs → init-lock-DJkX6Hto.mjs} +1 -1
- package/dist/{init-lock-6b309ZrF.mjs.map → init-lock-DJkX6Hto.mjs.map} +1 -1
- package/dist/{load-YJ2xl3ra.mjs → load-CawHjTOH.mjs} +2 -2
- package/dist/{load-YJ2xl3ra.mjs.map → load-CawHjTOH.mjs.map} +1 -1
- package/dist/{loader-CdG_Ci3H.mjs → loader-Z8vl7zTq.mjs} +48 -13
- package/dist/loader-Z8vl7zTq.mjs.map +1 -0
- package/dist/{manifest-builder-B252yQUf.mjs → manifest-builder-COtzuca2.mjs} +2 -2
- package/dist/{manifest-builder-B252yQUf.mjs.map → manifest-builder-COtzuca2.mjs.map} +1 -1
- package/dist/{manifest-schema-BXbUAHod.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 +13 -3
- package/dist/media/index.mjs.map +1 -1
- package/dist/media/local-runtime.d.mts +14 -12
- package/dist/media/local-runtime.d.mts.map +1 -1
- package/dist/media/local-runtime.mjs +12 -6
- package/dist/media/local-runtime.mjs.map +1 -1
- package/dist/{media-CzhAn2--.mjs → media-BBm8Wg3f.mjs} +69 -12
- package/dist/media-BBm8Wg3f.mjs.map +1 -0
- package/dist/{media-BWWWb8kg.mjs → media-BHjus86Y.mjs} +133 -9
- package/dist/media-BHjus86Y.mjs.map +1 -0
- package/dist/{media-allowlist-D6x-Us02.mjs → media-allowlist-CoTBWoDp.mjs} +3 -2
- package/dist/media-allowlist-CoTBWoDp.mjs.map +1 -0
- package/dist/media-folders-BGkATs8n.mjs +210 -0
- package/dist/media-folders-BGkATs8n.mjs.map +1 -0
- package/dist/{media-upload-CHBVn6m-.mjs → media-upload-BCidR-EY.mjs} +9 -9
- package/dist/{media-upload-CHBVn6m-.mjs.map → media-upload-BCidR-EY.mjs.map} +1 -1
- package/dist/{media-url-BvoX88FA.mjs → media-url-DHoPr0hq.mjs} +1 -1
- package/dist/{media-url-BvoX88FA.mjs.map → media-url-DHoPr0hq.mjs.map} +1 -1
- package/dist/media-usage-CdY5jhSR.mjs +1833 -0
- package/dist/media-usage-CdY5jhSR.mjs.map +1 -0
- package/dist/media-usage-activation-BgeMtK5C.mjs +78 -0
- package/dist/media-usage-activation-BgeMtK5C.mjs.map +1 -0
- package/dist/{media-usage-work-CLo_6tct.mjs → media-usage-work-CnGCdHxx.mjs} +4 -4
- package/dist/{media-usage-work-CLo_6tct.mjs.map → media-usage-work-CnGCdHxx.mjs.map} +1 -1
- package/dist/{media-usage-work-DrCbqBcl.mjs → media-usage-work-D6D9sMCA.mjs} +221 -59
- package/dist/media-usage-work-D6D9sMCA.mjs.map +1 -0
- package/dist/{media-usage-write-fence-aHEgN1zB.mjs → media-usage-write-fence-hjeD4u7s.mjs} +2 -2
- package/dist/{media-usage-write-fence-aHEgN1zB.mjs.map → media-usage-write-fence-hjeD4u7s.mjs.map} +1 -1
- package/dist/{menus-DSo5QeW0.mjs → menus-6qSwTNxG.mjs} +375 -107
- package/dist/menus-6qSwTNxG.mjs.map +1 -0
- package/dist/{menus-TCNSd2vp.mjs → menus-uvPLXMZf.mjs} +4 -4
- package/dist/{menus-TCNSd2vp.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/{mime-DfIVjNkr.mjs → mime-CUIG6x84.mjs} +1 -1
- package/dist/mime-CUIG6x84.mjs.map +1 -0
- package/dist/{mode-BDoH_WcF.mjs → mode-DN_WneRx.mjs} +1 -1
- package/dist/{mode-BDoH_WcF.mjs.map → mode-DN_WneRx.mjs.map} +1 -1
- package/dist/node-sqlite-compat-BuJXIeMz.mjs +46 -0
- package/dist/node-sqlite-compat-BuJXIeMz.mjs.map +1 -0
- package/dist/{normalize-Bc-s_r-a.mjs → normalize-C2xNjTSG.mjs} +36 -5
- package/dist/normalize-C2xNjTSG.mjs.map +1 -0
- package/dist/{oauth-authorization-iOikmrJd.mjs → oauth-authorization-Dj6Kwc21.mjs} +5 -5
- package/dist/{oauth-authorization-iOikmrJd.mjs.map → oauth-authorization-Dj6Kwc21.mjs.map} +1 -1
- package/dist/{oauth-clients-CvI0nHMJ.mjs → oauth-clients-FD7I0J8m.mjs} +1 -1
- package/dist/{oauth-clients-CvI0nHMJ.mjs.map → oauth-clients-FD7I0J8m.mjs.map} +1 -1
- package/dist/{oauth-state-store-Ba8KZlwW.mjs → oauth-state-store-DkmDOmHs.mjs} +1 -1
- package/dist/{oauth-state-store-Ba8KZlwW.mjs.map → oauth-state-store-DkmDOmHs.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-C5SQwGYC.mjs → oauth-user-lookup-CvIwGpYd.mjs} +1 -1
- package/dist/{oauth-user-lookup-C5SQwGYC.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-CBXIHUoT.mjs → options-BHPeIbBd.mjs} +1 -1
- package/dist/{options-CBXIHUoT.mjs.map → options-BHPeIbBd.mjs.map} +1 -1
- package/dist/{options--hhz-jZ1.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-DFbuc-Fh.mjs → parse-Ckpg-Qfp.mjs} +2 -2
- package/dist/{parse-DFbuc-Fh.mjs.map → parse-Ckpg-Qfp.mjs.map} +1 -1
- package/dist/{passkey-config-DFAmUyuE.mjs → passkey-config-O_lj3y0k.mjs} +1 -1
- package/dist/{passkey-config-DFAmUyuE.mjs.map → passkey-config-O_lj3y0k.mjs.map} +1 -1
- package/dist/{patterns-CiyXeDgr.mjs → patterns-D9iDO3j8.mjs} +1 -1
- package/dist/{patterns-CiyXeDgr.mjs.map → patterns-D9iDO3j8.mjs.map} +1 -1
- package/dist/{placeholder-Dp0K3RkD.d.mts → placeholder-4X9BrRrp.d.mts} +7 -1
- package/dist/placeholder-4X9BrRrp.d.mts.map +1 -0
- 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-TluUIxuu.mjs → policy-Dhtwntrt.mjs} +2 -2
- package/dist/{policy-TluUIxuu.mjs.map → policy-Dhtwntrt.mjs.map} +1 -1
- package/dist/{portable-text-imBW5cHK.mjs → portable-text-U85hOafW.mjs} +1 -1
- package/dist/{portable-text-imBW5cHK.mjs.map → portable-text-U85hOafW.mjs.map} +1 -1
- package/dist/{preview-PW-nOnq4.mjs → preview-B_vJLvf8.mjs} +2 -2
- package/dist/{preview-PW-nOnq4.mjs.map → preview-B_vJLvf8.mjs.map} +1 -1
- package/dist/{protocol-DjsJHTlK.d.mts → protocol-JdD2YhY9.d.mts} +2 -2
- package/dist/{protocol-DjsJHTlK.d.mts.map → protocol-JdD2YhY9.d.mts.map} +1 -1
- package/dist/{public-url-CWoFhQT8.mjs → public-url-CarhZJgf.mjs} +1 -1
- package/dist/{public-url-CWoFhQT8.mjs.map → public-url-CarhZJgf.mjs.map} +1 -1
- package/dist/{query-zTVAR1Sl.mjs → query-BZKZcG5b.mjs} +15 -15
- package/dist/{query-zTVAR1Sl.mjs.map → query-BZKZcG5b.mjs.map} +1 -1
- package/dist/{query-BWs7O5Il.mjs → query-BndaFxxp.mjs} +5 -5
- package/dist/{query-BWs7O5Il.mjs.map → query-BndaFxxp.mjs.map} +1 -1
- package/dist/{rate-limit-Bx4g9m3p.mjs → rate-limit-BZmATC6W.mjs} +2 -2
- package/dist/{rate-limit-Bx4g9m3p.mjs.map → rate-limit-BZmATC6W.mjs.map} +1 -1
- package/dist/{redirect-COsS6SWJ.mjs → redirect-CZkbozu9.mjs} +2 -2
- package/dist/{redirect-COsS6SWJ.mjs.map → redirect-CZkbozu9.mjs.map} +1 -1
- package/dist/{redirect-BgAOGHDq.mjs → redirect-CzqnLxK-.mjs} +1 -1
- package/dist/{redirect-BgAOGHDq.mjs.map → redirect-CzqnLxK-.mjs.map} +1 -1
- package/dist/{redirects-DTDHWH31.mjs → redirects-BLNOWQTn.mjs} +64 -29
- package/dist/redirects-BLNOWQTn.mjs.map +1 -0
- package/dist/{redirects-DyChwDkG.mjs → redirects-CqzNM0KM.mjs} +5 -5
- package/dist/{redirects-DyChwDkG.mjs.map → redirects-CqzNM0KM.mjs.map} +1 -1
- package/dist/{registry-Cqa2I749.mjs → registry-AZAsRsor.mjs} +30 -126
- package/dist/registry-AZAsRsor.mjs.map +1 -0
- package/dist/{relation-BnHB0T4J.mjs → relation-04DfKRTO.mjs} +2 -2
- package/dist/{relation-BnHB0T4J.mjs.map → relation-04DfKRTO.mjs.map} +1 -1
- package/dist/{relations-BBApI4e2.mjs → relations-C4htk5sb.mjs} +7 -7
- package/dist/relations-C4htk5sb.mjs.map +1 -0
- package/dist/{relations-D5sM5fW0.mjs → relations-CcFwDJdJ.mjs} +4 -4
- package/dist/{relations-D5sM5fW0.mjs.map → relations-CcFwDJdJ.mjs.map} +1 -1
- package/dist/{relations-BHo5A8Zf.d.mts → relations-DnRK4YIT.d.mts} +347 -54
- package/dist/relations-DnRK4YIT.d.mts.map +1 -0
- package/dist/{request-cache-BSUptuJR.mjs → request-cache-DH9zdCOD.mjs} +1 -1
- package/dist/{request-cache-BSUptuJR.mjs.map → request-cache-DH9zdCOD.mjs.map} +1 -1
- package/dist/request-context.d.mts +1 -1
- package/dist/{request-meta-DgZJh3zG.mjs → request-meta-DYxLlnmz.mjs} +2 -2
- package/dist/{request-meta-DgZJh3zG.mjs.map → request-meta-DYxLlnmz.mjs.map} +1 -1
- package/dist/{resolve-DOhVEvty.mjs → resolve-prZ3mP7l.mjs} +1 -1
- package/dist/{resolve-DOhVEvty.mjs.map → resolve-prZ3mP7l.mjs.map} +1 -1
- package/dist/{runner-C1T11CfC.mjs → runner-BLIDKpmA.mjs} +471 -290
- package/dist/runner-BLIDKpmA.mjs.map +1 -0
- package/dist/{runner-BYHZn3Jy.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-DZ5YVVZj.mjs → schema-CGnBeLiW.mjs} +3 -3
- package/dist/{schema-DZ5YVVZj.mjs.map → schema-CGnBeLiW.mjs.map} +1 -1
- package/dist/{schema-2AOsSn2v.mjs → schema-DYr-Vd-L.mjs} +36 -6
- package/dist/{schema-2AOsSn2v.mjs.map → schema-DYr-Vd-L.mjs.map} +1 -1
- package/dist/{scopes-8ClPF2bC.mjs → scopes-BhWvBavj.mjs} +3 -3
- package/dist/{scopes-8ClPF2bC.mjs.map → scopes-BhWvBavj.mjs.map} +1 -1
- package/dist/{search-u1QYdOCG.mjs → search-C-qDk4kx.mjs} +4 -4
- package/dist/{search-u1QYdOCG.mjs.map → search-C-qDk4kx.mjs.map} +1 -1
- package/dist/{secrets-BEgsAQEU.mjs → secrets-rEtHt-6z.mjs} +3 -3
- package/dist/{secrets-BEgsAQEU.mjs.map → secrets-rEtHt-6z.mjs.map} +1 -1
- package/dist/{sections-DmHviGyM.mjs → sections-B_nYvlwn.mjs} +2 -2
- package/dist/{sections-DmHviGyM.mjs.map → sections-B_nYvlwn.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +25 -23
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +17 -15
- package/dist/seo/index.mjs.map +1 -1
- package/dist/{seo-Dq4G-RrO.mjs → seo-926NRIgt.mjs} +3 -3
- package/dist/{seo-Dq4G-RrO.mjs.map → seo-926NRIgt.mjs.map} +1 -1
- package/dist/{seo-AFpVvTqr.mjs → seo-CVWkdv6x.mjs} +1 -1
- package/dist/{seo-AFpVvTqr.mjs.map → seo-CVWkdv6x.mjs.map} +1 -1
- package/dist/{service-BpArayPr.mjs → service-CJl3ZAYs.mjs} +3 -3
- package/dist/{service-BpArayPr.mjs.map → service-CJl3ZAYs.mjs.map} +1 -1
- package/dist/{session-user-BEorKVT-.mjs → session-user-BlMgqCHS.mjs} +1 -1
- package/dist/{session-user-BEorKVT-.mjs.map → session-user-BlMgqCHS.mjs.map} +1 -1
- package/dist/{settings-xRdoUZr0.mjs → settings--wobrkkC.mjs} +21 -8
- package/dist/settings--wobrkkC.mjs.map +1 -0
- package/dist/{settings-DE9xtzqd.mjs → settings-Cwm6o2jY.mjs} +3 -3
- package/dist/{settings-DE9xtzqd.mjs.map → settings-Cwm6o2jY.mjs.map} +1 -1
- package/dist/{setup-complete-BnT8pq_C.mjs → setup-complete-DQbClIN2.mjs} +2 -2
- package/dist/{setup-complete-BnT8pq_C.mjs.map → setup-complete-DQbClIN2.mjs.map} +1 -1
- package/dist/{setup-nonce-CBitf_oQ.mjs → setup-nonce-DZCFS2sn.mjs} +1 -1
- package/dist/{setup-nonce-CBitf_oQ.mjs.map → setup-nonce-DZCFS2sn.mjs.map} +1 -1
- package/dist/{single-flight-cache-B0eLKS6K.mjs → single-flight-cache-BPuGPdcN.mjs} +2 -2
- package/dist/{single-flight-cache-B0eLKS6K.mjs.map → single-flight-cache-BPuGPdcN.mjs.map} +1 -1
- package/dist/{site-url-DjpIXMXJ.mjs → site-url-BrxA_E9H.mjs} +3 -3
- package/dist/{site-url-DjpIXMXJ.mjs.map → site-url-BrxA_E9H.mjs.map} +1 -1
- package/dist/{snapshot-BBlGkb2q.mjs → snapshot--OCDTqdb.mjs} +1 -1
- package/dist/{snapshot-BBlGkb2q.mjs.map → snapshot--OCDTqdb.mjs.map} +1 -1
- package/dist/{ssrf-Cpvg_n3A.mjs → ssrf-5sIM5jzl.mjs} +23 -6
- package/dist/{ssrf-Cpvg_n3A.mjs.map → ssrf-5sIM5jzl.mjs.map} +1 -1
- package/dist/{state-DYwPue40.mjs → state-BpFVsJZB.mjs} +12 -4
- package/dist/state-BpFVsJZB.mjs.map +1 -0
- package/dist/{status-CWVYpbD8.mjs → status-B777-dXz.mjs} +1 -1
- package/dist/{status-CWVYpbD8.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-DixqqV5i.mjs → target-BmR0iTwz.mjs} +1 -1
- package/dist/{target-DixqqV5i.mjs.map → target-BmR0iTwz.mjs.map} +1 -1
- package/dist/{taxonomies-OHUIiIpI.mjs → taxonomies-DkAkMupr.mjs} +17 -14
- package/dist/taxonomies-DkAkMupr.mjs.map +1 -0
- package/dist/{taxonomies-BlrncHi9.mjs → taxonomies-Wfy_Lg12.mjs} +43 -17
- package/dist/taxonomies-Wfy_Lg12.mjs.map +1 -0
- package/dist/{taxonomy-BqCZ1TdU.mjs → taxonomy-tJepplLL.mjs} +5 -5
- package/dist/{taxonomy-BqCZ1TdU.mjs.map → taxonomy-tJepplLL.mjs.map} +1 -1
- package/dist/{tokens-C39klX8R.mjs → tokens-BCO1oruF.mjs} +1 -1
- package/dist/{tokens-C39klX8R.mjs.map → tokens-BCO1oruF.mjs.map} +1 -1
- package/dist/{transaction-NQj4VJ7Z.mjs → transaction-0KOpOyMu.mjs} +2 -1
- package/dist/{transaction-NQj4VJ7Z.mjs.map → transaction-0KOpOyMu.mjs.map} +1 -1
- package/dist/{transport-DBJwa-Si.mjs → transport-Dr3qtwXC.mjs} +4 -3
- package/dist/{transport-DBJwa-Si.mjs.map → transport-Dr3qtwXC.mjs.map} +1 -1
- package/dist/{transport-RQE36APG.d.mts → transport-xh6YKW2G.d.mts} +1 -1
- package/dist/{transport-RQE36APG.d.mts.map → transport-xh6YKW2G.d.mts.map} +1 -1
- package/dist/{trusted-proxy-CEVekpby.mjs → trusted-proxy-BR5F1Otp.mjs} +1 -1
- package/dist/{trusted-proxy-CEVekpby.mjs.map → trusted-proxy-BR5F1Otp.mjs.map} +1 -1
- package/dist/{types-BW1syrlw.mjs → types-3qNFPlci.mjs} +1 -1
- package/dist/{types-BW1syrlw.mjs.map → types-3qNFPlci.mjs.map} +1 -1
- package/dist/types-75KIqzL9.mjs.map +1 -1
- package/dist/{types-DrJrVCT1.d.mts → types-B6GrPic4.d.mts} +9 -3
- package/dist/{types-DrJrVCT1.d.mts.map → types-B6GrPic4.d.mts.map} +1 -1
- package/dist/{types-DN64_zzZ.d.mts → types-BuHW4xDE.d.mts} +11 -10
- package/dist/types-BuHW4xDE.d.mts.map +1 -0
- package/dist/{types-DWRhk9xZ.d.mts → types-C00oyCZp.d.mts} +1 -1
- package/dist/{types-DWRhk9xZ.d.mts.map → types-C00oyCZp.d.mts.map} +1 -1
- package/dist/{types-BntycPTF.d.mts → types-CDtkNSFQ.d.mts} +1 -1
- package/dist/{types-BntycPTF.d.mts.map → types-CDtkNSFQ.d.mts.map} +1 -1
- package/dist/{types-Dfk8KI5R.d.mts → types-CPeXo1wF.d.mts} +1 -1
- package/dist/{types-Dfk8KI5R.d.mts.map → types-CPeXo1wF.d.mts.map} +1 -1
- package/dist/types-CQPWhPxE.mjs.map +1 -1
- package/dist/{types-BcqdcT-r.d.mts → types-CXFkwEGC.d.mts} +3 -2
- package/dist/types-CXFkwEGC.d.mts.map +1 -0
- package/dist/{types-CtzytVXn.mjs → types-DM3vioBY.mjs} +1 -1
- package/dist/{types-CtzytVXn.mjs.map → types-DM3vioBY.mjs.map} +1 -1
- package/dist/{types-CXnOzDe1.d.mts → types-DczELMop.d.mts} +1 -1
- package/dist/{types-CXnOzDe1.d.mts.map → types-DczELMop.d.mts.map} +1 -1
- package/dist/types-DfuTR6dL.mjs +3 -0
- package/dist/{types-DQIDRKF2.d.mts → types-FV23hEoW.d.mts} +10 -1
- package/dist/types-FV23hEoW.d.mts.map +1 -0
- package/dist/{types-C2pMvO62.d.mts → types-xDMtUFnO.d.mts} +2 -1
- package/dist/types-xDMtUFnO.d.mts.map +1 -0
- package/dist/{upload-attempts-D4FS8LT6.mjs → upload-attempts-BsqoQ1fn.mjs} +1 -1
- package/dist/{upload-attempts-D4FS8LT6.mjs.map → upload-attempts-BsqoQ1fn.mjs.map} +1 -1
- package/dist/{url-pattern-BHS0V5Ng.mjs → url-pattern-D4c2czpJ.mjs} +1 -1
- package/dist/{url-pattern-BHS0V5Ng.mjs.map → url-pattern-D4c2czpJ.mjs.map} +1 -1
- package/dist/{user-DJZfUJVE.mjs → user-BTZ40aq6.mjs} +2 -2
- package/dist/{user-DJZfUJVE.mjs.map → user-BTZ40aq6.mjs.map} +1 -1
- package/dist/{utils-D4vD_Y98.mjs → utils-BKvNjjhY.mjs} +1 -1
- package/dist/{utils-D4vD_Y98.mjs.map → utils-BKvNjjhY.mjs.map} +1 -1
- package/dist/{validate-BMLBvxOC.mjs → validate-DE_LRwo9.mjs} +2 -2
- package/dist/{validate-BMLBvxOC.mjs.map → validate-DE_LRwo9.mjs.map} +1 -1
- package/dist/{validate-CTqt5nuE.d.mts → validate-DUP27OYD.d.mts} +5 -5
- package/dist/{validate-CTqt5nuE.d.mts.map → validate-DUP27OYD.d.mts.map} +1 -1
- package/dist/{validation-npvENUCB.mjs → validation-BMImFJ11.mjs} +10 -8
- package/dist/{validation-npvENUCB.mjs.map → validation-BMImFJ11.mjs.map} +1 -1
- package/dist/version-Bii3suaO.mjs +7 -0
- package/dist/{version-DB_fqCSI.mjs.map → version-Bii3suaO.mjs.map} +1 -1
- package/dist/{widgets-BD3ho7Rq.mjs → widgets-D3gJ10xU.mjs} +18 -5
- package/dist/widgets-D3gJ10xU.mjs.map +1 -0
- package/dist/{wxr-taxonomies-Ca68766D.d.mts → wxr-taxonomies-B2Og_6rU.d.mts} +1 -1
- package/dist/{wxr-taxonomies-Ca68766D.d.mts.map → wxr-taxonomies-B2Og_6rU.d.mts.map} +1 -1
- package/dist/{wxr-taxonomies-B1R3vBoD.mjs → wxr-taxonomies-Cxngsjwo.mjs} +4 -4
- package/dist/{wxr-taxonomies-B1R3vBoD.mjs.map → wxr-taxonomies-Cxngsjwo.mjs.map} +1 -1
- package/dist/{zod-generator-LC-on_Vb.mjs → zod-generator-BuYSQJB7.mjs} +32 -22
- package/dist/zod-generator-BuYSQJB7.mjs.map +1 -0
- package/package.json +20 -9
- package/src/api/errors.ts +22 -0
- package/src/api/handlers/content.ts +49 -11
- package/src/api/handlers/index.ts +18 -0
- package/src/api/handlers/manifest.ts +161 -12
- package/src/api/handlers/media-allowlist.ts +1 -0
- package/src/api/handlers/media-folders.ts +130 -0
- package/src/api/handlers/media-usage-activation.ts +102 -0
- package/src/api/handlers/media-usage.ts +108 -0
- package/src/api/handlers/media.ts +92 -2
- package/src/api/handlers/registry.ts +483 -561
- package/src/api/handlers/taxonomies.ts +16 -9
- package/src/api/openapi/document.ts +277 -7
- 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-usage.ts +77 -0
- package/src/api/schemas/media.ts +121 -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 +23 -0
- package/src/astro/integration/vite-config.ts +23 -9
- package/src/astro/middleware/auth.ts +4 -0
- package/src/astro/middleware.ts +5 -7
- package/src/astro/routes/api/admin/api-tokens/index.ts +4 -1
- package/src/astro/routes/api/admin/media-usage/activation.ts +42 -0
- package/src/astro/routes/api/admin/media-usage/progress.ts +37 -0
- 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 +247 -101
- 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/auth/me.ts +14 -2
- 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/[id].ts +3 -0
- package/src/astro/routes/api/media/file/[...key].ts +4 -1
- package/src/astro/routes/api/media/folders/[id].ts +55 -0
- package/src/astro/routes/api/media/folders/index.ts +37 -0
- package/src/astro/routes/api/media/upload-url.ts +8 -4
- package/src/astro/routes/api/media.ts +66 -10
- 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/setup/dev-bypass.ts +12 -0
- 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 +34 -6
- 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/client/index.ts +140 -2
- package/src/client/transport.ts +6 -2
- package/src/components/EmDashImage.astro +156 -51
- package/src/components/EmDashMedia.astro +2 -1
- package/src/components/Gallery.astro +7 -0
- package/src/components/InlinePortableTextEditor.tsx +136 -2
- package/src/components/LiveSearch.astro +23 -0
- package/src/components/inline-code-block.tsx +180 -49
- package/src/components/widgets/Archives.astro +2 -37
- package/src/content/converters/gallery.ts +2 -0
- 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 +3 -0
- package/src/database/connection.ts +2 -31
- package/src/database/index.ts +1 -1
- package/src/database/json-recordset.ts +16 -0
- package/src/database/migrations/017_authorization_codes.ts +14 -4
- package/src/database/migrations/019_i18n.ts +1 -1
- package/src/database/migrations/071_restore_content_bylines_table.ts +43 -0
- package/src/database/migrations/072_media_folders.ts +72 -0
- package/src/database/migrations/073_media_focal_point.ts +57 -0
- package/src/database/migrations/074_content_deleted_scheduled_index.ts +55 -0
- package/src/database/migrations/runner.ts +11 -3
- package/src/database/repositories/byline.ts +32 -16
- package/src/database/repositories/content.ts +119 -51
- package/src/database/repositories/media-folders.ts +115 -0
- package/src/database/repositories/media-usage-work.ts +395 -111
- package/src/database/repositories/media-usage.ts +1104 -47
- package/src/database/repositories/media.ts +156 -29
- package/src/database/repositories/plugin-storage.ts +74 -9
- package/src/database/repositories/types.ts +8 -7
- package/src/database/transaction.ts +1 -0
- package/src/database/types.ts +13 -0
- package/src/db/adapters.ts +10 -3
- package/src/db/node-sqlite-compat.ts +78 -0
- package/src/db/postgres.ts +23 -0
- package/src/db/sqlite.ts +3 -3
- package/src/emdash-runtime.ts +186 -251
- package/src/fields/boolean.ts +1 -1
- package/src/fields/datetime.ts +1 -1
- package/src/fields/file.ts +1 -1
- package/src/fields/image.ts +7 -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 +8 -4
- package/src/index.ts +30 -3
- package/src/loader.ts +63 -10
- package/src/mcp/server.ts +228 -24
- package/src/media/focal-point.ts +37 -0
- package/src/media/image-endpoint.ts +5 -2
- package/src/media/local-runtime.ts +8 -0
- package/src/media/mime.ts +1 -0
- package/src/media/normalize.ts +25 -4
- package/src/media/types.ts +10 -0
- package/src/media/usage/activation.ts +162 -35
- package/src/media/usage/capture-triggers.ts +19 -3
- package/src/media/usage/cleanup.ts +9 -8
- package/src/media/usage/collection-deletion-processor.ts +7 -3
- package/src/media/usage/collection-deletion.ts +10 -0
- package/src/media/usage/content-refresh.ts +258 -39
- package/src/media/usage/content-snapshots.ts +128 -31
- package/src/media/usage/extractor.ts +32 -13
- package/src/media/usage/maintenance-engine.ts +166 -0
- package/src/media/usage/reconciliation-processor.ts +106 -29
- package/src/media/usage/reconciliation.ts +90 -7
- package/src/media/usage/work-processor.ts +342 -101
- 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 +7 -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/save-rejection.ts +20 -0
- package/src/plugins/scheduler/node.ts +1 -13
- package/src/plugins/scheduler/types.ts +0 -2
- package/src/plugins/state.ts +13 -3
- package/src/plugins/types.ts +6 -0
- package/src/registry/artifact-checksum.ts +15 -0
- package/src/registry/artifact-fetch.ts +530 -0
- package/src/registry/artifact-verification.ts +85 -0
- package/src/registry/authoritative-records.ts +180 -0
- package/src/registry/config.ts +24 -6
- package/src/registry/record-labels.ts +28 -0
- package/src/registry/types.ts +12 -15
- package/src/schema/registry.ts +26 -3
- package/src/schema/types.ts +1 -0
- package/src/schema/zod-generator.ts +28 -17
- package/src/security/ssrf.ts +26 -4
- package/src/seed/apply.ts +4 -4
- 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/ui.ts +2 -0
- package/src/widgets/archives.ts +67 -0
- package/src/widgets/index.ts +16 -0
- package/dist/api-BeBglVxU.mjs +0 -4695
- package/dist/api-BeBglVxU.mjs.map +0 -1
- package/dist/byline-yjvWq4ip.mjs.map +0 -1
- package/dist/challenge-store-SIL5DsF2.mjs.map +0 -1
- package/dist/collection-deletion-DQPvMD8R.mjs.map +0 -1
- package/dist/content-ZHCc1ngN.mjs.map +0 -1
- package/dist/content-refresh-B_8SJzuU.mjs.map +0 -1
- package/dist/context-ZldbZcle.mjs.map +0 -1
- package/dist/errors-CLUPm7aD.mjs.map +0 -1
- package/dist/index-BVBZj4-7.d.mts.map +0 -1
- package/dist/loader-CdG_Ci3H.mjs.map +0 -1
- package/dist/manifest-schema-BXbUAHod.mjs.map +0 -1
- package/dist/media-BWWWb8kg.mjs.map +0 -1
- package/dist/media-CzhAn2--.mjs.map +0 -1
- package/dist/media-allowlist-D6x-Us02.mjs.map +0 -1
- package/dist/media-usage-BZCydfvu.mjs.map +0 -1
- package/dist/media-usage-work-DrCbqBcl.mjs.map +0 -1
- package/dist/menus-DSo5QeW0.mjs.map +0 -1
- package/dist/mime-DfIVjNkr.mjs.map +0 -1
- package/dist/normalize-Bc-s_r-a.mjs.map +0 -1
- package/dist/object-cache-71tPfV4A.mjs.map +0 -1
- package/dist/options--hhz-jZ1.d.mts.map +0 -1
- package/dist/placeholder-Dp0K3RkD.d.mts.map +0 -1
- package/dist/redirects-DTDHWH31.mjs.map +0 -1
- package/dist/registry-Cqa2I749.mjs.map +0 -1
- package/dist/relations-BBApI4e2.mjs.map +0 -1
- package/dist/relations-BHo5A8Zf.d.mts.map +0 -1
- package/dist/runner-BYHZn3Jy.d.mts.map +0 -1
- package/dist/runner-C1T11CfC.mjs.map +0 -1
- package/dist/settings-xRdoUZr0.mjs.map +0 -1
- package/dist/state-DYwPue40.mjs.map +0 -1
- package/dist/taxonomies-BlrncHi9.mjs.map +0 -1
- package/dist/taxonomies-OHUIiIpI.mjs.map +0 -1
- package/dist/types-BcqdcT-r.d.mts.map +0 -1
- package/dist/types-C2pMvO62.d.mts.map +0 -1
- package/dist/types-CP1CflWf.mjs +0 -3
- package/dist/types-DN64_zzZ.d.mts.map +0 -1
- package/dist/types-DQIDRKF2.d.mts.map +0 -1
- package/dist/version-DB_fqCSI.mjs +0 -7
- package/dist/widgets-BD3ho7Rq.mjs.map +0 -1
- package/dist/zod-generator-LC-on_Vb.mjs.map +0 -1
- /package/dist/{api-tokens-rIXC6LdE.mjs → api-tokens-BfYts-sq.mjs} +0 -0
- /package/dist/{ssrf-DpXgKsna.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-
|
|
6
|
-
import { t as OptionsRepository } from "./options-
|
|
7
|
-
import { t as PluginContextFactory } from "./context-
|
|
8
|
-
import { r as requestCached } from "./request-cache-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
5
|
+
import { t as CommentRepository } from "./comment-vxOzWbZN.mjs";
|
|
6
|
+
import { t as OptionsRepository } from "./options-BHPeIbBd.mjs";
|
|
7
|
+
import { t as PluginContextFactory } from "./context-CX6gxOLW.mjs";
|
|
8
|
+
import { r as requestCached } from "./request-cache-DH9zdCOD.mjs";
|
|
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
|
/**
|
|
@@ -142,7 +145,7 @@ var AuditRepository = class {
|
|
|
142
145
|
|
|
143
146
|
//#endregion
|
|
144
147
|
//#region src/fields/image.ts
|
|
145
|
-
const
|
|
148
|
+
const mediaSchema = z.object({
|
|
146
149
|
id: z.string(),
|
|
147
150
|
src: z.string().optional(),
|
|
148
151
|
alt: z.string().optional(),
|
|
@@ -156,6 +159,7 @@ const imageSchema = z.object({
|
|
|
156
159
|
previewUrl: z.string().optional(),
|
|
157
160
|
meta: z.record(z.string(), z.unknown()).optional()
|
|
158
161
|
});
|
|
162
|
+
const imageSchema = mediaSchema.extend({ darkVariant: mediaSchema.optional() });
|
|
159
163
|
function image(options = {}) {
|
|
160
164
|
const validation = options.allowedTypes && options.allowedTypes.length > 0 ? { allowedMimeTypes: [...options.allowedTypes] } : void 0;
|
|
161
165
|
return {
|
|
@@ -223,7 +227,7 @@ function reference(collection, options) {
|
|
|
223
227
|
const portableTextBlockSchema = z.object({
|
|
224
228
|
_type: z.string(),
|
|
225
229
|
_key: z.string()
|
|
226
|
-
}).
|
|
230
|
+
}).loose();
|
|
227
231
|
/**
|
|
228
232
|
* Portable Text field
|
|
229
233
|
* Stores structured content in Portable Text format
|
|
@@ -251,10 +255,10 @@ function sanitizeGalleryImages(value, generateKey) {
|
|
|
251
255
|
if (!Array.isArray(value)) return [];
|
|
252
256
|
const images = [];
|
|
253
257
|
for (const entry of value) {
|
|
254
|
-
if (!isRecord$
|
|
258
|
+
if (!isRecord$4(entry)) continue;
|
|
255
259
|
const record = entry;
|
|
256
260
|
const asset = record.asset;
|
|
257
|
-
if (!isRecord$
|
|
261
|
+
if (!isRecord$4(asset)) continue;
|
|
258
262
|
const assetRecord = asset;
|
|
259
263
|
const image = {
|
|
260
264
|
_type: "image",
|
|
@@ -270,13 +274,15 @@ function sanitizeGalleryImages(value, generateKey) {
|
|
|
270
274
|
if (typeof record.caption === "string" && record.caption) image.caption = record.caption;
|
|
271
275
|
if (typeof record.width === "number") image.width = record.width;
|
|
272
276
|
if (typeof record.height === "number") image.height = record.height;
|
|
277
|
+
if (typeof record.focalX === "number") image.focalX = record.focalX;
|
|
278
|
+
if (typeof record.focalY === "number") image.focalY = record.focalY;
|
|
273
279
|
if (typeof record.blurhash === "string" && record.blurhash) image.blurhash = record.blurhash;
|
|
274
280
|
if (typeof record.dominantColor === "string" && record.dominantColor) image.dominantColor = record.dominantColor;
|
|
275
281
|
images.push(image);
|
|
276
282
|
}
|
|
277
283
|
return images;
|
|
278
284
|
}
|
|
279
|
-
function isRecord$
|
|
285
|
+
function isRecord$4(value) {
|
|
280
286
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
281
287
|
}
|
|
282
288
|
|
|
@@ -302,9 +308,10 @@ const SUPPORTED_PROSEMIRROR_MARKS = new Set([
|
|
|
302
308
|
"subscript",
|
|
303
309
|
"superscript",
|
|
304
310
|
"code",
|
|
305
|
-
"link"
|
|
311
|
+
"link",
|
|
312
|
+
"emdashPortableTextSpan"
|
|
306
313
|
]);
|
|
307
|
-
function isRecord$
|
|
314
|
+
function isRecord$3(value) {
|
|
308
315
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
309
316
|
}
|
|
310
317
|
function collectPortableTextMarks(value, inheritedMarkDefs, unsupported) {
|
|
@@ -312,11 +319,11 @@ function collectPortableTextMarks(value, inheritedMarkDefs, unsupported) {
|
|
|
312
319
|
for (const item of value) collectPortableTextMarks(item, inheritedMarkDefs, unsupported);
|
|
313
320
|
return;
|
|
314
321
|
}
|
|
315
|
-
if (!isRecord$
|
|
322
|
+
if (!isRecord$3(value)) return;
|
|
316
323
|
let markDefs = inheritedMarkDefs;
|
|
317
324
|
if (Array.isArray(value.markDefs)) {
|
|
318
325
|
const localMarkDefs = new Map(inheritedMarkDefs);
|
|
319
|
-
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);
|
|
320
327
|
markDefs = localMarkDefs;
|
|
321
328
|
}
|
|
322
329
|
if (value._type === "span" && Array.isArray(value.marks)) for (const mark of value.marks) {
|
|
@@ -471,6 +478,125 @@ function normalizeProseMirrorOrderedListJson(doc) {
|
|
|
471
478
|
return normalized;
|
|
472
479
|
}
|
|
473
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
|
+
|
|
474
600
|
//#endregion
|
|
475
601
|
//#region src/content/converters/prosemirror-to-portable-text.ts
|
|
476
602
|
/**
|
|
@@ -491,18 +617,33 @@ function prosemirrorToPortableText(doc) {
|
|
|
491
617
|
if (!doc || doc.type !== "doc" || !doc.content) return [];
|
|
492
618
|
assertProseMirrorMarksSupported(doc);
|
|
493
619
|
const blocks = [];
|
|
620
|
+
const usedBlockKeys = /* @__PURE__ */ new Set();
|
|
494
621
|
for (const [i, node] of doc.content.entries()) {
|
|
622
|
+
if (i === doc.content.length - 1 && isUnkeyedEmptyParagraph(node)) continue;
|
|
495
623
|
const converted = convertNode(node, `root:${i}`);
|
|
496
|
-
|
|
497
|
-
|
|
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
|
+
}
|
|
498
635
|
}
|
|
499
636
|
return blocks;
|
|
500
637
|
}
|
|
638
|
+
function isUnkeyedEmptyParagraph(node) {
|
|
639
|
+
return node.type === "paragraph" && (node.content?.length ?? 0) === 0 && portableTextKeyFromAttrs(node.attrs) === void 0;
|
|
640
|
+
}
|
|
501
641
|
/**
|
|
502
642
|
* Convert a single ProseMirror node to Portable Text block(s)
|
|
503
643
|
*/
|
|
504
644
|
function convertNode(node, path) {
|
|
505
645
|
switch (node.type) {
|
|
646
|
+
case PORTABLE_TEXT_BLOCK_NODE: return portableTextBlockFromAttrs(node.attrs) ?? null;
|
|
506
647
|
case "paragraph": return convertParagraph(node);
|
|
507
648
|
case "heading": return convertHeading(node);
|
|
508
649
|
case "bulletList": return convertList$1(node, "bullet", path);
|
|
@@ -514,7 +655,7 @@ function convertNode(node, path) {
|
|
|
514
655
|
case "gallery": return convertGallery(node);
|
|
515
656
|
case "horizontalRule": return {
|
|
516
657
|
_type: "break",
|
|
517
|
-
_key: generateKey(),
|
|
658
|
+
_key: portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
518
659
|
style: "lineBreak"
|
|
519
660
|
};
|
|
520
661
|
default: return {
|
|
@@ -535,10 +676,10 @@ function convertParagraph(node) {
|
|
|
535
676
|
const textAlign = ta === "center" || ta === "right" || ta === "justify" ? ta : void 0;
|
|
536
677
|
return {
|
|
537
678
|
_type: "block",
|
|
538
|
-
_key: generateKey(),
|
|
679
|
+
_key: portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
539
680
|
style: "normal",
|
|
540
681
|
children,
|
|
541
|
-
markDefs
|
|
682
|
+
...markDefs.length > 0 ? { markDefs } : {},
|
|
542
683
|
...textAlign ? { textAlign } : {}
|
|
543
684
|
};
|
|
544
685
|
}
|
|
@@ -565,7 +706,7 @@ function convertHeading(node) {
|
|
|
565
706
|
const textAlign = ta === "center" || ta === "right" || ta === "justify" ? ta : void 0;
|
|
566
707
|
return {
|
|
567
708
|
_type: "block",
|
|
568
|
-
_key: generateKey(),
|
|
709
|
+
_key: portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
569
710
|
style,
|
|
570
711
|
children,
|
|
571
712
|
markDefs: markDefs.length > 0 ? markDefs : void 0,
|
|
@@ -593,7 +734,7 @@ function convertListItem$1(item, listItem, level, path, metadata) {
|
|
|
593
734
|
const { children, markDefs } = convertInlineContent(child.content || []);
|
|
594
735
|
if (children.length > 0) blocks.push({
|
|
595
736
|
_type: "block",
|
|
596
|
-
_key: generateKey(),
|
|
737
|
+
_key: portableTextKeyFromAttrs(child.attrs) ?? generateKey(),
|
|
597
738
|
style: "normal",
|
|
598
739
|
listItem,
|
|
599
740
|
level,
|
|
@@ -623,7 +764,7 @@ function convertBlockquote(node) {
|
|
|
623
764
|
const { children, markDefs } = convertInlineContent(child.content || []);
|
|
624
765
|
if (children.length > 0) blocks.push({
|
|
625
766
|
_type: "block",
|
|
626
|
-
_key: generateKey(),
|
|
767
|
+
_key: portableTextKeyFromAttrs(child.attrs) ?? portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
627
768
|
style: "blockquote",
|
|
628
769
|
children,
|
|
629
770
|
markDefs: markDefs.length > 0 ? markDefs : void 0
|
|
@@ -639,7 +780,7 @@ function convertCodeBlock$1(node) {
|
|
|
639
780
|
const language = typeof node.attrs?.language === "string" ? node.attrs.language : void 0;
|
|
640
781
|
return {
|
|
641
782
|
_type: "code",
|
|
642
|
-
_key: generateKey(),
|
|
783
|
+
_key: portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
643
784
|
code,
|
|
644
785
|
language: language || void 0
|
|
645
786
|
};
|
|
@@ -651,7 +792,7 @@ function convertHtmlBlock(node) {
|
|
|
651
792
|
const rawHtml = node.attrs?.html;
|
|
652
793
|
return {
|
|
653
794
|
_type: "htmlBlock",
|
|
654
|
-
_key: generateKey(),
|
|
795
|
+
_key: portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
655
796
|
html: typeof rawHtml === "string" ? rawHtml : ""
|
|
656
797
|
};
|
|
657
798
|
}
|
|
@@ -669,9 +810,10 @@ function convertImage$1(node) {
|
|
|
669
810
|
const height = typeof attrs?.height === "number" ? attrs.height : void 0;
|
|
670
811
|
const displayWidth = typeof attrs?.displayWidth === "number" ? attrs.displayWidth : void 0;
|
|
671
812
|
const displayHeight = typeof attrs?.displayHeight === "number" ? attrs.displayHeight : void 0;
|
|
813
|
+
const alignment = attrs?.alignment;
|
|
672
814
|
return {
|
|
673
815
|
_type: "image",
|
|
674
|
-
_key: generateKey(),
|
|
816
|
+
_key: portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
675
817
|
asset: {
|
|
676
818
|
_ref: mediaId || src || "",
|
|
677
819
|
url: src || "",
|
|
@@ -682,7 +824,8 @@ function convertImage$1(node) {
|
|
|
682
824
|
width: width || void 0,
|
|
683
825
|
height: height || void 0,
|
|
684
826
|
displayWidth: displayWidth || void 0,
|
|
685
|
-
displayHeight: displayHeight || void 0
|
|
827
|
+
displayHeight: displayHeight || void 0,
|
|
828
|
+
alignment: alignment === "left" || alignment === "center" || alignment === "right" || alignment === "wide" || alignment === "full" ? alignment : void 0
|
|
686
829
|
};
|
|
687
830
|
}
|
|
688
831
|
/**
|
|
@@ -692,7 +835,7 @@ function convertGallery(node) {
|
|
|
692
835
|
const columns = node.attrs?.columns;
|
|
693
836
|
return {
|
|
694
837
|
_type: "gallery",
|
|
695
|
-
_key: generateKey(),
|
|
838
|
+
_key: portableTextKeyFromAttrs(node.attrs) ?? generateKey(),
|
|
696
839
|
images: sanitizeGalleryImages(node.attrs?.images, generateKey),
|
|
697
840
|
...typeof columns === "number" ? { columns } : {}
|
|
698
841
|
};
|
|
@@ -704,29 +847,50 @@ function convertInlineContent(nodes) {
|
|
|
704
847
|
const children = [];
|
|
705
848
|
const markDefs = [];
|
|
706
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
|
+
};
|
|
707
863
|
for (const node of nodes) if (node.type === "text" && node.text) {
|
|
708
864
|
const marks = [];
|
|
865
|
+
const originalMarkDefs = portableTextMarkDefsFromMarks(node.marks);
|
|
709
866
|
for (const mark of node.marks || []) {
|
|
710
|
-
const markType = convertMark(mark, markDefs, markDefMap);
|
|
867
|
+
const markType = convertMark(mark, markDefs, markDefMap, originalMarkDefs);
|
|
711
868
|
if (markType) marks.push(markType);
|
|
712
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
|
+
}
|
|
713
877
|
children.push({
|
|
714
878
|
_type: "span",
|
|
715
|
-
_key:
|
|
879
|
+
_key: claimSpanKey(preferredKey),
|
|
716
880
|
text: node.text,
|
|
717
|
-
marks:
|
|
881
|
+
marks: normalizedMarks
|
|
718
882
|
});
|
|
719
883
|
} else if (node.type === "hardBreak") if (children.length > 0) {
|
|
720
884
|
const lastChild = children.at(-1);
|
|
721
885
|
lastChild.text += "\n";
|
|
722
886
|
} else children.push({
|
|
723
887
|
_type: "span",
|
|
724
|
-
_key:
|
|
888
|
+
_key: claimSpanKey(portableTextSpanKeyFromMarks(node.marks) ?? portableTextKeyFromAttrs(node.attrs)),
|
|
725
889
|
text: "\n"
|
|
726
890
|
});
|
|
727
891
|
if (children.length === 0) children.push({
|
|
728
892
|
_type: "span",
|
|
729
|
-
_key:
|
|
893
|
+
_key: claimSpanKey(),
|
|
730
894
|
text: ""
|
|
731
895
|
});
|
|
732
896
|
return {
|
|
@@ -737,7 +901,7 @@ function convertInlineContent(nodes) {
|
|
|
737
901
|
/**
|
|
738
902
|
* Convert a ProseMirror mark to Portable Text mark
|
|
739
903
|
*/
|
|
740
|
-
function convertMark(mark, markDefs, markDefMap) {
|
|
904
|
+
function convertMark(mark, markDefs, markDefMap, originalMarkDefs) {
|
|
741
905
|
switch (mark.type) {
|
|
742
906
|
case "bold":
|
|
743
907
|
case "strong": return "strong";
|
|
@@ -749,17 +913,22 @@ function convertMark(mark, markDefs, markDefMap) {
|
|
|
749
913
|
case "subscript": return "subscript";
|
|
750
914
|
case "superscript": return "superscript";
|
|
751
915
|
case "code": return "code";
|
|
916
|
+
case PORTABLE_TEXT_SPAN_MARK: return null;
|
|
752
917
|
case "link": {
|
|
753
918
|
const href = (typeof mark.attrs?.href === "string" ? mark.attrs.href : "") || "";
|
|
754
|
-
|
|
755
|
-
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";
|
|
756
924
|
markDefs.push({
|
|
925
|
+
...originalMarkDef,
|
|
757
926
|
_type: "link",
|
|
758
927
|
_key: key,
|
|
759
928
|
href,
|
|
760
|
-
blank
|
|
929
|
+
...blank || originalMarkDef && Object.hasOwn(originalMarkDef, "blank") ? { blank } : {}
|
|
761
930
|
});
|
|
762
|
-
markDefMap.set(
|
|
931
|
+
markDefMap.set(mapKey, key);
|
|
763
932
|
return key;
|
|
764
933
|
}
|
|
765
934
|
default: throw new UnsupportedPortableTextMarksError([mark.type]);
|
|
@@ -773,15 +942,14 @@ function convertMark(mark, markDefs, markDefMap) {
|
|
|
773
942
|
*
|
|
774
943
|
* Converts Portable Text to TipTap's ProseMirror JSON format for editing.
|
|
775
944
|
*/
|
|
776
|
-
/**
|
|
777
|
-
|
|
778
|
-
*/
|
|
779
|
-
function portableTextToProsemirror(blocks) {
|
|
945
|
+
/** Convert Portable Text to a ProseMirror document. */
|
|
946
|
+
function portableTextToProsemirror(blocks, options = {}) {
|
|
780
947
|
if (!blocks || blocks.length === 0) return {
|
|
781
948
|
type: "doc",
|
|
782
949
|
content: [{ type: "paragraph" }]
|
|
783
950
|
};
|
|
784
951
|
assertPortableTextMarksSupported(blocks);
|
|
952
|
+
const preserveIdentity = options.preserveIdentity === true;
|
|
785
953
|
const content = [];
|
|
786
954
|
let i = 0;
|
|
787
955
|
while (i < blocks.length) {
|
|
@@ -802,7 +970,7 @@ function portableTextToProsemirror(blocks) {
|
|
|
802
970
|
i++;
|
|
803
971
|
} else break;
|
|
804
972
|
}
|
|
805
|
-
content.push(convertList(listBlocks, listType, `root:${runStart}
|
|
973
|
+
content.push(convertList(listBlocks, listType, `root:${runStart}`, preserveIdentity));
|
|
806
974
|
} else if (isTextBlock(block) && block.style === "blockquote") {
|
|
807
975
|
const quoteBlocks = [];
|
|
808
976
|
while (i < blocks.length) {
|
|
@@ -814,15 +982,16 @@ function portableTextToProsemirror(blocks) {
|
|
|
814
982
|
content.push({
|
|
815
983
|
type: "blockquote",
|
|
816
984
|
content: quoteBlocks.map((quoteBlock) => {
|
|
817
|
-
const paragraph = convertSpans(quoteBlock.children, quoteBlock.markDefs || []);
|
|
985
|
+
const paragraph = convertSpans(quoteBlock.children, quoteBlock.markDefs || [], preserveIdentity);
|
|
818
986
|
return {
|
|
819
987
|
type: "paragraph",
|
|
988
|
+
attrs: identityAttrs(void 0, quoteBlock._key, preserveIdentity),
|
|
820
989
|
content: paragraph.length > 0 ? paragraph : void 0
|
|
821
990
|
};
|
|
822
991
|
})
|
|
823
992
|
});
|
|
824
993
|
} else {
|
|
825
|
-
const converted = convertBlock(block);
|
|
994
|
+
const converted = convertBlock(block, preserveIdentity);
|
|
826
995
|
if (converted) content.push(converted);
|
|
827
996
|
i++;
|
|
828
997
|
}
|
|
@@ -832,6 +1001,9 @@ function portableTextToProsemirror(blocks) {
|
|
|
832
1001
|
content: content.length > 0 ? content : [{ type: "paragraph" }]
|
|
833
1002
|
});
|
|
834
1003
|
}
|
|
1004
|
+
function identityAttrs(attrs, key, preserveIdentity) {
|
|
1005
|
+
return preserveIdentity ? attrsWithPortableTextKey(attrs, key) : attrs;
|
|
1006
|
+
}
|
|
835
1007
|
function getListMetadata(item, fallbackSeed) {
|
|
836
1008
|
const listId = normalizeListId(item.listId) ?? deriveLegacyListId(fallbackSeed);
|
|
837
1009
|
const listStart = normalizeListStart(item.listStart);
|
|
@@ -863,8 +1035,8 @@ function isImageBlock(block) {
|
|
|
863
1035
|
return block._type === "image" && "asset" in block && typeof block.asset === "object" && block.asset !== null;
|
|
864
1036
|
}
|
|
865
1037
|
/**
|
|
866
|
-
* Type guard for gallery blocks
|
|
867
|
-
* without one
|
|
1038
|
+
* Type guard for gallery blocks that carry a usable `images` array.
|
|
1039
|
+
* Galleries without one are handled separately in `convertBlock`.
|
|
868
1040
|
*/
|
|
869
1041
|
function isGalleryBlock(block) {
|
|
870
1042
|
return block._type === "gallery" && "images" in block && Array.isArray(block.images);
|
|
@@ -878,23 +1050,44 @@ function isCodeBlock(block) {
|
|
|
878
1050
|
/**
|
|
879
1051
|
* Convert a single Portable Text block to ProseMirror node
|
|
880
1052
|
*/
|
|
881
|
-
function convertBlock(block) {
|
|
882
|
-
if (isTextBlock(block)) return convertTextBlock(block);
|
|
883
|
-
if (isImageBlock(block)) return convertImage(block);
|
|
884
|
-
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);
|
|
885
1057
|
if (isGalleryBlock(block)) return {
|
|
886
1058
|
type: "gallery",
|
|
887
|
-
attrs: {
|
|
1059
|
+
attrs: identityAttrs({
|
|
888
1060
|
images: sanitizeGalleryImages(block.images),
|
|
889
1061
|
columns: typeof block.columns === "number" ? block.columns : void 0
|
|
890
|
-
}
|
|
1062
|
+
}, block._key, preserveIdentity)
|
|
891
1063
|
};
|
|
892
|
-
if (isCodeBlock(block)) return convertCodeBlock(block);
|
|
1064
|
+
if (isCodeBlock(block)) return convertCodeBlock(block, preserveIdentity);
|
|
893
1065
|
if (block._type === "htmlBlock") return {
|
|
894
1066
|
type: "htmlBlock",
|
|
895
|
-
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 }
|
|
896
1090
|
};
|
|
897
|
-
if (block._type === "break") return { type: "horizontalRule" };
|
|
898
1091
|
return {
|
|
899
1092
|
type: "paragraph",
|
|
900
1093
|
content: [{
|
|
@@ -907,9 +1100,9 @@ function convertBlock(block) {
|
|
|
907
1100
|
/**
|
|
908
1101
|
* Convert text block to ProseMirror paragraph or heading
|
|
909
1102
|
*/
|
|
910
|
-
function convertTextBlock(block) {
|
|
1103
|
+
function convertTextBlock(block, preserveIdentity) {
|
|
911
1104
|
const { style = "normal", children, markDefs = [] } = block;
|
|
912
|
-
const content = convertSpans(children, markDefs);
|
|
1105
|
+
const content = convertSpans(children, markDefs, preserveIdentity);
|
|
913
1106
|
switch (style) {
|
|
914
1107
|
case "h1":
|
|
915
1108
|
case "h2":
|
|
@@ -918,14 +1111,15 @@ function convertTextBlock(block) {
|
|
|
918
1111
|
case "h5":
|
|
919
1112
|
case "h6": return {
|
|
920
1113
|
type: "heading",
|
|
921
|
-
attrs: {
|
|
1114
|
+
attrs: identityAttrs({
|
|
922
1115
|
level: parseInt(style.substring(1), 10),
|
|
923
1116
|
...block.textAlign ? { textAlign: block.textAlign } : {}
|
|
924
|
-
},
|
|
1117
|
+
}, block._key, preserveIdentity),
|
|
925
1118
|
content: content.length > 0 ? content : void 0
|
|
926
1119
|
};
|
|
927
1120
|
case "blockquote": return {
|
|
928
1121
|
type: "blockquote",
|
|
1122
|
+
attrs: identityAttrs(void 0, block._key, preserveIdentity),
|
|
929
1123
|
content: [{
|
|
930
1124
|
type: "paragraph",
|
|
931
1125
|
content: content.length > 0 ? content : void 0
|
|
@@ -933,7 +1127,7 @@ function convertTextBlock(block) {
|
|
|
933
1127
|
};
|
|
934
1128
|
default: return {
|
|
935
1129
|
type: "paragraph",
|
|
936
|
-
attrs: block.textAlign ? { textAlign: block.textAlign } : void 0,
|
|
1130
|
+
attrs: identityAttrs(block.textAlign ? { textAlign: block.textAlign } : void 0, block._key, preserveIdentity),
|
|
937
1131
|
content: content.length > 0 ? content : void 0
|
|
938
1132
|
};
|
|
939
1133
|
}
|
|
@@ -941,7 +1135,7 @@ function convertTextBlock(block) {
|
|
|
941
1135
|
/**
|
|
942
1136
|
* Convert list items to ProseMirror list
|
|
943
1137
|
*/
|
|
944
|
-
function convertList(items, listType, context) {
|
|
1138
|
+
function convertList(items, listType, context, preserveIdentity) {
|
|
945
1139
|
const rootItems = [];
|
|
946
1140
|
let i = 0;
|
|
947
1141
|
while (i < items.length) {
|
|
@@ -953,9 +1147,9 @@ function convertList(items, listType, context) {
|
|
|
953
1147
|
nestedItems.push(items[i]);
|
|
954
1148
|
i++;
|
|
955
1149
|
}
|
|
956
|
-
rootItems.push(convertListItem(item, nestedItems, listType, `${context}:${rootItems.length}
|
|
1150
|
+
rootItems.push(convertListItem(item, nestedItems, listType, `${context}:${rootItems.length}`, preserveIdentity));
|
|
957
1151
|
} else {
|
|
958
|
-
rootItems.push(convertListItem(item, [], listType, `${context}:${rootItems.length}
|
|
1152
|
+
rootItems.push(convertListItem(item, [], listType, `${context}:${rootItems.length}`, preserveIdentity));
|
|
959
1153
|
i++;
|
|
960
1154
|
}
|
|
961
1155
|
}
|
|
@@ -972,11 +1166,12 @@ function convertList(items, listType, context) {
|
|
|
972
1166
|
/**
|
|
973
1167
|
* Convert a single list item to ProseMirror
|
|
974
1168
|
*/
|
|
975
|
-
function convertListItem(item, nestedItems, parentListType, context) {
|
|
1169
|
+
function convertListItem(item, nestedItems, parentListType, context, preserveIdentity) {
|
|
976
1170
|
const content = [];
|
|
977
|
-
const spans = convertSpans(item.children, item.markDefs || []);
|
|
1171
|
+
const spans = convertSpans(item.children, item.markDefs || [], preserveIdentity);
|
|
978
1172
|
content.push({
|
|
979
1173
|
type: "paragraph",
|
|
1174
|
+
attrs: identityAttrs(void 0, item._key, preserveIdentity),
|
|
980
1175
|
content: spans.length > 0 ? spans : void 0
|
|
981
1176
|
});
|
|
982
1177
|
if (nestedItems.length > 0) {
|
|
@@ -999,7 +1194,7 @@ function convertListItem(item, nestedItems, parentListType, context) {
|
|
|
999
1194
|
...ni,
|
|
1000
1195
|
level: (ni.level || 2) - 1
|
|
1001
1196
|
}));
|
|
1002
|
-
content.push(convertList(adjustedGroup, anchorType, `${context}:nested:${j - nestedGroup.length}
|
|
1197
|
+
content.push(convertList(adjustedGroup, anchorType, `${context}:nested:${j - nestedGroup.length}`, preserveIdentity));
|
|
1003
1198
|
}
|
|
1004
1199
|
}
|
|
1005
1200
|
}
|
|
@@ -1011,16 +1206,24 @@ function convertListItem(item, nestedItems, parentListType, context) {
|
|
|
1011
1206
|
/**
|
|
1012
1207
|
* Convert Portable Text spans to ProseMirror text nodes
|
|
1013
1208
|
*/
|
|
1014
|
-
function convertSpans(spans, markDefs) {
|
|
1209
|
+
function convertSpans(spans, markDefs, preserveIdentity) {
|
|
1015
1210
|
const nodes = [];
|
|
1016
1211
|
const markDefsMap = new Map(markDefs.map((md) => [md._key, md]));
|
|
1017
1212
|
for (const span of spans) {
|
|
1018
1213
|
if (span._type !== "span") continue;
|
|
1214
|
+
const referencedMarkDefs = markDefs.filter((markDef) => span.marks?.includes(markDef._key));
|
|
1019
1215
|
const parts = span.text.split("\n");
|
|
1020
1216
|
for (let i = 0; i < parts.length; i++) {
|
|
1021
1217
|
const text = parts[i];
|
|
1022
1218
|
if (text.length > 0) {
|
|
1023
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
|
+
});
|
|
1024
1227
|
const node = {
|
|
1025
1228
|
type: "text",
|
|
1026
1229
|
text
|
|
@@ -1028,7 +1231,16 @@ function convertSpans(spans, markDefs) {
|
|
|
1028
1231
|
if (marks.length > 0) node.marks = marks;
|
|
1029
1232
|
nodes.push(node);
|
|
1030
1233
|
}
|
|
1031
|
-
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" });
|
|
1032
1244
|
}
|
|
1033
1245
|
}
|
|
1034
1246
|
return nodes;
|
|
@@ -1075,13 +1287,16 @@ function convertMarks(marks, markDefs) {
|
|
|
1075
1287
|
}
|
|
1076
1288
|
return pmMarks;
|
|
1077
1289
|
}
|
|
1290
|
+
function imageAlignment(value) {
|
|
1291
|
+
return value === "left" || value === "center" || value === "right" || value === "wide" || value === "full" ? value : void 0;
|
|
1292
|
+
}
|
|
1078
1293
|
/**
|
|
1079
1294
|
* Convert image block to ProseMirror
|
|
1080
1295
|
*/
|
|
1081
|
-
function convertImage(block) {
|
|
1296
|
+
function convertImage(block, preserveIdentity) {
|
|
1082
1297
|
return {
|
|
1083
1298
|
type: "image",
|
|
1084
|
-
attrs: {
|
|
1299
|
+
attrs: identityAttrs({
|
|
1085
1300
|
src: block.asset.url || block.asset._ref,
|
|
1086
1301
|
alt: block.alt || "",
|
|
1087
1302
|
title: block.caption || "",
|
|
@@ -1090,8 +1305,9 @@ function convertImage(block) {
|
|
|
1090
1305
|
width: block.width,
|
|
1091
1306
|
height: block.height,
|
|
1092
1307
|
displayWidth: block.displayWidth,
|
|
1093
|
-
displayHeight: block.displayHeight
|
|
1094
|
-
|
|
1308
|
+
displayHeight: block.displayHeight,
|
|
1309
|
+
alignment: imageAlignment(block.alignment)
|
|
1310
|
+
}, block._key, preserveIdentity)
|
|
1095
1311
|
};
|
|
1096
1312
|
}
|
|
1097
1313
|
/**
|
|
@@ -1099,10 +1315,10 @@ function convertImage(block) {
|
|
|
1099
1315
|
* Handles blocks like `{ _type: "image", url: "...", alt: "..." }` that may
|
|
1100
1316
|
* originate from migrations or third-party imports.
|
|
1101
1317
|
*/
|
|
1102
|
-
function convertMalformedImage(block) {
|
|
1318
|
+
function convertMalformedImage(block, preserveIdentity) {
|
|
1103
1319
|
return {
|
|
1104
1320
|
type: "image",
|
|
1105
|
-
attrs: {
|
|
1321
|
+
attrs: identityAttrs({
|
|
1106
1322
|
src: "url" in block && typeof block.url === "string" ? block.url : "",
|
|
1107
1323
|
alt: "alt" in block && typeof block.alt === "string" ? block.alt : "",
|
|
1108
1324
|
title: "caption" in block && typeof block.caption === "string" ? block.caption : "",
|
|
@@ -1111,17 +1327,18 @@ function convertMalformedImage(block) {
|
|
|
1111
1327
|
width: "width" in block && typeof block.width === "number" ? block.width : void 0,
|
|
1112
1328
|
height: "height" in block && typeof block.height === "number" ? block.height : void 0,
|
|
1113
1329
|
displayWidth: "displayWidth" in block && typeof block.displayWidth === "number" ? block.displayWidth : void 0,
|
|
1114
|
-
displayHeight: "displayHeight" in block && typeof block.displayHeight === "number" ? block.displayHeight : void 0
|
|
1115
|
-
|
|
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)
|
|
1116
1333
|
};
|
|
1117
1334
|
}
|
|
1118
1335
|
/**
|
|
1119
1336
|
* Convert code block to ProseMirror
|
|
1120
1337
|
*/
|
|
1121
|
-
function convertCodeBlock(block) {
|
|
1338
|
+
function convertCodeBlock(block, preserveIdentity) {
|
|
1122
1339
|
return {
|
|
1123
1340
|
type: "codeBlock",
|
|
1124
|
-
attrs: { language: block.language || null },
|
|
1341
|
+
attrs: identityAttrs({ language: block.language || null }, block._key, preserveIdentity),
|
|
1125
1342
|
content: block.code ? [{
|
|
1126
1343
|
type: "text",
|
|
1127
1344
|
text: block.code
|
|
@@ -1566,9 +1783,10 @@ var HookPipeline = class HookPipeline {
|
|
|
1566
1783
|
}
|
|
1567
1784
|
/**
|
|
1568
1785
|
* Run content:beforeSave hooks
|
|
1569
|
-
* Returns modified content from the pipeline
|
|
1786
|
+
* Returns modified content from the pipeline. `id` is the existing item's
|
|
1787
|
+
* ID when updating.
|
|
1570
1788
|
*/
|
|
1571
|
-
async runContentBeforeSave(content, collection, isNew) {
|
|
1789
|
+
async runContentBeforeSave(content, collection, isNew, id) {
|
|
1572
1790
|
const hooks = this.getTypedHooks("content:beforeSave");
|
|
1573
1791
|
const results = [];
|
|
1574
1792
|
let currentContent = content;
|
|
@@ -1579,6 +1797,7 @@ var HookPipeline = class HookPipeline {
|
|
|
1579
1797
|
collection,
|
|
1580
1798
|
isNew
|
|
1581
1799
|
};
|
|
1800
|
+
if (id !== void 0) event.id = id;
|
|
1582
1801
|
const ctx = this.getContext(hook.pluginId);
|
|
1583
1802
|
const start = Date.now();
|
|
1584
1803
|
try {
|
|
@@ -2246,6 +2465,28 @@ async function resolveExclusiveHooks(opts) {
|
|
|
2246
2465
|
}
|
|
2247
2466
|
}
|
|
2248
2467
|
|
|
2468
|
+
//#endregion
|
|
2469
|
+
//#region src/plugins/save-rejection.ts
|
|
2470
|
+
/**
|
|
2471
|
+
* Thrown by a `content:beforeSave` hook to reject a save with a message
|
|
2472
|
+
* that is safe to show to the editor. The runtime converts it into a
|
|
2473
|
+
* structured `SAVE_REJECTED` API error; any other exception thrown by the
|
|
2474
|
+
* hook cancels the save with a generic error that hides the exception
|
|
2475
|
+
* message.
|
|
2476
|
+
*/
|
|
2477
|
+
var ContentSaveRejectedError = class extends Error {
|
|
2478
|
+
name = "ContentSaveRejectedError";
|
|
2479
|
+
};
|
|
2480
|
+
/**
|
|
2481
|
+
* Matches by name as well as by prototype: bundlers can duplicate this
|
|
2482
|
+
* module across SSR chunks, and an `instanceof` against the wrong copy of
|
|
2483
|
+
* the class would misreport a rejection as a plugin crash.
|
|
2484
|
+
*/
|
|
2485
|
+
function isContentSaveRejection(error) {
|
|
2486
|
+
if (error instanceof ContentSaveRejectedError) return true;
|
|
2487
|
+
return error instanceof Error && error.name === "ContentSaveRejectedError";
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2249
2490
|
//#endregion
|
|
2250
2491
|
//#region src/plugins/email.ts
|
|
2251
2492
|
/**
|
|
@@ -2514,7 +2755,7 @@ var PluginRouteHandler = class {
|
|
|
2514
2755
|
error: {
|
|
2515
2756
|
code: "VALIDATION_ERROR",
|
|
2516
2757
|
message: "Invalid request body",
|
|
2517
|
-
details: parseResult.error
|
|
2758
|
+
details: z$1.formatError(parseResult.error)
|
|
2518
2759
|
},
|
|
2519
2760
|
status: 400
|
|
2520
2761
|
};
|
|
@@ -2821,9 +3062,9 @@ var PluginManager = class {
|
|
|
2821
3062
|
/**
|
|
2822
3063
|
* Run content:beforeSave hooks across all active plugins
|
|
2823
3064
|
*/
|
|
2824
|
-
async runContentBeforeSave(content, collection, isNew) {
|
|
3065
|
+
async runContentBeforeSave(content, collection, isNew, id) {
|
|
2825
3066
|
this.ensureInitialized();
|
|
2826
|
-
return this.hookPipeline.runContentBeforeSave(content, collection, isNew);
|
|
3067
|
+
return this.hookPipeline.runContentBeforeSave(content, collection, isNew, id);
|
|
2827
3068
|
}
|
|
2828
3069
|
/**
|
|
2829
3070
|
* Run content:afterSave hooks across all active plugins
|
|
@@ -3089,16 +3330,12 @@ var NodeCronScheduler = class {
|
|
|
3089
3330
|
timer = null;
|
|
3090
3331
|
running = false;
|
|
3091
3332
|
systemCleanup = null;
|
|
3092
|
-
mediaUsageMaintenance = null;
|
|
3093
3333
|
constructor(executor) {
|
|
3094
3334
|
this.executor = executor;
|
|
3095
3335
|
}
|
|
3096
3336
|
setSystemCleanup(fn) {
|
|
3097
3337
|
this.systemCleanup = fn;
|
|
3098
3338
|
}
|
|
3099
|
-
setMediaUsageMaintenance(fn) {
|
|
3100
|
-
this.mediaUsageMaintenance = fn;
|
|
3101
|
-
}
|
|
3102
3339
|
start() {
|
|
3103
3340
|
this.running = true;
|
|
3104
3341
|
this.arm();
|
|
@@ -3145,13 +3382,8 @@ var NodeCronScheduler = class {
|
|
|
3145
3382
|
if (!this.running) return;
|
|
3146
3383
|
const tasks = [this.executor.tick(), this.executor.recoverStaleLocks()];
|
|
3147
3384
|
if (this.systemCleanup) tasks.push(this.systemCleanup());
|
|
3148
|
-
Promise.allSettled(tasks).then(
|
|
3385
|
+
Promise.allSettled(tasks).then((results) => {
|
|
3149
3386
|
for (const r of results) if (r.status === "rejected") console.error("[cron:node] Tick task failed:", r.reason);
|
|
3150
|
-
if (this.mediaUsageMaintenance) try {
|
|
3151
|
-
await this.mediaUsageMaintenance();
|
|
3152
|
-
} catch (error) {
|
|
3153
|
-
console.error("[cron:node] Media Usage maintenance failed:", error);
|
|
3154
|
-
}
|
|
3155
3387
|
}).finally(() => {
|
|
3156
3388
|
if (this.running) this.arm();
|
|
3157
3389
|
});
|
|
@@ -3226,14 +3458,14 @@ const SANDBOX_ROUTE_ERROR_DEFINITIONS = {
|
|
|
3226
3458
|
status: 503
|
|
3227
3459
|
}
|
|
3228
3460
|
};
|
|
3229
|
-
function isRecord(value) {
|
|
3461
|
+
function isRecord$1(value) {
|
|
3230
3462
|
return typeof value === "object" && value !== null;
|
|
3231
3463
|
}
|
|
3232
3464
|
function isSandboxRouteErrorCode(value) {
|
|
3233
3465
|
return typeof value === "string" && value in SANDBOX_ROUTE_ERROR_DEFINITIONS;
|
|
3234
3466
|
}
|
|
3235
3467
|
function getSandboxRouteErrorDetails(error) {
|
|
3236
|
-
if (!isRecord(error)) return null;
|
|
3468
|
+
if (!isRecord$1(error)) return null;
|
|
3237
3469
|
const propertyCode = isSandboxRouteErrorCode(error.code) ? error.code : null;
|
|
3238
3470
|
const nameCode = error instanceof Error && isSandboxRouteErrorCode(error.name) ? error.name : null;
|
|
3239
3471
|
if (propertyCode && nameCode && propertyCode !== nameCode) return null;
|
|
@@ -3259,7 +3491,7 @@ function createSandboxRouteErrorEnvelope(error) {
|
|
|
3259
3491
|
} : null;
|
|
3260
3492
|
}
|
|
3261
3493
|
function getSandboxRouteErrorEnvelope(value) {
|
|
3262
|
-
if (!isRecord(value) || value.__emdashSandboxRouteError !== true) return null;
|
|
3494
|
+
if (!isRecord$1(value) || value.__emdashSandboxRouteError !== true) return null;
|
|
3263
3495
|
const details = getSandboxRouteErrorDetails(value.error);
|
|
3264
3496
|
return details ? {
|
|
3265
3497
|
__emdashSandboxRouteError: true,
|
|
@@ -3277,6 +3509,30 @@ var SandboxUnavailableError = class extends Error {
|
|
|
3277
3509
|
}
|
|
3278
3510
|
};
|
|
3279
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
|
+
|
|
3280
3536
|
//#endregion
|
|
3281
3537
|
//#region src/comments/ranking.ts
|
|
3282
3538
|
/**
|
|
@@ -3507,6 +3763,18 @@ async function getMenusWithDb(db, options = {}) {
|
|
|
3507
3763
|
return query.execute();
|
|
3508
3764
|
}
|
|
3509
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
|
+
/**
|
|
3510
3778
|
* Build a hierarchical menu tree from a flat list of items. Items are
|
|
3511
3779
|
* resolved against the given `locale` so references land on the right
|
|
3512
3780
|
* per-locale content rows.
|
|
@@ -3738,5 +4006,5 @@ function resolveTaxonomyUrl(referenceGroup, taxonomyLookup) {
|
|
|
3738
4006
|
}
|
|
3739
4007
|
|
|
3740
4008
|
//#endregion
|
|
3741
|
-
export {
|
|
3742
|
-
//# 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
|