@crowi/api 2.0.0-alpha.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/LICENSE +21 -0
- package/dist/app.d.ts +8 -0
- package/dist/app.js +65 -0
- package/dist/app.js.map +1 -0
- package/dist/collab/attach.d.ts +33 -0
- package/dist/collab/attach.js +341 -0
- package/dist/collab/attach.js.map +1 -0
- package/dist/collab/extension-redis.d.ts +25 -0
- package/dist/collab/extension-redis.js +133 -0
- package/dist/collab/extension-redis.js.map +1 -0
- package/dist/common/functions/path2name.d.ts +1 -0
- package/dist/common/functions/path2name.js +22 -0
- package/dist/common/functions/path2name.js.map +1 -0
- package/dist/common/functions/renderIcon.d.ts +1 -0
- package/dist/common/functions/renderIcon.js +9 -0
- package/dist/common/functions/renderIcon.js.map +1 -0
- package/dist/controllers/admin.d.ts +3 -0
- package/dist/controllers/admin.js +474 -0
- package/dist/controllers/admin.js.map +1 -0
- package/dist/controllers/attachment.d.ts +4 -0
- package/dist/controllers/attachment.js +200 -0
- package/dist/controllers/attachment.js.map +1 -0
- package/dist/controllers/backlink.d.ts +3 -0
- package/dist/controllers/backlink.js +42 -0
- package/dist/controllers/backlink.js.map +1 -0
- package/dist/controllers/bookmark.d.ts +3 -0
- package/dist/controllers/bookmark.js +100 -0
- package/dist/controllers/bookmark.js.map +1 -0
- package/dist/controllers/comment.d.ts +3 -0
- package/dist/controllers/comment.js +111 -0
- package/dist/controllers/comment.js.map +1 -0
- package/dist/controllers/index.d.ts +25 -0
- package/dist/controllers/index.js +44 -0
- package/dist/controllers/index.js.map +1 -0
- package/dist/controllers/installer.d.ts +3 -0
- package/dist/controllers/installer.js +48 -0
- package/dist/controllers/installer.js.map +1 -0
- package/dist/controllers/login.d.ts +4 -0
- package/dist/controllers/login.js +438 -0
- package/dist/controllers/login.js.map +1 -0
- package/dist/controllers/logout.d.ts +5 -0
- package/dist/controllers/logout.js +11 -0
- package/dist/controllers/logout.js.map +1 -0
- package/dist/controllers/me.d.ts +4 -0
- package/dist/controllers/me.js +369 -0
- package/dist/controllers/me.js.map +1 -0
- package/dist/controllers/notification.d.ts +3 -0
- package/dist/controllers/notification.js +88 -0
- package/dist/controllers/notification.js.map +1 -0
- package/dist/controllers/page.d.ts +3 -0
- package/dist/controllers/page.js +881 -0
- package/dist/controllers/page.js.map +1 -0
- package/dist/controllers/revision.d.ts +3 -0
- package/dist/controllers/revision.js +91 -0
- package/dist/controllers/revision.js.map +1 -0
- package/dist/controllers/search.d.ts +3 -0
- package/dist/controllers/search.js +93 -0
- package/dist/controllers/search.js.map +1 -0
- package/dist/controllers/share.d.ts +3 -0
- package/dist/controllers/share.js +207 -0
- package/dist/controllers/share.js.map +1 -0
- package/dist/controllers/shareAccess.d.ts +3 -0
- package/dist/controllers/shareAccess.js +28 -0
- package/dist/controllers/shareAccess.js.map +1 -0
- package/dist/controllers/slack.d.ts +3 -0
- package/dist/controllers/slack.js +87 -0
- package/dist/controllers/slack.js.map +1 -0
- package/dist/controllers/tokenAuth.d.ts +10 -0
- package/dist/controllers/tokenAuth.js +292 -0
- package/dist/controllers/tokenAuth.js.map +1 -0
- package/dist/controllers/user.d.ts +3 -0
- package/dist/controllers/user.js +67 -0
- package/dist/controllers/user.js.map +1 -0
- package/dist/controllers/version.d.ts +4 -0
- package/dist/controllers/version.js +19 -0
- package/dist/controllers/version.js.map +1 -0
- package/dist/crowi/express-init.d.ts +4 -0
- package/dist/crowi/express-init.js +101 -0
- package/dist/crowi/express-init.js.map +1 -0
- package/dist/crowi/index.d.ts +245 -0
- package/dist/crowi/index.js +726 -0
- package/dist/crowi/index.js.map +1 -0
- package/dist/events/activity.d.ts +7 -0
- package/dist/events/activity.js +15 -0
- package/dist/events/activity.js.map +1 -0
- package/dist/events/bookmark.d.ts +8 -0
- package/dist/events/bookmark.js +16 -0
- package/dist/events/bookmark.js.map +1 -0
- package/dist/events/comment.d.ts +6 -0
- package/dist/events/comment.js +14 -0
- package/dist/events/comment.js.map +1 -0
- package/dist/events/config.d.ts +6 -0
- package/dist/events/config.js +12 -0
- package/dist/events/config.js.map +1 -0
- package/dist/events/index.d.ts +17 -0
- package/dist/events/index.js +22 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/mention-dispatch.d.ts +44 -0
- package/dist/events/mention-dispatch.js +151 -0
- package/dist/events/mention-dispatch.js.map +1 -0
- package/dist/events/notification.d.ts +7 -0
- package/dist/events/notification.js +15 -0
- package/dist/events/notification.js.map +1 -0
- package/dist/events/page.d.ts +44 -0
- package/dist/events/page.js +134 -0
- package/dist/events/page.js.map +1 -0
- package/dist/events/render-cache.d.ts +24 -0
- package/dist/events/render-cache.js +63 -0
- package/dist/events/render-cache.js.map +1 -0
- package/dist/events/user.d.ts +9 -0
- package/dist/events/user.js +39 -0
- package/dist/events/user.js.map +1 -0
- package/dist/form/admin/app.d.ts +2 -0
- package/dist/form/admin/app.js +9 -0
- package/dist/form/admin/app.js.map +1 -0
- package/dist/form/admin/auth.d.ts +2 -0
- package/dist/form/admin/auth.js +9 -0
- package/dist/form/admin/auth.js.map +1 -0
- package/dist/form/admin/aws.d.ts +2 -0
- package/dist/form/admin/aws.js +13 -0
- package/dist/form/admin/aws.js.map +1 -0
- package/dist/form/admin/github.d.ts +2 -0
- package/dist/form/admin/github.js +15 -0
- package/dist/form/admin/github.js.map +1 -0
- package/dist/form/admin/google.d.ts +2 -0
- package/dist/form/admin/google.js +13 -0
- package/dist/form/admin/google.js.map +1 -0
- package/dist/form/admin/mail.d.ts +2 -0
- package/dist/form/admin/mail.js +13 -0
- package/dist/form/admin/mail.js.map +1 -0
- package/dist/form/admin/sec.d.ts +2 -0
- package/dist/form/admin/sec.js +10 -0
- package/dist/form/admin/sec.js.map +1 -0
- package/dist/form/admin/slackSetting.d.ts +2 -0
- package/dist/form/admin/slackSetting.js +13 -0
- package/dist/form/admin/slackSetting.js.map +1 -0
- package/dist/form/admin/userEdit.d.ts +2 -0
- package/dist/form/admin/userEdit.js +9 -0
- package/dist/form/admin/userEdit.js.map +1 -0
- package/dist/form/admin/userInvite.d.ts +2 -0
- package/dist/form/admin/userInvite.js +9 -0
- package/dist/form/admin/userInvite.js.map +1 -0
- package/dist/form/comment.d.ts +2 -0
- package/dist/form/comment.js +9 -0
- package/dist/form/comment.js.map +1 -0
- package/dist/form/index.d.ts +25 -0
- package/dist/form/index.js +48 -0
- package/dist/form/index.js.map +1 -0
- package/dist/form/invited.d.ts +2 -0
- package/dist/form/invited.js +13 -0
- package/dist/form/invited.js.map +1 -0
- package/dist/form/login.d.ts +2 -0
- package/dist/form/login.js +11 -0
- package/dist/form/login.js.map +1 -0
- package/dist/form/me/apiToken.d.ts +2 -0
- package/dist/form/me/apiToken.js +9 -0
- package/dist/form/me/apiToken.js.map +1 -0
- package/dist/form/me/password.d.ts +2 -0
- package/dist/form/me/password.js +11 -0
- package/dist/form/me/password.js.map +1 -0
- package/dist/form/me/user.d.ts +2 -0
- package/dist/form/me/user.js +9 -0
- package/dist/form/me/user.js.map +1 -0
- package/dist/form/register.d.ts +2 -0
- package/dist/form/register.js +13 -0
- package/dist/form/register.js.map +1 -0
- package/dist/form/revision.d.ts +2 -0
- package/dist/form/revision.js +13 -0
- package/dist/form/revision.js.map +1 -0
- package/dist/hono/app.d.ts +19 -0
- package/dist/hono/app.js +21 -0
- package/dist/hono/app.js.map +1 -0
- package/dist/hono/handlers/_helpers/errors.d.ts +61 -0
- package/dist/hono/handlers/_helpers/errors.js +51 -0
- package/dist/hono/handlers/_helpers/errors.js.map +1 -0
- package/dist/hono/handlers/_helpers/user-shape.d.ts +46 -0
- package/dist/hono/handlers/_helpers/user-shape.js +23 -0
- package/dist/hono/handlers/_helpers/user-shape.js.map +1 -0
- package/dist/hono/handlers/access-token.d.ts +221 -0
- package/dist/hono/handlers/access-token.js +113 -0
- package/dist/hono/handlers/access-token.js.map +1 -0
- package/dist/hono/handlers/activation.d.ts +117 -0
- package/dist/hono/handlers/activation.js +77 -0
- package/dist/hono/handlers/activation.js.map +1 -0
- package/dist/hono/handlers/admin/app.d.ts +123 -0
- package/dist/hono/handlers/admin/app.js +76 -0
- package/dist/hono/handlers/admin/app.js.map +1 -0
- package/dist/hono/handlers/admin/auth.d.ts +127 -0
- package/dist/hono/handlers/admin/auth.js +91 -0
- package/dist/hono/handlers/admin/auth.js.map +1 -0
- package/dist/hono/handlers/admin/mail.d.ts +168 -0
- package/dist/hono/handlers/admin/mail.js +76 -0
- package/dist/hono/handlers/admin/mail.js.map +1 -0
- package/dist/hono/handlers/admin/plugins.d.ts +409 -0
- package/dist/hono/handlers/admin/plugins.js +257 -0
- package/dist/hono/handlers/admin/plugins.js.map +1 -0
- package/dist/hono/handlers/admin/search.d.ts +57 -0
- package/dist/hono/handlers/admin/search.js +55 -0
- package/dist/hono/handlers/admin/search.js.map +1 -0
- package/dist/hono/handlers/admin/security.d.ts +112 -0
- package/dist/hono/handlers/admin/security.js +71 -0
- package/dist/hono/handlers/admin/security.js.map +1 -0
- package/dist/hono/handlers/admin/share.d.ts +106 -0
- package/dist/hono/handlers/admin/share.js +55 -0
- package/dist/hono/handlers/admin/share.js.map +1 -0
- package/dist/hono/handlers/admin/storage.d.ts +55 -0
- package/dist/hono/handlers/admin/storage.js +40 -0
- package/dist/hono/handlers/admin/storage.js.map +1 -0
- package/dist/hono/handlers/admin/users.d.ts +1230 -0
- package/dist/hono/handlers/admin/users.js +316 -0
- package/dist/hono/handlers/admin/users.js.map +1 -0
- package/dist/hono/handlers/adminCrypto.d.ts +110 -0
- package/dist/hono/handlers/adminCrypto.js +151 -0
- package/dist/hono/handlers/adminCrypto.js.map +1 -0
- package/dist/hono/handlers/app.d.ts +26 -0
- package/dist/hono/handlers/app.js +34 -0
- package/dist/hono/handlers/app.js.map +1 -0
- package/dist/hono/handlers/attachment-stream.d.ts +4 -0
- package/dist/hono/handlers/attachment-stream.js +211 -0
- package/dist/hono/handlers/attachment-stream.js.map +1 -0
- package/dist/hono/handlers/attachment.d.ts +687 -0
- package/dist/hono/handlers/attachment.js +566 -0
- package/dist/hono/handlers/attachment.js.map +1 -0
- package/dist/hono/handlers/autocomplete.d.ts +160 -0
- package/dist/hono/handlers/autocomplete.js +181 -0
- package/dist/hono/handlers/autocomplete.js.map +1 -0
- package/dist/hono/handlers/backlink.d.ts +78 -0
- package/dist/hono/handlers/backlink.js +93 -0
- package/dist/hono/handlers/backlink.js.map +1 -0
- package/dist/hono/handlers/bookmark.d.ts +558 -0
- package/dist/hono/handlers/bookmark.js +166 -0
- package/dist/hono/handlers/bookmark.js.map +1 -0
- package/dist/hono/handlers/comment.d.ts +231 -0
- package/dist/hono/handlers/comment.js +191 -0
- package/dist/hono/handlers/comment.js.map +1 -0
- package/dist/hono/handlers/draft.d.ts +136 -0
- package/dist/hono/handlers/draft.js +191 -0
- package/dist/hono/handlers/draft.js.map +1 -0
- package/dist/hono/handlers/emailChange.d.ts +124 -0
- package/dist/hono/handlers/emailChange.js +79 -0
- package/dist/hono/handlers/emailChange.js.map +1 -0
- package/dist/hono/handlers/installer.d.ts +94 -0
- package/dist/hono/handlers/installer.js +93 -0
- package/dist/hono/handlers/installer.js.map +1 -0
- package/dist/hono/handlers/inviteAccept.d.ts +180 -0
- package/dist/hono/handlers/inviteAccept.js +94 -0
- package/dist/hono/handlers/inviteAccept.js.map +1 -0
- package/dist/hono/handlers/me.d.ts +401 -0
- package/dist/hono/handlers/me.js +390 -0
- package/dist/hono/handlers/me.js.map +1 -0
- package/dist/hono/handlers/notification.d.ts +274 -0
- package/dist/hono/handlers/notification.js +224 -0
- package/dist/hono/handlers/notification.js.map +1 -0
- package/dist/hono/handlers/oauth.d.ts +299 -0
- package/dist/hono/handlers/oauth.js +443 -0
- package/dist/hono/handlers/oauth.js.map +1 -0
- package/dist/hono/handlers/page-collab.d.ts +79 -0
- package/dist/hono/handlers/page-collab.js +98 -0
- package/dist/hono/handlers/page-collab.js.map +1 -0
- package/dist/hono/handlers/page-preview.d.ts +48 -0
- package/dist/hono/handlers/page-preview.js +83 -0
- package/dist/hono/handlers/page-preview.js.map +1 -0
- package/dist/hono/handlers/page.d.ts +2059 -0
- package/dist/hono/handlers/page.js +793 -0
- package/dist/hono/handlers/page.js.map +1 -0
- package/dist/hono/handlers/passwordReset.d.ts +181 -0
- package/dist/hono/handlers/passwordReset.js +101 -0
- package/dist/hono/handlers/passwordReset.js.map +1 -0
- package/dist/hono/handlers/presence.d.ts +178 -0
- package/dist/hono/handlers/presence.js +163 -0
- package/dist/hono/handlers/presence.js.map +1 -0
- package/dist/hono/handlers/revision.d.ts +345 -0
- package/dist/hono/handlers/revision.js +202 -0
- package/dist/hono/handlers/revision.js.map +1 -0
- package/dist/hono/handlers/search.d.ts +208 -0
- package/dist/hono/handlers/search.js +152 -0
- package/dist/hono/handlers/search.js.map +1 -0
- package/dist/hono/handlers/tokenAuth.d.ts +369 -0
- package/dist/hono/handlers/tokenAuth.js +240 -0
- package/dist/hono/handlers/tokenAuth.js.map +1 -0
- package/dist/hono/handlers/user.d.ts +710 -0
- package/dist/hono/handlers/user.js +212 -0
- package/dist/hono/handlers/user.js.map +1 -0
- package/dist/hono/index.d.ts +289 -0
- package/dist/hono/index.js +240 -0
- package/dist/hono/index.js.map +1 -0
- package/dist/hono/middleware/admin.d.ts +5 -0
- package/dist/hono/middleware/admin.js +34 -0
- package/dist/hono/middleware/admin.js.map +1 -0
- package/dist/hono/middleware/auth.d.ts +54 -0
- package/dist/hono/middleware/auth.js +142 -0
- package/dist/hono/middleware/auth.js.map +1 -0
- package/dist/hono/middleware/cors.d.ts +3 -0
- package/dist/hono/middleware/cors.js +86 -0
- package/dist/hono/middleware/cors.js.map +1 -0
- package/dist/hono/middleware/default-hook.d.ts +8 -0
- package/dist/hono/middleware/default-hook.js +17 -0
- package/dist/hono/middleware/default-hook.js.map +1 -0
- package/dist/hono/middleware/error-handler.d.ts +2 -0
- package/dist/hono/middleware/error-handler.js +20 -0
- package/dist/hono/middleware/error-handler.js.map +1 -0
- package/dist/hono/middleware/rate-limit.d.ts +57 -0
- package/dist/hono/middleware/rate-limit.js +42 -0
- package/dist/hono/middleware/rate-limit.js.map +1 -0
- package/dist/hono/middleware/require-scope.d.ts +50 -0
- package/dist/hono/middleware/require-scope.js +64 -0
- package/dist/hono/middleware/require-scope.js.map +1 -0
- package/dist/hono/path-rewrite.d.ts +15 -0
- package/dist/hono/path-rewrite.js +59 -0
- package/dist/hono/path-rewrite.js.map +1 -0
- package/dist/mail/i18n/en.d.ts +2 -0
- package/dist/mail/i18n/en.js +66 -0
- package/dist/mail/i18n/en.js.map +1 -0
- package/dist/mail/i18n/index.d.ts +46 -0
- package/dist/mail/i18n/index.js +31 -0
- package/dist/mail/i18n/index.js.map +1 -0
- package/dist/mail/i18n/ja.d.ts +2 -0
- package/dist/mail/i18n/ja.js +66 -0
- package/dist/mail/i18n/ja.js.map +1 -0
- package/dist/mcp/attach.d.ts +25 -0
- package/dist/mcp/attach.js +104 -0
- package/dist/mcp/attach.js.map +1 -0
- package/dist/mcp/dispatch.d.ts +59 -0
- package/dist/mcp/dispatch.js +70 -0
- package/dist/mcp/dispatch.js.map +1 -0
- package/dist/mcp/result.d.ts +40 -0
- package/dist/mcp/result.js +78 -0
- package/dist/mcp/result.js.map +1 -0
- package/dist/mcp/server.d.ts +67 -0
- package/dist/mcp/server.js +113 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/page.d.ts +2 -0
- package/dist/mcp/tools/page.js +256 -0
- package/dist/mcp/tools/page.js.map +1 -0
- package/dist/mcp/tools/search.d.ts +2 -0
- package/dist/mcp/tools/search.js +36 -0
- package/dist/mcp/tools/search.js.map +1 -0
- package/dist/middlewares/accessTokenParser.d.ts +4 -0
- package/dist/middlewares/accessTokenParser.js +29 -0
- package/dist/middlewares/accessTokenParser.js.map +1 -0
- package/dist/middlewares/adminRequired.d.ts +10 -0
- package/dist/middlewares/adminRequired.js +35 -0
- package/dist/middlewares/adminRequired.js.map +1 -0
- package/dist/middlewares/applicationInstalled.d.ts +3 -0
- package/dist/middlewares/applicationInstalled.js +20 -0
- package/dist/middlewares/applicationInstalled.js.map +1 -0
- package/dist/middlewares/applicationNotInstalled.d.ts +3 -0
- package/dist/middlewares/applicationNotInstalled.js +13 -0
- package/dist/middlewares/applicationNotInstalled.js.map +1 -0
- package/dist/middlewares/basicAuth.d.ts +4 -0
- package/dist/middlewares/basicAuth.js +23 -0
- package/dist/middlewares/basicAuth.js.map +1 -0
- package/dist/middlewares/csrfVerify.d.ts +4 -0
- package/dist/middlewares/csrfVerify.js +24 -0
- package/dist/middlewares/csrfVerify.js.map +1 -0
- package/dist/middlewares/encodeSpace.d.ts +3 -0
- package/dist/middlewares/encodeSpace.js +14 -0
- package/dist/middlewares/encodeSpace.js.map +1 -0
- package/dist/middlewares/fileAccessRightOrLoginRequired.d.ts +4 -0
- package/dist/middlewares/fileAccessRightOrLoginRequired.js +29 -0
- package/dist/middlewares/fileAccessRightOrLoginRequired.js.map +1 -0
- package/dist/middlewares/index.d.ts +16 -0
- package/dist/middlewares/index.js +30 -0
- package/dist/middlewares/index.js.map +1 -0
- package/dist/middlewares/jwtAdminRequired.d.ts +8 -0
- package/dist/middlewares/jwtAdminRequired.js +35 -0
- package/dist/middlewares/jwtAdminRequired.js.map +1 -0
- package/dist/middlewares/jwtAuth.d.ts +4 -0
- package/dist/middlewares/jwtAuth.js +104 -0
- package/dist/middlewares/jwtAuth.js.map +1 -0
- package/dist/middlewares/loginChecker.d.ts +4 -0
- package/dist/middlewares/loginChecker.js +32 -0
- package/dist/middlewares/loginChecker.js.map +1 -0
- package/dist/middlewares/loginRequired.d.ts +4 -0
- package/dist/middlewares/loginRequired.js +88 -0
- package/dist/middlewares/loginRequired.js.map +1 -0
- package/dist/migration/cli-api.d.ts +83 -0
- package/dist/migration/cli-api.js +128 -0
- package/dist/migration/cli-api.js.map +1 -0
- package/dist/migration/migrations/index.d.ts +12 -0
- package/dist/migration/migrations/index.js +24 -0
- package/dist/migration/migrations/index.js.map +1 -0
- package/dist/migration/migrations/page-status-default.d.ts +25 -0
- package/dist/migration/migrations/page-status-default.js +79 -0
- package/dist/migration/migrations/page-status-default.js.map +1 -0
- package/dist/migration/migrations/revisions-schema-unify.d.ts +33 -0
- package/dist/migration/migrations/revisions-schema-unify.js +88 -0
- package/dist/migration/migrations/revisions-schema-unify.js.map +1 -0
- package/dist/migration/migrations/user-unique-prepare.d.ts +1 -0
- package/dist/migration/migrations/user-unique-prepare.js +214 -0
- package/dist/migration/migrations/user-unique-prepare.js.map +1 -0
- package/dist/migration/migrations/wikilink-format.d.ts +97 -0
- package/dist/migration/migrations/wikilink-format.js +418 -0
- package/dist/migration/migrations/wikilink-format.js.map +1 -0
- package/dist/migration/rebuild-api.d.ts +50 -0
- package/dist/migration/rebuild-api.js +45 -0
- package/dist/migration/rebuild-api.js.map +1 -0
- package/dist/migration/rebuild-runner.d.ts +64 -0
- package/dist/migration/rebuild-runner.js +42 -0
- package/dist/migration/rebuild-runner.js.map +1 -0
- package/dist/migration/rebuilds/index.d.ts +26 -0
- package/dist/migration/rebuilds/index.js +69 -0
- package/dist/migration/rebuilds/index.js.map +1 -0
- package/dist/migration/registry.d.ts +15 -0
- package/dist/migration/registry.js +96 -0
- package/dist/migration/registry.js.map +1 -0
- package/dist/migration/run-boot-migrations.d.ts +31 -0
- package/dist/migration/run-boot-migrations.js +95 -0
- package/dist/migration/run-boot-migrations.js.map +1 -0
- package/dist/migration/runner.d.ts +120 -0
- package/dist/migration/runner.js +276 -0
- package/dist/migration/runner.js.map +1 -0
- package/dist/migration/types.d.ts +153 -0
- package/dist/migration/types.js +13 -0
- package/dist/migration/types.js.map +1 -0
- package/dist/models/activity.d.ts +34 -0
- package/dist/models/activity.js +263 -0
- package/dist/models/activity.js.map +1 -0
- package/dist/models/attachment.d.ts +25 -0
- package/dist/models/attachment.js +82 -0
- package/dist/models/attachment.js.map +1 -0
- package/dist/models/backlink.d.ts +19 -0
- package/dist/models/backlink.js +138 -0
- package/dist/models/backlink.js.map +1 -0
- package/dist/models/bookmark.d.ts +28 -0
- package/dist/models/bookmark.js +136 -0
- package/dist/models/bookmark.js.map +1 -0
- package/dist/models/comment.d.ts +21 -0
- package/dist/models/comment.js +87 -0
- package/dist/models/comment.js.map +1 -0
- package/dist/models/config-sensitive.d.ts +21 -0
- package/dist/models/config-sensitive.js +71 -0
- package/dist/models/config-sensitive.js.map +1 -0
- package/dist/models/config.d.ts +34 -0
- package/dist/models/config.js +161 -0
- package/dist/models/config.js.map +1 -0
- package/dist/models/index.d.ts +30 -0
- package/dist/models/index.js +55 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/migration-application.d.ts +54 -0
- package/dist/models/migration-application.js +36 -0
- package/dist/models/migration-application.js.map +1 -0
- package/dist/models/notification.d.ts +28 -0
- package/dist/models/notification.js +285 -0
- package/dist/models/notification.js.map +1 -0
- package/dist/models/oauth-authorization-code.d.ts +34 -0
- package/dist/models/oauth-authorization-code.js +100 -0
- package/dist/models/oauth-authorization-code.js.map +1 -0
- package/dist/models/oauth-client.d.ts +36 -0
- package/dist/models/oauth-client.js +56 -0
- package/dist/models/oauth-client.js.map +1 -0
- package/dist/models/oauth-device-code.d.ts +55 -0
- package/dist/models/oauth-device-code.js +158 -0
- package/dist/models/oauth-device-code.js.map +1 -0
- package/dist/models/oauth-refresh-token.d.ts +31 -0
- package/dist/models/oauth-refresh-token.js +118 -0
- package/dist/models/oauth-refresh-token.js.map +1 -0
- package/dist/models/page-yjs-update.d.ts +35 -0
- package/dist/models/page-yjs-update.js +33 -0
- package/dist/models/page-yjs-update.js.map +1 -0
- package/dist/models/page.d.ts +200 -0
- package/dist/models/page.js +1117 -0
- package/dist/models/page.js.map +1 -0
- package/dist/models/personal-access-token.d.ts +30 -0
- package/dist/models/personal-access-token.js +107 -0
- package/dist/models/personal-access-token.js.map +1 -0
- package/dist/models/plugin-render-cache.d.ts +40 -0
- package/dist/models/plugin-render-cache.js +39 -0
- package/dist/models/plugin-render-cache.js.map +1 -0
- package/dist/models/revision.d.ts +145 -0
- package/dist/models/revision.js +241 -0
- package/dist/models/revision.js.map +1 -0
- package/dist/models/share.d.ts +38 -0
- package/dist/models/share.js +137 -0
- package/dist/models/share.js.map +1 -0
- package/dist/models/shareAccess.d.ts +20 -0
- package/dist/models/shareAccess.js +45 -0
- package/dist/models/shareAccess.js.map +1 -0
- package/dist/models/tracking.d.ts +14 -0
- package/dist/models/tracking.js +14 -0
- package/dist/models/tracking.js.map +1 -0
- package/dist/models/updatePost.d.ts +25 -0
- package/dist/models/updatePost.js +87 -0
- package/dist/models/updatePost.js.map +1 -0
- package/dist/models/user.d.ts +144 -0
- package/dist/models/user.js +681 -0
- package/dist/models/user.js.map +1 -0
- package/dist/models/watcher.d.ts +23 -0
- package/dist/models/watcher.js +75 -0
- package/dist/models/watcher.js.map +1 -0
- package/dist/notifications/attach.d.ts +63 -0
- package/dist/notifications/attach.js +426 -0
- package/dist/notifications/attach.js.map +1 -0
- package/dist/notifications/channel.d.ts +13 -0
- package/dist/notifications/channel.js +18 -0
- package/dist/notifications/channel.js.map +1 -0
- package/dist/plugin/index.d.ts +2 -0
- package/dist/plugin/index.js +6 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/plugin-context.d.ts +22 -0
- package/dist/plugin/plugin-context.js +126 -0
- package/dist/plugin/plugin-context.js.map +1 -0
- package/dist/plugin/plugin-manager.d.ts +164 -0
- package/dist/plugin/plugin-manager.js +328 -0
- package/dist/plugin/plugin-manager.js.map +1 -0
- package/dist/plugin/plugin-namespace.d.ts +28 -0
- package/dist/plugin/plugin-namespace.js +53 -0
- package/dist/plugin/plugin-namespace.js.map +1 -0
- package/dist/plugin/registries.d.ts +38 -0
- package/dist/plugin/registries.js +71 -0
- package/dist/plugin/registries.js.map +1 -0
- package/dist/plugin/schema-serializer.d.ts +34 -0
- package/dist/plugin/schema-serializer.js +122 -0
- package/dist/plugin/schema-serializer.js.map +1 -0
- package/dist/plugin/topo-sort.d.ts +15 -0
- package/dist/plugin/topo-sort.js +59 -0
- package/dist/plugin/topo-sort.js.map +1 -0
- package/dist/presence/attach.d.ts +36 -0
- package/dist/presence/attach.js +399 -0
- package/dist/presence/attach.js.map +1 -0
- package/dist/renderer/__fixtures__/echo-embed.d.ts +27 -0
- package/dist/renderer/__fixtures__/echo-embed.js +24 -0
- package/dist/renderer/__fixtures__/echo-embed.js.map +1 -0
- package/dist/renderer/cache/index.d.ts +60 -0
- package/dist/renderer/cache/index.js +219 -0
- package/dist/renderer/cache/index.js.map +1 -0
- package/dist/renderer/cache/mongodb-cache.d.ts +82 -0
- package/dist/renderer/cache/mongodb-cache.js +180 -0
- package/dist/renderer/cache/mongodb-cache.js.map +1 -0
- package/dist/renderer/cache/reservation.d.ts +20 -0
- package/dist/renderer/cache/reservation.js +115 -0
- package/dist/renderer/cache/reservation.js.map +1 -0
- package/dist/renderer/core/_mdast-walk.d.ts +35 -0
- package/dist/renderer/core/_mdast-walk.js +45 -0
- package/dist/renderer/core/_mdast-walk.js.map +1 -0
- package/dist/renderer/core/code-block-dispatch.d.ts +31 -0
- package/dist/renderer/core/code-block-dispatch.js +166 -0
- package/dist/renderer/core/code-block-dispatch.js.map +1 -0
- package/dist/renderer/core/code-blocks.d.ts +12 -0
- package/dist/renderer/core/code-blocks.js +32 -0
- package/dist/renderer/core/code-blocks.js.map +1 -0
- package/dist/renderer/core/embed-tags.d.ts +14 -0
- package/dist/renderer/core/embed-tags.js +154 -0
- package/dist/renderer/core/embed-tags.js.map +1 -0
- package/dist/renderer/core/headings.d.ts +16 -0
- package/dist/renderer/core/headings.js +31 -0
- package/dist/renderer/core/headings.js.map +1 -0
- package/dist/renderer/core/index.d.ts +65 -0
- package/dist/renderer/core/index.js +83 -0
- package/dist/renderer/core/index.js.map +1 -0
- package/dist/renderer/core/mention-resolve.d.ts +39 -0
- package/dist/renderer/core/mention-resolve.js +75 -0
- package/dist/renderer/core/mention-resolve.js.map +1 -0
- package/dist/renderer/core/mentions.d.ts +2 -0
- package/dist/renderer/core/mentions.js +83 -0
- package/dist/renderer/core/mentions.js.map +1 -0
- package/dist/renderer/core/syntax-highlight.d.ts +21 -0
- package/dist/renderer/core/syntax-highlight.js +64 -0
- package/dist/renderer/core/syntax-highlight.js.map +1 -0
- package/dist/renderer/core/url-inline-expand.d.ts +9 -0
- package/dist/renderer/core/url-inline-expand.js +157 -0
- package/dist/renderer/core/url-inline-expand.js.map +1 -0
- package/dist/renderer/core/wikilinks.d.ts +2 -0
- package/dist/renderer/core/wikilinks.js +118 -0
- package/dist/renderer/core/wikilinks.js.map +1 -0
- package/dist/renderer/index.d.ts +67 -0
- package/dist/renderer/index.js +99 -0
- package/dist/renderer/index.js.map +1 -0
- package/dist/renderer/pipeline.d.ts +134 -0
- package/dist/renderer/pipeline.js +203 -0
- package/dist/renderer/pipeline.js.map +1 -0
- package/dist/renderer/registry.d.ts +83 -0
- package/dist/renderer/registry.js +130 -0
- package/dist/renderer/registry.js.map +1 -0
- package/dist/renderer/serialize.d.ts +27 -0
- package/dist/renderer/serialize.js +46 -0
- package/dist/renderer/serialize.js.map +1 -0
- package/dist/renderer/version.d.ts +30 -0
- package/dist/renderer/version.js +34 -0
- package/dist/renderer/version.js.map +1 -0
- package/dist/routes/admin.d.ts +4 -0
- package/dist/routes/admin.js +17 -0
- package/dist/routes/admin.js.map +1 -0
- package/dist/routes/api/admin.d.ts +4 -0
- package/dist/routes/api/admin.js +37 -0
- package/dist/routes/api/admin.js.map +1 -0
- package/dist/routes/api/attachment.d.ts +4 -0
- package/dist/routes/api/attachment.js +19 -0
- package/dist/routes/api/attachment.js.map +1 -0
- package/dist/routes/api/bookmark.d.ts +4 -0
- package/dist/routes/api/bookmark.js +15 -0
- package/dist/routes/api/bookmark.js.map +1 -0
- package/dist/routes/api/comment.d.ts +4 -0
- package/dist/routes/api/comment.js +14 -0
- package/dist/routes/api/comment.js.map +1 -0
- package/dist/routes/api/index.d.ts +4 -0
- package/dist/routes/api/index.js +36 -0
- package/dist/routes/api/index.js.map +1 -0
- package/dist/routes/api/like.d.ts +4 -0
- package/dist/routes/api/like.js +13 -0
- package/dist/routes/api/like.js.map +1 -0
- package/dist/routes/api/notification.d.ts +4 -0
- package/dist/routes/api/notification.js +15 -0
- package/dist/routes/api/notification.js.map +1 -0
- package/dist/routes/api/page.d.ts +4 -0
- package/dist/routes/api/page.js +24 -0
- package/dist/routes/api/page.js.map +1 -0
- package/dist/routes/api/revision.d.ts +4 -0
- package/dist/routes/api/revision.js +14 -0
- package/dist/routes/api/revision.js.map +1 -0
- package/dist/routes/api/share.d.ts +4 -0
- package/dist/routes/api/share.js +16 -0
- package/dist/routes/api/share.js.map +1 -0
- package/dist/routes/api/version.d.ts +4 -0
- package/dist/routes/api/version.js +10 -0
- package/dist/routes/api/version.js.map +1 -0
- package/dist/routes/index.d.ts +4 -0
- package/dist/routes/index.js +71 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/login.d.ts +4 -0
- package/dist/routes/login.js +18 -0
- package/dist/routes/login.js.map +1 -0
- package/dist/routes/me.d.ts +4 -0
- package/dist/routes/me.js +24 -0
- package/dist/routes/me.js.map +1 -0
- package/dist/routes/ts-rest/admin/app.d.ts +4 -0
- package/dist/routes/ts-rest/admin/app.js +67 -0
- package/dist/routes/ts-rest/admin/app.js.map +1 -0
- package/dist/routes/ts-rest/admin/auth.d.ts +4 -0
- package/dist/routes/ts-rest/admin/auth.js +95 -0
- package/dist/routes/ts-rest/admin/auth.js.map +1 -0
- package/dist/routes/ts-rest/admin/index.d.ts +10 -0
- package/dist/routes/ts-rest/admin/index.js +35 -0
- package/dist/routes/ts-rest/admin/index.js.map +1 -0
- package/dist/routes/ts-rest/admin/mail.d.ts +4 -0
- package/dist/routes/ts-rest/admin/mail.js +156 -0
- package/dist/routes/ts-rest/admin/mail.js.map +1 -0
- package/dist/routes/ts-rest/admin/plugins.d.ts +4 -0
- package/dist/routes/ts-rest/admin/plugins.js +317 -0
- package/dist/routes/ts-rest/admin/plugins.js.map +1 -0
- package/dist/routes/ts-rest/admin/search.d.ts +4 -0
- package/dist/routes/ts-rest/admin/search.js +67 -0
- package/dist/routes/ts-rest/admin/search.js.map +1 -0
- package/dist/routes/ts-rest/admin/security.d.ts +4 -0
- package/dist/routes/ts-rest/admin/security.js +114 -0
- package/dist/routes/ts-rest/admin/security.js.map +1 -0
- package/dist/routes/ts-rest/admin/share.d.ts +4 -0
- package/dist/routes/ts-rest/admin/share.js +69 -0
- package/dist/routes/ts-rest/admin/share.js.map +1 -0
- package/dist/routes/ts-rest/admin/storage.d.ts +4 -0
- package/dist/routes/ts-rest/admin/storage.js +59 -0
- package/dist/routes/ts-rest/admin/storage.js.map +1 -0
- package/dist/routes/ts-rest/admin/users.d.ts +4 -0
- package/dist/routes/ts-rest/admin/users.js +215 -0
- package/dist/routes/ts-rest/admin/users.js.map +1 -0
- package/dist/routes/ts-rest/adminCrypto.d.ts +4 -0
- package/dist/routes/ts-rest/adminCrypto.js +111 -0
- package/dist/routes/ts-rest/adminCrypto.js.map +1 -0
- package/dist/routes/ts-rest/app.d.ts +4 -0
- package/dist/routes/ts-rest/app.js +23 -0
- package/dist/routes/ts-rest/app.js.map +1 -0
- package/dist/routes/ts-rest/attachment.d.ts +4 -0
- package/dist/routes/ts-rest/attachment.js +830 -0
- package/dist/routes/ts-rest/attachment.js.map +1 -0
- package/dist/routes/ts-rest/auth.d.ts +4 -0
- package/dist/routes/ts-rest/auth.js +70 -0
- package/dist/routes/ts-rest/auth.js.map +1 -0
- package/dist/routes/ts-rest/autocomplete.d.ts +30 -0
- package/dist/routes/ts-rest/autocomplete.js +189 -0
- package/dist/routes/ts-rest/autocomplete.js.map +1 -0
- package/dist/routes/ts-rest/backlink.d.ts +4 -0
- package/dist/routes/ts-rest/backlink.js +106 -0
- package/dist/routes/ts-rest/backlink.js.map +1 -0
- package/dist/routes/ts-rest/bookmark.d.ts +4 -0
- package/dist/routes/ts-rest/bookmark.js +189 -0
- package/dist/routes/ts-rest/bookmark.js.map +1 -0
- package/dist/routes/ts-rest/comment.d.ts +4 -0
- package/dist/routes/ts-rest/comment.js +217 -0
- package/dist/routes/ts-rest/comment.js.map +1 -0
- package/dist/routes/ts-rest/draft.d.ts +22 -0
- package/dist/routes/ts-rest/draft.js +200 -0
- package/dist/routes/ts-rest/draft.js.map +1 -0
- package/dist/routes/ts-rest/index.d.ts +4 -0
- package/dist/routes/ts-rest/index.js +103 -0
- package/dist/routes/ts-rest/index.js.map +1 -0
- package/dist/routes/ts-rest/installer.d.ts +4 -0
- package/dist/routes/ts-rest/installer.js +77 -0
- package/dist/routes/ts-rest/installer.js.map +1 -0
- package/dist/routes/ts-rest/me.d.ts +4 -0
- package/dist/routes/ts-rest/me.js +410 -0
- package/dist/routes/ts-rest/me.js.map +1 -0
- package/dist/routes/ts-rest/notification.d.ts +4 -0
- package/dist/routes/ts-rest/notification.js +241 -0
- package/dist/routes/ts-rest/notification.js.map +1 -0
- package/dist/routes/ts-rest/page-collab.d.ts +29 -0
- package/dist/routes/ts-rest/page-collab.js +90 -0
- package/dist/routes/ts-rest/page-collab.js.map +1 -0
- package/dist/routes/ts-rest/page-preview.d.ts +26 -0
- package/dist/routes/ts-rest/page-preview.js +80 -0
- package/dist/routes/ts-rest/page-preview.js.map +1 -0
- package/dist/routes/ts-rest/page.d.ts +4 -0
- package/dist/routes/ts-rest/page.js +676 -0
- package/dist/routes/ts-rest/page.js.map +1 -0
- package/dist/routes/ts-rest/presence.d.ts +30 -0
- package/dist/routes/ts-rest/presence.js +155 -0
- package/dist/routes/ts-rest/presence.js.map +1 -0
- package/dist/routes/ts-rest/revision.d.ts +4 -0
- package/dist/routes/ts-rest/revision.js +240 -0
- package/dist/routes/ts-rest/revision.js.map +1 -0
- package/dist/routes/ts-rest/search.d.ts +4 -0
- package/dist/routes/ts-rest/search.js +121 -0
- package/dist/routes/ts-rest/search.js.map +1 -0
- package/dist/routes/ts-rest/tokenAuth.d.ts +4 -0
- package/dist/routes/ts-rest/tokenAuth.js +94 -0
- package/dist/routes/ts-rest/tokenAuth.js.map +1 -0
- package/dist/routes/ts-rest/user.d.ts +4 -0
- package/dist/routes/ts-rest/user.js +307 -0
- package/dist/routes/ts-rest/user.js.map +1 -0
- package/dist/service/config.d.ts +50 -0
- package/dist/service/config.js +202 -0
- package/dist/service/config.js.map +1 -0
- package/dist/service/lru.d.ts +11 -0
- package/dist/service/lru.js +47 -0
- package/dist/service/lru.js.map +1 -0
- package/dist/service/mail.d.ts +107 -0
- package/dist/service/mail.js +220 -0
- package/dist/service/mail.js.map +1 -0
- package/dist/service/notification.d.ts +9 -0
- package/dist/service/notification.js +19 -0
- package/dist/service/notification.js.map +1 -0
- package/dist/service/presence.d.ts +219 -0
- package/dist/service/presence.js +602 -0
- package/dist/service/presence.js.map +1 -0
- package/dist/types/error.d.ts +13 -0
- package/dist/types/error.js +13 -0
- package/dist/types/error.js.map +1 -0
- package/dist/types/express.d.ts +34 -0
- package/dist/types/express.js +50 -0
- package/dist/types/express.js.map +1 -0
- package/dist/types/mongoose-extensions.d.ts +8 -0
- package/dist/types/mongoose-extensions.js +24 -0
- package/dist/types/mongoose-extensions.js.map +1 -0
- package/dist/util/accessTokenParser.d.ts +1 -0
- package/dist/util/accessTokenParser.js +34 -0
- package/dist/util/accessTokenParser.js.map +1 -0
- package/dist/util/activityDefine.d.ts +15 -0
- package/dist/util/activityDefine.js +52 -0
- package/dist/util/activityDefine.js.map +1 -0
- package/dist/util/admin-config.d.ts +57 -0
- package/dist/util/admin-config.js +99 -0
- package/dist/util/admin-config.js.map +1 -0
- package/dist/util/admin-pager.d.ts +24 -0
- package/dist/util/admin-pager.js +73 -0
- package/dist/util/admin-pager.js.map +1 -0
- package/dist/util/apiPaginate.d.ts +11 -0
- package/dist/util/apiPaginate.js +33 -0
- package/dist/util/apiPaginate.js.map +1 -0
- package/dist/util/apiResponse.d.ts +9 -0
- package/dist/util/apiResponse.js +23 -0
- package/dist/util/apiResponse.js.map +1 -0
- package/dist/util/auth.d.ts +11 -0
- package/dist/util/auth.js +48 -0
- package/dist/util/auth.js.map +1 -0
- package/dist/util/auto-watch.d.ts +35 -0
- package/dist/util/auto-watch.js +24 -0
- package/dist/util/auto-watch.js.map +1 -0
- package/dist/util/autocomplete-match.d.ts +44 -0
- package/dist/util/autocomplete-match.js +80 -0
- package/dist/util/autocomplete-match.js.map +1 -0
- package/dist/util/aws-config-migration.d.ts +11 -0
- package/dist/util/aws-config-migration.js +68 -0
- package/dist/util/aws-config-migration.js.map +1 -0
- package/dist/util/boot-reporter.d.ts +130 -0
- package/dist/util/boot-reporter.js +242 -0
- package/dist/util/boot-reporter.js.map +1 -0
- package/dist/util/collab-cap.d.ts +39 -0
- package/dist/util/collab-cap.js +90 -0
- package/dist/util/collab-cap.js.map +1 -0
- package/dist/util/crypto.d.ts +39 -0
- package/dist/util/crypto.js +105 -0
- package/dist/util/crypto.js.map +1 -0
- package/dist/util/dedup-users.d.ts +96 -0
- package/dist/util/dedup-users.js +149 -0
- package/dist/util/dedup-users.js.map +1 -0
- package/dist/util/editor-cap-counter.d.ts +90 -0
- package/dist/util/editor-cap-counter.js +175 -0
- package/dist/util/editor-cap-counter.js.map +1 -0
- package/dist/util/fileUploader.d.ts +55 -0
- package/dist/util/fileUploader.js +70 -0
- package/dist/util/fileUploader.js.map +1 -0
- package/dist/util/formUtil.d.ts +2 -0
- package/dist/util/formUtil.js +15 -0
- package/dist/util/formUtil.js.map +1 -0
- package/dist/util/githubAuth.d.ts +2 -0
- package/dist/util/githubAuth.js +82 -0
- package/dist/util/githubAuth.js.map +1 -0
- package/dist/util/googleAuth.d.ts +2 -0
- package/dist/util/googleAuth.js +85 -0
- package/dist/util/googleAuth.js.map +1 -0
- package/dist/util/jwt.d.ts +50 -0
- package/dist/util/jwt.js +127 -0
- package/dist/util/jwt.js.map +1 -0
- package/dist/util/linkDetector.d.ts +3 -0
- package/dist/util/linkDetector.js +91 -0
- package/dist/util/linkDetector.js.map +1 -0
- package/dist/util/mail-token.d.ts +24 -0
- package/dist/util/mail-token.js +117 -0
- package/dist/util/mail-token.js.map +1 -0
- package/dist/util/mailer.d.ts +7 -0
- package/dist/util/mailer.js +98 -0
- package/dist/util/mailer.js.map +1 -0
- package/dist/util/map-duplicate-key-error.d.ts +26 -0
- package/dist/util/map-duplicate-key-error.js +41 -0
- package/dist/util/map-duplicate-key-error.js.map +1 -0
- package/dist/util/mongoose-paginate.d.ts +10 -0
- package/dist/util/mongoose-paginate.js +23 -0
- package/dist/util/mongoose-paginate.js.map +1 -0
- package/dist/util/notifications-token.d.ts +35 -0
- package/dist/util/notifications-token.js +140 -0
- package/dist/util/notifications-token.js.map +1 -0
- package/dist/util/oauth-client-seed.d.ts +2 -0
- package/dist/util/oauth-client-seed.js +48 -0
- package/dist/util/oauth-client-seed.js.map +1 -0
- package/dist/util/oauth-redirect-uri.d.ts +2 -0
- package/dist/util/oauth-redirect-uri.js +55 -0
- package/dist/util/oauth-redirect-uri.js.map +1 -0
- package/dist/util/page-response.d.ts +113 -0
- package/dist/util/page-response.js +154 -0
- package/dist/util/page-response.js.map +1 -0
- package/dist/util/page-search-index.d.ts +19 -0
- package/dist/util/page-search-index.js +91 -0
- package/dist/util/page-search-index.js.map +1 -0
- package/dist/util/page-status-migration.d.ts +23 -0
- package/dist/util/page-status-migration.js +48 -0
- package/dist/util/page-status-migration.js.map +1 -0
- package/dist/util/path.d.ts +2 -0
- package/dist/util/path.js +12 -0
- package/dist/util/path.js.map +1 -0
- package/dist/util/pkce.d.ts +13 -0
- package/dist/util/pkce.js +30 -0
- package/dist/util/pkce.js.map +1 -0
- package/dist/util/presence-token.d.ts +21 -0
- package/dist/util/presence-token.js +120 -0
- package/dist/util/presence-token.js.map +1 -0
- package/dist/util/rate-limit.d.ts +67 -0
- package/dist/util/rate-limit.js +87 -0
- package/dist/util/rate-limit.js.map +1 -0
- package/dist/util/rebuild-backlink.d.ts +25 -0
- package/dist/util/rebuild-backlink.js +7 -0
- package/dist/util/rebuild-backlink.js.map +1 -0
- package/dist/util/rebuild-renderer.d.ts +31 -0
- package/dist/util/rebuild-renderer.js +7 -0
- package/dist/util/rebuild-renderer.js.map +1 -0
- package/dist/util/redis-opts.d.ts +17 -0
- package/dist/util/redis-opts.js +40 -0
- package/dist/util/redis-opts.js.map +1 -0
- package/dist/util/regex.d.ts +2 -0
- package/dist/util/regex.js +8 -0
- package/dist/util/regex.js.map +1 -0
- package/dist/util/search-rebuild.d.ts +18 -0
- package/dist/util/search-rebuild.js +28 -0
- package/dist/util/search-rebuild.js.map +1 -0
- package/dist/util/ssr.d.ts +3 -0
- package/dist/util/ssr.js +9 -0
- package/dist/util/ssr.js.map +1 -0
- package/dist/util/storage-copy.d.ts +40 -0
- package/dist/util/storage-copy.js +123 -0
- package/dist/util/storage-copy.js.map +1 -0
- package/dist/util/ts-rest-helpers.d.ts +110 -0
- package/dist/util/ts-rest-helpers.js +110 -0
- package/dist/util/ts-rest-helpers.js.map +1 -0
- package/dist/util/url.d.ts +1 -0
- package/dist/util/url.js +11 -0
- package/dist/util/url.js.map +1 -0
- package/dist/util/user-code.d.ts +10 -0
- package/dist/util/user-code.js +55 -0
- package/dist/util/user-code.js.map +1 -0
- package/dist/util/view.d.ts +10 -0
- package/dist/util/view.js +99 -0
- package/dist/util/view.js.map +1 -0
- package/dist/util/watcher-backfill.d.ts +30 -0
- package/dist/util/watcher-backfill.js +43 -0
- package/dist/util/watcher-backfill.js.map +1 -0
- package/dist/util/ws-token.d.ts +24 -0
- package/dist/util/ws-token.js +134 -0
- package/dist/util/ws-token.js.map +1 -0
- package/package.json +106 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Root } from 'mdast';
|
|
2
|
+
import type { PipelineEsmDeps, PipelineMetadata } from '../pipeline';
|
|
3
|
+
/**
|
|
4
|
+
* Core renderer transform — extract a flat TOC from heading nodes and
|
|
5
|
+
* stamp each heading with a stable `data.hProperties.id` matching the
|
|
6
|
+
* anchor id (so SSR HTML downstream can use the same id).
|
|
7
|
+
*
|
|
8
|
+
* github-slugger handles dedup (`-1`, `-2`, …) and CJK preservation.
|
|
9
|
+
*
|
|
10
|
+
* The factory takes the ESM deps because `github-slugger` /
|
|
11
|
+
* `mdast-util-to-string` are ESM-only and cannot be statically
|
|
12
|
+
* imported from `packages/api` (CJS). It returns a unified plugin
|
|
13
|
+
* that accepts `metadata` as its option.
|
|
14
|
+
*/
|
|
15
|
+
export type UnifiedTransformPlugin = (metadata: PipelineMetadata) => (tree: Root) => void;
|
|
16
|
+
export declare const makeRemarkHeadings: (deps: PipelineEsmDeps) => UnifiedTransformPlugin;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeRemarkHeadings = void 0;
|
|
4
|
+
const makeRemarkHeadings = (deps) => (metadata) => (tree) => {
|
|
5
|
+
const slugger = new deps.GithubSlugger();
|
|
6
|
+
walk(tree);
|
|
7
|
+
function walk(node) {
|
|
8
|
+
if (node.type === 'heading') {
|
|
9
|
+
const heading = node;
|
|
10
|
+
const text = deps.mdastToString(heading).trim();
|
|
11
|
+
const anchorId = slugger.slug(text);
|
|
12
|
+
const entry = {
|
|
13
|
+
level: heading.depth,
|
|
14
|
+
text,
|
|
15
|
+
anchorId,
|
|
16
|
+
};
|
|
17
|
+
metadata.toc.push(entry);
|
|
18
|
+
// Stamp the heading so any downstream SSR renderer (Phase 3)
|
|
19
|
+
// can use the same id without re-running a slugger.
|
|
20
|
+
const data = (heading.data ?? (heading.data = {}));
|
|
21
|
+
data.hProperties = { ...(data.hProperties ?? {}), id: anchorId };
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (Array.isArray(node.children)) {
|
|
25
|
+
for (const child of node.children)
|
|
26
|
+
walk(child);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.makeRemarkHeadings = makeRemarkHeadings;
|
|
31
|
+
//# sourceMappingURL=headings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headings.js","sourceRoot":"","sources":["../../../src/renderer/core/headings.ts"],"names":[],"mappings":";;;AAkBO,MAAM,kBAAkB,GAC7B,CAAC,IAAqB,EAA0B,EAAE,CAClD,CAAC,QAAQ,EAAE,EAAE,CACb,CAAC,IAAI,EAAE,EAAE;IACP,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;IACzC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEX,SAAS,IAAI,CAAC,IAA6C;QACzD,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC5B,MAAM,OAAO,GAAG,IAAe,CAAC;YAChC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;YAChD,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACpC,MAAM,KAAK,GAAqB;gBAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,IAAI;gBACJ,QAAQ;aACT,CAAC;YACF,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAEzB,6DAA6D;YAC7D,oDAAoD;YACpD,MAAM,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAC,CAA8C,CAAC;YAChG,IAAI,CAAC,WAAW,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC;YACjE,OAAO;QACT,CAAC;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACjC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ;gBAAE,IAAI,CAAC,KAAgD,CAAC,CAAC;QAC5F,CAAC;IACH,CAAC;AACH,CAAC,CAAC;AA9BS,QAAA,kBAAkB,sBA8B3B"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { Root } from 'mdast';
|
|
2
|
+
import type { RenderContext } from '@crowi/plugin-api';
|
|
3
|
+
import type { MongoCacheStorage } from '../cache';
|
|
4
|
+
import type { PipelineEsmDeps, PipelineMetadata } from '../pipeline';
|
|
5
|
+
import type { RendererRegistryImpl } from '../registry';
|
|
6
|
+
import { type UnifiedTransformPlugin } from './headings';
|
|
7
|
+
export type { UnifiedTransformPlugin } from './headings';
|
|
8
|
+
export { makeCodeBlockDispatch } from './code-block-dispatch';
|
|
9
|
+
export { makeEmbedTagDispatch } from './embed-tags';
|
|
10
|
+
export { makeMentionResolve, type MentionUsernameResolver } from './mention-resolve';
|
|
11
|
+
export { makeUrlInlineExpandDispatch } from './url-inline-expand';
|
|
12
|
+
/**
|
|
13
|
+
* Build the bundled core renderer transform plugins, in their fixed
|
|
14
|
+
* order (headings → wikilinks → mentions → code-blocks → syntax-
|
|
15
|
+
* highlight). The pipeline prepends these to the registry's external
|
|
16
|
+
* plugins on every run.
|
|
17
|
+
*
|
|
18
|
+
* Order rationale:
|
|
19
|
+
* - headings runs first so the slugger sees pristine heading text
|
|
20
|
+
* before any text rewrite (wikilinks / mentions inside headings
|
|
21
|
+
* would otherwise change the visible label).
|
|
22
|
+
* - wikilinks + mentions next, both walking text nodes and skipping
|
|
23
|
+
* inside code / inlineCode.
|
|
24
|
+
* - code-blocks (the lang aggregator) runs BEFORE syntax-highlight
|
|
25
|
+
* because the latter rewrites `code` nodes into `html`, after
|
|
26
|
+
* which the aggregator would no longer find them.
|
|
27
|
+
* - syntax-highlight runs last among core plugins so wikilinks /
|
|
28
|
+
* mentions / heading anchors are already stamped by the time the
|
|
29
|
+
* AST gets persisted.
|
|
30
|
+
*
|
|
31
|
+
* Bound to the loaded ESM deps because `headings` needs
|
|
32
|
+
* `GithubSlugger` + `mdast-util-to-string`'s `toString` and
|
|
33
|
+
* `syntax-highlight` needs `shiki`; neither can be statically
|
|
34
|
+
* imported from CJS.
|
|
35
|
+
*/
|
|
36
|
+
export declare function buildCorePlugins(deps: PipelineEsmDeps): UnifiedTransformPlugin[];
|
|
37
|
+
/**
|
|
38
|
+
* Test-only convenience: bind the core plugins to the deps and run
|
|
39
|
+
* each one in order against a fresh `metadata` bag. Bypasses the
|
|
40
|
+
* unified processor, which is useful for unit tests that don't want
|
|
41
|
+
* to wait on dynamic imports of unified.
|
|
42
|
+
*
|
|
43
|
+
* Production code path is `runPipeline` in pipeline.ts.
|
|
44
|
+
*/
|
|
45
|
+
export declare function runCorePluginsDirectly(deps: PipelineEsmDeps, tree: unknown, metadata: PipelineMetadata): void;
|
|
46
|
+
/**
|
|
47
|
+
* Build the Phase 4 + 6 plugin-dispatch transforms — async post-
|
|
48
|
+
* processors that run AFTER `runSync` because they need to call cache
|
|
49
|
+
* I/O + plugin `render()` (both async).
|
|
50
|
+
*
|
|
51
|
+
* Order: embed-tags first, url-inline-expand second, code-block-
|
|
52
|
+
* dispatch third. Each walks the tree once and rewrites matched
|
|
53
|
+
* nodes in-place. Each no-ops when its respective registry is empty.
|
|
54
|
+
*
|
|
55
|
+
* Code-block-dispatch runs last on purpose: PlantUML / Mermaid output
|
|
56
|
+
* SHOULD NOT contain `@[tag](url)` or bare-URL constructs that earlier
|
|
57
|
+
* dispatchers would re-process, but putting code-block-dispatch last
|
|
58
|
+
* makes that defensive ordering explicit — the new `html` node it
|
|
59
|
+
* produces is opaque to the earlier walkers, which only operate on
|
|
60
|
+
* phrasing content / autolinks.
|
|
61
|
+
*/
|
|
62
|
+
export declare function buildPluginDispatchPlugins(registry: RendererRegistryImpl, ctx: RenderContext, deps: {
|
|
63
|
+
cache: MongoCacheStorage;
|
|
64
|
+
pageId: string;
|
|
65
|
+
}): Array<(tree: Root) => Promise<void>>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeUrlInlineExpandDispatch = exports.makeMentionResolve = exports.makeEmbedTagDispatch = exports.makeCodeBlockDispatch = void 0;
|
|
4
|
+
exports.buildCorePlugins = buildCorePlugins;
|
|
5
|
+
exports.runCorePluginsDirectly = runCorePluginsDirectly;
|
|
6
|
+
exports.buildPluginDispatchPlugins = buildPluginDispatchPlugins;
|
|
7
|
+
const code_blocks_1 = require("./code-blocks");
|
|
8
|
+
const code_block_dispatch_1 = require("./code-block-dispatch");
|
|
9
|
+
const embed_tags_1 = require("./embed-tags");
|
|
10
|
+
const headings_1 = require("./headings");
|
|
11
|
+
const mentions_1 = require("./mentions");
|
|
12
|
+
const syntax_highlight_1 = require("./syntax-highlight");
|
|
13
|
+
const url_inline_expand_1 = require("./url-inline-expand");
|
|
14
|
+
const wikilinks_1 = require("./wikilinks");
|
|
15
|
+
var code_block_dispatch_2 = require("./code-block-dispatch");
|
|
16
|
+
Object.defineProperty(exports, "makeCodeBlockDispatch", { enumerable: true, get: function () { return code_block_dispatch_2.makeCodeBlockDispatch; } });
|
|
17
|
+
var embed_tags_2 = require("./embed-tags");
|
|
18
|
+
Object.defineProperty(exports, "makeEmbedTagDispatch", { enumerable: true, get: function () { return embed_tags_2.makeEmbedTagDispatch; } });
|
|
19
|
+
var mention_resolve_1 = require("./mention-resolve");
|
|
20
|
+
Object.defineProperty(exports, "makeMentionResolve", { enumerable: true, get: function () { return mention_resolve_1.makeMentionResolve; } });
|
|
21
|
+
var url_inline_expand_2 = require("./url-inline-expand");
|
|
22
|
+
Object.defineProperty(exports, "makeUrlInlineExpandDispatch", { enumerable: true, get: function () { return url_inline_expand_2.makeUrlInlineExpandDispatch; } });
|
|
23
|
+
/**
|
|
24
|
+
* Build the bundled core renderer transform plugins, in their fixed
|
|
25
|
+
* order (headings → wikilinks → mentions → code-blocks → syntax-
|
|
26
|
+
* highlight). The pipeline prepends these to the registry's external
|
|
27
|
+
* plugins on every run.
|
|
28
|
+
*
|
|
29
|
+
* Order rationale:
|
|
30
|
+
* - headings runs first so the slugger sees pristine heading text
|
|
31
|
+
* before any text rewrite (wikilinks / mentions inside headings
|
|
32
|
+
* would otherwise change the visible label).
|
|
33
|
+
* - wikilinks + mentions next, both walking text nodes and skipping
|
|
34
|
+
* inside code / inlineCode.
|
|
35
|
+
* - code-blocks (the lang aggregator) runs BEFORE syntax-highlight
|
|
36
|
+
* because the latter rewrites `code` nodes into `html`, after
|
|
37
|
+
* which the aggregator would no longer find them.
|
|
38
|
+
* - syntax-highlight runs last among core plugins so wikilinks /
|
|
39
|
+
* mentions / heading anchors are already stamped by the time the
|
|
40
|
+
* AST gets persisted.
|
|
41
|
+
*
|
|
42
|
+
* Bound to the loaded ESM deps because `headings` needs
|
|
43
|
+
* `GithubSlugger` + `mdast-util-to-string`'s `toString` and
|
|
44
|
+
* `syntax-highlight` needs `shiki`; neither can be statically
|
|
45
|
+
* imported from CJS.
|
|
46
|
+
*/
|
|
47
|
+
function buildCorePlugins(deps) {
|
|
48
|
+
return [(0, headings_1.makeRemarkHeadings)(deps), wikilinks_1.remarkWikiLinks, mentions_1.remarkMentions, code_blocks_1.remarkCodeBlockLanguages, (0, syntax_highlight_1.makeRemarkSyntaxHighlight)(deps)];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Test-only convenience: bind the core plugins to the deps and run
|
|
52
|
+
* each one in order against a fresh `metadata` bag. Bypasses the
|
|
53
|
+
* unified processor, which is useful for unit tests that don't want
|
|
54
|
+
* to wait on dynamic imports of unified.
|
|
55
|
+
*
|
|
56
|
+
* Production code path is `runPipeline` in pipeline.ts.
|
|
57
|
+
*/
|
|
58
|
+
function runCorePluginsDirectly(deps, tree, metadata) {
|
|
59
|
+
for (const plugin of buildCorePlugins(deps)) {
|
|
60
|
+
const transformer = plugin(metadata);
|
|
61
|
+
transformer(tree);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Build the Phase 4 + 6 plugin-dispatch transforms — async post-
|
|
66
|
+
* processors that run AFTER `runSync` because they need to call cache
|
|
67
|
+
* I/O + plugin `render()` (both async).
|
|
68
|
+
*
|
|
69
|
+
* Order: embed-tags first, url-inline-expand second, code-block-
|
|
70
|
+
* dispatch third. Each walks the tree once and rewrites matched
|
|
71
|
+
* nodes in-place. Each no-ops when its respective registry is empty.
|
|
72
|
+
*
|
|
73
|
+
* Code-block-dispatch runs last on purpose: PlantUML / Mermaid output
|
|
74
|
+
* SHOULD NOT contain `@[tag](url)` or bare-URL constructs that earlier
|
|
75
|
+
* dispatchers would re-process, but putting code-block-dispatch last
|
|
76
|
+
* makes that defensive ordering explicit — the new `html` node it
|
|
77
|
+
* produces is opaque to the earlier walkers, which only operate on
|
|
78
|
+
* phrasing content / autolinks.
|
|
79
|
+
*/
|
|
80
|
+
function buildPluginDispatchPlugins(registry, ctx, deps) {
|
|
81
|
+
return [(0, embed_tags_1.makeEmbedTagDispatch)(registry, ctx, deps), (0, url_inline_expand_1.makeUrlInlineExpandDispatch)(registry, ctx, deps), (0, code_block_dispatch_1.makeCodeBlockDispatch)(registry, ctx, deps)];
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/renderer/core/index.ts"],"names":[],"mappings":";;;AA4CA,4CAEC;AAUD,wDAKC;AAkBD,gEAMC;AAhFD,+CAAyD;AACzD,+DAA8D;AAC9D,6CAAoD;AACpD,yCAA6E;AAC7E,yCAA4C;AAC5C,yDAA+D;AAC/D,2DAAkE;AAClE,2CAA8C;AAG9C,6DAA8D;AAArD,4HAAA,qBAAqB,OAAA;AAC9B,2CAAoD;AAA3C,kHAAA,oBAAoB,OAAA;AAC7B,qDAAqF;AAA5E,qHAAA,kBAAkB,OAAA;AAC3B,yDAAkE;AAAzD,gIAAA,2BAA2B,OAAA;AAEpC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,SAAgB,gBAAgB,CAAC,IAAqB;IACpD,OAAO,CAAC,IAAA,6BAAkB,EAAC,IAAI,CAAC,EAAE,2BAAe,EAAE,yBAAc,EAAE,sCAAwB,EAAE,IAAA,4CAAyB,EAAC,IAAI,CAAC,CAAC,CAAC;AAChI,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,sBAAsB,CAAC,IAAqB,EAAE,IAAa,EAAE,QAA0B;IACrG,KAAK,MAAM,MAAM,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC5C,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QACrC,WAAW,CAAC,IAAyD,CAAC,CAAC;IACzE,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,0BAA0B,CACxC,QAA8B,EAC9B,GAAkB,EAClB,IAAkD;IAElD,OAAO,CAAC,IAAA,iCAAoB,EAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,IAAA,+CAA2B,EAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,IAAA,2CAAqB,EAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AACnJ,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Root } from 'mdast';
|
|
2
|
+
/**
|
|
3
|
+
* Phase 2 plugin-dispatch transform — async post-processor that, after
|
|
4
|
+
* `runSync`, demotes `@username` mention link nodes whose username does
|
|
5
|
+
* NOT belong to a real user back to plain text.
|
|
6
|
+
*
|
|
7
|
+
* Why a post-`runSync` dispatch transform instead of teaching
|
|
8
|
+
* `remarkMentions` itself: `remarkMentions` is a synchronous unified
|
|
9
|
+
* plugin that only receives the metadata bag — it has no DB access by
|
|
10
|
+
* design. Username existence is an I/O concern, so it lives in the same
|
|
11
|
+
* async dispatch layer as the embed-tag / url-inline-expand transforms.
|
|
12
|
+
*
|
|
13
|
+
* The flow:
|
|
14
|
+
* 1. `remarkMentions` (sync core transform) turns EVERY `@username`
|
|
15
|
+
* into a `link` node with `data.hProperties.className === 'mention'`
|
|
16
|
+
* and pushes the username into `metadata.mentions`.
|
|
17
|
+
* 2. This transform collects those link nodes, batch-resolves the
|
|
18
|
+
* distinct usernames with a single `User.find({ username: { $in } })`
|
|
19
|
+
* query (no per-mention N+1), and replaces link nodes whose username
|
|
20
|
+
* is unknown with a `text` node `@username`.
|
|
21
|
+
*
|
|
22
|
+
* `metadata.mentions` is intentionally left untouched — it is the input
|
|
23
|
+
* to the mention-notification dispatch (`registerMentionDispatch`), which
|
|
24
|
+
* is out of scope for this phase. Only the rendered AST link nodes are
|
|
25
|
+
* demoted.
|
|
26
|
+
*
|
|
27
|
+
* Only runs in `mode: 'save'`: the resolved AST is persisted as the
|
|
28
|
+
* revision's `renderedAst`, so read / view paths reuse it without
|
|
29
|
+
* re-resolving. The caller (`runPipeline`) gates on mode + resolver
|
|
30
|
+
* presence.
|
|
31
|
+
*/
|
|
32
|
+
/** Batch existence resolver: maps a username list to the subset that exists. */
|
|
33
|
+
export type MentionUsernameResolver = (usernames: string[]) => Promise<Set<string>>;
|
|
34
|
+
/**
|
|
35
|
+
* Build the async post-processor. Returns a function that walks the
|
|
36
|
+
* transformed mdast tree, finds mention link nodes, and rewrites the
|
|
37
|
+
* unknown-user ones in-place into plain text nodes.
|
|
38
|
+
*/
|
|
39
|
+
export declare const makeMentionResolve: (resolver: MentionUsernameResolver) => (tree: Root) => Promise<void>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeMentionResolve = void 0;
|
|
4
|
+
const _mdast_walk_1 = require("./_mdast-walk");
|
|
5
|
+
/**
|
|
6
|
+
* Build the async post-processor. Returns a function that walks the
|
|
7
|
+
* transformed mdast tree, finds mention link nodes, and rewrites the
|
|
8
|
+
* unknown-user ones in-place into plain text nodes.
|
|
9
|
+
*/
|
|
10
|
+
const makeMentionResolve = (resolver) => async (tree) => {
|
|
11
|
+
const matches = collectMentionLinks(tree);
|
|
12
|
+
if (matches.length === 0)
|
|
13
|
+
return;
|
|
14
|
+
const distinctUsernames = [...new Set(matches.map((m) => m.username))];
|
|
15
|
+
const existing = await resolver(distinctUsernames);
|
|
16
|
+
// Demote unknown-user mention links to plain text in-place. Indices
|
|
17
|
+
// stay valid because a link node is swapped for exactly one text
|
|
18
|
+
// node (1:1 replacement, no splice).
|
|
19
|
+
for (const match of matches) {
|
|
20
|
+
if (existing.has(match.username))
|
|
21
|
+
continue;
|
|
22
|
+
const textNode = { type: 'text', value: `@${match.username}` };
|
|
23
|
+
match.parent.children[match.index] = textNode;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.makeMentionResolve = makeMentionResolve;
|
|
27
|
+
/**
|
|
28
|
+
* Collect every mention link node (a `link` with
|
|
29
|
+
* `data.hProperties.className === 'mention'`) together with its parent +
|
|
30
|
+
* index so the rewrite can swap it without re-walking the tree.
|
|
31
|
+
*/
|
|
32
|
+
function collectMentionLinks(tree) {
|
|
33
|
+
const out = [];
|
|
34
|
+
(0, _mdast_walk_1.walkPhrasingTree)(tree, (node) => {
|
|
35
|
+
const children = node.children;
|
|
36
|
+
if (!children)
|
|
37
|
+
return;
|
|
38
|
+
for (let i = 0; i < children.length; i++) {
|
|
39
|
+
const child = children[i];
|
|
40
|
+
if (!isMentionLink(child))
|
|
41
|
+
continue;
|
|
42
|
+
const username = mentionUsername(child);
|
|
43
|
+
if (username === null)
|
|
44
|
+
continue;
|
|
45
|
+
out.push({ parent: { children }, index: i, username });
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
return out;
|
|
49
|
+
}
|
|
50
|
+
function isMentionLink(node) {
|
|
51
|
+
if (node.type !== 'link')
|
|
52
|
+
return false;
|
|
53
|
+
// `mdast`'s `LinkData` does not declare `hProperties`, but the
|
|
54
|
+
// headings / wikilinks / mentions core transforms stamp it (it is the
|
|
55
|
+
// `mdast-util-to-hast` channel for HTML props). Read it through a
|
|
56
|
+
// narrowed view.
|
|
57
|
+
const data = node.data;
|
|
58
|
+
return data?.hProperties?.className === 'mention';
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Recover the username from a mention link. `remarkMentions` builds the
|
|
62
|
+
* link's single child as `text` with value `@username`; we strip the
|
|
63
|
+
* leading `@`. Returns `null` for an unexpected shape (defensive — leaves
|
|
64
|
+
* the node as a link).
|
|
65
|
+
*/
|
|
66
|
+
function mentionUsername(link) {
|
|
67
|
+
const child = link.children[0];
|
|
68
|
+
if (!child || child.type !== 'text')
|
|
69
|
+
return null;
|
|
70
|
+
const value = child.value;
|
|
71
|
+
if (!value.startsWith('@'))
|
|
72
|
+
return null;
|
|
73
|
+
return value.slice(1);
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=mention-resolve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mention-resolve.js","sourceRoot":"","sources":["../../../src/renderer/core/mention-resolve.ts"],"names":[],"mappings":";;;AACA,+CAAsE;AA6CtE;;;;GAIG;AACI,MAAM,kBAAkB,GAC7B,CAAC,QAAiC,EAAE,EAAE,CACtC,KAAK,EAAE,IAAU,EAAiB,EAAE;IAClC,MAAM,OAAO,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC1C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAEjC,MAAM,iBAAiB,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACvE,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAEnD,oEAAoE;IACpE,iEAAiE;IACjE,qCAAqC;IACrC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC;YAAE,SAAS;QAC3C,MAAM,QAAQ,GAAS,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;QACrE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC;IAChD,CAAC;AACH,CAAC,CAAC;AAjBS,QAAA,kBAAkB,sBAiB3B;AAEJ;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,IAAU;IACrC,MAAM,GAAG,GAAuB,EAAE,CAAC;IACnC,IAAA,8BAAgB,EAAC,IAAsB,EAAE,CAAC,IAAI,EAAE,EAAE;QAChD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;gBAAE,SAAS;YACpC,MAAM,QAAQ,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;YACxC,IAAI,QAAQ,KAAK,IAAI;gBAAE,SAAS;YAChC,GAAG,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QACzD,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,aAAa,CAAC,IAAqB;IAC1C,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,KAAK,CAAC;IACvC,+DAA+D;IAC/D,sEAAsE;IACtE,kEAAkE;IAClE,iBAAiB;IACjB,MAAM,IAAI,GAAG,IAAI,CAAC,IAA6D,CAAC;IAChF,OAAO,IAAI,EAAE,WAAW,EAAE,SAAS,KAAK,SAAS,CAAC;AACpD,CAAC;AAED;;;;;GAKG;AACH,SAAS,eAAe,CAAC,IAAU;IACjC,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC/B,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IACjD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IAC1B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACxC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.remarkMentions = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Core renderer transform — detect `@username` inside text nodes,
|
|
6
|
+
* replace each match with a link node (`/user/<username>`), and push
|
|
7
|
+
* the username into `metadata.mentions`.
|
|
8
|
+
*
|
|
9
|
+
* The matcher is intentionally narrow:
|
|
10
|
+
* - username is `[A-Za-z0-9_-]{1,64}`
|
|
11
|
+
* - the `@` must be at start-of-string OR after a non-word char
|
|
12
|
+
* (so `me@example.com` does NOT mention `example`)
|
|
13
|
+
* - text inside `code` / `inlineCode` is skipped
|
|
14
|
+
* - text already inside a `link` is skipped (don't double-link)
|
|
15
|
+
*
|
|
16
|
+
* Phase 2 does NOT verify the user exists — that's left to Phase 3 if
|
|
17
|
+
* we decide to add an existence check at all (open question in spec).
|
|
18
|
+
*/
|
|
19
|
+
// `(^|[^A-Za-z0-9_])@([A-Za-z0-9_-]{1,64})` with the prefix preserved
|
|
20
|
+
// so we can rebuild the leading text accurately.
|
|
21
|
+
const MENTION_RE = /(^|[^A-Za-z0-9_])@([A-Za-z0-9_-]{1,64})/g;
|
|
22
|
+
const remarkMentions = (metadata) => (tree) => {
|
|
23
|
+
walk(tree, /* insideLink */ false);
|
|
24
|
+
function walk(node, insideLink) {
|
|
25
|
+
if (node.type === 'code' || node.type === 'inlineCode')
|
|
26
|
+
return;
|
|
27
|
+
if (Array.isArray(node.children)) {
|
|
28
|
+
const isLinkNow = insideLink || node.type === 'link';
|
|
29
|
+
const replaced = isLinkNow ? node.children : transformChildren(node.children, metadata);
|
|
30
|
+
node.children = replaced;
|
|
31
|
+
for (const child of replaced)
|
|
32
|
+
walk(child, isLinkNow);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.remarkMentions = remarkMentions;
|
|
37
|
+
function transformChildren(children, metadata) {
|
|
38
|
+
const out = [];
|
|
39
|
+
for (const child of children) {
|
|
40
|
+
if (child.type !== 'text') {
|
|
41
|
+
out.push(child);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
out.push(...expandText(child, metadata));
|
|
45
|
+
}
|
|
46
|
+
return out;
|
|
47
|
+
}
|
|
48
|
+
function expandText(textNode, metadata) {
|
|
49
|
+
const value = textNode.value;
|
|
50
|
+
if (!value || !value.includes('@'))
|
|
51
|
+
return [textNode];
|
|
52
|
+
const out = [];
|
|
53
|
+
let lastIndex = 0;
|
|
54
|
+
MENTION_RE.lastIndex = 0;
|
|
55
|
+
for (let m; (m = MENTION_RE.exec(value));) {
|
|
56
|
+
const [matched, prefix, username] = m;
|
|
57
|
+
const start = m.index;
|
|
58
|
+
// The prefix character (if any) is part of the match; emit it
|
|
59
|
+
// as plain text and start the link at `@`.
|
|
60
|
+
const beforeText = value.slice(lastIndex, start) + prefix;
|
|
61
|
+
if (beforeText)
|
|
62
|
+
out.push({ type: 'text', value: beforeText });
|
|
63
|
+
metadata.mentions.push({ username });
|
|
64
|
+
out.push(toMentionLink(username));
|
|
65
|
+
lastIndex = start + matched.length;
|
|
66
|
+
}
|
|
67
|
+
if (lastIndex === 0)
|
|
68
|
+
return [textNode];
|
|
69
|
+
if (lastIndex < value.length) {
|
|
70
|
+
out.push({ type: 'text', value: value.slice(lastIndex) });
|
|
71
|
+
}
|
|
72
|
+
return out;
|
|
73
|
+
}
|
|
74
|
+
function toMentionLink(username) {
|
|
75
|
+
return {
|
|
76
|
+
type: 'link',
|
|
77
|
+
url: `/user/${username}`,
|
|
78
|
+
title: null,
|
|
79
|
+
children: [{ type: 'text', value: `@${username}` }],
|
|
80
|
+
data: { hProperties: { className: 'mention' } },
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=mentions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentions.js","sourceRoot":"","sources":["../../../src/renderer/core/mentions.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;;;;;;GAcG;AAEH,sEAAsE;AACtE,iDAAiD;AACjD,MAAM,UAAU,GAAG,0CAA0C,CAAC;AAEvD,MAAM,cAAc,GAA2B,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE;IAC3E,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAEnC,SAAS,IAAI,CAAC,IAA6C,EAAE,UAAmB;QAC9E,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY;YAAE,OAAO;QAC/D,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACjC,MAAM,SAAS,GAAG,UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC;YACrD,MAAM,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAE,IAAI,CAAC,QAA8B,CAAC,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAA6B,EAAE,QAAQ,CAAC,CAAC;YACpI,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YACzB,KAAK,MAAM,KAAK,IAAI,QAAQ;gBAAE,IAAI,CAAC,KAAgD,EAAE,SAAS,CAAC,CAAC;QAClG,CAAC;IACH,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,cAAc,kBAYzB;AAEF,SAAS,iBAAiB,CAAC,QAA2B,EAAE,QAA0B;IAChF,MAAM,GAAG,GAAsB,EAAE,CAAC;IAClC,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;QAC7B,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YAC1B,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChB,SAAS;QACX,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,KAAa,EAAE,QAAQ,CAAC,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,UAAU,CAAC,QAAc,EAAE,QAA0B;IAC5D,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC;IAC7B,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEtD,MAAM,GAAG,GAAsB,EAAE,CAAC;IAClC,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,UAAU,CAAC,SAAS,GAAG,CAAC,CAAC;IACzB,KAAK,IAAI,CAAyB,EAAE,CAAC,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAI,CAAC;QACnE,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;QACtC,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;QACtB,8DAA8D;QAC9D,2CAA2C;QAC3C,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG,MAAM,CAAC;QAC1D,IAAI,UAAU;YAAE,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;QAE9D,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QACrC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;QAClC,SAAS,GAAG,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IACrC,CAAC;IACD,IAAI,SAAS,KAAK,CAAC;QAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IACvC,IAAI,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QAC7B,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,aAAa,CAAC,QAAgB;IACrC,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,SAAS,QAAQ,EAAE;QACxB,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,QAAQ,EAAE,EAAE,CAAC;QACnD,IAAI,EAAE,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE;KAChD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { PipelineEsmDeps } from '../pipeline';
|
|
2
|
+
import type { UnifiedTransformPlugin } from './headings';
|
|
3
|
+
/**
|
|
4
|
+
* Core renderer transform — replace fenced code-block (`code`) nodes
|
|
5
|
+
* with `html` nodes carrying shiki-rendered `<pre><code>...</code></pre>`
|
|
6
|
+
* markup. Inline code (`inlineCode`) is intentionally left alone so the
|
|
7
|
+
* web `components.code` path keeps owning inline rendering.
|
|
8
|
+
*
|
|
9
|
+
* Behaviour for fence languages:
|
|
10
|
+
* - shiki-supported lang → replace with `html` node (shiki output)
|
|
11
|
+
* - missing or unknown lang → leave the `code` node intact, web side
|
|
12
|
+
* falls back to `<pre><code class="language-x">` rendering
|
|
13
|
+
*
|
|
14
|
+
* The factory takes `deps` because shiki itself is ESM-only and is
|
|
15
|
+
* loaded via the same jiti mechanism as unified / remark-* / slugger.
|
|
16
|
+
* Sequencing-wise this plugin runs AFTER `remarkCodeBlockLanguages`
|
|
17
|
+
* (the lang-aggregator) so the pure-observer pass sees the still-mdast
|
|
18
|
+
* `code` nodes; once we replace them with `html` nodes the aggregator
|
|
19
|
+
* would no longer find them.
|
|
20
|
+
*/
|
|
21
|
+
export declare const makeRemarkSyntaxHighlight: (deps: PipelineEsmDeps) => UnifiedTransformPlugin;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeRemarkSyntaxHighlight = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Core renderer transform — replace fenced code-block (`code`) nodes
|
|
6
|
+
* with `html` nodes carrying shiki-rendered `<pre><code>...</code></pre>`
|
|
7
|
+
* markup. Inline code (`inlineCode`) is intentionally left alone so the
|
|
8
|
+
* web `components.code` path keeps owning inline rendering.
|
|
9
|
+
*
|
|
10
|
+
* Behaviour for fence languages:
|
|
11
|
+
* - shiki-supported lang → replace with `html` node (shiki output)
|
|
12
|
+
* - missing or unknown lang → leave the `code` node intact, web side
|
|
13
|
+
* falls back to `<pre><code class="language-x">` rendering
|
|
14
|
+
*
|
|
15
|
+
* The factory takes `deps` because shiki itself is ESM-only and is
|
|
16
|
+
* loaded via the same jiti mechanism as unified / remark-* / slugger.
|
|
17
|
+
* Sequencing-wise this plugin runs AFTER `remarkCodeBlockLanguages`
|
|
18
|
+
* (the lang-aggregator) so the pure-observer pass sees the still-mdast
|
|
19
|
+
* `code` nodes; once we replace them with `html` nodes the aggregator
|
|
20
|
+
* would no longer find them.
|
|
21
|
+
*/
|
|
22
|
+
const makeRemarkSyntaxHighlight = (deps) => (_metadata) => (tree) => {
|
|
23
|
+
const highlighter = deps.shikiHighlighter;
|
|
24
|
+
walk(tree, highlighter);
|
|
25
|
+
};
|
|
26
|
+
exports.makeRemarkSyntaxHighlight = makeRemarkSyntaxHighlight;
|
|
27
|
+
function walk(node, highlighter) {
|
|
28
|
+
if (!Array.isArray(node.children))
|
|
29
|
+
return;
|
|
30
|
+
// Replace child code-nodes in place — inline (`inlineCode`) is not in
|
|
31
|
+
// the iterated parent's child list as a fence anyway, but we also
|
|
32
|
+
// gate on `type === 'code'` to be defensive.
|
|
33
|
+
for (let i = 0; i < node.children.length; i++) {
|
|
34
|
+
const child = node.children[i];
|
|
35
|
+
if (child.type === 'code') {
|
|
36
|
+
const replacement = renderCode(child, highlighter);
|
|
37
|
+
if (replacement) {
|
|
38
|
+
node.children[i] = replacement;
|
|
39
|
+
}
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
walk(child, highlighter);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function renderCode(code, highlighter) {
|
|
46
|
+
const lang = (code.lang ?? '').trim();
|
|
47
|
+
if (!lang)
|
|
48
|
+
return null; // no language → web-side plain fallback
|
|
49
|
+
if (!highlighter.hasLang(lang))
|
|
50
|
+
return null; // unknown → fallback path
|
|
51
|
+
const value = code.value ?? '';
|
|
52
|
+
// shiki output is escaped + wrapped in `<pre class="shiki ..."><code>`;
|
|
53
|
+
// the `<pre>` carries inline `style="background-color: ..."` for the
|
|
54
|
+
// bundled theme. We persist this verbatim on the AST as an `html` node.
|
|
55
|
+
let html;
|
|
56
|
+
try {
|
|
57
|
+
html = highlighter.codeToHtml(value, lang);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return null; // shiki internal error → fallback path
|
|
61
|
+
}
|
|
62
|
+
return { type: 'html', value: html };
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=syntax-highlight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syntax-highlight.js","sourceRoot":"","sources":["../../../src/renderer/core/syntax-highlight.ts"],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,yBAAyB,GACpC,CAAC,IAAqB,EAA0B,EAAE,CAClD,CAAC,SAA2B,EAAE,EAAE,CAChC,CAAC,IAAU,EAAQ,EAAE;IACnB,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC;IAC1C,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;AAC1B,CAAC,CAAC;AANS,QAAA,yBAAyB,6BAMlC;AAOJ,SAAS,IAAI,CAAC,IAAmB,EAAE,WAA6B;IAC9D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;QAAE,OAAO;IAC1C,sEAAsE;IACtE,kEAAkE;IAClE,6CAA6C;IAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC/B,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YAC1B,MAAM,WAAW,GAAG,UAAU,CAAC,KAAa,EAAE,WAAW,CAAC,CAAC;YAC3D,IAAI,WAAW,EAAE,CAAC;gBAChB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC;YACjC,CAAC;YACD,SAAS;QACX,CAAC;QACD,IAAI,CAAC,KAAiC,EAAE,WAAW,CAAC,CAAC;IACvD,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,IAAU,EAAE,WAA6B;IAC3D,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACtC,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC,CAAC,wCAAwC;IAChE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,CAAC,0BAA0B;IACvE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;IAC/B,wEAAwE;IACxE,qEAAqE;IACrE,wEAAwE;IACxE,IAAI,IAAY,CAAC;IACjB,IAAI,CAAC;QACH,IAAI,GAAG,WAAW,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC,CAAC,uCAAuC;IACtD,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Root } from 'mdast';
|
|
2
|
+
import type { RenderContext } from '@crowi/plugin-api';
|
|
3
|
+
import { type MongoCacheStorage } from '../cache';
|
|
4
|
+
import { type RendererRegistryImpl } from '../registry';
|
|
5
|
+
export interface UrlExpandDispatchDeps {
|
|
6
|
+
cache: MongoCacheStorage;
|
|
7
|
+
pageId: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const makeUrlInlineExpandDispatch: (registry: RendererRegistryImpl, ctx: RenderContext, deps: UrlExpandDispatchDeps) => (tree: Root) => Promise<void>;
|