emdash 1.2.0 → 1.3.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/action-token-SK8zyN7w.mjs +26 -0
- package/dist/action-token-SK8zyN7w.mjs.map +1 -0
- package/dist/activation-Dim4YMM7.mjs +387 -0
- package/dist/activation-Dim4YMM7.mjs.map +1 -0
- package/dist/adapters-F_xorvWv.d.mts +173 -0
- package/dist/adapters-F_xorvWv.d.mts.map +1 -0
- package/dist/allowed-origins-CEug-p0t.mjs +116 -0
- package/dist/allowed-origins-CEug-p0t.mjs.map +1 -0
- package/dist/api/route-utils.d.mts +4 -4
- package/dist/api/route-utils.mjs +47 -45
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +9 -9
- package/dist/api-D-7BNHoz.mjs +5025 -0
- package/dist/api-D-7BNHoz.mjs.map +1 -0
- package/dist/api-tokens-Bx38ZCQp.mjs +173 -0
- package/dist/api-tokens-Bx38ZCQp.mjs.map +1 -0
- package/dist/apply-T7ATgzCh.mjs +1702 -0
- package/dist/apply-T7ATgzCh.mjs.map +1 -0
- package/dist/approvals-D-m6wvGl.mjs +460 -0
- package/dist/approvals-D-m6wvGl.mjs.map +1 -0
- package/dist/artifact-fetch-DIh7iyOV.mjs +659 -0
- package/dist/artifact-fetch-DIh7iyOV.mjs.map +1 -0
- package/dist/artifacts-htGyfCSt.mjs +307 -0
- package/dist/artifacts-htGyfCSt.mjs.map +1 -0
- package/dist/astro/index.d.mts +14 -14
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +109 -18
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +12 -12
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +12 -11
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/media-usage-write-fence.mjs +5 -5
- package/dist/astro/middleware/redirect.d.mts.map +1 -1
- package/dist/astro/middleware/redirect.mjs +60 -40
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.mjs +49 -15
- package/dist/astro/middleware/request-context.mjs.map +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +12 -12
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +116 -408
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +14 -14
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +14 -14
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +7 -7
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +6 -6
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +16 -16
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +16 -16
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +16 -16
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +22 -21
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +22 -21
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +22 -21
- package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +18 -18
- package/dist/astro/routes/api/admin/comments/_id_.mjs +7 -7
- package/dist/astro/routes/api/admin/comments/bulk.mjs +17 -17
- package/dist/astro/routes/api/admin/comments/counts.mjs +7 -7
- package/dist/astro/routes/api/admin/comments/index.mjs +17 -17
- package/dist/astro/routes/api/admin/core-update.mjs +7 -7
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +6 -6
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +5 -5
- package/dist/astro/routes/api/admin/media-usage/activation.mjs +20 -20
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +21 -21
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +21 -21
- package/dist/astro/routes/api/admin/media-usage/progress.mjs +23 -22
- package/dist/astro/routes/api/admin/media-usage/progress.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +29 -28
- package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs +21 -21
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +21 -21
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +6 -6
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +8 -8
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +8 -8
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +71 -69
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +7 -7
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +70 -68
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +70 -69
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +79 -78
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +71 -69
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +7 -7
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +70 -68
- 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 +78 -77
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +70 -68
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +70 -69
- 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 +80 -79
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +10 -10
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +72 -71
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs +7 -7
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +71 -69
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +70 -68
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs +5 -5
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +70 -68
- 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 +7 -7
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +70 -68
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/_...path_.mjs +4 -4
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs +38 -37
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs +38 -37
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs +41 -40
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs +41 -40
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs +41 -40
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs +42 -41
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs +42 -41
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs +42 -41
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs +42 -41
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs +40 -39
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs +42 -41
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +4 -4
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +4 -4
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +14 -14
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +6 -6
- package/dist/astro/routes/api/admin/users/index.mjs +14 -14
- package/dist/astro/routes/api/auth/dev-bypass.mjs +6 -6
- package/dist/astro/routes/api/auth/handover.mjs +6 -6
- package/dist/astro/routes/api/auth/invite/accept.mjs +4 -4
- package/dist/astro/routes/api/auth/invite/complete.mjs +19 -19
- package/dist/astro/routes/api/auth/invite/index.mjs +16 -16
- package/dist/astro/routes/api/auth/invite/register-options.mjs +17 -17
- package/dist/astro/routes/api/auth/logout.mjs +5 -5
- package/dist/astro/routes/api/auth/magic-link/send.mjs +18 -18
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +15 -15
- package/dist/astro/routes/api/auth/me.mjs +15 -15
- package/dist/astro/routes/api/auth/mode.mjs +5 -5
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +8 -8
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +14 -14
- package/dist/astro/routes/api/auth/passkey/index.mjs +4 -4
- package/dist/astro/routes/api/auth/passkey/options.mjs +19 -19
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +17 -17
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +18 -18
- package/dist/astro/routes/api/auth/passkey/verify.mjs +19 -19
- package/dist/astro/routes/api/auth/signup/complete.mjs +19 -19
- package/dist/astro/routes/api/auth/signup/request.mjs +17 -17
- package/dist/astro/routes/api/auth/signup/verify.mjs +4 -4
- package/dist/astro/routes/api/calendar.mjs +15 -15
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +12 -12
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +18 -18
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +5 -5
- 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 +18 -17
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +7 -10
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +20 -17
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +7 -6
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs +11 -11
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +30 -29
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/publish.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +18 -17
- 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 +34 -33
- 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 +34 -33
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +7 -6
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +19 -18
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +30 -25
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +18 -17
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +27 -20
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/authors.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/index.mjs +18 -21
- package/dist/astro/routes/api/content/_collection_/index.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/trash.mjs +15 -15
- package/dist/astro/routes/api/dashboard.d.mts.map +1 -1
- package/dist/astro/routes/api/dashboard.mjs +17 -11
- package/dist/astro/routes/api/dashboard.mjs.map +1 -1
- package/dist/astro/routes/api/dev/emails.mjs +5 -5
- package/dist/astro/routes/api/dev/scheduled-tasks.d.mts +12 -0
- package/dist/astro/routes/api/dev/scheduled-tasks.d.mts.map +1 -0
- package/dist/astro/routes/api/dev/scheduled-tasks.mjs +140 -0
- package/dist/astro/routes/api/dev/scheduled-tasks.mjs.map +1 -0
- package/dist/astro/routes/api/health.mjs +6 -6
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +24 -22
- package/dist/astro/routes/api/import/probe.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/analyze.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +7 -20
- package/dist/astro/routes/api/import/wordpress/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +15 -14
- package/dist/astro/routes/api/import/wordpress/execute.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/execute.mjs +28 -29
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.d.mts +12 -12
- package/dist/astro/routes/api/import/wordpress/media.mjs +17 -17
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +19 -17
- package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +13 -13
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +27 -26
- 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 +25 -22
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +13 -13
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +55 -34
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +6 -6
- package/dist/astro/routes/api/mcp.mjs +135 -101
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +17 -17
- package/dist/astro/routes/api/media/_id_/replace.mjs +15 -15
- package/dist/astro/routes/api/media/_id_/upload.mjs +8 -8
- package/dist/astro/routes/api/media/_id_/usage.mjs +31 -30
- package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +29 -28
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +6 -6
- package/dist/astro/routes/api/media/file/_...key_.mjs +10 -10
- package/dist/astro/routes/api/media/folders/_id_.mjs +16 -16
- package/dist/astro/routes/api/media/folders/index.mjs +16 -16
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +5 -5
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +5 -5
- package/dist/astro/routes/api/media/providers/index.mjs +5 -5
- package/dist/astro/routes/api/media/upload-url.mjs +17 -17
- package/dist/astro/routes/api/media.mjs +30 -29
- 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 +19 -18
- 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 +18 -17
- 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 +18 -17
- 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 +18 -17
- 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 +19 -18
- 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 +18 -17
- 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 +8 -8
- package/dist/astro/routes/api/oauth/device/code.mjs +11 -11
- package/dist/astro/routes/api/oauth/device/token.mjs +10 -10
- package/dist/astro/routes/api/oauth/register.mjs +7 -7
- package/dist/astro/routes/api/oauth/token/refresh.mjs +8 -8
- package/dist/astro/routes/api/oauth/token/revoke.mjs +8 -8
- package/dist/astro/routes/api/oauth/token.mjs +8 -8
- package/dist/astro/routes/api/openapi.json.mjs +20 -20
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +11 -11
- package/dist/astro/routes/api/redirects/404s/index.mjs +19 -19
- package/dist/astro/routes/api/redirects/404s/summary.mjs +19 -19
- package/dist/astro/routes/api/redirects/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.mjs +32 -23
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.d.mts.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +24 -21
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.mjs +34 -33
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/index.mjs +34 -33
- package/dist/astro/routes/api/relations/index.mjs.map +1 -1
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +5 -5
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +16 -16
- package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs +70 -68
- package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs +70 -68
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs.map +1 -1
- package/dist/astro/routes/api/schema/block-types/index.mjs +70 -68
- package/dist/astro/routes/api/schema/block-types/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +70 -68
- 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 +70 -68
- 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 +70 -68
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +70 -68
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +70 -68
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.mjs +70 -68
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +16 -15
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +70 -68
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +70 -68
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +19 -18
- package/dist/astro/routes/api/search/enable.mjs.map +1 -1
- package/dist/astro/routes/api/search/index.mjs +18 -17
- package/dist/astro/routes/api/search/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/rebuild.mjs +19 -18
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
- package/dist/astro/routes/api/search/stats.mjs +9 -8
- package/dist/astro/routes/api/search/stats.mjs.map +1 -1
- package/dist/astro/routes/api/search/suggest.mjs +18 -17
- package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
- package/dist/astro/routes/api/sections/_slug_.mjs +18 -17
- package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/sections/index.mjs +18 -17
- package/dist/astro/routes/api/sections/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/export.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/index.mjs +8 -8
- package/dist/astro/routes/api/settings/domain-notify.mjs +9 -9
- package/dist/astro/routes/api/settings/domain.d.mts.map +1 -1
- package/dist/astro/routes/api/settings/domain.mjs +17 -14
- package/dist/astro/routes/api/settings/domain.mjs.map +1 -1
- package/dist/astro/routes/api/settings/email.mjs +6 -6
- package/dist/astro/routes/api/settings.d.mts.map +1 -1
- package/dist/astro/routes/api/settings.mjs +23 -20
- package/dist/astro/routes/api/settings.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.d.mts.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.mjs +25 -21
- package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin.mjs +18 -18
- package/dist/astro/routes/api/setup/dev-bypass.mjs +42 -40
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +4 -4
- package/dist/astro/routes/api/setup/index.mjs +48 -46
- package/dist/astro/routes/api/setup/index.mjs.map +1 -1
- package/dist/astro/routes/api/setup/status.mjs +6 -6
- package/dist/astro/routes/api/site/domain-proof.mjs +11 -9
- package/dist/astro/routes/api/site/domain-proof.mjs.map +1 -1
- package/dist/astro/routes/api/snapshot.mjs +8 -8
- package/dist/astro/routes/api/taxonomies/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +23 -21
- 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 +23 -21
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +24 -22
- 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 +23 -21
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +21 -20
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_.mjs +24 -22
- package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/bulk-tag.mjs +34 -33
- package/dist/astro/routes/api/taxonomies/bulk-tag.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.mjs +23 -21
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +6 -6
- package/dist/astro/routes/api/typegen.mjs +6 -6
- package/dist/astro/routes/api/visual-editing/action-token.mjs +6 -6
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +18 -18
- package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +4 -4
- package/dist/astro/routes/api/well-known/auth.mjs +1 -1
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +17 -16
- 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 +21 -19
- 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 +20 -18
- 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 +10 -8
- 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 +20 -18
- package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
- package/dist/astro/routes/api/widget-components.mjs +5 -5
- package/dist/astro/routes/robots.txt.d.mts.map +1 -1
- package/dist/astro/routes/robots.txt.mjs +38 -5
- package/dist/astro/routes/robots.txt.mjs.map +1 -1
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +13 -8
- package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
- package/dist/astro/routes/sitemap.xml.mjs +11 -6
- package/dist/astro/routes/sitemap.xml.mjs.map +1 -1
- package/dist/astro/types.d.mts +19 -17
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/audit-_gieLVGU.mjs +127 -0
- package/dist/audit-_gieLVGU.mjs.map +1 -0
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/auth/providers/microsoft.d.mts +1 -1
- package/dist/authoritative-records-CQlB3JzE.mjs +5183 -0
- package/dist/authoritative-records-CQlB3JzE.mjs.map +1 -0
- package/dist/authorize-DPFBGbE6.mjs +74 -0
- package/dist/authorize-DPFBGbE6.mjs.map +1 -0
- package/dist/backup-3FgVxiDJ.mjs +246 -0
- package/dist/backup-3FgVxiDJ.mjs.map +1 -0
- package/dist/block-types-CYcG56JB.mjs +132 -0
- package/dist/block-types-CYcG56JB.mjs.map +1 -0
- package/dist/block-values-gCX4HBSl.mjs +215 -0
- package/dist/block-values-gCX4HBSl.mjs.map +1 -0
- package/dist/byline-BR1qhyiw.mjs +909 -0
- package/dist/byline-BR1qhyiw.mjs.map +1 -0
- package/dist/byline-fields-4ClDC88c.mjs +123 -0
- package/dist/byline-fields-4ClDC88c.mjs.map +1 -0
- package/dist/byline-fields-BLXZnX7N.mjs +280 -0
- package/dist/byline-fields-BLXZnX7N.mjs.map +1 -0
- package/dist/bylines-CVOvRUL7.mjs +234 -0
- package/dist/bylines-CVOvRUL7.mjs.map +1 -0
- package/dist/bylines-DxOs9B7z.mjs +150 -0
- package/dist/bylines-DxOs9B7z.mjs.map +1 -0
- package/dist/cache-CEU9wo_h.mjs +151 -0
- package/dist/cache-CEU9wo_h.mjs.map +1 -0
- package/dist/canonical-BudtH-Fx.mjs +174 -0
- package/dist/canonical-BudtH-Fx.mjs.map +1 -0
- package/dist/capture-triggers-CT6dK9zd.mjs +362 -0
- package/dist/capture-triggers-CT6dK9zd.mjs.map +1 -0
- package/dist/challenge-store-C17BYx2-.mjs +51 -0
- package/dist/challenge-store-C17BYx2-.mjs.map +1 -0
- package/dist/checksum-CEqvfxGX.mjs +162 -0
- package/dist/checksum-CEqvfxGX.mjs.map +1 -0
- package/dist/chunks-xC4UD5-S.mjs +25 -0
- package/dist/chunks-xC4UD5-S.mjs.map +1 -0
- package/dist/cli/index.mjs +127 -113
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +47 -47
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +12 -10
- package/dist/client/index.mjs.map +1 -1
- package/dist/collection-slugs-cache-e09QeJQt.mjs +85 -0
- package/dist/collection-slugs-cache-e09QeJQt.mjs.map +1 -0
- package/dist/comment-UvIWDKcW.mjs +325 -0
- package/dist/comment-UvIWDKcW.mjs.map +1 -0
- package/dist/comment-reaction-dGp6_FRo.mjs +85 -0
- package/dist/comment-reaction-dGp6_FRo.mjs.map +1 -0
- package/dist/comments-pej-_BUO.mjs +195 -0
- package/dist/comments-pej-_BUO.mjs.map +1 -0
- package/dist/comments-yiRFx3w5.mjs +99 -0
- package/dist/comments-yiRFx3w5.mjs.map +1 -0
- package/dist/components-Brp__9xo.mjs +112 -0
- package/dist/components-Brp__9xo.mjs.map +1 -0
- package/dist/config-Bsm_u_oE.d.mts +6799 -0
- package/dist/config-Bsm_u_oE.d.mts.map +1 -0
- package/dist/config-CFMojMFK.d.mts +39 -0
- package/dist/config-CFMojMFK.d.mts.map +1 -0
- package/dist/config-DBU6iUQB.mjs +228 -0
- package/dist/config-DBU6iUQB.mjs.map +1 -0
- package/dist/connection-BtEN_lP9.mjs +36 -0
- package/dist/connection-BtEN_lP9.mjs.map +1 -0
- package/dist/content-DQSRZTVw.mjs +2075 -0
- package/dist/content-DQSRZTVw.mjs.map +1 -0
- package/dist/content-list-query-CYKcY6Vi.d.mts +26 -0
- package/dist/content-list-query-CYKcY6Vi.d.mts.map +1 -0
- package/dist/content-repair-DNh5--x5.mjs +442 -0
- package/dist/content-repair-DNh5--x5.mjs.map +1 -0
- package/dist/context-BYptmCN0.mjs +2090 -0
- package/dist/context-BYptmCN0.mjs.map +1 -0
- package/dist/credits-B9iORdWB.mjs +110 -0
- package/dist/credits-B9iORdWB.mjs.map +1 -0
- package/dist/cron-D7obTIfk.mjs +306 -0
- package/dist/cron-D7obTIfk.mjs.map +1 -0
- package/dist/dashboard-D0jcgBD7.mjs +167 -0
- package/dist/dashboard-D0jcgBD7.mjs.map +1 -0
- package/dist/database/migration-lock.d.mts +17 -4
- package/dist/database/migration-lock.d.mts.map +1 -1
- package/dist/database/migration-lock.mjs +32 -5
- package/dist/database/migration-lock.mjs.map +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +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 +1 -1
- package/dist/default-C0W-PhAp.mjs +81 -0
- package/dist/default-C0W-PhAp.mjs.map +1 -0
- package/dist/deferred-tasks-ZvUECSzI.d.mts +9 -0
- package/dist/deferred-tasks-ZvUECSzI.d.mts.map +1 -0
- package/dist/dev-typegen-EBni_pOQ.mjs +29 -0
- package/dist/dev-typegen-EBni_pOQ.mjs.map +1 -0
- package/dist/device-flow-BkFKBoAn.mjs +521 -0
- package/dist/device-flow-BkFKBoAn.mjs.map +1 -0
- package/dist/digest-DJ1tHCgy.mjs +194 -0
- package/dist/digest-DJ1tHCgy.mjs.map +1 -0
- package/dist/direct-executor-Cbxzg4qe.mjs +117 -0
- package/dist/direct-executor-Cbxzg4qe.mjs.map +1 -0
- package/dist/email-console-FFVJWb9N.mjs +50 -0
- package/dist/email-console-FFVJWb9N.mjs.map +1 -0
- package/dist/email-locale-BJ8DjTzZ.mjs +25 -0
- package/dist/email-locale-BJ8DjTzZ.mjs.map +1 -0
- package/dist/emdash-runtime-DVi7vtXC.mjs +4379 -0
- package/dist/emdash-runtime-DVi7vtXC.mjs.map +1 -0
- package/dist/entry-lock-C7VX0NGK.d.mts +4568 -0
- package/dist/entry-lock-C7VX0NGK.d.mts.map +1 -0
- package/dist/entry-lock-DLxCffFW.mjs +163 -0
- package/dist/entry-lock-DLxCffFW.mjs.map +1 -0
- package/dist/entry-lock-Df6-XhIu.mjs +1211 -0
- package/dist/entry-lock-Df6-XhIu.mjs.map +1 -0
- package/dist/env-types-C3FCVBWe.mjs +38 -0
- package/dist/env-types-C3FCVBWe.mjs.map +1 -0
- package/dist/error-CVWeIOku.mjs +90 -0
- package/dist/error-CVWeIOku.mjs.map +1 -0
- package/dist/errors-B4f4It-2.mjs +120 -0
- package/dist/errors-B4f4It-2.mjs.map +1 -0
- package/dist/errors-BOYNdIo3.mjs +479 -0
- package/dist/errors-BOYNdIo3.mjs.map +1 -0
- package/dist/escape-lsNq38PP.mjs +9 -0
- package/dist/escape-lsNq38PP.mjs.map +1 -0
- package/dist/fence-C3MUitUN.mjs +162 -0
- package/dist/fence-C3MUitUN.mjs.map +1 -0
- package/dist/field-defs-cache-Dez5iWJJ.mjs +77 -0
- package/dist/field-defs-cache-Dez5iWJJ.mjs.map +1 -0
- package/dist/field-map-Bft9LKak.mjs +83 -0
- package/dist/field-map-Bft9LKak.mjs.map +1 -0
- package/dist/fts-manager-Beg3e4bI.mjs +443 -0
- package/dist/fts-manager-Beg3e4bI.mjs.map +1 -0
- package/dist/gc-ByyAYiYE.mjs +75 -0
- package/dist/gc-ByyAYiYE.mjs.map +1 -0
- package/dist/hash-BJaeek87.mjs +37 -0
- package/dist/hash-BJaeek87.mjs.map +1 -0
- package/dist/hook-result-BrdLyOdI.d.mts +31 -0
- package/dist/hook-result-BrdLyOdI.d.mts.map +1 -0
- package/dist/hreflang-C8Jb-hrf.mjs +105 -0
- package/dist/hreflang-C8Jb-hrf.mjs.map +1 -0
- package/dist/hreflang-CY_F5OjF.d.mts +50 -0
- package/dist/hreflang-CY_F5OjF.d.mts.map +1 -0
- package/dist/http-route-dispatch-CyeW6iPv.mjs +342 -0
- package/dist/http-route-dispatch-CyeW6iPv.mjs.map +1 -0
- package/dist/identity-Cael5uTT.mjs +35 -0
- package/dist/identity-Cael5uTT.mjs.map +1 -0
- package/dist/import-BUXjdZUn.mjs +2126 -0
- package/dist/import-BUXjdZUn.mjs.map +1 -0
- package/dist/index-BB9sVisO.d.mts +623 -0
- package/dist/index-BB9sVisO.d.mts.map +1 -0
- package/dist/index.d.mts +23 -23
- package/dist/index.mjs +96 -94
- package/dist/install-finalization-3JX5qQEA.mjs +58 -0
- package/dist/install-finalization-3JX5qQEA.mjs.map +1 -0
- package/dist/json-recordset-BUjxhr77.mjs +12 -0
- package/dist/json-recordset-BUjxhr77.mjs.map +1 -0
- package/dist/json-schema-v_D_pPNG.mjs +15 -0
- package/dist/json-schema-v_D_pPNG.mjs.map +1 -0
- package/dist/keys-CifIkT0N.mjs +61 -0
- package/dist/keys-CifIkT0N.mjs.map +1 -0
- package/dist/kinds-B_Qcl5pz.mjs +974 -0
- package/dist/kinds-B_Qcl5pz.mjs.map +1 -0
- package/dist/lifecycle-7vUJeFRe.mjs +25 -0
- package/dist/lifecycle-7vUJeFRe.mjs.map +1 -0
- package/dist/load-CdAG9wz-.mjs +28 -0
- package/dist/load-CdAG9wz-.mjs.map +1 -0
- package/dist/loader-CswroUbe.mjs +1380 -0
- package/dist/loader-CswroUbe.mjs.map +1 -0
- package/dist/loops-uA4iTOzd.mjs +205 -0
- package/dist/loops-uA4iTOzd.mjs.map +1 -0
- package/dist/manifest-builder-B8zjuH3f.mjs +189 -0
- package/dist/manifest-builder-B8zjuH3f.mjs.map +1 -0
- package/dist/manifest-schema-DNb4XmTS.mjs +497 -0
- package/dist/manifest-schema-DNb4XmTS.mjs.map +1 -0
- package/dist/marketplace-CqbgeIa7.mjs +257 -0
- package/dist/marketplace-CqbgeIa7.mjs.map +1 -0
- package/dist/media/index.d.mts +1 -1
- package/dist/media/local-runtime.d.mts +14 -14
- package/dist/media/local-runtime.mjs +10 -5
- package/dist/media/local-runtime.mjs.map +1 -1
- package/dist/media--dJRU6i2.mjs +294 -0
- package/dist/media--dJRU6i2.mjs.map +1 -0
- package/dist/media-1WC65OCB.mjs +416 -0
- package/dist/media-1WC65OCB.mjs.map +1 -0
- package/dist/media-Bws9f18T.mjs +373 -0
- package/dist/media-Bws9f18T.mjs.map +1 -0
- package/dist/media-allowlist-BJB7MFx6.mjs +45 -0
- package/dist/media-allowlist-BJB7MFx6.mjs.map +1 -0
- package/dist/media-folders-Dn3C16B8.mjs +210 -0
- package/dist/media-folders-Dn3C16B8.mjs.map +1 -0
- package/dist/media-url-BQgKvpQ5.mjs +43 -0
- package/dist/media-url-BQgKvpQ5.mjs.map +1 -0
- package/dist/media-usage-CF0WVcLO.mjs +282 -0
- package/dist/media-usage-CF0WVcLO.mjs.map +1 -0
- package/dist/media-usage-activation-C9HwVw5w.mjs +78 -0
- package/dist/media-usage-activation-C9HwVw5w.mjs.map +1 -0
- package/dist/media-usage-work-CkLa5-nc.mjs +1036 -0
- package/dist/media-usage-work-CkLa5-nc.mjs.map +1 -0
- package/dist/media-usage-work-m3AWTmmC.mjs +151 -0
- package/dist/media-usage-work-m3AWTmmC.mjs.map +1 -0
- package/dist/menus-BCVSSp1z.mjs +753 -0
- package/dist/menus-BCVSSp1z.mjs.map +1 -0
- package/dist/menus-BSzwObhV.mjs +92 -0
- package/dist/menus-BSzwObhV.mjs.map +1 -0
- package/dist/menus-Cl4kwdt7.mjs +3721 -0
- package/dist/menus-Cl4kwdt7.mjs.map +1 -0
- package/dist/migrations/index.d.mts +1 -1
- package/dist/migrations/index.d.mts.map +1 -1
- package/dist/migrations/index.mjs +3 -3
- package/dist/mode-C-D3qICy.mjs +23 -0
- package/dist/mode-C-D3qICy.mjs.map +1 -0
- package/dist/node-sqlite-compat-CrKzRr0J.mjs +63 -0
- package/dist/node-sqlite-compat-CrKzRr0J.mjs.map +1 -0
- package/dist/oauth-authorization-TpEJrYB7.mjs +274 -0
- package/dist/oauth-authorization-TpEJrYB7.mjs.map +1 -0
- package/dist/oauth-clients-BT0Pg-MO.mjs +266 -0
- package/dist/oauth-clients-BT0Pg-MO.mjs.map +1 -0
- package/dist/oauth-state-store-CHMn_mwc.mjs +50 -0
- package/dist/oauth-state-store-CHMn_mwc.mjs.map +1 -0
- package/dist/oauth-user-lookup-BDgF6IVG.mjs +26 -0
- package/dist/oauth-user-lookup-BDgF6IVG.mjs.map +1 -0
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/options-DJWaq3Ie.d.mts +81 -0
- package/dist/options-DJWaq3Ie.d.mts.map +1 -0
- package/dist/ownership-MiyA7qKO.mjs +12 -0
- package/dist/ownership-MiyA7qKO.mjs.map +1 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/page/index.mjs +9 -4
- package/dist/page/index.mjs.map +1 -1
- package/dist/parse-CWHOFc6z.d.mts +176 -0
- package/dist/parse-CWHOFc6z.d.mts.map +1 -0
- package/dist/parse-DgQ2NABT.mjs +81 -0
- package/dist/parse-DgQ2NABT.mjs.map +1 -0
- package/dist/passkey-config-D0kdzEao.mjs +46 -0
- package/dist/passkey-config-D0kdzEao.mjs.map +1 -0
- package/dist/paths-biDzFTY2.mjs +77 -0
- package/dist/paths-biDzFTY2.mjs.map +1 -0
- package/dist/placeholder-D41vk11_.d.mts +306 -0
- package/dist/placeholder-D41vk11_.d.mts.map +1 -0
- package/dist/plan-CCoqxNoU.mjs +135 -0
- package/dist/plan-CCoqxNoU.mjs.map +1 -0
- package/dist/plugin-test-runtime.d.mts +14 -14
- package/dist/plugin-test-runtime.mjs +109 -107
- package/dist/plugin-tool-name-DDUgN_0p.mjs +27 -0
- package/dist/plugin-tool-name-DDUgN_0p.mjs.map +1 -0
- package/dist/plugin-types.d.mts +2 -2
- package/dist/plugin-utils.d.mts +12 -12
- package/dist/plugins/adapt-sandbox-entry.d.mts +12 -12
- package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.mjs +9 -8
- package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
- package/dist/plugins/host.d.mts +5 -5
- package/dist/plugins/host.mjs +45 -41
- package/dist/plugins-COJ2L49n.mjs +261 -0
- package/dist/plugins-COJ2L49n.mjs.map +1 -0
- package/dist/policy-DLQ--Hnm.mjs +45 -0
- package/dist/policy-DLQ--Hnm.mjs.map +1 -0
- package/dist/portable-text-BH4zgkSm.mjs +311 -0
- package/dist/portable-text-BH4zgkSm.mjs.map +1 -0
- package/dist/preview-DLexxwp3.mjs +107 -0
- package/dist/preview-DLexxwp3.mjs.map +1 -0
- package/dist/protocol-79kUO7jP.d.mts +65 -0
- package/dist/protocol-79kUO7jP.d.mts.map +1 -0
- package/dist/public-plugin-api-routes-BuAMJ8nN.mjs +316 -0
- package/dist/public-plugin-api-routes-BuAMJ8nN.mjs.map +1 -0
- package/dist/public-submission-Di3TsgzX.mjs +251 -0
- package/dist/public-submission-Di3TsgzX.mjs.map +1 -0
- package/dist/public-url-Bt98vysr.mjs +101 -0
- package/dist/public-url-Bt98vysr.mjs.map +1 -0
- package/dist/query-CpnRlBh8.mjs +1156 -0
- package/dist/query-CpnRlBh8.mjs.map +1 -0
- package/dist/query-haKvLAWl.mjs +41 -0
- package/dist/query-haKvLAWl.mjs.map +1 -0
- package/dist/range-CYfeXgGK.mjs +51 -0
- package/dist/range-CYfeXgGK.mjs.map +1 -0
- package/dist/rate-limit-Xp4d0NBY.mjs +127 -0
- package/dist/rate-limit-Xp4d0NBY.mjs.map +1 -0
- package/dist/receipt-BUsQCOeM.mjs +43 -0
- package/dist/receipt-BUsQCOeM.mjs.map +1 -0
- package/dist/redirect-CQAV7mCo.mjs +19 -0
- package/dist/redirect-CQAV7mCo.mjs.map +1 -0
- package/dist/redirect-DiS_3mA4.mjs +423 -0
- package/dist/redirect-DiS_3mA4.mjs.map +1 -0
- package/dist/redirect-paths-CNYq7w80.mjs +36 -0
- package/dist/redirect-paths-CNYq7w80.mjs.map +1 -0
- package/dist/redirects-BEVSRMa2.mjs +148 -0
- package/dist/redirects-BEVSRMa2.mjs.map +1 -0
- package/dist/redirects-BHpy-VsZ.mjs +446 -0
- package/dist/redirects-BHpy-VsZ.mjs.map +1 -0
- package/dist/registry/testing.mjs +3 -3
- package/dist/registry-TUVaid9Z.mjs +8369 -0
- package/dist/registry-TUVaid9Z.mjs.map +1 -0
- package/dist/relations-CA_QuMTU.mjs +776 -0
- package/dist/relations-CA_QuMTU.mjs.map +1 -0
- package/dist/request-context.d.mts +1 -1
- package/dist/request-meta-bwZ_NsvU.mjs +141 -0
- package/dist/request-meta-bwZ_NsvU.mjs.map +1 -0
- package/dist/resolve-DwNM-CXl.mjs +101 -0
- package/dist/resolve-DwNM-CXl.mjs.map +1 -0
- package/dist/revision-BVp8S0e_.mjs +374 -0
- package/dist/revision-BVp8S0e_.mjs.map +1 -0
- package/dist/route-cache-QSOyDEw0.mjs +20 -0
- package/dist/route-cache-QSOyDEw0.mjs.map +1 -0
- package/dist/route-wire-Ca_HWCZ5.mjs +197 -0
- package/dist/route-wire-Ca_HWCZ5.mjs.map +1 -0
- package/dist/routes-BerZFrvV.mjs +272 -0
- package/dist/routes-BerZFrvV.mjs.map +1 -0
- package/dist/runner-BObHz5FC.d.mts +68 -0
- package/dist/runner-BObHz5FC.d.mts.map +1 -0
- package/dist/runner-C5NeAkBQ.mjs +6595 -0
- package/dist/runner-C5NeAkBQ.mjs.map +1 -0
- package/dist/runtime.d.mts +13 -13
- package/dist/runtime.mjs +3 -2
- package/dist/runtime.mjs.map +1 -1
- package/dist/schema/project-env-types.mjs +39 -35
- package/dist/schema/project-env-types.mjs.map +1 -1
- package/dist/schema-C4OBuv6Z.mjs +13 -0
- package/dist/schema-C4OBuv6Z.mjs.map +1 -0
- package/dist/schema-DJRfvM_o.mjs +815 -0
- package/dist/schema-DJRfvM_o.mjs.map +1 -0
- package/dist/scopes-BU03K7Uo.mjs +34 -0
- package/dist/scopes-BU03K7Uo.mjs.map +1 -0
- package/dist/search-DfVzks89.mjs +450 -0
- package/dist/search-DfVzks89.mjs.map +1 -0
- package/dist/sections-BMy4JVUz.mjs +346 -0
- package/dist/sections-BMy4JVUz.mjs.map +1 -0
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +37 -33
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +24 -20
- package/dist/seo/index.mjs.map +1 -1
- package/dist/seo-ClB-dw9w.mjs +188 -0
- package/dist/seo-ClB-dw9w.mjs.map +1 -0
- package/dist/seo-VZYOEy8f.mjs +133 -0
- package/dist/seo-VZYOEy8f.mjs.map +1 -0
- package/dist/service-Bo_usgSk.mjs +150 -0
- package/dist/service-Bo_usgSk.mjs.map +1 -0
- package/dist/session-user-DlpPdf8L.mjs +61 -0
- package/dist/session-user-DlpPdf8L.mjs.map +1 -0
- package/dist/settings-CWb84sDm.mjs +452 -0
- package/dist/settings-CWb84sDm.mjs.map +1 -0
- package/dist/settings-DS914jjE.mjs +66 -0
- package/dist/settings-DS914jjE.mjs.map +1 -0
- package/dist/settings-Dd1uivmQ.mjs +73 -0
- package/dist/settings-Dd1uivmQ.mjs.map +1 -0
- package/dist/setup-complete-BuNxAUiN.mjs +65 -0
- package/dist/setup-complete-BuNxAUiN.mjs.map +1 -0
- package/dist/setup-nonce-BnEAX0iy.mjs +25 -0
- package/dist/setup-nonce-BnEAX0iy.mjs.map +1 -0
- package/dist/site-domain-Bq5j5bVg.mjs +131 -0
- package/dist/site-domain-Bq5j5bVg.mjs.map +1 -0
- package/dist/site-settings-DRHfX7bq.mjs +50 -0
- package/dist/site-settings-DRHfX7bq.mjs.map +1 -0
- package/dist/site-url-MB685I5X.mjs +45 -0
- package/dist/site-url-MB685I5X.mjs.map +1 -0
- package/dist/sitemap-name-BTg2NJJv.mjs +26 -0
- package/dist/sitemap-name-BTg2NJJv.mjs.map +1 -0
- package/dist/slug-aVnUV4SL.mjs +16 -0
- package/dist/slug-aVnUV4SL.mjs.map +1 -0
- package/dist/snapshot-DYsG4uOq.mjs +414 -0
- package/dist/snapshot-DYsG4uOq.mjs.map +1 -0
- package/dist/ssrf-BcYjyM4M.mjs +406 -0
- package/dist/ssrf-BcYjyM4M.mjs.map +1 -0
- package/dist/stage-D8DWgPcO.mjs +662 -0
- package/dist/stage-D8DWgPcO.mjs.map +1 -0
- package/dist/staged-CD_imitH.mjs +686 -0
- package/dist/staged-CD_imitH.mjs.map +1 -0
- package/dist/state-CFbGZziM.mjs +178 -0
- package/dist/state-CFbGZziM.mjs.map +1 -0
- package/dist/status-BFNdxzKc.mjs +30 -0
- package/dist/status-BFNdxzKc.mjs.map +1 -0
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +3 -3
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/storage-query-DRyu3bSU.d.mts +1615 -0
- package/dist/storage-query-DRyu3bSU.d.mts.map +1 -0
- package/dist/tar-DFjExb9X.mjs +449 -0
- package/dist/tar-DFjExb9X.mjs.map +1 -0
- package/dist/target-CWZs2-o6.mjs +27 -0
- package/dist/target-CWZs2-o6.mjs.map +1 -0
- package/dist/taxonomies-ChnU7Mc8.mjs +697 -0
- package/dist/taxonomies-ChnU7Mc8.mjs.map +1 -0
- package/dist/taxonomies-Dd9JJv_a.mjs +939 -0
- package/dist/taxonomies-Dd9JJv_a.mjs.map +1 -0
- package/dist/taxonomy-C_C_LBAU.mjs +550 -0
- package/dist/taxonomy-C_C_LBAU.mjs.map +1 -0
- package/dist/tokens-BnhSnGwJ.mjs +171 -0
- package/dist/tokens-BnhSnGwJ.mjs.map +1 -0
- package/dist/transfer-ClH6w6BV.mjs +8873 -0
- package/dist/transfer-ClH6w6BV.mjs.map +1 -0
- package/dist/transfer-WmWiR3xf.mjs +166 -0
- package/dist/transfer-WmWiR3xf.mjs.map +1 -0
- package/dist/transfer-download--ofRj9Cw.mjs +33 -0
- package/dist/transfer-download--ofRj9Cw.mjs.map +1 -0
- package/dist/transformations-Bx4lYY0Y.mjs +196 -0
- package/dist/transformations-Bx4lYY0Y.mjs.map +1 -0
- package/dist/transport-BjbqNiPI.mjs +136 -0
- package/dist/transport-BjbqNiPI.mjs.map +1 -0
- package/dist/transport-DxiXnbXk.d.mts +42 -0
- package/dist/transport-DxiXnbXk.d.mts.map +1 -0
- package/dist/trusted-proxy-BU3Nx9g1.mjs +51 -0
- package/dist/trusted-proxy-BU3Nx9g1.mjs.map +1 -0
- package/dist/turnstile-CJwvsOqw.mjs +58 -0
- package/dist/turnstile-CJwvsOqw.mjs.map +1 -0
- package/dist/types-BA3ey2QH.d.mts +87 -0
- package/dist/types-BA3ey2QH.d.mts.map +1 -0
- package/dist/types-Bwpzb5o6.d.mts +227 -0
- package/dist/types-Bwpzb5o6.d.mts.map +1 -0
- package/dist/types-CNB-dj6F.d.mts +289 -0
- package/dist/types-CNB-dj6F.d.mts.map +1 -0
- package/dist/types-CgfFGfO5.mjs +16 -0
- package/dist/types-CgfFGfO5.mjs.map +1 -0
- package/dist/types-D2NEXtgB.mjs +127 -0
- package/dist/types-D2NEXtgB.mjs.map +1 -0
- package/dist/types-DCFavOii.d.mts +916 -0
- package/dist/types-DCFavOii.d.mts.map +1 -0
- package/dist/types-DHO7Pd25.d.mts +366 -0
- package/dist/types-DHO7Pd25.d.mts.map +1 -0
- package/dist/types-DvqVxZXa.d.mts +125 -0
- package/dist/types-DvqVxZXa.d.mts.map +1 -0
- package/dist/types-QoPHm-2w.d.mts +1741 -0
- package/dist/types-QoPHm-2w.d.mts.map +1 -0
- package/dist/types-RLgeIpnF.d.mts +374 -0
- package/dist/types-RLgeIpnF.d.mts.map +1 -0
- package/dist/types-qHVygneX.mjs +77 -0
- package/dist/types-qHVygneX.mjs.map +1 -0
- package/dist/types-sUHaH7lC.mjs +37 -0
- package/dist/types-sUHaH7lC.mjs.map +1 -0
- package/dist/types-slSqujQL.d.mts +204 -0
- package/dist/types-slSqujQL.d.mts.map +1 -0
- package/dist/update-check-BxNg9T6N.mjs +161 -0
- package/dist/update-check-BxNg9T6N.mjs.map +1 -0
- package/dist/upload-attempts-DPFC4COv.mjs +32 -0
- package/dist/upload-attempts-DPFC4COv.mjs.map +1 -0
- package/dist/url-pattern-QATUE_rv.mjs +41 -0
- package/dist/url-pattern-QATUE_rv.mjs.map +1 -0
- package/dist/user-BlCTKVAm.mjs +171 -0
- package/dist/user-BlCTKVAm.mjs.map +1 -0
- package/dist/utils-TPt7w2cS.mjs +442 -0
- package/dist/utils-TPt7w2cS.mjs.map +1 -0
- package/dist/validate-DxYhJQA-.mjs +524 -0
- package/dist/validate-DxYhJQA-.mjs.map +1 -0
- package/dist/validate-emKxGC5F.d.mts +468 -0
- package/dist/validate-emKxGC5F.d.mts.map +1 -0
- package/dist/validation-Ckq4vsVg.mjs +220 -0
- package/dist/validation-Ckq4vsVg.mjs.map +1 -0
- package/dist/version-BZj18Q7G.mjs +9 -0
- package/dist/version-BZj18Q7G.mjs.map +1 -0
- package/dist/version-DHmGpcch.mjs +7 -0
- package/dist/version-DHmGpcch.mjs.map +1 -0
- package/dist/video-DytCnw3L.mjs +54 -0
- package/dist/video-DytCnw3L.mjs.map +1 -0
- package/dist/virtual-modules-DO954n7P.mjs +515 -0
- package/dist/virtual-modules-DO954n7P.mjs.map +1 -0
- package/dist/widgets-DA5XmvVC.mjs +121 -0
- package/dist/widgets-DA5XmvVC.mjs.map +1 -0
- package/dist/wxr-taxonomies-CrMonejI.d.mts +34 -0
- package/dist/wxr-taxonomies-CrMonejI.d.mts.map +1 -0
- package/dist/wxr-taxonomies-RgRG0d5e.mjs +453 -0
- package/dist/wxr-taxonomies-RgRG0d5e.mjs.map +1 -0
- package/dist/zod-generator-D0JKy94C.mjs +424 -0
- package/dist/zod-generator-D0JKy94C.mjs.map +1 -0
- package/package.json +7 -6
- package/src/api/authorize.ts +42 -0
- package/src/api/handlers/dashboard.ts +33 -10
- package/src/api/handlers/manifest.ts +1 -0
- package/src/api/handlers/plugins.ts +1 -0
- package/src/api/handlers/revision.ts +6 -2
- package/src/api/handlers/site-domain.ts +26 -10
- package/src/api/schemas/settings.ts +2 -0
- package/src/api/types.ts +2 -0
- package/src/astro/integration/dev-scheduler-bridge.ts +91 -0
- package/src/astro/integration/index.ts +48 -1
- package/src/astro/integration/routes.ts +8 -0
- package/src/astro/integration/runtime.ts +2 -1
- package/src/astro/integration/virtual-modules.ts +9 -16
- package/src/astro/integration/vite-config.ts +4 -15
- package/src/astro/middleware/auth.ts +3 -1
- package/src/astro/middleware/redirect.ts +71 -42
- package/src/astro/middleware.ts +18 -3
- package/src/astro/prefetch.ts +7 -5
- package/src/astro/public-plugin-api-routes.ts +10 -2
- package/src/astro/routes/api/admin/plugins/registry/artifact.ts +1 -1
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id]/duplicate.ts +1 -5
- package/src/astro/routes/api/content/[collection]/[id]/lock.ts +2 -2
- package/src/astro/routes/api/content/[collection]/[id]/permanent.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id]/restore.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +3 -2
- package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +5 -4
- package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id].ts +18 -6
- package/src/astro/routes/api/content/[collection]/index.ts +1 -5
- package/src/astro/routes/api/dashboard.ts +4 -1
- package/src/astro/routes/api/dev/scheduled-tasks.ts +20 -0
- package/src/astro/routes/api/import/wordpress/analyze.ts +1 -16
- package/src/astro/routes/api/import/wordpress/execute.ts +8 -3
- package/src/astro/routes/api/import/wordpress-plugin/analyze.ts +4 -1
- package/src/astro/routes/api/import/wordpress-plugin/execute.ts +34 -5
- package/src/astro/routes/api/menus/[name]/items/[id].ts +3 -2
- package/src/astro/routes/api/menus/[name]/items.ts +2 -1
- package/src/astro/routes/api/menus/[name]/reorder.ts +2 -1
- package/src/astro/routes/api/menus/[name]/translations.ts +2 -1
- package/src/astro/routes/api/menus/[name].ts +3 -2
- package/src/astro/routes/api/menus/index.ts +2 -1
- package/src/astro/routes/api/redirects/[id].ts +15 -2
- package/src/astro/routes/api/redirects/index.ts +5 -1
- package/src/astro/routes/api/settings/domain.ts +2 -1
- package/src/astro/routes/api/settings.ts +2 -1
- package/src/astro/routes/api/setup/admin-verify.ts +7 -1
- package/src/astro/routes/api/taxonomies/[name]/reorder.ts +2 -1
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug]/translations.ts +2 -1
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug].ts +3 -2
- package/src/astro/routes/api/taxonomies/[name]/terms/index.ts +2 -1
- package/src/astro/routes/api/taxonomies/[name].ts +3 -2
- package/src/astro/routes/api/taxonomies/index.ts +2 -1
- package/src/astro/routes/api/widget-areas/[name]/reorder.ts +2 -1
- package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +3 -2
- package/src/astro/routes/api/widget-areas/[name]/widgets.ts +2 -1
- package/src/astro/routes/api/widget-areas/[name].ts +2 -1
- package/src/astro/routes/api/widget-areas/index.ts +2 -1
- package/src/astro/routes/robots.txt.ts +33 -2
- package/src/astro/types.ts +10 -1
- package/src/auth/types.ts +4 -4
- package/src/cache/redirect-paths.ts +56 -0
- package/src/cache/route-cache.ts +22 -0
- package/src/cli/commands/import/wordpress.ts +3 -27
- package/src/cli/commands/login.ts +35 -43
- package/src/cli/commands/migrate.ts +36 -4
- package/src/cli/commands/seed.ts +18 -8
- package/src/cli/wxr/parser.ts +2 -2
- package/src/client/index.ts +12 -2
- package/src/client/portable-text.ts +21 -7
- package/src/comments/query.ts +8 -2
- package/src/components/CommentForm.astro +2 -2
- package/src/components/Comments.astro +1 -1
- package/src/components/InlinePortableTextEditor.tsx +152 -1325
- package/src/components/inline-block-types.ts +278 -0
- package/src/components/inline-bubble-menu.tsx +696 -0
- package/src/components/inline-editor-ui.tsx +1192 -0
- package/src/components/inline-image.tsx +722 -0
- package/src/components/inline-media-picker.tsx +1221 -0
- package/src/components/inline-slash-menu.tsx +556 -0
- package/src/database/collection-cleanup.ts +30 -0
- package/src/database/datetime-storage.ts +337 -60
- package/src/database/migration-lock.ts +43 -7
- package/src/database/repositories/content.ts +3 -1
- package/src/database/repositories/plugin-storage.ts +109 -8
- package/src/database/repositories/revision.ts +24 -6
- package/src/database/repositories/types.ts +65 -7
- package/src/emdash-runtime.ts +176 -160
- package/src/import/index.ts +1 -0
- package/src/import/registry.ts +17 -0
- package/src/import/sources/wordpress-plugin.ts +151 -9
- package/src/import/types.ts +3 -0
- package/src/import/utils.ts +5 -0
- package/src/loader.ts +36 -2
- package/src/mcp/json-schema.ts +14 -0
- package/src/mcp/plugin-tool-name.ts +36 -0
- package/src/mcp/server.ts +74 -15
- package/src/media/usage/collection-deletion.ts +4 -0
- package/src/migrations/direct-executor.ts +42 -12
- package/src/migrations/protocol.ts +6 -2
- package/src/plugins/adapt-sandbox-entry.ts +16 -6
- package/src/plugins/state.ts +5 -8
- package/src/query.ts +51 -10
- package/src/redirects/cache.ts +34 -2
- package/src/schema/block-values.ts +80 -17
- package/src/schema/registry.ts +9 -1
- package/src/search/query.ts +3 -1
- package/src/seed/apply.ts +32 -8
- package/src/settings/index.ts +20 -0
- package/src/settings/types.ts +2 -0
- package/src/visual-editing/toolbar.ts +46 -12
- package/dist/action-token-BdWad2YG.mjs +0 -26
- package/dist/action-token-BdWad2YG.mjs.map +0 -1
- package/dist/activation-xomsCMJg.mjs +0 -387
- package/dist/activation-xomsCMJg.mjs.map +0 -1
- package/dist/adapters-B4-nbElt.d.mts +0 -173
- package/dist/adapters-B4-nbElt.d.mts.map +0 -1
- package/dist/allowed-origins-CLpHGGlc.mjs +0 -116
- package/dist/allowed-origins-CLpHGGlc.mjs.map +0 -1
- package/dist/api-DBw_IWoi.mjs +0 -5024
- package/dist/api-DBw_IWoi.mjs.map +0 -1
- package/dist/api-tokens-B0ZipcZ-.mjs +0 -173
- package/dist/api-tokens-B0ZipcZ-.mjs.map +0 -1
- package/dist/apply-Cx48saFC.mjs +0 -1680
- package/dist/apply-Cx48saFC.mjs.map +0 -1
- package/dist/approvals-BXgtXA2s.mjs +0 -460
- package/dist/approvals-BXgtXA2s.mjs.map +0 -1
- package/dist/artifact-fetch-DsRczRGG.mjs +0 -659
- package/dist/artifact-fetch-DsRczRGG.mjs.map +0 -1
- package/dist/artifacts-D-O-qj9C.mjs +0 -307
- package/dist/artifacts-D-O-qj9C.mjs.map +0 -1
- package/dist/audit-CCH3MA4Y.mjs +0 -127
- package/dist/audit-CCH3MA4Y.mjs.map +0 -1
- package/dist/authoritative-records-Dcs7l2H5.mjs +0 -5183
- package/dist/authoritative-records-Dcs7l2H5.mjs.map +0 -1
- package/dist/authorize-TdIGpRSE.mjs +0 -49
- package/dist/authorize-TdIGpRSE.mjs.map +0 -1
- package/dist/backup-CZt5Mzwx.mjs +0 -246
- package/dist/backup-CZt5Mzwx.mjs.map +0 -1
- package/dist/block-types-DHnkzE6u.mjs +0 -132
- package/dist/block-types-DHnkzE6u.mjs.map +0 -1
- package/dist/block-values-C4N_F2-G.mjs +0 -175
- package/dist/block-values-C4N_F2-G.mjs.map +0 -1
- package/dist/byline-BmVKOQ8l.mjs +0 -909
- package/dist/byline-BmVKOQ8l.mjs.map +0 -1
- package/dist/byline-fields-B8SDs3M_.mjs +0 -123
- package/dist/byline-fields-B8SDs3M_.mjs.map +0 -1
- package/dist/byline-fields-Bze3ZdAw.mjs +0 -280
- package/dist/byline-fields-Bze3ZdAw.mjs.map +0 -1
- package/dist/bylines-CHhR28r9.mjs +0 -150
- package/dist/bylines-CHhR28r9.mjs.map +0 -1
- package/dist/bylines-DZS4OflA.mjs +0 -234
- package/dist/bylines-DZS4OflA.mjs.map +0 -1
- package/dist/cache-x0z8t_m9.mjs +0 -133
- package/dist/cache-x0z8t_m9.mjs.map +0 -1
- package/dist/canonical-BUcKRYpG.mjs +0 -174
- package/dist/canonical-BUcKRYpG.mjs.map +0 -1
- package/dist/capture-triggers-C9JKoIdT.mjs +0 -362
- package/dist/capture-triggers-C9JKoIdT.mjs.map +0 -1
- package/dist/challenge-store-BHgdPVze.mjs +0 -51
- package/dist/challenge-store-BHgdPVze.mjs.map +0 -1
- package/dist/checksum-BYR5i7qe.mjs +0 -162
- package/dist/checksum-BYR5i7qe.mjs.map +0 -1
- package/dist/chunks-Dr5Vr0zA.mjs +0 -25
- package/dist/chunks-Dr5Vr0zA.mjs.map +0 -1
- package/dist/collection-slugs-cache-B2Gs9Jwx.mjs +0 -85
- package/dist/collection-slugs-cache-B2Gs9Jwx.mjs.map +0 -1
- package/dist/comment-CWla6OHV.mjs +0 -325
- package/dist/comment-CWla6OHV.mjs.map +0 -1
- package/dist/comment-reaction-RZrcs5cW.mjs +0 -85
- package/dist/comment-reaction-RZrcs5cW.mjs.map +0 -1
- package/dist/comments-BzmIKVb2.mjs +0 -99
- package/dist/comments-BzmIKVb2.mjs.map +0 -1
- package/dist/comments-Da_dI2O1.mjs +0 -195
- package/dist/comments-Da_dI2O1.mjs.map +0 -1
- package/dist/components-oFXumpf5.mjs +0 -112
- package/dist/components-oFXumpf5.mjs.map +0 -1
- package/dist/config--wamYxBW.d.mts +0 -39
- package/dist/config--wamYxBW.d.mts.map +0 -1
- package/dist/config-Bo4eOOdV.mjs +0 -228
- package/dist/config-Bo4eOOdV.mjs.map +0 -1
- package/dist/config-C4-UxIk7.d.mts +0 -6790
- package/dist/config-C4-UxIk7.d.mts.map +0 -1
- package/dist/connection-UpzYxtE2.mjs +0 -36
- package/dist/connection-UpzYxtE2.mjs.map +0 -1
- package/dist/content-CcHrqkgp.mjs +0 -2072
- package/dist/content-CcHrqkgp.mjs.map +0 -1
- package/dist/content-list-query-Bxxdd9fv.d.mts +0 -26
- package/dist/content-list-query-Bxxdd9fv.d.mts.map +0 -1
- package/dist/content-repair-havk1F0-.mjs +0 -442
- package/dist/content-repair-havk1F0-.mjs.map +0 -1
- package/dist/context-CvhgHgSH.mjs +0 -2043
- package/dist/context-CvhgHgSH.mjs.map +0 -1
- package/dist/credits-CygUrPOi.mjs +0 -110
- package/dist/credits-CygUrPOi.mjs.map +0 -1
- package/dist/cron-C6ytTOLw.mjs +0 -306
- package/dist/cron-C6ytTOLw.mjs.map +0 -1
- package/dist/dashboard-7_FYfafc.mjs +0 -151
- package/dist/dashboard-7_FYfafc.mjs.map +0 -1
- package/dist/default-CHCUkV4Z.mjs +0 -81
- package/dist/default-CHCUkV4Z.mjs.map +0 -1
- package/dist/deferred-tasks-G0xhcJTl.d.mts +0 -9
- package/dist/deferred-tasks-G0xhcJTl.d.mts.map +0 -1
- package/dist/dev-typegen-Dtl8AfS6.mjs +0 -29
- package/dist/dev-typegen-Dtl8AfS6.mjs.map +0 -1
- package/dist/device-flow-CzDJmQ1q.mjs +0 -521
- package/dist/device-flow-CzDJmQ1q.mjs.map +0 -1
- package/dist/digest-xJmyPv2r.mjs +0 -194
- package/dist/digest-xJmyPv2r.mjs.map +0 -1
- package/dist/direct-executor-BXiYIVJ9.mjs +0 -104
- package/dist/direct-executor-BXiYIVJ9.mjs.map +0 -1
- package/dist/email-console-7ZPApLlm.mjs +0 -50
- package/dist/email-console-7ZPApLlm.mjs.map +0 -1
- package/dist/email-locale-DFdUA6UF.mjs +0 -25
- package/dist/email-locale-DFdUA6UF.mjs.map +0 -1
- package/dist/emdash-runtime-C4oFeVpN.mjs +0 -4363
- package/dist/emdash-runtime-C4oFeVpN.mjs.map +0 -1
- package/dist/entry-lock-B4n0HdQ_.mjs +0 -163
- package/dist/entry-lock-B4n0HdQ_.mjs.map +0 -1
- package/dist/entry-lock-BAAlKYrz.d.mts +0 -4566
- package/dist/entry-lock-BAAlKYrz.d.mts.map +0 -1
- package/dist/entry-lock-Cjz0h45X.mjs +0 -1209
- package/dist/entry-lock-Cjz0h45X.mjs.map +0 -1
- package/dist/env-types-4bkF6Bqg.mjs +0 -38
- package/dist/env-types-4bkF6Bqg.mjs.map +0 -1
- package/dist/error-DxgQdaZ_.mjs +0 -90
- package/dist/error-DxgQdaZ_.mjs.map +0 -1
- package/dist/errors-CjtE5aWF.mjs +0 -120
- package/dist/errors-CjtE5aWF.mjs.map +0 -1
- package/dist/errors-hskQ0C8G.mjs +0 -479
- package/dist/errors-hskQ0C8G.mjs.map +0 -1
- package/dist/escape-ESFhYzwG.mjs +0 -9
- package/dist/escape-ESFhYzwG.mjs.map +0 -1
- package/dist/fence-vc3aHgRA.mjs +0 -162
- package/dist/fence-vc3aHgRA.mjs.map +0 -1
- package/dist/field-defs-cache-zoow36nz.mjs +0 -77
- package/dist/field-defs-cache-zoow36nz.mjs.map +0 -1
- package/dist/field-map-JD1wG0Tq.mjs +0 -83
- package/dist/field-map-JD1wG0Tq.mjs.map +0 -1
- package/dist/fts-manager-WJCN8uU6.mjs +0 -443
- package/dist/fts-manager-WJCN8uU6.mjs.map +0 -1
- package/dist/gc-CsGZiKdH.mjs +0 -75
- package/dist/gc-CsGZiKdH.mjs.map +0 -1
- package/dist/hash-C4DFoJ7Z.mjs +0 -37
- package/dist/hash-C4DFoJ7Z.mjs.map +0 -1
- package/dist/hook-result-CXjtMk7Q.d.mts +0 -31
- package/dist/hook-result-CXjtMk7Q.d.mts.map +0 -1
- package/dist/hreflang-BAma7iRr.mjs +0 -105
- package/dist/hreflang-BAma7iRr.mjs.map +0 -1
- package/dist/hreflang-BsYo4x_M.d.mts +0 -50
- package/dist/hreflang-BsYo4x_M.d.mts.map +0 -1
- package/dist/http-route-dispatch-C8G7hAK6.mjs +0 -342
- package/dist/http-route-dispatch-C8G7hAK6.mjs.map +0 -1
- package/dist/identity-BwBKM1fH.mjs +0 -35
- package/dist/identity-BwBKM1fH.mjs.map +0 -1
- package/dist/import-DJ3Z2wxE.mjs +0 -2021
- package/dist/import-DJ3Z2wxE.mjs.map +0 -1
- package/dist/index-DYsn97dY.d.mts +0 -623
- package/dist/index-DYsn97dY.d.mts.map +0 -1
- package/dist/install-finalization-DCFnFSHv.mjs +0 -58
- package/dist/install-finalization-DCFnFSHv.mjs.map +0 -1
- package/dist/keys-CGvAndSp.mjs +0 -61
- package/dist/keys-CGvAndSp.mjs.map +0 -1
- package/dist/kinds-DT1W4T4Y.mjs +0 -974
- package/dist/kinds-DT1W4T4Y.mjs.map +0 -1
- package/dist/lifecycle-BzglCSY0.mjs +0 -25
- package/dist/lifecycle-BzglCSY0.mjs.map +0 -1
- package/dist/load-DjUqmf3s.mjs +0 -28
- package/dist/load-DjUqmf3s.mjs.map +0 -1
- package/dist/loader-CetY659y.mjs +0 -1355
- package/dist/loader-CetY659y.mjs.map +0 -1
- package/dist/loops-DkT1zkPH.mjs +0 -205
- package/dist/loops-DkT1zkPH.mjs.map +0 -1
- package/dist/manifest-builder-BOFCd9rX.mjs +0 -189
- package/dist/manifest-builder-BOFCd9rX.mjs.map +0 -1
- package/dist/manifest-schema-BiFBPEsp.mjs +0 -497
- package/dist/manifest-schema-BiFBPEsp.mjs.map +0 -1
- package/dist/marketplace-CUlenvZm.mjs +0 -257
- package/dist/marketplace-CUlenvZm.mjs.map +0 -1
- package/dist/media-CRKsKlfK.mjs +0 -416
- package/dist/media-CRKsKlfK.mjs.map +0 -1
- package/dist/media-C_z7sRuC.mjs +0 -294
- package/dist/media-C_z7sRuC.mjs.map +0 -1
- package/dist/media-IT8hQleU.mjs +0 -373
- package/dist/media-IT8hQleU.mjs.map +0 -1
- package/dist/media-allowlist-Ct6wvnT2.mjs +0 -45
- package/dist/media-allowlist-Ct6wvnT2.mjs.map +0 -1
- package/dist/media-folders-DtMt-vAA.mjs +0 -210
- package/dist/media-folders-DtMt-vAA.mjs.map +0 -1
- package/dist/media-url-BpXLqCmf.mjs +0 -43
- package/dist/media-url-BpXLqCmf.mjs.map +0 -1
- package/dist/media-usage-DEPHZZ9X.mjs +0 -282
- package/dist/media-usage-DEPHZZ9X.mjs.map +0 -1
- package/dist/media-usage-activation-V2Siabtw.mjs +0 -78
- package/dist/media-usage-activation-V2Siabtw.mjs.map +0 -1
- package/dist/media-usage-work-Cv1OE59F.mjs +0 -151
- package/dist/media-usage-work-Cv1OE59F.mjs.map +0 -1
- package/dist/media-usage-work-cgDYGvrt.mjs +0 -1015
- package/dist/media-usage-work-cgDYGvrt.mjs.map +0 -1
- package/dist/menus-CvVYfsuk.mjs +0 -753
- package/dist/menus-CvVYfsuk.mjs.map +0 -1
- package/dist/menus-D1HC8npj.mjs +0 -92
- package/dist/menus-D1HC8npj.mjs.map +0 -1
- package/dist/menus-DL8IPIcm.mjs +0 -3721
- package/dist/menus-DL8IPIcm.mjs.map +0 -1
- package/dist/mode-eieqAWLe.mjs +0 -23
- package/dist/mode-eieqAWLe.mjs.map +0 -1
- package/dist/node-sqlite-compat-VuyzJw1b.mjs +0 -63
- package/dist/node-sqlite-compat-VuyzJw1b.mjs.map +0 -1
- package/dist/oauth-authorization-B6ZJbMd2.mjs +0 -274
- package/dist/oauth-authorization-B6ZJbMd2.mjs.map +0 -1
- package/dist/oauth-clients-DVjRc9v3.mjs +0 -266
- package/dist/oauth-clients-DVjRc9v3.mjs.map +0 -1
- package/dist/oauth-state-store-CnmYYsVQ.mjs +0 -50
- package/dist/oauth-state-store-CnmYYsVQ.mjs.map +0 -1
- package/dist/oauth-user-lookup-Dz1_R5vT.mjs +0 -26
- package/dist/oauth-user-lookup-Dz1_R5vT.mjs.map +0 -1
- package/dist/options-BR9XZl7h.d.mts +0 -81
- package/dist/options-BR9XZl7h.d.mts.map +0 -1
- package/dist/ownership-COPyVysP.mjs +0 -12
- package/dist/ownership-COPyVysP.mjs.map +0 -1
- package/dist/parse-BOGhrwSq.d.mts +0 -174
- package/dist/parse-BOGhrwSq.d.mts.map +0 -1
- package/dist/parse-Cn5aSk1N.mjs +0 -81
- package/dist/parse-Cn5aSk1N.mjs.map +0 -1
- package/dist/passkey-config-mMFRQUCj.mjs +0 -46
- package/dist/passkey-config-mMFRQUCj.mjs.map +0 -1
- package/dist/paths-BmcAdBo9.mjs +0 -77
- package/dist/paths-BmcAdBo9.mjs.map +0 -1
- package/dist/placeholder-nOep3_Gn.d.mts +0 -306
- package/dist/placeholder-nOep3_Gn.d.mts.map +0 -1
- package/dist/plan-CDY4K8CH.mjs +0 -135
- package/dist/plan-CDY4K8CH.mjs.map +0 -1
- package/dist/plugins-DFBpfbO3.mjs +0 -261
- package/dist/plugins-DFBpfbO3.mjs.map +0 -1
- package/dist/policy-B_2qnHSy.mjs +0 -45
- package/dist/policy-B_2qnHSy.mjs.map +0 -1
- package/dist/portable-text-Dc2YAusw.mjs +0 -307
- package/dist/portable-text-Dc2YAusw.mjs.map +0 -1
- package/dist/preview-BtzikJ9O.mjs +0 -107
- package/dist/preview-BtzikJ9O.mjs.map +0 -1
- package/dist/protocol-M268ox8L.d.mts +0 -61
- package/dist/protocol-M268ox8L.d.mts.map +0 -1
- package/dist/public-submission-BQZavgZU.mjs +0 -251
- package/dist/public-submission-BQZavgZU.mjs.map +0 -1
- package/dist/public-url-uT1Ok2Tu.mjs +0 -101
- package/dist/public-url-uT1Ok2Tu.mjs.map +0 -1
- package/dist/query-BGG3sDEd.mjs +0 -1127
- package/dist/query-BGG3sDEd.mjs.map +0 -1
- package/dist/query-C_CWlifp.mjs +0 -41
- package/dist/query-C_CWlifp.mjs.map +0 -1
- package/dist/range-CXK_kDbI.mjs +0 -51
- package/dist/range-CXK_kDbI.mjs.map +0 -1
- package/dist/rate-limit-Dvamvay-.mjs +0 -127
- package/dist/rate-limit-Dvamvay-.mjs.map +0 -1
- package/dist/receipt-BmQGzquP.mjs +0 -43
- package/dist/receipt-BmQGzquP.mjs.map +0 -1
- package/dist/redirect-B39kTQ_0.mjs +0 -423
- package/dist/redirect-B39kTQ_0.mjs.map +0 -1
- package/dist/redirect-BguJ00Pv.mjs +0 -19
- package/dist/redirect-BguJ00Pv.mjs.map +0 -1
- package/dist/redirects-C8G4BsfP.mjs +0 -446
- package/dist/redirects-C8G4BsfP.mjs.map +0 -1
- package/dist/redirects-DFT7Wr-e.mjs +0 -148
- package/dist/redirects-DFT7Wr-e.mjs.map +0 -1
- package/dist/registry-DeZ27gVi.mjs +0 -8374
- package/dist/registry-DeZ27gVi.mjs.map +0 -1
- package/dist/relations-DBB1bRJW.mjs +0 -776
- package/dist/relations-DBB1bRJW.mjs.map +0 -1
- package/dist/request-meta-BSvkhIBX.mjs +0 -141
- package/dist/request-meta-BSvkhIBX.mjs.map +0 -1
- package/dist/resolve-BxH64HN9.mjs +0 -100
- package/dist/resolve-BxH64HN9.mjs.map +0 -1
- package/dist/revision-BWEH2qQB.mjs +0 -368
- package/dist/revision-BWEH2qQB.mjs.map +0 -1
- package/dist/route-wire-CwbWB_6O.mjs +0 -197
- package/dist/route-wire-CwbWB_6O.mjs.map +0 -1
- package/dist/routes-BfIxc7ft.mjs +0 -272
- package/dist/routes-BfIxc7ft.mjs.map +0 -1
- package/dist/runner-DkeafPBA.d.mts +0 -68
- package/dist/runner-DkeafPBA.d.mts.map +0 -1
- package/dist/runner-wqt4BrIW.mjs +0 -6383
- package/dist/runner-wqt4BrIW.mjs.map +0 -1
- package/dist/schema-BXIW-JHi.mjs +0 -815
- package/dist/schema-BXIW-JHi.mjs.map +0 -1
- package/dist/schema-I74JwYte.mjs +0 -13
- package/dist/schema-I74JwYte.mjs.map +0 -1
- package/dist/scopes-RWZ5ft_Z.mjs +0 -34
- package/dist/scopes-RWZ5ft_Z.mjs.map +0 -1
- package/dist/search-DxwagyWS.mjs +0 -450
- package/dist/search-DxwagyWS.mjs.map +0 -1
- package/dist/sections-Ccq9ZgyD.mjs +0 -346
- package/dist/sections-Ccq9ZgyD.mjs.map +0 -1
- package/dist/seo-CCnfPWAQ.mjs +0 -133
- package/dist/seo-CCnfPWAQ.mjs.map +0 -1
- package/dist/seo-QCtJ1jjV.mjs +0 -188
- package/dist/seo-QCtJ1jjV.mjs.map +0 -1
- package/dist/service-DX84s2rw.mjs +0 -150
- package/dist/service-DX84s2rw.mjs.map +0 -1
- package/dist/session-user-1dtJc2zv.mjs +0 -61
- package/dist/session-user-1dtJc2zv.mjs.map +0 -1
- package/dist/settings-B1jOxAIl.mjs +0 -443
- package/dist/settings-B1jOxAIl.mjs.map +0 -1
- package/dist/settings-Bc1IBl1t.mjs +0 -66
- package/dist/settings-Bc1IBl1t.mjs.map +0 -1
- package/dist/settings-GaZ5sVgg.mjs +0 -73
- package/dist/settings-GaZ5sVgg.mjs.map +0 -1
- package/dist/setup-complete-DidMAWJS.mjs +0 -65
- package/dist/setup-complete-DidMAWJS.mjs.map +0 -1
- package/dist/setup-nonce-DKl4S4c6.mjs +0 -25
- package/dist/setup-nonce-DKl4S4c6.mjs.map +0 -1
- package/dist/site-domain-CbI51Pc2.mjs +0 -113
- package/dist/site-domain-CbI51Pc2.mjs.map +0 -1
- package/dist/site-settings-CDdT4mVm.mjs +0 -50
- package/dist/site-settings-CDdT4mVm.mjs.map +0 -1
- package/dist/site-url-CrDZaAvo.mjs +0 -45
- package/dist/site-url-CrDZaAvo.mjs.map +0 -1
- package/dist/sitemap-name-W3BTor6X.mjs +0 -26
- package/dist/sitemap-name-W3BTor6X.mjs.map +0 -1
- package/dist/slug-BJhHKoOH.mjs +0 -16
- package/dist/slug-BJhHKoOH.mjs.map +0 -1
- package/dist/snapshot-BuI_2uDe.mjs +0 -414
- package/dist/snapshot-BuI_2uDe.mjs.map +0 -1
- package/dist/ssrf-LM_0wpGA.mjs +0 -406
- package/dist/ssrf-LM_0wpGA.mjs.map +0 -1
- package/dist/stage-DhzZuYaT.mjs +0 -662
- package/dist/stage-DhzZuYaT.mjs.map +0 -1
- package/dist/staged-DboEaWsV.mjs +0 -686
- package/dist/staged-DboEaWsV.mjs.map +0 -1
- package/dist/state-DCXDzjHq.mjs +0 -178
- package/dist/state-DCXDzjHq.mjs.map +0 -1
- package/dist/status-Dl85BK39.mjs +0 -30
- package/dist/status-Dl85BK39.mjs.map +0 -1
- package/dist/storage-query-BOBmeDMD.d.mts +0 -1615
- package/dist/storage-query-BOBmeDMD.d.mts.map +0 -1
- package/dist/tar-K40edFMt.mjs +0 -449
- package/dist/tar-K40edFMt.mjs.map +0 -1
- package/dist/target-BOighEY1.mjs +0 -27
- package/dist/target-BOighEY1.mjs.map +0 -1
- package/dist/taxonomies-DQSywBvX.mjs +0 -697
- package/dist/taxonomies-DQSywBvX.mjs.map +0 -1
- package/dist/taxonomies-Dj5eaobC.mjs +0 -939
- package/dist/taxonomies-Dj5eaobC.mjs.map +0 -1
- package/dist/taxonomy-QrNmTfIZ.mjs +0 -550
- package/dist/taxonomy-QrNmTfIZ.mjs.map +0 -1
- package/dist/tokens-j5L0as2H.mjs +0 -171
- package/dist/tokens-j5L0as2H.mjs.map +0 -1
- package/dist/transfer-CYEw8Tu4.mjs +0 -8873
- package/dist/transfer-CYEw8Tu4.mjs.map +0 -1
- package/dist/transfer-DDX10hkD.mjs +0 -166
- package/dist/transfer-DDX10hkD.mjs.map +0 -1
- package/dist/transfer-download-BAqq6GJv.mjs +0 -33
- package/dist/transfer-download-BAqq6GJv.mjs.map +0 -1
- package/dist/transformations-De44wqV_.mjs +0 -196
- package/dist/transformations-De44wqV_.mjs.map +0 -1
- package/dist/transport-1QjUhCRO.d.mts +0 -42
- package/dist/transport-1QjUhCRO.d.mts.map +0 -1
- package/dist/transport-Ds5pVX7p.mjs +0 -136
- package/dist/transport-Ds5pVX7p.mjs.map +0 -1
- package/dist/trusted-proxy-d4Tk6biT.mjs +0 -51
- package/dist/trusted-proxy-d4Tk6biT.mjs.map +0 -1
- package/dist/turnstile-DaFLtyrs.mjs +0 -58
- package/dist/turnstile-DaFLtyrs.mjs.map +0 -1
- package/dist/types-B4-1P2DK.d.mts +0 -227
- package/dist/types-B4-1P2DK.d.mts.map +0 -1
- package/dist/types-BKXA0f-c.mjs +0 -16
- package/dist/types-BKXA0f-c.mjs.map +0 -1
- package/dist/types-BiHcpUoO.d.mts +0 -374
- package/dist/types-BiHcpUoO.d.mts.map +0 -1
- package/dist/types-BihhvkyN.d.mts +0 -85
- package/dist/types-BihhvkyN.d.mts.map +0 -1
- package/dist/types-Bq9Wohd7.d.mts +0 -363
- package/dist/types-Bq9Wohd7.d.mts.map +0 -1
- package/dist/types-C-Xp0CcN.mjs +0 -103
- package/dist/types-C-Xp0CcN.mjs.map +0 -1
- package/dist/types-C4P7F1Vq.d.mts +0 -1741
- package/dist/types-C4P7F1Vq.d.mts.map +0 -1
- package/dist/types-CGaqwHw4.mjs +0 -37
- package/dist/types-CGaqwHw4.mjs.map +0 -1
- package/dist/types-D4ECCE4X.mjs +0 -77
- package/dist/types-D4ECCE4X.mjs.map +0 -1
- package/dist/types-DcRJp0vS.d.mts +0 -125
- package/dist/types-DcRJp0vS.d.mts.map +0 -1
- package/dist/types-Ff85fTzU.d.mts +0 -289
- package/dist/types-Ff85fTzU.d.mts.map +0 -1
- package/dist/types-UKr5Sf4y.d.mts +0 -916
- package/dist/types-UKr5Sf4y.d.mts.map +0 -1
- package/dist/types-YpN8hZW7.d.mts +0 -204
- package/dist/types-YpN8hZW7.d.mts.map +0 -1
- package/dist/update-check-DrlsK-tt.mjs +0 -161
- package/dist/update-check-DrlsK-tt.mjs.map +0 -1
- package/dist/upload-attempts-D8CPPvRU.mjs +0 -32
- package/dist/upload-attempts-D8CPPvRU.mjs.map +0 -1
- package/dist/url-pattern-Di4Nn3vP.mjs +0 -41
- package/dist/url-pattern-Di4Nn3vP.mjs.map +0 -1
- package/dist/user-B-ZdGjhI.mjs +0 -171
- package/dist/user-B-ZdGjhI.mjs.map +0 -1
- package/dist/utils-D7wL3r6-.mjs +0 -437
- package/dist/utils-D7wL3r6-.mjs.map +0 -1
- package/dist/validate-BSZbSUDk.mjs +0 -524
- package/dist/validate-BSZbSUDk.mjs.map +0 -1
- package/dist/validate-Dfv0DpZi.d.mts +0 -468
- package/dist/validate-Dfv0DpZi.d.mts.map +0 -1
- package/dist/validation-DRyC_Vm5.mjs +0 -219
- package/dist/validation-DRyC_Vm5.mjs.map +0 -1
- package/dist/version-C4kz0PcO.mjs +0 -7
- package/dist/version-C4kz0PcO.mjs.map +0 -1
- package/dist/version-jhs2BRtl.mjs +0 -9
- package/dist/version-jhs2BRtl.mjs.map +0 -1
- package/dist/video-DReZ48Un.mjs +0 -54
- package/dist/video-DReZ48Un.mjs.map +0 -1
- package/dist/virtual-modules-D0e6VbEv.mjs +0 -516
- package/dist/virtual-modules-D0e6VbEv.mjs.map +0 -1
- package/dist/widgets-BkcMzKct.mjs +0 -121
- package/dist/widgets-BkcMzKct.mjs.map +0 -1
- package/dist/wxr-taxonomies-BxI0CbTg.mjs +0 -453
- package/dist/wxr-taxonomies-BxI0CbTg.mjs.map +0 -1
- package/dist/wxr-taxonomies-Dad33GJi.d.mts +0 -34
- package/dist/wxr-taxonomies-Dad33GJi.d.mts.map +0 -1
- package/dist/zod-generator-BQilAboC.mjs +0 -424
- package/dist/zod-generator-BQilAboC.mjs.map +0 -1
- /package/dist/{api-tokens-D2zgAIEt.mjs → api-tokens-CdP49zVF.mjs} +0 -0
- /package/dist/{ssrf-BvNItdxk.mjs → ssrf-DM0E-D_8.mjs} +0 -0
|
@@ -0,0 +1,1221 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The inline editor's image picker: a popover that pages through the media
|
|
3
|
+
* library nine images at a time, and through any media providers the site
|
|
4
|
+
* has set up, like the admin's media dialog without uploading. A click, or
|
|
5
|
+
* the arrow keys and Enter, chooses an image.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
FloatingPortal,
|
|
10
|
+
autoUpdate,
|
|
11
|
+
flip,
|
|
12
|
+
offset,
|
|
13
|
+
shift,
|
|
14
|
+
size,
|
|
15
|
+
useFloating,
|
|
16
|
+
type VirtualElement,
|
|
17
|
+
} from "@floating-ui/react";
|
|
18
|
+
import {
|
|
19
|
+
ArrowSquareOut,
|
|
20
|
+
CaretDoubleLeft,
|
|
21
|
+
CaretDoubleRight,
|
|
22
|
+
CaretLeft,
|
|
23
|
+
CaretRight,
|
|
24
|
+
Check,
|
|
25
|
+
Images,
|
|
26
|
+
WarningCircle,
|
|
27
|
+
type Icon,
|
|
28
|
+
} from "@phosphor-icons/react";
|
|
29
|
+
import * as React from "react";
|
|
30
|
+
|
|
31
|
+
import { INTERNAL_MEDIA_PREFIX } from "../media/normalize.js";
|
|
32
|
+
import { TOOLBAR_POPUP_ATTR, originStyle, transformOrigin } from "./inline-editor-ui.js";
|
|
33
|
+
|
|
34
|
+
const API_BASE = "/_emdash/api";
|
|
35
|
+
const MEDIA_LIBRARY_PATH = "/_emdash/admin/media";
|
|
36
|
+
const PAGE_SIZE = 9;
|
|
37
|
+
const COLUMNS = 3;
|
|
38
|
+
/**
|
|
39
|
+
* Providers list their images without page numbers, so their first images
|
|
40
|
+
* load at once, as many as the admin's media dialog shows.
|
|
41
|
+
*/
|
|
42
|
+
const PROVIDER_LIMIT = 50;
|
|
43
|
+
/** Twice a tile's width, so thumbnails stay sharp on high-density screens. */
|
|
44
|
+
const THUMBNAIL_WIDTH = 240;
|
|
45
|
+
/** How far the page can scroll under the picker before it closes, so a slight nudge doesn't. */
|
|
46
|
+
const SCROLL_TOLERANCE = 8;
|
|
47
|
+
/** How long a phone's keyboard can take to come or go, scrolling the page as it does. */
|
|
48
|
+
const KEYBOARD_SETTLE_MS = 600;
|
|
49
|
+
const SCROLLING_OVERFLOW = /auto|scroll|overlay/;
|
|
50
|
+
const PAGE_SCROLL_KEYS = new Set([
|
|
51
|
+
"ArrowUp",
|
|
52
|
+
"ArrowDown",
|
|
53
|
+
"ArrowLeft",
|
|
54
|
+
"ArrowRight",
|
|
55
|
+
"PageUp",
|
|
56
|
+
"PageDown",
|
|
57
|
+
"Home",
|
|
58
|
+
"End",
|
|
59
|
+
" ",
|
|
60
|
+
]);
|
|
61
|
+
|
|
62
|
+
/** The image block attributes for a chosen image. */
|
|
63
|
+
export interface ChosenImage {
|
|
64
|
+
src: string;
|
|
65
|
+
alt: string | null;
|
|
66
|
+
mediaId: string;
|
|
67
|
+
provider: string;
|
|
68
|
+
width: number | null;
|
|
69
|
+
height: number | null;
|
|
70
|
+
blurhash: string | null;
|
|
71
|
+
dominantColor: string | null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface Source {
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
interface PickerImage {
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
thumbnail: string;
|
|
83
|
+
/** Loaded if the thumbnail can't be. */
|
|
84
|
+
original: string;
|
|
85
|
+
chosen: ChosenImage;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
interface Listing {
|
|
89
|
+
sourceId: string;
|
|
90
|
+
/** The library page it holds. A provider's images come all at once. */
|
|
91
|
+
page: number;
|
|
92
|
+
images: PickerImage[];
|
|
93
|
+
total: number;
|
|
94
|
+
/** The provider has more images than it sent. */
|
|
95
|
+
more: boolean;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const LIBRARY: Source = { id: "local", name: "Library" };
|
|
99
|
+
|
|
100
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
101
|
+
return typeof value === "object" && value !== null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function text(value: unknown): string | undefined {
|
|
105
|
+
return typeof value === "string" && value.trim() ? value : undefined;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function dimension(value: unknown): number | null {
|
|
109
|
+
return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : null;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** The `data` of a media API response. */
|
|
113
|
+
async function fetchData(url: string, signal: AbortSignal): Promise<Record<string, unknown>> {
|
|
114
|
+
const response = await fetch(url, {
|
|
115
|
+
credentials: "same-origin",
|
|
116
|
+
headers: { "X-EmDash-Request": "1" },
|
|
117
|
+
signal,
|
|
118
|
+
});
|
|
119
|
+
if (!response.ok) throw new Error(`Media request failed with status ${response.status}`);
|
|
120
|
+
const body: unknown = await response.json();
|
|
121
|
+
if (!isRecord(body) || !isRecord(body.data)) throw new Error("Unexpected media response");
|
|
122
|
+
return body.data;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* A small rendition of a library image from Astro's image endpoint, so a
|
|
127
|
+
* page of tiles doesn't load nine originals. Vector images load as they are.
|
|
128
|
+
*/
|
|
129
|
+
function thumbnailUrl(url: string, mimeType: string): string {
|
|
130
|
+
if (!url.startsWith(INTERNAL_MEDIA_PREFIX) || mimeType === "image/svg+xml") return url;
|
|
131
|
+
const params = new URLSearchParams({
|
|
132
|
+
href: new URL(url, window.location.origin).href,
|
|
133
|
+
w: String(THUMBNAIL_WIDTH),
|
|
134
|
+
f: "webp",
|
|
135
|
+
});
|
|
136
|
+
return `/_image?${params}`;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** Loads the original once if the thumbnail fails, as on a site whose image endpoint refuses it. */
|
|
140
|
+
function showOriginal(image: HTMLImageElement, original: string) {
|
|
141
|
+
if (image.dataset.original !== undefined || !original) return;
|
|
142
|
+
image.dataset.original = "";
|
|
143
|
+
image.src = original;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function toPickerImage(item: unknown, source: Source): PickerImage | null {
|
|
147
|
+
if (!isRecord(item)) return null;
|
|
148
|
+
const id = text(item.id);
|
|
149
|
+
if (!id) return null;
|
|
150
|
+
const meta = isRecord(item.meta) ? item.meta : {};
|
|
151
|
+
const fromLibrary = source.id === LIBRARY.id;
|
|
152
|
+
const storageKey = text(item.storageKey);
|
|
153
|
+
// A library image is its file; a provider's image comes with a preview of its own.
|
|
154
|
+
const original =
|
|
155
|
+
(fromLibrary
|
|
156
|
+
? (text(item.url) ?? (storageKey && `${INTERNAL_MEDIA_PREFIX}${storageKey}`))
|
|
157
|
+
: text(item.previewUrl)) ?? "";
|
|
158
|
+
return {
|
|
159
|
+
id,
|
|
160
|
+
name: text(item.filename) ?? "",
|
|
161
|
+
thumbnail: fromLibrary ? thumbnailUrl(original, text(item.mimeType) ?? "") : original,
|
|
162
|
+
original,
|
|
163
|
+
chosen: {
|
|
164
|
+
src: original,
|
|
165
|
+
alt: text(item.alt)?.trim() ?? null,
|
|
166
|
+
mediaId: id,
|
|
167
|
+
provider: fromLibrary ? "local" : source.id === "external-url" ? "external" : source.id,
|
|
168
|
+
width: dimension(item.width),
|
|
169
|
+
height: dimension(item.height),
|
|
170
|
+
blurhash: text(item.blurhash) ?? text(meta.blurhash) ?? null,
|
|
171
|
+
dominantColor: text(item.dominantColor) ?? text(meta.dominantColor) ?? null,
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
async function loadListing(source: Source, page: number, signal: AbortSignal): Promise<Listing> {
|
|
177
|
+
const fromLibrary = source.id === LIBRARY.id;
|
|
178
|
+
const params = new URLSearchParams({ mimeType: "image/" });
|
|
179
|
+
let url: string;
|
|
180
|
+
if (fromLibrary) {
|
|
181
|
+
params.set("page", String(page));
|
|
182
|
+
params.set("limit", String(PAGE_SIZE));
|
|
183
|
+
url = `${API_BASE}/media?${params}`;
|
|
184
|
+
} else {
|
|
185
|
+
params.set("limit", String(PROVIDER_LIMIT));
|
|
186
|
+
url = `${API_BASE}/media/providers/${encodeURIComponent(source.id)}?${params}`;
|
|
187
|
+
}
|
|
188
|
+
const data = await fetchData(url, signal);
|
|
189
|
+
const images = (Array.isArray(data.items) ? data.items : []).flatMap(
|
|
190
|
+
(item) => toPickerImage(item, source) ?? [],
|
|
191
|
+
);
|
|
192
|
+
return {
|
|
193
|
+
sourceId: source.id,
|
|
194
|
+
page: fromLibrary ? page : 1,
|
|
195
|
+
images,
|
|
196
|
+
total: fromLibrary && typeof data.totalCount === "number" ? data.totalCount : images.length,
|
|
197
|
+
more: !fromLibrary && text(data.nextCursor) !== undefined,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** The library, then the media providers the site has set up that can list their images. */
|
|
202
|
+
function useSources(): Source[] {
|
|
203
|
+
const [sources, setSources] = React.useState<Source[]>([LIBRARY]);
|
|
204
|
+
React.useEffect(() => {
|
|
205
|
+
const controller = new AbortController();
|
|
206
|
+
void (async () => {
|
|
207
|
+
try {
|
|
208
|
+
const data = await fetchData(`${API_BASE}/media/providers`, controller.signal);
|
|
209
|
+
const providers = (Array.isArray(data.items) ? data.items : []).flatMap(
|
|
210
|
+
(item): Source[] => {
|
|
211
|
+
if (!isRecord(item)) return [];
|
|
212
|
+
const id = text(item.id);
|
|
213
|
+
const capabilities = isRecord(item.capabilities) ? item.capabilities : {};
|
|
214
|
+
if (!id || id === LIBRARY.id || capabilities.browse === false) return [];
|
|
215
|
+
return [{ id, name: text(item.name) ?? id }];
|
|
216
|
+
},
|
|
217
|
+
);
|
|
218
|
+
if (!controller.signal.aborted && providers.length > 0) {
|
|
219
|
+
setSources([LIBRARY, ...providers]);
|
|
220
|
+
}
|
|
221
|
+
} catch {
|
|
222
|
+
// Without the list of providers, the library is still there to choose from.
|
|
223
|
+
}
|
|
224
|
+
})();
|
|
225
|
+
return () => controller.abort();
|
|
226
|
+
}, []);
|
|
227
|
+
return sources;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* The images for a source and page. While the next ones load, the last ones
|
|
232
|
+
* from the same source stay, so the grid doesn't flash empty.
|
|
233
|
+
*/
|
|
234
|
+
function useListing(source: Source, page: number) {
|
|
235
|
+
const [attempt, setAttempt] = React.useState(0);
|
|
236
|
+
const [result, setResult] = React.useState<{
|
|
237
|
+
key: string;
|
|
238
|
+
listing?: Listing;
|
|
239
|
+
failed?: boolean;
|
|
240
|
+
} | null>(null);
|
|
241
|
+
const fromLibrary = source.id === LIBRARY.id;
|
|
242
|
+
// A provider's images come all at once, so its pages need no request of their own.
|
|
243
|
+
const key = [source.id, fromLibrary ? page : 1, attempt].join("\n");
|
|
244
|
+
React.useEffect(() => {
|
|
245
|
+
const controller = new AbortController();
|
|
246
|
+
void (async () => {
|
|
247
|
+
try {
|
|
248
|
+
const listing = await loadListing(source, page, controller.signal);
|
|
249
|
+
if (!controller.signal.aborted) setResult({ key, listing });
|
|
250
|
+
} catch {
|
|
251
|
+
if (controller.signal.aborted) return;
|
|
252
|
+
setResult((previous) => ({ key, listing: previous?.listing, failed: true }));
|
|
253
|
+
}
|
|
254
|
+
})();
|
|
255
|
+
return () => controller.abort();
|
|
256
|
+
// `key` stands for everything the request depends on.
|
|
257
|
+
}, [key]);
|
|
258
|
+
const listing = result?.listing?.sourceId === source.id ? result.listing : undefined;
|
|
259
|
+
// A failed refresh of the images on show, as on coming back to the tab, leaves them there.
|
|
260
|
+
const showsPage = listing !== undefined && (!fromLibrary || listing.page === page);
|
|
261
|
+
return {
|
|
262
|
+
listing,
|
|
263
|
+
loading: result?.key !== key,
|
|
264
|
+
failed: result?.key === key && result.failed === true && !showsPage,
|
|
265
|
+
retry: () => setAttempt((count) => count + 1),
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Whether a wheel or swipe over `target`, mostly along `dx` or `dy`, scrolls
|
|
271
|
+
* something inside `container` rather than the page.
|
|
272
|
+
*/
|
|
273
|
+
function scrollsInside(
|
|
274
|
+
target: EventTarget | null,
|
|
275
|
+
container: Element,
|
|
276
|
+
dx: number,
|
|
277
|
+
dy: number,
|
|
278
|
+
): boolean {
|
|
279
|
+
const vertical = Math.abs(dy) >= Math.abs(dx);
|
|
280
|
+
for (
|
|
281
|
+
let element = target instanceof Element ? target : null;
|
|
282
|
+
element && element !== container;
|
|
283
|
+
element = element.parentElement
|
|
284
|
+
) {
|
|
285
|
+
const style = getComputedStyle(element);
|
|
286
|
+
if (
|
|
287
|
+
vertical
|
|
288
|
+
? SCROLLING_OVERFLOW.test(style.overflowY) && element.scrollHeight > element.clientHeight
|
|
289
|
+
: SCROLLING_OVERFLOW.test(style.overflowX) && element.scrollWidth > element.clientWidth
|
|
290
|
+
) {
|
|
291
|
+
return true;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return false;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
function PickerMessage({
|
|
298
|
+
icon: MessageIcon,
|
|
299
|
+
title,
|
|
300
|
+
detail,
|
|
301
|
+
children,
|
|
302
|
+
}: {
|
|
303
|
+
icon: Icon;
|
|
304
|
+
title: string;
|
|
305
|
+
detail?: string;
|
|
306
|
+
children?: React.ReactNode;
|
|
307
|
+
}) {
|
|
308
|
+
return (
|
|
309
|
+
<div className="emdash-inline-ui-picker-message">
|
|
310
|
+
<MessageIcon aria-hidden="true" />
|
|
311
|
+
<strong>{title}</strong>
|
|
312
|
+
{detail && <span>{detail}</span>}
|
|
313
|
+
{children}
|
|
314
|
+
</div>
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export function InlineMediaPicker({
|
|
319
|
+
uiRoot,
|
|
320
|
+
reference,
|
|
321
|
+
origin,
|
|
322
|
+
gap,
|
|
323
|
+
label,
|
|
324
|
+
current,
|
|
325
|
+
fromToolbar = false,
|
|
326
|
+
onChoose,
|
|
327
|
+
onClose,
|
|
328
|
+
}: {
|
|
329
|
+
uiRoot: HTMLElement;
|
|
330
|
+
/** What the picker opens below. */
|
|
331
|
+
reference: VirtualElement;
|
|
332
|
+
/**
|
|
333
|
+
* Where the picker grows from, when not the middle of `reference`. It's
|
|
334
|
+
* read on every position update, so it must stay the same function.
|
|
335
|
+
*/
|
|
336
|
+
origin?: () => DOMRect;
|
|
337
|
+
/** The space between the picker and `reference`. */
|
|
338
|
+
gap: number;
|
|
339
|
+
label: string;
|
|
340
|
+
/** The image being replaced, which the grid marks. */
|
|
341
|
+
current?: { provider: string; mediaId: string };
|
|
342
|
+
/** Opened from a selection toolbar, which stays while the picker has focus. */
|
|
343
|
+
fromToolbar?: boolean;
|
|
344
|
+
onChoose: (image: ChosenImage) => void;
|
|
345
|
+
/**
|
|
346
|
+
* Escape closes the picker, as does scrolling the page under it. So does
|
|
347
|
+
* focus leaving it for the page, which then has focus already.
|
|
348
|
+
*/
|
|
349
|
+
onClose: (reason: "escape" | "scroll" | "blur") => void;
|
|
350
|
+
}) {
|
|
351
|
+
const pickerRef = React.useRef<HTMLDivElement | null>(null);
|
|
352
|
+
const pointerOutsideRef = React.useRef(false);
|
|
353
|
+
// The image a pointer pressed, as tiles keep their element when their image changes.
|
|
354
|
+
const pressedRef = React.useRef<string | null>(null);
|
|
355
|
+
const onCloseRef = React.useRef(onClose);
|
|
356
|
+
onCloseRef.current = onClose;
|
|
357
|
+
const gridId = React.useId();
|
|
358
|
+
|
|
359
|
+
const sources = useSources();
|
|
360
|
+
const [sourceId, setSourceId] = React.useState(LIBRARY.id);
|
|
361
|
+
const source = sources.find((candidate) => candidate.id === sourceId) ?? LIBRARY;
|
|
362
|
+
const fromLibrary = source.id === LIBRARY.id;
|
|
363
|
+
|
|
364
|
+
// Another source starts again from its first page.
|
|
365
|
+
const view = source.id;
|
|
366
|
+
const [paging, setPaging] = React.useState({ view, page: 1 });
|
|
367
|
+
const requestedPage = paging.view === view ? paging.page : 1;
|
|
368
|
+
const { listing, loading, failed, retry } = useListing(source, requestedPage);
|
|
369
|
+
// Images uploaded in the admin's media library, opened in another tab, show up on coming back.
|
|
370
|
+
const retryRef = React.useRef(retry);
|
|
371
|
+
retryRef.current = retry;
|
|
372
|
+
React.useEffect(() => {
|
|
373
|
+
const refresh = () => {
|
|
374
|
+
if (document.visibilityState === "visible") retryRef.current();
|
|
375
|
+
};
|
|
376
|
+
document.addEventListener("visibilitychange", refresh);
|
|
377
|
+
return () => document.removeEventListener("visibilitychange", refresh);
|
|
378
|
+
}, []);
|
|
379
|
+
const total = listing?.total ?? 0;
|
|
380
|
+
const pages = Math.max(1, Math.ceil(total / PAGE_SIZE));
|
|
381
|
+
const page = Math.min(requestedPage, pages);
|
|
382
|
+
const shownPage = fromLibrary ? (listing?.page ?? page) : page;
|
|
383
|
+
const images = !listing
|
|
384
|
+
? []
|
|
385
|
+
: fromLibrary
|
|
386
|
+
? listing.images
|
|
387
|
+
: listing.images.slice((shownPage - 1) * PAGE_SIZE, shownPage * PAGE_SIZE);
|
|
388
|
+
const first = (shownPage - 1) * PAGE_SIZE;
|
|
389
|
+
const waiting = !listing || (images.length === 0 && total > 0);
|
|
390
|
+
const showsGrid = !failed && !waiting && total > 0;
|
|
391
|
+
|
|
392
|
+
// A page past the end, as when images have left the library, gives way to the last one.
|
|
393
|
+
React.useEffect(() => {
|
|
394
|
+
if (fromLibrary && listing && !loading && listing.page > pages) {
|
|
395
|
+
setPaging({ view, page: pages });
|
|
396
|
+
}
|
|
397
|
+
}, [fromLibrary, listing, loading, pages, view]);
|
|
398
|
+
|
|
399
|
+
const gridView = `${view}\n${shownPage}`;
|
|
400
|
+
const [highlighted, setHighlighted] = React.useState({ view: gridView, index: -1 });
|
|
401
|
+
const highlight =
|
|
402
|
+
highlighted.view === gridView && highlighted.index < images.length ? highlighted.index : -1;
|
|
403
|
+
const setHighlight = (index: number) => setHighlighted({ view: gridView, index });
|
|
404
|
+
|
|
405
|
+
const [pageDraft, setPageDraft] = React.useState<string | null>(null);
|
|
406
|
+
|
|
407
|
+
const { refs, elements, floatingStyles, middlewareData, isPositioned } = useFloating({
|
|
408
|
+
open: true,
|
|
409
|
+
placement: "bottom-start",
|
|
410
|
+
strategy: "fixed",
|
|
411
|
+
transform: false,
|
|
412
|
+
middleware: [
|
|
413
|
+
offset(gap),
|
|
414
|
+
flip({ padding: 8 }),
|
|
415
|
+
shift({ padding: 8 }),
|
|
416
|
+
size({
|
|
417
|
+
padding: 8,
|
|
418
|
+
apply: ({ availableHeight, elements: { floating } }) => {
|
|
419
|
+
floating.style.maxHeight = `${Math.max(0, availableHeight)}px`;
|
|
420
|
+
},
|
|
421
|
+
}),
|
|
422
|
+
transformOrigin(origin),
|
|
423
|
+
],
|
|
424
|
+
whileElementsMounted: autoUpdate,
|
|
425
|
+
});
|
|
426
|
+
React.useLayoutEffect(() => refs.setPositionReference(reference), [reference, refs]);
|
|
427
|
+
|
|
428
|
+
// Focus moves in once the picker is in place, as a hidden picker can't take
|
|
429
|
+
// it, and comes back after it went with a control that left the page. It
|
|
430
|
+
// moves on to the first image of each page shown while it waits on the picker.
|
|
431
|
+
const focusedRef = React.useRef(false);
|
|
432
|
+
React.useEffect(() => {
|
|
433
|
+
const picker = pickerRef.current;
|
|
434
|
+
if (!isPositioned || !picker) return;
|
|
435
|
+
if (!focusedRef.current || document.activeElement === document.body) {
|
|
436
|
+
focusedRef.current = true;
|
|
437
|
+
picker.focus({ preventScroll: true });
|
|
438
|
+
}
|
|
439
|
+
if (showsGrid && !loading && document.activeElement === picker) {
|
|
440
|
+
picker.querySelector<HTMLElement>('[data-index="0"]')?.focus({ preventScroll: true });
|
|
441
|
+
}
|
|
442
|
+
}, [isPositioned, showsGrid, loading, gridView]);
|
|
443
|
+
|
|
444
|
+
// Scrolling the page closes the picker, rather than carrying it along with what it opened from.
|
|
445
|
+
React.useEffect(() => {
|
|
446
|
+
let start = reference.getBoundingClientRect();
|
|
447
|
+
let frame = 0;
|
|
448
|
+
// A phone's keyboard goes as the picker takes focus from the editor, and
|
|
449
|
+
// comes and goes as the page number takes and loses it. The page scrolls
|
|
450
|
+
// while the viewport resizes, which moves the picker but doesn't close it.
|
|
451
|
+
const touchScreen = window.matchMedia?.("(pointer: coarse)").matches === true;
|
|
452
|
+
let settleUntil = 0;
|
|
453
|
+
const settle = () => {
|
|
454
|
+
if (touchScreen) settleUntil = performance.now() + KEYBOARD_SETTLE_MS;
|
|
455
|
+
};
|
|
456
|
+
settle();
|
|
457
|
+
const check = () => {
|
|
458
|
+
frame = 0;
|
|
459
|
+
const now = reference.getBoundingClientRect();
|
|
460
|
+
if (performance.now() < settleUntil) {
|
|
461
|
+
start = now;
|
|
462
|
+
} else if (
|
|
463
|
+
Math.abs(now.top - start.top) > SCROLL_TOLERANCE ||
|
|
464
|
+
Math.abs(now.left - start.left) > SCROLL_TOLERANCE
|
|
465
|
+
) {
|
|
466
|
+
// Focus that left the picker, as for a frame on the page, stays where it went.
|
|
467
|
+
const activeElement = document.activeElement;
|
|
468
|
+
const hadFocus =
|
|
469
|
+
activeElement === document.body || pickerRef.current?.contains(activeElement);
|
|
470
|
+
onCloseRef.current(hadFocus ? "scroll" : "blur");
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
const onScroll = (event: Event) => {
|
|
474
|
+
if (event.target instanceof Node && pickerRef.current?.contains(event.target)) return;
|
|
475
|
+
frame ||= requestAnimationFrame(check);
|
|
476
|
+
};
|
|
477
|
+
// An address bar hiding as the page scrolls resizes the viewport too, so a resize only extends a wait.
|
|
478
|
+
const onResize = () => {
|
|
479
|
+
if (performance.now() < settleUntil) settle();
|
|
480
|
+
};
|
|
481
|
+
const onFocusChange = (event: FocusEvent) => {
|
|
482
|
+
if (event.target instanceof HTMLInputElement && pickerRef.current?.contains(event.target)) {
|
|
483
|
+
settle();
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
document.addEventListener("scroll", onScroll, { capture: true, passive: true });
|
|
487
|
+
document.addEventListener("focusin", onFocusChange);
|
|
488
|
+
document.addEventListener("focusout", onFocusChange);
|
|
489
|
+
window.addEventListener("resize", onResize);
|
|
490
|
+
window.visualViewport?.addEventListener("resize", onResize);
|
|
491
|
+
return () => {
|
|
492
|
+
document.removeEventListener("scroll", onScroll, { capture: true });
|
|
493
|
+
document.removeEventListener("focusin", onFocusChange);
|
|
494
|
+
document.removeEventListener("focusout", onFocusChange);
|
|
495
|
+
window.removeEventListener("resize", onResize);
|
|
496
|
+
window.visualViewport?.removeEventListener("resize", onResize);
|
|
497
|
+
cancelAnimationFrame(frame);
|
|
498
|
+
};
|
|
499
|
+
}, [reference]);
|
|
500
|
+
|
|
501
|
+
// Scrolling over the picker never moves the page, which would close it, only what scrolls inside it.
|
|
502
|
+
React.useEffect(() => {
|
|
503
|
+
const picker = elements.floating;
|
|
504
|
+
if (!picker) return;
|
|
505
|
+
let touchStart: { x: number; y: number } | null = null;
|
|
506
|
+
const onWheel = (event: WheelEvent) => {
|
|
507
|
+
// A pinch on a trackpad zooms the page.
|
|
508
|
+
if (event.ctrlKey) return;
|
|
509
|
+
if (!scrollsInside(event.target, picker, event.deltaX, event.deltaY)) event.preventDefault();
|
|
510
|
+
};
|
|
511
|
+
const onTouchStart = (event: TouchEvent) => {
|
|
512
|
+
const touch = event.touches[0];
|
|
513
|
+
touchStart = touch ? { x: touch.clientX, y: touch.clientY } : null;
|
|
514
|
+
};
|
|
515
|
+
const onTouchMove = (event: TouchEvent) => {
|
|
516
|
+
const touch = event.touches[0];
|
|
517
|
+
// Two fingers zoom the page.
|
|
518
|
+
if (!touch || !touchStart || event.touches.length > 1) return;
|
|
519
|
+
const dx = touch.clientX - touchStart.x;
|
|
520
|
+
const dy = touch.clientY - touchStart.y;
|
|
521
|
+
if (!scrollsInside(event.target, picker, dx, dy)) event.preventDefault();
|
|
522
|
+
};
|
|
523
|
+
picker.addEventListener("wheel", onWheel, { passive: false });
|
|
524
|
+
picker.addEventListener("touchstart", onTouchStart, { passive: true });
|
|
525
|
+
picker.addEventListener("touchmove", onTouchMove, { passive: false });
|
|
526
|
+
return () => {
|
|
527
|
+
picker.removeEventListener("wheel", onWheel);
|
|
528
|
+
picker.removeEventListener("touchstart", onTouchStart);
|
|
529
|
+
picker.removeEventListener("touchmove", onTouchMove);
|
|
530
|
+
};
|
|
531
|
+
}, [elements.floating]);
|
|
532
|
+
|
|
533
|
+
React.useEffect(() => {
|
|
534
|
+
// Whether the last press was a tap on the page, rather than on the editor's toolbars.
|
|
535
|
+
let tappedPage = false;
|
|
536
|
+
const onPointerDown = (event: PointerEvent) => {
|
|
537
|
+
const picker = pickerRef.current;
|
|
538
|
+
const target = event.target instanceof Node ? event.target : null;
|
|
539
|
+
const outside = !(target && picker?.contains(target));
|
|
540
|
+
pointerOutsideRef.current = outside;
|
|
541
|
+
tappedPage = event.pointerType !== "mouse" && !(target && uiRoot.contains(target));
|
|
542
|
+
// With focus in the picker, the blur that follows closes it, once the toolbars have seen focus go.
|
|
543
|
+
if (outside && !picker?.contains(document.activeElement)) onCloseRef.current("blur");
|
|
544
|
+
};
|
|
545
|
+
// iOS keeps focus in a field when a tap lands where nothing takes focus, so
|
|
546
|
+
// the tap's end lets it go, which closes the picker as a blur would. A
|
|
547
|
+
// toolbar's buttons keep focus where it is on purpose.
|
|
548
|
+
const onPointerUp = () => {
|
|
549
|
+
const activeElement = document.activeElement;
|
|
550
|
+
if (
|
|
551
|
+
tappedPage &&
|
|
552
|
+
activeElement instanceof HTMLElement &&
|
|
553
|
+
pickerRef.current?.contains(activeElement)
|
|
554
|
+
) {
|
|
555
|
+
activeElement.blur();
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
document.addEventListener("pointerdown", onPointerDown, true);
|
|
559
|
+
document.addEventListener("pointerup", onPointerUp, true);
|
|
560
|
+
return () => {
|
|
561
|
+
document.removeEventListener("pointerdown", onPointerDown, true);
|
|
562
|
+
document.removeEventListener("pointerup", onPointerUp, true);
|
|
563
|
+
};
|
|
564
|
+
}, [uiRoot]);
|
|
565
|
+
|
|
566
|
+
const onBlur = (event: React.FocusEvent<HTMLDivElement>) => {
|
|
567
|
+
const next = event.relatedTarget;
|
|
568
|
+
if (next instanceof Node && event.currentTarget.contains(next)) return;
|
|
569
|
+
if (next instanceof Node || pointerOutsideRef.current) {
|
|
570
|
+
onClose("blur");
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
// Focus that went nowhere left for another window, which gives it back,
|
|
574
|
+
// went into a frame on the page, or went with a control that left the page.
|
|
575
|
+
if (!document.hasFocus()) return;
|
|
576
|
+
queueMicrotask(() => {
|
|
577
|
+
const picker = pickerRef.current;
|
|
578
|
+
const activeElement = document.activeElement;
|
|
579
|
+
if (!picker?.isConnected || picker.contains(activeElement)) return;
|
|
580
|
+
if (activeElement && activeElement !== document.body) onCloseRef.current("blur");
|
|
581
|
+
else picker.focus({ preventScroll: true });
|
|
582
|
+
});
|
|
583
|
+
};
|
|
584
|
+
|
|
585
|
+
const focusTile = (index: number) => {
|
|
586
|
+
setHighlight(index);
|
|
587
|
+
pickerRef.current?.querySelector<HTMLElement>(`[data-index="${index}"]`)?.focus();
|
|
588
|
+
};
|
|
589
|
+
|
|
590
|
+
const goTo = (target: number) => {
|
|
591
|
+
setPageDraft(null);
|
|
592
|
+
const next = Math.min(Math.max(1, Math.round(target)), pages);
|
|
593
|
+
if (!Number.isFinite(next) || next === page) return;
|
|
594
|
+
// A tile may not be on the next page, and the buttons at an end turn
|
|
595
|
+
// off there, so focus on either waits on the picker for the page's first image.
|
|
596
|
+
const active = document.activeElement;
|
|
597
|
+
if (
|
|
598
|
+
active instanceof HTMLElement &&
|
|
599
|
+
(active.dataset.index !== undefined ||
|
|
600
|
+
(active.tagName === "BUTTON" &&
|
|
601
|
+
active.closest(".emdash-inline-ui-pagination") &&
|
|
602
|
+
(next === 1 || next === pages)))
|
|
603
|
+
) {
|
|
604
|
+
pickerRef.current?.focus({ preventScroll: true });
|
|
605
|
+
}
|
|
606
|
+
setPaging({ view, page: next });
|
|
607
|
+
};
|
|
608
|
+
|
|
609
|
+
const selectSource = (next: Source, tab: HTMLElement) => {
|
|
610
|
+
if (next.id === source.id) return;
|
|
611
|
+
// Focus moves to the tab, since the image it may be on is about to go.
|
|
612
|
+
tab.focus();
|
|
613
|
+
setSourceId(next.id);
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
const tryAgain = () => {
|
|
617
|
+
// The button goes once the images load.
|
|
618
|
+
pickerRef.current?.focus({ preventScroll: true });
|
|
619
|
+
retry();
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
const onKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {
|
|
623
|
+
if (event.nativeEvent.isComposing) return;
|
|
624
|
+
// Enter held down on what opened the picker repeats onto its first image, which mustn't choose it.
|
|
625
|
+
if (
|
|
626
|
+
event.repeat &&
|
|
627
|
+
event.key === "Enter" &&
|
|
628
|
+
event.target instanceof HTMLElement &&
|
|
629
|
+
event.target.dataset.index !== undefined
|
|
630
|
+
) {
|
|
631
|
+
event.preventDefault();
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
if (event.key === "Escape") {
|
|
635
|
+
event.preventDefault();
|
|
636
|
+
onClose("escape");
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
if (event.key === "Tab") {
|
|
640
|
+
// Tab goes around the picker, which Escape leaves.
|
|
641
|
+
const stops = [
|
|
642
|
+
...event.currentTarget.querySelectorAll<HTMLElement>("input, button, a[href]"),
|
|
643
|
+
].filter((element) => element.tabIndex >= 0 && !element.matches(":disabled"));
|
|
644
|
+
event.preventDefault();
|
|
645
|
+
const index = stops.findIndex((element) => element === document.activeElement);
|
|
646
|
+
const next = event.shiftKey
|
|
647
|
+
? index <= 0
|
|
648
|
+
? stops.length - 1
|
|
649
|
+
: index - 1
|
|
650
|
+
: (index + 1) % stops.length;
|
|
651
|
+
stops[next]?.focus();
|
|
652
|
+
return;
|
|
653
|
+
}
|
|
654
|
+
// The browser's shortcuts, like going back a page, stay the browser's.
|
|
655
|
+
if (event.altKey || event.ctrlKey || event.metaKey) return;
|
|
656
|
+
const target = event.target;
|
|
657
|
+
// Keys that scroll the page don't from the picker, as that would close
|
|
658
|
+
// it. The page number keeps the ones that move its caret, and Space
|
|
659
|
+
// presses a button instead.
|
|
660
|
+
if (
|
|
661
|
+
target instanceof HTMLInputElement
|
|
662
|
+
? event.key === "PageUp" || event.key === "PageDown"
|
|
663
|
+
: PAGE_SCROLL_KEYS.has(event.key) &&
|
|
664
|
+
!(event.key === " " && target instanceof HTMLButtonElement)
|
|
665
|
+
) {
|
|
666
|
+
event.preventDefault();
|
|
667
|
+
}
|
|
668
|
+
// The arrow keys go into the images from the picker itself, which has focus while they load.
|
|
669
|
+
if (target === event.currentTarget) {
|
|
670
|
+
if (event.key.startsWith("Arrow") && showsGrid && !loading) focusTile(0);
|
|
671
|
+
return;
|
|
672
|
+
}
|
|
673
|
+
// The tabs and the page controls keep their own keys.
|
|
674
|
+
if (!(target instanceof HTMLElement) || target.dataset.index === undefined) return;
|
|
675
|
+
const index = Number(target.dataset.index);
|
|
676
|
+
const last = images.length - 1;
|
|
677
|
+
const forward = getComputedStyle(event.currentTarget).direction === "rtl" ? -1 : 1;
|
|
678
|
+
let next: number;
|
|
679
|
+
switch (event.key) {
|
|
680
|
+
case "ArrowDown":
|
|
681
|
+
next = index + COLUMNS;
|
|
682
|
+
// The row below may be short; its last image is the closest.
|
|
683
|
+
if (next > last)
|
|
684
|
+
next = Math.floor(index / COLUMNS) < Math.floor(last / COLUMNS) ? last : index;
|
|
685
|
+
break;
|
|
686
|
+
case "ArrowUp":
|
|
687
|
+
next = index - COLUMNS;
|
|
688
|
+
break;
|
|
689
|
+
case "ArrowRight":
|
|
690
|
+
next = Math.min(last, Math.max(0, index + forward));
|
|
691
|
+
break;
|
|
692
|
+
case "ArrowLeft":
|
|
693
|
+
next = Math.min(last, Math.max(0, index - forward));
|
|
694
|
+
break;
|
|
695
|
+
case "Home":
|
|
696
|
+
next = 0;
|
|
697
|
+
break;
|
|
698
|
+
case "End":
|
|
699
|
+
next = last;
|
|
700
|
+
break;
|
|
701
|
+
default:
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
if (next >= 0) focusTile(next);
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
const onTabsKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {
|
|
708
|
+
const forward = getComputedStyle(event.currentTarget).direction === "rtl" ? -1 : 1;
|
|
709
|
+
const index = sources.findIndex((candidate) => candidate.id === source.id);
|
|
710
|
+
let next: number;
|
|
711
|
+
switch (event.key) {
|
|
712
|
+
case "ArrowRight":
|
|
713
|
+
next = index + forward;
|
|
714
|
+
break;
|
|
715
|
+
case "ArrowLeft":
|
|
716
|
+
next = index - forward;
|
|
717
|
+
break;
|
|
718
|
+
case "Home":
|
|
719
|
+
next = 0;
|
|
720
|
+
break;
|
|
721
|
+
case "End":
|
|
722
|
+
next = sources.length - 1;
|
|
723
|
+
break;
|
|
724
|
+
default:
|
|
725
|
+
return;
|
|
726
|
+
}
|
|
727
|
+
event.preventDefault();
|
|
728
|
+
next = (next + sources.length) % sources.length;
|
|
729
|
+
const tab = event.currentTarget.querySelectorAll<HTMLElement>('[role="tab"]')[next];
|
|
730
|
+
const nextSource = sources[next];
|
|
731
|
+
if (tab && nextSource) {
|
|
732
|
+
selectSource(nextSource, tab);
|
|
733
|
+
tab.focus();
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
const showing = `Showing ${first + 1}–${first + images.length} of ${total}${listing?.more ? "+" : ""}`;
|
|
738
|
+
let announcement: string;
|
|
739
|
+
let body: React.ReactNode;
|
|
740
|
+
if (failed) {
|
|
741
|
+
announcement = "Images couldn't load";
|
|
742
|
+
body = (
|
|
743
|
+
<PickerMessage icon={WarningCircle} title={announcement}>
|
|
744
|
+
<button type="button" className="emdash-inline-ui-picker-action" onClick={tryAgain}>
|
|
745
|
+
Try again
|
|
746
|
+
</button>
|
|
747
|
+
</PickerMessage>
|
|
748
|
+
);
|
|
749
|
+
} else if (waiting) {
|
|
750
|
+
announcement = "Loading images";
|
|
751
|
+
body = (
|
|
752
|
+
<div aria-hidden="true" className="emdash-inline-ui-picker-grid">
|
|
753
|
+
{Array.from({ length: PAGE_SIZE }, (_, index) => (
|
|
754
|
+
<span key={index} className="emdash-inline-ui-picker-tile" />
|
|
755
|
+
))}
|
|
756
|
+
</div>
|
|
757
|
+
);
|
|
758
|
+
} else if (total === 0) {
|
|
759
|
+
announcement = "No images yet";
|
|
760
|
+
body = fromLibrary ? (
|
|
761
|
+
<PickerMessage
|
|
762
|
+
icon={Images}
|
|
763
|
+
title={announcement}
|
|
764
|
+
detail="Images added to the media library show up here."
|
|
765
|
+
>
|
|
766
|
+
<a
|
|
767
|
+
href={MEDIA_LIBRARY_PATH}
|
|
768
|
+
target="_blank"
|
|
769
|
+
rel="noopener noreferrer"
|
|
770
|
+
className="emdash-inline-ui-picker-action"
|
|
771
|
+
>
|
|
772
|
+
Open media library
|
|
773
|
+
<ArrowSquareOut aria-hidden="true" />
|
|
774
|
+
<span className="emdash-inline-ui-sr-only"> (opens in a new tab)</span>
|
|
775
|
+
</a>
|
|
776
|
+
</PickerMessage>
|
|
777
|
+
) : (
|
|
778
|
+
<PickerMessage
|
|
779
|
+
icon={Images}
|
|
780
|
+
title={announcement}
|
|
781
|
+
detail={`Images added to ${source.name} show up here.`}
|
|
782
|
+
/>
|
|
783
|
+
);
|
|
784
|
+
} else {
|
|
785
|
+
announcement = showing;
|
|
786
|
+
body = (
|
|
787
|
+
<div
|
|
788
|
+
id={gridId}
|
|
789
|
+
role="listbox"
|
|
790
|
+
aria-label="Images"
|
|
791
|
+
aria-busy={loading || undefined}
|
|
792
|
+
className="emdash-inline-ui-picker-grid"
|
|
793
|
+
>
|
|
794
|
+
{images.map((image, index) => {
|
|
795
|
+
const name = image.name || "Image";
|
|
796
|
+
const isCurrent =
|
|
797
|
+
current?.mediaId === image.id && current.provider === image.chosen.provider;
|
|
798
|
+
return (
|
|
799
|
+
<button
|
|
800
|
+
// Tiles keep their element from page to page, so one with focus keeps it.
|
|
801
|
+
key={index}
|
|
802
|
+
type="button"
|
|
803
|
+
role="option"
|
|
804
|
+
aria-selected={index === highlight}
|
|
805
|
+
aria-label={isCurrent ? `${name} (current image)` : name}
|
|
806
|
+
tabIndex={index === Math.max(highlight, 0) ? 0 : -1}
|
|
807
|
+
data-index={index}
|
|
808
|
+
data-highlighted={index === highlight ? "" : undefined}
|
|
809
|
+
className="emdash-inline-ui-picker-tile"
|
|
810
|
+
onPointerMove={(event) => {
|
|
811
|
+
if (index === highlight) return;
|
|
812
|
+
// Enter chooses the image with focus, so focus follows the pointer from image to image.
|
|
813
|
+
const active = document.activeElement;
|
|
814
|
+
if (active instanceof HTMLElement && active.dataset.index !== undefined) {
|
|
815
|
+
event.currentTarget.focus({ preventScroll: true });
|
|
816
|
+
} else {
|
|
817
|
+
setHighlight(index);
|
|
818
|
+
}
|
|
819
|
+
}}
|
|
820
|
+
onFocus={() => {
|
|
821
|
+
if (index !== highlight) setHighlight(index);
|
|
822
|
+
}}
|
|
823
|
+
onPointerDown={() => {
|
|
824
|
+
pressedRef.current = image.id;
|
|
825
|
+
}}
|
|
826
|
+
onClick={(event) => {
|
|
827
|
+
const pressed = pressedRef.current;
|
|
828
|
+
pressedRef.current = null;
|
|
829
|
+
// A pointer chooses only the image it pressed: once new results replace it, the click chooses nothing.
|
|
830
|
+
if (event.detail > 0 && pressed !== null && pressed !== image.id) return;
|
|
831
|
+
onChoose(image.chosen);
|
|
832
|
+
}}
|
|
833
|
+
>
|
|
834
|
+
{image.thumbnail && (
|
|
835
|
+
<img
|
|
836
|
+
key={image.id}
|
|
837
|
+
src={image.thumbnail}
|
|
838
|
+
alt=""
|
|
839
|
+
loading="lazy"
|
|
840
|
+
decoding="async"
|
|
841
|
+
draggable={false}
|
|
842
|
+
onError={(event) => showOriginal(event.currentTarget, image.original)}
|
|
843
|
+
/>
|
|
844
|
+
)}
|
|
845
|
+
{isCurrent && (
|
|
846
|
+
<span className="emdash-inline-ui-picker-badge">
|
|
847
|
+
<Check weight="bold" aria-hidden="true" />
|
|
848
|
+
</span>
|
|
849
|
+
)}
|
|
850
|
+
</button>
|
|
851
|
+
);
|
|
852
|
+
})}
|
|
853
|
+
{/* A short last page keeps the grid's height, so the page buttons stay under the pointer. */}
|
|
854
|
+
{pages > 1 &&
|
|
855
|
+
Array.from({ length: PAGE_SIZE - images.length }, (_, index) => (
|
|
856
|
+
<span
|
|
857
|
+
key={`filler-${index}`}
|
|
858
|
+
aria-hidden="true"
|
|
859
|
+
className="emdash-inline-ui-picker-filler"
|
|
860
|
+
/>
|
|
861
|
+
))}
|
|
862
|
+
</div>
|
|
863
|
+
);
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
return (
|
|
867
|
+
<FloatingPortal root={uiRoot}>
|
|
868
|
+
<div
|
|
869
|
+
ref={(node) => {
|
|
870
|
+
pickerRef.current = node;
|
|
871
|
+
refs.setFloating(node);
|
|
872
|
+
}}
|
|
873
|
+
role="dialog"
|
|
874
|
+
aria-label={label}
|
|
875
|
+
tabIndex={-1}
|
|
876
|
+
className="emdash-inline-ui-picker"
|
|
877
|
+
style={{
|
|
878
|
+
...floatingStyles,
|
|
879
|
+
...originStyle(middlewareData.transformOrigin),
|
|
880
|
+
visibility: isPositioned ? undefined : "hidden",
|
|
881
|
+
}}
|
|
882
|
+
{...(fromToolbar ? { [TOOLBAR_POPUP_ATTR]: "" } : {})}
|
|
883
|
+
onKeyDown={onKeyDown}
|
|
884
|
+
onMouseDown={(event) => {
|
|
885
|
+
// A click leaves focus where it was, so the picker keeps it. Fields still take it.
|
|
886
|
+
if (!(event.target instanceof HTMLInputElement)) event.preventDefault();
|
|
887
|
+
}}
|
|
888
|
+
onBlur={onBlur}
|
|
889
|
+
>
|
|
890
|
+
<span className="emdash-inline-ui-sr-only" role="status">
|
|
891
|
+
{announcement}
|
|
892
|
+
</span>
|
|
893
|
+
{sources.length > 1 && (
|
|
894
|
+
<div
|
|
895
|
+
role="tablist"
|
|
896
|
+
aria-label="Image source"
|
|
897
|
+
className="emdash-inline-ui-picker-tabs"
|
|
898
|
+
onKeyDown={onTabsKeyDown}
|
|
899
|
+
>
|
|
900
|
+
{sources.map((candidate) => (
|
|
901
|
+
<button
|
|
902
|
+
key={candidate.id}
|
|
903
|
+
type="button"
|
|
904
|
+
role="tab"
|
|
905
|
+
aria-selected={candidate.id === source.id}
|
|
906
|
+
aria-controls={showsGrid ? gridId : undefined}
|
|
907
|
+
tabIndex={candidate.id === source.id ? 0 : -1}
|
|
908
|
+
className="emdash-inline-ui-picker-tab"
|
|
909
|
+
onClick={(event) => selectSource(candidate, event.currentTarget)}
|
|
910
|
+
>
|
|
911
|
+
{candidate.name}
|
|
912
|
+
</button>
|
|
913
|
+
))}
|
|
914
|
+
</div>
|
|
915
|
+
)}
|
|
916
|
+
{body}
|
|
917
|
+
{showsGrid && (
|
|
918
|
+
<div className="emdash-inline-ui-picker-foot">
|
|
919
|
+
<span className="emdash-inline-ui-picker-count" aria-hidden="true">
|
|
920
|
+
{showing}
|
|
921
|
+
</span>
|
|
922
|
+
<nav className="emdash-inline-ui-pagination" aria-label="Image pages">
|
|
923
|
+
<button
|
|
924
|
+
type="button"
|
|
925
|
+
aria-label="First page"
|
|
926
|
+
disabled={page <= 1}
|
|
927
|
+
onClick={() => goTo(1)}
|
|
928
|
+
>
|
|
929
|
+
<CaretDoubleLeft aria-hidden="true" />
|
|
930
|
+
</button>
|
|
931
|
+
<button
|
|
932
|
+
type="button"
|
|
933
|
+
aria-label="Previous page"
|
|
934
|
+
disabled={page <= 1}
|
|
935
|
+
onClick={() => goTo(page - 1)}
|
|
936
|
+
>
|
|
937
|
+
<CaretLeft aria-hidden="true" />
|
|
938
|
+
</button>
|
|
939
|
+
<input
|
|
940
|
+
aria-label="Page number"
|
|
941
|
+
inputMode="numeric"
|
|
942
|
+
autoComplete="off"
|
|
943
|
+
value={pageDraft ?? String(page)}
|
|
944
|
+
onChange={(event) => setPageDraft(event.target.value)}
|
|
945
|
+
onKeyDown={(event) => {
|
|
946
|
+
if (event.key !== "Enter" || event.nativeEvent.isComposing) return;
|
|
947
|
+
event.preventDefault();
|
|
948
|
+
if (pageDraft !== null) goTo(Number(pageDraft));
|
|
949
|
+
}}
|
|
950
|
+
onBlur={() => {
|
|
951
|
+
if (pageDraft !== null) goTo(Number(pageDraft));
|
|
952
|
+
}}
|
|
953
|
+
/>
|
|
954
|
+
<button
|
|
955
|
+
type="button"
|
|
956
|
+
aria-label="Next page"
|
|
957
|
+
disabled={page >= pages}
|
|
958
|
+
onClick={() => goTo(page + 1)}
|
|
959
|
+
>
|
|
960
|
+
<CaretRight aria-hidden="true" />
|
|
961
|
+
</button>
|
|
962
|
+
<button
|
|
963
|
+
type="button"
|
|
964
|
+
aria-label="Last page"
|
|
965
|
+
disabled={page >= pages}
|
|
966
|
+
onClick={() => goTo(pages)}
|
|
967
|
+
>
|
|
968
|
+
<CaretDoubleRight aria-hidden="true" />
|
|
969
|
+
</button>
|
|
970
|
+
</nav>
|
|
971
|
+
</div>
|
|
972
|
+
)}
|
|
973
|
+
</div>
|
|
974
|
+
</FloatingPortal>
|
|
975
|
+
);
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
/** The picker's look, from the admin's media dialog and Kumo's pagination. */
|
|
979
|
+
export const INLINE_MEDIA_PICKER_STYLES = `
|
|
980
|
+
.emdash-inline-ui-picker {
|
|
981
|
+
display: flex;
|
|
982
|
+
width: 360px;
|
|
983
|
+
max-width: calc(100vw - 16px);
|
|
984
|
+
flex-direction: column;
|
|
985
|
+
overflow: hidden;
|
|
986
|
+
border-radius: 10px;
|
|
987
|
+
background: var(--emdash-ui-surface);
|
|
988
|
+
box-shadow: 0 0 0 1px var(--emdash-ui-line), var(--emdash-ui-shadow);
|
|
989
|
+
outline: none;
|
|
990
|
+
animation: emdash-inline-ui-menu-in 100ms cubic-bezier(0, 0, 0.2, 1);
|
|
991
|
+
}
|
|
992
|
+
.emdash-inline-ui-picker-tabs {
|
|
993
|
+
display: flex;
|
|
994
|
+
flex: none;
|
|
995
|
+
gap: 2px;
|
|
996
|
+
padding: 4px;
|
|
997
|
+
overflow-x: auto;
|
|
998
|
+
overscroll-behavior-x: contain;
|
|
999
|
+
border-block-end: 1px solid var(--emdash-ui-hairline);
|
|
1000
|
+
scrollbar-width: none;
|
|
1001
|
+
}
|
|
1002
|
+
.emdash-inline-ui-picker-tab {
|
|
1003
|
+
flex: none;
|
|
1004
|
+
height: 28px;
|
|
1005
|
+
padding: 0 10px;
|
|
1006
|
+
border: 0;
|
|
1007
|
+
border-radius: 6px;
|
|
1008
|
+
background: transparent;
|
|
1009
|
+
color: var(--emdash-ui-subtle);
|
|
1010
|
+
cursor: pointer;
|
|
1011
|
+
font-size: 13px;
|
|
1012
|
+
outline: none;
|
|
1013
|
+
}
|
|
1014
|
+
.emdash-inline-ui-picker-tab:hover {
|
|
1015
|
+
color: var(--emdash-ui-text);
|
|
1016
|
+
}
|
|
1017
|
+
.emdash-inline-ui-picker-tab[aria-selected="true"] {
|
|
1018
|
+
background: var(--emdash-ui-tint);
|
|
1019
|
+
color: var(--emdash-ui-text);
|
|
1020
|
+
font-weight: 500;
|
|
1021
|
+
}
|
|
1022
|
+
.emdash-inline-ui-picker-tab:focus-visible {
|
|
1023
|
+
box-shadow: 0 0 0 2px var(--emdash-ui-brand);
|
|
1024
|
+
}
|
|
1025
|
+
/* Rows keep their tiles' height and the grid scrolls, rather than squeezing them. */
|
|
1026
|
+
.emdash-inline-ui-picker-grid {
|
|
1027
|
+
display: grid;
|
|
1028
|
+
min-height: 0;
|
|
1029
|
+
flex: 0 1 auto;
|
|
1030
|
+
grid-template-columns: repeat(${COLUMNS}, minmax(0, 1fr));
|
|
1031
|
+
grid-auto-rows: max-content;
|
|
1032
|
+
gap: 4px;
|
|
1033
|
+
padding: 4px;
|
|
1034
|
+
overflow-y: auto;
|
|
1035
|
+
overscroll-behavior: contain;
|
|
1036
|
+
scroll-padding-block: 4px;
|
|
1037
|
+
}
|
|
1038
|
+
.emdash-inline-ui-picker-tile {
|
|
1039
|
+
position: relative;
|
|
1040
|
+
aspect-ratio: 1;
|
|
1041
|
+
padding: 0;
|
|
1042
|
+
overflow: hidden;
|
|
1043
|
+
border: 0;
|
|
1044
|
+
border-radius: 6px;
|
|
1045
|
+
background: var(--emdash-ui-tint);
|
|
1046
|
+
cursor: pointer;
|
|
1047
|
+
outline: none;
|
|
1048
|
+
}
|
|
1049
|
+
.emdash-inline-ui-picker-tile img {
|
|
1050
|
+
display: block;
|
|
1051
|
+
width: 100%;
|
|
1052
|
+
height: 100%;
|
|
1053
|
+
object-fit: cover;
|
|
1054
|
+
}
|
|
1055
|
+
.emdash-inline-ui-picker-tile::after {
|
|
1056
|
+
content: "";
|
|
1057
|
+
position: absolute;
|
|
1058
|
+
inset: 0;
|
|
1059
|
+
border-radius: inherit;
|
|
1060
|
+
box-shadow: inset 0 0 0 1px light-dark(rgb(0 0 0 / 0.06), rgb(255 255 255 / 0.07));
|
|
1061
|
+
pointer-events: none;
|
|
1062
|
+
}
|
|
1063
|
+
.emdash-inline-ui-picker-tile[data-highlighted]::after {
|
|
1064
|
+
box-shadow: inset 0 0 0 2px var(--emdash-ui-brand), inset 0 0 0 4px var(--emdash-ui-surface);
|
|
1065
|
+
}
|
|
1066
|
+
.emdash-inline-ui-picker-filler {
|
|
1067
|
+
aspect-ratio: 1;
|
|
1068
|
+
visibility: hidden;
|
|
1069
|
+
}
|
|
1070
|
+
.emdash-inline-ui-picker-badge {
|
|
1071
|
+
position: absolute;
|
|
1072
|
+
inset-block-start: 6px;
|
|
1073
|
+
inset-inline-end: 6px;
|
|
1074
|
+
display: grid;
|
|
1075
|
+
width: 20px;
|
|
1076
|
+
height: 20px;
|
|
1077
|
+
place-items: center;
|
|
1078
|
+
border-radius: 999px;
|
|
1079
|
+
background: var(--emdash-ui-brand);
|
|
1080
|
+
box-shadow: 0 0 0 2px var(--emdash-ui-surface);
|
|
1081
|
+
color: #fff;
|
|
1082
|
+
}
|
|
1083
|
+
.emdash-inline-ui-picker-badge svg {
|
|
1084
|
+
width: 12px;
|
|
1085
|
+
height: 12px;
|
|
1086
|
+
}
|
|
1087
|
+
.emdash-inline-ui-picker-message {
|
|
1088
|
+
display: flex;
|
|
1089
|
+
flex-direction: column;
|
|
1090
|
+
align-items: center;
|
|
1091
|
+
gap: 2px;
|
|
1092
|
+
padding: 28px 16px;
|
|
1093
|
+
color: var(--emdash-ui-subtle);
|
|
1094
|
+
text-align: center;
|
|
1095
|
+
}
|
|
1096
|
+
.emdash-inline-ui-picker-message > svg {
|
|
1097
|
+
width: 28px;
|
|
1098
|
+
height: 28px;
|
|
1099
|
+
margin-block-end: 6px;
|
|
1100
|
+
}
|
|
1101
|
+
.emdash-inline-ui-picker-message strong {
|
|
1102
|
+
max-width: 100%;
|
|
1103
|
+
color: var(--emdash-ui-text);
|
|
1104
|
+
font-weight: 500;
|
|
1105
|
+
overflow-wrap: anywhere;
|
|
1106
|
+
}
|
|
1107
|
+
.emdash-inline-ui-picker-action {
|
|
1108
|
+
display: inline-flex;
|
|
1109
|
+
height: 32px;
|
|
1110
|
+
align-items: center;
|
|
1111
|
+
gap: 6px;
|
|
1112
|
+
margin-block-start: 12px;
|
|
1113
|
+
padding: 0 10px;
|
|
1114
|
+
border: 0;
|
|
1115
|
+
border-radius: 6px;
|
|
1116
|
+
background: transparent;
|
|
1117
|
+
box-shadow: 0 0 0 1px var(--emdash-ui-line);
|
|
1118
|
+
color: var(--emdash-ui-text);
|
|
1119
|
+
cursor: pointer;
|
|
1120
|
+
outline: none;
|
|
1121
|
+
}
|
|
1122
|
+
.emdash-inline-ui-picker-action:hover {
|
|
1123
|
+
background: var(--emdash-ui-tint);
|
|
1124
|
+
}
|
|
1125
|
+
.emdash-inline-ui-picker-action:focus-visible {
|
|
1126
|
+
box-shadow: 0 0 0 2px var(--emdash-ui-brand);
|
|
1127
|
+
}
|
|
1128
|
+
.emdash-inline-ui-picker-action > svg {
|
|
1129
|
+
width: 14px;
|
|
1130
|
+
height: 14px;
|
|
1131
|
+
color: var(--emdash-ui-subtle);
|
|
1132
|
+
}
|
|
1133
|
+
.emdash-inline-ui-picker-foot {
|
|
1134
|
+
display: flex;
|
|
1135
|
+
flex: none;
|
|
1136
|
+
align-items: center;
|
|
1137
|
+
gap: 12px;
|
|
1138
|
+
padding-block: 6px;
|
|
1139
|
+
padding-inline: 12px 6px;
|
|
1140
|
+
border-block-start: 1px solid var(--emdash-ui-hairline);
|
|
1141
|
+
color: var(--emdash-ui-subtle);
|
|
1142
|
+
font-size: 12px;
|
|
1143
|
+
line-height: 16px;
|
|
1144
|
+
}
|
|
1145
|
+
.emdash-inline-ui-picker-count {
|
|
1146
|
+
min-width: 0;
|
|
1147
|
+
flex: 1;
|
|
1148
|
+
overflow: hidden;
|
|
1149
|
+
font-variant-numeric: tabular-nums;
|
|
1150
|
+
text-overflow: ellipsis;
|
|
1151
|
+
white-space: nowrap;
|
|
1152
|
+
}
|
|
1153
|
+
.emdash-inline-ui-pagination {
|
|
1154
|
+
display: flex;
|
|
1155
|
+
flex: none;
|
|
1156
|
+
overflow: hidden;
|
|
1157
|
+
border-radius: 8px;
|
|
1158
|
+
box-shadow: 0 0 0 1px var(--emdash-ui-line);
|
|
1159
|
+
}
|
|
1160
|
+
.emdash-inline-ui-pagination > button,
|
|
1161
|
+
.emdash-inline-ui-pagination > input {
|
|
1162
|
+
width: 28px;
|
|
1163
|
+
height: 28px;
|
|
1164
|
+
padding: 0;
|
|
1165
|
+
border: 0;
|
|
1166
|
+
background: var(--emdash-ui-surface);
|
|
1167
|
+
color: var(--emdash-ui-text);
|
|
1168
|
+
outline: none;
|
|
1169
|
+
}
|
|
1170
|
+
.emdash-inline-ui-pagination > :not(:first-child) {
|
|
1171
|
+
border-inline-start: 1px solid var(--emdash-ui-line);
|
|
1172
|
+
}
|
|
1173
|
+
.emdash-inline-ui-pagination > button {
|
|
1174
|
+
display: grid;
|
|
1175
|
+
place-items: center;
|
|
1176
|
+
cursor: pointer;
|
|
1177
|
+
}
|
|
1178
|
+
.emdash-inline-ui-pagination > button:hover:not(:disabled) {
|
|
1179
|
+
background: var(--emdash-ui-tint);
|
|
1180
|
+
}
|
|
1181
|
+
.emdash-inline-ui-pagination > button:disabled {
|
|
1182
|
+
color: var(--emdash-ui-placeholder);
|
|
1183
|
+
cursor: default;
|
|
1184
|
+
}
|
|
1185
|
+
.emdash-inline-ui-pagination > :focus-visible {
|
|
1186
|
+
box-shadow: inset 0 0 0 2px var(--emdash-ui-brand);
|
|
1187
|
+
}
|
|
1188
|
+
.emdash-inline-ui-pagination svg {
|
|
1189
|
+
width: 14px;
|
|
1190
|
+
height: 14px;
|
|
1191
|
+
}
|
|
1192
|
+
.emdash-inline-ui-pagination:dir(rtl) svg {
|
|
1193
|
+
scale: -1 1;
|
|
1194
|
+
}
|
|
1195
|
+
.emdash-inline-ui-pagination > input {
|
|
1196
|
+
width: 36px;
|
|
1197
|
+
font-size: 12px;
|
|
1198
|
+
font-variant-numeric: tabular-nums;
|
|
1199
|
+
text-align: center;
|
|
1200
|
+
}
|
|
1201
|
+
@media (pointer: coarse) {
|
|
1202
|
+
.emdash-inline-ui-pagination > button,
|
|
1203
|
+
.emdash-inline-ui-pagination > input {
|
|
1204
|
+
width: 40px;
|
|
1205
|
+
height: 40px;
|
|
1206
|
+
}
|
|
1207
|
+
/* iOS zooms the page into a field with smaller text. */
|
|
1208
|
+
.emdash-inline-ui-pagination > input {
|
|
1209
|
+
font-size: 16px;
|
|
1210
|
+
}
|
|
1211
|
+
.emdash-inline-ui-picker-tab,
|
|
1212
|
+
.emdash-inline-ui-picker-action {
|
|
1213
|
+
height: 44px;
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1217
|
+
.emdash-inline-ui-picker {
|
|
1218
|
+
animation: none;
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
`;
|