From 4e6c3add5b0276b2585fae4fe921e5d04a9d6df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Sat, 24 Jan 2026 01:10:51 +0100 Subject: [PATCH] change imports --- client/admin/admin.less | 2 -- client/components/codeEditor/autocompleteEmoji.js | 8 ++++---- client/homebrew/brewRenderer/brewRenderer.jsx | 2 +- .../notificationPopup/notificationPopup.jsx | 2 +- .../editor/metadataEditor/metadataEditor.jsx | 2 +- client/homebrew/editor/snippetbar/snippetbar.jsx | 14 +++++++------- client/homebrew/pages/editPage/editPage.jsx | 2 +- client/homebrew/pages/homePage/homePage.jsx | 2 +- client/homebrew/pages/sharePage/sharePage.jsx | 2 +- package.json | 2 +- themes/Legacy/5ePHB/snippets.js | 12 ++++++------ vitreum/headtags.js | 2 ++ 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/client/admin/admin.less b/client/admin/admin.less index acb859f50..3cb5b0ff3 100644 --- a/client/admin/admin.less +++ b/client/admin/admin.less @@ -5,8 +5,6 @@ @import './shared/naturalcrit/styles/tooltip.less'; @import './themes/fonts/iconFonts/fontAwesome.less'; -@import 'font-awesome/css/font-awesome.css'; - html,body, #reactContainer, .naturalCrit { min-height : 100%; } @sidebarWidth : 250px; diff --git a/client/components/codeEditor/autocompleteEmoji.js b/client/components/codeEditor/autocompleteEmoji.js index 4fa3782d5..61c7697f4 100644 --- a/client/components/codeEditor/autocompleteEmoji.js +++ b/client/components/codeEditor/autocompleteEmoji.js @@ -1,7 +1,7 @@ -import diceFont from './themes/fonts/iconFonts/diceFont.js'; -import elderberryInn from './themes/fonts/iconFonts/elderberryInn.js'; -import fontAwesome from './themes/fonts/iconFonts/fontAwesome.js'; -import gameIcons from './themes/fonts/iconFonts/gameIcons.js'; +import diceFont from '../../../themes/fonts/iconFonts/diceFont.js'; +import elderberryInn from '../../../themes/fonts/iconFonts/elderberryInn.js'; +import fontAwesome from '../../../themes/fonts/iconFonts/fontAwesome.js'; +import gameIcons from '../../../themes/fonts/iconFonts/gameIcons.js'; const emojis = { ...diceFont, diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 771a6aa31..a42b3a64d 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -16,7 +16,7 @@ import dedent from 'dedent'; import { printCurrentBrew } from '../../../shared/helpers.js'; import HeaderNav from './headerNav/headerNav.jsx'; -import { safeHTML } from './safeHTML.js'; +import safeHTML from './safeHTML.js'; const PAGEBREAK_REGEX_V3 = /^(?=\\page(?:break)?(?: *{[^\n{}]*})?$)/m; const PAGEBREAK_REGEX_LEGACY = /\\page(?:break)?/m; diff --git a/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx b/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx index c28233fbf..612fccc85 100644 --- a/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx +++ b/client/homebrew/brewRenderer/notificationPopup/notificationPopup.jsx @@ -1,7 +1,7 @@ import './notificationPopup.less'; import React, { useEffect, useState } from 'react'; import request from '../../utils/request-middleware.js'; -import Markdown from './shared/markdown.js'; +import Markdown from '../../../../shared/markdown.js'; import Dialog from '../../../components/dialog.jsx'; diff --git a/client/homebrew/editor/metadataEditor/metadataEditor.jsx b/client/homebrew/editor/metadataEditor/metadataEditor.jsx index 54dc1a6e8..7c9a586e2 100644 --- a/client/homebrew/editor/metadataEditor/metadataEditor.jsx +++ b/client/homebrew/editor/metadataEditor/metadataEditor.jsx @@ -8,7 +8,7 @@ import Combobox from '../../../components/combobox.jsx'; import TagInput from '../tagInput/tagInput.jsx'; -import Themes from './themes/themes.json'; +import Themes from '../../../../themes/themes.json'; import validations from './validations.js'; const SYSTEMS = ['5e', '4e', '3.5e', 'Pathfinder']; diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx index 2ef780115..7c451b13b 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.jsx +++ b/client/homebrew/editor/snippetbar/snippetbar.jsx @@ -7,13 +7,13 @@ import _ from 'lodash'; import cx from 'classnames'; import { loadHistory } from '../../utils/versionHistory.js'; -import { brewSnippetsToJSON } from './shared/helpers.js'; +import { brewSnippetsToJSON } from '../../../../shared/helpers.js'; -import Legacy5ePHB from './themes/Legacy/5ePHB/snippets.js'; -import V3_5ePHB from './themes/V3/5ePHB/snippets.js'; -import V3_5eDMG from './themes/V3/5eDMG/snippets.js'; -import V3_Journal from './themes/V3/Journal/snippets.js'; -import V3_Blank from './themes/V3/Blank/snippets.js'; +import Legacy5ePHB from '../../../../themes/Legacy/5ePHB/snippets.js'; +import V3_5ePHB from '../../../../themes/V3/5ePHB/snippets.js'; +import V3_5eDMG from '../../../../themes/V3/5eDMG/snippets.js'; +import V3_Journal from '../../../../themes/V3/Journal/snippets.js'; +import V3_Blank from '../../../../themes/V3/Blank/snippets.js'; const ThemeSnippets = { Legacy_5ePHB : Legacy5ePHB, @@ -23,7 +23,7 @@ const ThemeSnippets = { V3_Blank : V3_Blank, }; -import EditorThemes from './build/homebrew/codeMirror/editorThemes.json'; +import EditorThemes from '../../../../build/homebrew/codeMirror/editorThemes.json'; const execute = function(val, props){ if(_.isFunction(val)) return val(props); diff --git a/client/homebrew/pages/editPage/editPage.jsx b/client/homebrew/pages/editPage/editPage.jsx index 3c8f2381b..297a57642 100644 --- a/client/homebrew/pages/editPage/editPage.jsx +++ b/client/homebrew/pages/editPage/editPage.jsx @@ -26,7 +26,7 @@ import RecentNavItems from '../../navbar/recent.navitem.jsx'; const { both: RecentNavItem } = RecentNavItems; // Page specific imports -import { Meta } from '../../../../vitreum/headtags.js'; +import Meta from '../../../../vitreum/headtags.js'; import { md5 } from 'hash-wasm'; import { gzipSync, strToU8 } from 'fflate'; import { makePatches, stringifyPatches } from '@sanity/diff-match-patch'; diff --git a/client/homebrew/pages/homePage/homePage.jsx b/client/homebrew/pages/homePage/homePage.jsx index 6a15a9632..538b6d050 100644 --- a/client/homebrew/pages/homePage/homePage.jsx +++ b/client/homebrew/pages/homePage/homePage.jsx @@ -27,7 +27,7 @@ const { both: RecentNavItem } = RecentNavItems; // Page specific imports -import { Meta } from '../../../../vitreum/headtags.js'; +import Meta from '../../../../vitreum/headtags.js'; const BREWKEY = 'homebrewery-new'; const STYLEKEY = 'homebrewery-new-style'; diff --git a/client/homebrew/pages/sharePage/sharePage.jsx b/client/homebrew/pages/sharePage/sharePage.jsx index 8239df656..e0bf0acd6 100644 --- a/client/homebrew/pages/sharePage/sharePage.jsx +++ b/client/homebrew/pages/sharePage/sharePage.jsx @@ -1,6 +1,6 @@ import './sharePage.less'; import React, { useState, useEffect, useCallback } from 'react'; -import { Meta } from '../../../../vitreum/headtags.js'; +import Meta from '../../../../vitreum/headtags.js'; import Nav from '../../navbar/nav.jsx'; import Navbar from '../../navbar/navbar.jsx'; diff --git a/package.json b/package.json index 14a76052d..f3e3dc294 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "viteDev": "node scripts/dev.js", "viteDevAdmin": "vite --config vite.config.js --ssr client/admin/admin.jsx", "viteBuild": "vite build", - "viteStart": "vite preview", + "viteStart": "vite preview --outDir ../build", "dev": "node --experimental-require-module scripts/dev.js", "quick": "node --experimental-require-module scripts/quick.js", "build": "node --experimental-require-module scripts/buildHomebrew.js && node --experimental-require-module scripts/buildAdmin.js", diff --git a/themes/Legacy/5ePHB/snippets.js b/themes/Legacy/5ePHB/snippets.js index 3a93dfff6..4fb54aaae 100644 --- a/themes/Legacy/5ePHB/snippets.js +++ b/themes/Legacy/5ePHB/snippets.js @@ -1,11 +1,11 @@ /* eslint-disable max-lines */ -import MagicGen from './themes/Legacy/5ePHB/snippets/magic.gen.js'; -import ClassTableGen from './themes/Legacy/5ePHB/snippets/classtable.gen.js'; -import MonsterBlockGen from './themes/Legacy/5ePHB/snippets/monsterblock.gen.js'; -import ClassFeatureGen from './themes/Legacy/5ePHB/snippets/classfeature.gen.js'; -import CoverPageGen from './themes/Legacy/5ePHB/snippets/coverpage.gen.js'; -import TableOfContentsGen from './themes/Legacy/5ePHB/snippets/tableOfContents.gen.js'; +import MagicGen from './snippets/magic.gen.js'; +import ClassTableGen from './snippets/classtable.gen.js'; +import MonsterBlockGen from './snippets/monsterblock.gen.js'; +import ClassFeatureGen from './snippets/classfeature.gen.js'; +import CoverPageGen from './snippets/coverpage.gen.js'; +import TableOfContentsGen from './snippets/tableOfContents.gen.js'; import dedent from 'dedent'; export default [ diff --git a/vitreum/headtags.js b/vitreum/headtags.js index a74ad44f7..648fb78e5 100644 --- a/vitreum/headtags.js +++ b/vitreum/headtags.js @@ -74,6 +74,8 @@ export const flush = () => { UnnamedTags = []; }; +export const Meta = HeadComponents.Meta; + export default { Inject, ...HeadComponents,