emdash 0.35.0 → 0.36.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-CzL3H752.d.mts} +3 -3
- package/dist/{adapters-Bb1vG41D.d.mts.map → adapters-CzL3H752.d.mts.map} +1 -1
- package/dist/{allowed-origins-DW7sYyqg.mjs → allowed-origins-maylGaHv.mjs} +2 -2
- package/dist/{allowed-origins-DW7sYyqg.mjs.map → allowed-origins-maylGaHv.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.mjs +22 -20
- 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-B0w3uBiG.mjs +2269 -0
- package/dist/api-B0w3uBiG.mjs.map +1 -0
- package/dist/{api-tokens-KO24G1Fd.mjs → api-tokens-9YrrCoE6.mjs} +2 -2
- package/dist/{api-tokens-KO24G1Fd.mjs.map → api-tokens-9YrrCoE6.mjs.map} +1 -1
- package/dist/{apply-kUDt80-G.mjs → apply-B_VMpJ2P.mjs} +34 -35
- package/dist/{apply-kUDt80-G.mjs.map → apply-B_VMpJ2P.mjs.map} +1 -1
- package/dist/astro/index.d.mts +12 -12
- package/dist/astro/index.mjs +26 -15
- 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 +168 -1305
- 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.mjs +4 -4
- 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 +15 -15
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +15 -15
- package/dist/astro/routes/api/admin/bylines/index.mjs +15 -15
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +12 -12
- package/dist/astro/routes/api/admin/comments/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/comments/bulk.mjs +9 -9
- package/dist/astro/routes/api/admin/comments/counts.mjs +4 -4
- package/dist/astro/routes/api/admin/comments/index.mjs +9 -9
- 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 +3 -3
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +54 -48
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +54 -48
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +52 -46
- 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 +52 -46
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +53 -47
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +53 -47
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +52 -46
- 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 +52 -46
- 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 +53 -47
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +52 -46
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +53 -47
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +54 -48
- 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 +172 -133
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +54 -48
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +52 -46
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +52 -46
- 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 +52 -46
- 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 +13 -13
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +3 -3
- 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 +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +16 -14
- 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 +16 -14
- 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 +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/trash.mjs +7 -7
- package/dist/astro/routes/api/dashboard.mjs +7 -7
- package/dist/astro/routes/api/dev/emails.mjs +2 -2
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +16 -16
- 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 +12 -12
- 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 +16 -16
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +26 -26
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/mcp.mjs +42 -42
- package/dist/astro/routes/api/media/_id_/confirm.mjs +11 -11
- 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_.mjs +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 +9 -9
- package/dist/astro/routes/api/media.d.mts.map +1 -1
- package/dist/astro/routes/api/media.mjs +28 -19
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +8 -8
- package/dist/astro/routes/api/menus/_name_/items.mjs +8 -8
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +8 -8
- package/dist/astro/routes/api/menus/_name_/translations.mjs +8 -8
- package/dist/astro/routes/api/menus/_name_.mjs +8 -8
- package/dist/astro/routes/api/menus/index.mjs +8 -8
- 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 +153 -6
- 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 +16 -14
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/translations.mjs +11 -9
- package/dist/astro/routes/api/relations/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/relations/index.mjs +16 -14
- 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 +52 -46
- 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 +52 -46
- 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 +52 -46
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +52 -46
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +52 -46
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.mjs +52 -46
- 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 +52 -46
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +52 -46
- 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 +4 -4
- package/dist/astro/routes/api/settings.mjs +13 -13
- 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 +34 -27
- 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 +31 -29
- 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.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/index.mjs +13 -13
- 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.mjs +7 -7
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +10 -10
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +10 -10
- package/dist/astro/routes/api/widget-areas/_name_.mjs +5 -5
- package/dist/astro/routes/api/widget-areas/index.mjs +10 -10
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +6 -6
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +9 -9
- package/dist/astro/routes/sitemap.xml.mjs +7 -7
- package/dist/astro/types.d.mts +19 -14
- 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-ByYs-Uxs.mjs} +2 -2
- package/dist/{authorize-DUElxgOQ.mjs.map → authorize-ByYs-Uxs.mjs.map} +1 -1
- package/dist/{backup-DWYpJlLj.mjs → backup-ChyHfIoX.mjs} +5 -5
- package/dist/{backup-DWYpJlLj.mjs.map → backup-ChyHfIoX.mjs.map} +1 -1
- package/dist/{bundle-vn56sLos.mjs → bundle-DZFhFurR.mjs} +4 -4
- package/dist/{bundle-vn56sLos.mjs.map → bundle-DZFhFurR.mjs.map} +1 -1
- package/dist/{byline-yjvWq4ip.mjs → byline-Cpnwrje1.mjs} +6 -6
- package/dist/{byline-yjvWq4ip.mjs.map → byline-Cpnwrje1.mjs.map} +1 -1
- package/dist/{byline-fields-txaLGoME.mjs → byline-fields-CAyA_Umd.mjs} +2 -2
- package/dist/{byline-fields-txaLGoME.mjs.map → byline-fields-CAyA_Umd.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-BSo9B9RX.mjs} +7 -7
- package/dist/{bylines-DjXS5p0P.mjs.map → bylines-BSo9B9RX.mjs.map} +1 -1
- package/dist/{bylines-Bu7pchQ4.mjs → bylines-CHjvehVX.mjs} +3 -3
- package/dist/{bylines-Bu7pchQ4.mjs.map → bylines-CHjvehVX.mjs.map} +1 -1
- package/dist/{cache-C46-3Irl.mjs → cache-5VirJ2Cn.mjs} +4 -4
- package/dist/{cache-C46-3Irl.mjs.map → cache-5VirJ2Cn.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-D5pSY2S1.mjs} +1 -1
- package/dist/{challenge-store-SIL5DsF2.mjs.map → challenge-store-D5pSY2S1.mjs.map} +1 -1
- package/dist/{chunks-fiZ8G9RJ.mjs → chunks-bNiX6_DR.mjs} +2 -2
- package/dist/{chunks-fiZ8G9RJ.mjs.map → chunks-bNiX6_DR.mjs.map} +1 -1
- package/dist/cli/index.mjs +36 -52
- 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-m_oi2c0N.mjs} +13 -356
- package/dist/collection-deletion-m_oi2c0N.mjs.map +1 -0
- package/dist/{comment-Dxlep6cE.mjs → comment-DhvLEdhQ.mjs} +1 -1
- package/dist/{comment-Dxlep6cE.mjs.map → comment-DhvLEdhQ.mjs.map} +1 -1
- package/dist/{comment-reaction-D-2J84UE.mjs → comment-reaction-CRuItEjt.mjs} +2 -2
- package/dist/{comment-reaction-D-2J84UE.mjs.map → comment-reaction-CRuItEjt.mjs.map} +1 -1
- package/dist/{comments-CTfZtLmM.mjs → comments-CLj4bi8I.mjs} +2 -2
- package/dist/{comments-CTfZtLmM.mjs.map → comments-CLj4bi8I.mjs.map} +1 -1
- package/dist/{components-CQy3lh9x.mjs → components-v4U4DT2y.mjs} +1 -1
- package/dist/{components-CQy3lh9x.mjs.map → components-v4U4DT2y.mjs.map} +1 -1
- package/dist/{config-COQzTe5Q.d.mts → config-DrfghTPe.d.mts} +1 -1
- package/dist/{config-COQzTe5Q.d.mts.map → config-DrfghTPe.d.mts.map} +1 -1
- package/dist/{content-ZHCc1ngN.mjs → content-CP-SeXNa.mjs} +5 -4
- package/dist/content-CP-SeXNa.mjs.map +1 -0
- package/dist/{content-list-query-wJ2WN8Vp.d.mts → content-list-query-BhejKVqb.d.mts} +1 -1
- package/dist/{content-list-query-wJ2WN8Vp.d.mts.map → content-list-query-BhejKVqb.d.mts.map} +1 -1
- package/dist/{content-refresh-B_8SJzuU.mjs → content-refresh-DLOfIhYc.mjs} +1094 -93
- package/dist/content-refresh-DLOfIhYc.mjs.map +1 -0
- package/dist/{media-usage-BZCydfvu.mjs → content-repair-BCxzy0r4.mjs} +5 -196
- package/dist/content-repair-BCxzy0r4.mjs.map +1 -0
- package/dist/{context-ZldbZcle.mjs → context-BR5hRWiK.mjs} +13 -13
- package/dist/{context-ZldbZcle.mjs.map → context-BR5hRWiK.mjs.map} +1 -1
- package/dist/{cron-Y9aLtgrA.mjs → cron-CWfWrWKG.mjs} +1 -1
- package/dist/{cron-Y9aLtgrA.mjs.map → cron-CWfWrWKG.mjs.map} +1 -1
- package/dist/{dashboard-DvHbk_cv.mjs → dashboard-CkIV2rnQ.mjs} +5 -5
- package/dist/{dashboard-DvHbk_cv.mjs.map → dashboard-CkIV2rnQ.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/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-YMEfcQUx.mjs} +1 -1
- package/dist/{default-DdDl3fxv.mjs.map → default-YMEfcQUx.mjs.map} +1 -1
- package/dist/{deferred-tasks-SDWxrgzJ.d.mts → deferred-tasks-DfqxH5Xf.d.mts} +1 -1
- package/dist/{deferred-tasks-SDWxrgzJ.d.mts.map → deferred-tasks-DfqxH5Xf.d.mts.map} +1 -1
- package/dist/{device-flow-C0GdD_z8.mjs → device-flow-CojjSBwb.mjs} +5 -5
- package/dist/{device-flow-C0GdD_z8.mjs.map → device-flow-CojjSBwb.mjs.map} +1 -1
- package/dist/{direct-executor-CDXeJCSs.mjs → direct-executor-BWeWiRYB.mjs} +3 -3
- package/dist/{direct-executor-CDXeJCSs.mjs.map → direct-executor-BWeWiRYB.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-CEJgR_LB.mjs} +1 -1
- package/dist/{email-console-BHNjIwiB.mjs.map → email-console-CEJgR_LB.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-D9w94fjV.mjs} +2 -2
- package/dist/{error-DupyJZE2.mjs.map → error-D9w94fjV.mjs.map} +1 -1
- package/dist/{errors-CLUPm7aD.mjs → errors-n2j49uNf.mjs} +22 -2
- package/dist/errors-n2j49uNf.mjs.map +1 -0
- package/dist/{escape-DUY2r2Zs.mjs → escape-DN4Qmjsl.mjs} +1 -1
- package/dist/{escape-DUY2r2Zs.mjs.map → escape-DN4Qmjsl.mjs.map} +1 -1
- package/dist/{field-defs-cache-BzwBlJrR.mjs → field-defs-cache-Bh4q6oar.mjs} +5 -5
- package/dist/{field-defs-cache-BzwBlJrR.mjs.map → field-defs-cache-Bh4q6oar.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-BhOdW0bi.mjs} +3 -3
- package/dist/{fts-manager-DyZEohZC.mjs.map → fts-manager-BhOdW0bi.mjs.map} +1 -1
- package/dist/{hash-Cg0TXJPV.mjs → hash-CTcngWvj.mjs} +1 -1
- package/dist/{hash-Cg0TXJPV.mjs.map → hash-CTcngWvj.mjs.map} +1 -1
- package/dist/{hreflang-DwT2E0Sa.d.mts → hreflang-7pTHsLZJ.d.mts} +2 -2
- package/dist/{hreflang-DwT2E0Sa.d.mts.map → hreflang-7pTHsLZJ.d.mts.map} +1 -1
- package/dist/{hreflang-BBe83kKa.mjs → hreflang-Huc6O5wa.mjs} +7 -7
- package/dist/{hreflang-BBe83kKa.mjs.map → hreflang-Huc6O5wa.mjs.map} +1 -1
- package/dist/{identity-Ys6Dlc9C.mjs → identity-DXmb4aVp.mjs} +3 -3
- package/dist/{identity-Ys6Dlc9C.mjs.map → identity-DXmb4aVp.mjs.map} +1 -1
- package/dist/{import-DPkLmeXO.mjs → import-C4_O3KXU.mjs} +5 -5
- package/dist/{import-DPkLmeXO.mjs.map → import-C4_O3KXU.mjs.map} +1 -1
- package/dist/{index-C9KuQyO-.d.mts → index-6bRee8zb.d.mts} +3 -3
- package/dist/{index-C9KuQyO-.d.mts.map → index-6bRee8zb.d.mts.map} +1 -1
- package/dist/{index-BVBZj4-7.d.mts → index-DWbJrsAg.d.mts} +128 -52
- package/dist/index-DWbJrsAg.d.mts.map +1 -0
- package/dist/index.d.mts +21 -21
- package/dist/index.mjs +78 -72
- 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-Bo7fZAbg.mjs} +2 -2
- package/dist/{load-YJ2xl3ra.mjs.map → load-Bo7fZAbg.mjs.map} +1 -1
- package/dist/{loader-CdG_Ci3H.mjs → loader-ZsjE4paL.mjs} +2 -2
- package/dist/{loader-CdG_Ci3H.mjs.map → loader-ZsjE4paL.mjs.map} +1 -1
- package/dist/{manifest-builder-B252yQUf.mjs → manifest-builder-QXuqvVMP.mjs} +2 -2
- package/dist/{manifest-builder-B252yQUf.mjs.map → manifest-builder-QXuqvVMP.mjs.map} +1 -1
- package/dist/{manifest-schema-BXbUAHod.mjs → manifest-schema-CUYPfCEH.mjs} +1 -1
- package/dist/{manifest-schema-BXbUAHod.mjs.map → manifest-schema-CUYPfCEH.mjs.map} +1 -1
- package/dist/media/image-endpoint.mjs +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 +11 -5
- package/dist/media/local-runtime.mjs.map +1 -1
- package/dist/{media-BWWWb8kg.mjs → media-BjwNuLEu.mjs} +100 -6
- package/dist/media-BjwNuLEu.mjs.map +1 -0
- package/dist/{media-CzhAn2--.mjs → media-D6SeAfBl.mjs} +41 -12
- package/dist/media-D6SeAfBl.mjs.map +1 -0
- package/dist/{media-allowlist-D6x-Us02.mjs → media-allowlist-D35v7bmL.mjs} +3 -2
- package/dist/media-allowlist-D35v7bmL.mjs.map +1 -0
- package/dist/media-folders-D-0CmRZj.mjs +210 -0
- package/dist/media-folders-D-0CmRZj.mjs.map +1 -0
- package/dist/{media-upload-CHBVn6m-.mjs → media-upload-C7bLXGcI.mjs} +9 -9
- package/dist/{media-upload-CHBVn6m-.mjs.map → media-upload-C7bLXGcI.mjs.map} +1 -1
- package/dist/{media-url-BvoX88FA.mjs → media-url-DH7giMx_.mjs} +1 -1
- package/dist/{media-url-BvoX88FA.mjs.map → media-url-DH7giMx_.mjs.map} +1 -1
- package/dist/media-usage-BTRJvS6V.mjs +1833 -0
- package/dist/media-usage-BTRJvS6V.mjs.map +1 -0
- package/dist/media-usage-activation-Dx0kPV6b.mjs +78 -0
- package/dist/media-usage-activation-Dx0kPV6b.mjs.map +1 -0
- package/dist/{media-usage-work-DrCbqBcl.mjs → media-usage-work-C-fhM30c.mjs} +221 -59
- package/dist/media-usage-work-C-fhM30c.mjs.map +1 -0
- package/dist/{media-usage-work-CLo_6tct.mjs → media-usage-work-DWb2XPMI.mjs} +4 -4
- package/dist/{media-usage-work-CLo_6tct.mjs.map → media-usage-work-DWb2XPMI.mjs.map} +1 -1
- package/dist/{media-usage-write-fence-aHEgN1zB.mjs → media-usage-write-fence-BwoJVRDC.mjs} +2 -2
- package/dist/{media-usage-write-fence-aHEgN1zB.mjs.map → media-usage-write-fence-BwoJVRDC.mjs.map} +1 -1
- package/dist/{menus-TCNSd2vp.mjs → menus-CD7EFLwz.mjs} +3 -3
- package/dist/{menus-TCNSd2vp.mjs.map → menus-CD7EFLwz.mjs.map} +1 -1
- package/dist/{menus-DSo5QeW0.mjs → menus-CNg0QlDt.mjs} +42 -26
- package/dist/menus-CNg0QlDt.mjs.map +1 -0
- 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-DaUM_MB2.mjs} +1 -1
- package/dist/{mode-BDoH_WcF.mjs.map → mode-DaUM_MB2.mjs.map} +1 -1
- package/dist/node-sqlite-compat-Udb4Y-rs.mjs +46 -0
- package/dist/node-sqlite-compat-Udb4Y-rs.mjs.map +1 -0
- package/dist/{normalize-Bc-s_r-a.mjs → normalize-CSxdKBVa.mjs} +22 -1
- package/dist/normalize-CSxdKBVa.mjs.map +1 -0
- package/dist/{oauth-authorization-iOikmrJd.mjs → oauth-authorization-Dpsb-fMJ.mjs} +5 -5
- package/dist/{oauth-authorization-iOikmrJd.mjs.map → oauth-authorization-Dpsb-fMJ.mjs.map} +1 -1
- package/dist/{oauth-clients-CvI0nHMJ.mjs → oauth-clients-Bxnoe_67.mjs} +1 -1
- package/dist/{oauth-clients-CvI0nHMJ.mjs.map → oauth-clients-Bxnoe_67.mjs.map} +1 -1
- package/dist/{oauth-state-store-Ba8KZlwW.mjs → oauth-state-store-0C4s0K6w.mjs} +1 -1
- package/dist/{oauth-state-store-Ba8KZlwW.mjs.map → oauth-state-store-0C4s0K6w.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-C5SQwGYC.mjs → oauth-user-lookup-wlGYSeqX.mjs} +1 -1
- package/dist/{oauth-user-lookup-C5SQwGYC.mjs.map → oauth-user-lookup-wlGYSeqX.mjs.map} +1 -1
- package/dist/object-cache/memory.d.mts +1 -1
- 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-BhZIeFY1.d.mts} +3 -3
- package/dist/{options--hhz-jZ1.d.mts.map → options-BhZIeFY1.d.mts.map} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-DFbuc-Fh.mjs → parse-BRJg1kz8.mjs} +2 -2
- package/dist/{parse-DFbuc-Fh.mjs.map → parse-BRJg1kz8.mjs.map} +1 -1
- package/dist/{passkey-config-DFAmUyuE.mjs → passkey-config-B3P0nHRR.mjs} +1 -1
- package/dist/{passkey-config-DFAmUyuE.mjs.map → passkey-config-B3P0nHRR.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-BR4ZhVJl.d.mts} +7 -1
- package/dist/placeholder-BR4ZhVJl.d.mts.map +1 -0
- package/dist/plugin-types.d.mts +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-BVRganJQ.mjs} +2 -2
- package/dist/{policy-TluUIxuu.mjs.map → policy-BVRganJQ.mjs.map} +1 -1
- package/dist/{portable-text-imBW5cHK.mjs → portable-text-C8Tvp4_g.mjs} +1 -1
- package/dist/{portable-text-imBW5cHK.mjs.map → portable-text-C8Tvp4_g.mjs.map} +1 -1
- package/dist/{preview-PW-nOnq4.mjs → preview-dn2dUyM0.mjs} +2 -2
- package/dist/{preview-PW-nOnq4.mjs.map → preview-dn2dUyM0.mjs.map} +1 -1
- package/dist/{protocol-DjsJHTlK.d.mts → protocol-CuBEsqgE.d.mts} +2 -2
- package/dist/{protocol-DjsJHTlK.d.mts.map → protocol-CuBEsqgE.d.mts.map} +1 -1
- package/dist/{public-url-CWoFhQT8.mjs → public-url-DRz_AinV.mjs} +1 -1
- package/dist/{public-url-CWoFhQT8.mjs.map → public-url-DRz_AinV.mjs.map} +1 -1
- package/dist/{query-zTVAR1Sl.mjs → query-D18vTdha.mjs} +14 -14
- package/dist/{query-zTVAR1Sl.mjs.map → query-D18vTdha.mjs.map} +1 -1
- package/dist/{query-BWs7O5Il.mjs → query-tZDEdtCN.mjs} +4 -4
- package/dist/{query-BWs7O5Il.mjs.map → query-tZDEdtCN.mjs.map} +1 -1
- package/dist/{rate-limit-Bx4g9m3p.mjs → rate-limit-on7KPo-v.mjs} +2 -2
- package/dist/{rate-limit-Bx4g9m3p.mjs.map → rate-limit-on7KPo-v.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-DrbEmU9a.mjs} +1 -1
- package/dist/{redirect-BgAOGHDq.mjs.map → redirect-DrbEmU9a.mjs.map} +1 -1
- package/dist/{redirects-DyChwDkG.mjs → redirects-BahWiu8Z.mjs} +5 -5
- package/dist/{redirects-DyChwDkG.mjs.map → redirects-BahWiu8Z.mjs.map} +1 -1
- package/dist/{redirects-DTDHWH31.mjs → redirects-CRIM55KH.mjs} +6 -6
- package/dist/{redirects-DTDHWH31.mjs.map → redirects-CRIM55KH.mjs.map} +1 -1
- package/dist/{api-BeBglVxU.mjs → registry-BiO5WwPq.mjs} +483 -2462
- package/dist/registry-BiO5WwPq.mjs.map +1 -0
- package/dist/{registry-Cqa2I749.mjs → registry-Cx-jEJOS.mjs} +9 -123
- package/dist/registry-Cx-jEJOS.mjs.map +1 -0
- package/dist/{relation-BnHB0T4J.mjs → relation-A6wLF_DS.mjs} +2 -2
- package/dist/{relation-BnHB0T4J.mjs.map → relation-A6wLF_DS.mjs.map} +1 -1
- package/dist/{relations-BBApI4e2.mjs → relations-BTPM2saV.mjs} +2 -2
- package/dist/{relations-BBApI4e2.mjs.map → relations-BTPM2saV.mjs.map} +1 -1
- package/dist/{relations-BHo5A8Zf.d.mts → relations-C7B46bcU.d.mts} +192 -33
- package/dist/relations-C7B46bcU.d.mts.map +1 -0
- package/dist/{relations-D5sM5fW0.mjs → relations-Cj5hZ6Zg.mjs} +4 -4
- package/dist/{relations-D5sM5fW0.mjs.map → relations-Cj5hZ6Zg.mjs.map} +1 -1
- 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-DRp5ENd_.mjs} +2 -2
- package/dist/{request-meta-DgZJh3zG.mjs.map → request-meta-DRp5ENd_.mjs.map} +1 -1
- package/dist/{resolve-DOhVEvty.mjs → resolve-DxUpTMmE.mjs} +1 -1
- package/dist/{resolve-DOhVEvty.mjs.map → resolve-DxUpTMmE.mjs.map} +1 -1
- package/dist/{runner-C1T11CfC.mjs → runner-77GOZCnH.mjs} +410 -286
- package/dist/runner-77GOZCnH.mjs.map +1 -0
- package/dist/{runner-BYHZn3Jy.d.mts → runner-zgqA_CqP.d.mts} +2 -2
- package/dist/{runner-BYHZn3Jy.d.mts.map → runner-zgqA_CqP.d.mts.map} +1 -1
- package/dist/runtime.d.mts +11 -11
- package/dist/runtime.mjs +1 -1
- package/dist/{schema-DZ5YVVZj.mjs → schema-BY-oVntF.mjs} +3 -3
- package/dist/{schema-DZ5YVVZj.mjs.map → schema-BY-oVntF.mjs.map} +1 -1
- package/dist/{schema-2AOsSn2v.mjs → schema-Cw9kVK0I.mjs} +35 -5
- package/dist/{schema-2AOsSn2v.mjs.map → schema-Cw9kVK0I.mjs.map} +1 -1
- package/dist/{scopes-8ClPF2bC.mjs → scopes-vMR1uIbt.mjs} +3 -3
- package/dist/{scopes-8ClPF2bC.mjs.map → scopes-vMR1uIbt.mjs.map} +1 -1
- package/dist/{search-u1QYdOCG.mjs → search-CfT3KxO5.mjs} +4 -4
- package/dist/{search-u1QYdOCG.mjs.map → search-CfT3KxO5.mjs.map} +1 -1
- package/dist/{secrets-BEgsAQEU.mjs → secrets-BH2Qow1-.mjs} +3 -3
- package/dist/{secrets-BEgsAQEU.mjs.map → secrets-BH2Qow1-.mjs.map} +1 -1
- package/dist/{sections-DmHviGyM.mjs → sections-DTfjyf1z.mjs} +2 -2
- package/dist/{sections-DmHviGyM.mjs.map → sections-DTfjyf1z.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +24 -22
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +16 -14
- package/dist/seo/index.mjs.map +1 -1
- package/dist/{seo-AFpVvTqr.mjs → seo-BSiTIXzd.mjs} +1 -1
- package/dist/{seo-AFpVvTqr.mjs.map → seo-BSiTIXzd.mjs.map} +1 -1
- package/dist/{seo-Dq4G-RrO.mjs → seo-Cm-dtvgk.mjs} +2 -2
- package/dist/{seo-Dq4G-RrO.mjs.map → seo-Cm-dtvgk.mjs.map} +1 -1
- package/dist/{service-BpArayPr.mjs → service-DYsDHEKe.mjs} +3 -3
- package/dist/{service-BpArayPr.mjs.map → service-DYsDHEKe.mjs.map} +1 -1
- package/dist/{session-user-BEorKVT-.mjs → session-user-CNAfvsdw.mjs} +1 -1
- package/dist/{session-user-BEorKVT-.mjs.map → session-user-CNAfvsdw.mjs.map} +1 -1
- package/dist/{settings-xRdoUZr0.mjs → settings-BgN-0DT-.mjs} +6 -6
- package/dist/{settings-xRdoUZr0.mjs.map → settings-BgN-0DT-.mjs.map} +1 -1
- package/dist/{settings-DE9xtzqd.mjs → settings-DjtkUo__.mjs} +3 -3
- package/dist/{settings-DE9xtzqd.mjs.map → settings-DjtkUo__.mjs.map} +1 -1
- package/dist/{setup-complete-BnT8pq_C.mjs → setup-complete-CcpXaPU7.mjs} +2 -2
- package/dist/{setup-complete-BnT8pq_C.mjs.map → setup-complete-CcpXaPU7.mjs.map} +1 -1
- package/dist/{setup-nonce-CBitf_oQ.mjs → setup-nonce-Reyw30jg.mjs} +1 -1
- package/dist/{setup-nonce-CBitf_oQ.mjs.map → setup-nonce-Reyw30jg.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-Cs_V9n3V.mjs} +3 -3
- package/dist/{site-url-DjpIXMXJ.mjs.map → site-url-Cs_V9n3V.mjs.map} +1 -1
- package/dist/{snapshot-BBlGkb2q.mjs → snapshot-DSB8P7Lm.mjs} +1 -1
- package/dist/{snapshot-BBlGkb2q.mjs.map → snapshot-DSB8P7Lm.mjs.map} +1 -1
- package/dist/{ssrf-Cpvg_n3A.mjs → ssrf-DqebVE34.mjs} +21 -5
- package/dist/{ssrf-Cpvg_n3A.mjs.map → ssrf-DqebVE34.mjs.map} +1 -1
- package/dist/{state-DYwPue40.mjs → state-BJfU9Uzw.mjs} +12 -4
- package/dist/state-BJfU9Uzw.mjs.map +1 -0
- package/dist/{status-CWVYpbD8.mjs → status-DDu8HIQl.mjs} +1 -1
- package/dist/{status-CWVYpbD8.mjs.map → status-DDu8HIQl.mjs.map} +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/{target-DixqqV5i.mjs → target-D0o26Azo.mjs} +1 -1
- package/dist/{target-DixqqV5i.mjs.map → target-D0o26Azo.mjs.map} +1 -1
- package/dist/{taxonomies-OHUIiIpI.mjs → taxonomies-CPGxo-bn.mjs} +5 -5
- package/dist/{taxonomies-OHUIiIpI.mjs.map → taxonomies-CPGxo-bn.mjs.map} +1 -1
- package/dist/{taxonomies-BlrncHi9.mjs → taxonomies-kmyudNGP.mjs} +7 -7
- package/dist/{taxonomies-BlrncHi9.mjs.map → taxonomies-kmyudNGP.mjs.map} +1 -1
- package/dist/{taxonomy-BqCZ1TdU.mjs → taxonomy-8X09dLN5.mjs} +4 -4
- package/dist/{taxonomy-BqCZ1TdU.mjs.map → taxonomy-8X09dLN5.mjs.map} +1 -1
- package/dist/{tokens-C39klX8R.mjs → tokens-gTS-IVUp.mjs} +1 -1
- package/dist/{tokens-C39klX8R.mjs.map → tokens-gTS-IVUp.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-RQE36APG.d.mts → transport-_6R1ub7t.d.mts} +1 -1
- package/dist/{transport-RQE36APG.d.mts.map → transport-_6R1ub7t.d.mts.map} +1 -1
- package/dist/{transport-DBJwa-Si.mjs → transport-fX59xaJz.mjs} +4 -3
- package/dist/{transport-DBJwa-Si.mjs.map → transport-fX59xaJz.mjs.map} +1 -1
- package/dist/{trusted-proxy-CEVekpby.mjs → trusted-proxy-fe6nEgR4.mjs} +1 -1
- package/dist/{trusted-proxy-CEVekpby.mjs.map → trusted-proxy-fe6nEgR4.mjs.map} +1 -1
- package/dist/types-75KIqzL9.mjs.map +1 -1
- package/dist/{types-BW1syrlw.mjs → types-BXUmsINL.mjs} +1 -1
- package/dist/{types-BW1syrlw.mjs.map → types-BXUmsINL.mjs.map} +1 -1
- package/dist/{types-BntycPTF.d.mts → types-Blb-MRC3.d.mts} +1 -1
- package/dist/{types-BntycPTF.d.mts.map → types-Blb-MRC3.d.mts.map} +1 -1
- package/dist/{types-C2pMvO62.d.mts → types-Br-ERaxh.d.mts} +2 -1
- package/dist/types-Br-ERaxh.d.mts.map +1 -0
- package/dist/{types-DWRhk9xZ.d.mts → types-BzBd3PeX.d.mts} +1 -1
- package/dist/{types-DWRhk9xZ.d.mts.map → types-BzBd3PeX.d.mts.map} +1 -1
- package/dist/{types-CXnOzDe1.d.mts → types-CLqvnd05.d.mts} +1 -1
- package/dist/{types-CXnOzDe1.d.mts.map → types-CLqvnd05.d.mts.map} +1 -1
- package/dist/{types-Dfk8KI5R.d.mts → types-D5VVLr7J.d.mts} +1 -1
- package/dist/{types-Dfk8KI5R.d.mts.map → types-D5VVLr7J.d.mts.map} +1 -1
- package/dist/{types-DQIDRKF2.d.mts → types-DHxzBjbD.d.mts} +10 -1
- package/dist/types-DHxzBjbD.d.mts.map +1 -0
- package/dist/{types-DN64_zzZ.d.mts → types-DJQxln7q.d.mts} +3 -3
- package/dist/{types-DN64_zzZ.d.mts.map → types-DJQxln7q.d.mts.map} +1 -1
- 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-BcqdcT-r.d.mts → types-D_DWe7k9.d.mts} +1 -1
- package/dist/{types-BcqdcT-r.d.mts.map → types-D_DWe7k9.d.mts.map} +1 -1
- package/dist/{types-DrJrVCT1.d.mts → types-Vg6f5i3s.d.mts} +3 -3
- package/dist/{types-DrJrVCT1.d.mts.map → types-Vg6f5i3s.d.mts.map} +1 -1
- package/dist/{upload-attempts-D4FS8LT6.mjs → upload-attempts-CNyGSepg.mjs} +1 -1
- package/dist/{upload-attempts-D4FS8LT6.mjs.map → upload-attempts-CNyGSepg.mjs.map} +1 -1
- package/dist/{url-pattern-BHS0V5Ng.mjs → url-pattern-K-KdXcSe.mjs} +1 -1
- package/dist/{url-pattern-BHS0V5Ng.mjs.map → url-pattern-K-KdXcSe.mjs.map} +1 -1
- package/dist/{user-DJZfUJVE.mjs → user-CtYY0tp2.mjs} +2 -2
- package/dist/{user-DJZfUJVE.mjs.map → user-CtYY0tp2.mjs.map} +1 -1
- package/dist/{utils-D4vD_Y98.mjs → utils-HztC73hq.mjs} +1 -1
- package/dist/{utils-D4vD_Y98.mjs.map → utils-HztC73hq.mjs.map} +1 -1
- package/dist/{validate-BMLBvxOC.mjs → validate-Dd-IUjnZ.mjs} +2 -2
- package/dist/{validate-BMLBvxOC.mjs.map → validate-Dd-IUjnZ.mjs.map} +1 -1
- package/dist/{validate-CTqt5nuE.d.mts → validate-DlqdOZXB.d.mts} +5 -5
- package/dist/{validate-CTqt5nuE.d.mts.map → validate-DlqdOZXB.d.mts.map} +1 -1
- package/dist/{validation-npvENUCB.mjs → validation-D83n7Npi.mjs} +10 -8
- package/dist/{validation-npvENUCB.mjs.map → validation-D83n7Npi.mjs.map} +1 -1
- package/dist/version-ri-sCyAp.mjs +7 -0
- package/dist/{version-DB_fqCSI.mjs.map → version-ri-sCyAp.mjs.map} +1 -1
- package/dist/{widgets-BD3ho7Rq.mjs → widgets-CpmZd9Q-.mjs} +4 -4
- package/dist/{widgets-BD3ho7Rq.mjs.map → widgets-CpmZd9Q-.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-Ca68766D.d.mts → wxr-taxonomies-BFd0y72_.d.mts} +1 -1
- package/dist/{wxr-taxonomies-Ca68766D.d.mts.map → wxr-taxonomies-BFd0y72_.d.mts.map} +1 -1
- package/dist/{wxr-taxonomies-B1R3vBoD.mjs → wxr-taxonomies-Df4vxWcU.mjs} +4 -4
- package/dist/{wxr-taxonomies-B1R3vBoD.mjs.map → wxr-taxonomies-Df4vxWcU.mjs.map} +1 -1
- package/dist/{zod-generator-LC-on_Vb.mjs → zod-generator-DylzusHh.mjs} +24 -18
- package/dist/zod-generator-DylzusHh.mjs.map +1 -0
- package/package.json +16 -8
- package/src/api/errors.ts +20 -0
- package/src/api/handlers/index.ts +17 -0
- 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 +62 -2
- package/src/api/handlers/registry.ts +134 -316
- package/src/api/openapi/document.ts +192 -2
- package/src/api/schemas/media-usage.ts +77 -0
- package/src/api/schemas/media.ts +69 -0
- package/src/astro/integration/routes.ts +18 -0
- package/src/astro/integration/vite-config.ts +2 -7
- package/src/astro/middleware/auth.ts +4 -0
- package/src/astro/middleware.ts +0 -7
- 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/plugins/registry/artifact.ts +246 -96
- package/src/astro/routes/api/auth/me.ts +14 -2
- package/src/astro/routes/api/media/[id].ts +3 -0
- 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.ts +12 -2
- package/src/astro/routes/api/setup/dev-bypass.ts +12 -0
- package/src/astro/types.ts +11 -1
- package/src/client/index.ts +140 -2
- package/src/client/transport.ts +6 -2
- package/src/components/EmDashImage.astro +154 -50
- package/src/components/Gallery.astro +7 -0
- package/src/components/InlinePortableTextEditor.tsx +130 -1
- package/src/components/LiveSearch.astro +23 -0
- package/src/components/inline-code-block.tsx +180 -49
- package/src/content/converters/gallery.ts +2 -0
- package/src/content/converters/types.ts +2 -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/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/runner.ts +8 -2
- package/src/database/repositories/content.ts +5 -4
- 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 +1038 -10
- package/src/database/repositories/media.ts +97 -29
- package/src/database/transaction.ts +1 -0
- package/src/database/types.ts +13 -0
- package/src/db/adapters.ts +2 -2
- package/src/db/node-sqlite-compat.ts +78 -0
- package/src/db/sqlite.ts +3 -3
- package/src/emdash-runtime.ts +110 -105
- package/src/fields/image.ts +7 -1
- package/src/fields/types.ts +6 -2
- package/src/index.ts +5 -0
- package/src/media/focal-point.ts +37 -0
- package/src/media/local-runtime.ts +8 -0
- package/src/media/mime.ts +1 -0
- package/src/media/normalize.ts +10 -0
- 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/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/plugins/index.ts +1 -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/registry/artifact-fetch.ts +530 -0
- package/src/registry/config.ts +24 -6
- package/src/registry/types.ts +12 -15
- package/src/schema/types.ts +1 -0
- package/src/schema/zod-generator.ts +12 -4
- package/src/security/ssrf.ts +21 -2
- package/src/seed/apply.ts +4 -4
- package/src/ui.ts +2 -0
- package/dist/api-BeBglVxU.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/errors-CLUPm7aD.mjs.map +0 -1
- package/dist/index-BVBZj4-7.d.mts.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/placeholder-Dp0K3RkD.d.mts.map +0 -1
- package/dist/registry-Cqa2I749.mjs.map +0 -1
- package/dist/relations-BHo5A8Zf.d.mts.map +0 -1
- package/dist/runner-C1T11CfC.mjs.map +0 -1
- package/dist/state-DYwPue40.mjs.map +0 -1
- package/dist/types-C2pMvO62.d.mts.map +0 -1
- package/dist/types-DQIDRKF2.d.mts.map +0 -1
- package/dist/version-DB_fqCSI.mjs +0 -7
- package/dist/zod-generator-LC-on_Vb.mjs.map +0 -1
- /package/dist/{api-tokens-rIXC6LdE.mjs → api-tokens-B5NHLNUN.mjs} +0 -0
- /package/dist/{ssrf-DpXgKsna.mjs → ssrf-BPKzkm6O.mjs} +0 -0
- /package/dist/{types-CP1CflWf.mjs → types-D6OcIp2P.mjs} +0 -0
|
@@ -527,9 +527,10 @@ function convertPTBlock(block: PTBlock): PMNode | null {
|
|
|
527
527
|
}
|
|
528
528
|
if (block._type === "code") {
|
|
529
529
|
const cb = block as PTBlock & { code?: string; language?: string };
|
|
530
|
+
const language = typeof cb.language === "string" && cb.language.length > 0 ? cb.language : null;
|
|
530
531
|
return {
|
|
531
532
|
type: "codeBlock",
|
|
532
|
-
attrs: { language
|
|
533
|
+
attrs: { language },
|
|
533
534
|
content: cb.code ? [{ type: "text", text: cb.code }] : undefined,
|
|
534
535
|
};
|
|
535
536
|
}
|
|
@@ -2242,6 +2243,8 @@ export function InlinePortableTextEditor({
|
|
|
2242
2243
|
if (mediaPickerOpen) return;
|
|
2243
2244
|
const related = e.relatedTarget instanceof HTMLElement ? e.relatedTarget : null;
|
|
2244
2245
|
if (related && e.currentTarget.contains(related)) return;
|
|
2246
|
+
// The copy fallback briefly moves focus to its textarea before restoring the editor.
|
|
2247
|
+
if (related?.hasAttribute("data-emdash-clipboard-fallback")) return;
|
|
2245
2248
|
// Don't save if focus moved to the slash menu (portalled to body)
|
|
2246
2249
|
if (related?.closest(".emdash-slash-menu")) return;
|
|
2247
2250
|
if (related?.closest(".emdash-media-picker")) return;
|
|
@@ -2283,6 +2286,132 @@ export function InlinePortableTextEditor({
|
|
|
2283
2286
|
onSelect={handleMediaSelect}
|
|
2284
2287
|
/>
|
|
2285
2288
|
<style>{`
|
|
2289
|
+
.emdash-inline-code-block {
|
|
2290
|
+
position: relative;
|
|
2291
|
+
margin-block: 1rem;
|
|
2292
|
+
--emdash-code-background: var(--emdash-inline-code-background, #f7f7f5);
|
|
2293
|
+
--emdash-code-foreground: var(--emdash-inline-code-foreground, #24292f);
|
|
2294
|
+
--emdash-code-muted: var(--emdash-inline-code-muted, #57606a);
|
|
2295
|
+
--emdash-code-keyword: var(--emdash-inline-code-keyword, #b8172a);
|
|
2296
|
+
--emdash-code-string: var(--emdash-inline-code-string, #0a3069);
|
|
2297
|
+
--emdash-code-number: var(--emdash-inline-code-number, #0550ae);
|
|
2298
|
+
--emdash-code-title: var(--emdash-inline-code-title, #7545c7);
|
|
2299
|
+
--emdash-code-border: var(--emdash-inline-code-border, #7d8590);
|
|
2300
|
+
--emdash-code-control-background: var(
|
|
2301
|
+
--emdash-inline-code-control-background,
|
|
2302
|
+
var(--emdash-inline-bg, #ffffff)
|
|
2303
|
+
);
|
|
2304
|
+
--emdash-code-control-foreground: var(
|
|
2305
|
+
--emdash-inline-code-control-foreground,
|
|
2306
|
+
#24292f
|
|
2307
|
+
);
|
|
2308
|
+
--emdash-code-focus: var(--emdash-inline-code-focus, #0550ae);
|
|
2309
|
+
}
|
|
2310
|
+
.emdash-inline-code-block .emdash-code-block {
|
|
2311
|
+
margin: 0;
|
|
2312
|
+
padding: 1rem;
|
|
2313
|
+
padding-block: 30px !important;
|
|
2314
|
+
border: 0 !important;
|
|
2315
|
+
border-radius: 0.5rem;
|
|
2316
|
+
background: var(--emdash-code-background) !important;
|
|
2317
|
+
color: var(--emdash-code-foreground) !important;
|
|
2318
|
+
caret-color: var(--emdash-code-foreground) !important;
|
|
2319
|
+
overflow-x: auto;
|
|
2320
|
+
}
|
|
2321
|
+
.emdash-inline-code-block .emdash-code-block code {
|
|
2322
|
+
background: transparent !important;
|
|
2323
|
+
color: inherit !important;
|
|
2324
|
+
font-size: 13px !important;
|
|
2325
|
+
}
|
|
2326
|
+
.emdash-inline-code-block :is(.hljs-comment, .hljs-quote) {
|
|
2327
|
+
color: var(--emdash-code-muted);
|
|
2328
|
+
}
|
|
2329
|
+
.emdash-inline-code-block
|
|
2330
|
+
:is(.hljs-keyword, .hljs-literal, .hljs-selector-tag, .hljs-section, .hljs-link, .hljs-deletion) {
|
|
2331
|
+
color: var(--emdash-code-keyword);
|
|
2332
|
+
}
|
|
2333
|
+
.emdash-inline-code-block
|
|
2334
|
+
:is(.hljs-string, .hljs-attr, .hljs-attribute, .hljs-symbol, .hljs-bullet, .hljs-addition) {
|
|
2335
|
+
color: var(--emdash-code-string);
|
|
2336
|
+
}
|
|
2337
|
+
.emdash-inline-code-block :is(.hljs-number, .hljs-meta) {
|
|
2338
|
+
color: var(--emdash-code-number);
|
|
2339
|
+
}
|
|
2340
|
+
.emdash-inline-code-block
|
|
2341
|
+
:is(.hljs-title, .hljs-name, .hljs-type, .hljs-built_in, .hljs-selector-id, .hljs-selector-class) {
|
|
2342
|
+
color: var(--emdash-code-title);
|
|
2343
|
+
}
|
|
2344
|
+
.emdash-inline-code-block-popover,
|
|
2345
|
+
.emdash-inline-code-block-chip {
|
|
2346
|
+
box-sizing: border-box;
|
|
2347
|
+
border: 1px solid var(--emdash-code-border);
|
|
2348
|
+
background: var(--emdash-code-control-background);
|
|
2349
|
+
color: var(--emdash-code-control-foreground);
|
|
2350
|
+
}
|
|
2351
|
+
.emdash-inline-code-block-controls-wrap {
|
|
2352
|
+
position: absolute;
|
|
2353
|
+
inset-block-start: 0;
|
|
2354
|
+
inset-inline-end: 0.25rem;
|
|
2355
|
+
z-index: 100;
|
|
2356
|
+
max-inline-size: min(calc(100% - 0.25rem), calc(100vw - 1rem));
|
|
2357
|
+
opacity: 0;
|
|
2358
|
+
pointer-events: none;
|
|
2359
|
+
user-select: none;
|
|
2360
|
+
transition: opacity 120ms ease-out;
|
|
2361
|
+
}
|
|
2362
|
+
.emdash-inline-code-block:hover .emdash-inline-code-block-controls-wrap,
|
|
2363
|
+
.emdash-inline-code-block:focus-within .emdash-inline-code-block-controls-wrap,
|
|
2364
|
+
.emdash-inline-code-block-controls-wrap[data-persistent="true"] {
|
|
2365
|
+
opacity: 1;
|
|
2366
|
+
pointer-events: auto;
|
|
2367
|
+
}
|
|
2368
|
+
.emdash-inline-code-block-popover {
|
|
2369
|
+
inline-size: min(14rem, 100%, calc(100vw - 1rem));
|
|
2370
|
+
}
|
|
2371
|
+
.emdash-inline-code-block-language-input {
|
|
2372
|
+
min-inline-size: 0;
|
|
2373
|
+
flex: 1;
|
|
2374
|
+
border: 1px solid var(--emdash-code-border);
|
|
2375
|
+
background: transparent;
|
|
2376
|
+
color: inherit;
|
|
2377
|
+
}
|
|
2378
|
+
.emdash-inline-code-block-controls-wrap button:focus-visible,
|
|
2379
|
+
.emdash-inline-code-block-language-input:focus-visible {
|
|
2380
|
+
outline: 2px solid var(--emdash-code-focus);
|
|
2381
|
+
outline-offset: 2px;
|
|
2382
|
+
}
|
|
2383
|
+
@media (hover: none), (pointer: coarse) {
|
|
2384
|
+
.emdash-inline-code-block-controls-wrap {
|
|
2385
|
+
opacity: 1;
|
|
2386
|
+
pointer-events: auto;
|
|
2387
|
+
}
|
|
2388
|
+
}
|
|
2389
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2390
|
+
.emdash-inline-code-block-controls-wrap {
|
|
2391
|
+
transition: none;
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
@media (prefers-color-scheme: dark) {
|
|
2395
|
+
.emdash-inline-code-block {
|
|
2396
|
+
--emdash-code-background: var(--emdash-inline-code-background, #202020);
|
|
2397
|
+
--emdash-code-foreground: var(--emdash-inline-code-foreground, #f0f3f6);
|
|
2398
|
+
--emdash-code-muted: var(--emdash-inline-code-muted, #c9d1d9);
|
|
2399
|
+
--emdash-code-keyword: var(--emdash-inline-code-keyword, #ffc1bb);
|
|
2400
|
+
--emdash-code-string: var(--emdash-inline-code-string, #b9ddff);
|
|
2401
|
+
--emdash-code-number: var(--emdash-inline-code-number, #a8d5ff);
|
|
2402
|
+
--emdash-code-title: var(--emdash-inline-code-title, #e5ccff);
|
|
2403
|
+
--emdash-code-border: var(--emdash-inline-code-border, #6e7681);
|
|
2404
|
+
--emdash-code-control-background: var(
|
|
2405
|
+
--emdash-inline-code-control-background,
|
|
2406
|
+
var(--emdash-inline-bg, #161b22)
|
|
2407
|
+
);
|
|
2408
|
+
--emdash-code-control-foreground: var(
|
|
2409
|
+
--emdash-inline-code-control-foreground,
|
|
2410
|
+
#f0f3f6
|
|
2411
|
+
);
|
|
2412
|
+
--emdash-code-focus: var(--emdash-inline-code-focus, #a8d5ff);
|
|
2413
|
+
}
|
|
2414
|
+
}
|
|
2286
2415
|
.emdash-bubble-menu {
|
|
2287
2416
|
z-index: 100;
|
|
2288
2417
|
display: flex;
|
|
@@ -9,6 +9,15 @@
|
|
|
9
9
|
* <LiveSearch placeholder="Search articles..." collections={["posts", "pages"]} />
|
|
10
10
|
* ```
|
|
11
11
|
*
|
|
12
|
+
* Results are scoped to the page's locale, taken from `Astro.currentLocale`,
|
|
13
|
+
* so a translated site returns each entry once, in the language of the page
|
|
14
|
+
* the visitor searched from. Pass `locale` to override that, or `null` to
|
|
15
|
+
* search across every locale:
|
|
16
|
+
*
|
|
17
|
+
* ```astro
|
|
18
|
+
* <LiveSearch collections={["posts", "pages"]} locale={null} />
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
12
21
|
* Customize the result rendering with slots:
|
|
13
22
|
*
|
|
14
23
|
* ```astro
|
|
@@ -26,6 +35,12 @@ export interface Props {
|
|
|
26
35
|
placeholder?: string;
|
|
27
36
|
/** Collections to search (defaults to all searchable collections) */
|
|
28
37
|
collections?: string[];
|
|
38
|
+
/**
|
|
39
|
+
* Locale to restrict results to. Defaults to `Astro.currentLocale`, which
|
|
40
|
+
* Astro derives from the URL, so results match the page the search was
|
|
41
|
+
* made from. Pass `null` to search across every locale.
|
|
42
|
+
*/
|
|
43
|
+
locale?: string | null;
|
|
29
44
|
/** Minimum characters before searching (defaults to 2) */
|
|
30
45
|
minChars?: number;
|
|
31
46
|
/** Debounce delay in milliseconds (defaults to 300) */
|
|
@@ -59,6 +74,7 @@ export interface Props {
|
|
|
59
74
|
const {
|
|
60
75
|
placeholder = "Search...",
|
|
61
76
|
collections,
|
|
77
|
+
locale = Astro.currentLocale ?? null,
|
|
62
78
|
minChars = 2,
|
|
63
79
|
debounce = 300,
|
|
64
80
|
limit = 10,
|
|
@@ -77,6 +93,7 @@ const {
|
|
|
77
93
|
|
|
78
94
|
const config = {
|
|
79
95
|
collections: collections?.join(",") ?? "",
|
|
96
|
+
locale: locale ?? "",
|
|
80
97
|
minChars,
|
|
81
98
|
debounce,
|
|
82
99
|
limit,
|
|
@@ -145,6 +162,7 @@ const config = {
|
|
|
145
162
|
|
|
146
163
|
interface Config {
|
|
147
164
|
collections: string;
|
|
165
|
+
locale: string;
|
|
148
166
|
minChars: number;
|
|
149
167
|
debounce: number;
|
|
150
168
|
limit: number;
|
|
@@ -164,6 +182,7 @@ const config = {
|
|
|
164
182
|
private template: HTMLTemplateElement | null = null;
|
|
165
183
|
private config: Config = {
|
|
166
184
|
collections: "",
|
|
185
|
+
locale: "",
|
|
167
186
|
minChars: 2,
|
|
168
187
|
debounce: 300,
|
|
169
188
|
limit: 10,
|
|
@@ -364,6 +383,10 @@ const config = {
|
|
|
364
383
|
params.set("collections", this.config.collections);
|
|
365
384
|
}
|
|
366
385
|
|
|
386
|
+
if (this.config.locale) {
|
|
387
|
+
params.set("locale", this.config.locale);
|
|
388
|
+
}
|
|
389
|
+
|
|
367
390
|
const response = await fetch(`${endpoint}?${params}`, {
|
|
368
391
|
signal: this.abortController.signal,
|
|
369
392
|
});
|
|
@@ -2,20 +2,49 @@
|
|
|
2
2
|
* Code block node view for the inline (visual editing) Portable Text editor.
|
|
3
3
|
*
|
|
4
4
|
* Mirrors the admin editor's `CodeBlockNode` but with no Kumo/Lingui deps,
|
|
5
|
-
* so it can ship as part of the SSR runtime. Wraps the
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* so it can ship as part of the SSR runtime. Wraps the Lowlight code block and
|
|
6
|
+
* overlays a small inline language picker in the top-right corner of each code
|
|
7
|
+
* block.
|
|
8
8
|
*
|
|
9
9
|
* Keep the language list in sync with
|
|
10
10
|
* `packages/admin/src/components/editor/codeBlockLanguages.ts`. Duplicated
|
|
11
11
|
* here so packages/core stays independent of the admin package.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import
|
|
14
|
+
import { CodeBlockLowlight } from "@tiptap/extension-code-block-lowlight";
|
|
15
15
|
import type { NodeViewProps } from "@tiptap/react";
|
|
16
16
|
import { NodeViewContent, NodeViewWrapper, ReactNodeViewRenderer } from "@tiptap/react";
|
|
17
|
+
import dockerfile from "highlight.js/lib/languages/dockerfile";
|
|
18
|
+
import { common, createLowlight } from "lowlight";
|
|
17
19
|
import * as React from "react";
|
|
18
20
|
|
|
21
|
+
const INLINE_CODE_BLOCK_LOWLIGHT_KEY = Symbol.for("emdash:inline-code-block-lowlight");
|
|
22
|
+
const globalStore = globalThis as Record<symbol, unknown>;
|
|
23
|
+
const lowlight =
|
|
24
|
+
// eslint-disable-next-line typescript/no-unsafe-type-assertion -- globalThis singleton pattern
|
|
25
|
+
(globalStore[INLINE_CODE_BLOCK_LOWLIGHT_KEY] as ReturnType<typeof createLowlight> | undefined) ??
|
|
26
|
+
(() => {
|
|
27
|
+
const instance = createLowlight(common);
|
|
28
|
+
instance.register({ dockerfile });
|
|
29
|
+
globalStore[INLINE_CODE_BLOCK_LOWLIGHT_KEY] = instance;
|
|
30
|
+
return instance;
|
|
31
|
+
})();
|
|
32
|
+
|
|
33
|
+
const editorLowlight = {
|
|
34
|
+
highlight(language: string, value: string) {
|
|
35
|
+
return lowlight.highlight(lowlight.registered(language) ? language : "plaintext", value);
|
|
36
|
+
},
|
|
37
|
+
highlightAuto(value: string) {
|
|
38
|
+
return lowlight.highlight("plaintext", value);
|
|
39
|
+
},
|
|
40
|
+
listLanguages() {
|
|
41
|
+
return lowlight.listLanguages();
|
|
42
|
+
},
|
|
43
|
+
registered(language: string) {
|
|
44
|
+
return lowlight.registered(language);
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
19
48
|
interface CodeBlockLanguage {
|
|
20
49
|
id: string;
|
|
21
50
|
label: string;
|
|
@@ -40,6 +69,7 @@ const CODE_BLOCK_LANGUAGES: readonly CodeBlockLanguage[] = [
|
|
|
40
69
|
{ id: "json", label: "JSON" },
|
|
41
70
|
{ id: "jsx", label: "JSX" },
|
|
42
71
|
{ id: "kotlin", label: "Kotlin", aliases: ["kt"] },
|
|
72
|
+
{ id: "lua", label: "Lua" },
|
|
43
73
|
{ id: "markdown", label: "Markdown", aliases: ["md"] },
|
|
44
74
|
{ id: "mdx", label: "MDX" },
|
|
45
75
|
{ id: "php", label: "PHP" },
|
|
@@ -56,6 +86,7 @@ const CODE_BLOCK_LANGUAGES: readonly CodeBlockLanguage[] = [
|
|
|
56
86
|
{ id: "vue", label: "Vue" },
|
|
57
87
|
{ id: "xml", label: "XML" },
|
|
58
88
|
{ id: "yaml", label: "YAML", aliases: ["yml"] },
|
|
89
|
+
{ id: "zig", label: "Zig" },
|
|
59
90
|
];
|
|
60
91
|
|
|
61
92
|
function findLanguage(value: string | null | undefined): CodeBlockLanguage | null {
|
|
@@ -96,6 +127,36 @@ function languageLabel(value: string | null | undefined): string {
|
|
|
96
127
|
return value;
|
|
97
128
|
}
|
|
98
129
|
|
|
130
|
+
async function copyTextToClipboard(text: string, shouldUseFallback: () => boolean): Promise<void> {
|
|
131
|
+
if (navigator.clipboard?.writeText) {
|
|
132
|
+
try {
|
|
133
|
+
await navigator.clipboard.writeText(text);
|
|
134
|
+
return;
|
|
135
|
+
} catch {}
|
|
136
|
+
}
|
|
137
|
+
if (!shouldUseFallback()) return;
|
|
138
|
+
const activeElement = document.activeElement;
|
|
139
|
+
const selection = document.getSelection();
|
|
140
|
+
const previousRange = selection?.rangeCount ? selection.getRangeAt(0).cloneRange() : null;
|
|
141
|
+
const textarea = document.createElement("textarea");
|
|
142
|
+
textarea.value = text;
|
|
143
|
+
textarea.readOnly = true;
|
|
144
|
+
textarea.dataset.emdashClipboardFallback = "";
|
|
145
|
+
textarea.style.position = "fixed";
|
|
146
|
+
textarea.style.opacity = "0";
|
|
147
|
+
document.body.append(textarea);
|
|
148
|
+
textarea.select();
|
|
149
|
+
try {
|
|
150
|
+
if (!document.execCommand("copy")) throw new Error("Clipboard copy failed");
|
|
151
|
+
} finally {
|
|
152
|
+
textarea.remove();
|
|
153
|
+
if (activeElement instanceof HTMLElement && activeElement.isConnected) activeElement.focus();
|
|
154
|
+
if (previousRange) {
|
|
155
|
+
selection?.removeAllRanges();
|
|
156
|
+
selection?.addRange(previousRange);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
99
160
|
function CodeBlockLanguageDatalist({ id }: { id: string }) {
|
|
100
161
|
return (
|
|
101
162
|
<datalist id={id}>
|
|
@@ -156,13 +217,15 @@ function XIcon() {
|
|
|
156
217
|
);
|
|
157
218
|
}
|
|
158
219
|
|
|
159
|
-
function InlineCodeBlockNodeView({ node, updateAttributes
|
|
220
|
+
function InlineCodeBlockNodeView({ node, updateAttributes }: NodeViewProps) {
|
|
160
221
|
const [isEditing, setIsEditing] = React.useState(false);
|
|
161
|
-
const [
|
|
222
|
+
const [copyStatus, setCopyStatus] = React.useState<"idle" | "copied" | "failed">("idle");
|
|
162
223
|
const storedLanguage = typeof node.attrs.language === "string" ? node.attrs.language : "";
|
|
163
224
|
const [draft, setDraft] = React.useState(storedLanguage);
|
|
164
225
|
const inputRef = React.useRef<HTMLInputElement>(null);
|
|
165
226
|
const popoverRef = React.useRef<HTMLDivElement>(null);
|
|
227
|
+
const copyResetTimer = React.useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
228
|
+
const copyRequestId = React.useRef(0);
|
|
166
229
|
// Per-instance datalist id so multiple code blocks (or multiple inline
|
|
167
230
|
// editors) on the same page don't create duplicate DOM ids.
|
|
168
231
|
const datalistId = React.useId();
|
|
@@ -211,17 +274,37 @@ function InlineCodeBlockNodeView({ node, updateAttributes, selected }: NodeViewP
|
|
|
211
274
|
document.addEventListener("mousedown", onMouseDown);
|
|
212
275
|
return () => document.removeEventListener("mousedown", onMouseDown);
|
|
213
276
|
}, [isEditing, closePicker]);
|
|
277
|
+
React.useEffect(
|
|
278
|
+
() => () => {
|
|
279
|
+
copyRequestId.current += 1;
|
|
280
|
+
if (copyResetTimer.current) clearTimeout(copyResetTimer.current);
|
|
281
|
+
},
|
|
282
|
+
[],
|
|
283
|
+
);
|
|
284
|
+
const copyCode = React.useCallback(async () => {
|
|
285
|
+
const requestId = ++copyRequestId.current;
|
|
286
|
+
setCopyStatus("idle");
|
|
287
|
+
try {
|
|
288
|
+
await copyTextToClipboard(node.textContent, () => requestId === copyRequestId.current);
|
|
289
|
+
if (requestId !== copyRequestId.current) return;
|
|
290
|
+
setCopyStatus("copied");
|
|
291
|
+
if (copyResetTimer.current) clearTimeout(copyResetTimer.current);
|
|
292
|
+
copyResetTimer.current = setTimeout(setCopyStatus, 1500, "idle");
|
|
293
|
+
} catch {
|
|
294
|
+
if (requestId !== copyRequestId.current) return;
|
|
295
|
+
if (copyResetTimer.current) clearTimeout(copyResetTimer.current);
|
|
296
|
+
setCopyStatus("failed");
|
|
297
|
+
}
|
|
298
|
+
}, [node.textContent]);
|
|
214
299
|
|
|
215
300
|
const label = languageLabel(storedLanguage);
|
|
216
|
-
const
|
|
301
|
+
const copied = copyStatus === "copied";
|
|
302
|
+
const copyFailed = copyStatus === "failed";
|
|
217
303
|
|
|
218
304
|
return (
|
|
219
305
|
<NodeViewWrapper
|
|
220
306
|
className="emdash-inline-code-block"
|
|
221
307
|
data-language={storedLanguage || undefined}
|
|
222
|
-
style={{ position: "relative", margin: "1rem 0" }}
|
|
223
|
-
onMouseEnter={() => setIsHovered(true)}
|
|
224
|
-
onMouseLeave={() => setIsHovered(false)}
|
|
225
308
|
>
|
|
226
309
|
<CodeBlockLanguageDatalist id={datalistId} />
|
|
227
310
|
<pre className="emdash-code-block">
|
|
@@ -229,35 +312,20 @@ function InlineCodeBlockNodeView({ node, updateAttributes, selected }: NodeViewP
|
|
|
229
312
|
</pre>
|
|
230
313
|
|
|
231
314
|
<div
|
|
315
|
+
className="emdash-inline-code-block-controls-wrap"
|
|
316
|
+
data-persistent={isEditing || copyStatus !== "idle" ? "true" : "false"}
|
|
232
317
|
contentEditable={false}
|
|
233
|
-
style={{
|
|
234
|
-
position: "absolute",
|
|
235
|
-
top: "0.5rem",
|
|
236
|
-
insetInlineEnd: "0.5rem",
|
|
237
|
-
userSelect: "none",
|
|
238
|
-
zIndex: 1,
|
|
239
|
-
opacity: chipVisible ? 1 : 0,
|
|
240
|
-
pointerEvents: chipVisible ? "auto" : "none",
|
|
241
|
-
transition: "opacity 0.15s",
|
|
242
|
-
}}
|
|
243
|
-
// When the chip is hidden, also remove it from the tab order so
|
|
244
|
-
// keyboard users don't land on an invisible focus target.
|
|
245
|
-
// `inert` would be cleaner but isn't available on JSX HTMLDivElement
|
|
246
|
-
// types yet; aria-hidden + tabIndex on the button below cover the
|
|
247
|
-
// same need.
|
|
248
|
-
aria-hidden={chipVisible ? undefined : true}
|
|
249
318
|
>
|
|
250
319
|
{isEditing ? (
|
|
251
320
|
<div
|
|
252
321
|
ref={popoverRef}
|
|
322
|
+
className="emdash-inline-code-block-popover"
|
|
253
323
|
style={{
|
|
254
324
|
display: "flex",
|
|
255
325
|
alignItems: "center",
|
|
256
326
|
gap: "0.25rem",
|
|
257
327
|
padding: "0.25rem",
|
|
258
328
|
borderRadius: "0.375rem",
|
|
259
|
-
border: "1px solid rgba(0,0,0,0.1)",
|
|
260
|
-
background: "var(--emdash-inline-bg, #ffffff)",
|
|
261
329
|
boxShadow: "0 4px 12px rgba(0,0,0,0.1)",
|
|
262
330
|
}}
|
|
263
331
|
>
|
|
@@ -268,17 +336,14 @@ function InlineCodeBlockNodeView({ node, updateAttributes, selected }: NodeViewP
|
|
|
268
336
|
value={draft}
|
|
269
337
|
onChange={(e) => setDraft(e.target.value)}
|
|
270
338
|
onKeyDown={handleKeyDown}
|
|
339
|
+
className="emdash-inline-code-block-language-input"
|
|
271
340
|
placeholder="Language"
|
|
272
341
|
aria-label="Language"
|
|
273
342
|
style={{
|
|
274
343
|
height: "1.75rem",
|
|
275
|
-
width: "10rem",
|
|
276
344
|
fontSize: "0.75rem",
|
|
277
345
|
padding: "0 0.5rem",
|
|
278
|
-
border: "1px solid rgba(0,0,0,0.15)",
|
|
279
346
|
borderRadius: "0.25rem",
|
|
280
|
-
background: "transparent",
|
|
281
|
-
color: "inherit",
|
|
282
347
|
}}
|
|
283
348
|
/>
|
|
284
349
|
<button
|
|
@@ -303,27 +368,74 @@ function InlineCodeBlockNodeView({ node, updateAttributes, selected }: NodeViewP
|
|
|
303
368
|
</button>
|
|
304
369
|
</div>
|
|
305
370
|
) : (
|
|
306
|
-
<
|
|
307
|
-
type="button"
|
|
308
|
-
tabIndex={chipVisible ? 0 : -1}
|
|
309
|
-
onMouseDown={(e) => e.preventDefault()}
|
|
310
|
-
onClick={openPicker}
|
|
311
|
-
title="Set language"
|
|
312
|
-
aria-label={`Set language (current: ${label})`}
|
|
371
|
+
<div
|
|
313
372
|
className="emdash-inline-code-block-chip"
|
|
314
373
|
style={{
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
background: "rgba(255,255,255,0.9)",
|
|
320
|
-
color: "rgba(0,0,0,0.6)",
|
|
321
|
-
cursor: "pointer",
|
|
374
|
+
display: "inline-flex",
|
|
375
|
+
maxWidth: "min(100%, calc(100vw - 1rem))",
|
|
376
|
+
height: "26px",
|
|
377
|
+
fontSize: "13px",
|
|
322
378
|
}}
|
|
323
379
|
>
|
|
324
|
-
|
|
325
|
-
|
|
380
|
+
<button
|
|
381
|
+
type="button"
|
|
382
|
+
onMouseDown={(event) => event.preventDefault()}
|
|
383
|
+
onClick={openPicker}
|
|
384
|
+
title="Set language"
|
|
385
|
+
aria-label={`Set language (current: ${label})`}
|
|
386
|
+
style={{
|
|
387
|
+
minWidth: 0,
|
|
388
|
+
flexShrink: 1,
|
|
389
|
+
display: "inline-flex",
|
|
390
|
+
alignItems: "center",
|
|
391
|
+
gap: "0.25rem",
|
|
392
|
+
padding: "0 0.5rem",
|
|
393
|
+
border: 0,
|
|
394
|
+
background: "transparent",
|
|
395
|
+
color: "inherit",
|
|
396
|
+
font: "inherit",
|
|
397
|
+
}}
|
|
398
|
+
>
|
|
399
|
+
<span style={{ overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>
|
|
400
|
+
{storedLanguage ? label : "Set language"}
|
|
401
|
+
</span>
|
|
402
|
+
<span style={{ flexShrink: 0 }} aria-hidden="true">
|
|
403
|
+
⌄
|
|
404
|
+
</span>
|
|
405
|
+
</button>
|
|
406
|
+
<button
|
|
407
|
+
type="button"
|
|
408
|
+
onMouseDown={(event) => event.preventDefault()}
|
|
409
|
+
onClick={copyCode}
|
|
410
|
+
title={copyFailed ? "Retry copy" : copied ? "Copied" : "Copy code"}
|
|
411
|
+
aria-label={copyFailed ? "Retry copy" : "Copy code"}
|
|
412
|
+
style={{
|
|
413
|
+
...iconButtonStyle,
|
|
414
|
+
height: "26px",
|
|
415
|
+
width: "26px",
|
|
416
|
+
flexShrink: 0,
|
|
417
|
+
borderInlineStart: "1px solid var(--emdash-code-border)",
|
|
418
|
+
}}
|
|
419
|
+
>
|
|
420
|
+
<span aria-hidden="true">
|
|
421
|
+
{copied ? <CheckIcon /> : copyFailed ? <XIcon /> : "⧉"}
|
|
422
|
+
</span>
|
|
423
|
+
</button>
|
|
424
|
+
</div>
|
|
326
425
|
)}
|
|
426
|
+
<span
|
|
427
|
+
role="status"
|
|
428
|
+
aria-live="polite"
|
|
429
|
+
style={{
|
|
430
|
+
position: "absolute",
|
|
431
|
+
width: 1,
|
|
432
|
+
height: 1,
|
|
433
|
+
overflow: "hidden",
|
|
434
|
+
clipPath: "inset(50%)",
|
|
435
|
+
}}
|
|
436
|
+
>
|
|
437
|
+
{copyFailed ? "Copy failed" : copied ? "Copied" : ""}
|
|
438
|
+
</span>
|
|
327
439
|
</div>
|
|
328
440
|
</NodeViewWrapper>
|
|
329
441
|
);
|
|
@@ -336,8 +448,27 @@ function InlineCodeBlockNodeView({ node, updateAttributes, selected }: NodeViewP
|
|
|
336
448
|
* configure `StarterKit.configure({ codeBlock: false })` and add this
|
|
337
449
|
* extension to the editor.
|
|
338
450
|
*/
|
|
339
|
-
export const InlineCodeBlockExtension =
|
|
451
|
+
export const InlineCodeBlockExtension = CodeBlockLowlight.extend({
|
|
452
|
+
addKeyboardShortcuts() {
|
|
453
|
+
const shortcuts = this.parent?.() ?? {};
|
|
454
|
+
const selectionIsInCodeBlock = () => {
|
|
455
|
+
const { $from, $to } = this.editor.state.selection;
|
|
456
|
+
return $from.parent.type === this.type && $from.sameParent($to);
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
return {
|
|
460
|
+
...shortcuts,
|
|
461
|
+
Tab: (props) => (selectionIsInCodeBlock() ? (shortcuts.Tab?.(props) ?? false) : false),
|
|
462
|
+
"Shift-Tab": (props) =>
|
|
463
|
+
selectionIsInCodeBlock() ? (shortcuts["Shift-Tab"]?.(props) ?? false) : false,
|
|
464
|
+
};
|
|
465
|
+
},
|
|
340
466
|
addNodeView() {
|
|
341
467
|
return ReactNodeViewRenderer(InlineCodeBlockNodeView);
|
|
342
468
|
},
|
|
469
|
+
}).configure({
|
|
470
|
+
lowlight: editorLowlight,
|
|
471
|
+
defaultLanguage: "plaintext",
|
|
472
|
+
enableTabIndentation: true,
|
|
473
|
+
tabSize: 4,
|
|
343
474
|
});
|
|
@@ -46,6 +46,8 @@ export function sanitizeGalleryImages(
|
|
|
46
46
|
if (typeof record.caption === "string" && record.caption) image.caption = record.caption;
|
|
47
47
|
if (typeof record.width === "number") image.width = record.width;
|
|
48
48
|
if (typeof record.height === "number") image.height = record.height;
|
|
49
|
+
if (typeof record.focalX === "number") image.focalX = record.focalX;
|
|
50
|
+
if (typeof record.focalY === "number") image.focalY = record.focalY;
|
|
49
51
|
if (typeof record.blurhash === "string" && record.blurhash) image.blurhash = record.blurhash;
|
|
50
52
|
if (typeof record.dominantColor === "string" && record.dominantColor)
|
|
51
53
|
image.dominantColor = record.dominantColor;
|
|
@@ -91,6 +91,8 @@ export interface PortableTextGalleryImage {
|
|
|
91
91
|
caption?: string;
|
|
92
92
|
width?: number;
|
|
93
93
|
height?: number;
|
|
94
|
+
focalX?: number;
|
|
95
|
+
focalY?: number;
|
|
94
96
|
/** LQIP blurhash placeholder (images only) */
|
|
95
97
|
blurhash?: string;
|
|
96
98
|
/** LQIP dominant-color placeholder, as a CSS color (images only) */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import BetterSqlite3 from "better-sqlite3";
|
|
2
1
|
import { Kysely, SqliteDialect } from "kysely";
|
|
3
2
|
|
|
3
|
+
import { openNodeSqliteDatabase } from "../db/node-sqlite-compat.js";
|
|
4
4
|
import { EmDashDatabaseError } from "./errors.js";
|
|
5
5
|
import { kyselyLogOption } from "./instrumentation.js";
|
|
6
6
|
import type { Database } from "./types.js";
|
|
@@ -12,23 +12,6 @@ export interface DatabaseConfig {
|
|
|
12
12
|
authToken?: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
* Returns a helpful, actionable message when better-sqlite3's native binary
|
|
17
|
-
* was compiled against a different Node.js version than the one running. This
|
|
18
|
-
* happens after upgrading Node without rebuilding native deps.
|
|
19
|
-
*
|
|
20
|
-
* Returns null if the error is not a NODE_MODULE_VERSION mismatch.
|
|
21
|
-
*/
|
|
22
|
-
export function formatNativeModuleVersionError(error: unknown): string | null {
|
|
23
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
24
|
-
if (!message.includes("NODE_MODULE_VERSION")) return null;
|
|
25
|
-
return (
|
|
26
|
-
"better-sqlite3's native binary was compiled against a different Node.js version. " +
|
|
27
|
-
"Rebuild it with `pnpm rebuild better-sqlite3` (or `npm rebuild better-sqlite3`), " +
|
|
28
|
-
"or reinstall dependencies with your current Node.js version."
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
15
|
/**
|
|
33
16
|
* Creates a Kysely database instance
|
|
34
17
|
* Supports:
|
|
@@ -42,15 +25,7 @@ export function createDatabase(config: DatabaseConfig): Kysely<Database> {
|
|
|
42
25
|
if (config.url.startsWith("file:") || config.url === ":memory:") {
|
|
43
26
|
const dbPath = config.url === ":memory:" ? ":memory:" : config.url.replace("file:", "");
|
|
44
27
|
|
|
45
|
-
const sqlite =
|
|
46
|
-
|
|
47
|
-
// Enable WAL mode for crash safety — writes go to a write-ahead log
|
|
48
|
-
// before being applied, preventing FTS5 shadow table corruption on
|
|
49
|
-
// process kill during content writes. No-op for :memory: databases.
|
|
50
|
-
sqlite.pragma("journal_mode = WAL");
|
|
51
|
-
|
|
52
|
-
// Enable foreign key constraints
|
|
53
|
-
sqlite.pragma("foreign_keys = ON");
|
|
28
|
+
const sqlite = openNodeSqliteDatabase(dbPath, { journalMode: "wal" });
|
|
54
29
|
|
|
55
30
|
const dialect = new SqliteDialect({
|
|
56
31
|
database: sqlite,
|
|
@@ -73,10 +48,6 @@ export function createDatabase(config: DatabaseConfig): Kysely<Database> {
|
|
|
73
48
|
if (error instanceof EmDashDatabaseError) {
|
|
74
49
|
throw error;
|
|
75
50
|
}
|
|
76
|
-
const nativeVersionHint = formatNativeModuleVersionError(error);
|
|
77
|
-
if (nativeVersionHint) {
|
|
78
|
-
throw new EmDashDatabaseError(nativeVersionHint, error);
|
|
79
|
-
}
|
|
80
51
|
throw new EmDashDatabaseError("Failed to create database", error);
|
|
81
52
|
}
|
|
82
53
|
}
|
package/src/database/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// `createDatabase` is intentionally not re-exported here: it lives in
|
|
2
|
-
// `connection.ts`, which statically imports
|
|
2
|
+
// `connection.ts`, which statically imports the Node-only `node:sqlite` module.
|
|
3
3
|
export { EmDashDatabaseError } from "./errors.js";
|
|
4
4
|
export type { DatabaseConfig } from "./connection.js";
|
|
5
5
|
export {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { sql, type Kysely, type RawBuilder } from "kysely";
|
|
2
|
+
|
|
3
|
+
import { isPostgres } from "./dialect-helpers.js";
|
|
4
|
+
import type { Database } from "./types.js";
|
|
5
|
+
|
|
6
|
+
export function jsonTextValues(
|
|
7
|
+
db: Kysely<Database>,
|
|
8
|
+
values: readonly string[],
|
|
9
|
+
): RawBuilder<{ value: string }> {
|
|
10
|
+
const payload = JSON.stringify([...new Set(values)]);
|
|
11
|
+
return isPostgres(db)
|
|
12
|
+
? sql<{
|
|
13
|
+
value: string;
|
|
14
|
+
}>`SELECT value::text AS value FROM jsonb_array_elements_text(${payload}::jsonb) AS value`
|
|
15
|
+
: sql<{ value: string }>`SELECT value AS value FROM json_each(${payload})`;
|
|
16
|
+
}
|
|
@@ -223,7 +223,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
|
|
|
223
223
|
const tmp = `${t}_i18n_tmp`;
|
|
224
224
|
|
|
225
225
|
// Note: no transaction wrapper — D1 doesn't support transactions,
|
|
226
|
-
// and
|
|
226
|
+
// and file-backed SQLite is single-writer so crash-safety is
|
|
227
227
|
// handled by the journal mode. The tmp table approach is already
|
|
228
228
|
// crash-recoverable (orphaned tmp tables are harmless).
|
|
229
229
|
{
|