From b0f6c44f36f3173f5d232d1adb02fc09dfdcc003 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 19 Sep 2023 16:37:43 +0900 Subject: [PATCH] refactor(frontend): use ESM --- packages/frontend/@types/theme.d.ts | 2 +- packages/frontend/package.json | 1 + packages/frontend/src/_boot_.ts | 4 +- packages/frontend/src/account.ts | 16 ++++---- packages/frontend/src/boot/common.ts | 40 +++++++++---------- packages/frontend/src/boot/main-boot.ts | 30 +++++++------- packages/frontend/src/boot/sub-boot.ts | 2 +- packages/frontend/src/cache.ts | 4 +- .../frontend/src/components/MkAbuseReport.vue | 6 +-- .../src/components/MkAbuseReportWindow.vue | 4 +- .../src/components/MkAccountMoved.vue | 6 +-- .../components/MkAchievements.stories.impl.ts | 2 +- .../src/components/MkAchievements.vue | 6 +-- .../src/components/MkAnnouncementDialog.vue | 6 +-- packages/frontend/src/components/MkAsUi.vue | 4 +- .../components/MkAutocomplete.stories.impl.ts | 2 +- .../src/components/MkAutocomplete.vue | 20 +++++----- .../frontend/src/components/MkAvatars.vue | 2 +- .../frontend/src/components/MkCaptcha.vue | 4 +- .../src/components/MkChannelFollowButton.vue | 4 +- .../frontend/src/components/MkChannelList.vue | 4 +- .../src/components/MkChannelPreview.vue | 2 +- packages/frontend/src/components/MkChart.vue | 16 ++++---- .../frontend/src/components/MkClickerGame.vue | 10 ++--- .../frontend/src/components/MkClipPreview.vue | 2 +- .../frontend/src/components/MkColorInput.vue | 2 +- .../frontend/src/components/MkContainer.vue | 4 +- .../frontend/src/components/MkContextMenu.vue | 6 +-- .../src/components/MkCropperDialog.vue | 12 +++--- .../frontend/src/components/MkCwButton.vue | 4 +- .../src/components/MkDateSeparatedList.vue | 6 +-- packages/frontend/src/components/MkDialog.vue | 2 +- .../frontend/src/components/MkDonation.vue | 10 ++--- .../frontend/src/components/MkDrive.file.vue | 10 ++--- .../src/components/MkDrive.folder.vue | 10 ++--- .../src/components/MkDrive.navFolder.vue | 4 +- packages/frontend/src/components/MkDrive.vue | 12 +++--- .../src/components/MkDriveSelectDialog.vue | 4 +- .../frontend/src/components/MkDriveWindow.vue | 2 +- .../src/components/MkEmojiPicker.section.vue | 2 +- .../frontend/src/components/MkEmojiPicker.vue | 16 ++++---- .../src/components/MkEmojiPickerDialog.vue | 2 +- .../src/components/MkFeaturedPhotos.vue | 2 +- .../components/MkFileCaptionEditWindow.vue | 2 +- .../src/components/MkFileListForAdmin.vue | 6 +-- .../src/components/MkFlashPreview.vue | 2 +- .../src/components/MkFoldableSection.vue | 4 +- packages/frontend/src/components/MkFolder.vue | 2 +- .../src/components/MkFollowButton.vue | 10 ++--- .../src/components/MkForgotPassword.vue | 6 +-- .../frontend/src/components/MkFormDialog.vue | 2 +- .../src/components/MkGalleryPostPreview.vue | 2 +- packages/frontend/src/components/MkGoogle.vue | 2 +- .../frontend/src/components/MkHeatmap.vue | 10 ++--- .../src/components/MkImgWithBlurhash.vue | 6 +-- packages/frontend/src/components/MkInput.vue | 4 +- .../src/components/MkInstanceCardMini.vue | 4 +- .../src/components/MkInstanceStats.vue | 8 ++-- .../src/components/MkInstanceTicker.vue | 6 +-- .../frontend/src/components/MkInviteCode.vue | 6 +-- .../frontend/src/components/MkKeyValue.vue | 6 +-- .../frontend/src/components/MkLaunchPad.vue | 4 +- packages/frontend/src/components/MkLink.vue | 6 +-- .../frontend/src/components/MkMediaBanner.vue | 4 +- .../frontend/src/components/MkMediaImage.vue | 12 +++--- .../frontend/src/components/MkMediaList.vue | 6 +-- .../frontend/src/components/MkMediaVideo.vue | 6 +-- .../frontend/src/components/MkMention.vue | 6 +-- packages/frontend/src/components/MkMenu.vue | 8 ++-- .../frontend/src/components/MkMiniChart.vue | 2 +- packages/frontend/src/components/MkModal.vue | 8 ++-- packages/frontend/src/components/MkNote.vue | 36 ++++++++--------- .../src/components/MkNoteDetailed.vue | 32 +++++++-------- .../frontend/src/components/MkNoteHeader.vue | 6 +-- .../frontend/src/components/MkNotePreview.vue | 2 +- .../frontend/src/components/MkNoteSimple.vue | 2 +- .../frontend/src/components/MkNoteSub.vue | 8 ++-- packages/frontend/src/components/MkNotes.vue | 4 +- .../src/components/MkNotification.vue | 16 ++++---- .../MkNotificationSettingWindow.vue | 2 +- .../src/components/MkNotifications.vue | 8 ++-- packages/frontend/src/components/MkNumber.vue | 2 +- .../frontend/src/components/MkNumberDiff.vue | 2 +- .../src/components/MkObjectView.value.vue | 2 +- packages/frontend/src/components/MkOmit.vue | 2 +- .../frontend/src/components/MkPagePreview.vue | 2 +- .../frontend/src/components/MkPageWindow.vue | 20 +++++----- .../frontend/src/components/MkPagination.vue | 12 +++--- .../src/components/MkPlusOneEffect.vue | 2 +- packages/frontend/src/components/MkPoll.vue | 10 ++--- .../frontend/src/components/MkPollEditor.vue | 6 +-- .../frontend/src/components/MkPostForm.vue | 30 +++++++------- .../src/components/MkPostFormAttaches.vue | 4 +- .../MkPushNotificationAllowButton.vue | 8 ++-- packages/frontend/src/components/MkRange.vue | 2 +- .../src/components/MkReactionEffect.vue | 2 +- .../components/MkReactionsViewer.details.vue | 2 +- .../components/MkReactionsViewer.reaction.vue | 12 +++--- .../src/components/MkReactionsViewer.vue | 2 +- .../src/components/MkRemoteCaution.vue | 2 +- .../src/components/MkRetentionHeatmap.vue | 10 ++--- .../src/components/MkRetentionLineChart.vue | 12 +++--- .../src/components/MkRippleEffect.vue | 2 +- .../frontend/src/components/MkRolePreview.vue | 2 +- packages/frontend/src/components/MkSelect.vue | 6 +-- packages/frontend/src/components/MkSignin.vue | 10 ++--- .../src/components/MkSigninDialog.vue | 2 +- .../src/components/MkSignupDialog.form.vue | 10 ++--- .../MkSignupDialog.rules.stories.impl.ts | 4 +- .../src/components/MkSignupDialog.rules.vue | 6 +-- .../src/components/MkSignupDialog.vue | 4 +- .../src/components/MkSubNoteContent.vue | 6 +-- .../src/components/MkSwitch.button.vue | 2 +- .../frontend/src/components/MkTextarea.vue | 2 +- .../frontend/src/components/MkTimeline.vue | 8 ++-- packages/frontend/src/components/MkToast.vue | 4 +- .../src/components/MkTokenGenerateWindow.vue | 2 +- .../frontend/src/components/MkTooltip.vue | 6 +-- .../frontend/src/components/MkUpdated.vue | 6 +-- .../frontend/src/components/MkUrlPreview.vue | 12 +++--- .../src/components/MkUrlPreviewPopup.vue | 4 +- .../MkUserAnnouncementEditDialog.vue | 4 +- .../src/components/MkUserCardMini.vue | 4 +- .../frontend/src/components/MkUserInfo.vue | 10 ++--- .../frontend/src/components/MkUserList.vue | 4 +- .../src/components/MkUserOnlineIndicator.vue | 2 +- .../frontend/src/components/MkUserPopup.vue | 16 ++++---- .../src/components/MkUserSelectDialog.vue | 10 ++--- .../components/MkUserSetupDialog.Follow.vue | 8 ++-- .../components/MkUserSetupDialog.Privacy.vue | 8 ++-- .../components/MkUserSetupDialog.Profile.vue | 10 ++--- .../src/components/MkUserSetupDialog.User.vue | 6 +-- .../src/components/MkUserSetupDialog.vue | 10 ++--- .../src/components/MkVisibilityPicker.vue | 2 +- .../MkVisitorDashboard.ActiveUsersChart.vue | 10 ++--- .../src/components/MkVisitorDashboard.vue | 10 ++--- .../frontend/src/components/MkWidgets.vue | 4 +- packages/frontend/src/components/MkWindow.vue | 8 ++-- .../src/components/MkYouTubePlayer.vue | 4 +- .../frontend/src/components/form/suspense.vue | 4 +- .../src/components/global/MkA.stories.impl.ts | 2 +- .../frontend/src/components/global/MkA.vue | 12 +++--- .../frontend/src/components/global/MkAcct.vue | 4 +- .../components/global/MkAd.stories.impl.ts | 2 +- .../frontend/src/components/global/MkAd.vue | 12 +++--- .../src/components/global/MkAvatar.vue | 8 ++-- .../src/components/global/MkCustomEmoji.vue | 6 +-- .../src/components/global/MkEmoji.vue | 6 +-- .../src/components/global/MkError.vue | 6 +-- .../global/MkMisskeyFlavoredMarkdown.ts | 4 +- .../components/global/MkPageHeader.tabs.vue | 2 +- .../src/components/global/MkPageHeader.vue | 6 +-- .../src/components/global/MkSpacer.vue | 2 +- .../components/global/MkTime.stories.impl.ts | 4 +- .../frontend/src/components/global/MkTime.vue | 4 +- .../frontend/src/components/global/MkUrl.vue | 8 ++-- .../src/components/global/RouterView.vue | 2 +- .../src/components/page/page.note.vue | 2 +- .../src/components/page/page.text.vue | 4 +- packages/frontend/src/config.ts | 2 +- packages/frontend/src/custom-emojis.ts | 6 +-- .../frontend/src/directives/click-anime.ts | 2 +- .../frontend/src/directives/follow-append.ts | 2 +- packages/frontend/src/directives/ripple.ts | 2 +- packages/frontend/src/directives/tooltip.ts | 4 +- .../frontend/src/directives/user-preview.ts | 2 +- packages/frontend/src/filters/date.ts | 2 +- packages/frontend/src/filters/number.ts | 2 +- packages/frontend/src/filters/user.ts | 2 +- packages/frontend/src/i18n.ts | 6 +-- packages/frontend/src/instance.ts | 6 +-- packages/frontend/src/navbar.ts | 16 ++++---- packages/frontend/src/nirax.ts | 2 +- packages/frontend/src/os.ts | 10 ++--- packages/frontend/src/pages/_error_.vue | 16 ++++---- packages/frontend/src/pages/about-misskey.vue | 16 ++++---- packages/frontend/src/pages/about.emojis.vue | 6 +-- .../frontend/src/pages/about.federation.vue | 2 +- packages/frontend/src/pages/about.vue | 14 +++---- packages/frontend/src/pages/achievements.vue | 8 ++-- packages/frontend/src/pages/admin-file.vue | 10 ++--- packages/frontend/src/pages/admin-user.vue | 12 +++--- .../src/pages/admin/RolesEditorFormula.vue | 4 +- .../frontend/src/pages/admin/_header_.vue | 6 +-- packages/frontend/src/pages/admin/abuses.vue | 4 +- packages/frontend/src/pages/admin/ads.vue | 6 +-- .../src/pages/admin/announcements.vue | 6 +-- .../src/pages/admin/bot-protection.vue | 6 +-- .../frontend/src/pages/admin/branding.vue | 10 ++--- .../frontend/src/pages/admin/database.vue | 10 ++--- .../src/pages/admin/email-settings.vue | 8 ++-- .../frontend/src/pages/admin/federation.vue | 4 +- packages/frontend/src/pages/admin/files.vue | 6 +-- packages/frontend/src/pages/admin/index.vue | 12 +++--- .../src/pages/admin/instance-block.vue | 8 ++-- packages/frontend/src/pages/admin/invites.vue | 6 +-- .../frontend/src/pages/admin/moderation.vue | 8 ++-- .../src/pages/admin/object-storage.vue | 8 ++-- .../src/pages/admin/other-settings.vue | 8 ++-- .../src/pages/admin/overview.active-users.vue | 10 ++--- .../src/pages/admin/overview.ap-requests.vue | 12 +++--- .../src/pages/admin/overview.federation.vue | 8 ++-- .../src/pages/admin/overview.instances.vue | 6 +-- .../src/pages/admin/overview.moderators.vue | 4 +- .../frontend/src/pages/admin/overview.pie.vue | 4 +- .../src/pages/admin/overview.queue.chart.vue | 10 ++--- .../src/pages/admin/overview.queue.vue | 4 +- .../src/pages/admin/overview.stats.vue | 8 ++-- .../src/pages/admin/overview.users.vue | 6 +-- .../frontend/src/pages/admin/overview.vue | 8 ++-- .../src/pages/admin/proxy-account.vue | 8 ++-- .../src/pages/admin/queue.chart.chart.vue | 10 ++--- .../frontend/src/pages/admin/queue.chart.vue | 8 ++-- packages/frontend/src/pages/admin/queue.vue | 8 ++-- packages/frontend/src/pages/admin/relays.vue | 6 +-- .../frontend/src/pages/admin/roles.edit.vue | 8 ++-- .../frontend/src/pages/admin/roles.editor.vue | 6 +-- .../frontend/src/pages/admin/roles.role.vue | 10 ++--- packages/frontend/src/pages/admin/roles.vue | 10 ++--- .../frontend/src/pages/admin/security.vue | 8 ++-- .../frontend/src/pages/admin/server-rules.vue | 8 ++-- .../frontend/src/pages/admin/settings.vue | 8 ++-- packages/frontend/src/pages/admin/users.vue | 10 ++--- packages/frontend/src/pages/ads.vue | 8 ++-- packages/frontend/src/pages/announcements.vue | 8 ++-- .../frontend/src/pages/antenna-timeline.vue | 10 ++--- packages/frontend/src/pages/api-console.vue | 4 +- packages/frontend/src/pages/auth.form.vue | 4 +- packages/frontend/src/pages/auth.vue | 8 ++-- .../frontend/src/pages/channel-editor.vue | 10 ++--- packages/frontend/src/pages/channel.vue | 16 ++++---- packages/frontend/src/pages/channels.vue | 6 +-- packages/frontend/src/pages/clicker.vue | 2 +- packages/frontend/src/pages/clip.vue | 10 ++--- .../src/pages/custom-emojis-manager.vue | 8 ++-- packages/frontend/src/pages/drive.vue | 4 +- .../frontend/src/pages/emoji-edit-dialog.vue | 8 ++-- packages/frontend/src/pages/emojis.emoji.vue | 6 +-- .../frontend/src/pages/explore.featured.vue | 2 +- packages/frontend/src/pages/explore.roles.vue | 2 +- packages/frontend/src/pages/explore.users.vue | 4 +- packages/frontend/src/pages/explore.vue | 4 +- packages/frontend/src/pages/favorites.vue | 6 +-- .../frontend/src/pages/flash/flash-edit.vue | 8 ++-- .../frontend/src/pages/flash/flash-index.vue | 6 +-- packages/frontend/src/pages/flash/flash.vue | 16 ++++---- .../frontend/src/pages/follow-requests.vue | 10 ++--- packages/frontend/src/pages/follow.vue | 6 +-- packages/frontend/src/pages/gallery/edit.vue | 10 ++--- packages/frontend/src/pages/gallery/index.vue | 6 +-- packages/frontend/src/pages/gallery/post.vue | 14 +++---- packages/frontend/src/pages/instance-info.vue | 14 +++---- packages/frontend/src/pages/invite.vue | 10 ++--- packages/frontend/src/pages/list.vue | 10 ++--- packages/frontend/src/pages/miauth.vue | 8 ++-- .../frontend/src/pages/my-antennas/create.vue | 6 +-- .../frontend/src/pages/my-antennas/edit.vue | 8 ++-- .../frontend/src/pages/my-antennas/editor.vue | 4 +- .../frontend/src/pages/my-antennas/index.vue | 6 +-- .../frontend/src/pages/my-clips/index.vue | 6 +-- .../frontend/src/pages/my-lists/index.vue | 10 ++--- packages/frontend/src/pages/my-lists/list.vue | 14 +++---- packages/frontend/src/pages/not-found.vue | 8 ++-- packages/frontend/src/pages/note.vue | 10 ++--- packages/frontend/src/pages/notifications.vue | 6 +-- packages/frontend/src/pages/oauth.vue | 6 +-- .../page-editor/els/page-editor.el.image.vue | 4 +- .../page-editor/els/page-editor.el.note.vue | 4 +- .../els/page-editor.el.section.vue | 6 +-- .../page-editor/els/page-editor.el.text.vue | 2 +- .../page-editor/page-editor.container.vue | 2 +- .../src/pages/page-editor/page-editor.vue | 14 +++---- packages/frontend/src/pages/page.vue | 14 +++---- packages/frontend/src/pages/pages.vue | 6 +-- packages/frontend/src/pages/registry.keys.vue | 6 +-- .../frontend/src/pages/registry.value.vue | 6 +-- packages/frontend/src/pages/registry.vue | 6 +-- .../frontend/src/pages/reset-password.vue | 8 ++-- packages/frontend/src/pages/role.vue | 10 ++--- packages/frontend/src/pages/scratchpad.vue | 16 ++++---- packages/frontend/src/pages/search.note.vue | 10 ++--- packages/frontend/src/pages/search.user.vue | 10 ++--- packages/frontend/src/pages/search.vue | 10 ++--- .../src/pages/settings/2fa.qrdialog.vue | 6 +-- packages/frontend/src/pages/settings/2fa.vue | 6 +-- .../frontend/src/pages/settings/accounts.vue | 8 ++-- packages/frontend/src/pages/settings/api.vue | 6 +-- packages/frontend/src/pages/settings/apps.vue | 8 ++-- .../src/pages/settings/custom-css.vue | 10 ++--- packages/frontend/src/pages/settings/deck.vue | 6 +-- .../src/pages/settings/drive-cleaner.vue | 12 +++--- .../frontend/src/pages/settings/drive.vue | 12 +++--- .../frontend/src/pages/settings/email.vue | 10 ++--- .../frontend/src/pages/settings/general.vue | 16 ++++---- .../src/pages/settings/import-export.vue | 10 ++--- .../frontend/src/pages/settings/index.vue | 18 ++++----- .../src/pages/settings/instance-mute.vue | 8 ++-- .../frontend/src/pages/settings/migration.vue | 10 ++--- .../src/pages/settings/mute-block.vue | 10 ++--- .../frontend/src/pages/settings/navbar.vue | 12 +++--- .../src/pages/settings/notifications.vue | 8 ++-- .../frontend/src/pages/settings/other.vue | 12 +++--- .../src/pages/settings/plugin.install.vue | 10 ++--- .../frontend/src/pages/settings/plugin.vue | 10 ++--- .../pages/settings/preferences-backups.vue | 18 ++++----- .../frontend/src/pages/settings/privacy.vue | 10 ++--- .../frontend/src/pages/settings/profile.vue | 16 ++++---- .../frontend/src/pages/settings/reaction.vue | 10 ++--- .../frontend/src/pages/settings/roles.vue | 10 ++--- .../frontend/src/pages/settings/security.vue | 6 +-- .../src/pages/settings/sounds.sound.vue | 4 +- .../frontend/src/pages/settings/sounds.vue | 6 +-- .../pages/settings/statusbar.statusbar.vue | 6 +-- .../frontend/src/pages/settings/statusbar.vue | 8 ++-- .../src/pages/settings/theme.install.vue | 8 ++-- .../src/pages/settings/theme.manage.vue | 10 ++--- .../frontend/src/pages/settings/theme.vue | 18 ++++----- .../src/pages/settings/webhook.edit.vue | 8 ++-- .../src/pages/settings/webhook.new.vue | 6 +-- .../frontend/src/pages/settings/webhook.vue | 4 +- .../frontend/src/pages/settings/word-mute.vue | 12 +++--- packages/frontend/src/pages/share.vue | 8 ++-- .../frontend/src/pages/signup-complete.vue | 6 +-- packages/frontend/src/pages/tag.vue | 10 ++--- packages/frontend/src/pages/theme-editor.vue | 16 ++++---- .../frontend/src/pages/timeline.tutorial.vue | 8 ++-- packages/frontend/src/pages/timeline.vue | 16 ++++---- .../frontend/src/pages/user-list-timeline.vue | 10 ++--- packages/frontend/src/pages/user-tag.vue | 4 +- .../frontend/src/pages/user/achievements.vue | 4 +- .../src/pages/user/activity.following.vue | 12 +++--- .../src/pages/user/activity.heatmap.vue | 10 ++--- .../src/pages/user/activity.notes.vue | 12 +++--- .../frontend/src/pages/user/activity.pv.vue | 12 +++--- .../frontend/src/pages/user/followers.vue | 6 +-- .../frontend/src/pages/user/following.vue | 6 +-- packages/frontend/src/pages/user/home.vue | 24 +++++------ .../src/pages/user/index.activity.vue | 4 +- .../frontend/src/pages/user/index.photos.vue | 10 ++--- .../src/pages/user/index.timeline.vue | 2 +- packages/frontend/src/pages/user/index.vue | 10 ++--- .../frontend/src/pages/welcome.entrance.a.vue | 10 ++--- packages/frontend/src/pages/welcome.setup.vue | 8 ++-- .../frontend/src/pages/welcome.timeline.vue | 6 +-- packages/frontend/src/pages/welcome.vue | 6 +-- packages/frontend/src/pizzax.ts | 12 +++--- packages/frontend/src/plugin.ts | 6 +-- packages/frontend/src/router.ts | 2 +- packages/frontend/src/scripts/achievements.ts | 4 +- packages/frontend/src/scripts/aiscript/api.ts | 10 ++--- packages/frontend/src/scripts/api.ts | 4 +- packages/frontend/src/scripts/array.ts | 2 +- packages/frontend/src/scripts/autocomplete.ts | 2 +- packages/frontend/src/scripts/clicker-game.ts | 2 +- packages/frontend/src/scripts/collapsed.ts | 2 +- packages/frontend/src/scripts/confetti.ts | 2 +- packages/frontend/src/scripts/device-kind.ts | 2 +- .../src/scripts/extract-url-from-mfm.ts | 2 +- .../frontend/src/scripts/gen-search-query.ts | 2 +- .../src/scripts/get-account-from-id.ts | 2 +- .../src/scripts/get-drive-file-menu.ts | 10 ++--- .../frontend/src/scripts/get-note-menu.ts | 18 ++++----- .../frontend/src/scripts/get-note-summary.ts | 2 +- .../frontend/src/scripts/get-user-menu.ts | 18 ++++----- packages/frontend/src/scripts/hotkey.ts | 2 +- packages/frontend/src/scripts/init-chart.ts | 2 +- .../frontend/src/scripts/initialize-sw.ts | 2 +- packages/frontend/src/scripts/intl-const.ts | 2 +- .../frontend/src/scripts/isFfVisibleForMe.ts | 2 +- packages/frontend/src/scripts/lookup-user.ts | 4 +- packages/frontend/src/scripts/lookup.ts | 8 ++-- packages/frontend/src/scripts/media-proxy.ts | 6 +-- packages/frontend/src/scripts/please-login.ts | 6 +-- packages/frontend/src/scripts/popout.ts | 4 +- .../frontend/src/scripts/reaction-picker.ts | 2 +- packages/frontend/src/scripts/select-file.ts | 10 ++--- .../frontend/src/scripts/show-moved-dialog.ts | 6 +-- .../src/scripts/show-suspended-dialog.ts | 4 +- packages/frontend/src/scripts/sound.ts | 2 +- packages/frontend/src/scripts/theme-editor.ts | 2 +- packages/frontend/src/scripts/theme.ts | 2 +- packages/frontend/src/scripts/touch.ts | 2 +- packages/frontend/src/scripts/upload.ts | 12 +++--- .../frontend/src/scripts/use-chart-tooltip.ts | 2 +- .../frontend/src/scripts/use-note-capture.ts | 4 +- packages/frontend/src/store.ts | 2 +- packages/frontend/src/stream.ts | 4 +- packages/frontend/src/theme-store.ts | 8 ++-- .../src/ui/_common_/announcements.vue | 2 +- packages/frontend/src/ui/_common_/common.ts | 10 ++--- packages/frontend/src/ui/_common_/common.vue | 14 +++---- .../src/ui/_common_/navbar-for-mobile.vue | 10 ++--- packages/frontend/src/ui/_common_/navbar.vue | 10 ++--- .../src/ui/_common_/statusbar-federation.vue | 6 +-- .../src/ui/_common_/statusbar-rss.vue | 4 +- .../src/ui/_common_/statusbar-user-list.vue | 8 ++-- .../frontend/src/ui/_common_/statusbars.vue | 2 +- .../src/ui/_common_/stream-indicator.vue | 8 ++-- .../frontend/src/ui/_common_/sw-inject.ts | 10 ++--- packages/frontend/src/ui/_common_/upload.vue | 6 +-- packages/frontend/src/ui/classic.header.vue | 10 ++--- packages/frontend/src/ui/classic.sidebar.vue | 20 +++++----- packages/frontend/src/ui/classic.vue | 16 ++++---- packages/frontend/src/ui/deck.vue | 20 +++++----- .../frontend/src/ui/deck/antenna-column.vue | 6 +-- .../frontend/src/ui/deck/channel-column.vue | 6 +-- packages/frontend/src/ui/deck/column.vue | 6 +-- packages/frontend/src/ui/deck/deck-store.ts | 6 +-- .../frontend/src/ui/deck/direct-column.vue | 2 +- packages/frontend/src/ui/deck/list-column.vue | 4 +- packages/frontend/src/ui/deck/main-column.vue | 12 +++--- .../frontend/src/ui/deck/mentions-column.vue | 2 +- .../src/ui/deck/notifications-column.vue | 6 +-- .../src/ui/deck/role-timeline-column.vue | 6 +-- packages/frontend/src/ui/deck/tl-column.vue | 10 ++--- .../frontend/src/ui/deck/widgets-column.vue | 4 +- packages/frontend/src/ui/minimum.vue | 6 +-- packages/frontend/src/ui/universal.vue | 24 +++++------ .../frontend/src/ui/universal.widgets.vue | 4 +- packages/frontend/src/ui/visitor.vue | 14 +++---- packages/frontend/src/ui/zen.vue | 8 ++-- .../frontend/src/widgets/WidgetActivity.vue | 8 ++-- .../frontend/src/widgets/WidgetAichan.vue | 2 +- .../frontend/src/widgets/WidgetAiscript.vue | 10 ++--- .../src/widgets/WidgetAiscriptApp.vue | 10 ++--- .../frontend/src/widgets/WidgetButton.vue | 8 ++-- .../frontend/src/widgets/WidgetCalendar.vue | 6 +-- .../frontend/src/widgets/WidgetClicker.vue | 2 +- packages/frontend/src/widgets/WidgetClock.vue | 6 +-- .../src/widgets/WidgetDigitalClock.vue | 4 +- .../frontend/src/widgets/WidgetFederation.vue | 12 +++--- .../src/widgets/WidgetInstanceCloud.vue | 8 ++-- .../src/widgets/WidgetInstanceInfo.vue | 6 +-- .../frontend/src/widgets/WidgetJobQueue.vue | 10 ++--- packages/frontend/src/widgets/WidgetMemo.vue | 6 +-- .../src/widgets/WidgetNotifications.vue | 6 +-- .../src/widgets/WidgetOnlineUsers.vue | 10 ++--- .../frontend/src/widgets/WidgetPhotos.vue | 12 +++--- .../frontend/src/widgets/WidgetPostForm.vue | 2 +- .../frontend/src/widgets/WidgetProfile.vue | 6 +-- packages/frontend/src/widgets/WidgetRss.vue | 10 ++--- .../frontend/src/widgets/WidgetRssTicker.vue | 8 ++-- .../frontend/src/widgets/WidgetSlideshow.vue | 8 ++-- .../frontend/src/widgets/WidgetTimeline.vue | 10 ++--- .../frontend/src/widgets/WidgetTrends.vue | 10 ++--- .../frontend/src/widgets/WidgetUnixClock.vue | 2 +- .../frontend/src/widgets/WidgetUserList.vue | 8 ++-- .../src/widgets/server-metric/disk.vue | 2 +- .../src/widgets/server-metric/index.vue | 8 ++-- .../src/widgets/server-metric/mem.vue | 2 +- .../src/widgets/server-metric/net.vue | 2 +- packages/frontend/src/widgets/widget.ts | 6 +-- packages/frontend/test/init.ts | 2 +- packages/frontend/test/scroll.test.ts | 2 +- packages/frontend/tsconfig.json | 2 +- .../sw/src/scripts/create-notification.ts | 10 ++--- packages/sw/src/scripts/lang.ts | 2 +- packages/sw/src/scripts/operations.ts | 4 +- packages/sw/src/sw.ts | 6 +-- 459 files changed, 1643 insertions(+), 1642 deletions(-) diff --git a/packages/frontend/@types/theme.d.ts b/packages/frontend/@types/theme.d.ts index f4ba42b89d..376bbb0e9c 100644 --- a/packages/frontend/@types/theme.d.ts +++ b/packages/frontend/@types/theme.d.ts @@ -4,7 +4,7 @@ */ declare module '@/themes/*.json5' { - import { Theme } from '@/scripts/theme'; + import { Theme } from '@/scripts/theme.js'; const theme: Theme; diff --git a/packages/frontend/package.json b/packages/frontend/package.json index d38611c2fc..a89bd84ff0 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -1,6 +1,7 @@ { "name": "frontend", "private": true, + "type": "module", "scripts": { "watch": "vite", "build": "vite build", diff --git a/packages/frontend/src/_boot_.ts b/packages/frontend/src/_boot_.ts index a397e57ad3..efb78fe447 100644 --- a/packages/frontend/src/_boot_.ts +++ b/packages/frontend/src/_boot_.ts @@ -7,8 +7,8 @@ import 'vite/modulepreload-polyfill'; import '@/style.scss'; -import { mainBoot } from './boot/main-boot'; -import { subBoot } from './boot/sub-boot'; +import { mainBoot } from '@/boot/main-boot.js'; +import { subBoot } from '@/boot/sub-boot.js'; const subBootPaths = ['/share', '/auth', '/miauth', '/signup-complete']; diff --git a/packages/frontend/src/account.ts b/packages/frontend/src/account.ts index 43bda37b6c..0e4e4b50ff 100644 --- a/packages/frontend/src/account.ts +++ b/packages/frontend/src/account.ts @@ -5,14 +5,14 @@ import { defineAsyncComponent, reactive, ref } from 'vue'; import * as Misskey from 'misskey-js'; -import { showSuspendedDialog } from './scripts/show-suspended-dialog'; -import { i18n } from './i18n'; -import { miLocalStorage } from './local-storage'; -import { MenuButton } from './types/menu'; -import { del, get, set } from '@/scripts/idb-proxy'; -import { apiUrl } from '@/config'; -import { waiting, api, popup, popupMenu, success, alert } from '@/os'; -import { unisonReload, reloadChannel } from '@/scripts/unison-reload'; +import { showSuspendedDialog } from '@/scripts/show-suspended-dialog.js'; +import { i18n } from '@/i18n.js'; +import { miLocalStorage } from '@/local-storage.js'; +import { MenuButton } from '@/types/menu.js'; +import { del, get, set } from '@/scripts/idb-proxy.js'; +import { apiUrl } from '@/config.js'; +import { waiting, api, popup, popupMenu, success, alert } from '@/os.js'; +import { unisonReload, reloadChannel } from '@/scripts/unison-reload.js'; // TODO: 他のタブと永続化されたstateを同期 diff --git a/packages/frontend/src/boot/common.ts b/packages/frontend/src/boot/common.ts index 8f5de88ccd..2175bd1a7f 100644 --- a/packages/frontend/src/boot/common.ts +++ b/packages/frontend/src/boot/common.ts @@ -5,26 +5,26 @@ import { computed, createApp, watch, markRaw, version as vueVersion, defineAsyncComponent, App } from 'vue'; import { compareVersions } from 'compare-versions'; -import widgets from '@/widgets'; -import directives from '@/directives'; -import components from '@/components'; -import { version, ui, lang, updateLocale } from '@/config'; -import { applyTheme } from '@/scripts/theme'; -import { isDeviceDarkmode } from '@/scripts/is-device-darkmode'; -import { i18n, updateI18n } from '@/i18n'; -import { confirm, alert, post, popup, toast } from '@/os'; -import { $i, refreshAccount, login, updateAccount, signout } from '@/account'; -import { defaultStore, ColdDeviceStorage } from '@/store'; -import { fetchInstance, instance } from '@/instance'; -import { deviceKind } from '@/scripts/device-kind'; -import { reloadChannel } from '@/scripts/unison-reload'; -import { reactionPicker } from '@/scripts/reaction-picker'; -import { getUrlWithoutLoginId } from '@/scripts/login-id'; -import { getAccountFromId } from '@/scripts/get-account-from-id'; -import { deckStore } from '@/ui/deck/deck-store'; -import { miLocalStorage } from '@/local-storage'; -import { fetchCustomEmojis } from '@/custom-emojis'; -import { mainRouter } from '@/router'; +import widgets from '@/widgets/index.js'; +import directives from '@/directives/index.js'; +import components from '@/components/index.js'; +import { version, ui, lang, updateLocale } from '@/config.js'; +import { applyTheme } from '@/scripts/theme.js'; +import { isDeviceDarkmode } from '@/scripts/is-device-darkmode.js'; +import { i18n, updateI18n } from '@/i18n.js'; +import { confirm, alert, post, popup, toast } from '@/os.js'; +import { $i, refreshAccount, login, updateAccount, signout } from '@/account.js'; +import { defaultStore, ColdDeviceStorage } from '@/store.js'; +import { fetchInstance, instance } from '@/instance.js'; +import { deviceKind } from '@/scripts/device-kind.js'; +import { reloadChannel } from '@/scripts/unison-reload.js'; +import { reactionPicker } from '@/scripts/reaction-picker.js'; +import { getUrlWithoutLoginId } from '@/scripts/login-id.js'; +import { getAccountFromId } from '@/scripts/get-account-from-id.js'; +import { deckStore } from '@/ui/deck/deck-store.js'; +import { miLocalStorage } from '@/local-storage.js'; +import { fetchCustomEmojis } from '@/custom-emojis.js'; +import { mainRouter } from '@/router.js'; export async function common(createVue: () => App) { console.info(`Misskey v${version}`); diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index 9ab1f6e14c..f2af951d63 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -4,21 +4,21 @@ */ import { computed, createApp, watch, markRaw, version as vueVersion, defineAsyncComponent } from 'vue'; -import { common } from './common'; -import { version, ui, lang, updateLocale } from '@/config'; -import { i18n, updateI18n } from '@/i18n'; -import { confirm, alert, post, popup, toast } from '@/os'; -import { useStream } from '@/stream'; -import * as sound from '@/scripts/sound'; -import { $i, refreshAccount, login, updateAccount, signout } from '@/account'; -import { defaultStore, ColdDeviceStorage } from '@/store'; -import { makeHotkey } from '@/scripts/hotkey'; -import { reactionPicker } from '@/scripts/reaction-picker'; -import { miLocalStorage } from '@/local-storage'; -import { claimAchievement, claimedAchievements } from '@/scripts/achievements'; -import { mainRouter } from '@/router'; -import { initializeSw } from '@/scripts/initialize-sw'; -import { deckStore } from '@/ui/deck/deck-store'; +import { common } from './common.js'; +import { version, ui, lang, updateLocale } from '@/config.js'; +import { i18n, updateI18n } from '@/i18n.js'; +import { confirm, alert, post, popup, toast } from '@/os.js'; +import { useStream } from '@/stream.js'; +import * as sound from '@/scripts/sound.js'; +import { $i, refreshAccount, login, updateAccount, signout } from '@/account.js'; +import { defaultStore, ColdDeviceStorage } from '@/store.js'; +import { makeHotkey } from '@/scripts/hotkey.js'; +import { reactionPicker } from '@/scripts/reaction-picker.js'; +import { miLocalStorage } from '@/local-storage.js'; +import { claimAchievement, claimedAchievements } from '@/scripts/achievements.js'; +import { mainRouter } from '@/router.js'; +import { initializeSw } from '@/scripts/initialize-sw.js'; +import { deckStore } from '@/ui/deck/deck-store.js'; export async function mainBoot() { const { isClientUpdated } = await common(() => createApp( diff --git a/packages/frontend/src/boot/sub-boot.ts b/packages/frontend/src/boot/sub-boot.ts index 2cc19f2df3..9b4670e130 100644 --- a/packages/frontend/src/boot/sub-boot.ts +++ b/packages/frontend/src/boot/sub-boot.ts @@ -4,7 +4,7 @@ */ import { computed, createApp, watch, markRaw, version as vueVersion, defineAsyncComponent } from 'vue'; -import { common } from './common'; +import { common } from './common.js'; export async function subBoot() { const { isClientUpdated } = await common(() => createApp( diff --git a/packages/frontend/src/cache.ts b/packages/frontend/src/cache.ts index 1f3d28ba57..25d2b3c15f 100644 --- a/packages/frontend/src/cache.ts +++ b/packages/frontend/src/cache.ts @@ -4,8 +4,8 @@ */ import * as Misskey from 'misskey-js'; -import { Cache } from '@/scripts/cache'; -import { api } from '@/os'; +import { Cache } from '@/scripts/cache.js'; +import { api } from '@/os.js'; export const clipsCache = new Cache(1000 * 60 * 30, () => api('clips/list')); export const rolesCache = new Cache(1000 * 60 * 30, () => api('admin/roles/list')); diff --git a/packages/frontend/src/components/MkAbuseReport.vue b/packages/frontend/src/components/MkAbuseReport.vue index cb97875bcd..66114b8734 100644 --- a/packages/frontend/src/components/MkAbuseReport.vue +++ b/packages/frontend/src/components/MkAbuseReport.vue @@ -44,9 +44,9 @@ SPDX-License-Identifier: AGPL-3.0-only import MkButton from '@/components/MkButton.vue'; import MkSwitch from '@/components/MkSwitch.vue'; import MkKeyValue from '@/components/MkKeyValue.vue'; -import * as os from '@/os'; -import { i18n } from '@/i18n'; -import { dateString } from '@/filters/date'; +import * as os from '@/os.js'; +import { i18n } from '@/i18n.js'; +import { dateString } from '@/filters/date.js'; const props = defineProps<{ report: any; diff --git a/packages/frontend/src/components/MkAbuseReportWindow.vue b/packages/frontend/src/components/MkAbuseReportWindow.vue index 6e0dee6973..7814681ea2 100644 --- a/packages/frontend/src/components/MkAbuseReportWindow.vue +++ b/packages/frontend/src/components/MkAbuseReportWindow.vue @@ -35,8 +35,8 @@ import * as Misskey from 'misskey-js'; import MkWindow from '@/components/MkWindow.vue'; import MkTextarea from '@/components/MkTextarea.vue'; import MkButton from '@/components/MkButton.vue'; -import * as os from '@/os'; -import { i18n } from '@/i18n'; +import * as os from '@/os.js'; +import { i18n } from '@/i18n.js'; const props = defineProps<{ user: Misskey.entities.User; diff --git a/packages/frontend/src/components/MkAccountMoved.vue b/packages/frontend/src/components/MkAccountMoved.vue index e68efb1a3b..155d9fe3a9 100644 --- a/packages/frontend/src/components/MkAccountMoved.vue +++ b/packages/frontend/src/components/MkAccountMoved.vue @@ -15,9 +15,9 @@ SPDX-License-Identifier: AGPL-3.0-only import { ref } from 'vue'; import * as Misskey from 'misskey-js'; import MkMention from './MkMention.vue'; -import { i18n } from '@/i18n'; -import { host as localHost } from '@/config'; -import { api } from '@/os'; +import { i18n } from '@/i18n.js'; +import { host as localHost } from '@/config.js'; +import { api } from '@/os.js'; const user = ref(); diff --git a/packages/frontend/src/components/MkAchievements.stories.impl.ts b/packages/frontend/src/components/MkAchievements.stories.impl.ts index fd971e5ac6..a67e1def13 100644 --- a/packages/frontend/src/components/MkAchievements.stories.impl.ts +++ b/packages/frontend/src/components/MkAchievements.stories.impl.ts @@ -9,7 +9,7 @@ import { rest } from 'msw'; import { userDetailed } from '../../.storybook/fakes'; import { commonHandlers } from '../../.storybook/mocks'; import MkAchievements from './MkAchievements.vue'; -import { ACHIEVEMENT_TYPES } from '@/scripts/achievements'; +import { ACHIEVEMENT_TYPES } from '@/scripts/achievements.js'; export const Empty = { render(args) { return { diff --git a/packages/frontend/src/components/MkAchievements.vue b/packages/frontend/src/components/MkAchievements.vue index f9d62773f5..bea0ed26d8 100644 --- a/packages/frontend/src/components/MkAchievements.vue +++ b/packages/frontend/src/components/MkAchievements.vue @@ -54,9 +54,9 @@ SPDX-License-Identifier: AGPL-3.0-only diff --git a/packages/frontend/src/components/MkMiniChart.vue b/packages/frontend/src/components/MkMiniChart.vue index eee1e10399..8d2a147306 100644 --- a/packages/frontend/src/components/MkMiniChart.vue +++ b/packages/frontend/src/components/MkMiniChart.vue @@ -34,7 +34,7 @@ SPDX-License-Identifier: AGPL-3.0-only import { watch } from 'vue'; import { v4 as uuid } from 'uuid'; import tinycolor from 'tinycolor2'; -import { useInterval } from '@/scripts/use-interval'; +import { useInterval } from '@/scripts/use-interval.js'; const props = defineProps<{ src: number[]; diff --git a/packages/frontend/src/components/MkModal.vue b/packages/frontend/src/components/MkModal.vue index 4ba078d4eb..ec5039c504 100644 --- a/packages/frontend/src/components/MkModal.vue +++ b/packages/frontend/src/components/MkModal.vue @@ -43,10 +43,10 @@ SPDX-License-Identifier: AGPL-3.0-only