Preload Material Symbols bundle. (#24065)

* Preload Material Symbols bundle.

* Adding license header.

* Fixing import of icon names.
This commit is contained in:
Dennis Oelkers
2025-11-04 16:24:59 +01:00
committed by GitHub
parent cb634d6e81
commit 51fc863d6b
8 changed files with 26 additions and 11 deletions

View File

@@ -70,7 +70,7 @@
"leaflet": "^1.5.1",
"lodash": "^4.17.4",
"marked": "^16.2.1",
"material-symbols": "^0.35.1",
"@material-symbols/font-700": "^0.39.0",
"md5": "^2.2.1",
"moment-duration-format": "2.3.2",
"moment-precise-range-plugin": "^1.3.0",

View File

@@ -15,7 +15,7 @@
* <http://www.mongodb.com/licensing/server-side-public-license>.
*/
import type { MaterialSymbol as IconName } from 'material-symbols';
import type { MaterialSymbol as IconName } from '@material-symbols/font-700';
export type SizeProp = 'xs' | 'sm' | 'lg' | 'xl' | '2x' | '3x' | '4x' | '5x' | 'huge';
export type RotateProp = 0 | 90 | 180 | 270;

View File

@@ -24,8 +24,6 @@ import SawmillMantine from '@graylog/sawmill/mantine';
import { DEFAULT_THEME_MODE } from './constants';
import 'material-symbols/rounded.css';
type Props = {
children: React.ReactNode;
};

View File

@@ -0,0 +1,17 @@
/*
* Copyright (C) 2020 Graylog, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Public License, version 1,
* as published by MongoDB, Inc.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Server Side Public License for more details.
*
* You should have received a copy of the Server Side Public License
* along with this program. If not, see
* <http://www.mongodb.com/licensing/server-side-public-license>.
*/
import '@material-symbols/font-700/rounded.css';

View File

@@ -23,8 +23,6 @@ import useThemes from 'theme/hooks/useThemes';
import ColorSchemeContext from './ColorSchemeContext';
import 'material-symbols/rounded.css';
type Props = {
children: React.ReactNode;
initialThemeModeOverride?: ColorScheme;

View File

@@ -39,6 +39,7 @@ const webpackConfig = merge(coreConfig, {
dependencies: ['vendor'],
entry: {
app: APP_PATH,
preload: [path.resolve(APP_PATH, 'preload.ts')],
polyfill: [path.resolve(APP_PATH, 'polyfill.js')],
},
module: {

View File

@@ -41,6 +41,7 @@ const baseConfig = {
mode,
name: 'preflight',
entry: {
preload: path.resolve(PREFLIGHT_PATH, '..', 'preload.ts'),
preflight: PREFLIGHT_PATH,
},
output: {

View File

@@ -2652,6 +2652,11 @@
sort-object "^3.0.3"
tinyqueue "^3.0.0"
"@material-symbols/font-700@^0.39.0":
version "0.39.0"
resolved "https://registry.yarnpkg.com/@material-symbols/font-700/-/font-700-0.39.0.tgz#28f45a6a9d0672cae88a3e74cd022dd3f583ccf6"
integrity sha512-3VvpRdWVLEcU7LYFXRW91co0nq4aLGfM5Lqw2BTJww47VsrZ/JOGauQdFGJWbsnq35R55gQQ/1xi2N7AIg+7YA==
"@mdn/browser-compat-data@^5.5.35", "@mdn/browser-compat-data@^5.6.19":
version "5.6.37"
resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-5.6.37.tgz#228d97894a0f0d6a77273e3f707fc31e30ce8112"
@@ -11168,11 +11173,6 @@ material-colors@^1.2.1:
resolved "https://registry.yarnpkg.com/material-colors/-/material-colors-1.2.6.tgz#6d1958871126992ceecc72f4bcc4d8f010865f46"
integrity sha512-6qE4B9deFBIa9YSpOc9O0Sgc43zTeVYbgDT5veRKSlB2+ZuHNoVVxA1L/ckMUayV9Ay9y7Z/SZCLcGteW9i7bg==
material-symbols@^0.35.1:
version "0.35.1"
resolved "https://registry.yarnpkg.com/material-symbols/-/material-symbols-0.35.1.tgz#deb4db7717026c8143abe33792584adda1944997"
integrity sha512-QnWsPGnSZyrB+fzvt51EVnOiiw7ne6FpgUp91VrFwsoEfwkVO/eaGYVSW30lgsb2hEw37ekSLisslIh5+AA8Cg==
math-intrinsics@^1.0.0, math-intrinsics@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9"