@jant/core 1.0.0 → 1.0.1
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/README.md +11 -13
- package/bin/commands/assets/prepare.js +3 -3
- package/bin/commands/assets/upload.js +192 -15
- package/bin/commands/db/execute-file.js +12 -4
- package/bin/commands/db/export.js +115 -2
- package/bin/commands/db/rehearse.js +2 -2
- package/bin/commands/deploy.js +190 -3
- package/bin/commands/migrate.js +91 -69
- package/bin/commands/posts/rebuild-html.js +184 -0
- package/bin/commands/reset-password.js +30 -17
- package/bin/commands/search/reindex.js +175 -0
- package/bin/commands/setup.js +138 -0
- package/bin/commands/site/export.js +146 -285
- package/bin/commands/site/import.js +3164 -2
- package/bin/commands/site/pull-media.js +5 -8
- package/bin/commands/site/snapshot/export.js +79 -106
- package/bin/commands/site/snapshot/import.js +141 -84
- package/bin/commands/start.js +72 -1
- package/bin/commands/telegram/register-webhooks.js +124 -0
- package/bin/commands/uploads/cleanup.js +48 -7
- package/bin/jant.js +91 -33
- package/bin/lib/cloudflare-setup.js +499 -0
- package/bin/lib/command-registry.js +120 -0
- package/bin/lib/d1-query.js +139 -22
- package/bin/lib/hugo-markdown.js +106 -0
- package/bin/lib/import-sources.js +151 -0
- package/bin/lib/migration-artifacts.js +19 -0
- package/bin/lib/migration-rehearsal.js +27 -0
- package/bin/lib/migration-runner.js +29 -7
- package/bin/lib/node-database.js +32 -0
- package/bin/lib/node-env.js +141 -0
- package/bin/lib/r2-query.js +2 -2
- package/bin/lib/renamed-arguments.js +56 -0
- package/bin/lib/runtime-target.js +64 -0
- package/bin/lib/site-pull-media.js +78 -36
- package/bin/lib/site-selection.js +98 -73
- package/bin/lib/site-snapshot.js +968 -86
- package/bin/lib/sql-export.js +154 -18
- package/bin/lib/thread-collection-migration.js +326 -0
- package/bin/lib/wrangler-cli.js +37 -2
- package/bin/lib/wrangler-json.js +35 -0
- package/bin/lib/zip-archive.js +187 -0
- package/dist/app-Gt7_skt6.js +114115 -0
- package/dist/client/.vite/manifest.json +255 -90
- package/dist/client/_assets/chunks/confirm-D7GrwsCN.js +45 -0
- package/dist/client/_assets/chunks/create-editor-5Y49x7h5.js +261 -0
- package/dist/client/_assets/chunks/emoji-mart-C4RpRKcU.js +716 -0
- package/dist/client/_assets/chunks/footnote-rail-BJwswtVQ.js +1 -0
- package/dist/client/_assets/chunks/heic-to-CuP2Qlsw.js +1 -0
- package/dist/client/_assets/chunks/jant-locale-picker-DL6mIOT5.js +69 -0
- package/dist/client/_assets/chunks/lit-DW8VmJAT.js +2 -0
- package/dist/client/_assets/chunks/mediabunny-DRaCQ1r-.js +31 -0
- package/dist/client/_assets/chunks/rolldown-runtime-hePW80VL.js +1 -0
- package/dist/client/_assets/chunks/settings-paths-h6RjIe3C.js +84 -0
- package/dist/client/_assets/chunks/site-header-nav-DzXsFk05.js +1 -0
- package/dist/client/_assets/chunks/slug-format-Dsi0e9Xn.js +1 -0
- package/dist/client/_assets/chunks/slugify-DlHLyUHS.js +1 -0
- package/dist/client/_assets/chunks/sortable-list-DWNKv782.js +2 -0
- package/dist/client/_assets/chunks/types-D5iF3H1a.js +1 -0
- package/dist/client/_assets/chunks/unsafe-html-B5ZEXaxg.js +1 -0
- package/dist/client/_assets/chunks/unsafe-svg-DTZZEvLU.js +2 -0
- package/dist/client/_assets/client-BaqmpPQ-.css +2 -0
- package/dist/client/_assets/client-C6melOtG.js +296 -0
- package/dist/client/_assets/client-auth-Ccq8kSqq.js +828 -0
- package/dist/client/_assets/client-author-CGVvrNZ8.css +2 -0
- package/dist/client/_assets/client-compose-oxzPb3SS.js +2004 -0
- package/dist/client/_assets/client-manage-C1eDB1Rc.js +2170 -0
- package/dist/client/_assets/client-settings-DIM44Zqh.js +1112 -0
- package/dist/constants-DEgyqWDl.js +767 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +26 -80
- package/dist/node.js +185 -22
- package/package.json +55 -50
- package/src/app.tsx +204 -132
- package/src/auth.ts +18 -1
- package/src/client/archive-nav.js +2 -1
- package/src/client/audio-player.ts +7 -3
- package/src/client/audio-processor.ts +24 -15
- package/src/client/audio-waveform.ts +49 -0
- package/src/client/avatar-upload.ts +10 -10
- package/src/client/collection-dialog-host.ts +72 -0
- package/src/client/collection-navigation.ts +79 -0
- package/src/client/collection-page-actions.ts +83 -1
- package/src/client/components/collection-dialog-types.ts +49 -0
- package/src/client/components/collection-manager-types.ts +41 -6
- package/src/client/components/collection-types.ts +1 -15
- package/src/client/components/compose-format-convert.ts +259 -0
- package/src/client/components/compose-title-from-heading.ts +66 -0
- package/src/client/components/compose-types.ts +162 -2
- package/src/client/components/inline-image-issues.ts +17 -0
- package/src/client/components/jant-collection-dialog.ts +722 -0
- package/src/client/components/jant-collection-directory.ts +673 -175
- package/src/client/components/jant-collection-form.ts +54 -232
- package/src/client/components/jant-command-palette.ts +235 -78
- package/src/client/components/jant-compose-dialog.ts +3084 -1210
- package/src/client/components/jant-compose-editor.ts +1277 -422
- package/src/client/components/jant-compose-fullscreen.ts +81 -50
- package/src/client/components/jant-config-editor.ts +732 -0
- package/src/client/components/jant-confirm-dialog.ts +13 -11
- package/src/client/components/jant-locale-picker.ts +418 -0
- package/src/client/components/jant-media-lightbox.ts +376 -131
- package/src/client/components/jant-nav-manager.ts +2260 -473
- package/src/client/components/jant-post-menu.ts +1237 -330
- package/src/client/components/jant-post-picker.ts +324 -0
- package/src/client/components/jant-repo-picker-types.ts +6 -1
- package/src/client/components/jant-repo-picker.ts +140 -108
- package/src/client/components/jant-settings-avatar.ts +31 -27
- package/src/client/components/jant-settings-general.ts +659 -330
- package/src/client/components/jant-settings-language.ts +1087 -0
- package/src/client/components/jant-smart-collection-dialog.ts +1018 -0
- package/src/client/components/jant-text-preview.ts +117 -115
- package/src/client/components/nav-manager-types.ts +128 -13
- package/src/client/components/settings-types.ts +46 -20
- package/src/client/components/smart-collection-conditions.ts +285 -0
- package/src/client/components/smart-collection-dialog-types.ts +68 -0
- package/src/client/compose-bridge.ts +465 -255
- package/src/client/compose-launch.ts +119 -17
- package/src/client/compose-shortcuts.ts +53 -8
- package/src/client/compose-triggers.ts +50 -0
- package/src/client/copy-field.ts +108 -0
- package/src/client/custom-url-menu.ts +60 -4
- package/src/client/feed-video-player.ts +63 -3
- package/src/client/footnote-rail.ts +478 -0
- package/src/client/hydrate-partial.ts +27 -0
- package/src/client/icons.ts +13 -0
- package/src/client/image-plan.ts +165 -0
- package/src/client/image-processor.ts +223 -86
- package/src/client/image-worker-client.ts +45 -0
- package/src/client/image-worker.ts +135 -0
- package/src/client/json.ts +56 -2
- package/src/client/lazy-entries.ts +95 -0
- package/src/client/lazy-slugify.ts +2 -2
- package/src/client/media-lightbox-events.ts +63 -0
- package/src/client/media-scroll-hint.ts +103 -9
- package/src/client/mediabunny.ts +29 -0
- package/src/client/note-expand.ts +63 -0
- package/src/client/palette-search-trigger.ts +35 -0
- package/src/client/post-picker.ts +41 -0
- package/src/client/post-refresh.ts +135 -0
- package/src/client/random-uuid.ts +23 -0
- package/src/client/runtime-paths.ts +74 -1
- package/src/client/settings-bridge.ts +4 -7
- package/src/client/site-header-fragment.ts +38 -0
- package/src/client/site-header-nav.d.ts +1 -0
- package/src/client/site-header-nav.js +122 -52
- package/src/client/slash-discovery-bridge.ts +9 -0
- package/src/client/slash-discovery.ts +200 -0
- package/src/client/smart-collection-dialog-host.ts +116 -0
- package/src/client/smart-collection-page-actions.ts +208 -0
- package/src/client/thread-context.ts +115 -110
- package/src/client/tiptap/bubble-menu.ts +173 -46
- package/src/client/tiptap/continuous-lists.ts +102 -0
- package/src/client/tiptap/create-editor.ts +13 -0
- package/src/client/tiptap/extensions.ts +30 -16
- package/src/client/tiptap/floating-position.ts +216 -2
- package/src/client/tiptap/footnotes.ts +156 -0
- package/src/client/tiptap/image-input-rules.ts +48 -0
- package/src/client/tiptap/image-node.ts +189 -7
- package/src/client/tiptap/inline-image-upload.ts +180 -52
- package/src/client/tiptap/insert-paragraph-around.ts +79 -0
- package/src/client/tiptap/link-input-rules.ts +4 -4
- package/src/client/tiptap/link-toolbar.ts +85 -31
- package/src/client/tiptap/markdown-clipboard.ts +663 -13
- package/src/client/tiptap/paste-media.ts +49 -33
- package/src/client/tiptap/rehost-images.ts +108 -0
- package/src/client/tiptap/slash-commands.ts +13 -1
- package/src/client/tiptap/structural-keymap.ts +322 -0
- package/src/client/tiptap/tab-indent.ts +8 -22
- package/src/client/tiptap/table-control-labels.ts +30 -0
- package/src/client/tiptap/table-controls.ts +537 -0
- package/src/client/tiptap/table-size-picker.ts +254 -0
- package/src/client/tiptap/toolbar-mode.ts +0 -43
- package/src/client/toast.ts +156 -22
- package/src/client/types/vite-worker.d.ts +12 -0
- package/src/client/upload-session.ts +99 -44
- package/src/client/upload-with-metadata.ts +3 -13
- package/src/client/video-processor.ts +360 -107
- package/src/client-auth.ts +15 -30
- package/src/client-compose.ts +19 -0
- package/src/client-manage.ts +13 -0
- package/src/client-settings.ts +14 -0
- package/src/client-site.ts +10 -3
- package/src/client.ts +9 -0
- package/src/db/backfills/0004_register_apple_touch_media_rows.sql +65 -0
- package/src/db/backfills/0005_split_thread_activity_from_quiet_replies.sql +68 -0
- package/src/db/backfills/0006_clear_mirrored_page_nav_labels.sql +31 -0
- package/src/db/backfills/0007_restore_external_redirect_scheme.sql +20 -0
- package/src/db/backfills/0008_turn_off_featured_only_discover.sql +11 -0
- package/src/db/migration-status.ts +92 -0
- package/src/db/migrations/0018_yummy_franklin_richards.sql +6 -0
- package/src/db/migrations/0019_bored_magus.sql +2 -0
- package/src/db/migrations/0020_free_zaladane.sql +1 -0
- package/src/db/migrations/0021_thankful_phalanx.sql +16 -0
- package/src/db/migrations/0022_old_gressill.sql +24 -0
- package/src/db/migrations/0023_broad_terror.sql +20 -0
- package/src/db/migrations/0024_red_the_twelve.sql +3 -0
- package/src/db/migrations/0025_exotic_wendell_rand.sql +1 -0
- package/src/db/migrations/0026_absent_rhodey.sql +14 -0
- package/src/db/migrations/0027_old_blue_blade.sql +39 -0
- package/src/db/migrations/0028_superb_post.sql +2 -0
- package/src/db/migrations/0029_boring_magma.sql +1 -0
- package/src/db/migrations/0030_typical_vivisector.sql +50 -0
- package/src/db/migrations/0031_many_ego.sql +3 -0
- package/src/db/migrations/0032_married_tomas.sql +3 -0
- package/src/db/migrations/0033_busy_johnny_storm.sql +198 -0
- package/src/db/migrations/0034_cheerful_rumiko_fujikawa.sql +35 -0
- package/src/db/migrations/meta/0018_snapshot.json +2225 -0
- package/src/db/migrations/meta/0019_snapshot.json +2238 -0
- package/src/db/migrations/meta/0020_snapshot.json +2129 -0
- package/src/db/migrations/meta/0021_snapshot.json +2121 -0
- package/src/db/migrations/meta/0022_snapshot.json +2267 -0
- package/src/db/migrations/meta/0023_snapshot.json +2396 -0
- package/src/db/migrations/meta/0024_snapshot.json +2417 -0
- package/src/db/migrations/meta/0025_snapshot.json +2424 -0
- package/src/db/migrations/meta/0026_snapshot.json +2511 -0
- package/src/db/migrations/meta/0027_snapshot.json +2511 -0
- package/src/db/migrations/meta/0028_snapshot.json +2511 -0
- package/src/db/migrations/meta/0029_snapshot.json +2519 -0
- package/src/db/migrations/meta/0030_snapshot.json +2541 -0
- package/src/db/migrations/meta/0031_snapshot.json +2562 -0
- package/src/db/migrations/meta/0032_snapshot.json +2582 -0
- package/src/db/migrations/meta/0033_snapshot.json +2816 -0
- package/src/db/migrations/meta/0034_snapshot.json +2816 -0
- package/src/db/migrations/meta/_journal.json +120 -1
- package/src/db/migrations/pg/0016_familiar_lionheart.sql +6 -0
- package/src/db/migrations/pg/0017_bright_beyonder.sql +2 -0
- package/src/db/migrations/pg/0018_red_warlock.sql +1 -0
- package/src/db/migrations/pg/0019_gray_natasha_romanoff.sql +20 -0
- package/src/db/migrations/pg/0020_bizarre_smasher.sql +24 -0
- package/src/db/migrations/pg/0021_sharp_puppet_master.sql +20 -0
- package/src/db/migrations/pg/0022_blushing_blue_shield.sql +3 -0
- package/src/db/migrations/pg/0023_organic_zemo.sql +1 -0
- package/src/db/migrations/pg/0024_high_violations.sql +14 -0
- package/src/db/migrations/pg/0025_moaning_epoch.sql +39 -0
- package/src/db/migrations/pg/0026_talented_killer_shrike.sql +2 -0
- package/src/db/migrations/pg/0027_short_cannonball.sql +1 -0
- package/src/db/migrations/pg/0028_perfect_sharon_carter.sql +27 -0
- package/src/db/migrations/pg/0029_rare_hairball.sql +3 -0
- package/src/db/migrations/pg/0030_abandoned_nighthawk.sql +3 -0
- package/src/db/migrations/pg/0031_strong_ultimatum.sql +128 -0
- package/src/db/migrations/pg/0032_furry_multiple_man.sql +6 -0
- package/src/db/migrations/pg/meta/0016_snapshot.json +2840 -0
- package/src/db/migrations/pg/meta/0017_snapshot.json +2862 -0
- package/src/db/migrations/pg/meta/0018_snapshot.json +2739 -0
- package/src/db/migrations/pg/meta/0019_snapshot.json +2718 -0
- package/src/db/migrations/pg/meta/0020_snapshot.json +2904 -0
- package/src/db/migrations/pg/meta/0021_snapshot.json +3060 -0
- package/src/db/migrations/pg/meta/0022_snapshot.json +3078 -0
- package/src/db/migrations/pg/meta/0023_snapshot.json +3084 -0
- package/src/db/migrations/pg/meta/0024_snapshot.json +3204 -0
- package/src/db/migrations/pg/meta/0025_snapshot.json +3204 -0
- package/src/db/migrations/pg/meta/0026_snapshot.json +3204 -0
- package/src/db/migrations/pg/meta/0027_snapshot.json +3211 -0
- package/src/db/migrations/pg/meta/0028_snapshot.json +3248 -0
- package/src/db/migrations/pg/meta/0029_snapshot.json +3289 -0
- package/src/db/migrations/pg/meta/0030_snapshot.json +3329 -0
- package/src/db/migrations/pg/meta/0031_snapshot.json +3660 -0
- package/src/db/migrations/pg/meta/0032_snapshot.json +3660 -0
- package/src/db/migrations/pg/meta/_journal.json +120 -1
- package/src/db/pg/node.ts +30 -0
- package/src/db/pg/schema.ts +399 -100
- package/src/db/post-visibility.ts +117 -0
- package/src/db/rehearsal-fixtures/pg-v0.3.39.json +159 -0
- package/src/db/rehearsal-fixtures/pg-v0.3.39.sql +78 -0
- package/src/db/rehearsal-fixtures/pinned-reply-memberships.json +60 -0
- package/src/db/rehearsal-fixtures/pinned-reply-memberships.sql +304 -0
- package/src/db/rehearsal-fixtures/v0.3.39.json +170 -0
- package/src/db/rehearsal-fixtures/v0.3.39.sql +78 -0
- package/src/db/schema.ts +437 -103
- package/src/db/thread-activity.ts +101 -0
- package/src/i18n/context.tsx +12 -2
- package/src/i18n/coverage.generated.ts +17 -0
- package/src/i18n/detect.ts +18 -68
- package/src/i18n/i18n.ts +18 -2
- package/src/i18n/index.ts +3 -0
- package/src/i18n/locales/glossary.zh-Hans.yml +44 -4
- package/src/i18n/locales/glossary.zh-Hant.yml +44 -4
- package/src/i18n/locales/public/en.po +832 -259
- package/src/i18n/locales/public/en.ts +1 -1
- package/src/i18n/locales/public/zh-Hans.po +818 -244
- package/src/i18n/locales/public/zh-Hans.ts +1 -1
- package/src/i18n/locales/public/zh-Hant.po +818 -244
- package/src/i18n/locales/public/zh-Hant.ts +1 -1
- package/src/i18n/locales/settings/en.po +1537 -104
- package/src/i18n/locales/settings/en.ts +1 -1
- package/src/i18n/locales/settings/zh-Hans.po +1585 -152
- package/src/i18n/locales/settings/zh-Hans.ts +1 -1
- package/src/i18n/locales/settings/zh-Hant.po +1588 -155
- package/src/i18n/locales/settings/zh-Hant.ts +1 -1
- package/src/i18n/locales.ts +178 -2
- package/src/i18n/middleware.ts +45 -17
- package/src/i18n/supported-locales.ts +234 -0
- package/src/index.ts +46 -80
- package/src/lib/address.ts +57 -0
- package/src/lib/api-collections.ts +173 -0
- package/src/lib/api-custom-urls.ts +44 -0
- package/src/lib/api-media.ts +66 -15
- package/src/lib/api-nav-items.ts +62 -0
- package/src/lib/api-post-input.ts +156 -0
- package/src/lib/api-posts.ts +343 -39
- package/src/lib/api-public-posts.ts +243 -0
- package/src/lib/api-search.ts +53 -2
- package/src/lib/api-settings.ts +387 -55
- package/src/lib/api-threads.ts +230 -0
- package/src/lib/asset-path.ts +98 -1
- package/src/lib/build-env.ts +16 -0
- package/src/lib/collection-groups.ts +5 -1
- package/src/lib/collection-paths.ts +3 -10
- package/src/lib/collection-sort.ts +78 -5
- package/src/lib/constants.ts +74 -3
- package/src/lib/copy-field.ts +36 -0
- package/src/lib/crypto.ts +40 -0
- package/src/lib/csp-builder.ts +30 -11
- package/src/lib/deferred.ts +79 -0
- package/src/lib/discover-ping.ts +141 -0
- package/src/lib/discover.ts +457 -0
- package/src/lib/env-values.ts +140 -0
- package/src/lib/env.ts +381 -11
- package/src/lib/errors.ts +33 -7
- package/src/lib/feed-path.ts +31 -0
- package/src/lib/feed-policy.ts +401 -0
- package/src/lib/feed.ts +1311 -66
- package/src/lib/filter-dimensions.ts +1356 -0
- package/src/lib/footnotes.ts +264 -0
- package/src/lib/github-sync-repo-name.ts +45 -0
- package/src/lib/github-sync-site-config.ts +10 -4
- package/src/lib/github-sync-status.tsx +87 -0
- package/src/lib/github-sync-trigger.ts +7 -51
- package/src/lib/hosted-domain-check.ts +21 -80
- package/src/lib/hosted-domain.ts +1 -1
- package/src/lib/hosted-signin.ts +10 -4
- package/src/lib/http-cache.ts +148 -0
- package/src/lib/hugo-markdown.ts +83 -10
- package/src/lib/icons.ts +126 -20
- package/src/lib/ids.ts +138 -8
- package/src/lib/image-dimensions.ts +258 -0
- package/src/lib/image.ts +17 -4
- package/src/lib/jant-branding.ts +1 -0
- package/src/lib/jant-docs.ts +42 -0
- package/src/lib/lang-detect.ts +308 -0
- package/src/lib/link-preview.ts +25 -0
- package/src/lib/markdown-manager.ts +598 -11
- package/src/lib/markdown.ts +10 -3
- package/src/lib/media-helpers.ts +13 -1
- package/src/lib/mp4-track-flags.ts +71 -0
- package/src/lib/navigation.ts +103 -37
- package/src/lib/pagination.ts +28 -24
- package/src/lib/per-language-surfaces.ts +67 -0
- package/src/lib/post-body-html.ts +138 -0
- package/src/lib/post-display.ts +147 -21
- package/src/lib/post-list-cursor.ts +221 -0
- package/src/lib/post-meta.ts +39 -2
- package/src/lib/public-storage.ts +43 -0
- package/src/lib/rate-limit-d1.ts +99 -0
- package/src/lib/rate-limit-memory.ts +105 -0
- package/src/lib/rate-limit.ts +136 -0
- package/src/lib/render.tsx +104 -4
- package/src/lib/resolve-config.ts +233 -30
- package/src/lib/schemas.ts +681 -193
- package/src/lib/settings-paths.ts +5 -0
- package/src/lib/site-header-fragment.tsx +38 -0
- package/src/lib/site-skill.ts +78 -0
- package/src/lib/site-unavailable-page.ts +47 -0
- package/src/lib/slug.ts +51 -7
- package/src/lib/slugify.ts +118 -0
- package/src/lib/sse.ts +1 -1
- package/src/lib/startup-config.ts +77 -13
- package/src/lib/storage.ts +26 -0
- package/src/lib/structured-data.ts +113 -0
- package/src/lib/summary.ts +150 -15
- package/src/lib/telegram-entities.ts +240 -0
- package/src/lib/telegram-pool-webhooks.ts +86 -0
- package/src/lib/telegram-settings-status.tsx +109 -0
- package/src/lib/telegram.ts +363 -0
- package/src/lib/theme.ts +34 -26
- package/src/lib/thread-fold.ts +209 -0
- package/src/lib/thread-query.ts +171 -0
- package/src/lib/time.ts +169 -17
- package/src/lib/timeline.ts +237 -145
- package/src/lib/timezones.ts +54 -14
- package/src/lib/tiptap-render.ts +357 -78
- package/src/lib/tiptap-to-markdown.ts +13 -7
- package/src/lib/translit.ts +288 -0
- package/src/lib/upload.ts +142 -14
- package/src/lib/url-fetch.ts +364 -0
- package/src/lib/url.ts +391 -21
- package/src/lib/version.ts +10 -8
- package/src/lib/view-language.ts +436 -0
- package/src/lib/view.ts +206 -75
- package/src/lib/viewer-context.ts +62 -0
- package/src/lib/worker-response-cache.ts +11 -18
- package/src/middleware/auth.ts +133 -46
- package/src/middleware/cache-control.ts +125 -0
- package/src/middleware/config.ts +51 -13
- package/src/middleware/cors.ts +4 -4
- package/src/middleware/cross-origin.ts +124 -0
- package/src/middleware/error-handler.ts +52 -3
- package/src/middleware/onboarding.ts +42 -11
- package/src/middleware/public-content-access.ts +39 -0
- package/src/middleware/secure-headers.ts +44 -3
- package/src/middleware/session.ts +124 -0
- package/src/middleware/validate.ts +133 -0
- package/src/node/index.ts +6 -1
- package/src/node/request-handler.ts +139 -8
- package/src/node/runtime.ts +43 -11
- package/src/preset.css +178 -38
- package/src/routes/api/collections.ts +158 -89
- package/src/routes/api/custom-urls.ts +40 -52
- package/src/routes/api/discover.ts +107 -0
- package/src/routes/api/export.ts +9 -5
- package/src/routes/api/github-sync.tsx +102 -137
- package/src/routes/api/internal/post-body-html.ts +43 -0
- package/src/routes/api/internal/search-reindex.ts +40 -0
- package/src/routes/api/internal/sites.ts +196 -17
- package/src/routes/api/internal/uploads.ts +2 -7
- package/src/routes/api/mcp.ts +4 -0
- package/src/routes/api/media.ts +79 -0
- package/src/routes/api/nav-items.ts +181 -64
- package/src/routes/api/posts.ts +282 -241
- package/src/routes/api/public/posts.ts +26 -277
- package/src/routes/api/public/threads.ts +140 -0
- package/src/routes/api/search.ts +34 -35
- package/src/routes/api/settings.ts +191 -109
- package/src/routes/api/smart-collections.ts +177 -0
- package/src/routes/api/telegram.ts +742 -0
- package/src/routes/api/threads.ts +138 -0
- package/src/routes/api/upload.ts +84 -286
- package/src/routes/api/uploads.ts +153 -126
- package/src/routes/auth/dev.ts +5 -7
- package/src/routes/auth/hosted-sso.ts +9 -6
- package/src/routes/auth/setup.tsx +995 -178
- package/src/routes/auth/signin.tsx +134 -13
- package/src/routes/compose.tsx +51 -37
- package/src/routes/dash/custom-urls.tsx +6 -46
- package/src/routes/dash/settings.tsx +1039 -136
- package/src/routes/discover-announce.ts +96 -0
- package/src/routes/feed/feed.ts +192 -189
- package/src/routes/feed/sitemap.ts +291 -34
- package/src/routes/hosted/domain-check.ts +9 -14
- package/src/routes/pages/archive.tsx +621 -388
- package/src/routes/pages/brand.tsx +2 -1
- package/src/routes/pages/collection.tsx +202 -224
- package/src/routes/pages/collections.tsx +42 -46
- package/src/routes/pages/featured.tsx +56 -13
- package/src/routes/pages/home.tsx +53 -49
- package/src/routes/pages/language.tsx +113 -0
- package/src/routes/pages/latest.tsx +42 -50
- package/src/routes/pages/new.tsx +10 -0
- package/src/routes/pages/page.tsx +504 -88
- package/src/routes/pages/partials.tsx +79 -15
- package/src/routes/pages/search.tsx +51 -11
- package/src/routes/pages/smart-collection.tsx +273 -0
- package/src/routes/pages/subscribe.tsx +183 -0
- package/src/routes/pages/theme-sample.tsx +3 -4
- package/src/routes/site-skill.ts +18 -0
- package/src/runtime/cloudflare.ts +47 -14
- package/src/runtime/index.ts +29 -1
- package/src/runtime/node.ts +106 -15
- package/src/runtime/readiness.ts +37 -5
- package/src/runtime/site.ts +97 -25
- package/src/services/about-page.ts +164 -0
- package/src/services/auth.ts +89 -55
- package/src/services/bootstrap.ts +409 -28
- package/src/services/collection-directory-position.ts +76 -0
- package/src/services/collection.ts +659 -252
- package/src/services/custom-url.ts +146 -31
- package/src/services/export-theme/assets/client-site.css +1 -1
- package/src/services/export-theme/assets/client-site.js +128 -104
- package/src/services/export-theme/layouts/_default/alias.html +27 -1
- package/src/services/export-theme/layouts/_default/baseof.html +3 -2
- package/src/services/export-theme/layouts/_default/list.html +3 -50
- package/src/services/export-theme/layouts/_default/rss.xml +107 -55
- package/src/services/export-theme/layouts/collection/single.html +1 -1
- package/src/services/export-theme/layouts/collections/list.html +3 -3
- package/src/services/export-theme/layouts/featured/list.html +3 -5
- package/src/services/export-theme/layouts/index.html +19 -18
- package/src/services/export-theme/layouts/partials/collection-members.html +100 -0
- package/src/services/export-theme/layouts/partials/collection-threads.html +33 -0
- package/src/services/export-theme/layouts/partials/featured-members.html +35 -0
- package/src/services/export-theme/layouts/partials/featured-thread.html +63 -0
- package/src/services/export-theme/layouts/partials/feed-post-content.xml +130 -3
- package/src/services/export-theme/layouts/partials/footer.html +2 -2
- package/src/services/export-theme/layouts/partials/head.html +2 -2
- package/src/services/export-theme/layouts/partials/header.html +5 -3
- package/src/services/export-theme/layouts/partials/jant-data.html +23 -0
- package/src/services/export-theme/layouts/partials/latest-members.html +48 -0
- package/src/services/export-theme/layouts/partials/media-gallery.html +62 -35
- package/src/services/export-theme/layouts/partials/pagination.html +14 -13
- package/src/services/export-theme/layouts/partials/post-card.html +8 -4
- package/src/services/export-theme/layouts/partials/reply.html +2 -1
- package/src/services/export-theme/layouts/partials/smart-collection-members.html +129 -0
- package/src/services/export-theme/layouts/partials/thread-preview.html +41 -31
- package/src/services/export-theme/layouts/post/list.html +1 -1
- package/src/services/export-theme/layouts/smart_collection/list.html +24 -0
- package/src/services/export-theme/styles/main.css +147 -38
- package/src/services/export-theme/theme.toml +1 -1
- package/src/services/export.ts +1099 -195
- package/src/services/github-app-installations.ts +172 -7
- package/src/services/github-sync.ts +89 -23
- package/src/services/hosted-handoff.ts +106 -6
- package/src/services/index.ts +83 -21
- package/src/services/language.ts +445 -0
- package/src/services/mcp.ts +409 -573
- package/src/services/media.ts +387 -319
- package/src/services/navigation.ts +772 -73
- package/src/services/path.ts +302 -46
- package/src/services/post.ts +3277 -776
- package/src/services/search.ts +131 -55
- package/src/services/settings.ts +345 -64
- package/src/services/site-admin.ts +385 -53
- package/src/services/site.ts +160 -32
- package/src/services/smart-collection.ts +643 -0
- package/src/services/telegram.ts +628 -0
- package/src/services/text-attachment.ts +94 -0
- package/src/services/thread.ts +400 -0
- package/src/services/upload-session.ts +68 -30
- package/src/style-author.css +27 -0
- package/src/style-cjk-jp.css +1 -1
- package/src/style-cjk-kr.css +1 -1
- package/src/style-cjk-tc.css +1 -1
- package/src/style-cjk.css +1 -1
- package/src/styles/components-author.css +1622 -0
- package/src/styles/components.css +22 -1009
- package/src/styles/site-media.css +204 -46
- package/src/styles/tokens.css +263 -61
- package/src/styles/ui-author.css +7581 -0
- package/src/styles/ui.css +1973 -6553
- package/src/types/app-context.ts +59 -1
- package/src/types/bindings.ts +32 -3
- package/src/types/config.ts +406 -31
- package/src/types/constants.ts +262 -13
- package/src/types/entities.ts +101 -10
- package/src/types/operations.ts +92 -12
- package/src/types/props.ts +208 -43
- package/src/types/raw-assets.d.ts +5 -0
- package/src/types/views.ts +114 -13
- package/src/ui/color-themes.ts +39 -10
- package/src/ui/compose/ComposeDialog.tsx +369 -16
- package/src/ui/compose/ComposePrompt.tsx +1 -5
- package/src/ui/dash/appearance/AdvancedContent.tsx +2 -2
- package/src/ui/dash/appearance/CodeInjectionContent.tsx +12 -16
- package/src/ui/dash/appearance/ColorThemeContent.tsx +264 -29
- package/src/ui/dash/appearance/NavigationContent.tsx +506 -20
- package/src/ui/dash/appearance/system-nav-descriptions.ts +75 -0
- package/src/ui/dash/settings/AccountMenuContent.tsx +4 -43
- package/src/ui/dash/settings/ApiTokensContent.tsx +2 -1
- package/src/ui/dash/settings/ConfigEditorContent.tsx +597 -0
- package/src/ui/dash/settings/GeneralContent.tsx +314 -70
- package/src/ui/dash/settings/GitHubSyncContent.tsx +25 -0
- package/src/ui/dash/settings/LanguageContent.tsx +409 -0
- package/src/ui/dash/settings/SettingsDirectory.tsx +26 -1
- package/src/ui/dash/settings/SettingsRootContent.tsx +125 -22
- package/src/ui/dash/settings/TelegramContent.tsx +549 -0
- package/src/ui/dash/settings/discover-copy.ts +116 -0
- package/src/ui/feed/CuratedThreadPreview.tsx +23 -6
- package/src/ui/feed/LinkCard.tsx +79 -82
- package/src/ui/feed/LinkPreview.tsx +7 -26
- package/src/ui/feed/NoteCard.tsx +95 -51
- package/src/ui/feed/PostStatusBadges.tsx +103 -51
- package/src/ui/feed/QuoteCard.tsx +86 -56
- package/src/ui/feed/ThreadPreview.tsx +95 -75
- package/src/ui/feed/TimelineFeed.tsx +1 -7
- package/src/ui/feed/thread-preview-state.ts +35 -63
- package/src/ui/font-themes.ts +101 -43
- package/src/ui/layouts/BaseLayout.tsx +326 -61
- package/src/ui/layouts/SiteLayout.tsx +437 -238
- package/src/ui/pages/ArchivePage.tsx +498 -315
- package/src/ui/pages/BrandPage.tsx +1 -1
- package/src/ui/pages/CollectionPage.tsx +186 -97
- package/src/ui/pages/CollectionsPage.tsx +17 -26
- package/src/ui/pages/ComposePage.tsx +12 -1
- package/src/ui/pages/FeaturedPage.tsx +1 -1
- package/src/ui/pages/HomePage.tsx +24 -6
- package/src/ui/pages/PostPage.tsx +162 -24
- package/src/ui/pages/SearchPage.tsx +27 -19
- package/src/ui/pages/SmartCollectionPage.tsx +434 -0
- package/src/ui/pages/SubscribePage.tsx +234 -0
- package/src/ui/pages/ThemeSamplePage.tsx +1 -1
- package/src/ui/shared/CollectionDirectory.tsx +204 -15
- package/src/ui/shared/CollectionsManager.tsx +93 -62
- package/src/ui/shared/CopyField.tsx +127 -0
- package/src/ui/shared/DecorativeQuoteMark.tsx +2 -13
- package/src/ui/shared/DraftPreviewBar.tsx +49 -0
- package/src/ui/shared/EmptyPostContent.tsx +23 -0
- package/src/ui/shared/HomePageBranding.tsx +2 -2
- package/src/ui/shared/Icon.tsx +60 -0
- package/src/ui/shared/IconSprite.tsx +56 -0
- package/src/ui/shared/MediaGallery.tsx +175 -52
- package/src/ui/shared/Pagination.tsx +21 -6
- package/src/ui/shared/PostFooter.tsx +62 -84
- package/src/ui/shared/archive-labels.ts +98 -0
- package/src/ui/shared/collection-management-labels.ts +127 -18
- package/src/ui/shared/custom-icons.ts +168 -0
- package/src/ui/shared/icon-collector.ts +39 -0
- package/src/ui/shared/navigation-labels.ts +45 -73
- package/src/ui/shared/post-article-attributes.ts +54 -0
- package/src/ui/shared/smart-collection-labels.ts +343 -0
- package/src/vendor/datastar.js +9 -1956
- package/src/vendor/datastar.js.map +4 -4
- package/bin/commands/collections.js +0 -268
- package/bin/commands/export.js +0 -110
- package/bin/commands/import-site.js +0 -2619
- package/bin/commands/media.js +0 -302
- package/bin/commands/migrate-text-attachments.js +0 -183
- package/bin/commands/posts.js +0 -262
- package/bin/commands/search.js +0 -53
- package/bin/commands/settings.js +0 -93
- package/bin/lib/http-api.js +0 -223
- package/bin/lib/media-upload.js +0 -206
- package/dist/app-B5db9mS0.js +0 -5
- package/dist/app-CwCepTko.js +0 -31334
- package/dist/client/_assets/chunks/heic-to-DUUaO23q.js +0 -1
- package/dist/client/_assets/chunks/module-DcsAZQZ_.js +0 -716
- package/dist/client/_assets/chunks/native-DpcrFAPh.js +0 -1
- package/dist/client/_assets/chunks/url-pLre2DM_.js +0 -1
- package/dist/client/_assets/client-C_kImWZj.css +0 -2
- package/dist/client/_assets/client-D95FNDg5.js +0 -272
- package/dist/client/_assets/client-auth-BRFl5zQA.js +0 -4547
- package/dist/env-wCpMcNXs.js +0 -252
- package/dist/github-api-CficQztC.js +0 -176
- package/dist/github-app-F4qZ05xk.js +0 -275
- package/dist/github-sync-zohnA9qv.js +0 -4696
- package/dist/url-FvvgARU9.js +0 -305
- package/src/__tests__/bin/content-cli.test.ts +0 -179
- package/src/__tests__/bin/media-cli.test.ts +0 -192
- package/src/__tests__/bin/uploads-cleanup.test.ts +0 -77
- package/src/__tests__/export-hugo-build.test.ts +0 -178
- package/src/__tests__/export-import-roundtrip.test.ts +0 -265
- package/src/__tests__/export-service.test.ts +0 -803
- package/src/__tests__/helpers/app.ts +0 -159
- package/src/__tests__/helpers/db.ts +0 -136
- package/src/__tests__/helpers/export-fixtures.ts +0 -108
- package/src/__tests__/helpers/lingui-core-macro-mock.ts +0 -46
- package/src/__tests__/import-site-command.test.ts +0 -414
- package/src/__tests__/site-media-parser.test.ts +0 -216
- package/src/__tests__/site-pull-media.test.ts +0 -256
- package/src/client/__tests__/avatar-upload.test.ts +0 -186
- package/src/client/__tests__/collection-form-bridge.test.ts +0 -207
- package/src/client/__tests__/collection-page-actions.test.ts +0 -112
- package/src/client/__tests__/collection-picker-order.test.ts +0 -53
- package/src/client/__tests__/collection-sort-menu.test.ts +0 -78
- package/src/client/__tests__/compose-bridge.test.ts +0 -552
- package/src/client/__tests__/compose-discovery.test.ts +0 -155
- package/src/client/__tests__/compose-launch.test.ts +0 -120
- package/src/client/__tests__/compose-shortcuts.test.ts +0 -274
- package/src/client/__tests__/confirm.test.ts +0 -98
- package/src/client/__tests__/custom-url-menu.test.ts +0 -104
- package/src/client/__tests__/feed-video-player.test.ts +0 -44
- package/src/client/__tests__/form-enter-submit.test.ts +0 -110
- package/src/client/__tests__/post-form-bridge.test.ts +0 -82
- package/src/client/__tests__/site-header-nav.test.ts +0 -250
- package/src/client/__tests__/sortable-list.test.ts +0 -95
- package/src/client/__tests__/thread-context.test.ts +0 -117
- package/src/client/__tests__/toast.test.ts +0 -46
- package/src/client/collection-form-bridge.ts +0 -174
- package/src/client/components/__tests__/jant-collection-directory.test.ts +0 -387
- package/src/client/components/__tests__/jant-collection-form.test.ts +0 -340
- package/src/client/components/__tests__/jant-compose-dialog.test.ts +0 -4524
- package/src/client/components/__tests__/jant-compose-editor.test.ts +0 -1203
- package/src/client/components/__tests__/jant-compose-fullscreen.test.ts +0 -424
- package/src/client/components/__tests__/jant-media-lightbox.test.ts +0 -237
- package/src/client/components/__tests__/jant-nav-manager.test.ts +0 -326
- package/src/client/components/__tests__/jant-post-form.test.ts +0 -193
- package/src/client/components/__tests__/jant-post-menu.test.ts +0 -695
- package/src/client/components/__tests__/jant-settings-avatar.test.ts +0 -312
- package/src/client/components/__tests__/jant-settings-general.test.ts +0 -544
- package/src/client/components/__tests__/jant-text-preview.test.ts +0 -206
- package/src/client/components/jant-post-form.ts +0 -422
- package/src/client/components/post-form-template.ts +0 -352
- package/src/client/components/post-form-types.ts +0 -96
- package/src/client/media-metadata.ts +0 -247
- package/src/client/multipart-upload.ts +0 -196
- package/src/client/nav-manager-bridge.ts +0 -54
- package/src/client/post-form-bridge.ts +0 -193
- package/src/client/tiptap/__tests__/block-insertion.test.ts +0 -65
- package/src/client/tiptap/__tests__/floating-position.test.ts +0 -74
- package/src/client/tiptap/__tests__/footnotes.test.ts +0 -692
- package/src/client/tiptap/__tests__/link-toolbar.test.ts +0 -210
- package/src/client/tiptap/__tests__/markdown-clipboard.test.ts +0 -48
- package/src/client/tiptap/__tests__/paste-media.test.ts +0 -39
- package/src/client/tiptap/exitable-marks.ts +0 -73
- package/src/client/tiptap/wrapping-input-rules.ts +0 -102
- package/src/db/__tests__/d1-query.test.ts +0 -84
- package/src/db/__tests__/demo-canonical-snapshot.test.ts +0 -78
- package/src/db/__tests__/demo-env-loader.test.ts +0 -114
- package/src/db/__tests__/dialect.test.ts +0 -42
- package/src/db/__tests__/migration-artifacts.test.ts +0 -82
- package/src/db/__tests__/migration-rehearsal.test.ts +0 -77
- package/src/db/__tests__/migration-runner.test.ts +0 -72
- package/src/db/__tests__/migrations.test.ts +0 -426
- package/src/db/__tests__/r2-query.test.ts +0 -102
- package/src/db/__tests__/wrangler-config.test.ts +0 -86
- package/src/db/pg/__tests__/node.test.ts +0 -96
- package/src/db/rehearsal-fixtures/demo-current.json +0 -25
- package/src/db/rehearsal-fixtures/demo-current.sql +0 -186
- package/src/i18n/__tests__/context.test.tsx +0 -38
- package/src/i18n/__tests__/detect.test.ts +0 -132
- package/src/i18n/__tests__/fallback.test.ts +0 -40
- package/src/i18n/__tests__/message-placeholders.test.ts +0 -43
- package/src/i18n/__tests__/middleware.test.ts +0 -83
- package/src/lib/__tests__/asset-path.test.ts +0 -54
- package/src/lib/__tests__/blurhash-placeholder.test.ts +0 -99
- package/src/lib/__tests__/collection-groups.test.ts +0 -80
- package/src/lib/__tests__/collection-sort.test.ts +0 -45
- package/src/lib/__tests__/constants.test.ts +0 -44
- package/src/lib/__tests__/csp-builder.test.ts +0 -68
- package/src/lib/__tests__/display-text.test.ts +0 -27
- package/src/lib/__tests__/embed-providers.test.ts +0 -104
- package/src/lib/__tests__/embed-render.test.ts +0 -60
- package/src/lib/__tests__/excerpt.test.ts +0 -150
- package/src/lib/__tests__/favicon.test.ts +0 -151
- package/src/lib/__tests__/feed.test.ts +0 -209
- package/src/lib/__tests__/hosted-control-plane.test.ts +0 -106
- package/src/lib/__tests__/hosted-domain.test.ts +0 -78
- package/src/lib/__tests__/hosted-signin.test.ts +0 -112
- package/src/lib/__tests__/icons.test.ts +0 -20
- package/src/lib/__tests__/image.test.ts +0 -111
- package/src/lib/__tests__/jant-branding.test.ts +0 -160
- package/src/lib/__tests__/markdown-roundtrip-embed.test.ts +0 -88
- package/src/lib/__tests__/markdown-to-tiptap.test.ts +0 -444
- package/src/lib/__tests__/markdown.test.ts +0 -175
- package/src/lib/__tests__/nanoid.test.ts +0 -26
- package/src/lib/__tests__/navigation.test.ts +0 -148
- package/src/lib/__tests__/page-title.test.ts +0 -20
- package/src/lib/__tests__/password.test.ts +0 -60
- package/src/lib/__tests__/post-display.test.ts +0 -100
- package/src/lib/__tests__/post-meta.test.ts +0 -129
- package/src/lib/__tests__/public-storage.test.ts +0 -75
- package/src/lib/__tests__/resolve-config.test.ts +0 -341
- package/src/lib/__tests__/schemas.test.ts +0 -818
- package/src/lib/__tests__/search-snippet.test.ts +0 -43
- package/src/lib/__tests__/site-resolution.test.ts +0 -39
- package/src/lib/__tests__/slug-format.test.ts +0 -54
- package/src/lib/__tests__/slug.test.ts +0 -126
- package/src/lib/__tests__/sse.test.ts +0 -98
- package/src/lib/__tests__/startup-config.test.ts +0 -87
- package/src/lib/__tests__/storage.test.ts +0 -379
- package/src/lib/__tests__/summary.test.ts +0 -663
- package/src/lib/__tests__/theme.test.ts +0 -138
- package/src/lib/__tests__/time.test.ts +0 -218
- package/src/lib/__tests__/timeline.test.ts +0 -746
- package/src/lib/__tests__/timezones.test.ts +0 -94
- package/src/lib/__tests__/tiptap-render.test.ts +0 -224
- package/src/lib/__tests__/tiptap-to-markdown.test.ts +0 -420
- package/src/lib/__tests__/url.test.ts +0 -228
- package/src/lib/__tests__/video-playback.test.ts +0 -48
- package/src/lib/__tests__/view.test.ts +0 -770
- package/src/lib/__tests__/worker-response-cache.test.ts +0 -311
- package/src/lib/__tests__/youtube.test.ts +0 -99
- package/src/lib/github-sync-queue-handler.ts +0 -69
- package/src/lib/github-sync-worker.ts +0 -72
- package/src/lib/job-queue-cf.ts +0 -18
- package/src/lib/job-queue-db.ts +0 -149
- package/src/lib/job-queue.ts +0 -35
- package/src/middleware/__tests__/auth.test.ts +0 -499
- package/src/middleware/__tests__/error-handler.test.ts +0 -37
- package/src/middleware/__tests__/onboarding.test.ts +0 -211
- package/src/middleware/__tests__/secure-headers.test.ts +0 -138
- package/src/node/__tests__/cli-db-execute-file.test.ts +0 -109
- package/src/node/__tests__/cli-deploy.test.ts +0 -124
- package/src/node/__tests__/cli-export.test.ts +0 -66
- package/src/node/__tests__/cli-migrate.test.ts +0 -111
- package/src/node/__tests__/cli-reset-password.test.ts +0 -91
- package/src/node/__tests__/cli-runtime-target.test.ts +0 -37
- package/src/node/__tests__/cli-site-selection.test.ts +0 -133
- package/src/node/__tests__/cli-site-snapshot.test.ts +0 -636
- package/src/node/__tests__/cli-site-token-env.test.ts +0 -137
- package/src/node/__tests__/runtime.test.ts +0 -346
- package/src/routes/__tests__/compose.test.ts +0 -354
- package/src/routes/api/__tests__/attachments.test.ts +0 -92
- package/src/routes/api/__tests__/collections.test.ts +0 -556
- package/src/routes/api/__tests__/mcp.test.ts +0 -389
- package/src/routes/api/__tests__/nav-items.test.ts +0 -461
- package/src/routes/api/__tests__/posts.test.ts +0 -1080
- package/src/routes/api/__tests__/search.test.ts +0 -113
- package/src/routes/api/__tests__/settings.test.ts +0 -606
- package/src/routes/api/__tests__/upload-multipart.test.ts +0 -732
- package/src/routes/api/__tests__/upload.test.ts +0 -132
- package/src/routes/api/__tests__/uploads.test.ts +0 -422
- package/src/routes/api/internal/__tests__/api-tokens.test.ts +0 -55
- package/src/routes/api/internal/__tests__/sites.test.ts +0 -515
- package/src/routes/api/internal/__tests__/uploads.test.ts +0 -131
- package/src/routes/api/internal/text-attachments.ts +0 -60
- package/src/routes/api/public/__tests__/posts.test.ts +0 -372
- package/src/routes/api/upload-multipart.ts +0 -344
- package/src/routes/auth/__tests__/dev.test.ts +0 -135
- package/src/routes/auth/__tests__/hosted-sso.test.ts +0 -169
- package/src/routes/auth/__tests__/setup.test.ts +0 -128
- package/src/routes/dash/__tests__/font-theme.test.ts +0 -100
- package/src/routes/dash/__tests__/settings-avatar.test.ts +0 -265
- package/src/routes/feed/__tests__/feed.test.ts +0 -475
- package/src/routes/feed/__tests__/sitemap.test.ts +0 -64
- package/src/routes/hosted/__tests__/domain-check.test.ts +0 -94
- package/src/routes/pages/__tests__/collection-routing.test.ts +0 -176
- package/src/routes/pages/__tests__/collections.test.ts +0 -100
- package/src/routes/pages/__tests__/featured.test.ts +0 -119
- package/src/runtime/__tests__/node.test.ts +0 -258
- package/src/runtime/__tests__/readiness.test.ts +0 -89
- package/src/services/__tests__/api-token.test.ts +0 -138
- package/src/services/__tests__/auth.test.ts +0 -348
- package/src/services/__tests__/collection.test.ts +0 -1032
- package/src/services/__tests__/custom-url.test.ts +0 -220
- package/src/services/__tests__/github-app-installations.test.ts +0 -181
- package/src/services/__tests__/github-sync-classify.test.ts +0 -189
- package/src/services/__tests__/github-sync-push.test.ts +0 -159
- package/src/services/__tests__/hosted-handoff.test.ts +0 -123
- package/src/services/__tests__/media.test.ts +0 -1304
- package/src/services/__tests__/navigation.test.ts +0 -671
- package/src/services/__tests__/post-timeline.test.ts +0 -575
- package/src/services/__tests__/post.test.ts +0 -2076
- package/src/services/__tests__/search.test.ts +0 -326
- package/src/services/__tests__/settings.test.ts +0 -445
- package/src/services/__tests__/site-admin.test.ts +0 -48
- package/src/services/__tests__/site-profile.test.ts +0 -175
- package/src/styles/fonts/et-book/et-book-bold-line-figures.woff +0 -0
- package/src/styles/fonts/et-book/et-book-display-italic-old-style-figures.woff +0 -0
- package/src/styles/fonts/et-book/et-book-roman-line-figures.woff +0 -0
- package/src/styles/fonts/et-book.css +0 -31
- package/src/styles/fonts/latin.css +0 -5
- package/src/styles/fonts/noto-serif-jp/400/057a6a98bda7fe57105ddaa99ec82015.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/0acd1fe2b2ea1ad1bfee7ae1fa139d27.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/0c2ab6b295e55f356f8020d4e7747522.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/0c5f9492af03a4fa42c784de94649de1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/0d9a936885a4c39077438effd3779cbd.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/0e645da524f7cfc0e8c3c03fb2b08428.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/135e83b403475c5dc9e49b43501a5b84.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/13b2c53b30e6a3e4de7132dbc18dbdfc.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/15d95680dc31cc6ce20e0a5464106dc4.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/1733f27476507ca68b68a803bc533cc2.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/188c2db794f3dd7a45889ddbc81da9bb.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/1cf737900dd49c2e88f1b3221a82a602.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/233d3a685ee18276b319363474599d47.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/284b53bbefb06924cf236d24c8ed5641.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/2a56eaf19d1d38a6b57e2a388f733676.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/2abfbab82b6a7c04426afc054d2464da.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/2e6f4bb71ef6b38765d51acc5a79f638.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/31194d303a67561926a544ed0e072aee.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/3623d96698132c61e861f984ce11cc23.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/39211b02f24c69cbd1b54f6d41b01933.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/3e24063b19abd2b051af986a6870046d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/4410f876d27c9821839474b6b1059fd7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/479329a39a3eb6c0047e6b0981919855.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/527ff336279465617aafbafe1a830632.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/56b40518ea0608e62826bd44ee27f5f9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/5acc7f736217259db79a42bf44241c48.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/5c05f8b75c9d7f25b3c04ca711cf43b3.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/5e0124c7265f1b4cf0fc797b94efbebc.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/615a7e0d63f257109d599b2a1977de68.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/61a2c80d0c924d5a6187c02e8d1d1642.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/62fc94f8d4c5a750b7f25e7387539910.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/639c7c6b0b0c27c738702741cfa4b8c0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/68a3a4bf337f8a0722be76676e20b850.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/6abdd163d2c4b85698db8aa1ce149361.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/73b794d885b88f7befb7ea8ab1780a15.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/743f290baf027d4626a86e22f3d44600.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/757019c01c5e2c2b0f54293cea3b5636.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/76f117a3baacda304a71965a17266a13.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/77747f17625a259fb405b7bbdd84ac4b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/788498548ddfb710d6ef3c7bff79fa97.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/78ea6c40923ce95367e3517dd1e5a849.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/7f9a6c9286b68de9c72b0024f7beeb40.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/823d1bb11097331238d103c7f72138dc.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/888ba53510213d5d1f6a7deb60e569b6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/892aa49b2529c89bb4076d4aa51fe30f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/95ff41191c76ef893ac70a1043e95e44.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/96c75862c8cec51a7c05ff025fea86cd.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/9b21e8244f5930c48ad5073f83777b6c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/9fce02d1a09f464c36c9fcfb14a354c5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/a0a6755c7e3f9e4cf03387027dd9f16c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/a4475c442c6b259354c9eda62e64e7df.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/a4a39b5f048671aa37c2b2a9581ab08a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/a534449d67561ac9b06489f64e57ad98.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/a919a8c6fec6d7e8bb21177965f2e9d7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/ad67113f88b59582991cb0c5d33ea19f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/adb6e613fb99c6dd660b727101f554a8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/adc4a98a89870ef984ee8f4b57c8a3a5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/b12379ab782468d725519cd07a7d15bc.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/b55486f8a459c838fe329d4e79a8c211.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/bb0b15492b8cdbbec57c0bcfa0aa9241.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/bedc74b423b7293b6ad0bdecc61c42cc.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/bfb00d4a4c48661bd0be99f300a0faae.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/c1b0df29ae41d764904df84e9ac83d1e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/c42c67070cfe99cf823df92d81c7fa6e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/c4d749e45ecd5a5aed5a0bb3ebfd355d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/c96d83978add28b356c22c4c84916733.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/cb7ccd6494256f7a2977b7c2b0225592.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/ce41d70ce6a069a498525c9e15c45cf2.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/d509ee5c8241bc7c3de2039d75564fa5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/d675d717cd329bfd4c0524f76ae1579c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/dc8f6256445e68199540be9ade33529f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/e8c15be62faf978d208925e79ea6a10d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/e91c4d941ed9f5c2f3e27f205a3a225e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/e9c566be7a5d38a9085225f7372bc82b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/e9ebc567a711eeb29019ddae3e0ce7fe.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/ecb8875a56c7b038b35432fda41ae128.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/f1661731474b78bdf81114daf10b254f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/f2c58dee206ba9355046fc23d05491f7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/f50ac27ea4358d67fdda403c2bb52467.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/f55334112f8e8be82d65db29887a663f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/f740e93f3c0277ecc616594103bca683.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/f7633b5af033d76ff2fb3c3c266d77c5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/f7d8468cba2335a83ee414ea68291bab.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/fc9ae5b600fb711f2d67e93ce768cba4.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/400/fd1bceb55d3e0183ac2454b8532fec7d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/02611a045a7fe83a12014e3debc9f731.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/0f5e1a18987dbc84ca05188c129e1936.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/112743a4ab5fdd1498dfdf2b11336380.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/1211f03d3ff5759a702631445793f60e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/147b24c2f08d03bbed30887d4cb3311c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/16663e567f81f4725a1522f37e18f71f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/1824321da801e6257b902f3d1d09054c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/1a3a92c7c060a71a6c35819b9ebcdbb9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/1fba7ec0e412e911bf31841de5a8a4e4.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/28a97af9ab9d38983d20f39ff09840e1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/2bfaadaf3479c72286248e6de0be0ec9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/2c8c55e4cec85ce77e95cac9d330f5cf.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/2ed9981d2e8983365bd051159b976b6d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/2f4c633e923ba30c6ba376367379fc91.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/349965eee0a9b6c984a319ab96a4ece9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/36cda3eae13370b934bba4429fab9078.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/3aa13f1843d7c8fa16109b6395a9a29d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/3e2c06bdd9dcab29aeaeb0cfb7fa608a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/424123f9371ba357087363263eeafcda.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/43b3bbf43055c3e65db9cdf2c5b18c1c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/44704471b60c18b3ecec5300a88f1102.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/46604090efbb99c2db1800928af0a239.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/46998df85d31e629c0142f0556f5e7c5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/49902f1c41b281f8eb3771abdd4dccb8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/4db4f31a16965baa42cb7dad667a8f04.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/572b9e28f1e6d89b765a16d809db84a1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/5921cef36750ff6092d94b83a802823b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/59e95d8b5332dcdae894a19946ab767d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/5ec349ff62b9ee5fe0c6dae867704dc4.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/601f812e8b1eafecd5ba585a6a6d7962.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/6025ddaf99d86cc8bfd781006b19fbd6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/60f6e28b3f0400b0e8fe32c3c7116102.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/64a404d675f1d726f0891b7a80794595.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/7158022889c6c177062ac85036e7af10.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/7e38ca789a9e76ac91d9256374e154f0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/815a0b797465190f60d8b1a04656c42e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/8726558cf297cbda831cc19514897205.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/8855472f3c02f6c7ebb3216617ebe4af.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/8e231d707f0c4f8e3cde90a6b52a79aa.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/9064c12fd72c7aba235d8c3881755b91.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/911b9e53e9814de2998c60bf3115f560.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/92fdc376bce277874e75db666f175b44.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/930a23430f0eb64480d7fe5f82834e21.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/93bed0e5f2dd5a21cf73304fcfbc149d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/93f3ea6918533d96d9c252378b9a4af0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/95a0951d2a2722ff773a1a45e8c474d6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/982cd1765ca6bbb3e6547e47834d5148.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/9b0c3caac458c7bc9c9133e40405ddea.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/9f3bdab4025dc7c5ba1a5871e62e8918.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/a00e94d4f04df6aa659db9c4954c7efe.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/a2b0597837e382aca19919c4b74e58c8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/a373e85c96aa0dc303092429fb837e51.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/a6e044424780a57610833cc856c15bf5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/a7c58070d68dc1724e9d4e781afb78db.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/accc43762ad05edfbff66ba1380d192a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/ad47bcd6d4663026d648c132d969318d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/af57a2e8c72f9ba0efb1af771d32c124.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/b0ae5f374e43dac992a4a5d334cebc0b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/b91234c10fd8b8c8abc88e03afe66a1f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/b9317198f118a1dfd8ddf2b82ec028f3.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/ba825ae79b1a6f7e0cce5215fcb5c96f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/bc6183ac08f0fac78c46f80c10cf7c92.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/bc8ccea5abf6598cf3cfa97eb59804bb.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/bc95a792cbca6639214c9b0da13392ff.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/bcfa62f35731856246c146d3a6932bf3.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/c063897793f593eb26d6ff7b7baaba18.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/c6c2971ad1f3221f6cf84028aa0f477e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/c97f41eef722121d86f55d553c056a39.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/ca62704509932d3232d62918de97af3f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/d1f064825fa5784b5c930652bd831cce.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/d2faabcedd19f016e7b21bce073c0ec8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/d320171e57480510f87dbbc7d5264b0a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/d3a72a99d365dddfbca8d017a8011368.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/d42aafa0f246ad3b4c16fe96d3a3a432.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/d4aaf23c13ae808a4bed617afd13aa07.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/d6bb686bddfbe8f38a36a68e609a8667.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/d9020ff69a83b2a6ee1f42ae480f7db0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/da90a9012ab2d98f759e3fa0820ef502.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/df10d94bea357a43313e20da5d84bd30.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/e34b2b141e472dc776c86fdf8eea23b0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/e444fd88f1390636e603d0d681538ac8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/e79898628283edc27180fc39d0d769c1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/eaf332445a40942928e5f5750c1c3116.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/f91cd722855f4269256eae1187df64ec.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/fc895f5ce66b656f4a933097bf2a8775.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/fca6720fd14c467d29a90f18ef3859b9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/700/fd1bb507bcbf04856eeb7f7fd47ea579.woff2 +0 -0
- package/src/styles/fonts/noto-serif-jp/noto-serif-jp.css +0 -3349
- package/src/styles/fonts/noto-serif-kr/400/033466ef683afe931f7f520cfb42d928.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/05da12edb9d52210581dc6ec4541031f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/0968e4861204b51f62a2f8e9f15dd5e0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/0d5dec931dc885f07fe5cd5af8bed675.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/1076f0f6f66d28d7a2f16427faad4413.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/12ef1ba76bd20b004b865266a1aa70b3.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/152395634a207579552f8cb54db88599.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/1a08931435f885e707edb85978ea3bb6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/31a197213ae61d7043c81013f52d10d6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/37dbd564820cce2f7b3331e442da0df3.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/37dc8505b20b37a2477a9121b16d44a7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/3ac0a07878cacdc98bb889f40f5970d3.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/491bbba374093fff045f55803a22bfef.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/4d38e56738156625329d93bd5c8cc74a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/57e9a86651366c1ba299e47aa7e358c2.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/57f89adeae55aa7fe2add3fc1801ce03.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/5df9ce98c75f8c50fb4fff7f01a23925.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/60020a830d809c26970cf8e48ba1eeda.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/60bcfa3ea7446eb42394aab02d28be40.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/63fafcb069520613d0ea35ad3e6b1e42.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/65a60d87c64228d258a123cbe85f5f31.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/6968e889e18891d912809fe484c2e745.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/70714891ad3fbfc3d5f10a8669dacc5a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/761d84afca8d7f34eebefe538adba827.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/76e07530323418ec723c5d7634c9bcca.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/773819b7b9b8fd404a929867c0fd677e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/7817dd16805145d8538ad57590f69f5a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/7b59f0ec7792b18458dc5a361e37884c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/7c3945788a689a69356c1a622d69d48b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/835b6505bb9eea9678925a1fa885353d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/8b5c9ef81159f31d2ab35f45ca4373e0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/8b91c7c2ed390f1278b9befa3aa87233.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/8fb45117a62d92dce44a80f0b729ead5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/90b7848e9b1623b77bdcf155e90b839c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/985d4d41afa0934a4eb2de35473fb9a2.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/9bb38fd05201de666b88b82d56a386f7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/9eff2ab2a9d2ced47ab761bf6fdb11ec.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/9f1963fe8d4d6878d717d872a8f3fdb5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/a0d00fe4816c95a8c7dffd445ef00b03.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/a0f199077fa1a33bc2a1e01c64de7fe6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/a7c35e42a659347e490c3cb7983b2e7f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/aa662092cf249707123ca4d575e2764b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/aae1eda193285ab817a2d1b408440326.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/b0cb664cb2e1371efda8943c0b7dcd1c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/b0d1cdced482352cf0d3ae58638aacb9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/b320f5d185b2cff933ac549c184031c5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/ba9c59d7dfa4494db1bb764ada81467d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/bab547459d514f46206e340c4bb2dc88.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/bcc39eda837bb7a7a3d37c8c60fffb81.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/bd73264d7f98776708d5d6f3c9b78fcc.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/bed610b217d500f5975cfc9fe6157570.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/bf8901f8f11d4f433ea17dabc9370ea6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/c4143bb9f2fe77b6ccf20088a8904650.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/c7ff3f6bbdcd5f604b7343602ab904df.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/c945c62368357d05a53206620460fb30.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/ce022e18a1377ac509443c3c3790b431.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/cf9cffe56636322f62b40d61130fbc5e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/d20d8944bc0b85f5b2aae4b24f343516.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/d36644d6502527e1fff205d0c7eca434.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/d40ab99c7a38026f411c8f112f742b48.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/dc6e234ded795e91f76d6647f628fbf0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/dd0cfdfdac0866e66d587e2b5a9e9961.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/de304c8a02e45ded4f8dcc479d167198.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/e8c364c16daa04835bf32d293d2598db.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/ec86e23683052da5cfdc3b77641bd15a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/eda1b0cb6d1719dd9bedcf3216a9e8de.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/ee6fce20b420a480714607c66d7f97e5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/eee3836d6ac17ebb2c450bbcbc9db121.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/f5738255e92d8dd34a46d1bcdf4c4074.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/fa6e58ce4b52695e7ae19bbea6336ec8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/400/fd2069e6e8588c70b4f11364093b81f2.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/04b8bde59cff68eeee74fb1914eb09c7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/05ac821472e235943ed1435e4bb8ecad.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/074c1f8483d5a4d8c45c8c5f3e4cbb32.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/1380210a722ac9aeef54005ad7b015c9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/17c7f5d0a45e92ede0e5dec3a2c77efa.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/1be602ad456b0d75902d352116cb35fd.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/2612c60f9dc5459ac42763591240a1d6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/2ab8cf1f23a5ac7939a7876054e711a7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/34e6750e00c3a911ef87dc66b336594d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/36f3df4730cfca4fc77fe52b52e6a126.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/37887deb7a9c466cf2af6ee7ff372ea6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/3aba89c4d4281553078de4622b498cbb.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/3d88558097559d775231194d43745ba7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/3dc3e8c35524cad2d1236f3393104ccf.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/45140742dfa8686b58db2899ce89f89a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/469d2754e315e77270c12fa0ab28026c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/4c0760284569b87d8f2290c324953973.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/4cba92c942694bdc479bc54101bb1aa4.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/4e7d263c30bb48604069a3b4404d4eeb.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/5279c7e465d9871edf51fd02e691eee7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/54bfdb6f21f9d6191e5100580239e14f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/56be5e32fd01668fe5ba814d94905839.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/615b38e0b5bb3ea68426f44f47706e6f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/65e9c4585d71bf48a5c62f367010da16.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/6b75213eb0be40ce84241eb2bb438a2e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/7520ca6ca8c60eb1e62d50e71c8d30f1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/759a647b77791b1e98f99bc0ab5317a7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/76e51630143b95b6322ef93ad330da7a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/79aa7c8c842c4a27cf57c0a3a1ffca5a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/7cc72fd2c9105560422b6a67c6162945.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/7d0ea0690e432462f4d05a23d720ec19.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/7dffa5c1bec57e0903fd62357401ff1a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/82f6ccc063960eed1cdfd1d61ada8862.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/845b4b67564d62cf5cad242f7ac08ea5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/84c8e7bc0931008ed91f44ed12dfea94.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/887a11290ba78b1e66c6d2f67043005e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/88db1d042074fb6e66821ffc10941930.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/8dc18c0cebe6aa4bf4c45dbb831048ab.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/919a879bd2d580d8491a31a449390689.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/91da6cb174bebfb96976e2f1316be2fe.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/934dfdbed2bb2c4b6129199d699a34fa.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/97d7a17234f2b5030ae9697ae00aded2.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/995c4fda62d25c3b79dd5987737df6ae.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/9d0afa53dc2f92ba42024f55f11f6779.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/9e13a47242926f1cd7d68c08d9ef8889.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/a379ada89abd750c587ded29f77e731c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/a48be56ce5d3a99dc8f8331398004412.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/a806759e72987951d6d08b7cbdf36a1b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/a88481ec8bc7be11cb66e46781a79bb9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/a9a016d4a93409f65278327e8a8bb38d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/ab92d41062a7644faa45f50bf384454a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/b326a8a9c33b554db570da94f60bc380.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/b6117ff2993b11bb1fdc7ea3588a010c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/b61982951bd51b724143c30dfaaa9fe9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/c0098958e20db68cab90097b5e62516f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/c4bfaa5e50798246e3770718b7a7c84a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/c84598999133455503042e06f4ab79cb.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/ca9a533988d7019597a60d4e17127e0c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/cf2b28f90f47276f7e2688a65e88a101.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/d689b1861d7e4377dd72ad3013482612.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/d9047070d72a816b3dba9d40c2d85e69.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/da04549f3f4ed28076b01b8cd710d313.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/da7af303f8c645f9a9dbae0e6e32dd35.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/df9568257eb29b156449fdd4bec5ec76.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/e067cd0ed76c90cd0a93c9339253f20b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/e08b07772e7bed3cec2832d43f7fd339.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/e12150d5a39b30be8f567968c7a527b0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/e53fcb2381eee345db4f6f973dd95a3e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/e5bd313ef81f687d398aacb11cec3069.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/eb5afb3d952b8593782caec6026514b6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/edd6a4f608d04fc0351d7688cfc321e4.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/f9695c6c4df2bf6bc03045ff79d4f01f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/fada6eaa68ff8816afe43d2a36c5423e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/700/fbcc4bf5367218951172bdee6f77d7a6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-kr/noto-serif-kr.css +0 -2601
- package/src/styles/fonts/noto-serif-sc/400/02629e5d0a9860b7fe32ec1f0563213a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/031089da45fbfb7dc18ac827bef4c56e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/03ac785139320b7b13bac9c150bf72bf.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/0b1f83a3c7e715560a55ad9eb0fb1c94.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/14b040a2dda256936bc7b3470e548394.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/189f272ea2600c74d576b7b15c014922.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/1fbccc182322b513f57cd156a9a491b0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/21e0a71d86be7b8a9e812e7af09dd061.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/265e048cc9f2f8a711ba585a534d5351.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/2ae2ca951489c9d50cde5b36a2a5515b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/2ba802b14f21a58fc61606c88fa93373.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/2deb444546774c3a3ab38c75eb69cdfb.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/2fbccf9a3853eb59db1a825e044515fd.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/2ff009fa8701505d7f3dc6c83763f019.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/31424fe5d54692e7c8b38021ccb8597c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/360c190344c26278bbc50e2f4d6a2b3f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/39b0bbc910af9d2d6dcd8bd4abd6387d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/3adc8f6350cf5067bcb6dc5e44c45d41.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/3bed5bd57de8f738e53cddaea88983d9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/3c201fd8d1bb20abe7d06b940e83a4d9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/3d385ea0880df7204258e290648ec012.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/3dc1a4f0d7af59e16b5162a2b077a442.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/3dc68e473fe23bd076dd46785cd23583.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/435b7dca567809813fcb395a27ed83a0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/43693195e775d515689fa035394067fd.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/43fb49e5b79ee7e553869d84e6e08b1e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/44dcbbc3cc8f22e613b342d691511ab6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/474fac21b12b7efd71f7c321578878b0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/4a23fe6e82fd496b5eb20401b6164efe.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/4bc743968cf1c3ce5711de67ef1ccc4d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/4cf0f292f3358bd2f73b1cf4ec1476f3.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/501f66f24bce8234441954de1b568403.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/53a88404451448cd2e620a0ca0e45a20.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/557cd00c5d6827e13d72a0c71b23587b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/563fa31542d553f25abab65cf7f81e1d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/56e1c4734bbbb38af2fbc262bf6e98f2.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/5947f5da5da9a352a2b534ee64bfc29a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/5a10741e41259e235841440394c0763d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/60d8b0805a0a8c54a6cca216004beff5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/61bf4287453da4025d03fa6b2dba66ca.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/638369541268ed5a10af97ad77498c73.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/687d0f0f90a9b23e40102e16ad8e9836.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/6e2164fad867d166de2e5b274f04a563.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/6eefc9d430171c1e1e4034ecadee31c8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/71eafb8fbe3a734283517e230ad8b6db.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/751f54dbb115140d5b645a6ba4aff5d3.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/7609e7e74dd4d916a7abc7ecc7d95f7e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/76b9d6fe838ae4151d95ce7200aa2bf6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/78ce29fed872e44fc9014d94875d2aac.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/79a85a253e9b3f12d2e2cb15e16b3003.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/7caa14a095a6bc313aab780fe4ff7999.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/7d138084cf03c14116b11297fce0e3e3.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/880162ae92cd9e120eb4e4e11fae459d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/8f2b960c2823670e94f5b08aa65657e6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/8f89f57230d184f92a36e241874229d7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/9180de34b48b325200a97e267befff32.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/95df3b9f681d9df411c30aea5b24f2e0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/975af5a496e8d87d821910aa9fe4d598.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/97a874bbf55ce89a4ab7cd27c7e938b1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/9fd53607094e329fa8e5c785b3ff0f1a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/a578742770fcd2226e3c45b5b6efdcb0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/ae401fb4db80d5ff5cd3f8d9bc811070.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/b0ab3a7f319ce6dd3c9a4de2674e7c72.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/b159deb135e9946eea0572d52778170b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/b91450304d9ac44f5c6e0da0792e055d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/baa325551b381c5e035ef143e56d4abe.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/c0c7836749e585cee24ab2f8457c5b01.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/c2ac4ef1860812036ca2b8c4e4089bdc.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/c31019c08bd22464f7a88f090281404c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/c57ee3b49b7e45b995539a6b2c51f138.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/cd75ca47da9ae4c0899e37d4c543319b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/d12ce1d8445213317f9163283e58a05d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/d28fb13acf9ced9f0657fd4012c81cd2.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/d3714e6b90de8e2085dfb2514464dd6a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/d3beff96216c8af1aa79246476b6a323.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/d3e311f30c811dc339c262a79a51877e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/d51f4cdc83711e510f5d25f03235597e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/d5df4a8dfd4328c67d933b3912c6ad0f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/dccda6a2e2db3b530788bdfa2acd1979.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/f5237486197aeff59341a1ff38b8eff8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/f553d54ef931066712d8f3f0ce018e1b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/f649cba8e14c33d6bf2265483b14b895.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/f6839df1bf7cb4dc8d27e5ea55bbe633.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/f6b7304e028980f77a7f7007bb540abd.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/f8db8bef0a6e1178835d350ae0d384a1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/fb4649a82c50620773d79820e2e5ff13.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/400/fb9402d6c6357a825affc402f14d5a7e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/0041f681602cc834bb5c55ced0155b8e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/00c9ac960d866ffaf8a866e5939024e2.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/02e48e353415a00e0f556608cab33a43.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/02faf6bb0ab4d56ada037c0bbaf9b9f7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/057a3d44d7fc606f113d863376d0ecf0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/10f2b44b3711d3f5bdcc30d373b543d1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/14c1506106d92621bafb11016735194e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/154a2c266902003bd8b7449386b10776.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/19e39850472250bfdbce654d30859879.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/1b5d0d740450fb996749464c9b882025.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/1bca0a2a8840ad0ee9414940593db144.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/1cda27dcaab977ae4ef5d5ab2a10ae03.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/1f4bc38a1c50f55f335f5411cae47696.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/2022cf097cb952d9fe75b53b4587d2c3.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/2240a3c43ca5ef59ae3c348c7884792f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/280e3d2b58e9ad3501816072e01b0c13.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/2874d07e228da9583b0e73646dacd498.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/29d49891713a2785a3a383001cf58c59.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/2d81eb6ab0ebbc0cabfb3a3341ba8800.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/3179006d1c7ebfa50d27482a2859d9a0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/34c2edb3c37f71258f5c4a31091f0c6c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/389a950f2a1211946d294716e679e381.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/42a74b6a625bbf0a9616ed4db3152c88.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/457485e72835364662dfead6281638c1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/488846410760fe128dae939836ca5423.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/48eb0a91e50c7f026e248c64145e72af.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/4b0e79ba18b2ce424fa93e84996d7cba.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/54e301f412730f391225db59dae1c8d5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/597d69d0710e0178b162afb0a0c20401.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/5cc23a76e122d0ad2f7cede41bc35b27.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/5d48855bed5f3554eff91b573d7376ac.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/5ddcbe564b29ef08632e1aeb33455435.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/605667a998e91e2b6a4a3cd7c31fe5a9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/67f32ceea9e78e5109f87724ad886010.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/68f2fab82ec8e9291f08c3145111549c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/69519ada3f3f74ca20aacb8af48ab6b4.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/6a6e884fb2b65ec5b4a3d5ecd0d01a6a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/6e1a8b45b01939088c3a8cfcf8c10681.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/70adaf50c56d5ff859c64d35e0f1e34e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/72ee453ac0e19bd2c631c8921c44e3de.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/753b5f6fb254bacb6618ace25af3df60.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/76d4244186d118eea245d1385a4de2ec.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/7a86b155111ba20f3e87306ff6beac77.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/7b1e76975b0984e6f83e3f9f8069e784.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/7b6c60131822a0e4d36d980d52509d4e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/7cbda564cb2dd4799ab9e89d51286aa7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/7f60eefa15956d6f06dd92404887d58c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/7f8c15e0ecb102738981d9fa4cb6b921.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/812b5a4b87f3a7b4afc1cfebc864f413.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/812dfb7f8144d01b3cc9d5ce0b472f40.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/84742b1ede4f0bb6d27131298eba21b4.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/8555f0285e3d28e95e2fc0ccccd9caff.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/8e04e64c8f68d292a18d4160fbde8671.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/958efb9b2fa2ea0008ffef009885f9f8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/9ca9b71010a5faeee7047ef97aeee13b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/9cd0b77920b9d6c64eb686493123fc76.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/9ebd27835ffcbd794e67151ab046ce68.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/a077f51cfb5cffb4ff4d8e229c0e9e79.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/a397997b579d3945c9c70a979c17a8ad.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/a68d9d5027803832bb28e78cdcd04949.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/a904b05966368bcf90b632c7c2e5f76b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/aa218a2c45f3749537ce876201e5152b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/aa28db16818f9eaa8c817f289e1c3270.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/aa96d698491c2540e2dcf7009c65c456.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/ae25c41034ddc1a9e0b41f5034c9aa4b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/ae289ae3f8cdb54a3a6c07174517afec.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/b02dfa2aa52cbdb1b2f11a9f44335469.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/b2e326f7f9b807451bf9c745df747efe.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/c33c59feccf391f0c5f1f5d24e36d1fe.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/c82fd9456d7465b5e5bd3659e9b14c55.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/c90b7b65d2b9696fbf3a506738f94d68.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/cba6ad3981cb7861428d4be169ee8124.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/cc26525aa2af1f0b929af32ce50a7fba.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/cd0e7b51eddb22a77a09b025c0281434.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/cd6d074f3957d58bac58437fc97e5e33.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/cef249b6d013fb0cc0d574176bc23811.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/d0bd387fda28e58d3c9b3efa2468dd8a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/da93ae099ff3b7aae27b3f674d3fc721.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/e264213b9e102dabc603adb6e4fda5e6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/e7c7ef3669ae48c0a736f06ca471e1d7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/e81a742cacef744130c40de1b90837d8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/e8b755172122d1d0a5dd453e96b0ff24.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/e99280299c305402eaa5271a3e36c49b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/e9c66b085052ece66bfadf45f711d3e1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/ed7c6dafaa6d8bcf015ef0ca574837df.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/f2900a1d30c3a33129f4e2225669bd0e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/fa7d3b99744d7f2dc9e00864a97a62d6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/700/fb0e90665980954719c2eb685b130bc0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-sc/noto-serif-sc.css +0 -3615
- package/src/styles/fonts/noto-serif-tc/400/008ea9091e332c639ceb18874eacd60c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/053bd3d7aec0040d0cc50c261a1f4e3e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/0713613227cc4c686c45a279f8bdc166.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/0e97f44ebc65384c346fe19bcc52fa20.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/1139d32ae2bdeb26c0c8f31330aa9a9f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/15f8c0df47fd639d1b0d9bd5cf507c9b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/1668bd859ffe15bed7d5563117d8d5fb.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/190e3f8632494e7c095117f26b1c811e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/19ad151c22ce1befe0a9ea643fbee570.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/1c820b5295868008ca7c78afa5b7655d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/1fbe225742c69f4ba9ea5f74922f0ca1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/2a7cedfcd6e4c7cec36f4fd7b0f329c2.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/2acea04a920f6af31e7db97052f563c6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/2e98b666924b8e0a09d1aeeefd24bdd2.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/2fd3fceb6faed5e3db768e88d7614dca.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/35cf5dd04315e0b906e1a413d7905a2f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/387c811226f303af62f1e21aae6f5c83.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/3b41385fc27419c19822060daa0b5cb3.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/3cbe4a697fd595ef42c899de7d3e5445.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/3d83dacbbec3d8532ae9afede21f3aab.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/47479c470fae70f10b7c964a7ecbf274.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/4dc0728df0f2ba70796f45f05654c7ba.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/4dc2bc2c55b47f57d13b63aa6b1c8bd4.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/4e1cc6aafb411b572c8d3511e925ecf1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/5227dbe9933760a48baff21ebd13fc98.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/526b263e72c189f4b065738aaa6d423a.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/54da934819a917f561b439bfd10f88b6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/5bfc7a121c35ae42623ef804fb525e0e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/5f90024544c2907c6c0203c6210c50be.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/649b12d7cee7bb981842946e4547e6ca.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/653bef2ed891ae48d8ed712283080649.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/67d2a81f06ba352f17fbdc3a5e6ea59e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/68304f3229cf763465f044fccb5892c0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/688a88911e4da17b609196a959b8b930.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/6db6ddf72c38a78ce44c1327701152e1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/77a7533bd21ccd33192d142a93555aa8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/7d65a3d6a65050eb5e6eca43398aeba4.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/7dfc711962c8771f97e7c8898a6bcb65.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/7ef123b62d530fcba73974fa265e0aae.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/80466082a896fd328f30a78593c7c568.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/8a3c84b0df36f851f5fea75ee8757951.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/8b0c8c9f8cfa9fa090d97c5a5efb1f4c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/8dc035a34c76e6515ca203e2df182588.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/8eb06109812cb80be44f47b8179c2709.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/904324af375d5fd370af1054355a050e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/911a2092d64d6d6494b254d819af2b91.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/9de02d745b8e25c6411fb152fb067748.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/9eb33a430058d839ebbe2af4b2e0daa9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/9f5a73aa8ba417688019d628f334db07.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/a0f0c06d5c7a3ffa97706178cce212a8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/a38c1830367f784181b6f544b0b11bbd.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/a9cf85e27428c14351d30eac8cbc8d91.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/aa0ce6740f301351761a0615cc8b2e99.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/bc3f0cb8b55ee11d32b94ca488976f8d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/bcb3307527d6d0033bf0f17660b91e71.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/bf1acc86e17b4229c548828a9d6f455d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/c3fbc1f2557c343863a10698f8c966a2.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/c5c1c0be944ea39a3f50a02d32f5b759.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/c5f1075caf6d1344ee720de85114a521.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/cae29b3f8951eaf20d2f61c2206e28d9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/d043b8d7a48bb0ac59ee1f1477d88eee.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/d320b000b5978c7251148a6a154741b8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/da13b136efb1d1e4c76575af8f79a698.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/da2cf0ec56bf69374ee37764c7e3ea3d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/daf62255dd60679946f28c442ca62533.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/dd01a1035345f6921a48525b8ce08f06.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/e4fb59479cedc87ba79785590bf861ca.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/e5d00355f73293d40b61299459d17ca5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/e647b8d2efc501c0cc0e407249cc7135.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/e6e60ffb2ebd1828628764b507060aea.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/f00eb499abb94fa7b799d6d8c9b050e9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/f7d36ffff7a75c9c6216d576a57dd00d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/f7f3f63e7a149cd89eccab3b52171d05.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/fcc41f6a067ddd658bba5c9dff234a32.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/400/fd6ad889fcf3583bd9b0b6db53aad434.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/0c055db157e7a13f3103cc2a6b67fec3.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/0d3f5cc265cb6c439c517f2c4cebbddf.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/1259e5825b314fe2b8bb96d6e8069ee5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/12c518ebfe62818af550c08947e359e7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/145831a59caa06d894022fe60212ed21.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/169a096e61d38a773216f51d1ec2cc06.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/1884a2b22d314c7d57707f03aec348e0.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/1e2640116bbba817f43c43cc69371cf1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/2573703213da30d3ba18925b100b2c2b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/26839c0e47c73514b8d8f660d24d6b19.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/2a22e14a9ad53f2abb3c7e85017b7d12.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/2b3e8c5703b91f39f6027f43f0da6f4b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/2f27ee4fb2cf6a280e110e09c18ef73e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/31342cebfa5ea7fac06b4ea372d96bc5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/375329ba0b50b94b35006498e555867c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/427577dcb707d1d35eebd155b4222aa7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/450a5b53be0a8a778bb0b623e86b652f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/477866c8396474a17317dcac3e7a014f.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/478ebdaadda7775c391c5dcab4e697df.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/48d6a97a185c799be4fe67aaf7edf213.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/490edb9fc8a4356aea556eed32287464.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/4c4bdd0b3f3a52e28f3b643c1c5d43be.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/4c96411f3693a9a8657a9c1190f82bce.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/4c9aa12aba2a6a57410eacaff7427916.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/4cca7233bf8ce5dec2e5d146b993d626.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/4d0a9128d06ea857f203bf5d007b1ab9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/4e5384920bbb155d9d8d74887b09ea5b.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/50cfd672bfa62512ba090420acf35c87.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/551b1d7a0b80c8d42af09863cdca7f01.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/555d990ab3fd7d3d66c6d1fa9a82fec5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/5979c33a7eb5963bf8e83e46931b5fb5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/59966ee0b069b577510fe68c350da0ee.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/60a14064ed334f0155795d795e926abe.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/611b62d5fd9698d9b5ce495ba6f14c93.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/6e83fe0b6e708eaf1c3003d6dee11488.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/70861376e5d4f92f8aa7aa1b2749b617.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/7124d150570d39ced8d45507dc11ca1e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/79a7fdf7d9c722b5723ae25e6ff8e203.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/8c8393bc875f1ee36697a2113f4421ea.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/8e6c9bb43afb8cbbff7cf1055e67c9bd.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/90ac4f9d2aa02afdace2843b49fc18bb.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/90b6f57d77847f512fd11db74fa912f1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/913759e6690f9fc0746a20b96f4bdcb4.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/9154e26efe532a85a27d80902f5a2d6c.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/94e7ed67f1557b76fead6b6e456a0415.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/95127a92346c04fec1fa81d6295b0a28.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/9fbc06b2e3ff16b9d705c76db563ef17.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/a3b929542e6c5a0644b73a7c8a8b6c03.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/a8857f5d478f101c053ba02d2f223e90.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/aa64c9953af43ca65832f413895bb433.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/ada8f0241244c60ec8d3d59ad37f20a5.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/b341de0bc0bfe194a6c28dcfb566029e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/b846c293981ca5429eabaa967f222f26.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/be64f9379412876e00fd3a0bfa6b6fe9.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/befed8a4fa817773fa7109db6fe07f56.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/c09ee2b219982f8d46ad9968b7e6e0ba.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/c39ec937c6a8d124e8b68cf829ea5ad4.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/c3fd21315345ae541f6e98067059fa19.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/c568a16e3168ceb1f191b70022c492ea.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/c5e66d60be3375835bbd8d6b797f6eac.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/cd10a3af2133805d8c92104d1ee6ff18.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/d15a3317942b7d31978a759fbf2222c8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/d740dc2e854aaa7b3dcdd3ed25455eeb.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/d8325ba7ae651bc30440905bd67b95f1.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/e2204cf85edcb96c5de5c3dcf240da9d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/e3e913e145ddcd9323b2a0972967feb6.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/f2fb1f1fbf7e44afb53c672ec286a22e.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/f372129c60aaece937cf7b91ee75c9b8.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/f5d7487963d43c89da63aaf10f2e6fb7.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/f75496953a40ff241178240209f56990.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/f92d74d1d217d21b39075ff23f79f7fd.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/f9d6d981d8b87b3e469027277f585741.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/fa8ed469ef290bfeb571418fe0abb628.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/fb61b690208eff56e6d8432951270901.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/700/ff0937ad63cda71ff420945ead55ab4d.woff2 +0 -0
- package/src/styles/fonts/noto-serif-tc/noto-serif-tc.css +0 -3104
- package/src/ui/__tests__/color-themes.test.ts +0 -48
- package/src/ui/__tests__/font-themes.test.ts +0 -141
- package/src/ui/dash/appearance/__tests__/NavigationContent.test.tsx +0 -54
- package/src/ui/dash/settings/__tests__/AccountMenuContent.test.tsx +0 -67
- package/src/ui/dash/settings/__tests__/GeneralContent.test.tsx +0 -75
- package/src/ui/feed/__tests__/thread-preview.test.ts +0 -316
- package/src/ui/feed/__tests__/timeline-cards.test.ts +0 -353
- package/src/ui/layouts/__tests__/BaseLayout.test.tsx +0 -239
- package/src/ui/layouts/__tests__/SiteLayout.test.tsx +0 -76
- package/src/ui/pages/CollectionEditorPage.tsx +0 -175
- package/src/ui/pages/__tests__/ArchivePage.test.tsx +0 -72
- package/src/ui/shared/__tests__/format-chars.test.ts +0 -35
- package/src/ui/shared/__tests__/home-page-branding.test.tsx +0 -14
- package/src/ui/shared/__tests__/media-gallery.test.ts +0 -109
- package/src/ui/shared/__tests__/navigation-labels.test.ts +0 -154
- package/src/ui/shared/__tests__/pagination.test.ts +0 -63
- package/src/ui/shared/__tests__/post-footer.test.ts +0 -147
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* - SortableJS drag-and-drop reorder with immediate preview update
|
|
8
8
|
* - Add link forms
|
|
9
9
|
* - System nav item toggles with immediate list/preview update
|
|
10
|
-
* -
|
|
10
|
+
* - Applies server-rendered site header fragments after saved changes
|
|
11
11
|
*
|
|
12
12
|
* Light DOM only — BaseCoat and Tailwind classes apply directly.
|
|
13
13
|
*/
|
|
@@ -24,25 +24,66 @@ import {
|
|
|
24
24
|
responsiveSortableOptions,
|
|
25
25
|
revertSortableDomMove,
|
|
26
26
|
} from "../sortable-list.js";
|
|
27
|
+
import { isFeedNavKey } from "../../types/constants.js";
|
|
27
28
|
import { showConfirmDialog } from "../confirm.js";
|
|
28
29
|
import { showToast } from "../toast.js";
|
|
29
|
-
import { publicPath } from "../runtime-paths.js";
|
|
30
|
+
import { publicPath, sitePathPrefix } from "../runtime-paths.js";
|
|
31
|
+
import { applySiteHeaderHtml } from "../site-header-fragment.js";
|
|
32
|
+
import { getCollectionPagePath } from "../../lib/collection-paths.js";
|
|
33
|
+
import { FUNNEL_ICON_SVG } from "../icons.js";
|
|
34
|
+
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
35
|
+
import { getSlugValidationIssue } from "../../lib/slug-format.js";
|
|
36
|
+
import {
|
|
37
|
+
looksLikeAddress,
|
|
38
|
+
normalizePath,
|
|
39
|
+
toInternalPath,
|
|
40
|
+
} from "../../lib/url.js";
|
|
41
|
+
import type { CollectionSubmitDetail } from "./collection-types.js";
|
|
42
|
+
import "./jant-collection-form.js";
|
|
43
|
+
import { openCollectionDialog } from "../collection-dialog-host.js";
|
|
30
44
|
import type {
|
|
45
|
+
NavAddressResolution,
|
|
31
46
|
NavManagerCollection,
|
|
32
47
|
NavManagerItem,
|
|
33
48
|
NavManagerLabels,
|
|
34
|
-
|
|
35
|
-
|
|
49
|
+
NavManagerPage,
|
|
50
|
+
NavManagerSuggestedLink,
|
|
36
51
|
SystemNavConfig,
|
|
37
52
|
} from "./nav-manager-types.js";
|
|
38
53
|
|
|
54
|
+
const SITE_HEADER_REQUEST_HEADER = "X-Jant-Site-Header";
|
|
55
|
+
const INCLUDE_SITE_HEADER_RESPONSE = "include";
|
|
56
|
+
|
|
57
|
+
type NavManagerMutationResponse<T extends object> = T & {
|
|
58
|
+
headerHtml?: string;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
type SortableEndEvent = Parameters<NonNullable<SortableOptions["onEnd"]>>[0];
|
|
62
|
+
|
|
63
|
+
type PageDialogView = "picker" | "create" | "created";
|
|
64
|
+
type CollectionDialogView = "create" | "created";
|
|
65
|
+
|
|
66
|
+
interface CreatedPage {
|
|
67
|
+
id: string;
|
|
68
|
+
title: string;
|
|
69
|
+
slug: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface CreatedCollection {
|
|
73
|
+
id: string;
|
|
74
|
+
title: string;
|
|
75
|
+
slug: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
39
78
|
export class JantNavManager extends LitElement {
|
|
40
79
|
static properties = {
|
|
41
80
|
items: { type: Array },
|
|
42
81
|
labels: { type: Object },
|
|
43
82
|
systemNavItems: { type: Array, attribute: "system-nav-items" },
|
|
44
83
|
collections: { type: Array },
|
|
84
|
+
suggestedLinks: { type: Array, attribute: "suggested-links" },
|
|
45
85
|
siteName: { type: String, attribute: "site-name" },
|
|
86
|
+
rssFeedsEnabled: { type: Boolean, attribute: "rss-feeds-enabled" },
|
|
46
87
|
|
|
47
88
|
_items: { state: true },
|
|
48
89
|
_editingId: { state: true },
|
|
@@ -56,13 +97,38 @@ export class JantNavManager extends LitElement {
|
|
|
56
97
|
_showPreviewMore: { state: true },
|
|
57
98
|
_addingCollectionId: { state: true },
|
|
58
99
|
_showCollectionPicker: { state: true },
|
|
100
|
+
_collectionDialogOpen: { state: true },
|
|
101
|
+
_collectionDialogView: { state: true },
|
|
102
|
+
_creatingCollection: { state: true },
|
|
103
|
+
_createCollectionError: { state: true },
|
|
104
|
+
_createdCollection: { state: true },
|
|
105
|
+
_addingSuggestedKey: { state: true },
|
|
106
|
+
_pageDialogOpen: { state: true },
|
|
107
|
+
_pageDialogView: { state: true },
|
|
108
|
+
_pageQuery: { state: true },
|
|
109
|
+
_pages: { state: true },
|
|
110
|
+
_pageAddress: { state: true },
|
|
111
|
+
_pageSearchLoading: { state: true },
|
|
112
|
+
_pageSearchError: { state: true },
|
|
113
|
+
_selectedPageIndex: { state: true },
|
|
114
|
+
_addingPageId: { state: true },
|
|
115
|
+
_newPageTitle: { state: true },
|
|
116
|
+
_newPageSlug: { state: true },
|
|
117
|
+
_slugEdited: { state: true },
|
|
118
|
+
_slugCheckLoading: { state: true },
|
|
119
|
+
_slugTaken: { state: true },
|
|
120
|
+
_creatingPage: { state: true },
|
|
121
|
+
_createPageError: { state: true },
|
|
122
|
+
_createdPage: { state: true },
|
|
59
123
|
};
|
|
60
124
|
|
|
61
125
|
declare items: NavManagerItem[];
|
|
62
126
|
declare labels: NavManagerLabels;
|
|
63
127
|
declare systemNavItems: SystemNavConfig[];
|
|
64
128
|
declare collections: NavManagerCollection[];
|
|
129
|
+
declare suggestedLinks: NavManagerSuggestedLink[];
|
|
65
130
|
declare siteName: string;
|
|
131
|
+
declare rssFeedsEnabled: boolean;
|
|
66
132
|
|
|
67
133
|
declare _items: NavManagerItem[];
|
|
68
134
|
declare _editingId: string | null;
|
|
@@ -78,11 +144,42 @@ export class JantNavManager extends LitElement {
|
|
|
78
144
|
/** ID of the collection currently being added (for loading state) */
|
|
79
145
|
declare _addingCollectionId: string | null;
|
|
80
146
|
declare _showCollectionPicker: boolean;
|
|
147
|
+
declare _collectionDialogOpen: boolean;
|
|
148
|
+
declare _collectionDialogView: CollectionDialogView;
|
|
149
|
+
declare _creatingCollection: boolean;
|
|
150
|
+
declare _createCollectionError: string;
|
|
151
|
+
declare _createdCollection: CreatedCollection | null;
|
|
152
|
+
/** Key of the suggested link currently being added */
|
|
153
|
+
declare _addingSuggestedKey: string | null;
|
|
154
|
+
declare _pageDialogOpen: boolean;
|
|
155
|
+
declare _pageDialogView: PageDialogView;
|
|
156
|
+
declare _pageQuery: string;
|
|
157
|
+
declare _pages: NavManagerPage[];
|
|
158
|
+
/** What the last pasted address turned out to be, when one was pasted. */
|
|
159
|
+
declare _pageAddress: NavAddressResolution | null;
|
|
160
|
+
declare _pageSearchLoading: boolean;
|
|
161
|
+
declare _pageSearchError: boolean;
|
|
162
|
+
declare _selectedPageIndex: number;
|
|
163
|
+
declare _addingPageId: string | null;
|
|
164
|
+
declare _newPageTitle: string;
|
|
165
|
+
declare _newPageSlug: string;
|
|
166
|
+
declare _slugEdited: boolean;
|
|
167
|
+
declare _slugCheckLoading: boolean;
|
|
168
|
+
declare _slugTaken: boolean;
|
|
169
|
+
declare _creatingPage: boolean;
|
|
170
|
+
declare _createPageError: string;
|
|
171
|
+
declare _createdPage: CreatedPage | null;
|
|
81
172
|
|
|
82
173
|
#sortableHeader: { destroy(): void } | null = null;
|
|
83
174
|
#sortableMore: { destroy(): void } | null = null;
|
|
84
175
|
#initialized = false;
|
|
85
176
|
#revertNextSibling: Node | null = null;
|
|
177
|
+
#pageSearchTimer: ReturnType<typeof setTimeout> | null = null;
|
|
178
|
+
#pageSearchRequestId = 0;
|
|
179
|
+
#slugSuggestTimer: ReturnType<typeof setTimeout> | null = null;
|
|
180
|
+
#slugSuggestRequestId = 0;
|
|
181
|
+
#slugCheckTimer: ReturnType<typeof setTimeout> | null = null;
|
|
182
|
+
#slugCheckRequestId = 0;
|
|
86
183
|
#closeLinkForm = () => {
|
|
87
184
|
this._showLinkForm = false;
|
|
88
185
|
document.removeEventListener("click", this.#closeLinkForm);
|
|
@@ -103,11 +200,30 @@ export class JantNavManager extends LitElement {
|
|
|
103
200
|
if (!("key" in event) || event.key !== "Escape" || !this._showPreviewMore) {
|
|
104
201
|
return;
|
|
105
202
|
}
|
|
203
|
+
// Defensive: nav editor has many text inputs; let IME swallow Escape
|
|
204
|
+
// when the user is dismissing a CJK candidate popup.
|
|
205
|
+
const ke = event as globalThis.KeyboardEvent;
|
|
206
|
+
if (ke.isComposing || ke.keyCode === 229) return;
|
|
106
207
|
|
|
107
208
|
event.preventDefault();
|
|
108
209
|
this.#closePreviewMore();
|
|
109
210
|
this.querySelector<HTMLElement>("[data-preview-more-trigger]")?.focus();
|
|
110
211
|
};
|
|
212
|
+
#handleCollectionPickerKeydown = (event: globalThis.KeyboardEvent) => {
|
|
213
|
+
if (
|
|
214
|
+
event.key !== "Escape" ||
|
|
215
|
+
event.isComposing ||
|
|
216
|
+
event.keyCode === 229 ||
|
|
217
|
+
!this._showCollectionPicker
|
|
218
|
+
) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
event.preventDefault();
|
|
223
|
+
event.stopPropagation();
|
|
224
|
+
this.#closeCollectionPicker();
|
|
225
|
+
this.querySelector<HTMLElement>("[data-add-collection-trigger]")?.focus();
|
|
226
|
+
};
|
|
111
227
|
|
|
112
228
|
createRenderRoot() {
|
|
113
229
|
this.innerHTML = "";
|
|
@@ -120,7 +236,9 @@ export class JantNavManager extends LitElement {
|
|
|
120
236
|
this.labels = {} as NavManagerLabels;
|
|
121
237
|
this.systemNavItems = [];
|
|
122
238
|
this.collections = [];
|
|
239
|
+
this.suggestedLinks = [];
|
|
123
240
|
this.siteName = "";
|
|
241
|
+
this.rssFeedsEnabled = false;
|
|
124
242
|
|
|
125
243
|
this._items = [];
|
|
126
244
|
this._editingId = null;
|
|
@@ -134,6 +252,29 @@ export class JantNavManager extends LitElement {
|
|
|
134
252
|
this._showPreviewMore = false;
|
|
135
253
|
this._addingCollectionId = null;
|
|
136
254
|
this._showCollectionPicker = false;
|
|
255
|
+
this._collectionDialogOpen = false;
|
|
256
|
+
this._collectionDialogView = "create";
|
|
257
|
+
this._creatingCollection = false;
|
|
258
|
+
this._createCollectionError = "";
|
|
259
|
+
this._createdCollection = null;
|
|
260
|
+
this._addingSuggestedKey = null;
|
|
261
|
+
this._pageDialogOpen = false;
|
|
262
|
+
this._pageDialogView = "picker";
|
|
263
|
+
this._pageQuery = "";
|
|
264
|
+
this._pages = [];
|
|
265
|
+
this._pageAddress = null;
|
|
266
|
+
this._pageSearchLoading = false;
|
|
267
|
+
this._pageSearchError = false;
|
|
268
|
+
this._selectedPageIndex = 0;
|
|
269
|
+
this._addingPageId = null;
|
|
270
|
+
this._newPageTitle = "";
|
|
271
|
+
this._newPageSlug = "";
|
|
272
|
+
this._slugEdited = false;
|
|
273
|
+
this._slugCheckLoading = false;
|
|
274
|
+
this._slugTaken = false;
|
|
275
|
+
this._creatingPage = false;
|
|
276
|
+
this._createPageError = "";
|
|
277
|
+
this._createdPage = null;
|
|
137
278
|
}
|
|
138
279
|
|
|
139
280
|
protected update(changedProperties: PropertyValueMap<JantNavManager>): void {
|
|
@@ -145,7 +286,7 @@ export class JantNavManager extends LitElement {
|
|
|
145
286
|
}
|
|
146
287
|
|
|
147
288
|
protected updated(): void {
|
|
148
|
-
if (this._showPreviewMore && this.#
|
|
289
|
+
if (this._showPreviewMore && this.#previewMoreItems.length === 0) {
|
|
149
290
|
this.#closePreviewMore();
|
|
150
291
|
}
|
|
151
292
|
this.#initSortable();
|
|
@@ -160,6 +301,544 @@ export class JantNavManager extends LitElement {
|
|
|
160
301
|
document.removeEventListener("click", this.#closeLinkForm);
|
|
161
302
|
document.removeEventListener("click", this.#closeCollectionPicker);
|
|
162
303
|
this.#closePreviewMore();
|
|
304
|
+
this.#cancelPageDialogRequests();
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
#jsonMutationHeaders(): Record<string, string> {
|
|
308
|
+
return {
|
|
309
|
+
"Content-Type": "application/json",
|
|
310
|
+
Accept: "application/json",
|
|
311
|
+
[SITE_HEADER_REQUEST_HEADER]: INCLUDE_SITE_HEADER_RESPONSE,
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
#deleteMutationHeaders(): Record<string, string> {
|
|
316
|
+
return {
|
|
317
|
+
Accept: "application/json",
|
|
318
|
+
[SITE_HEADER_REQUEST_HEADER]: INCLUDE_SITE_HEADER_RESPONSE,
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
#stripHeaderHtml<T extends object>(
|
|
323
|
+
response: NavManagerMutationResponse<T>,
|
|
324
|
+
): T {
|
|
325
|
+
const body = { ...response };
|
|
326
|
+
delete (body as { headerHtml?: string }).headerHtml;
|
|
327
|
+
return body as T;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
#normalizeItem(item: NavManagerItem): NavManagerItem {
|
|
331
|
+
const systemLabel =
|
|
332
|
+
item.type === "system"
|
|
333
|
+
? this.systemNavItems.find((config) => config.key === item.systemKey)
|
|
334
|
+
?.label
|
|
335
|
+
: undefined;
|
|
336
|
+
// `targetTitle` comes back on mutation responses, which carry the raw nav
|
|
337
|
+
// item rather than the server-rendered `displayLabel` — without it a page
|
|
338
|
+
// or collection added with no label of its own would render blank until
|
|
339
|
+
// the next full load.
|
|
340
|
+
const displayLabel =
|
|
341
|
+
item.label.trim() ||
|
|
342
|
+
systemLabel ||
|
|
343
|
+
item.displayLabel ||
|
|
344
|
+
item.targetTitle?.trim() ||
|
|
345
|
+
item.label;
|
|
346
|
+
|
|
347
|
+
return { ...item, displayLabel };
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// ===========================================================================
|
|
351
|
+
// Page picker and quick-create dialog
|
|
352
|
+
// ===========================================================================
|
|
353
|
+
|
|
354
|
+
#cancelPageDialogRequests() {
|
|
355
|
+
if (this.#pageSearchTimer !== null) {
|
|
356
|
+
clearTimeout(this.#pageSearchTimer);
|
|
357
|
+
this.#pageSearchTimer = null;
|
|
358
|
+
}
|
|
359
|
+
if (this.#slugSuggestTimer !== null) {
|
|
360
|
+
clearTimeout(this.#slugSuggestTimer);
|
|
361
|
+
this.#slugSuggestTimer = null;
|
|
362
|
+
}
|
|
363
|
+
if (this.#slugCheckTimer !== null) {
|
|
364
|
+
clearTimeout(this.#slugCheckTimer);
|
|
365
|
+
this.#slugCheckTimer = null;
|
|
366
|
+
}
|
|
367
|
+
this.#pageSearchRequestId += 1;
|
|
368
|
+
this.#slugSuggestRequestId += 1;
|
|
369
|
+
this.#slugCheckRequestId += 1;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
async #openPageDialog() {
|
|
373
|
+
if (this._pageDialogOpen) return;
|
|
374
|
+
|
|
375
|
+
this.#cancelPageDialogRequests();
|
|
376
|
+
this._pageDialogOpen = true;
|
|
377
|
+
this._pageDialogView = "picker";
|
|
378
|
+
this._pageQuery = "";
|
|
379
|
+
this._pages = [];
|
|
380
|
+
this._pageAddress = null;
|
|
381
|
+
this._pageSearchError = false;
|
|
382
|
+
this._selectedPageIndex = 0;
|
|
383
|
+
this._addingPageId = null;
|
|
384
|
+
this._newPageTitle = "";
|
|
385
|
+
this._newPageSlug = "";
|
|
386
|
+
this._slugEdited = false;
|
|
387
|
+
this._slugCheckLoading = false;
|
|
388
|
+
this._slugTaken = false;
|
|
389
|
+
this._creatingPage = false;
|
|
390
|
+
this._createPageError = "";
|
|
391
|
+
this._createdPage = null;
|
|
392
|
+
|
|
393
|
+
await this.updateComplete;
|
|
394
|
+
const dialog = this.querySelector<HTMLDialogElement>("#nav-page-dialog");
|
|
395
|
+
if (dialog && !dialog.open) dialog.showModal();
|
|
396
|
+
this.querySelector<HTMLInputElement>("#nav-page-search")?.focus();
|
|
397
|
+
void this.#loadPageCandidates();
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
#closePageDialog() {
|
|
401
|
+
const trigger = this.querySelector<HTMLElement>("[data-add-page-trigger]");
|
|
402
|
+
const dialog = this.querySelector<HTMLDialogElement>("#nav-page-dialog");
|
|
403
|
+
if (dialog?.open) dialog.close();
|
|
404
|
+
this.#cancelPageDialogRequests();
|
|
405
|
+
this._pageDialogOpen = false;
|
|
406
|
+
void this.updateComplete.then(() => trigger?.focus());
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Look up the page at an address the author pasted.
|
|
411
|
+
*
|
|
412
|
+
* Searching titles cannot answer someone holding a URL, and the answer is
|
|
413
|
+
* often a reason rather than a result — a draft, a private page, a page that
|
|
414
|
+
* is already in the menu.
|
|
415
|
+
*/
|
|
416
|
+
async #lookUpPageAddress(address: string) {
|
|
417
|
+
const requestId = ++this.#pageSearchRequestId;
|
|
418
|
+
const params = new URLSearchParams({ url: address });
|
|
419
|
+
|
|
420
|
+
this._pageSearchLoading = true;
|
|
421
|
+
this._pageSearchError = false;
|
|
422
|
+
try {
|
|
423
|
+
const res = await fetch(`/api/nav-items/resolve?${params.toString()}`, {
|
|
424
|
+
headers: { Accept: "application/json" },
|
|
425
|
+
});
|
|
426
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
427
|
+
const json = (await res.json()) as {
|
|
428
|
+
resolution?: NavAddressResolution;
|
|
429
|
+
};
|
|
430
|
+
if (requestId !== this.#pageSearchRequestId) return;
|
|
431
|
+
|
|
432
|
+
this._pages = [];
|
|
433
|
+
this._pageAddress = json.resolution ?? null;
|
|
434
|
+
this._selectedPageIndex = 0;
|
|
435
|
+
} catch {
|
|
436
|
+
if (requestId === this.#pageSearchRequestId) {
|
|
437
|
+
this._pages = [];
|
|
438
|
+
this._pageAddress = null;
|
|
439
|
+
this._pageSearchError = true;
|
|
440
|
+
}
|
|
441
|
+
} finally {
|
|
442
|
+
if (requestId === this.#pageSearchRequestId) {
|
|
443
|
+
this._pageSearchLoading = false;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
async #loadPageCandidates() {
|
|
449
|
+
const requestId = ++this.#pageSearchRequestId;
|
|
450
|
+
const params = new URLSearchParams({ limit: "20" });
|
|
451
|
+
const query = this._pageQuery.trim();
|
|
452
|
+
if (query) params.set("q", query);
|
|
453
|
+
|
|
454
|
+
this._pageSearchLoading = true;
|
|
455
|
+
this._pageSearchError = false;
|
|
456
|
+
this._pageAddress = null;
|
|
457
|
+
try {
|
|
458
|
+
const res = await fetch(`/api/nav-items/pages?${params.toString()}`, {
|
|
459
|
+
headers: { Accept: "application/json" },
|
|
460
|
+
});
|
|
461
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
462
|
+
const json = (await res.json()) as { pages?: NavManagerPage[] };
|
|
463
|
+
if (requestId !== this.#pageSearchRequestId) return;
|
|
464
|
+
|
|
465
|
+
const addedPostIds = new Set(
|
|
466
|
+
this._items.flatMap((item) =>
|
|
467
|
+
item.type === "page" && item.postId ? [item.postId] : [],
|
|
468
|
+
),
|
|
469
|
+
);
|
|
470
|
+
this._pages = (json.pages ?? []).filter(
|
|
471
|
+
(page) => !addedPostIds.has(page.id),
|
|
472
|
+
);
|
|
473
|
+
this._selectedPageIndex = 0;
|
|
474
|
+
} catch {
|
|
475
|
+
if (requestId === this.#pageSearchRequestId) {
|
|
476
|
+
this._pages = [];
|
|
477
|
+
this._pageSearchError = true;
|
|
478
|
+
}
|
|
479
|
+
} finally {
|
|
480
|
+
if (requestId === this.#pageSearchRequestId) {
|
|
481
|
+
this._pageSearchLoading = false;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
#schedulePageSearch() {
|
|
487
|
+
if (this.#pageSearchTimer !== null) {
|
|
488
|
+
clearTimeout(this.#pageSearchTimer);
|
|
489
|
+
}
|
|
490
|
+
this.#pageSearchTimer = setTimeout(() => {
|
|
491
|
+
this.#pageSearchTimer = null;
|
|
492
|
+
const query = this._pageQuery.trim();
|
|
493
|
+
void (looksLikeAddress(query)
|
|
494
|
+
? this.#lookUpPageAddress(query)
|
|
495
|
+
: this.#loadPageCandidates());
|
|
496
|
+
}, 200);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
async #addPageToNavigation(page: CreatedPage) {
|
|
500
|
+
if (this._addingPageId) return;
|
|
501
|
+
|
|
502
|
+
this._addingPageId = page.id;
|
|
503
|
+
try {
|
|
504
|
+
const res = await fetch("/api/nav-items", {
|
|
505
|
+
method: "POST",
|
|
506
|
+
headers: this.#jsonMutationHeaders(),
|
|
507
|
+
body: JSON.stringify({
|
|
508
|
+
type: "page",
|
|
509
|
+
postId: page.id,
|
|
510
|
+
placement: "header",
|
|
511
|
+
}),
|
|
512
|
+
});
|
|
513
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
514
|
+
|
|
515
|
+
const response =
|
|
516
|
+
(await res.json()) as NavManagerMutationResponse<NavManagerItem>;
|
|
517
|
+
const created = this.#normalizeItem(this.#stripHeaderHtml(response));
|
|
518
|
+
this.#destroySortables();
|
|
519
|
+
this._items = [...this._items, created];
|
|
520
|
+
this._pages = this._pages.filter((candidate) => candidate.id !== page.id);
|
|
521
|
+
applySiteHeaderHtml(response.headerHtml);
|
|
522
|
+
showToast(this.labels.pageAdded);
|
|
523
|
+
|
|
524
|
+
this.#closePageDialog();
|
|
525
|
+
} catch {
|
|
526
|
+
showToast(this.labels.saveFailed, "error");
|
|
527
|
+
} finally {
|
|
528
|
+
this._addingPageId = null;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
#showCreatePage() {
|
|
533
|
+
this.#pageSearchRequestId += 1;
|
|
534
|
+
this._pageDialogView = "create";
|
|
535
|
+
this._newPageTitle = "";
|
|
536
|
+
this._newPageSlug = "";
|
|
537
|
+
this._slugEdited = false;
|
|
538
|
+
this._slugCheckLoading = false;
|
|
539
|
+
this._slugTaken = false;
|
|
540
|
+
this._createPageError = "";
|
|
541
|
+
void this.updateComplete.then(() => {
|
|
542
|
+
this.querySelector<HTMLInputElement>("#nav-new-page-title")?.focus();
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
#showPagePicker() {
|
|
547
|
+
this.#slugSuggestRequestId += 1;
|
|
548
|
+
this.#slugCheckRequestId += 1;
|
|
549
|
+
this._pageDialogView = "picker";
|
|
550
|
+
this._createPageError = "";
|
|
551
|
+
void this.updateComplete.then(() => {
|
|
552
|
+
this.querySelector<HTMLInputElement>("#nav-page-search")?.focus();
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
#scheduleSlugSuggestion() {
|
|
557
|
+
if (this._slugEdited) return;
|
|
558
|
+
if (this.#slugSuggestTimer !== null) {
|
|
559
|
+
clearTimeout(this.#slugSuggestTimer);
|
|
560
|
+
}
|
|
561
|
+
const title = this._newPageTitle.trim();
|
|
562
|
+
if (!title) {
|
|
563
|
+
this._newPageSlug = "";
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
this.#slugSuggestTimer = setTimeout(() => {
|
|
567
|
+
this.#slugSuggestTimer = null;
|
|
568
|
+
void this.#suggestPageSlug(title);
|
|
569
|
+
}, 250);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
async #suggestPageSlug(title: string) {
|
|
573
|
+
const requestId = ++this.#slugSuggestRequestId;
|
|
574
|
+
const params = new URLSearchParams({ mode: "suggest", title });
|
|
575
|
+
try {
|
|
576
|
+
const res = await fetch(`/api/posts/slug?${params.toString()}`, {
|
|
577
|
+
headers: { Accept: "application/json" },
|
|
578
|
+
});
|
|
579
|
+
if (!res.ok) return;
|
|
580
|
+
const json = (await res.json()) as { slug?: string };
|
|
581
|
+
if (
|
|
582
|
+
requestId !== this.#slugSuggestRequestId ||
|
|
583
|
+
this._slugEdited ||
|
|
584
|
+
this._pageDialogView !== "create"
|
|
585
|
+
) {
|
|
586
|
+
return;
|
|
587
|
+
}
|
|
588
|
+
this._newPageSlug = json.slug?.trim() ?? "";
|
|
589
|
+
this._slugTaken = false;
|
|
590
|
+
} catch {
|
|
591
|
+
// Slug suggestion is optional; the create endpoint can generate one.
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
#scheduleSlugCheck() {
|
|
596
|
+
if (this.#slugCheckTimer !== null) {
|
|
597
|
+
clearTimeout(this.#slugCheckTimer);
|
|
598
|
+
}
|
|
599
|
+
this._slugTaken = false;
|
|
600
|
+
const slug = this._newPageSlug.trim();
|
|
601
|
+
if (!slug || getSlugValidationIssue(slug, { maxLength: 200 })) {
|
|
602
|
+
this._slugCheckLoading = false;
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
this._slugCheckLoading = true;
|
|
607
|
+
this.#slugCheckTimer = setTimeout(() => {
|
|
608
|
+
this.#slugCheckTimer = null;
|
|
609
|
+
void this.#checkPageSlug(slug);
|
|
610
|
+
}, 250);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
async #checkPageSlug(slug: string) {
|
|
614
|
+
const requestId = ++this.#slugCheckRequestId;
|
|
615
|
+
const params = new URLSearchParams({ mode: "check", slug });
|
|
616
|
+
try {
|
|
617
|
+
const res = await fetch(`/api/posts/slug?${params.toString()}`, {
|
|
618
|
+
headers: { Accept: "application/json" },
|
|
619
|
+
});
|
|
620
|
+
if (!res.ok) return;
|
|
621
|
+
const json = (await res.json()) as { available?: boolean };
|
|
622
|
+
if (
|
|
623
|
+
requestId !== this.#slugCheckRequestId ||
|
|
624
|
+
this._newPageSlug.trim() !== slug
|
|
625
|
+
) {
|
|
626
|
+
return;
|
|
627
|
+
}
|
|
628
|
+
this._slugTaken = json.available === false;
|
|
629
|
+
} catch {
|
|
630
|
+
// The create endpoint remains the final authority for slug conflicts.
|
|
631
|
+
} finally {
|
|
632
|
+
if (requestId === this.#slugCheckRequestId) {
|
|
633
|
+
this._slugCheckLoading = false;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
#pageSlugError(): string {
|
|
639
|
+
const issue = getSlugValidationIssue(this._newPageSlug, { maxLength: 200 });
|
|
640
|
+
if (issue === "invalid") return this.labels.slugInvalid;
|
|
641
|
+
if (issue === "reserved") return this.labels.slugReserved;
|
|
642
|
+
if (issue === "too_long") return this.labels.slugTooLong;
|
|
643
|
+
if (this._slugTaken) return this.labels.slugUnavailable;
|
|
644
|
+
return "";
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
async #createPage() {
|
|
648
|
+
const title = this._newPageTitle.trim();
|
|
649
|
+
const slug = this._newPageSlug.trim();
|
|
650
|
+
if (!title) {
|
|
651
|
+
this._createPageError = this.labels.titleRequired;
|
|
652
|
+
return;
|
|
653
|
+
}
|
|
654
|
+
const slugError = this.#pageSlugError();
|
|
655
|
+
if (slugError) {
|
|
656
|
+
this._createPageError = slugError;
|
|
657
|
+
return;
|
|
658
|
+
}
|
|
659
|
+
if (this._slugCheckLoading) return;
|
|
660
|
+
|
|
661
|
+
this._creatingPage = true;
|
|
662
|
+
this._createPageError = "";
|
|
663
|
+
try {
|
|
664
|
+
const res = await fetch("/api/posts", {
|
|
665
|
+
method: "POST",
|
|
666
|
+
headers: {
|
|
667
|
+
"Content-Type": "application/json",
|
|
668
|
+
Accept: "application/json",
|
|
669
|
+
},
|
|
670
|
+
body: JSON.stringify({
|
|
671
|
+
format: "note",
|
|
672
|
+
title,
|
|
673
|
+
...(slug && { slug }),
|
|
674
|
+
status: "published",
|
|
675
|
+
visibility: "latest_hidden",
|
|
676
|
+
}),
|
|
677
|
+
});
|
|
678
|
+
if (!res.ok) {
|
|
679
|
+
if (res.status === 409) {
|
|
680
|
+
this._slugTaken = true;
|
|
681
|
+
this._createPageError = this.labels.slugUnavailable;
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
throw new Error(`HTTP ${res.status}`);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
const created = (await res.json()) as CreatedPage;
|
|
688
|
+
this._createdPage = {
|
|
689
|
+
id: created.id,
|
|
690
|
+
title: created.title || title,
|
|
691
|
+
slug: created.slug,
|
|
692
|
+
};
|
|
693
|
+
this._pageDialogView = "created";
|
|
694
|
+
} catch {
|
|
695
|
+
this._createPageError = this.labels.createPageFailed;
|
|
696
|
+
} finally {
|
|
697
|
+
this._creatingPage = false;
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
#handlePageDialogKeydown(event: globalThis.KeyboardEvent) {
|
|
702
|
+
if (event.isComposing || event.keyCode === 229) return;
|
|
703
|
+
|
|
704
|
+
if (event.key === "Escape") {
|
|
705
|
+
event.preventDefault();
|
|
706
|
+
this.#closePageDialog();
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
if (this._pageDialogView !== "picker") return;
|
|
711
|
+
if (event.target !== this.querySelector("#nav-page-search")) return;
|
|
712
|
+
if (event.key === "ArrowDown") {
|
|
713
|
+
event.preventDefault();
|
|
714
|
+
this._selectedPageIndex =
|
|
715
|
+
this._pages.length > 0
|
|
716
|
+
? (this._selectedPageIndex + 1) % this._pages.length
|
|
717
|
+
: 0;
|
|
718
|
+
this.#scrollSelectedPageIntoView();
|
|
719
|
+
} else if (event.key === "ArrowUp") {
|
|
720
|
+
event.preventDefault();
|
|
721
|
+
this._selectedPageIndex =
|
|
722
|
+
this._pages.length > 0
|
|
723
|
+
? (this._selectedPageIndex - 1 + this._pages.length) %
|
|
724
|
+
this._pages.length
|
|
725
|
+
: 0;
|
|
726
|
+
this.#scrollSelectedPageIntoView();
|
|
727
|
+
} else if (event.key === "Enter" && this._pages.length > 0) {
|
|
728
|
+
event.preventDefault();
|
|
729
|
+
const page = this._pages[this._selectedPageIndex];
|
|
730
|
+
if (page) void this.#addPageToNavigation(page);
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
#scrollSelectedPageIntoView() {
|
|
735
|
+
requestAnimationFrame(() => {
|
|
736
|
+
this.querySelector(".nav-page-result-selected")?.scrollIntoView({
|
|
737
|
+
block: "nearest",
|
|
738
|
+
});
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
// ===========================================================================
|
|
743
|
+
// Collection quick-create dialog
|
|
744
|
+
// ===========================================================================
|
|
745
|
+
|
|
746
|
+
async #openCollectionDialog() {
|
|
747
|
+
if (this._collectionDialogOpen) return;
|
|
748
|
+
|
|
749
|
+
this.#closeCollectionPicker();
|
|
750
|
+
this._collectionDialogOpen = true;
|
|
751
|
+
this._collectionDialogView = "create";
|
|
752
|
+
this._creatingCollection = false;
|
|
753
|
+
this._createCollectionError = "";
|
|
754
|
+
this._createdCollection = null;
|
|
755
|
+
|
|
756
|
+
await this.updateComplete;
|
|
757
|
+
const dialog = this.querySelector<HTMLDialogElement>(
|
|
758
|
+
"#nav-collection-dialog",
|
|
759
|
+
);
|
|
760
|
+
if (dialog && !dialog.open) dialog.showModal();
|
|
761
|
+
const titleInput = this.querySelector<HTMLInputElement>(
|
|
762
|
+
"#nav-collection-dialog [data-collection-title-input]",
|
|
763
|
+
);
|
|
764
|
+
titleInput?.focus();
|
|
765
|
+
titleInput?.select();
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
#closeCollectionDialog() {
|
|
769
|
+
const trigger = this.querySelector<HTMLElement>(
|
|
770
|
+
"[data-add-collection-trigger]",
|
|
771
|
+
);
|
|
772
|
+
const dialog = this.querySelector<HTMLDialogElement>(
|
|
773
|
+
"#nav-collection-dialog",
|
|
774
|
+
);
|
|
775
|
+
if (dialog?.open) dialog.close();
|
|
776
|
+
this._collectionDialogOpen = false;
|
|
777
|
+
this._creatingCollection = false;
|
|
778
|
+
this._createCollectionError = "";
|
|
779
|
+
void this.updateComplete.then(() => trigger?.focus());
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
#handleCollectionDialogKeydown(event: globalThis.KeyboardEvent) {
|
|
783
|
+
if (event.isComposing || event.keyCode === 229) return;
|
|
784
|
+
if (event.key !== "Escape") return;
|
|
785
|
+
|
|
786
|
+
event.preventDefault();
|
|
787
|
+
this.#closeCollectionDialog();
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
#submitCollectionForm() {
|
|
791
|
+
this.querySelector<HTMLFormElement>(
|
|
792
|
+
"#nav-collection-dialog jant-collection-form form",
|
|
793
|
+
)?.requestSubmit();
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
async #handleCreateCollectionSubmit(event: Event) {
|
|
797
|
+
const submitEvent = event as CustomEvent<CollectionSubmitDetail>;
|
|
798
|
+
submitEvent.stopPropagation();
|
|
799
|
+
if (!submitEvent.detail || this._creatingCollection) return;
|
|
800
|
+
|
|
801
|
+
const form = this.querySelector(
|
|
802
|
+
"#nav-collection-dialog jant-collection-form",
|
|
803
|
+
) as (HTMLElement & { loading: boolean }) | null;
|
|
804
|
+
this._creatingCollection = true;
|
|
805
|
+
this._createCollectionError = "";
|
|
806
|
+
if (form) form.loading = true;
|
|
807
|
+
|
|
808
|
+
try {
|
|
809
|
+
const res = await fetch("/api/collections", {
|
|
810
|
+
method: "POST",
|
|
811
|
+
headers: {
|
|
812
|
+
"Content-Type": "application/json",
|
|
813
|
+
Accept: "application/json",
|
|
814
|
+
},
|
|
815
|
+
body: JSON.stringify(submitEvent.detail.data),
|
|
816
|
+
});
|
|
817
|
+
const created = (await res.json().catch(() => null)) as
|
|
818
|
+
(CreatedCollection & { error?: string }) | null;
|
|
819
|
+
if (!res.ok || !created?.id || !created.title || !created.slug) {
|
|
820
|
+
throw new Error("Invalid collection response");
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
const newCollection: NavManagerCollection = {
|
|
824
|
+
id: created.id,
|
|
825
|
+
title: created.title,
|
|
826
|
+
slug: created.slug,
|
|
827
|
+
group: null,
|
|
828
|
+
};
|
|
829
|
+
if (
|
|
830
|
+
!this.collections.some((collection) => collection.id === created.id)
|
|
831
|
+
) {
|
|
832
|
+
this.collections = [...this.collections, newCollection];
|
|
833
|
+
}
|
|
834
|
+
this._createdCollection = created;
|
|
835
|
+
this._collectionDialogView = "created";
|
|
836
|
+
} catch {
|
|
837
|
+
this._createCollectionError = this.labels.createCollectionFailed;
|
|
838
|
+
} finally {
|
|
839
|
+
this._creatingCollection = false;
|
|
840
|
+
if (form) form.loading = false;
|
|
841
|
+
}
|
|
163
842
|
}
|
|
164
843
|
|
|
165
844
|
// ===========================================================================
|
|
@@ -199,119 +878,115 @@ export class JantNavManager extends LitElement {
|
|
|
199
878
|
this.#revertNextSibling = captureSortableRevertNextSibling(evt);
|
|
200
879
|
},
|
|
201
880
|
onEnd: (evt) => {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
targetList.id === "nav-items-header" ? "header" : "more";
|
|
207
|
-
const headerList = this.querySelector<HTMLElement>("#nav-items-header");
|
|
208
|
-
const moreList = this.querySelector<HTMLElement>("#nav-items-more");
|
|
209
|
-
|
|
210
|
-
const movedId = evt.item?.dataset?.navId;
|
|
211
|
-
if (!movedId || !headerList || !moreList) {
|
|
212
|
-
this.#revertNextSibling = null;
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
881
|
+
void this.#handleSortableEnd(evt);
|
|
882
|
+
},
|
|
883
|
+
};
|
|
884
|
+
}
|
|
215
885
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
if (this.#revertNextSibling) {
|
|
226
|
-
sourceList.insertBefore(evt.item, this.#revertNextSibling);
|
|
227
|
-
} else if (
|
|
228
|
-
evt.oldIndex != null &&
|
|
229
|
-
evt.oldIndex < sourceList.children.length
|
|
230
|
-
) {
|
|
231
|
-
sourceList.insertBefore(
|
|
232
|
-
evt.item,
|
|
233
|
-
sourceList.children[evt.oldIndex] ?? null,
|
|
234
|
-
);
|
|
235
|
-
} else {
|
|
236
|
-
sourceList.appendChild(evt.item);
|
|
237
|
-
}
|
|
238
|
-
} else {
|
|
239
|
-
revertSortableDomMove(targetList, evt, this.#revertNextSibling);
|
|
240
|
-
}
|
|
886
|
+
async #handleSortableEnd(evt: SortableEndEvent) {
|
|
887
|
+
const targetList = evt.to;
|
|
888
|
+
const sourceList = evt.from;
|
|
889
|
+
const crossList = sourceList !== targetList;
|
|
890
|
+
const targetPlacement: "header" | "more" =
|
|
891
|
+
targetList.id === "nav-items-header" ? "header" : "more";
|
|
892
|
+
const headerList = this.querySelector<HTMLElement>("#nav-items-header");
|
|
893
|
+
const moreList = this.querySelector<HTMLElement>("#nav-items-more");
|
|
894
|
+
const previousItems = this._items.map((item) => ({ ...item }));
|
|
241
895
|
|
|
242
|
-
|
|
243
|
-
|
|
896
|
+
const movedId = evt.item?.dataset?.navId;
|
|
897
|
+
if (!movedId || !headerList || !moreList) {
|
|
898
|
+
this.#revertNextSibling = null;
|
|
899
|
+
return;
|
|
900
|
+
}
|
|
244
901
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
902
|
+
const headerIds = readSortableDataIds(headerList, "[data-nav-id]", "navId");
|
|
903
|
+
const moreIds = readSortableDataIds(moreList, "[data-nav-id]", "navId");
|
|
904
|
+
|
|
905
|
+
if (crossList) {
|
|
906
|
+
evt.item.parentNode?.removeChild(evt.item);
|
|
907
|
+
if (this.#revertNextSibling) {
|
|
908
|
+
sourceList.insertBefore(evt.item, this.#revertNextSibling);
|
|
909
|
+
} else if (
|
|
910
|
+
evt.oldIndex != null &&
|
|
911
|
+
evt.oldIndex < sourceList.children.length
|
|
912
|
+
) {
|
|
913
|
+
sourceList.insertBefore(
|
|
914
|
+
evt.item,
|
|
915
|
+
sourceList.children[evt.oldIndex] ?? null,
|
|
253
916
|
);
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
|
|
917
|
+
} else {
|
|
918
|
+
sourceList.appendChild(evt.item);
|
|
919
|
+
}
|
|
920
|
+
} else {
|
|
921
|
+
revertSortableDomMove(targetList, evt, this.#revertNextSibling);
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
this.#revertNextSibling = null;
|
|
925
|
+
this.#destroySortables();
|
|
926
|
+
|
|
927
|
+
const orderedIds = [...new Set([...headerIds, ...moreIds])];
|
|
928
|
+
const itemMap = new Map(
|
|
929
|
+
this._items.map((item) => [
|
|
930
|
+
item.id,
|
|
931
|
+
item.id === movedId
|
|
932
|
+
? { ...item, placement: targetPlacement }
|
|
933
|
+
: { ...item },
|
|
934
|
+
]),
|
|
935
|
+
);
|
|
936
|
+
const reorderedItems = orderedIds
|
|
937
|
+
.map((id) => itemMap.get(id))
|
|
938
|
+
.filter((item): item is NavManagerItem => item !== undefined);
|
|
939
|
+
const remainingItems = this._items
|
|
940
|
+
.filter((item) => !orderedIds.includes(item.id))
|
|
941
|
+
.map((item) =>
|
|
942
|
+
item.id === movedId
|
|
943
|
+
? { ...item, placement: targetPlacement }
|
|
944
|
+
: { ...item },
|
|
945
|
+
);
|
|
946
|
+
this._items = [...reorderedItems, ...remainingItems];
|
|
947
|
+
|
|
948
|
+
const targetIds = targetPlacement === "header" ? headerIds : moreIds;
|
|
949
|
+
const {
|
|
950
|
+
movedId: persistedId,
|
|
951
|
+
afterId,
|
|
952
|
+
beforeId,
|
|
953
|
+
} = getSortableMove(targetIds, evt.newIndex);
|
|
954
|
+
if (!persistedId) return;
|
|
955
|
+
|
|
956
|
+
try {
|
|
957
|
+
if (crossList) {
|
|
958
|
+
const placementRes = await fetch(`/api/nav-items/${movedId}`, {
|
|
959
|
+
method: "PUT",
|
|
960
|
+
headers: {
|
|
961
|
+
"Content-Type": "application/json",
|
|
962
|
+
Accept: "application/json",
|
|
963
|
+
},
|
|
964
|
+
body: JSON.stringify({ placement: targetPlacement }),
|
|
965
|
+
});
|
|
966
|
+
if (!placementRes.ok) throw new Error(`HTTP ${placementRes.status}`);
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
const moveRes = await fetch(`/api/nav-items/${persistedId}/move`, {
|
|
970
|
+
method: "PUT",
|
|
971
|
+
headers: this.#jsonMutationHeaders(),
|
|
972
|
+
body: JSON.stringify({
|
|
973
|
+
after: afterId ?? null,
|
|
974
|
+
before: beforeId ?? null,
|
|
975
|
+
}),
|
|
976
|
+
});
|
|
977
|
+
if (!moveRes.ok) throw new Error(`HTTP ${moveRes.status}`);
|
|
978
|
+
|
|
979
|
+
const moved =
|
|
980
|
+
(await moveRes.json()) as NavManagerMutationResponse<NavManagerItem>;
|
|
981
|
+
applySiteHeaderHtml(moved.headerHtml);
|
|
982
|
+
showToast(
|
|
983
|
+
crossList ? this.labels.placementSaved : this.labels.orderSaved,
|
|
984
|
+
);
|
|
985
|
+
} catch {
|
|
986
|
+
this.#destroySortables();
|
|
987
|
+
this._items = previousItems;
|
|
988
|
+
showToast(this.labels.saveFailed, "error");
|
|
989
|
+
}
|
|
315
990
|
}
|
|
316
991
|
|
|
317
992
|
// ===========================================================================
|
|
@@ -328,34 +1003,51 @@ export class JantNavManager extends LitElement {
|
|
|
328
1003
|
}
|
|
329
1004
|
}
|
|
330
1005
|
|
|
331
|
-
#handleUpdate(item: NavManagerItem) {
|
|
1006
|
+
async #handleUpdate(item: NavManagerItem) {
|
|
332
1007
|
const label = this._editLabel.trim();
|
|
333
|
-
|
|
1008
|
+
// Clearing the field hands the item back to its target's title, so only a
|
|
1009
|
+
// free-form link — which points at nothing that has one — still needs one.
|
|
1010
|
+
if (!label && item.type === "link") {
|
|
334
1011
|
showToast(this.labels.labelRequired, "error");
|
|
335
1012
|
return;
|
|
336
1013
|
}
|
|
337
1014
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
1015
|
+
try {
|
|
1016
|
+
const res = await fetch(`/api/nav-items/${item.id}`, {
|
|
1017
|
+
method: "PUT",
|
|
1018
|
+
headers: this.#jsonMutationHeaders(),
|
|
1019
|
+
body: JSON.stringify({
|
|
1020
|
+
label,
|
|
1021
|
+
...(item.type === "link" && { url: this._editUrl.trim() }),
|
|
1022
|
+
}),
|
|
1023
|
+
});
|
|
1024
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
343
1025
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
1026
|
+
const response =
|
|
1027
|
+
(await res.json()) as NavManagerMutationResponse<NavManagerItem>;
|
|
1028
|
+
const updated = this.#normalizeItem(this.#stripHeaderHtml(response));
|
|
1029
|
+
this.#destroySortables();
|
|
1030
|
+
this._items = this._items.map((current) =>
|
|
1031
|
+
current.id === updated.id ? updated : current,
|
|
1032
|
+
);
|
|
1033
|
+
this._editingId = null;
|
|
1034
|
+
applySiteHeaderHtml(response.headerHtml);
|
|
1035
|
+
} catch {
|
|
1036
|
+
showToast(this.labels.saveFailed, "error");
|
|
1037
|
+
}
|
|
350
1038
|
}
|
|
351
1039
|
|
|
352
1040
|
async #handleDelete(item: NavManagerItem) {
|
|
353
1041
|
const message =
|
|
354
1042
|
item.type === "collection"
|
|
355
1043
|
? this.labels.confirmDeleteCollection
|
|
356
|
-
:
|
|
1044
|
+
: item.type === "page"
|
|
1045
|
+
? this.labels.confirmDeletePage
|
|
1046
|
+
: this.labels.confirmDeleteLink;
|
|
357
1047
|
const confirmLabel =
|
|
358
|
-
item.type === "collection"
|
|
1048
|
+
item.type === "collection" || item.type === "page"
|
|
1049
|
+
? this.labels.remove
|
|
1050
|
+
: this.labels.delete;
|
|
359
1051
|
const confirmed = await showConfirmDialog({
|
|
360
1052
|
message,
|
|
361
1053
|
confirmLabel,
|
|
@@ -364,12 +1056,23 @@ export class JantNavManager extends LitElement {
|
|
|
364
1056
|
});
|
|
365
1057
|
if (!confirmed) return;
|
|
366
1058
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
})
|
|
372
|
-
|
|
1059
|
+
try {
|
|
1060
|
+
const res = await fetch(`/api/nav-items/${item.id}`, {
|
|
1061
|
+
method: "DELETE",
|
|
1062
|
+
headers: this.#deleteMutationHeaders(),
|
|
1063
|
+
});
|
|
1064
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
1065
|
+
|
|
1066
|
+
const response = (await res.json()) as NavManagerMutationResponse<{
|
|
1067
|
+
success: true;
|
|
1068
|
+
}>;
|
|
1069
|
+
this.#destroySortables();
|
|
1070
|
+
this._items = this._items.filter((current) => current.id !== item.id);
|
|
1071
|
+
this._editingId = null;
|
|
1072
|
+
applySiteHeaderHtml(response.headerHtml);
|
|
1073
|
+
} catch {
|
|
1074
|
+
showToast(this.labels.deleteFailed, "error");
|
|
1075
|
+
}
|
|
373
1076
|
}
|
|
374
1077
|
|
|
375
1078
|
// ===========================================================================
|
|
@@ -388,21 +1091,21 @@ export class JantNavManager extends LitElement {
|
|
|
388
1091
|
try {
|
|
389
1092
|
const res = await fetch("/api/nav-items", {
|
|
390
1093
|
method: "POST",
|
|
391
|
-
headers:
|
|
392
|
-
"Content-Type": "application/json",
|
|
393
|
-
Accept: "application/json",
|
|
394
|
-
},
|
|
1094
|
+
headers: this.#jsonMutationHeaders(),
|
|
395
1095
|
body: JSON.stringify({ type: "link", label, url, placement: "header" }),
|
|
396
1096
|
});
|
|
397
1097
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
398
1098
|
|
|
399
|
-
const
|
|
1099
|
+
const response =
|
|
1100
|
+
(await res.json()) as NavManagerMutationResponse<NavManagerItem>;
|
|
1101
|
+
const created = this.#normalizeItem(this.#stripHeaderHtml(response));
|
|
400
1102
|
this.#destroySortables();
|
|
401
1103
|
this._items = [...this._items, created];
|
|
402
1104
|
this._newLinkLabel = "";
|
|
403
1105
|
this._newLinkUrl = "";
|
|
404
1106
|
this._showLinkForm = false;
|
|
405
1107
|
document.removeEventListener("click", this.#closeLinkForm);
|
|
1108
|
+
applySiteHeaderHtml(response.headerHtml);
|
|
406
1109
|
} catch {
|
|
407
1110
|
showToast(this.labels.saveFailed, "error");
|
|
408
1111
|
} finally {
|
|
@@ -414,29 +1117,44 @@ export class JantNavManager extends LitElement {
|
|
|
414
1117
|
// Add collection handler
|
|
415
1118
|
// ===========================================================================
|
|
416
1119
|
|
|
417
|
-
async #handleAddCollection(collectionId: string) {
|
|
1120
|
+
async #handleAddCollection(collectionId: string, isSmart = false) {
|
|
418
1121
|
if (!collectionId || this._addingCollectionId) return;
|
|
419
1122
|
|
|
420
1123
|
this._addingCollectionId = collectionId;
|
|
421
1124
|
try {
|
|
422
1125
|
const res = await fetch("/api/nav-items", {
|
|
423
1126
|
method: "POST",
|
|
424
|
-
headers:
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
body: JSON.stringify(
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
1127
|
+
headers: this.#jsonMutationHeaders(),
|
|
1128
|
+
// Both kinds land in the same menu and behave identically once there:
|
|
1129
|
+
// the label follows the target's title, and the URL follows its
|
|
1130
|
+
// address. Only which column holds the key differs.
|
|
1131
|
+
body: JSON.stringify(
|
|
1132
|
+
isSmart
|
|
1133
|
+
? {
|
|
1134
|
+
type: "smart_collection",
|
|
1135
|
+
smartCollectionId: collectionId,
|
|
1136
|
+
placement: "header",
|
|
1137
|
+
}
|
|
1138
|
+
: {
|
|
1139
|
+
type: "collection",
|
|
1140
|
+
collectionId,
|
|
1141
|
+
placement: "header",
|
|
1142
|
+
},
|
|
1143
|
+
),
|
|
433
1144
|
});
|
|
434
1145
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
435
1146
|
|
|
436
|
-
const
|
|
1147
|
+
const response =
|
|
1148
|
+
(await res.json()) as NavManagerMutationResponse<NavManagerItem>;
|
|
1149
|
+
const created = this.#normalizeItem(this.#stripHeaderHtml(response));
|
|
437
1150
|
this.#destroySortables();
|
|
438
1151
|
this._items = [...this._items, created];
|
|
439
1152
|
this.#closeCollectionPicker();
|
|
1153
|
+
applySiteHeaderHtml(response.headerHtml);
|
|
1154
|
+
showToast(this.labels.collectionAdded);
|
|
1155
|
+
if (this._collectionDialogOpen) {
|
|
1156
|
+
this.#closeCollectionDialog();
|
|
1157
|
+
}
|
|
440
1158
|
} catch {
|
|
441
1159
|
showToast(this.labels.saveFailed, "error");
|
|
442
1160
|
} finally {
|
|
@@ -444,6 +1162,103 @@ export class JantNavManager extends LitElement {
|
|
|
444
1162
|
}
|
|
445
1163
|
}
|
|
446
1164
|
|
|
1165
|
+
// ===========================================================================
|
|
1166
|
+
// Suggested link handlers
|
|
1167
|
+
// ===========================================================================
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* The internal path two nav URLs have to share to be the same destination.
|
|
1171
|
+
*
|
|
1172
|
+
* The same comparison the server makes when it decides which suggested links
|
|
1173
|
+
* are already in the menu, so both sides agree that `/about`, `/blog/about`
|
|
1174
|
+
* on a prefixed deployment, and this site's own absolute URL are one page.
|
|
1175
|
+
*/
|
|
1176
|
+
#getComparableInternalPath(url: string): string | null {
|
|
1177
|
+
const path = toInternalPath(url, {
|
|
1178
|
+
siteOrigins: [window.location.origin],
|
|
1179
|
+
sitePathPrefix: sitePathPrefix(),
|
|
1180
|
+
});
|
|
1181
|
+
if (path === null) return null;
|
|
1182
|
+
|
|
1183
|
+
const normalized = normalizePath(path);
|
|
1184
|
+
return normalized ? `/${normalized}` : "/";
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
#isSuggestedLinkAdded(link: NavManagerSuggestedLink): boolean {
|
|
1188
|
+
const path = this.#getComparableInternalPath(link.url);
|
|
1189
|
+
const hasMatchingPath =
|
|
1190
|
+
path !== null &&
|
|
1191
|
+
this._items.some(
|
|
1192
|
+
(item) => this.#getComparableInternalPath(item.url) === path,
|
|
1193
|
+
);
|
|
1194
|
+
if (hasMatchingPath) return true;
|
|
1195
|
+
|
|
1196
|
+
return Boolean(
|
|
1197
|
+
(link.collectionId &&
|
|
1198
|
+
this._items.some(
|
|
1199
|
+
(item) =>
|
|
1200
|
+
item.type === "collection" &&
|
|
1201
|
+
item.collectionId === link.collectionId,
|
|
1202
|
+
)) ||
|
|
1203
|
+
(link.postId &&
|
|
1204
|
+
this._items.some(
|
|
1205
|
+
(item) => item.type === "page" && item.postId === link.postId,
|
|
1206
|
+
)),
|
|
1207
|
+
);
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
get #availableSuggestedLinks(): NavManagerSuggestedLink[] {
|
|
1211
|
+
return (this.suggestedLinks ?? []).filter(
|
|
1212
|
+
(link) => !this.#isSuggestedLinkAdded(link),
|
|
1213
|
+
);
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
async #handleAddSuggestedLink(link: NavManagerSuggestedLink) {
|
|
1217
|
+
if (this._addingSuggestedKey) return;
|
|
1218
|
+
|
|
1219
|
+
this._addingSuggestedKey = link.key;
|
|
1220
|
+
try {
|
|
1221
|
+
const body =
|
|
1222
|
+
link.navItemType === "page" && link.postId
|
|
1223
|
+
? {
|
|
1224
|
+
type: "page",
|
|
1225
|
+
postId: link.postId,
|
|
1226
|
+
placement: "header",
|
|
1227
|
+
}
|
|
1228
|
+
: link.navItemType === "collection" && link.collectionId
|
|
1229
|
+
? {
|
|
1230
|
+
type: "collection",
|
|
1231
|
+
collectionId: link.collectionId,
|
|
1232
|
+
placement: "header",
|
|
1233
|
+
}
|
|
1234
|
+
: {
|
|
1235
|
+
type: "link",
|
|
1236
|
+
label: link.label,
|
|
1237
|
+
url: link.url,
|
|
1238
|
+
placement: "header",
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1241
|
+
const res = await fetch("/api/nav-items", {
|
|
1242
|
+
method: "POST",
|
|
1243
|
+
headers: this.#jsonMutationHeaders(),
|
|
1244
|
+
body: JSON.stringify(body),
|
|
1245
|
+
});
|
|
1246
|
+
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
1247
|
+
|
|
1248
|
+
const response =
|
|
1249
|
+
(await res.json()) as NavManagerMutationResponse<NavManagerItem>;
|
|
1250
|
+
const created = this.#normalizeItem(this.#stripHeaderHtml(response));
|
|
1251
|
+
this.#destroySortables();
|
|
1252
|
+
this._items = [...this._items, created];
|
|
1253
|
+
applySiteHeaderHtml(response.headerHtml);
|
|
1254
|
+
showToast(this.labels.suggestedLinkAdded);
|
|
1255
|
+
} catch {
|
|
1256
|
+
showToast(this.labels.saveFailed, "error");
|
|
1257
|
+
} finally {
|
|
1258
|
+
this._addingSuggestedKey = null;
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
|
|
447
1262
|
// ===========================================================================
|
|
448
1263
|
// System toggle handlers
|
|
449
1264
|
// ===========================================================================
|
|
@@ -461,10 +1276,7 @@ export class JantNavManager extends LitElement {
|
|
|
461
1276
|
if (enabled) {
|
|
462
1277
|
const res = await fetch("/api/nav-items", {
|
|
463
1278
|
method: "POST",
|
|
464
|
-
headers:
|
|
465
|
-
"Content-Type": "application/json",
|
|
466
|
-
Accept: "application/json",
|
|
467
|
-
},
|
|
1279
|
+
headers: this.#jsonMutationHeaders(),
|
|
468
1280
|
body: JSON.stringify({
|
|
469
1281
|
type: "system",
|
|
470
1282
|
systemKey: config.key,
|
|
@@ -472,12 +1284,12 @@ export class JantNavManager extends LitElement {
|
|
|
472
1284
|
});
|
|
473
1285
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
474
1286
|
|
|
475
|
-
const
|
|
1287
|
+
const response =
|
|
1288
|
+
(await res.json()) as NavManagerMutationResponse<NavManagerItem>;
|
|
1289
|
+
const created = this.#normalizeItem(this.#stripHeaderHtml(response));
|
|
476
1290
|
this.#destroySortables();
|
|
477
|
-
this._items = [
|
|
478
|
-
|
|
479
|
-
{ ...created, displayLabel: config.label },
|
|
480
|
-
];
|
|
1291
|
+
this._items = [...this._items, created];
|
|
1292
|
+
applySiteHeaderHtml(response.headerHtml);
|
|
481
1293
|
} else {
|
|
482
1294
|
const existing = this._items.find(
|
|
483
1295
|
(item) => item.type === "system" && item.systemKey === config.key,
|
|
@@ -485,12 +1297,16 @@ export class JantNavManager extends LitElement {
|
|
|
485
1297
|
if (existing) {
|
|
486
1298
|
const res = await fetch(`/api/nav-items/${existing.id}`, {
|
|
487
1299
|
method: "DELETE",
|
|
488
|
-
headers:
|
|
1300
|
+
headers: this.#deleteMutationHeaders(),
|
|
489
1301
|
});
|
|
490
1302
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
491
1303
|
|
|
1304
|
+
const response = (await res.json()) as NavManagerMutationResponse<{
|
|
1305
|
+
success: true;
|
|
1306
|
+
}>;
|
|
492
1307
|
this.#destroySortables();
|
|
493
1308
|
this._items = this._items.filter((item) => item.id !== existing.id);
|
|
1309
|
+
applySiteHeaderHtml(response.headerHtml);
|
|
494
1310
|
}
|
|
495
1311
|
}
|
|
496
1312
|
} catch {
|
|
@@ -515,6 +1331,24 @@ export class JantNavManager extends LitElement {
|
|
|
515
1331
|
return this._items.filter((i) => i.placement === "more");
|
|
516
1332
|
}
|
|
517
1333
|
|
|
1334
|
+
// Mirrors the server's projection in `lib/navigation.ts`: with feeds off,
|
|
1335
|
+
// neither feed entry renders, so neither may show in the preview either.
|
|
1336
|
+
#isVisibleInPreview(item: NavManagerItem): boolean {
|
|
1337
|
+
return (
|
|
1338
|
+
this.rssFeedsEnabled ||
|
|
1339
|
+
item.type !== "system" ||
|
|
1340
|
+
!isFeedNavKey(item.systemKey)
|
|
1341
|
+
);
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
get #previewHeaderItems(): NavManagerItem[] {
|
|
1345
|
+
return this.#headerItems.filter((item) => this.#isVisibleInPreview(item));
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
get #previewMoreItems(): NavManagerItem[] {
|
|
1349
|
+
return this.#moreItems.filter((item) => this.#isVisibleInPreview(item));
|
|
1350
|
+
}
|
|
1351
|
+
|
|
518
1352
|
#closePreviewMore() {
|
|
519
1353
|
this._showPreviewMore = false;
|
|
520
1354
|
document.removeEventListener("click", this.#handlePreviewMoreDocumentClick);
|
|
@@ -538,8 +1372,8 @@ export class JantNavManager extends LitElement {
|
|
|
538
1372
|
}
|
|
539
1373
|
|
|
540
1374
|
#renderPreview() {
|
|
541
|
-
const headerItems = this.#
|
|
542
|
-
const moreItems = this.#
|
|
1375
|
+
const headerItems = this.#previewHeaderItems;
|
|
1376
|
+
const moreItems = this.#previewMoreItems;
|
|
543
1377
|
|
|
544
1378
|
return html`
|
|
545
1379
|
<div class="nav-preview">
|
|
@@ -558,60 +1392,64 @@ export class JantNavManager extends LitElement {
|
|
|
558
1392
|
(item) => item.id,
|
|
559
1393
|
(item, index) =>
|
|
560
1394
|
html`<a
|
|
561
|
-
class=${
|
|
562
|
-
|
|
563
|
-
|
|
1395
|
+
class=${
|
|
1396
|
+
index === 0
|
|
1397
|
+
? "site-header-link site-header-link-active"
|
|
1398
|
+
: "site-header-link"
|
|
1399
|
+
}
|
|
564
1400
|
>
|
|
565
1401
|
${item.displayLabel ?? item.label}
|
|
566
1402
|
</a>`,
|
|
567
1403
|
)}
|
|
568
|
-
${
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
<
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
${this.labels.moreSection}
|
|
582
|
-
<svg
|
|
583
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
584
|
-
width="12"
|
|
585
|
-
height="12"
|
|
586
|
-
viewBox="0 0 24 24"
|
|
587
|
-
fill="none"
|
|
588
|
-
stroke="currentColor"
|
|
589
|
-
stroke-width="2.5"
|
|
590
|
-
stroke-linecap="round"
|
|
591
|
-
stroke-linejoin="round"
|
|
592
|
-
aria-hidden="true"
|
|
1404
|
+
${
|
|
1405
|
+
moreItems.length > 0
|
|
1406
|
+
? html`
|
|
1407
|
+
<div class="site-header-more" data-preview-more>
|
|
1408
|
+
<button
|
|
1409
|
+
type="button"
|
|
1410
|
+
class="site-header-more-btn"
|
|
1411
|
+
data-preview-more-trigger
|
|
1412
|
+
aria-haspopup="menu"
|
|
1413
|
+
aria-expanded=${
|
|
1414
|
+
this._showPreviewMore ? "true" : "false"
|
|
1415
|
+
}
|
|
1416
|
+
@click=${this.#togglePreviewMore}
|
|
593
1417
|
>
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
1418
|
+
${this.labels.previewMore}
|
|
1419
|
+
<svg
|
|
1420
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1421
|
+
width="12"
|
|
1422
|
+
height="12"
|
|
1423
|
+
viewBox="0 0 24 24"
|
|
1424
|
+
fill="none"
|
|
1425
|
+
stroke="currentColor"
|
|
1426
|
+
stroke-width="2.5"
|
|
1427
|
+
stroke-linecap="round"
|
|
1428
|
+
stroke-linejoin="round"
|
|
1429
|
+
aria-hidden="true"
|
|
1430
|
+
>
|
|
1431
|
+
<path d="m6 9 6 6 6-6" />
|
|
1432
|
+
</svg>
|
|
1433
|
+
</button>
|
|
1434
|
+
<div
|
|
1435
|
+
class="site-header-more-popover"
|
|
1436
|
+
aria-hidden=${this._showPreviewMore ? "false" : "true"}
|
|
1437
|
+
@click=${(event: Event) => event.stopPropagation()}
|
|
1438
|
+
>
|
|
1439
|
+
${repeat(
|
|
1440
|
+
moreItems,
|
|
1441
|
+
(item) => item.id,
|
|
1442
|
+
(item) => html`
|
|
1443
|
+
<span class="site-header-more-link">
|
|
1444
|
+
${item.displayLabel ?? item.label}
|
|
1445
|
+
</span>
|
|
1446
|
+
`,
|
|
1447
|
+
)}
|
|
1448
|
+
</div>
|
|
611
1449
|
</div>
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
1450
|
+
`
|
|
1451
|
+
: nothing
|
|
1452
|
+
}
|
|
615
1453
|
</nav>
|
|
616
1454
|
</div>
|
|
617
1455
|
</div>
|
|
@@ -625,7 +1463,9 @@ export class JantNavManager extends LitElement {
|
|
|
625
1463
|
? this.labels.system
|
|
626
1464
|
: type === "collection"
|
|
627
1465
|
? this.labels.collection
|
|
628
|
-
:
|
|
1466
|
+
: type === "page"
|
|
1467
|
+
? this.labels.page
|
|
1468
|
+
: this.labels.link;
|
|
629
1469
|
return html`<span class="badge-secondary">${label}</span>`;
|
|
630
1470
|
}
|
|
631
1471
|
|
|
@@ -675,158 +1515,852 @@ export class JantNavManager extends LitElement {
|
|
|
675
1515
|
`;
|
|
676
1516
|
}
|
|
677
1517
|
|
|
678
|
-
if (item.type === "collection") {
|
|
679
|
-
return html`
|
|
680
|
-
<div class="nav-item-edit">
|
|
681
|
-
<div class="field">
|
|
682
|
-
<label class="label">${this.labels.label}</label>
|
|
683
|
-
<input
|
|
684
|
-
type="text"
|
|
685
|
-
class="input"
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
1518
|
+
if (item.type === "collection") {
|
|
1519
|
+
return html`
|
|
1520
|
+
<div class="nav-item-edit">
|
|
1521
|
+
<div class="field">
|
|
1522
|
+
<label class="label">${this.labels.label}</label>
|
|
1523
|
+
<input
|
|
1524
|
+
type="text"
|
|
1525
|
+
class="input"
|
|
1526
|
+
maxlength="100"
|
|
1527
|
+
placeholder=${item.displayLabel ?? ""}
|
|
1528
|
+
.value=${this._editLabel}
|
|
1529
|
+
@input=${(e: Event) => {
|
|
1530
|
+
this._editLabel = (e.target as HTMLInputElement).value;
|
|
1531
|
+
}}
|
|
1532
|
+
/>
|
|
1533
|
+
</div>
|
|
1534
|
+
<div class="flex items-center justify-between">
|
|
1535
|
+
<button
|
|
1536
|
+
type="button"
|
|
1537
|
+
class="btn-sm-ghost text-destructive"
|
|
1538
|
+
@click=${() => void this.#handleDelete(item)}
|
|
1539
|
+
>
|
|
1540
|
+
${this.labels.remove}
|
|
1541
|
+
</button>
|
|
1542
|
+
<button
|
|
1543
|
+
type="button"
|
|
1544
|
+
class="btn-sm"
|
|
1545
|
+
@click=${() => this.#handleUpdate(item)}
|
|
1546
|
+
>
|
|
1547
|
+
${this.labels.save}
|
|
1548
|
+
</button>
|
|
1549
|
+
</div>
|
|
1550
|
+
</div>
|
|
1551
|
+
`;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
if (item.type === "page") {
|
|
1555
|
+
const editHref = `${publicPath(item.url)}?edit=1`;
|
|
1556
|
+
return html`
|
|
1557
|
+
<div class="nav-item-edit">
|
|
1558
|
+
<div class="field">
|
|
1559
|
+
<label class="label">${this.labels.label}</label>
|
|
1560
|
+
<input
|
|
1561
|
+
type="text"
|
|
1562
|
+
class="input"
|
|
1563
|
+
maxlength="100"
|
|
1564
|
+
placeholder=${item.displayLabel ?? ""}
|
|
1565
|
+
.value=${this._editLabel}
|
|
1566
|
+
@input=${(e: Event) => {
|
|
1567
|
+
this._editLabel = (e.target as HTMLInputElement).value;
|
|
1568
|
+
}}
|
|
1569
|
+
/>
|
|
1570
|
+
</div>
|
|
1571
|
+
<div class="flex items-center justify-between gap-3">
|
|
1572
|
+
<button
|
|
1573
|
+
type="button"
|
|
1574
|
+
class="btn-sm-ghost text-destructive"
|
|
1575
|
+
@click=${() => void this.#handleDelete(item)}
|
|
1576
|
+
>
|
|
1577
|
+
${this.labels.remove}
|
|
1578
|
+
</button>
|
|
1579
|
+
<div class="flex items-center gap-2">
|
|
1580
|
+
<a
|
|
1581
|
+
class="btn-sm-outline"
|
|
1582
|
+
href=${editHref}
|
|
1583
|
+
target="_blank"
|
|
1584
|
+
rel="noopener noreferrer"
|
|
1585
|
+
>
|
|
1586
|
+
${this.labels.editPage}
|
|
1587
|
+
<span aria-hidden="true">↗</span>
|
|
1588
|
+
</a>
|
|
1589
|
+
<button
|
|
1590
|
+
type="button"
|
|
1591
|
+
class="btn-sm"
|
|
1592
|
+
@click=${() => this.#handleUpdate(item)}
|
|
1593
|
+
>
|
|
1594
|
+
${this.labels.save}
|
|
1595
|
+
</button>
|
|
1596
|
+
</div>
|
|
1597
|
+
</div>
|
|
1598
|
+
</div>
|
|
1599
|
+
`;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
if (item.type === "link") {
|
|
1603
|
+
return html`
|
|
1604
|
+
<div class="nav-item-edit">
|
|
1605
|
+
<div class="field">
|
|
1606
|
+
<label class="label">${this.labels.label}</label>
|
|
1607
|
+
<input
|
|
1608
|
+
type="text"
|
|
1609
|
+
class="input"
|
|
1610
|
+
required
|
|
1611
|
+
.value=${this._editLabel}
|
|
1612
|
+
@input=${(e: Event) => {
|
|
1613
|
+
this._editLabel = (e.target as HTMLInputElement).value;
|
|
1614
|
+
}}
|
|
1615
|
+
/>
|
|
1616
|
+
</div>
|
|
1617
|
+
<div class="field">
|
|
1618
|
+
<label class="label">${this.labels.url}</label>
|
|
1619
|
+
<input
|
|
1620
|
+
type="text"
|
|
1621
|
+
class="input"
|
|
1622
|
+
required
|
|
1623
|
+
.value=${this._editUrl}
|
|
1624
|
+
@input=${(e: Event) => {
|
|
1625
|
+
this._editUrl = (e.target as HTMLInputElement).value;
|
|
1626
|
+
}}
|
|
1627
|
+
/>
|
|
1628
|
+
</div>
|
|
1629
|
+
<div class="flex items-center justify-between">
|
|
1630
|
+
<button
|
|
1631
|
+
type="button"
|
|
1632
|
+
class="btn-sm-ghost text-destructive"
|
|
1633
|
+
@click=${() => void this.#handleDelete(item)}
|
|
1634
|
+
>
|
|
1635
|
+
${this.labels.delete}
|
|
1636
|
+
</button>
|
|
1637
|
+
<button
|
|
1638
|
+
type="button"
|
|
1639
|
+
class="btn-sm"
|
|
1640
|
+
@click=${() => this.#handleUpdate(item)}
|
|
1641
|
+
>
|
|
1642
|
+
${this.labels.save}
|
|
1643
|
+
</button>
|
|
1644
|
+
</div>
|
|
1645
|
+
</div>
|
|
1646
|
+
`;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
return nothing;
|
|
1650
|
+
}
|
|
1651
|
+
|
|
1652
|
+
#renderItem(item: NavManagerItem) {
|
|
1653
|
+
const isEditing = this._editingId === item.id;
|
|
1654
|
+
|
|
1655
|
+
return html`
|
|
1656
|
+
<div
|
|
1657
|
+
data-nav-id=${item.id}
|
|
1658
|
+
class="nav-item${isEditing ? " nav-item-editing" : ""}"
|
|
1659
|
+
>
|
|
1660
|
+
<div class="nav-item-row">
|
|
1661
|
+
<div class="nav-item-handle" data-drag-handle>
|
|
1662
|
+
<svg
|
|
1663
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1664
|
+
width="14"
|
|
1665
|
+
height="14"
|
|
1666
|
+
viewBox="0 0 24 24"
|
|
1667
|
+
fill="none"
|
|
1668
|
+
stroke="currentColor"
|
|
1669
|
+
stroke-width="2"
|
|
1670
|
+
stroke-linecap="round"
|
|
1671
|
+
stroke-linejoin="round"
|
|
1672
|
+
class="text-muted-foreground shrink-0"
|
|
1673
|
+
>
|
|
1674
|
+
<circle cx="9" cy="12" r="1" />
|
|
1675
|
+
<circle cx="9" cy="5" r="1" />
|
|
1676
|
+
<circle cx="9" cy="19" r="1" />
|
|
1677
|
+
<circle cx="15" cy="12" r="1" />
|
|
1678
|
+
<circle cx="15" cy="5" r="1" />
|
|
1679
|
+
<circle cx="15" cy="19" r="1" />
|
|
1680
|
+
</svg>
|
|
1681
|
+
</div>
|
|
1682
|
+
<div class="nav-item-info" @click=${() => this.#toggleEdit(item)}>
|
|
1683
|
+
<div class="flex items-center gap-2 min-w-0">
|
|
1684
|
+
<span class="text-sm font-medium truncate"
|
|
1685
|
+
>${item.displayLabel ?? item.label}</span
|
|
1686
|
+
>
|
|
1687
|
+
${this.#renderTypeBadge(item.type)}
|
|
1688
|
+
</div>
|
|
1689
|
+
<span class="text-xs text-muted-foreground truncate"
|
|
1690
|
+
>${item.url}</span
|
|
1691
|
+
>
|
|
1692
|
+
</div>
|
|
1693
|
+
<button
|
|
1694
|
+
type="button"
|
|
1695
|
+
class="nav-item-toggle"
|
|
1696
|
+
@click=${() => this.#toggleEdit(item)}
|
|
1697
|
+
aria-label=${this.labels.toggleEdit}
|
|
1698
|
+
>
|
|
1699
|
+
<svg
|
|
1700
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1701
|
+
width="14"
|
|
1702
|
+
height="14"
|
|
1703
|
+
viewBox="0 0 24 24"
|
|
1704
|
+
fill="none"
|
|
1705
|
+
stroke="currentColor"
|
|
1706
|
+
stroke-width="2"
|
|
1707
|
+
stroke-linecap="round"
|
|
1708
|
+
stroke-linejoin="round"
|
|
1709
|
+
style="transition: transform 0.15s; ${
|
|
1710
|
+
isEditing ? "transform: rotate(180deg);" : ""
|
|
1711
|
+
}"
|
|
1712
|
+
>
|
|
1713
|
+
<path d="m6 9 6 6 6-6" />
|
|
1714
|
+
</svg>
|
|
1715
|
+
</button>
|
|
1716
|
+
</div>
|
|
1717
|
+
${this.#renderEditPanel(item)}
|
|
1718
|
+
</div>
|
|
1719
|
+
`;
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
#renderSuggestedLinksSection() {
|
|
1723
|
+
const available = this.#availableSuggestedLinks;
|
|
1724
|
+
if (available.length === 0) return nothing;
|
|
1725
|
+
|
|
1726
|
+
return html`
|
|
1727
|
+
<section class="mt-8">
|
|
1728
|
+
<h2 class="text-lg font-semibold mb-1">
|
|
1729
|
+
${this.labels.suggestedLinks}
|
|
1730
|
+
</h2>
|
|
1731
|
+
<p class="text-sm text-muted-foreground mb-3">
|
|
1732
|
+
${this.labels.suggestedLinksDescription}
|
|
1733
|
+
</p>
|
|
1734
|
+
<div class="nav-suggestions-list">
|
|
1735
|
+
${available.map((link) => {
|
|
1736
|
+
const adding = this._addingSuggestedKey === link.key;
|
|
1737
|
+
return html`
|
|
1738
|
+
<div class="nav-suggestion-item">
|
|
1739
|
+
<div class="nav-suggestion-info">
|
|
1740
|
+
<span class="nav-suggestion-title">${link.label}</span>
|
|
1741
|
+
<span class="nav-suggestion-meta">
|
|
1742
|
+
${link.url} · ${link.targetLabel}
|
|
1743
|
+
</span>
|
|
1744
|
+
</div>
|
|
1745
|
+
<button
|
|
1746
|
+
type="button"
|
|
1747
|
+
class="btn-sm"
|
|
1748
|
+
?disabled=${adding || this._addingSuggestedKey !== null}
|
|
1749
|
+
@click=${() => this.#handleAddSuggestedLink(link)}
|
|
1750
|
+
>
|
|
1751
|
+
${this.labels.addSuggestedLink}
|
|
1752
|
+
</button>
|
|
1753
|
+
</div>
|
|
1754
|
+
`;
|
|
1755
|
+
})}
|
|
1756
|
+
</div>
|
|
1757
|
+
</section>
|
|
1758
|
+
`;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
#renderAddPageSection() {
|
|
1762
|
+
return html`
|
|
1763
|
+
<section class="mt-8">
|
|
1764
|
+
<h2 class="text-lg font-semibold mb-1">
|
|
1765
|
+
${this.labels.addPageToNavigation}
|
|
1766
|
+
</h2>
|
|
1767
|
+
<p class="text-sm text-muted-foreground mb-3">
|
|
1768
|
+
${this.labels.addPageDescription}
|
|
1769
|
+
</p>
|
|
1770
|
+
<button
|
|
1771
|
+
type="button"
|
|
1772
|
+
class="btn-outline"
|
|
1773
|
+
data-add-page-trigger
|
|
1774
|
+
@click=${() => void this.#openPageDialog()}
|
|
1775
|
+
>
|
|
1776
|
+
${this.labels.addPage}
|
|
1777
|
+
</button>
|
|
1778
|
+
</section>
|
|
1779
|
+
`;
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
/** Whether navigation already points at what an address resolved to. */
|
|
1783
|
+
#isAddressAlreadyAdded(resolution: NavAddressResolution): boolean {
|
|
1784
|
+
if (resolution.kind === "page") {
|
|
1785
|
+
return this._items.some((item) => item.postId === resolution.page.id);
|
|
1786
|
+
}
|
|
1787
|
+
if (resolution.kind === "collection") {
|
|
1788
|
+
return this._items.some(
|
|
1789
|
+
(item) => item.collectionId === resolution.collection.id,
|
|
1790
|
+
);
|
|
1791
|
+
}
|
|
1792
|
+
if (resolution.kind === "smart_collection") {
|
|
1793
|
+
return this._items.some(
|
|
1794
|
+
(item) => item.smartCollectionId === resolution.smartCollection.id,
|
|
1795
|
+
);
|
|
1796
|
+
}
|
|
1797
|
+
return false;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
/** The line to show when a pasted address cannot become a page item. */
|
|
1801
|
+
#addressStatus(resolution: NavAddressResolution): string {
|
|
1802
|
+
if (this.#isAddressAlreadyAdded(resolution)) {
|
|
1803
|
+
return this.labels.addressAlreadyAdded;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
switch (resolution.kind) {
|
|
1807
|
+
case "not_found":
|
|
1808
|
+
return this.labels.addressNotFound.replace(
|
|
1809
|
+
"{address}",
|
|
1810
|
+
resolution.address,
|
|
1811
|
+
);
|
|
1812
|
+
case "unpublished":
|
|
1813
|
+
return this.labels.addressUnpublished;
|
|
1814
|
+
case "private":
|
|
1815
|
+
return this.labels.addressPrivate;
|
|
1816
|
+
case "untitled":
|
|
1817
|
+
return this.labels.addressUntitled;
|
|
1818
|
+
case "external":
|
|
1819
|
+
return this.labels.addressExternal;
|
|
1820
|
+
case "link_only":
|
|
1821
|
+
return this.labels.addressLinkOnly;
|
|
1822
|
+
default:
|
|
1823
|
+
return "";
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
/**
|
|
1828
|
+
* Hand an address the picker cannot use over to the link form, filled in.
|
|
1829
|
+
*
|
|
1830
|
+
* Off-site addresses are a normal thing to want in navigation; they just
|
|
1831
|
+
* belong in the other kind of item, and retyping the URL is a poor way to
|
|
1832
|
+
* find that out.
|
|
1833
|
+
*/
|
|
1834
|
+
#startLinkFromAddress(address: string) {
|
|
1835
|
+
this._newLinkUrl = address;
|
|
1836
|
+
this.#closePageDialog();
|
|
1837
|
+
this._showLinkForm = true;
|
|
1838
|
+
setTimeout(() => {
|
|
1839
|
+
document.addEventListener("click", this.#closeLinkForm);
|
|
1840
|
+
});
|
|
1841
|
+
void this.updateComplete.then(() => {
|
|
1842
|
+
this.querySelector<HTMLInputElement>("#nav-link-label")?.focus();
|
|
1843
|
+
});
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
#renderPageAddress(resolution: NavAddressResolution) {
|
|
1847
|
+
const alreadyAdded = this.#isAddressAlreadyAdded(resolution);
|
|
1848
|
+
|
|
1849
|
+
if (resolution.kind === "page" && !alreadyAdded) {
|
|
1850
|
+
const page = resolution.page;
|
|
1851
|
+
return this.#renderPageAddressResult(
|
|
1852
|
+
page.title,
|
|
1853
|
+
publicPath(`/${page.slug}`),
|
|
1854
|
+
this._addingPageId === page.id,
|
|
1855
|
+
() => void this.#addPageToNavigation(page),
|
|
1856
|
+
);
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
if (resolution.kind === "collection" && !alreadyAdded) {
|
|
1860
|
+
const collection = resolution.collection;
|
|
1861
|
+
return this.#renderPageAddressResult(
|
|
1862
|
+
collection.title,
|
|
1863
|
+
publicPath(getCollectionPagePath(collection.slug)),
|
|
1864
|
+
this._addingCollectionId === collection.id,
|
|
1865
|
+
() => {
|
|
1866
|
+
void this.#handleAddCollection(collection.id).then(() => {
|
|
1867
|
+
this.#closePageDialog();
|
|
1868
|
+
});
|
|
1869
|
+
},
|
|
1870
|
+
);
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
if (resolution.kind === "smart_collection" && !alreadyAdded) {
|
|
1874
|
+
const smartCollection = resolution.smartCollection;
|
|
1875
|
+
return this.#renderPageAddressResult(
|
|
1876
|
+
smartCollection.title,
|
|
1877
|
+
publicPath(getCollectionPagePath(smartCollection.slug)),
|
|
1878
|
+
this._addingCollectionId === smartCollection.id,
|
|
1879
|
+
() => {
|
|
1880
|
+
void this.#handleAddCollection(smartCollection.id, true).then(() => {
|
|
1881
|
+
this.#closePageDialog();
|
|
1882
|
+
});
|
|
1883
|
+
},
|
|
1884
|
+
);
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
const status = this.#addressStatus(resolution);
|
|
1888
|
+
const offerLink =
|
|
1889
|
+
resolution.kind === "external" || resolution.kind === "link_only";
|
|
1890
|
+
|
|
1891
|
+
return html`
|
|
1892
|
+
<p class="nav-page-status" role="status">${status}</p>
|
|
1893
|
+
${
|
|
1894
|
+
offerLink
|
|
1895
|
+
? html`
|
|
1896
|
+
<button
|
|
1897
|
+
type="button"
|
|
1898
|
+
class="btn-outline nav-page-address-link"
|
|
1899
|
+
@click=${() => this.#startLinkFromAddress(resolution.address)}
|
|
1900
|
+
>
|
|
1901
|
+
${this.labels.addressAddAsLink}
|
|
1902
|
+
</button>
|
|
1903
|
+
`
|
|
1904
|
+
: nothing
|
|
1905
|
+
}
|
|
1906
|
+
`;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
#renderPageAddressResult(
|
|
1910
|
+
title: string,
|
|
1911
|
+
path: string,
|
|
1912
|
+
busy: boolean,
|
|
1913
|
+
add: () => void,
|
|
1914
|
+
) {
|
|
1915
|
+
return html`
|
|
1916
|
+
<p class="nav-page-results-label">${this.labels.addressMatch}</p>
|
|
1917
|
+
<div class="nav-page-results" role="listbox">
|
|
1918
|
+
<button
|
|
1919
|
+
type="button"
|
|
1920
|
+
role="option"
|
|
1921
|
+
aria-selected="true"
|
|
1922
|
+
class="nav-page-result nav-page-result-selected"
|
|
1923
|
+
?disabled=${busy}
|
|
1924
|
+
@click=${add}
|
|
1925
|
+
>
|
|
1926
|
+
<span class="nav-page-result-copy">
|
|
1927
|
+
<span class="nav-page-result-title">${title}</span>
|
|
1928
|
+
<span class="nav-page-result-path">${path}</span>
|
|
1929
|
+
</span>
|
|
1930
|
+
${
|
|
1931
|
+
busy
|
|
1932
|
+
? html`<span class="nav-page-spinner" aria-hidden="true"></span>`
|
|
1933
|
+
: html`
|
|
1934
|
+
<svg
|
|
1935
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1936
|
+
width="16"
|
|
1937
|
+
height="16"
|
|
1938
|
+
viewBox="0 0 24 24"
|
|
1939
|
+
fill="none"
|
|
1940
|
+
stroke="currentColor"
|
|
1941
|
+
stroke-width="2"
|
|
1942
|
+
stroke-linecap="round"
|
|
1943
|
+
stroke-linejoin="round"
|
|
1944
|
+
aria-hidden="true"
|
|
1945
|
+
>
|
|
1946
|
+
<path d="M12 5v14" />
|
|
1947
|
+
<path d="M5 12h14" />
|
|
1948
|
+
</svg>
|
|
1949
|
+
`
|
|
1950
|
+
}
|
|
1951
|
+
</button>
|
|
1952
|
+
</div>
|
|
1953
|
+
`;
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
#renderPagePicker() {
|
|
1957
|
+
const status = this._pageSearchLoading
|
|
1958
|
+
? this.labels.searchingPages
|
|
1959
|
+
: this._pageSearchError
|
|
1960
|
+
? this.labels.pageSearchFailed
|
|
1961
|
+
: this._pages.length === 0
|
|
1962
|
+
? this._pageQuery.trim()
|
|
1963
|
+
? this.labels.noMatchingPages
|
|
1964
|
+
: this.labels.noPages
|
|
1965
|
+
: "";
|
|
1966
|
+
|
|
1967
|
+
return html`
|
|
1968
|
+
<header>
|
|
1969
|
+
<h2 id="nav-page-dialog-title">${this.labels.addPage}</h2>
|
|
1970
|
+
<p>${this.labels.addPageDescription}</p>
|
|
1971
|
+
</header>
|
|
1972
|
+
<section class="nav-page-picker-section">
|
|
1973
|
+
<div class="nav-page-search-wrap">
|
|
1974
|
+
<svg
|
|
1975
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1976
|
+
width="16"
|
|
1977
|
+
height="16"
|
|
1978
|
+
viewBox="0 0 24 24"
|
|
1979
|
+
fill="none"
|
|
1980
|
+
stroke="currentColor"
|
|
1981
|
+
stroke-width="2"
|
|
1982
|
+
stroke-linecap="round"
|
|
1983
|
+
stroke-linejoin="round"
|
|
1984
|
+
aria-hidden="true"
|
|
1985
|
+
>
|
|
1986
|
+
<circle cx="11" cy="11" r="8" />
|
|
1987
|
+
<path d="m21 21-4.3-4.3" />
|
|
1988
|
+
</svg>
|
|
1989
|
+
<input
|
|
1990
|
+
id="nav-page-search"
|
|
1991
|
+
type="search"
|
|
1992
|
+
class="input nav-page-search-input"
|
|
1993
|
+
placeholder=${this.labels.searchPagesHint}
|
|
1994
|
+
autocomplete="off"
|
|
1995
|
+
role="combobox"
|
|
1996
|
+
aria-expanded="true"
|
|
1997
|
+
aria-controls="nav-page-results"
|
|
1998
|
+
aria-activedescendant=${
|
|
1999
|
+
this._pages.length > 0
|
|
2000
|
+
? `nav-page-result-${this._selectedPageIndex}`
|
|
2001
|
+
: ""
|
|
2002
|
+
}
|
|
2003
|
+
.value=${this._pageQuery}
|
|
2004
|
+
@input=${(event: Event) => {
|
|
2005
|
+
this._pageQuery = (event.target as HTMLInputElement).value;
|
|
2006
|
+
this._selectedPageIndex = 0;
|
|
2007
|
+
this.#schedulePageSearch();
|
|
2008
|
+
}}
|
|
2009
|
+
/>
|
|
709
2010
|
</div>
|
|
710
|
-
`;
|
|
711
|
-
}
|
|
712
2011
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
2012
|
+
${
|
|
2013
|
+
this._pageSearchLoading || this._pageSearchError
|
|
2014
|
+
? html`<p class="nav-page-status" role="status">${status}</p>`
|
|
2015
|
+
: this._pageAddress
|
|
2016
|
+
? this.#renderPageAddress(this._pageAddress)
|
|
2017
|
+
: this._pages.length > 0
|
|
2018
|
+
? html`
|
|
2019
|
+
<p class="nav-page-results-label">
|
|
2020
|
+
${
|
|
2021
|
+
this._pageQuery.trim()
|
|
2022
|
+
? this.labels.searchPages
|
|
2023
|
+
: this.labels.recentPages
|
|
2024
|
+
}
|
|
2025
|
+
</p>
|
|
2026
|
+
<div
|
|
2027
|
+
id="nav-page-results"
|
|
2028
|
+
class="nav-page-results"
|
|
2029
|
+
role="listbox"
|
|
2030
|
+
>
|
|
2031
|
+
${this._pages.map((page, index) => {
|
|
2032
|
+
const selected = index === this._selectedPageIndex;
|
|
2033
|
+
const adding = this._addingPageId === page.id;
|
|
2034
|
+
return html`
|
|
2035
|
+
<button
|
|
2036
|
+
id=${`nav-page-result-${index}`}
|
|
2037
|
+
type="button"
|
|
2038
|
+
role="option"
|
|
2039
|
+
aria-selected=${selected ? "true" : "false"}
|
|
2040
|
+
class=${`nav-page-result${
|
|
2041
|
+
selected ? " nav-page-result-selected" : ""
|
|
2042
|
+
}`}
|
|
2043
|
+
?disabled=${this._addingPageId !== null}
|
|
2044
|
+
@mouseenter=${() => {
|
|
2045
|
+
this._selectedPageIndex = index;
|
|
2046
|
+
}}
|
|
2047
|
+
@click=${() => void this.#addPageToNavigation(page)}
|
|
2048
|
+
>
|
|
2049
|
+
<span class="nav-page-result-copy">
|
|
2050
|
+
<span class="nav-page-result-title"
|
|
2051
|
+
>${page.title}</span
|
|
2052
|
+
>
|
|
2053
|
+
<span class="nav-page-result-path"
|
|
2054
|
+
>${publicPath(`/${page.slug}`)}</span
|
|
2055
|
+
>
|
|
2056
|
+
</span>
|
|
2057
|
+
${
|
|
2058
|
+
adding
|
|
2059
|
+
? html`<span
|
|
2060
|
+
class="nav-page-spinner"
|
|
2061
|
+
aria-hidden="true"
|
|
2062
|
+
></span>`
|
|
2063
|
+
: html`
|
|
2064
|
+
<svg
|
|
2065
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2066
|
+
width="16"
|
|
2067
|
+
height="16"
|
|
2068
|
+
viewBox="0 0 24 24"
|
|
2069
|
+
fill="none"
|
|
2070
|
+
stroke="currentColor"
|
|
2071
|
+
stroke-width="2"
|
|
2072
|
+
stroke-linecap="round"
|
|
2073
|
+
stroke-linejoin="round"
|
|
2074
|
+
aria-hidden="true"
|
|
2075
|
+
>
|
|
2076
|
+
<path d="M12 5v14" />
|
|
2077
|
+
<path d="M5 12h14" />
|
|
2078
|
+
</svg>
|
|
2079
|
+
`
|
|
2080
|
+
}
|
|
2081
|
+
</button>
|
|
2082
|
+
`;
|
|
2083
|
+
})}
|
|
2084
|
+
</div>
|
|
2085
|
+
`
|
|
2086
|
+
: html`<p class="nav-page-status" role="status">${status}</p>`
|
|
2087
|
+
}
|
|
2088
|
+
</section>
|
|
2089
|
+
<footer class="nav-page-dialog-footer">
|
|
2090
|
+
<button
|
|
2091
|
+
type="button"
|
|
2092
|
+
class="btn-outline nav-page-create-link"
|
|
2093
|
+
@click=${this.#showCreatePage}
|
|
2094
|
+
>
|
|
2095
|
+
<svg
|
|
2096
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2097
|
+
width="16"
|
|
2098
|
+
height="16"
|
|
2099
|
+
viewBox="0 0 24 24"
|
|
2100
|
+
fill="none"
|
|
2101
|
+
stroke="currentColor"
|
|
2102
|
+
stroke-width="2"
|
|
2103
|
+
stroke-linecap="round"
|
|
2104
|
+
stroke-linejoin="round"
|
|
2105
|
+
aria-hidden="true"
|
|
2106
|
+
>
|
|
2107
|
+
<path d="M12 5v14" />
|
|
2108
|
+
<path d="M5 12h14" />
|
|
2109
|
+
</svg>
|
|
2110
|
+
${this.labels.createNewPage}
|
|
2111
|
+
</button>
|
|
2112
|
+
<button type="button" class="btn-ghost" @click=${this.#closePageDialog}>
|
|
2113
|
+
${this.labels.cancel}
|
|
2114
|
+
</button>
|
|
2115
|
+
</footer>
|
|
2116
|
+
`;
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
#renderCreatePage() {
|
|
2120
|
+
const slugError = this.#pageSlugError();
|
|
2121
|
+
const pagePath = this._newPageSlug.trim()
|
|
2122
|
+
? publicPath(`/${this._newPageSlug.trim()}`)
|
|
2123
|
+
: publicPath("/");
|
|
2124
|
+
|
|
2125
|
+
return html`
|
|
2126
|
+
<header>
|
|
2127
|
+
<h2 id="nav-page-dialog-title">${this.labels.createPage}</h2>
|
|
2128
|
+
<p>${this.labels.createPageDescription}</p>
|
|
2129
|
+
</header>
|
|
2130
|
+
<section>
|
|
2131
|
+
<form
|
|
2132
|
+
id="nav-create-page-form"
|
|
2133
|
+
class="form grid gap-4"
|
|
2134
|
+
@submit=${(event: Event) => {
|
|
2135
|
+
event.preventDefault();
|
|
2136
|
+
void this.#createPage();
|
|
2137
|
+
}}
|
|
2138
|
+
>
|
|
716
2139
|
<div class="field">
|
|
717
|
-
<label class="label"
|
|
2140
|
+
<label class="label" for="nav-new-page-title"
|
|
2141
|
+
>${this.labels.pageTitle}</label
|
|
2142
|
+
>
|
|
718
2143
|
<input
|
|
2144
|
+
id="nav-new-page-title"
|
|
719
2145
|
type="text"
|
|
720
2146
|
class="input"
|
|
721
2147
|
required
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
2148
|
+
maxlength="300"
|
|
2149
|
+
autocomplete="off"
|
|
2150
|
+
.value=${this._newPageTitle}
|
|
2151
|
+
@input=${(event: Event) => {
|
|
2152
|
+
this._newPageTitle = (event.target as HTMLInputElement).value;
|
|
2153
|
+
this._createPageError = "";
|
|
2154
|
+
this.#scheduleSlugSuggestion();
|
|
725
2155
|
}}
|
|
726
2156
|
/>
|
|
727
2157
|
</div>
|
|
728
2158
|
<div class="field">
|
|
729
|
-
<label class="label"
|
|
730
|
-
|
|
731
|
-
type="text"
|
|
732
|
-
class="input"
|
|
733
|
-
required
|
|
734
|
-
.value=${this._editUrl}
|
|
735
|
-
@input=${(e: Event) => {
|
|
736
|
-
this._editUrl = (e.target as HTMLInputElement).value;
|
|
737
|
-
}}
|
|
738
|
-
/>
|
|
739
|
-
</div>
|
|
740
|
-
<div class="flex items-center justify-between">
|
|
741
|
-
<button
|
|
742
|
-
type="button"
|
|
743
|
-
class="btn-sm-ghost text-destructive"
|
|
744
|
-
@click=${() => void this.#handleDelete(item)}
|
|
2159
|
+
<label class="label" for="nav-new-page-slug"
|
|
2160
|
+
>${this.labels.pageAddress}</label
|
|
745
2161
|
>
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
2162
|
+
<div class="nav-page-slug-field">
|
|
2163
|
+
<span class="nav-page-slug-prefix" aria-hidden="true"
|
|
2164
|
+
>${publicPath("/")}</span
|
|
2165
|
+
>
|
|
2166
|
+
<input
|
|
2167
|
+
id="nav-new-page-slug"
|
|
2168
|
+
type="text"
|
|
2169
|
+
class="input nav-page-slug-input"
|
|
2170
|
+
maxlength="200"
|
|
2171
|
+
autocomplete="off"
|
|
2172
|
+
spellcheck="false"
|
|
2173
|
+
.value=${this._newPageSlug}
|
|
2174
|
+
@input=${(event: Event) => {
|
|
2175
|
+
this._newPageSlug = (
|
|
2176
|
+
event.target as HTMLInputElement
|
|
2177
|
+
).value.toLowerCase();
|
|
2178
|
+
this._slugEdited = true;
|
|
2179
|
+
this._createPageError = "";
|
|
2180
|
+
this.#scheduleSlugCheck();
|
|
2181
|
+
}}
|
|
2182
|
+
aria-invalid=${slugError ? "true" : "false"}
|
|
2183
|
+
aria-describedby="nav-new-page-slug-help"
|
|
2184
|
+
/>
|
|
2185
|
+
</div>
|
|
2186
|
+
<p
|
|
2187
|
+
id="nav-new-page-slug-help"
|
|
2188
|
+
class=${
|
|
2189
|
+
slugError
|
|
2190
|
+
? "text-xs text-destructive"
|
|
2191
|
+
: "text-xs text-muted-foreground"
|
|
2192
|
+
}
|
|
752
2193
|
>
|
|
753
|
-
${
|
|
754
|
-
|
|
2194
|
+
${
|
|
2195
|
+
slugError
|
|
2196
|
+
? slugError
|
|
2197
|
+
: this._slugCheckLoading
|
|
2198
|
+
? this.labels.checkingAddress
|
|
2199
|
+
: pagePath
|
|
2200
|
+
}
|
|
2201
|
+
</p>
|
|
755
2202
|
</div>
|
|
756
|
-
|
|
757
|
-
`;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
return nothing;
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
#renderItem(item: NavManagerItem) {
|
|
764
|
-
const isEditing = this._editingId === item.id;
|
|
765
|
-
|
|
766
|
-
return html`
|
|
767
|
-
<div
|
|
768
|
-
data-nav-id=${item.id}
|
|
769
|
-
class="nav-item${isEditing ? " nav-item-editing" : ""}"
|
|
770
|
-
>
|
|
771
|
-
<div class="nav-item-row">
|
|
772
|
-
<div class="nav-item-handle" data-drag-handle>
|
|
2203
|
+
<p class="nav-page-visibility-note">
|
|
773
2204
|
<svg
|
|
774
2205
|
xmlns="http://www.w3.org/2000/svg"
|
|
775
|
-
width="
|
|
776
|
-
height="
|
|
2206
|
+
width="15"
|
|
2207
|
+
height="15"
|
|
777
2208
|
viewBox="0 0 24 24"
|
|
778
2209
|
fill="none"
|
|
779
2210
|
stroke="currentColor"
|
|
780
2211
|
stroke-width="2"
|
|
781
2212
|
stroke-linecap="round"
|
|
782
2213
|
stroke-linejoin="round"
|
|
783
|
-
|
|
2214
|
+
aria-hidden="true"
|
|
784
2215
|
>
|
|
785
|
-
<circle cx="
|
|
786
|
-
<
|
|
787
|
-
<
|
|
788
|
-
<circle cx="15" cy="12" r="1" />
|
|
789
|
-
<circle cx="15" cy="5" r="1" />
|
|
790
|
-
<circle cx="15" cy="19" r="1" />
|
|
2216
|
+
<circle cx="12" cy="12" r="10" />
|
|
2217
|
+
<path d="M12 16v-4" />
|
|
2218
|
+
<path d="M12 8h.01" />
|
|
791
2219
|
</svg>
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
2220
|
+
${this.labels.pageVisibilityHint}
|
|
2221
|
+
</p>
|
|
2222
|
+
${
|
|
2223
|
+
this._createPageError
|
|
2224
|
+
? html`<p class="text-sm text-destructive" role="alert">
|
|
2225
|
+
${this._createPageError}
|
|
2226
|
+
</p>`
|
|
2227
|
+
: nothing
|
|
2228
|
+
}
|
|
2229
|
+
</form>
|
|
2230
|
+
</section>
|
|
2231
|
+
<footer>
|
|
2232
|
+
<button
|
|
2233
|
+
type="button"
|
|
2234
|
+
class="btn-ghost"
|
|
2235
|
+
?disabled=${this._creatingPage}
|
|
2236
|
+
@click=${this.#showPagePicker}
|
|
2237
|
+
>
|
|
2238
|
+
${this.labels.back}
|
|
2239
|
+
</button>
|
|
2240
|
+
<button
|
|
2241
|
+
type="submit"
|
|
2242
|
+
class="btn"
|
|
2243
|
+
form="nav-create-page-form"
|
|
2244
|
+
?disabled=${
|
|
2245
|
+
this._creatingPage || this._slugCheckLoading || Boolean(slugError)
|
|
2246
|
+
}
|
|
2247
|
+
>
|
|
2248
|
+
${
|
|
2249
|
+
this._creatingPage
|
|
2250
|
+
? this.labels.creatingPage
|
|
2251
|
+
: this.labels.createPage
|
|
2252
|
+
}
|
|
2253
|
+
</button>
|
|
2254
|
+
</footer>
|
|
2255
|
+
`;
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
#renderCreatedPage() {
|
|
2259
|
+
const page = this._createdPage;
|
|
2260
|
+
if (!page) return nothing;
|
|
2261
|
+
const editHref = `${publicPath(`/${page.slug}`)}?edit=1`;
|
|
2262
|
+
|
|
2263
|
+
return html`
|
|
2264
|
+
<header class="nav-create-success-header">
|
|
2265
|
+
<span class="nav-create-success-icon" aria-hidden="true">
|
|
2266
|
+
<svg
|
|
2267
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2268
|
+
width="22"
|
|
2269
|
+
height="22"
|
|
2270
|
+
viewBox="0 0 24 24"
|
|
2271
|
+
fill="none"
|
|
2272
|
+
stroke="currentColor"
|
|
2273
|
+
stroke-width="2"
|
|
2274
|
+
stroke-linecap="round"
|
|
2275
|
+
stroke-linejoin="round"
|
|
2276
|
+
>
|
|
2277
|
+
<path d="M20 6 9 17l-5-5" />
|
|
2278
|
+
</svg>
|
|
2279
|
+
</span>
|
|
2280
|
+
<h2 id="nav-page-dialog-title">${this.labels.pageCreated}</h2>
|
|
2281
|
+
<p>${this.labels.pageCreatedDescription}</p>
|
|
2282
|
+
</header>
|
|
2283
|
+
<section>
|
|
2284
|
+
<div class="nav-create-success-card">
|
|
2285
|
+
<span class="nav-page-result-title">${page.title}</span>
|
|
2286
|
+
<span class="nav-page-result-path"
|
|
2287
|
+
>${publicPath(`/${page.slug}`)}</span
|
|
2288
|
+
>
|
|
2289
|
+
</div>
|
|
2290
|
+
</section>
|
|
2291
|
+
<footer>
|
|
2292
|
+
<a
|
|
2293
|
+
class="btn-outline"
|
|
2294
|
+
href=${editHref}
|
|
2295
|
+
target="_blank"
|
|
2296
|
+
rel="noopener noreferrer"
|
|
2297
|
+
>
|
|
2298
|
+
${this.labels.editPage}
|
|
2299
|
+
<span aria-hidden="true">↗</span>
|
|
2300
|
+
</a>
|
|
2301
|
+
<button
|
|
2302
|
+
type="button"
|
|
2303
|
+
class="btn"
|
|
2304
|
+
?disabled=${this._addingPageId !== null}
|
|
2305
|
+
@click=${() => void this.#addPageToNavigation(page)}
|
|
2306
|
+
>
|
|
2307
|
+
${this.labels.addToNavigation}
|
|
2308
|
+
</button>
|
|
2309
|
+
</footer>
|
|
2310
|
+
`;
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
#renderPageDialog() {
|
|
2314
|
+
if (!this._pageDialogOpen) return nothing;
|
|
2315
|
+
|
|
2316
|
+
return html`
|
|
2317
|
+
<dialog
|
|
2318
|
+
id="nav-page-dialog"
|
|
2319
|
+
class="dialog nav-page-dialog"
|
|
2320
|
+
aria-labelledby="nav-page-dialog-title"
|
|
2321
|
+
@cancel=${(event: Event) => {
|
|
2322
|
+
event.preventDefault();
|
|
2323
|
+
this.#closePageDialog();
|
|
2324
|
+
}}
|
|
2325
|
+
@click=${(event: Event) => {
|
|
2326
|
+
if (event.target === event.currentTarget) this.#closePageDialog();
|
|
2327
|
+
}}
|
|
2328
|
+
@keydown=${this.#handlePageDialogKeydown}
|
|
2329
|
+
>
|
|
2330
|
+
<div
|
|
2331
|
+
class="nav-page-dialog-panel"
|
|
2332
|
+
@click=${(event: Event) => event.stopPropagation()}
|
|
2333
|
+
>
|
|
804
2334
|
<button
|
|
805
2335
|
type="button"
|
|
806
|
-
|
|
807
|
-
@click=${
|
|
808
|
-
aria-label=${this.labels.toggleEdit}
|
|
2336
|
+
aria-label=${this.labels.cancel}
|
|
2337
|
+
@click=${this.#closePageDialog}
|
|
809
2338
|
>
|
|
810
2339
|
<svg
|
|
811
2340
|
xmlns="http://www.w3.org/2000/svg"
|
|
812
|
-
width="
|
|
813
|
-
height="
|
|
2341
|
+
width="18"
|
|
2342
|
+
height="18"
|
|
814
2343
|
viewBox="0 0 24 24"
|
|
815
2344
|
fill="none"
|
|
816
2345
|
stroke="currentColor"
|
|
817
2346
|
stroke-width="2"
|
|
818
2347
|
stroke-linecap="round"
|
|
819
2348
|
stroke-linejoin="round"
|
|
820
|
-
|
|
821
|
-
? "transform: rotate(180deg);"
|
|
822
|
-
: ""}"
|
|
2349
|
+
aria-hidden="true"
|
|
823
2350
|
>
|
|
824
|
-
<path d="
|
|
2351
|
+
<path d="M18 6 6 18" />
|
|
2352
|
+
<path d="m6 6 12 12" />
|
|
825
2353
|
</svg>
|
|
826
2354
|
</button>
|
|
2355
|
+
${
|
|
2356
|
+
this._pageDialogView === "picker"
|
|
2357
|
+
? this.#renderPagePicker()
|
|
2358
|
+
: this._pageDialogView === "create"
|
|
2359
|
+
? this.#renderCreatePage()
|
|
2360
|
+
: this.#renderCreatedPage()
|
|
2361
|
+
}
|
|
827
2362
|
</div>
|
|
828
|
-
|
|
829
|
-
</div>
|
|
2363
|
+
</dialog>
|
|
830
2364
|
`;
|
|
831
2365
|
}
|
|
832
2366
|
|
|
@@ -857,78 +2391,82 @@ export class JantNavManager extends LitElement {
|
|
|
857
2391
|
>
|
|
858
2392
|
${this.labels.addLink}
|
|
859
2393
|
</button>
|
|
860
|
-
${
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
<
|
|
873
|
-
<
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
e
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
<div class="grid grid-cols-3 items-center gap-4">
|
|
888
|
-
<label for="nav-link-label">${this.labels.label}</label>
|
|
889
|
-
<input
|
|
890
|
-
type="text"
|
|
891
|
-
id="nav-link-label"
|
|
892
|
-
class="col-span-2 h-8"
|
|
893
|
-
placeholder="Home"
|
|
894
|
-
required
|
|
895
|
-
.value=${this._newLinkLabel}
|
|
896
|
-
@input=${(e: Event) => {
|
|
897
|
-
this._newLinkLabel = (
|
|
898
|
-
e.target as HTMLInputElement
|
|
899
|
-
).value;
|
|
900
|
-
}}
|
|
901
|
-
autofocus
|
|
902
|
-
/>
|
|
903
|
-
</div>
|
|
904
|
-
<div class="grid grid-cols-3 items-center gap-4">
|
|
905
|
-
<label for="nav-link-url">${this.labels.url}</label>
|
|
906
|
-
<input
|
|
907
|
-
type="text"
|
|
908
|
-
id="nav-link-url"
|
|
909
|
-
class="col-span-2 h-8"
|
|
910
|
-
placeholder=${this.labels.urlPlaceholder}
|
|
911
|
-
required
|
|
912
|
-
.value=${this._newLinkUrl}
|
|
913
|
-
@input=${(e: Event) => {
|
|
914
|
-
this._newLinkUrl = (
|
|
915
|
-
e.target as HTMLInputElement
|
|
916
|
-
).value;
|
|
917
|
-
}}
|
|
918
|
-
/>
|
|
919
|
-
</div>
|
|
920
|
-
<button
|
|
921
|
-
type="submit"
|
|
922
|
-
class="btn-sm mt-2"
|
|
923
|
-
?disabled=${this._addingLink}
|
|
2394
|
+
${
|
|
2395
|
+
this._showLinkForm
|
|
2396
|
+
? html`
|
|
2397
|
+
<div
|
|
2398
|
+
id="nav-link-popover-content"
|
|
2399
|
+
data-popover
|
|
2400
|
+
data-side="top"
|
|
2401
|
+
aria-hidden="false"
|
|
2402
|
+
class="w-80"
|
|
2403
|
+
style="bottom: 100%; margin-bottom: 0.5rem;"
|
|
2404
|
+
@click=${(e: Event) => e.stopPropagation()}
|
|
2405
|
+
>
|
|
2406
|
+
<div class="grid gap-4">
|
|
2407
|
+
<header class="grid gap-1.5">
|
|
2408
|
+
<h4 class="leading-none font-medium">
|
|
2409
|
+
${this.labels.addLink}
|
|
2410
|
+
</h4>
|
|
2411
|
+
<p class="text-muted-foreground text-sm">
|
|
2412
|
+
${this.labels.addLinkDescription}
|
|
2413
|
+
</p>
|
|
2414
|
+
</header>
|
|
2415
|
+
<form
|
|
2416
|
+
class="form grid gap-2"
|
|
2417
|
+
@submit=${(e: Event) => {
|
|
2418
|
+
e.preventDefault();
|
|
2419
|
+
this.#handleAddLink();
|
|
2420
|
+
}}
|
|
924
2421
|
>
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
2422
|
+
<div class="grid grid-cols-3 items-center gap-4">
|
|
2423
|
+
<label for="nav-link-label"
|
|
2424
|
+
>${this.labels.label}</label
|
|
2425
|
+
>
|
|
2426
|
+
<input
|
|
2427
|
+
type="text"
|
|
2428
|
+
id="nav-link-label"
|
|
2429
|
+
class="col-span-2 h-8"
|
|
2430
|
+
placeholder="Home"
|
|
2431
|
+
required
|
|
2432
|
+
.value=${this._newLinkLabel}
|
|
2433
|
+
@input=${(e: Event) => {
|
|
2434
|
+
this._newLinkLabel = (
|
|
2435
|
+
e.target as HTMLInputElement
|
|
2436
|
+
).value;
|
|
2437
|
+
}}
|
|
2438
|
+
autofocus
|
|
2439
|
+
/>
|
|
2440
|
+
</div>
|
|
2441
|
+
<div class="grid grid-cols-3 items-center gap-4">
|
|
2442
|
+
<label for="nav-link-url">${this.labels.url}</label>
|
|
2443
|
+
<input
|
|
2444
|
+
type="text"
|
|
2445
|
+
id="nav-link-url"
|
|
2446
|
+
class="col-span-2 h-8"
|
|
2447
|
+
placeholder=${this.labels.urlPlaceholder}
|
|
2448
|
+
required
|
|
2449
|
+
.value=${this._newLinkUrl}
|
|
2450
|
+
@input=${(e: Event) => {
|
|
2451
|
+
this._newLinkUrl = (
|
|
2452
|
+
e.target as HTMLInputElement
|
|
2453
|
+
).value;
|
|
2454
|
+
}}
|
|
2455
|
+
/>
|
|
2456
|
+
</div>
|
|
2457
|
+
<button
|
|
2458
|
+
type="submit"
|
|
2459
|
+
class="btn-sm mt-2"
|
|
2460
|
+
?disabled=${this._addingLink}
|
|
2461
|
+
>
|
|
2462
|
+
${this.labels.addLink}
|
|
2463
|
+
</button>
|
|
2464
|
+
</form>
|
|
2465
|
+
</div>
|
|
928
2466
|
</div>
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
2467
|
+
`
|
|
2468
|
+
: nothing
|
|
2469
|
+
}
|
|
932
2470
|
</div>
|
|
933
2471
|
</section>
|
|
934
2472
|
`;
|
|
@@ -941,17 +2479,29 @@ export class JantNavManager extends LitElement {
|
|
|
941
2479
|
<h2 class="text-lg font-semibold mb-1">
|
|
942
2480
|
${this.labels.addCollectionToNavigation}
|
|
943
2481
|
</h2>
|
|
944
|
-
<p class="text-sm text-muted-foreground">
|
|
2482
|
+
<p class="text-sm text-muted-foreground mb-3">
|
|
945
2483
|
${this.labels.noCollections}
|
|
946
2484
|
</p>
|
|
2485
|
+
<button
|
|
2486
|
+
type="button"
|
|
2487
|
+
class="btn-outline"
|
|
2488
|
+
data-add-collection-trigger
|
|
2489
|
+
@click=${() => void this.#openCollectionDialog()}
|
|
2490
|
+
>
|
|
2491
|
+
${this.labels.createCollection}
|
|
2492
|
+
</button>
|
|
947
2493
|
</section>
|
|
948
2494
|
`;
|
|
949
2495
|
}
|
|
950
2496
|
|
|
951
2497
|
const addedCollectionIds = new Set(
|
|
952
|
-
this._items
|
|
953
|
-
|
|
954
|
-
|
|
2498
|
+
this._items.flatMap((i) =>
|
|
2499
|
+
i.type === "collection" && i.collectionId
|
|
2500
|
+
? [i.collectionId]
|
|
2501
|
+
: i.type === "smart_collection" && i.smartCollectionId
|
|
2502
|
+
? [i.smartCollectionId]
|
|
2503
|
+
: [],
|
|
2504
|
+
),
|
|
955
2505
|
);
|
|
956
2506
|
const available = this.collections.filter(
|
|
957
2507
|
(c) => !addedCollectionIds.has(c.id),
|
|
@@ -963,9 +2513,17 @@ export class JantNavManager extends LitElement {
|
|
|
963
2513
|
<h2 class="text-lg font-semibold mb-1">
|
|
964
2514
|
${this.labels.addCollectionToNavigation}
|
|
965
2515
|
</h2>
|
|
966
|
-
<p class="text-sm text-muted-foreground">
|
|
2516
|
+
<p class="text-sm text-muted-foreground mb-3">
|
|
967
2517
|
${this.labels.allCollectionsAdded}
|
|
968
2518
|
</p>
|
|
2519
|
+
<button
|
|
2520
|
+
type="button"
|
|
2521
|
+
class="btn-outline"
|
|
2522
|
+
data-add-collection-trigger
|
|
2523
|
+
@click=${() => void this.#openCollectionDialog()}
|
|
2524
|
+
>
|
|
2525
|
+
${this.labels.createCollection}
|
|
2526
|
+
</button>
|
|
969
2527
|
</section>
|
|
970
2528
|
`;
|
|
971
2529
|
}
|
|
@@ -992,15 +2550,21 @@ export class JantNavManager extends LitElement {
|
|
|
992
2550
|
<p class="text-sm text-muted-foreground mb-3">
|
|
993
2551
|
${this.labels.addCollectionDescription}
|
|
994
2552
|
</p>
|
|
995
|
-
<div
|
|
2553
|
+
<div
|
|
2554
|
+
class="relative inline-block"
|
|
2555
|
+
@keydown=${this.#handleCollectionPickerKeydown}
|
|
2556
|
+
>
|
|
996
2557
|
<button
|
|
997
2558
|
type="button"
|
|
998
2559
|
aria-expanded=${this._showCollectionPicker}
|
|
999
2560
|
aria-haspopup="menu"
|
|
1000
2561
|
class="btn-outline"
|
|
2562
|
+
data-add-collection-trigger
|
|
1001
2563
|
@click=${(e: Event) => {
|
|
1002
2564
|
e.stopPropagation();
|
|
1003
|
-
|
|
2565
|
+
const opening = !this._showCollectionPicker;
|
|
2566
|
+
if (opening) this.#closeLinkForm();
|
|
2567
|
+
this._showCollectionPicker = opening;
|
|
1004
2568
|
if (this._showCollectionPicker) {
|
|
1005
2569
|
setTimeout(() => {
|
|
1006
2570
|
document.addEventListener(
|
|
@@ -1029,67 +2593,284 @@ export class JantNavManager extends LitElement {
|
|
|
1029
2593
|
stroke-linejoin="round"
|
|
1030
2594
|
class="ml-1.5 -mr-0.5"
|
|
1031
2595
|
aria-hidden="true"
|
|
1032
|
-
style="transition: transform 0.15s; ${
|
|
1033
|
-
? "transform: rotate(180deg);"
|
|
1034
|
-
|
|
2596
|
+
style="transition: transform 0.15s; ${
|
|
2597
|
+
this._showCollectionPicker ? "transform: rotate(180deg);" : ""
|
|
2598
|
+
}"
|
|
1035
2599
|
>
|
|
1036
2600
|
<path d="m6 9 6 6 6-6" />
|
|
1037
2601
|
</svg>
|
|
1038
2602
|
</button>
|
|
1039
|
-
${
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
(
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
2603
|
+
${
|
|
2604
|
+
this._showCollectionPicker
|
|
2605
|
+
? html`
|
|
2606
|
+
<div
|
|
2607
|
+
class="collection-picker"
|
|
2608
|
+
role="menu"
|
|
2609
|
+
@click=${(e: Event) => e.stopPropagation()}
|
|
2610
|
+
>
|
|
2611
|
+
${groups.map(
|
|
2612
|
+
(group) => html`
|
|
2613
|
+
${
|
|
2614
|
+
group.label
|
|
2615
|
+
? html`<div class="collection-picker-group">
|
|
2616
|
+
${group.label}
|
|
2617
|
+
</div>`
|
|
2618
|
+
: nothing
|
|
2619
|
+
}
|
|
2620
|
+
${group.items.map((c) => {
|
|
2621
|
+
const adding = this._addingCollectionId === c.id;
|
|
2622
|
+
return html`
|
|
2623
|
+
<button
|
|
2624
|
+
type="button"
|
|
2625
|
+
role="menuitem"
|
|
2626
|
+
class="collection-picker-item"
|
|
2627
|
+
?disabled=${
|
|
2628
|
+
adding || this._addingCollectionId !== null
|
|
2629
|
+
}
|
|
2630
|
+
@click=${() =>
|
|
2631
|
+
this.#handleAddCollection(c.id, c.isSmart)}
|
|
2632
|
+
>
|
|
2633
|
+
<span class="collection-picker-title">
|
|
2634
|
+
${c.title}
|
|
2635
|
+
</span>
|
|
2636
|
+
${
|
|
2637
|
+
c.isSmart
|
|
2638
|
+
? html`<span
|
|
2639
|
+
class="collection-directory-smart-icon"
|
|
2640
|
+
role="img"
|
|
2641
|
+
aria-label=${
|
|
2642
|
+
this.labels.smartCollectionLabel ?? ""
|
|
2643
|
+
}
|
|
2644
|
+
title=${
|
|
2645
|
+
this.labels.smartCollectionLabel ?? ""
|
|
2646
|
+
}
|
|
2647
|
+
>${unsafeHTML(FUNNEL_ICON_SVG)}</span
|
|
2648
|
+
>`
|
|
2649
|
+
: nothing
|
|
2650
|
+
}
|
|
2651
|
+
${
|
|
2652
|
+
adding
|
|
2653
|
+
? html`<svg
|
|
2654
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2655
|
+
width="14"
|
|
2656
|
+
height="14"
|
|
2657
|
+
viewBox="0 0 24 24"
|
|
2658
|
+
fill="none"
|
|
2659
|
+
stroke="currentColor"
|
|
2660
|
+
stroke-width="2"
|
|
2661
|
+
stroke-linecap="round"
|
|
2662
|
+
stroke-linejoin="round"
|
|
2663
|
+
class="animate-spin shrink-0 text-muted-foreground"
|
|
2664
|
+
>
|
|
2665
|
+
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
|
|
2666
|
+
</svg>`
|
|
2667
|
+
: nothing
|
|
2668
|
+
}
|
|
2669
|
+
</button>
|
|
2670
|
+
`;
|
|
2671
|
+
})}
|
|
2672
|
+
`,
|
|
2673
|
+
)}
|
|
2674
|
+
<div class="collection-picker-footer">
|
|
2675
|
+
<button
|
|
2676
|
+
type="button"
|
|
2677
|
+
role="menuitem"
|
|
2678
|
+
class="collection-picker-create"
|
|
2679
|
+
data-create-collection-trigger
|
|
2680
|
+
@click=${() => void this.#openCollectionDialog()}
|
|
2681
|
+
>
|
|
2682
|
+
${this.labels.createNewCollection}
|
|
2683
|
+
<span aria-hidden="true">+</span>
|
|
2684
|
+
</button>
|
|
2685
|
+
</div>
|
|
2686
|
+
</div>
|
|
2687
|
+
`
|
|
2688
|
+
: nothing
|
|
2689
|
+
}
|
|
2690
|
+
</div>
|
|
2691
|
+
</section>
|
|
2692
|
+
`;
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2695
|
+
#renderCreateCollection() {
|
|
2696
|
+
const initial = { title: "", slug: "" };
|
|
2697
|
+
|
|
2698
|
+
return html`
|
|
2699
|
+
<header>
|
|
2700
|
+
<h2 id="nav-collection-dialog-title">
|
|
2701
|
+
${this.labels.createCollection}
|
|
2702
|
+
</h2>
|
|
2703
|
+
<p>${this.labels.collectionFormLabels.quickHint}</p>
|
|
2704
|
+
</header>
|
|
2705
|
+
<section>
|
|
2706
|
+
<jant-collection-form
|
|
2707
|
+
.labels=${this.labels.collectionFormLabels}
|
|
2708
|
+
.initial=${initial}
|
|
2709
|
+
action=${publicPath("/api/collections")}
|
|
2710
|
+
@jant:collection-submit=${(event: Event) =>
|
|
2711
|
+
void this.#handleCreateCollectionSubmit(event)}
|
|
2712
|
+
></jant-collection-form>
|
|
2713
|
+
${
|
|
2714
|
+
this._createCollectionError
|
|
2715
|
+
? html`<p class="mt-3 text-sm text-destructive" role="alert">
|
|
2716
|
+
${this._createCollectionError}
|
|
2717
|
+
</p>`
|
|
2718
|
+
: nothing
|
|
2719
|
+
}
|
|
2720
|
+
</section>
|
|
2721
|
+
<footer>
|
|
2722
|
+
<button
|
|
2723
|
+
type="button"
|
|
2724
|
+
class="btn-ghost"
|
|
2725
|
+
?disabled=${this._creatingCollection}
|
|
2726
|
+
@click=${this.#closeCollectionDialog}
|
|
2727
|
+
>
|
|
2728
|
+
${this.labels.cancel}
|
|
2729
|
+
</button>
|
|
2730
|
+
<button
|
|
2731
|
+
type="button"
|
|
2732
|
+
class="btn"
|
|
2733
|
+
?disabled=${this._creatingCollection}
|
|
2734
|
+
@click=${this.#submitCollectionForm}
|
|
2735
|
+
>
|
|
2736
|
+
${
|
|
2737
|
+
this._creatingCollection
|
|
2738
|
+
? this.labels.creatingCollection
|
|
2739
|
+
: this.labels.createCollection
|
|
2740
|
+
}
|
|
2741
|
+
</button>
|
|
2742
|
+
</footer>
|
|
2743
|
+
`;
|
|
2744
|
+
}
|
|
2745
|
+
|
|
2746
|
+
/**
|
|
2747
|
+
* Edit the collection just created, without leaving the navigation step.
|
|
2748
|
+
*
|
|
2749
|
+
* Its title and address can both move, so the picker's copy of it and the
|
|
2750
|
+
* card showing it are re-read from what the dialog saved.
|
|
2751
|
+
*/
|
|
2752
|
+
async #editCreatedCollection(collectionId: string) {
|
|
2753
|
+
const { changed, collection } = await openCollectionDialog({
|
|
2754
|
+
collectionId,
|
|
2755
|
+
});
|
|
2756
|
+
if (!changed || !collection) return;
|
|
2757
|
+
|
|
2758
|
+
this._createdCollection = collection;
|
|
2759
|
+
this.collections = this.collections.map((entry) =>
|
|
2760
|
+
entry.id === collection.id
|
|
2761
|
+
? { ...entry, title: collection.title, slug: collection.slug }
|
|
2762
|
+
: entry,
|
|
2763
|
+
);
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2766
|
+
#renderCreatedCollection() {
|
|
2767
|
+
const collection = this._createdCollection;
|
|
2768
|
+
if (!collection) return nothing;
|
|
2769
|
+
|
|
2770
|
+
return html`
|
|
2771
|
+
<header class="nav-create-success-header">
|
|
2772
|
+
<span class="nav-create-success-icon" aria-hidden="true">
|
|
2773
|
+
<svg
|
|
2774
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2775
|
+
width="22"
|
|
2776
|
+
height="22"
|
|
2777
|
+
viewBox="0 0 24 24"
|
|
2778
|
+
fill="none"
|
|
2779
|
+
stroke="currentColor"
|
|
2780
|
+
stroke-width="2"
|
|
2781
|
+
stroke-linecap="round"
|
|
2782
|
+
stroke-linejoin="round"
|
|
2783
|
+
>
|
|
2784
|
+
<path d="M20 6 9 17l-5-5" />
|
|
2785
|
+
</svg>
|
|
2786
|
+
</span>
|
|
2787
|
+
<h2 id="nav-collection-dialog-title">
|
|
2788
|
+
${this.labels.collectionFormLabels.createdLabel}
|
|
2789
|
+
</h2>
|
|
2790
|
+
<p>${this.labels.collectionCreatedDescription}</p>
|
|
2791
|
+
</header>
|
|
2792
|
+
<section>
|
|
2793
|
+
<div class="nav-create-success-card">
|
|
2794
|
+
<span class="nav-page-result-title">${collection.title}</span>
|
|
2795
|
+
<span class="nav-page-result-path">
|
|
2796
|
+
${publicPath(getCollectionPagePath(collection.slug))}
|
|
2797
|
+
</span>
|
|
1091
2798
|
</div>
|
|
1092
2799
|
</section>
|
|
2800
|
+
<footer>
|
|
2801
|
+
<!-- The collection dialog opens on top of this one rather than in a
|
|
2802
|
+
new tab: there is no editor page to send the author to, and the
|
|
2803
|
+
navigation step they came for is still waiting underneath. -->
|
|
2804
|
+
<button
|
|
2805
|
+
type="button"
|
|
2806
|
+
class="btn-outline"
|
|
2807
|
+
@click=${() => void this.#editCreatedCollection(collection.id)}
|
|
2808
|
+
>
|
|
2809
|
+
${this.labels.editCollection}
|
|
2810
|
+
</button>
|
|
2811
|
+
<button
|
|
2812
|
+
type="button"
|
|
2813
|
+
class="btn"
|
|
2814
|
+
?disabled=${this._addingCollectionId !== null}
|
|
2815
|
+
@click=${() => void this.#handleAddCollection(collection.id)}
|
|
2816
|
+
>
|
|
2817
|
+
${this.labels.addToNavigation}
|
|
2818
|
+
</button>
|
|
2819
|
+
</footer>
|
|
2820
|
+
`;
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2823
|
+
#renderCollectionDialog() {
|
|
2824
|
+
if (!this._collectionDialogOpen) return nothing;
|
|
2825
|
+
|
|
2826
|
+
return html`
|
|
2827
|
+
<dialog
|
|
2828
|
+
id="nav-collection-dialog"
|
|
2829
|
+
class="dialog nav-collection-dialog"
|
|
2830
|
+
aria-labelledby="nav-collection-dialog-title"
|
|
2831
|
+
@cancel=${(event: Event) => {
|
|
2832
|
+
event.preventDefault();
|
|
2833
|
+
this.#closeCollectionDialog();
|
|
2834
|
+
}}
|
|
2835
|
+
@click=${(event: Event) => {
|
|
2836
|
+
if (event.target === event.currentTarget) {
|
|
2837
|
+
this.#closeCollectionDialog();
|
|
2838
|
+
}
|
|
2839
|
+
}}
|
|
2840
|
+
@keydown=${this.#handleCollectionDialogKeydown}
|
|
2841
|
+
>
|
|
2842
|
+
<div
|
|
2843
|
+
class="nav-collection-dialog-panel"
|
|
2844
|
+
@click=${(event: Event) => event.stopPropagation()}
|
|
2845
|
+
>
|
|
2846
|
+
<button
|
|
2847
|
+
type="button"
|
|
2848
|
+
aria-label=${this.labels.cancel}
|
|
2849
|
+
@click=${this.#closeCollectionDialog}
|
|
2850
|
+
>
|
|
2851
|
+
<svg
|
|
2852
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2853
|
+
width="18"
|
|
2854
|
+
height="18"
|
|
2855
|
+
viewBox="0 0 24 24"
|
|
2856
|
+
fill="none"
|
|
2857
|
+
stroke="currentColor"
|
|
2858
|
+
stroke-width="2"
|
|
2859
|
+
stroke-linecap="round"
|
|
2860
|
+
stroke-linejoin="round"
|
|
2861
|
+
aria-hidden="true"
|
|
2862
|
+
>
|
|
2863
|
+
<path d="M18 6 6 18" />
|
|
2864
|
+
<path d="m6 6 12 12" />
|
|
2865
|
+
</svg>
|
|
2866
|
+
</button>
|
|
2867
|
+
${
|
|
2868
|
+
this._collectionDialogView === "create"
|
|
2869
|
+
? this.#renderCreateCollection()
|
|
2870
|
+
: this.#renderCreatedCollection()
|
|
2871
|
+
}
|
|
2872
|
+
</div>
|
|
2873
|
+
</dialog>
|
|
1093
2874
|
`;
|
|
1094
2875
|
}
|
|
1095
2876
|
|
|
@@ -1142,11 +2923,13 @@ export class JantNavManager extends LitElement {
|
|
|
1142
2923
|
|
|
1143
2924
|
<section class="mt-8">
|
|
1144
2925
|
<h2 class="text-lg font-semibold mb-3">${this.labels.headerSection}</h2>
|
|
1145
|
-
${
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
2926
|
+
${
|
|
2927
|
+
this.#headerItems.length === 0
|
|
2928
|
+
? html`<p class="text-sm text-muted-foreground py-4">
|
|
2929
|
+
${this.labels.emptyState}
|
|
2930
|
+
</p>`
|
|
2931
|
+
: nothing
|
|
2932
|
+
}
|
|
1150
2933
|
<div id="nav-items-header" class="nav-items-list">
|
|
1151
2934
|
${repeat(
|
|
1152
2935
|
this.#headerItems,
|
|
@@ -1159,20 +2942,24 @@ export class JantNavManager extends LitElement {
|
|
|
1159
2942
|
<section class="mt-8">
|
|
1160
2943
|
<h2 class="text-lg font-semibold mb-3">${this.labels.moreSection}</h2>
|
|
1161
2944
|
<div id="nav-items-more" class="nav-items-list nav-items-list-drop">
|
|
1162
|
-
${
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
2945
|
+
${
|
|
2946
|
+
this.#moreItems.length > 0
|
|
2947
|
+
? repeat(
|
|
2948
|
+
this.#moreItems,
|
|
2949
|
+
(item) => item.id,
|
|
2950
|
+
(item) => this.#renderItem(item),
|
|
2951
|
+
)
|
|
2952
|
+
: html`<p class="nav-items-empty-hint">
|
|
2953
|
+
${this.labels.moreEmptyHint}
|
|
2954
|
+
</p>`
|
|
2955
|
+
}
|
|
1171
2956
|
</div>
|
|
1172
2957
|
</section>
|
|
1173
2958
|
|
|
1174
|
-
${this.#
|
|
1175
|
-
${this.#
|
|
2959
|
+
${this.#renderSuggestedLinksSection()} ${this.#renderAddPageSection()}
|
|
2960
|
+
${this.#renderAddCollectionSection()} ${this.#renderAddLinkSection()}
|
|
2961
|
+
${this.#renderSystemToggles()} ${this.#renderPageDialog()}
|
|
2962
|
+
${this.#renderCollectionDialog()}
|
|
1176
2963
|
`;
|
|
1177
2964
|
}
|
|
1178
2965
|
}
|