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
|
@@ -2,18 +2,17 @@
|
|
|
2
2
|
* Self-contained inline Portable Text editor for visual editing.
|
|
3
3
|
*
|
|
4
4
|
* Uses TipTap directly with content extensions — no admin UI deps.
|
|
5
|
-
* Includes
|
|
6
|
-
*
|
|
5
|
+
* Includes the admin editor's selection toolbar and slash menu, and a
|
|
6
|
+
* toolbar and picker for images, but no fixed toolbar, sidebar, or section
|
|
7
|
+
* picker.
|
|
7
8
|
*
|
|
8
9
|
* Converts between Portable Text and ProseMirror on mount/save.
|
|
9
10
|
* Auto-saves on blur, dispatches custom events for toolbar integration.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
import { htmlBlockFields } from "@emdash-cms/admin/html-block";
|
|
13
|
-
import {
|
|
14
|
-
import { Extension, Node, mergeAttributes, type JSONContent, type Range } from "@tiptap/core";
|
|
14
|
+
import { Node, mergeAttributes, type JSONContent } from "@tiptap/core";
|
|
15
15
|
import Focus from "@tiptap/extension-focus";
|
|
16
|
-
import Image from "@tiptap/extension-image";
|
|
17
16
|
import Link from "@tiptap/extension-link";
|
|
18
17
|
import Placeholder from "@tiptap/extension-placeholder";
|
|
19
18
|
import Subscript from "@tiptap/extension-subscript";
|
|
@@ -21,13 +20,11 @@ import Superscript from "@tiptap/extension-superscript";
|
|
|
21
20
|
import TextAlign from "@tiptap/extension-text-align";
|
|
22
21
|
import Typography from "@tiptap/extension-typography";
|
|
23
22
|
import Underline from "@tiptap/extension-underline";
|
|
24
|
-
import { Plugin } from "@tiptap/pm/state";
|
|
23
|
+
import { Plugin, type Transaction } from "@tiptap/pm/state";
|
|
25
24
|
import { useEditor, EditorContent, type Editor } from "@tiptap/react";
|
|
26
|
-
import { BubbleMenu } from "@tiptap/react/menus";
|
|
27
25
|
import StarterKit from "@tiptap/starter-kit";
|
|
28
|
-
import
|
|
26
|
+
import { exitSuggestion } from "@tiptap/suggestion";
|
|
29
27
|
import * as React from "react";
|
|
30
|
-
import { createPortal } from "react-dom";
|
|
31
28
|
|
|
32
29
|
import { resolveImageMedia } from "../content/converters/gallery.js";
|
|
33
30
|
import { normalizeImageLink } from "../content/converters/image-link.js";
|
|
@@ -44,9 +41,19 @@ import {
|
|
|
44
41
|
readOrderedListMetadata,
|
|
45
42
|
} from "../content/converters/numbered-list.js";
|
|
46
43
|
import type { ProseMirrorDocument } from "../content/converters/types.js";
|
|
47
|
-
import { computeThumbnailSize } from "../media/thumbnail.js";
|
|
48
44
|
import { CodeMarkExtension } from "./code-mark.js";
|
|
45
|
+
import { InlineBubbleMenu } from "./inline-bubble-menu.js";
|
|
49
46
|
import { InlineCodeBlockExtension } from "./inline-code-block.js";
|
|
47
|
+
import { INLINE_EDITOR_UI_STYLES, useInlineUiRoot } from "./inline-editor-ui.js";
|
|
48
|
+
import { INLINE_IMAGE_STYLES, InlineImageExtension, insertImage } from "./inline-image.js";
|
|
49
|
+
import { INLINE_MEDIA_PICKER_STYLES, InlineMediaPicker } from "./inline-media-picker.js";
|
|
50
|
+
import {
|
|
51
|
+
InlineSlashMenu,
|
|
52
|
+
createSlashCommandsExtension,
|
|
53
|
+
initialSlashMenuState,
|
|
54
|
+
type SlashCommandItem,
|
|
55
|
+
type SlashMenuState,
|
|
56
|
+
} from "./inline-slash-menu.js";
|
|
50
57
|
import { EmDashOrderedList } from "./ordered-list.js";
|
|
51
58
|
|
|
52
59
|
// ── Portable Text types ────────────────────────────────────────────
|
|
@@ -866,295 +873,6 @@ function convertPTMarks(marks: string[], markDefs: Map<string, PTMarkDef>): Mark
|
|
|
866
873
|
return pm;
|
|
867
874
|
}
|
|
868
875
|
|
|
869
|
-
// ── Inline BubbleMenu ──────────────────────────────────────────────
|
|
870
|
-
|
|
871
|
-
function InlineBubbleMenu({ editor }: { editor: Editor }) {
|
|
872
|
-
const [showLinkInput, setShowLinkInput] = React.useState(false);
|
|
873
|
-
const [linkUrl, setLinkUrl] = React.useState("");
|
|
874
|
-
const inputRef = React.useRef<HTMLInputElement>(null);
|
|
875
|
-
|
|
876
|
-
React.useEffect(() => {
|
|
877
|
-
if (showLinkInput) {
|
|
878
|
-
const existingUrl = editor.getAttributes("link").href || "";
|
|
879
|
-
setLinkUrl(existingUrl);
|
|
880
|
-
setTimeout(() => inputRef.current?.focus(), 0);
|
|
881
|
-
}
|
|
882
|
-
}, [showLinkInput, editor]);
|
|
883
|
-
|
|
884
|
-
const handleSetLink = () => {
|
|
885
|
-
if (linkUrl.trim() === "") {
|
|
886
|
-
editor.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
887
|
-
} else {
|
|
888
|
-
editor.chain().focus().extendMarkRange("link").setLink({ href: linkUrl.trim() }).run();
|
|
889
|
-
}
|
|
890
|
-
setShowLinkInput(false);
|
|
891
|
-
setLinkUrl("");
|
|
892
|
-
};
|
|
893
|
-
|
|
894
|
-
const handleRemoveLink = () => {
|
|
895
|
-
editor.chain().focus().extendMarkRange("link").unsetLink().run();
|
|
896
|
-
setShowLinkInput(false);
|
|
897
|
-
setLinkUrl("");
|
|
898
|
-
};
|
|
899
|
-
|
|
900
|
-
const handleKeyDown = (e: React.KeyboardEvent) => {
|
|
901
|
-
if (e.key === "Enter") {
|
|
902
|
-
e.preventDefault();
|
|
903
|
-
handleSetLink();
|
|
904
|
-
} else if (e.key === "Escape") {
|
|
905
|
-
setShowLinkInput(false);
|
|
906
|
-
setLinkUrl("");
|
|
907
|
-
editor.commands.focus();
|
|
908
|
-
}
|
|
909
|
-
};
|
|
910
|
-
|
|
911
|
-
return (
|
|
912
|
-
<BubbleMenu
|
|
913
|
-
editor={editor}
|
|
914
|
-
options={{ placement: "top", offset: 8, flip: true, shift: true }}
|
|
915
|
-
className="emdash-bubble-menu"
|
|
916
|
-
>
|
|
917
|
-
{showLinkInput ? (
|
|
918
|
-
<div style={{ display: "flex", alignItems: "center", gap: "4px" }}>
|
|
919
|
-
<input
|
|
920
|
-
ref={inputRef}
|
|
921
|
-
type="url"
|
|
922
|
-
placeholder="https://..."
|
|
923
|
-
value={linkUrl}
|
|
924
|
-
onChange={(e) => setLinkUrl(e.target.value)}
|
|
925
|
-
onKeyDown={handleKeyDown}
|
|
926
|
-
className="emdash-bubble-link-input"
|
|
927
|
-
/>
|
|
928
|
-
<button
|
|
929
|
-
type="button"
|
|
930
|
-
className="emdash-bubble-btn"
|
|
931
|
-
onClick={handleSetLink}
|
|
932
|
-
title="Apply link"
|
|
933
|
-
>
|
|
934
|
-
↗
|
|
935
|
-
</button>
|
|
936
|
-
{editor.isActive("link") && (
|
|
937
|
-
<button
|
|
938
|
-
type="button"
|
|
939
|
-
className="emdash-bubble-btn emdash-bubble-btn--danger"
|
|
940
|
-
onClick={handleRemoveLink}
|
|
941
|
-
title="Remove link"
|
|
942
|
-
>
|
|
943
|
-
✕
|
|
944
|
-
</button>
|
|
945
|
-
)}
|
|
946
|
-
</div>
|
|
947
|
-
) : (
|
|
948
|
-
<>
|
|
949
|
-
<button
|
|
950
|
-
type="button"
|
|
951
|
-
className={`emdash-bubble-btn ${editor.isActive("bold") ? "emdash-bubble-btn--active" : ""}`}
|
|
952
|
-
onClick={() => editor.chain().focus().toggleBold().run()}
|
|
953
|
-
title="Bold"
|
|
954
|
-
>
|
|
955
|
-
<strong>B</strong>
|
|
956
|
-
</button>
|
|
957
|
-
<button
|
|
958
|
-
type="button"
|
|
959
|
-
className={`emdash-bubble-btn ${editor.isActive("italic") ? "emdash-bubble-btn--active" : ""}`}
|
|
960
|
-
onClick={() => editor.chain().focus().toggleItalic().run()}
|
|
961
|
-
title="Italic"
|
|
962
|
-
>
|
|
963
|
-
<em>I</em>
|
|
964
|
-
</button>
|
|
965
|
-
<button
|
|
966
|
-
type="button"
|
|
967
|
-
className={`emdash-bubble-btn ${editor.isActive("underline") ? "emdash-bubble-btn--active" : ""}`}
|
|
968
|
-
onClick={() => editor.chain().focus().toggleUnderline().run()}
|
|
969
|
-
title="Underline"
|
|
970
|
-
>
|
|
971
|
-
<span style={{ textDecoration: "underline" }}>U</span>
|
|
972
|
-
</button>
|
|
973
|
-
<button
|
|
974
|
-
type="button"
|
|
975
|
-
className={`emdash-bubble-btn ${editor.isActive("strike") ? "emdash-bubble-btn--active" : ""}`}
|
|
976
|
-
onClick={() => editor.chain().focus().toggleStrike().run()}
|
|
977
|
-
title="Strikethrough"
|
|
978
|
-
>
|
|
979
|
-
<span style={{ textDecoration: "line-through" }}>S</span>
|
|
980
|
-
</button>
|
|
981
|
-
<button
|
|
982
|
-
type="button"
|
|
983
|
-
className={`emdash-bubble-btn ${editor.isActive("code") ? "emdash-bubble-btn--active" : ""}`}
|
|
984
|
-
onClick={() => editor.chain().focus().toggleCode().run()}
|
|
985
|
-
title="Code"
|
|
986
|
-
>
|
|
987
|
-
<span style={{ fontFamily: "monospace", fontSize: "13px" }}></></span>
|
|
988
|
-
</button>
|
|
989
|
-
<span className="emdash-bubble-divider" />
|
|
990
|
-
<button
|
|
991
|
-
type="button"
|
|
992
|
-
className={`emdash-bubble-btn ${editor.isActive("superscript") ? "emdash-bubble-btn--active" : ""}`}
|
|
993
|
-
onClick={() => editor.chain().focus().toggleSuperscript().run()}
|
|
994
|
-
title="Superscript"
|
|
995
|
-
>
|
|
996
|
-
<span style={{ fontSize: "13px" }}>x²</span>
|
|
997
|
-
</button>
|
|
998
|
-
<button
|
|
999
|
-
type="button"
|
|
1000
|
-
className={`emdash-bubble-btn ${editor.isActive("subscript") ? "emdash-bubble-btn--active" : ""}`}
|
|
1001
|
-
onClick={() => editor.chain().focus().toggleSubscript().run()}
|
|
1002
|
-
title="Subscript"
|
|
1003
|
-
>
|
|
1004
|
-
<span style={{ fontSize: "13px" }}>x₂</span>
|
|
1005
|
-
</button>
|
|
1006
|
-
<span className="emdash-bubble-divider" />
|
|
1007
|
-
<button
|
|
1008
|
-
type="button"
|
|
1009
|
-
className={`emdash-bubble-btn ${editor.isActive("link") ? "emdash-bubble-btn--active" : ""}`}
|
|
1010
|
-
onClick={() => setShowLinkInput(true)}
|
|
1011
|
-
title={editor.isActive("link") ? "Edit link" : "Add link"}
|
|
1012
|
-
>
|
|
1013
|
-
🔗
|
|
1014
|
-
</button>
|
|
1015
|
-
</>
|
|
1016
|
-
)}
|
|
1017
|
-
</BubbleMenu>
|
|
1018
|
-
);
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
// ── Slash Menu ──────────────────────────────────────────────────────
|
|
1022
|
-
|
|
1023
|
-
interface SlashCommandItem {
|
|
1024
|
-
id: string;
|
|
1025
|
-
title: string;
|
|
1026
|
-
description: string;
|
|
1027
|
-
icon: string;
|
|
1028
|
-
command: (props: { editor: Editor; range: Range }) => void;
|
|
1029
|
-
aliases?: string[];
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
const slashCommands: SlashCommandItem[] = [
|
|
1033
|
-
{
|
|
1034
|
-
id: "heading1",
|
|
1035
|
-
title: "Heading 1",
|
|
1036
|
-
description: "Large section heading",
|
|
1037
|
-
icon: "H1",
|
|
1038
|
-
aliases: ["h1", "title"],
|
|
1039
|
-
command: ({ editor, range }) => {
|
|
1040
|
-
editor.chain().focus().deleteRange(range).setNode("heading", { level: 1 }).run();
|
|
1041
|
-
},
|
|
1042
|
-
},
|
|
1043
|
-
{
|
|
1044
|
-
id: "heading2",
|
|
1045
|
-
title: "Heading 2",
|
|
1046
|
-
description: "Medium section heading",
|
|
1047
|
-
icon: "H2",
|
|
1048
|
-
aliases: ["h2", "subtitle"],
|
|
1049
|
-
command: ({ editor, range }) => {
|
|
1050
|
-
editor.chain().focus().deleteRange(range).setNode("heading", { level: 2 }).run();
|
|
1051
|
-
},
|
|
1052
|
-
},
|
|
1053
|
-
{
|
|
1054
|
-
id: "heading3",
|
|
1055
|
-
title: "Heading 3",
|
|
1056
|
-
description: "Small section heading",
|
|
1057
|
-
icon: "H3",
|
|
1058
|
-
aliases: ["h3"],
|
|
1059
|
-
command: ({ editor, range }) => {
|
|
1060
|
-
editor.chain().focus().deleteRange(range).setNode("heading", { level: 3 }).run();
|
|
1061
|
-
},
|
|
1062
|
-
},
|
|
1063
|
-
{
|
|
1064
|
-
id: "bulletList",
|
|
1065
|
-
title: "Bullet List",
|
|
1066
|
-
description: "Create a bullet list",
|
|
1067
|
-
icon: "•",
|
|
1068
|
-
aliases: ["ul", "unordered"],
|
|
1069
|
-
command: ({ editor, range }) => {
|
|
1070
|
-
editor.chain().focus().deleteRange(range).toggleBulletList().run();
|
|
1071
|
-
},
|
|
1072
|
-
},
|
|
1073
|
-
{
|
|
1074
|
-
id: "numberedList",
|
|
1075
|
-
title: "Numbered List",
|
|
1076
|
-
description: "Create a numbered list",
|
|
1077
|
-
icon: "1.",
|
|
1078
|
-
aliases: ["ol", "ordered"],
|
|
1079
|
-
command: ({ editor, range }) => {
|
|
1080
|
-
editor.chain().focus().deleteRange(range).toggleOrderedList().run();
|
|
1081
|
-
},
|
|
1082
|
-
},
|
|
1083
|
-
{
|
|
1084
|
-
id: "quote",
|
|
1085
|
-
title: "Quote",
|
|
1086
|
-
description: "Insert a blockquote",
|
|
1087
|
-
icon: "\u201C",
|
|
1088
|
-
aliases: ["blockquote", "cite"],
|
|
1089
|
-
command: ({ editor, range }) => {
|
|
1090
|
-
editor.chain().focus().deleteRange(range).toggleBlockquote().run();
|
|
1091
|
-
},
|
|
1092
|
-
},
|
|
1093
|
-
{
|
|
1094
|
-
id: "codeBlock",
|
|
1095
|
-
title: "Code Block",
|
|
1096
|
-
description: "Insert a code block",
|
|
1097
|
-
icon: "</>",
|
|
1098
|
-
aliases: ["code", "pre", "```"],
|
|
1099
|
-
command: ({ editor, range }) => {
|
|
1100
|
-
editor.chain().focus().deleteRange(range).toggleCodeBlock().run();
|
|
1101
|
-
},
|
|
1102
|
-
},
|
|
1103
|
-
{
|
|
1104
|
-
id: "htmlBlock",
|
|
1105
|
-
title: "HTML",
|
|
1106
|
-
description: "Insert raw HTML",
|
|
1107
|
-
icon: "< >",
|
|
1108
|
-
aliases: ["html", "raw", "markup"],
|
|
1109
|
-
command: ({ editor, range }) => {
|
|
1110
|
-
editor
|
|
1111
|
-
.chain()
|
|
1112
|
-
.focus()
|
|
1113
|
-
.deleteRange(range)
|
|
1114
|
-
.insertContent({ type: "htmlBlock", attrs: { html: "", isolated: true } })
|
|
1115
|
-
.run();
|
|
1116
|
-
},
|
|
1117
|
-
},
|
|
1118
|
-
{
|
|
1119
|
-
id: "divider",
|
|
1120
|
-
title: "Divider",
|
|
1121
|
-
description: "Insert a horizontal rule",
|
|
1122
|
-
icon: "—",
|
|
1123
|
-
aliases: ["hr", "---", "separator"],
|
|
1124
|
-
command: ({ editor, range }) => {
|
|
1125
|
-
editor.chain().focus().deleteRange(range).setHorizontalRule().run();
|
|
1126
|
-
},
|
|
1127
|
-
},
|
|
1128
|
-
{
|
|
1129
|
-
id: "image",
|
|
1130
|
-
title: "Image",
|
|
1131
|
-
description: "Insert an image",
|
|
1132
|
-
icon: "🖼",
|
|
1133
|
-
aliases: ["img", "photo", "picture"],
|
|
1134
|
-
command: ({ editor, range }) => {
|
|
1135
|
-
editor.chain().focus().deleteRange(range).run();
|
|
1136
|
-
// Signal the component to open the media picker
|
|
1137
|
-
document.dispatchEvent(new CustomEvent("emdash:open-media-picker"));
|
|
1138
|
-
},
|
|
1139
|
-
},
|
|
1140
|
-
];
|
|
1141
|
-
|
|
1142
|
-
interface SlashMenuState {
|
|
1143
|
-
isOpen: boolean;
|
|
1144
|
-
items: SlashCommandItem[];
|
|
1145
|
-
selectedIndex: number;
|
|
1146
|
-
clientRect: (() => DOMRect | null) | null;
|
|
1147
|
-
range: Range | null;
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
const initialSlashMenuState: SlashMenuState = {
|
|
1151
|
-
isOpen: false,
|
|
1152
|
-
items: [],
|
|
1153
|
-
selectedIndex: 0,
|
|
1154
|
-
clientRect: null,
|
|
1155
|
-
range: null,
|
|
1156
|
-
};
|
|
1157
|
-
|
|
1158
876
|
/**
|
|
1159
877
|
* Minimal `htmlBlock` TipTap node for the inline (visual-editing) editor.
|
|
1160
878
|
*
|
|
@@ -1322,844 +1040,6 @@ const PluginBlockNode = Node.create({
|
|
|
1322
1040
|
},
|
|
1323
1041
|
});
|
|
1324
1042
|
|
|
1325
|
-
function createSlashCommandsExtension(options: {
|
|
1326
|
-
filterCommands: (query: string) => SlashCommandItem[];
|
|
1327
|
-
onStateChange: React.Dispatch<React.SetStateAction<SlashMenuState>>;
|
|
1328
|
-
getState: () => SlashMenuState;
|
|
1329
|
-
}) {
|
|
1330
|
-
const { filterCommands, onStateChange, getState } = options;
|
|
1331
|
-
|
|
1332
|
-
return Extension.create({
|
|
1333
|
-
name: "slashCommands",
|
|
1334
|
-
|
|
1335
|
-
addProseMirrorPlugins() {
|
|
1336
|
-
return [
|
|
1337
|
-
Suggestion({
|
|
1338
|
-
editor: this.editor,
|
|
1339
|
-
char: "/",
|
|
1340
|
-
startOfLine: true,
|
|
1341
|
-
command: ({ editor, range, props }) => {
|
|
1342
|
-
const item: unknown = props;
|
|
1343
|
-
if (
|
|
1344
|
-
typeof item === "object" &&
|
|
1345
|
-
item !== null &&
|
|
1346
|
-
"command" in item &&
|
|
1347
|
-
typeof item.command === "function"
|
|
1348
|
-
) {
|
|
1349
|
-
item.command({ editor, range });
|
|
1350
|
-
}
|
|
1351
|
-
},
|
|
1352
|
-
items: ({ query }) => filterCommands(query),
|
|
1353
|
-
render: () => {
|
|
1354
|
-
return {
|
|
1355
|
-
onStart: (props) => {
|
|
1356
|
-
onStateChange({
|
|
1357
|
-
isOpen: true,
|
|
1358
|
-
items: props.items,
|
|
1359
|
-
selectedIndex: 0,
|
|
1360
|
-
clientRect: props.clientRect ?? null,
|
|
1361
|
-
range: props.range,
|
|
1362
|
-
});
|
|
1363
|
-
},
|
|
1364
|
-
onUpdate: (props) => {
|
|
1365
|
-
onStateChange((prev) => ({
|
|
1366
|
-
...prev,
|
|
1367
|
-
items: props.items,
|
|
1368
|
-
selectedIndex: 0,
|
|
1369
|
-
clientRect: props.clientRect ?? null,
|
|
1370
|
-
range: props.range,
|
|
1371
|
-
}));
|
|
1372
|
-
},
|
|
1373
|
-
onKeyDown: (props) => {
|
|
1374
|
-
if (props.event.key === "Escape") {
|
|
1375
|
-
onStateChange((prev) => ({ ...prev, isOpen: false }));
|
|
1376
|
-
return true;
|
|
1377
|
-
}
|
|
1378
|
-
if (props.event.key === "ArrowUp") {
|
|
1379
|
-
onStateChange((prev) => ({
|
|
1380
|
-
...prev,
|
|
1381
|
-
selectedIndex: (prev.selectedIndex - 1 + prev.items.length) % prev.items.length,
|
|
1382
|
-
}));
|
|
1383
|
-
return true;
|
|
1384
|
-
}
|
|
1385
|
-
if (props.event.key === "ArrowDown") {
|
|
1386
|
-
onStateChange((prev) => ({
|
|
1387
|
-
...prev,
|
|
1388
|
-
selectedIndex: (prev.selectedIndex + 1) % prev.items.length,
|
|
1389
|
-
}));
|
|
1390
|
-
return true;
|
|
1391
|
-
}
|
|
1392
|
-
if (props.event.key === "Enter") {
|
|
1393
|
-
const state = getState();
|
|
1394
|
-
if (state.items.length > 0 && state.range) {
|
|
1395
|
-
const item = state.items[state.selectedIndex];
|
|
1396
|
-
if (item) {
|
|
1397
|
-
item.command({ editor: this.editor, range: state.range });
|
|
1398
|
-
onStateChange((prev) => ({ ...prev, isOpen: false }));
|
|
1399
|
-
return true;
|
|
1400
|
-
}
|
|
1401
|
-
}
|
|
1402
|
-
return false;
|
|
1403
|
-
}
|
|
1404
|
-
return false;
|
|
1405
|
-
},
|
|
1406
|
-
onExit: () => {
|
|
1407
|
-
onStateChange((prev) => ({ ...prev, isOpen: false }));
|
|
1408
|
-
},
|
|
1409
|
-
};
|
|
1410
|
-
},
|
|
1411
|
-
}),
|
|
1412
|
-
];
|
|
1413
|
-
},
|
|
1414
|
-
});
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
|
-
function InlineSlashMenu({
|
|
1418
|
-
state,
|
|
1419
|
-
onCommand,
|
|
1420
|
-
setSelectedIndex,
|
|
1421
|
-
}: {
|
|
1422
|
-
state: SlashMenuState;
|
|
1423
|
-
onCommand: (item: SlashCommandItem) => void;
|
|
1424
|
-
setSelectedIndex: (index: number) => void;
|
|
1425
|
-
}) {
|
|
1426
|
-
const containerRef = React.useRef<HTMLDivElement>(null);
|
|
1427
|
-
|
|
1428
|
-
// Track whether we have a positioned reference to avoid rendering at (0,0)
|
|
1429
|
-
const [hasReference, setHasReference] = React.useState(false);
|
|
1430
|
-
|
|
1431
|
-
const { refs, floatingStyles } = useFloating({
|
|
1432
|
-
open: state.isOpen && hasReference,
|
|
1433
|
-
placement: "bottom-start",
|
|
1434
|
-
middleware: [offset(8), flip(), shift({ padding: 8 })],
|
|
1435
|
-
whileElementsMounted: autoUpdate,
|
|
1436
|
-
});
|
|
1437
|
-
|
|
1438
|
-
React.useEffect(() => {
|
|
1439
|
-
if (state.clientRect) {
|
|
1440
|
-
const clientRectFn = state.clientRect;
|
|
1441
|
-
refs.setReference({
|
|
1442
|
-
getBoundingClientRect: () => clientRectFn() ?? new DOMRect(),
|
|
1443
|
-
});
|
|
1444
|
-
setHasReference(true);
|
|
1445
|
-
} else {
|
|
1446
|
-
setHasReference(false);
|
|
1447
|
-
}
|
|
1448
|
-
}, [state.clientRect, refs]);
|
|
1449
|
-
|
|
1450
|
-
// Reset reference tracking when menu closes
|
|
1451
|
-
React.useEffect(() => {
|
|
1452
|
-
if (!state.isOpen) setHasReference(false);
|
|
1453
|
-
}, [state.isOpen]);
|
|
1454
|
-
|
|
1455
|
-
React.useEffect(() => {
|
|
1456
|
-
if (!state.isOpen || !hasReference) return;
|
|
1457
|
-
const container = containerRef.current;
|
|
1458
|
-
if (!container) return;
|
|
1459
|
-
const selected = container.querySelector(`[data-index="${state.selectedIndex}"]`);
|
|
1460
|
-
if (selected instanceof HTMLElement) {
|
|
1461
|
-
// Use scrollIntoView only within the menu container to avoid scrolling the page
|
|
1462
|
-
const containerTop = container.scrollTop;
|
|
1463
|
-
const containerBottom = containerTop + container.clientHeight;
|
|
1464
|
-
const itemTop = selected.offsetTop;
|
|
1465
|
-
const itemBottom = itemTop + selected.offsetHeight;
|
|
1466
|
-
if (itemTop < containerTop) {
|
|
1467
|
-
container.scrollTop = itemTop;
|
|
1468
|
-
} else if (itemBottom > containerBottom) {
|
|
1469
|
-
container.scrollTop = itemBottom - container.clientHeight;
|
|
1470
|
-
}
|
|
1471
|
-
}
|
|
1472
|
-
}, [state.selectedIndex, state.isOpen, hasReference]);
|
|
1473
|
-
|
|
1474
|
-
if (!state.isOpen || !hasReference) return null;
|
|
1475
|
-
|
|
1476
|
-
return createPortal(
|
|
1477
|
-
<div
|
|
1478
|
-
ref={(node) => {
|
|
1479
|
-
containerRef.current = node;
|
|
1480
|
-
refs.setFloating(node);
|
|
1481
|
-
}}
|
|
1482
|
-
style={{
|
|
1483
|
-
...floatingStyles,
|
|
1484
|
-
zIndex: 100,
|
|
1485
|
-
borderRadius: "8px",
|
|
1486
|
-
border: "1px solid #d1d5db",
|
|
1487
|
-
background: "white",
|
|
1488
|
-
padding: "4px",
|
|
1489
|
-
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
|
|
1490
|
-
minWidth: "220px",
|
|
1491
|
-
maxHeight: "300px",
|
|
1492
|
-
overflowY: "auto",
|
|
1493
|
-
}}
|
|
1494
|
-
className="emdash-slash-menu"
|
|
1495
|
-
>
|
|
1496
|
-
{state.items.length === 0 ? (
|
|
1497
|
-
<p
|
|
1498
|
-
style={{
|
|
1499
|
-
padding: "8px 12px",
|
|
1500
|
-
fontSize: "13px",
|
|
1501
|
-
color: "#9ca3af",
|
|
1502
|
-
margin: 0,
|
|
1503
|
-
}}
|
|
1504
|
-
>
|
|
1505
|
-
No results
|
|
1506
|
-
</p>
|
|
1507
|
-
) : (
|
|
1508
|
-
state.items.map((item, index) => (
|
|
1509
|
-
<button
|
|
1510
|
-
key={item.id}
|
|
1511
|
-
type="button"
|
|
1512
|
-
data-index={index}
|
|
1513
|
-
style={{
|
|
1514
|
-
display: "flex",
|
|
1515
|
-
alignItems: "center",
|
|
1516
|
-
gap: "12px",
|
|
1517
|
-
width: "100%",
|
|
1518
|
-
padding: "8px 12px",
|
|
1519
|
-
fontSize: "13px",
|
|
1520
|
-
borderRadius: "4px",
|
|
1521
|
-
border: "none",
|
|
1522
|
-
textAlign: "left",
|
|
1523
|
-
cursor: "pointer",
|
|
1524
|
-
background: index === state.selectedIndex ? "#f3f4f6" : "transparent",
|
|
1525
|
-
}}
|
|
1526
|
-
onClick={() => onCommand(item)}
|
|
1527
|
-
onMouseEnter={() => setSelectedIndex(index)}
|
|
1528
|
-
>
|
|
1529
|
-
<span
|
|
1530
|
-
style={{
|
|
1531
|
-
width: "24px",
|
|
1532
|
-
height: "24px",
|
|
1533
|
-
display: "flex",
|
|
1534
|
-
alignItems: "center",
|
|
1535
|
-
justifyContent: "center",
|
|
1536
|
-
flexShrink: 0,
|
|
1537
|
-
fontSize: "14px",
|
|
1538
|
-
fontWeight: 600,
|
|
1539
|
-
color: "#6b7280",
|
|
1540
|
-
background: "#f3f4f6",
|
|
1541
|
-
borderRadius: "4px",
|
|
1542
|
-
}}
|
|
1543
|
-
>
|
|
1544
|
-
{item.icon}
|
|
1545
|
-
</span>
|
|
1546
|
-
<span style={{ display: "flex", flexDirection: "column" }}>
|
|
1547
|
-
<span style={{ fontWeight: 500 }}>{item.title}</span>
|
|
1548
|
-
<span style={{ fontSize: "12px", color: "#9ca3af" }}>{item.description}</span>
|
|
1549
|
-
</span>
|
|
1550
|
-
</button>
|
|
1551
|
-
))
|
|
1552
|
-
)}
|
|
1553
|
-
</div>,
|
|
1554
|
-
document.body,
|
|
1555
|
-
);
|
|
1556
|
-
}
|
|
1557
|
-
|
|
1558
|
-
// ── Media Picker ───────────────────────────────────────────────────
|
|
1559
|
-
|
|
1560
|
-
interface MediaItemData {
|
|
1561
|
-
id: string;
|
|
1562
|
-
filename: string;
|
|
1563
|
-
mimeType: string;
|
|
1564
|
-
url: string;
|
|
1565
|
-
storageKey?: string;
|
|
1566
|
-
width?: number;
|
|
1567
|
-
height?: number;
|
|
1568
|
-
blurhash?: string;
|
|
1569
|
-
dominantColor?: string;
|
|
1570
|
-
alt?: string;
|
|
1571
|
-
provider?: string;
|
|
1572
|
-
previewUrl?: string;
|
|
1573
|
-
meta?: Record<string, unknown>;
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
interface ProviderInfo {
|
|
1577
|
-
id: string;
|
|
1578
|
-
name: string;
|
|
1579
|
-
icon?: string;
|
|
1580
|
-
capabilities: { browse: boolean; search: boolean; upload: boolean; delete: boolean };
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
const API_BASE = "/_emdash/api";
|
|
1584
|
-
|
|
1585
|
-
async function ecFetch(url: string, init?: RequestInit): Promise<Response> {
|
|
1586
|
-
const base = new Headers(init?.headers);
|
|
1587
|
-
base.set("X-EmDash-Request", "1");
|
|
1588
|
-
return fetch(url, {
|
|
1589
|
-
credentials: "same-origin",
|
|
1590
|
-
...init,
|
|
1591
|
-
headers: base,
|
|
1592
|
-
});
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
|
-
function InlineMediaPicker({
|
|
1596
|
-
open,
|
|
1597
|
-
onClose,
|
|
1598
|
-
onSelect,
|
|
1599
|
-
}: {
|
|
1600
|
-
open: boolean;
|
|
1601
|
-
onClose: () => void;
|
|
1602
|
-
onSelect: (item: MediaItemData) => void;
|
|
1603
|
-
}) {
|
|
1604
|
-
const [providers, setProviders] = React.useState<ProviderInfo[]>([]);
|
|
1605
|
-
const [activeProvider, setActiveProvider] = React.useState("local");
|
|
1606
|
-
const [items, setItems] = React.useState<MediaItemData[]>([]);
|
|
1607
|
-
const [loading, setLoading] = React.useState(false);
|
|
1608
|
-
const [uploading, setUploading] = React.useState(false);
|
|
1609
|
-
const [selectedId, setSelectedId] = React.useState<string | null>(null);
|
|
1610
|
-
const fileInputRef = React.useRef<HTMLInputElement>(null);
|
|
1611
|
-
|
|
1612
|
-
// Fetch providers on open
|
|
1613
|
-
React.useEffect(() => {
|
|
1614
|
-
if (!open) return;
|
|
1615
|
-
setSelectedId(null);
|
|
1616
|
-
setActiveProvider("local");
|
|
1617
|
-
ecFetch(`${API_BASE}/media/providers`)
|
|
1618
|
-
.then((r) => r.json())
|
|
1619
|
-
.then((d) => setProviders(d.data.items ?? []))
|
|
1620
|
-
.catch(() => setProviders([]));
|
|
1621
|
-
}, [open]);
|
|
1622
|
-
|
|
1623
|
-
// Fetch items when provider changes
|
|
1624
|
-
React.useEffect(() => {
|
|
1625
|
-
if (!open) return;
|
|
1626
|
-
setLoading(true);
|
|
1627
|
-
setSelectedId(null);
|
|
1628
|
-
|
|
1629
|
-
const url =
|
|
1630
|
-
activeProvider === "local"
|
|
1631
|
-
? `${API_BASE}/media?mimeType=image/&limit=50`
|
|
1632
|
-
: `${API_BASE}/media/providers/${activeProvider}?mimeType=image/&limit=50`;
|
|
1633
|
-
|
|
1634
|
-
void (async () => {
|
|
1635
|
-
try {
|
|
1636
|
-
const r = await ecFetch(url);
|
|
1637
|
-
const d = await r.json();
|
|
1638
|
-
const raw = d.data.items ?? [];
|
|
1639
|
-
// eslint-disable-next-line typescript/no-unsafe-type-assertion -- API response items mapped to MediaItem shape
|
|
1640
|
-
const typedRaw = raw as Array<{
|
|
1641
|
-
id: string;
|
|
1642
|
-
filename?: string;
|
|
1643
|
-
mimeType?: string;
|
|
1644
|
-
url?: string;
|
|
1645
|
-
previewUrl?: string;
|
|
1646
|
-
storageKey?: string;
|
|
1647
|
-
width?: number;
|
|
1648
|
-
height?: number;
|
|
1649
|
-
blurhash?: string;
|
|
1650
|
-
dominantColor?: string;
|
|
1651
|
-
alt?: string;
|
|
1652
|
-
meta?: Record<string, unknown>;
|
|
1653
|
-
}>;
|
|
1654
|
-
setItems(
|
|
1655
|
-
typedRaw.map((item) => ({
|
|
1656
|
-
id: item.id,
|
|
1657
|
-
filename: item.filename || "",
|
|
1658
|
-
mimeType: item.mimeType || "image/unknown",
|
|
1659
|
-
url:
|
|
1660
|
-
item.url ||
|
|
1661
|
-
item.previewUrl ||
|
|
1662
|
-
(item.storageKey ? `${API_BASE}/media/file/${item.storageKey}` : ""),
|
|
1663
|
-
storageKey: item.storageKey,
|
|
1664
|
-
width: item.width,
|
|
1665
|
-
height: item.height,
|
|
1666
|
-
blurhash: item.blurhash,
|
|
1667
|
-
dominantColor: item.dominantColor,
|
|
1668
|
-
alt: item.alt,
|
|
1669
|
-
provider: activeProvider === "local" ? undefined : activeProvider,
|
|
1670
|
-
previewUrl: item.previewUrl,
|
|
1671
|
-
meta: item.meta,
|
|
1672
|
-
})),
|
|
1673
|
-
);
|
|
1674
|
-
} catch {
|
|
1675
|
-
setItems([]);
|
|
1676
|
-
} finally {
|
|
1677
|
-
setLoading(false);
|
|
1678
|
-
}
|
|
1679
|
-
})();
|
|
1680
|
-
}, [open, activeProvider]);
|
|
1681
|
-
|
|
1682
|
-
const handleUpload = async (file: File) => {
|
|
1683
|
-
setUploading(true);
|
|
1684
|
-
try {
|
|
1685
|
-
// Detect dimensions and generate a thumbnail for large images to
|
|
1686
|
-
// avoid OOM in server-side blurhash generation on Workers.
|
|
1687
|
-
const dims = await new Promise<{
|
|
1688
|
-
width?: number;
|
|
1689
|
-
height?: number;
|
|
1690
|
-
thumbnail?: Blob;
|
|
1691
|
-
}>((resolve) => {
|
|
1692
|
-
if (!file.type.startsWith("image/")) return resolve({});
|
|
1693
|
-
const img = new window.Image();
|
|
1694
|
-
img.onload = () => {
|
|
1695
|
-
const w = img.naturalWidth;
|
|
1696
|
-
const h = img.naturalHeight;
|
|
1697
|
-
// 32 MB RGBA threshold — matches server MAX_DECODED_BYTES
|
|
1698
|
-
if (w * h * 4 > 32 * 1024 * 1024) {
|
|
1699
|
-
const { width: thumbW, height: thumbH } = computeThumbnailSize(w, h);
|
|
1700
|
-
try {
|
|
1701
|
-
const canvas = document.createElement("canvas");
|
|
1702
|
-
canvas.width = thumbW;
|
|
1703
|
-
canvas.height = thumbH;
|
|
1704
|
-
const ctx = canvas.getContext("2d");
|
|
1705
|
-
if (ctx) {
|
|
1706
|
-
ctx.drawImage(img, 0, 0, thumbW, thumbH);
|
|
1707
|
-
canvas.toBlob((blob) => {
|
|
1708
|
-
URL.revokeObjectURL(img.src);
|
|
1709
|
-
resolve({ width: w, height: h, thumbnail: blob ?? undefined });
|
|
1710
|
-
}, "image/png");
|
|
1711
|
-
return;
|
|
1712
|
-
}
|
|
1713
|
-
} catch {
|
|
1714
|
-
// Canvas allocation or draw failed — fall through to no-thumbnail path
|
|
1715
|
-
}
|
|
1716
|
-
}
|
|
1717
|
-
URL.revokeObjectURL(img.src);
|
|
1718
|
-
resolve({ width: w, height: h });
|
|
1719
|
-
};
|
|
1720
|
-
img.onerror = () => {
|
|
1721
|
-
resolve({});
|
|
1722
|
-
URL.revokeObjectURL(img.src);
|
|
1723
|
-
};
|
|
1724
|
-
img.src = URL.createObjectURL(file);
|
|
1725
|
-
});
|
|
1726
|
-
|
|
1727
|
-
let item: MediaItemData;
|
|
1728
|
-
|
|
1729
|
-
if (activeProvider === "local") {
|
|
1730
|
-
const formData = new FormData();
|
|
1731
|
-
formData.append("file", file);
|
|
1732
|
-
if (dims.width) formData.append("width", String(dims.width));
|
|
1733
|
-
if (dims.height) formData.append("height", String(dims.height));
|
|
1734
|
-
if (dims.thumbnail) formData.append("thumbnail", dims.thumbnail, "thumb.png");
|
|
1735
|
-
const res = await ecFetch(`${API_BASE}/media`, { method: "POST", body: formData });
|
|
1736
|
-
const data = await res.json();
|
|
1737
|
-
const unwrapped = data.data ?? data;
|
|
1738
|
-
if (!unwrapped.item) throw new Error("Upload failed");
|
|
1739
|
-
const raw = unwrapped.item;
|
|
1740
|
-
item = {
|
|
1741
|
-
id: raw.id,
|
|
1742
|
-
filename: raw.filename || file.name,
|
|
1743
|
-
mimeType: raw.mimeType || file.type,
|
|
1744
|
-
url: raw.url || raw.previewUrl || `${API_BASE}/media/file/${raw.storageKey}`,
|
|
1745
|
-
storageKey: raw.storageKey,
|
|
1746
|
-
width: raw.width || dims.width,
|
|
1747
|
-
height: raw.height || dims.height,
|
|
1748
|
-
blurhash: raw.blurhash,
|
|
1749
|
-
dominantColor: raw.dominantColor,
|
|
1750
|
-
alt: raw.alt,
|
|
1751
|
-
};
|
|
1752
|
-
} else {
|
|
1753
|
-
const formData = new FormData();
|
|
1754
|
-
formData.append("file", file);
|
|
1755
|
-
const res = await ecFetch(`${API_BASE}/media/providers/${activeProvider}`, {
|
|
1756
|
-
method: "POST",
|
|
1757
|
-
body: formData,
|
|
1758
|
-
});
|
|
1759
|
-
const data = await res.json();
|
|
1760
|
-
const unwrapped = data.data ?? data;
|
|
1761
|
-
if (!unwrapped.item) throw new Error("Upload failed");
|
|
1762
|
-
const raw = unwrapped.item;
|
|
1763
|
-
item = {
|
|
1764
|
-
id: raw.id,
|
|
1765
|
-
filename: raw.filename || file.name,
|
|
1766
|
-
mimeType: raw.mimeType || file.type,
|
|
1767
|
-
url: raw.previewUrl || "",
|
|
1768
|
-
width: raw.width || dims.width,
|
|
1769
|
-
height: raw.height || dims.height,
|
|
1770
|
-
blurhash: raw.blurhash,
|
|
1771
|
-
dominantColor: raw.dominantColor,
|
|
1772
|
-
alt: raw.alt,
|
|
1773
|
-
provider: activeProvider,
|
|
1774
|
-
previewUrl: raw.previewUrl,
|
|
1775
|
-
meta: raw.meta,
|
|
1776
|
-
};
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
setItems((prev) => [item, ...prev]);
|
|
1780
|
-
setSelectedId(item.id);
|
|
1781
|
-
} catch (err) {
|
|
1782
|
-
console.error("Upload failed:", err);
|
|
1783
|
-
} finally {
|
|
1784
|
-
setUploading(false);
|
|
1785
|
-
}
|
|
1786
|
-
};
|
|
1787
|
-
|
|
1788
|
-
const handleConfirm = () => {
|
|
1789
|
-
const item = items.find((i) => i.id === selectedId);
|
|
1790
|
-
if (item) onSelect(item);
|
|
1791
|
-
};
|
|
1792
|
-
|
|
1793
|
-
const providerTabs = React.useMemo(() => {
|
|
1794
|
-
const tabs: Array<{ id: string; name: string; icon?: string }> = [
|
|
1795
|
-
{ id: "local", name: "Library" },
|
|
1796
|
-
];
|
|
1797
|
-
for (const p of providers) {
|
|
1798
|
-
if (p.id !== "local") tabs.push({ id: p.id, name: p.name, icon: p.icon });
|
|
1799
|
-
}
|
|
1800
|
-
return tabs;
|
|
1801
|
-
}, [providers]);
|
|
1802
|
-
|
|
1803
|
-
if (!open) return null;
|
|
1804
|
-
|
|
1805
|
-
return createPortal(
|
|
1806
|
-
<div
|
|
1807
|
-
style={{
|
|
1808
|
-
position: "fixed",
|
|
1809
|
-
inset: 0,
|
|
1810
|
-
zIndex: 10000,
|
|
1811
|
-
display: "flex",
|
|
1812
|
-
alignItems: "center",
|
|
1813
|
-
justifyContent: "center",
|
|
1814
|
-
background: "rgba(0,0,0,0.5)",
|
|
1815
|
-
fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
1816
|
-
}}
|
|
1817
|
-
onClick={(e) => {
|
|
1818
|
-
if (e.target === e.currentTarget) onClose();
|
|
1819
|
-
}}
|
|
1820
|
-
>
|
|
1821
|
-
<div
|
|
1822
|
-
style={{
|
|
1823
|
-
background: "white",
|
|
1824
|
-
borderRadius: "12px",
|
|
1825
|
-
width: "min(700px, 90vw)",
|
|
1826
|
-
maxHeight: "80vh",
|
|
1827
|
-
display: "flex",
|
|
1828
|
-
flexDirection: "column",
|
|
1829
|
-
overflow: "hidden",
|
|
1830
|
-
boxShadow: "0 20px 60px rgba(0,0,0,0.3)",
|
|
1831
|
-
}}
|
|
1832
|
-
className="emdash-media-picker"
|
|
1833
|
-
>
|
|
1834
|
-
{/* Header */}
|
|
1835
|
-
<div
|
|
1836
|
-
style={{
|
|
1837
|
-
display: "flex",
|
|
1838
|
-
alignItems: "center",
|
|
1839
|
-
justifyContent: "space-between",
|
|
1840
|
-
padding: "16px 20px",
|
|
1841
|
-
borderBottom: "1px solid #e5e7eb",
|
|
1842
|
-
}}
|
|
1843
|
-
>
|
|
1844
|
-
<span style={{ fontSize: "16px", fontWeight: 600 }}>Insert Image</span>
|
|
1845
|
-
<button
|
|
1846
|
-
type="button"
|
|
1847
|
-
onClick={onClose}
|
|
1848
|
-
style={{
|
|
1849
|
-
background: "none",
|
|
1850
|
-
border: "none",
|
|
1851
|
-
cursor: "pointer",
|
|
1852
|
-
fontSize: "18px",
|
|
1853
|
-
padding: "4px 8px",
|
|
1854
|
-
borderRadius: "4px",
|
|
1855
|
-
color: "#6b7280",
|
|
1856
|
-
}}
|
|
1857
|
-
aria-label="Close"
|
|
1858
|
-
>
|
|
1859
|
-
✕
|
|
1860
|
-
</button>
|
|
1861
|
-
</div>
|
|
1862
|
-
|
|
1863
|
-
{/* Provider tabs */}
|
|
1864
|
-
{providerTabs.length > 1 && (
|
|
1865
|
-
<div
|
|
1866
|
-
style={{
|
|
1867
|
-
display: "flex",
|
|
1868
|
-
gap: "6px",
|
|
1869
|
-
padding: "12px 20px",
|
|
1870
|
-
borderBottom: "1px solid #e5e7eb",
|
|
1871
|
-
flexWrap: "wrap",
|
|
1872
|
-
}}
|
|
1873
|
-
>
|
|
1874
|
-
{providerTabs.map((tab) => (
|
|
1875
|
-
<button
|
|
1876
|
-
key={tab.id}
|
|
1877
|
-
type="button"
|
|
1878
|
-
onClick={() => setActiveProvider(tab.id)}
|
|
1879
|
-
style={{
|
|
1880
|
-
padding: "6px 14px",
|
|
1881
|
-
fontSize: "13px",
|
|
1882
|
-
fontWeight: 500,
|
|
1883
|
-
borderRadius: "6px",
|
|
1884
|
-
border: "none",
|
|
1885
|
-
cursor: "pointer",
|
|
1886
|
-
background: activeProvider === tab.id ? "#3b82f6" : "#f3f4f6",
|
|
1887
|
-
color: activeProvider === tab.id ? "white" : "#4b5563",
|
|
1888
|
-
}}
|
|
1889
|
-
>
|
|
1890
|
-
{tab.icon && (
|
|
1891
|
-
<span
|
|
1892
|
-
style={{ marginRight: "6px", display: "inline-flex", alignItems: "center" }}
|
|
1893
|
-
>
|
|
1894
|
-
{tab.icon.startsWith("data:") || tab.icon.startsWith("http") ? (
|
|
1895
|
-
<img src={tab.icon} alt="" style={{ width: "16px", height: "16px" }} />
|
|
1896
|
-
) : (
|
|
1897
|
-
tab.icon
|
|
1898
|
-
)}
|
|
1899
|
-
</span>
|
|
1900
|
-
)}
|
|
1901
|
-
{tab.name}
|
|
1902
|
-
</button>
|
|
1903
|
-
))}
|
|
1904
|
-
</div>
|
|
1905
|
-
)}
|
|
1906
|
-
|
|
1907
|
-
{/* Upload bar */}
|
|
1908
|
-
<div
|
|
1909
|
-
style={{
|
|
1910
|
-
display: "flex",
|
|
1911
|
-
alignItems: "center",
|
|
1912
|
-
justifyContent: "space-between",
|
|
1913
|
-
padding: "12px 20px",
|
|
1914
|
-
borderBottom: "1px solid #e5e7eb",
|
|
1915
|
-
}}
|
|
1916
|
-
>
|
|
1917
|
-
<span style={{ fontSize: "13px", color: "#6b7280" }}>
|
|
1918
|
-
{loading ? "Loading…" : `${items.length} image${items.length !== 1 ? "s" : ""}`}
|
|
1919
|
-
</span>
|
|
1920
|
-
<button
|
|
1921
|
-
type="button"
|
|
1922
|
-
onClick={() => fileInputRef.current?.click()}
|
|
1923
|
-
disabled={uploading}
|
|
1924
|
-
style={{
|
|
1925
|
-
padding: "6px 14px",
|
|
1926
|
-
fontSize: "13px",
|
|
1927
|
-
fontWeight: 500,
|
|
1928
|
-
borderRadius: "6px",
|
|
1929
|
-
border: "1px solid #d1d5db",
|
|
1930
|
-
cursor: uploading ? "not-allowed" : "pointer",
|
|
1931
|
-
background: "white",
|
|
1932
|
-
color: "#374151",
|
|
1933
|
-
opacity: uploading ? 0.6 : 1,
|
|
1934
|
-
}}
|
|
1935
|
-
>
|
|
1936
|
-
{uploading ? "Uploading…" : "Upload"}
|
|
1937
|
-
</button>
|
|
1938
|
-
<input
|
|
1939
|
-
ref={fileInputRef}
|
|
1940
|
-
type="file"
|
|
1941
|
-
accept="image/*"
|
|
1942
|
-
style={{ display: "none" }}
|
|
1943
|
-
onChange={(e) => {
|
|
1944
|
-
const file = e.target.files?.[0];
|
|
1945
|
-
if (file) void handleUpload(file);
|
|
1946
|
-
if (fileInputRef.current) fileInputRef.current.value = "";
|
|
1947
|
-
}}
|
|
1948
|
-
/>
|
|
1949
|
-
</div>
|
|
1950
|
-
|
|
1951
|
-
{/* Grid */}
|
|
1952
|
-
<div
|
|
1953
|
-
style={{
|
|
1954
|
-
flex: 1,
|
|
1955
|
-
overflowY: "auto",
|
|
1956
|
-
padding: "16px 20px",
|
|
1957
|
-
minHeight: "250px",
|
|
1958
|
-
}}
|
|
1959
|
-
>
|
|
1960
|
-
{loading ? (
|
|
1961
|
-
<div
|
|
1962
|
-
style={{
|
|
1963
|
-
display: "flex",
|
|
1964
|
-
alignItems: "center",
|
|
1965
|
-
justifyContent: "center",
|
|
1966
|
-
height: "200px",
|
|
1967
|
-
color: "#9ca3af",
|
|
1968
|
-
fontSize: "14px",
|
|
1969
|
-
}}
|
|
1970
|
-
>
|
|
1971
|
-
Loading…
|
|
1972
|
-
</div>
|
|
1973
|
-
) : items.length === 0 ? (
|
|
1974
|
-
<div
|
|
1975
|
-
style={{
|
|
1976
|
-
display: "flex",
|
|
1977
|
-
flexDirection: "column",
|
|
1978
|
-
alignItems: "center",
|
|
1979
|
-
justifyContent: "center",
|
|
1980
|
-
height: "200px",
|
|
1981
|
-
color: "#9ca3af",
|
|
1982
|
-
fontSize: "14px",
|
|
1983
|
-
textAlign: "center",
|
|
1984
|
-
}}
|
|
1985
|
-
>
|
|
1986
|
-
<div style={{ fontSize: "32px", marginBottom: "8px" }}>🖼</div>
|
|
1987
|
-
No images found
|
|
1988
|
-
<button
|
|
1989
|
-
type="button"
|
|
1990
|
-
onClick={() => fileInputRef.current?.click()}
|
|
1991
|
-
style={{
|
|
1992
|
-
marginTop: "12px",
|
|
1993
|
-
padding: "8px 16px",
|
|
1994
|
-
fontSize: "13px",
|
|
1995
|
-
borderRadius: "6px",
|
|
1996
|
-
border: "1px solid #d1d5db",
|
|
1997
|
-
background: "white",
|
|
1998
|
-
cursor: "pointer",
|
|
1999
|
-
color: "#374151",
|
|
2000
|
-
}}
|
|
2001
|
-
>
|
|
2002
|
-
Upload an image
|
|
2003
|
-
</button>
|
|
2004
|
-
</div>
|
|
2005
|
-
) : (
|
|
2006
|
-
<div
|
|
2007
|
-
style={{
|
|
2008
|
-
display: "grid",
|
|
2009
|
-
gridTemplateColumns: "repeat(auto-fill, minmax(110px, 1fr))",
|
|
2010
|
-
gap: "10px",
|
|
2011
|
-
}}
|
|
2012
|
-
>
|
|
2013
|
-
{items.map((item) => {
|
|
2014
|
-
const isSelected = selectedId === item.id;
|
|
2015
|
-
const thumb = item.url || item.previewUrl || "";
|
|
2016
|
-
return (
|
|
2017
|
-
<button
|
|
2018
|
-
key={item.id}
|
|
2019
|
-
type="button"
|
|
2020
|
-
onClick={() => setSelectedId(item.id)}
|
|
2021
|
-
onDoubleClick={() => onSelect(item)}
|
|
2022
|
-
style={{
|
|
2023
|
-
position: "relative",
|
|
2024
|
-
aspectRatio: "1",
|
|
2025
|
-
borderRadius: "8px",
|
|
2026
|
-
border: isSelected ? "2px solid #3b82f6" : "2px solid transparent",
|
|
2027
|
-
overflow: "hidden",
|
|
2028
|
-
cursor: "pointer",
|
|
2029
|
-
padding: 0,
|
|
2030
|
-
background: "#f3f4f6",
|
|
2031
|
-
outline: isSelected ? "2px solid rgba(59,130,246,0.3)" : "none",
|
|
2032
|
-
outlineOffset: "1px",
|
|
2033
|
-
}}
|
|
2034
|
-
aria-label={item.filename}
|
|
2035
|
-
>
|
|
2036
|
-
{thumb ? (
|
|
2037
|
-
<img
|
|
2038
|
-
src={thumb}
|
|
2039
|
-
alt=""
|
|
2040
|
-
style={{ width: "100%", height: "100%", objectFit: "cover" }}
|
|
2041
|
-
/>
|
|
2042
|
-
) : (
|
|
2043
|
-
<div
|
|
2044
|
-
style={{
|
|
2045
|
-
width: "100%",
|
|
2046
|
-
height: "100%",
|
|
2047
|
-
display: "flex",
|
|
2048
|
-
alignItems: "center",
|
|
2049
|
-
justifyContent: "center",
|
|
2050
|
-
fontSize: "24px",
|
|
2051
|
-
}}
|
|
2052
|
-
>
|
|
2053
|
-
🖼
|
|
2054
|
-
</div>
|
|
2055
|
-
)}
|
|
2056
|
-
{isSelected && (
|
|
2057
|
-
<div
|
|
2058
|
-
style={{
|
|
2059
|
-
position: "absolute",
|
|
2060
|
-
inset: 0,
|
|
2061
|
-
background: "rgba(59,130,246,0.15)",
|
|
2062
|
-
display: "flex",
|
|
2063
|
-
alignItems: "center",
|
|
2064
|
-
justifyContent: "center",
|
|
2065
|
-
}}
|
|
2066
|
-
>
|
|
2067
|
-
<div
|
|
2068
|
-
style={{
|
|
2069
|
-
width: "24px",
|
|
2070
|
-
height: "24px",
|
|
2071
|
-
borderRadius: "50%",
|
|
2072
|
-
background: "#3b82f6",
|
|
2073
|
-
color: "white",
|
|
2074
|
-
display: "flex",
|
|
2075
|
-
alignItems: "center",
|
|
2076
|
-
justifyContent: "center",
|
|
2077
|
-
fontSize: "14px",
|
|
2078
|
-
}}
|
|
2079
|
-
>
|
|
2080
|
-
✓
|
|
2081
|
-
</div>
|
|
2082
|
-
</div>
|
|
2083
|
-
)}
|
|
2084
|
-
<div
|
|
2085
|
-
style={{
|
|
2086
|
-
position: "absolute",
|
|
2087
|
-
bottom: 0,
|
|
2088
|
-
left: 0,
|
|
2089
|
-
right: 0,
|
|
2090
|
-
background: "linear-gradient(transparent, rgba(0,0,0,0.6))",
|
|
2091
|
-
padding: "16px 6px 4px",
|
|
2092
|
-
}}
|
|
2093
|
-
>
|
|
2094
|
-
<div
|
|
2095
|
-
style={{
|
|
2096
|
-
fontSize: "11px",
|
|
2097
|
-
color: "white",
|
|
2098
|
-
overflow: "hidden",
|
|
2099
|
-
textOverflow: "ellipsis",
|
|
2100
|
-
whiteSpace: "nowrap",
|
|
2101
|
-
}}
|
|
2102
|
-
>
|
|
2103
|
-
{item.filename}
|
|
2104
|
-
</div>
|
|
2105
|
-
</div>
|
|
2106
|
-
</button>
|
|
2107
|
-
);
|
|
2108
|
-
})}
|
|
2109
|
-
</div>
|
|
2110
|
-
)}
|
|
2111
|
-
</div>
|
|
2112
|
-
|
|
2113
|
-
{/* Footer */}
|
|
2114
|
-
<div
|
|
2115
|
-
style={{
|
|
2116
|
-
display: "flex",
|
|
2117
|
-
justifyContent: "flex-end",
|
|
2118
|
-
gap: "8px",
|
|
2119
|
-
padding: "12px 20px",
|
|
2120
|
-
borderTop: "1px solid #e5e7eb",
|
|
2121
|
-
}}
|
|
2122
|
-
>
|
|
2123
|
-
<button
|
|
2124
|
-
type="button"
|
|
2125
|
-
onClick={onClose}
|
|
2126
|
-
style={{
|
|
2127
|
-
padding: "8px 16px",
|
|
2128
|
-
fontSize: "13px",
|
|
2129
|
-
fontWeight: 500,
|
|
2130
|
-
borderRadius: "6px",
|
|
2131
|
-
border: "1px solid #d1d5db",
|
|
2132
|
-
background: "white",
|
|
2133
|
-
cursor: "pointer",
|
|
2134
|
-
color: "#374151",
|
|
2135
|
-
}}
|
|
2136
|
-
>
|
|
2137
|
-
Cancel
|
|
2138
|
-
</button>
|
|
2139
|
-
<button
|
|
2140
|
-
type="button"
|
|
2141
|
-
onClick={handleConfirm}
|
|
2142
|
-
disabled={!selectedId}
|
|
2143
|
-
style={{
|
|
2144
|
-
padding: "8px 16px",
|
|
2145
|
-
fontSize: "13px",
|
|
2146
|
-
fontWeight: 500,
|
|
2147
|
-
borderRadius: "6px",
|
|
2148
|
-
border: "none",
|
|
2149
|
-
background: selectedId ? "#3b82f6" : "#93c5fd",
|
|
2150
|
-
color: "white",
|
|
2151
|
-
cursor: selectedId ? "pointer" : "not-allowed",
|
|
2152
|
-
}}
|
|
2153
|
-
>
|
|
2154
|
-
Insert
|
|
2155
|
-
</button>
|
|
2156
|
-
</div>
|
|
2157
|
-
</div>
|
|
2158
|
-
</div>,
|
|
2159
|
-
document.body,
|
|
2160
|
-
);
|
|
2161
|
-
}
|
|
2162
|
-
|
|
2163
1043
|
// ── Component ──────────────────────────────────────────────────────
|
|
2164
1044
|
|
|
2165
1045
|
export interface InlinePortableTextEditorProps {
|
|
@@ -2185,8 +1065,8 @@ export function InlinePortableTextEditor({
|
|
|
2185
1065
|
const savingRef = React.useRef(false);
|
|
2186
1066
|
const editorRef = React.useRef<ReturnType<typeof useEditor>>(null);
|
|
2187
1067
|
|
|
2188
|
-
//
|
|
2189
|
-
const [
|
|
1068
|
+
// Where the image picker that `/image` opened will put the image.
|
|
1069
|
+
const [imagePickerAt, setImagePickerAt] = React.useState<number | null>(null);
|
|
2190
1070
|
const [unsupportedFileGuidance, setUnsupportedFileGuidance] = React.useState<{
|
|
2191
1071
|
message: string;
|
|
2192
1072
|
version: number;
|
|
@@ -2203,26 +1083,25 @@ export function InlinePortableTextEditor({
|
|
|
2203
1083
|
[showUnsupportedFileGuidance],
|
|
2204
1084
|
);
|
|
2205
1085
|
|
|
2206
|
-
|
|
2207
|
-
React.useEffect(() => {
|
|
2208
|
-
const handler = () => setMediaPickerOpen(true);
|
|
2209
|
-
document.addEventListener("emdash:open-media-picker", handler);
|
|
2210
|
-
return () => document.removeEventListener("emdash:open-media-picker", handler);
|
|
2211
|
-
}, []);
|
|
1086
|
+
const uiRoot = useInlineUiRoot();
|
|
2212
1087
|
|
|
2213
|
-
//
|
|
2214
|
-
|
|
1088
|
+
// The Suggestion plugin's key handlers read the slash menu's state as soon
|
|
1089
|
+
// as it changes, before React commits it, so the ref takes each change
|
|
1090
|
+
// synchronously and the extension, created once, reads the ref.
|
|
1091
|
+
const [slashMenuState, setSlashMenuStateRaw] =
|
|
1092
|
+
React.useState<SlashMenuState>(initialSlashMenuState);
|
|
2215
1093
|
const slashMenuStateRef = React.useRef(slashMenuState);
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
)
|
|
1094
|
+
const setSlashMenuState: React.Dispatch<React.SetStateAction<SlashMenuState>> = React.useCallback(
|
|
1095
|
+
(action) => {
|
|
1096
|
+
const next = typeof action === "function" ? action(slashMenuStateRef.current) : action;
|
|
1097
|
+
slashMenuStateRef.current = next;
|
|
1098
|
+
setSlashMenuStateRaw(next);
|
|
1099
|
+
},
|
|
1100
|
+
[],
|
|
1101
|
+
);
|
|
1102
|
+
const slashMenuActionsRef = React.useRef({
|
|
1103
|
+
run: (_item: SlashCommandItem) => {},
|
|
1104
|
+
dismiss: () => {},
|
|
2226
1105
|
});
|
|
2227
1106
|
|
|
2228
1107
|
const [loadState] = React.useState<{
|
|
@@ -2281,7 +1160,7 @@ export function InlinePortableTextEditor({
|
|
|
2281
1160
|
method: "PUT",
|
|
2282
1161
|
credentials: "same-origin",
|
|
2283
1162
|
headers: { "Content-Type": "application/json", "X-EmDash-Request": "1" },
|
|
2284
|
-
body: JSON.stringify({ data: { [field]: blocks } }),
|
|
1163
|
+
body: JSON.stringify({ data: { [field]: blocks }, skipRevision: true }),
|
|
2285
1164
|
keepalive: options?.keepalive ?? false,
|
|
2286
1165
|
},
|
|
2287
1166
|
);
|
|
@@ -2335,45 +1214,31 @@ export function InlinePortableTextEditor({
|
|
|
2335
1214
|
const slashCommandsExtension = React.useMemo(
|
|
2336
1215
|
() =>
|
|
2337
1216
|
createSlashCommandsExtension({
|
|
2338
|
-
filterCommands: (query: string) => filterCommandsRef.current(query),
|
|
2339
1217
|
onStateChange: setSlashMenuState,
|
|
2340
1218
|
getState: () => slashMenuStateRef.current,
|
|
1219
|
+
onCommand: (item) => slashMenuActionsRef.current.run(item),
|
|
1220
|
+
onDismiss: () => slashMenuActionsRef.current.dismiss(),
|
|
2341
1221
|
}),
|
|
2342
|
-
[],
|
|
1222
|
+
[setSlashMenuState],
|
|
2343
1223
|
);
|
|
2344
1224
|
|
|
2345
1225
|
const editor = useEditor({
|
|
2346
1226
|
extensions: [
|
|
2347
1227
|
StarterKit.configure({
|
|
2348
|
-
heading: { levels: [1, 2, 3] },
|
|
2349
1228
|
dropcursor: { color: "#3b82f6", width: 2 },
|
|
2350
1229
|
// Replaced with InlineCodeBlockExtension below (adds language picker).
|
|
2351
1230
|
codeBlock: false,
|
|
2352
1231
|
// Replaced with CodeMarkExtension so inline code can combine with link/etc.
|
|
2353
1232
|
code: false,
|
|
2354
1233
|
orderedList: false,
|
|
1234
|
+
// Registered on their own below, so links don't open when clicked.
|
|
1235
|
+
link: false,
|
|
1236
|
+
underline: false,
|
|
2355
1237
|
}),
|
|
2356
1238
|
EmDashOrderedList,
|
|
2357
1239
|
CodeMarkExtension,
|
|
2358
1240
|
InlineCodeBlockExtension,
|
|
2359
|
-
|
|
2360
|
-
addAttributes() {
|
|
2361
|
-
return {
|
|
2362
|
-
...this.parent?.(),
|
|
2363
|
-
mediaId: { default: null },
|
|
2364
|
-
provider: { default: null },
|
|
2365
|
-
width: { default: null },
|
|
2366
|
-
height: { default: null },
|
|
2367
|
-
displayWidth: { default: null },
|
|
2368
|
-
displayHeight: { default: null },
|
|
2369
|
-
caption: { default: null },
|
|
2370
|
-
blurhash: { default: null },
|
|
2371
|
-
dominantColor: { default: null },
|
|
2372
|
-
alignment: { default: null, rendered: false },
|
|
2373
|
-
link: { default: null, rendered: false },
|
|
2374
|
-
};
|
|
2375
|
-
},
|
|
2376
|
-
}),
|
|
1241
|
+
InlineImageExtension,
|
|
2377
1242
|
Underline,
|
|
2378
1243
|
Subscript,
|
|
2379
1244
|
Superscript,
|
|
@@ -2421,56 +1286,86 @@ export function InlinePortableTextEditor({
|
|
|
2421
1286
|
if (editor && !savedDocRef.current) savedDocRef.current = editor.state.doc;
|
|
2422
1287
|
}, [editor]);
|
|
2423
1288
|
|
|
2424
|
-
|
|
2425
|
-
const handleSlashCommand = React.useCallback(
|
|
1289
|
+
const runSlashCommand = React.useCallback(
|
|
2426
1290
|
(item: SlashCommandItem) => {
|
|
2427
|
-
|
|
2428
|
-
|
|
1291
|
+
const { range } = slashMenuStateRef.current;
|
|
1292
|
+
if (!editor || !range) return;
|
|
1293
|
+
item.command({
|
|
1294
|
+
editor,
|
|
1295
|
+
range,
|
|
1296
|
+
openImagePicker: () => setImagePickerAt(editor.state.selection.from),
|
|
1297
|
+
});
|
|
2429
1298
|
setSlashMenuState((prev) => ({ ...prev, isOpen: false }));
|
|
2430
1299
|
},
|
|
2431
|
-
[editor],
|
|
1300
|
+
[editor, setSlashMenuState],
|
|
2432
1301
|
);
|
|
1302
|
+
/** Closes the slash menu without a command, keeping what was typed. */
|
|
1303
|
+
const closeSlashMenu = React.useCallback(() => {
|
|
1304
|
+
const { range } = slashMenuStateRef.current;
|
|
1305
|
+
setSlashMenuState((prev) => ({
|
|
1306
|
+
...prev,
|
|
1307
|
+
isOpen: false,
|
|
1308
|
+
dismissedSlashFrom: range ? range.from : prev.dismissedSlashFrom,
|
|
1309
|
+
}));
|
|
1310
|
+
if (editor && range) exitSuggestion(editor.view);
|
|
1311
|
+
}, [editor, setSlashMenuState]);
|
|
1312
|
+
slashMenuActionsRef.current = { run: runSlashCommand, dismiss: closeSlashMenu };
|
|
2433
1313
|
|
|
2434
|
-
//
|
|
2435
|
-
const
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
1314
|
+
// Edits made while the picker is open, as when focus stays in the editor, move the spot it inserts at.
|
|
1315
|
+
const pickerOpen = imagePickerAt !== null;
|
|
1316
|
+
React.useEffect(() => {
|
|
1317
|
+
if (!editor || !pickerOpen) return;
|
|
1318
|
+
const onTransaction = ({ transaction }: { transaction: Transaction }) => {
|
|
1319
|
+
if (!transaction.docChanged) return;
|
|
1320
|
+
setImagePickerAt((at) => (at === null ? at : transaction.mapping.map(at)));
|
|
1321
|
+
};
|
|
1322
|
+
editor.on("transaction", onTransaction);
|
|
1323
|
+
return () => {
|
|
1324
|
+
editor.off("transaction", onTransaction);
|
|
1325
|
+
};
|
|
1326
|
+
}, [editor, pickerOpen]);
|
|
1327
|
+
|
|
1328
|
+
// The image picker opens at the caret the `/image` command left.
|
|
1329
|
+
const caretReference = React.useMemo(
|
|
1330
|
+
() =>
|
|
1331
|
+
editor && imagePickerAt !== null
|
|
1332
|
+
? {
|
|
1333
|
+
getBoundingClientRect: () => {
|
|
1334
|
+
if (editor.isDestroyed) return new DOMRect();
|
|
1335
|
+
const { view } = editor;
|
|
1336
|
+
const caret = view.coordsAtPos(Math.min(imagePickerAt, view.state.doc.content.size));
|
|
1337
|
+
return new DOMRect(caret.left, caret.top, 0, caret.bottom - caret.top);
|
|
1338
|
+
},
|
|
1339
|
+
contextElement: editor.view.dom,
|
|
1340
|
+
}
|
|
1341
|
+
: null,
|
|
1342
|
+
[editor, imagePickerAt],
|
|
2455
1343
|
);
|
|
2456
1344
|
|
|
2457
|
-
// Save on blur — but not when interacting with slash menu or
|
|
1345
|
+
// Save on blur — but not when interacting with slash menu or image picker
|
|
2458
1346
|
const handleBlur = React.useCallback(
|
|
2459
1347
|
(e: React.FocusEvent<HTMLDivElement>) => {
|
|
2460
|
-
if (mediaPickerOpen) return;
|
|
2461
1348
|
const related = e.relatedTarget instanceof HTMLElement ? e.relatedTarget : null;
|
|
2462
1349
|
if (related && e.currentTarget.contains(related)) return;
|
|
2463
1350
|
// The copy fallback briefly moves focus to its textarea before restoring the editor.
|
|
2464
1351
|
if (related?.hasAttribute("data-emdash-clipboard-fallback")) return;
|
|
2465
|
-
//
|
|
2466
|
-
if (related?.
|
|
2467
|
-
|
|
1352
|
+
// The toolbars, menus, and image picker live in a root of their own at the end of the page.
|
|
1353
|
+
if (related && uiRoot?.contains(related)) return;
|
|
1354
|
+
// A toolbar button keeps focus in the editor, so the toolbars skip
|
|
1355
|
+
// the editor's next blur; telling them again lets them hide. It waits
|
|
1356
|
+
// for this blur to finish, which may be a toolbar removing itself.
|
|
1357
|
+
const event = e.nativeEvent;
|
|
1358
|
+
queueMicrotask(() => {
|
|
1359
|
+
if (!editor || editor.isDestroyed || editor.view.hasFocus()) return;
|
|
1360
|
+
if (uiRoot?.contains(document.activeElement)) return;
|
|
1361
|
+
editor.view.dispatch(editor.state.tr.setMeta("blur", { event }));
|
|
1362
|
+
});
|
|
2468
1363
|
void save();
|
|
2469
1364
|
},
|
|
2470
|
-
[save,
|
|
1365
|
+
[editor, save, uiRoot],
|
|
2471
1366
|
);
|
|
2472
1367
|
|
|
2473
|
-
if (!editor) return null;
|
|
1368
|
+
if (!editor || !uiRoot) return null;
|
|
2474
1369
|
|
|
2475
1370
|
return (
|
|
2476
1371
|
<div onBlur={handleBlur}>
|
|
@@ -2481,7 +1376,7 @@ export function InlinePortableTextEditor({
|
|
|
2481
1376
|
</div>
|
|
2482
1377
|
) : (
|
|
2483
1378
|
<>
|
|
2484
|
-
<InlineBubbleMenu editor={editor} />
|
|
1379
|
+
<InlineBubbleMenu editor={editor} uiRoot={uiRoot} onImageReplaced={() => void save()} />
|
|
2485
1380
|
<EditorContent editor={editor} />
|
|
2486
1381
|
</>
|
|
2487
1382
|
)}
|
|
@@ -2502,20 +1397,33 @@ export function InlinePortableTextEditor({
|
|
|
2502
1397
|
</div>
|
|
2503
1398
|
) : null}
|
|
2504
1399
|
<InlineSlashMenu
|
|
1400
|
+
editor={editor}
|
|
1401
|
+
uiRoot={uiRoot}
|
|
2505
1402
|
state={slashMenuState}
|
|
2506
|
-
onCommand={
|
|
1403
|
+
onCommand={runSlashCommand}
|
|
1404
|
+
onClose={closeSlashMenu}
|
|
2507
1405
|
setSelectedIndex={(index) =>
|
|
2508
1406
|
setSlashMenuState((prev) => ({ ...prev, selectedIndex: index }))
|
|
2509
1407
|
}
|
|
2510
1408
|
/>
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
1409
|
+
{imagePickerAt !== null && caretReference && (
|
|
1410
|
+
<InlineMediaPicker
|
|
1411
|
+
uiRoot={uiRoot}
|
|
1412
|
+
reference={caretReference}
|
|
1413
|
+
gap={6}
|
|
1414
|
+
label="Insert image"
|
|
1415
|
+
onChoose={(image) => {
|
|
1416
|
+
insertImage(editor, imagePickerAt, image);
|
|
1417
|
+
editor.view.focus();
|
|
1418
|
+
setImagePickerAt(null);
|
|
1419
|
+
void save();
|
|
1420
|
+
}}
|
|
1421
|
+
onClose={(reason) => {
|
|
1422
|
+
if (reason !== "blur") editor.view.focus();
|
|
1423
|
+
setImagePickerAt(null);
|
|
1424
|
+
}}
|
|
1425
|
+
/>
|
|
1426
|
+
)}
|
|
2519
1427
|
<style>{`
|
|
2520
1428
|
.emdash-inline-code-block {
|
|
2521
1429
|
position: relative;
|
|
@@ -2643,114 +1551,33 @@ export function InlinePortableTextEditor({
|
|
|
2643
1551
|
--emdash-code-focus: var(--emdash-inline-code-focus, #a8d5ff);
|
|
2644
1552
|
}
|
|
2645
1553
|
}
|
|
2646
|
-
.emdash-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
padding: 4px;
|
|
2652
|
-
border-radius: 8px;
|
|
2653
|
-
border: 1px solid #d1d5db;
|
|
2654
|
-
background: white;
|
|
2655
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
2656
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
2657
|
-
}
|
|
2658
|
-
.emdash-bubble-btn {
|
|
2659
|
-
display: inline-flex;
|
|
2660
|
-
align-items: center;
|
|
2661
|
-
justify-content: center;
|
|
2662
|
-
width: 32px;
|
|
2663
|
-
height: 32px;
|
|
2664
|
-
border-radius: 6px;
|
|
2665
|
-
border: none;
|
|
2666
|
-
background: transparent;
|
|
2667
|
-
cursor: pointer;
|
|
2668
|
-
color: inherit;
|
|
2669
|
-
font-size: 14px;
|
|
2670
|
-
line-height: 1;
|
|
2671
|
-
padding: 0;
|
|
2672
|
-
}
|
|
2673
|
-
.emdash-bubble-btn:hover {
|
|
2674
|
-
background: #f3f4f6;
|
|
1554
|
+
.emdash-inline-editor .emdash-slash-query {
|
|
1555
|
+
margin-inline: -0.25em;
|
|
1556
|
+
padding: 0.125em 0.25em;
|
|
1557
|
+
border-radius: 0.375rem;
|
|
1558
|
+
background: color-mix(in srgb, currentColor 8%, transparent);
|
|
2675
1559
|
}
|
|
2676
|
-
.emdash-
|
|
2677
|
-
|
|
2678
|
-
color:
|
|
2679
|
-
|
|
2680
|
-
.emdash-bubble-btn--active:hover {
|
|
2681
|
-
background: #bfdbfe;
|
|
2682
|
-
}
|
|
2683
|
-
.emdash-bubble-btn--danger {
|
|
2684
|
-
color: #dc2626;
|
|
2685
|
-
}
|
|
2686
|
-
.emdash-bubble-divider {
|
|
2687
|
-
display: block;
|
|
2688
|
-
width: 1px;
|
|
2689
|
-
height: 20px;
|
|
2690
|
-
background: #d1d5db;
|
|
2691
|
-
margin: 0 4px;
|
|
1560
|
+
.emdash-inline-editor .emdash-slash-query.is-empty::after {
|
|
1561
|
+
content: "Type to search";
|
|
1562
|
+
color: color-mix(in srgb, currentColor 45%, transparent);
|
|
1563
|
+
pointer-events: none;
|
|
2692
1564
|
}
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
padding: 0 8px;
|
|
2698
|
-
border: 1px solid #d1d5db;
|
|
2699
|
-
border-radius: 4px;
|
|
1565
|
+
${INLINE_EDITOR_UI_STYLES}
|
|
1566
|
+
${INLINE_MEDIA_PICKER_STYLES}
|
|
1567
|
+
${INLINE_IMAGE_STYLES}
|
|
1568
|
+
.emdash-inline-editor:focus {
|
|
2700
1569
|
outline: none;
|
|
2701
|
-
background: white;
|
|
2702
|
-
color: inherit;
|
|
2703
|
-
font-family: inherit;
|
|
2704
1570
|
}
|
|
2705
|
-
.emdash-
|
|
2706
|
-
|
|
2707
|
-
}
|
|
2708
|
-
@media (prefers-color-scheme: dark) {
|
|
2709
|
-
.emdash-bubble-menu {
|
|
2710
|
-
background: #1f2937;
|
|
2711
|
-
border-color: #374151;
|
|
2712
|
-
color: #e5e7eb;
|
|
2713
|
-
}
|
|
2714
|
-
.emdash-bubble-btn:hover {
|
|
2715
|
-
background: #374151;
|
|
2716
|
-
}
|
|
2717
|
-
.emdash-bubble-btn--active {
|
|
2718
|
-
background: #1e3a5f;
|
|
2719
|
-
color: #93c5fd;
|
|
2720
|
-
}
|
|
2721
|
-
.emdash-bubble-btn--active:hover {
|
|
2722
|
-
background: #1e40af;
|
|
2723
|
-
}
|
|
2724
|
-
.emdash-bubble-divider {
|
|
2725
|
-
background: #4b5563;
|
|
2726
|
-
}
|
|
2727
|
-
.emdash-bubble-link-input {
|
|
2728
|
-
background: #111827;
|
|
2729
|
-
border-color: #4b5563;
|
|
2730
|
-
color: #e5e7eb;
|
|
2731
|
-
}
|
|
2732
|
-
.emdash-bubble-link-input:focus {
|
|
2733
|
-
border-color: #60a5fa;
|
|
2734
|
-
}
|
|
2735
|
-
.emdash-slash-menu {
|
|
2736
|
-
background: #1f2937 !important;
|
|
2737
|
-
border-color: #374151 !important;
|
|
2738
|
-
color: #e5e7eb !important;
|
|
2739
|
-
}
|
|
2740
|
-
.emdash-slash-menu button:hover,
|
|
2741
|
-
.emdash-slash-menu button[style*="background: rgb(243, 244, 246)"] {
|
|
2742
|
-
background: #374151 !important;
|
|
2743
|
-
}
|
|
2744
|
-
.emdash-media-picker {
|
|
2745
|
-
background: #1f2937 !important;
|
|
2746
|
-
color: #e5e7eb !important;
|
|
2747
|
-
}
|
|
2748
|
-
.emdash-media-picker button {
|
|
2749
|
-
color: #e5e7eb !important;
|
|
2750
|
-
}
|
|
1571
|
+
.emdash-inline-editor:focus p.is-editor-empty {
|
|
1572
|
+
display: flow-root;
|
|
2751
1573
|
}
|
|
2752
|
-
.emdash-inline-editor:focus {
|
|
2753
|
-
|
|
1574
|
+
.emdash-inline-editor:focus p.is-editor-empty::before {
|
|
1575
|
+
content: attr(data-placeholder);
|
|
1576
|
+
float: inline-start;
|
|
1577
|
+
width: 100%;
|
|
1578
|
+
margin-inline-end: -100%;
|
|
1579
|
+
opacity: 0.5;
|
|
1580
|
+
pointer-events: none;
|
|
2754
1581
|
}
|
|
2755
1582
|
.emdash-inline-editor-guidance {
|
|
2756
1583
|
margin-block-start: 0.75rem;
|