@red-hat-developer-hub/backstage-plugin-theme 0.14.0 → 0.14.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @red-hat-developer-hub/backstage-plugin-theme
2
2
 
3
+ ## 0.14.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 8d1eee2: Add missing font css reference so that the Red Hat font is used again.
8
+
3
9
  ## 0.14.0
4
10
 
5
11
  ### Minor Changes
package/dist/alpha.esm.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { createFrontendModule } from '@backstage/frontend-plugin-api';
2
2
  import { ThemeBlueprint } from '@backstage/plugin-app-react';
3
+ import './assets/fonts/font.min.css.esm.js';
3
4
  import { getAllThemes } from './themes.esm.js';
4
5
 
5
6
  const rhdhThemeExtensions = getAllThemes().map(
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.esm.js","sources":["../src/alpha/index.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createFrontendModule } from '@backstage/frontend-plugin-api';\nimport { ThemeBlueprint } from '@backstage/plugin-app-react';\nimport { getAllThemes } from '../themes';\n\n/**\n * RHDH themes as NFS extensions (ThemeBlueprint).\n * Only the app can register ThemeBlueprint; we use the same theme definitions\n * from the theme plugin (getAllThemes()) so behavior matches the legacy app.\n *\n * @packageDocumentation\n */\nconst rhdhThemeExtensions = getAllThemes().map(appTheme =>\n ThemeBlueprint.make({\n name: appTheme.id,\n params: {\n theme: {\n id: appTheme.id,\n title: appTheme.title,\n variant: appTheme.variant,\n icon: appTheme.icon,\n Provider: appTheme.Provider,\n },\n },\n }),\n);\n\n/*\n * @alpha\n */\nexport const rhdhThemeModule = createFrontendModule({\n pluginId: 'app',\n extensions: rhdhThemeExtensions,\n});\n"],"names":[],"mappings":";;;;AA2BA,MAAM,mBAAA,GAAsB,cAAe,CAAA,GAAA;AAAA,EAAI,CAAA,QAAA,KAC7C,eAAe,IAAK,CAAA;AAAA,IAClB,MAAM,QAAS,CAAA,EAAA;AAAA,IACf,MAAQ,EAAA;AAAA,MACN,KAAO,EAAA;AAAA,QACL,IAAI,QAAS,CAAA,EAAA;AAAA,QACb,OAAO,QAAS,CAAA,KAAA;AAAA,QAChB,SAAS,QAAS,CAAA,OAAA;AAAA,QAClB,MAAM,QAAS,CAAA,IAAA;AAAA,QACf,UAAU,QAAS,CAAA;AAAA;AACrB;AACF,GACD;AACH,CAAA;AAKO,MAAM,kBAAkB,oBAAqB,CAAA;AAAA,EAClD,QAAU,EAAA,KAAA;AAAA,EACV,UAAY,EAAA;AACd,CAAC;;;;"}
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/alpha/index.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * RHDH themes as NFS extensions (ThemeBlueprint).\n * Only the app can register ThemeBlueprint; we use the same theme definitions\n * from the theme plugin (getAllThemes()) so behavior matches the legacy app.\n *\n * @packageDocumentation\n */\n\nimport { createFrontendModule } from '@backstage/frontend-plugin-api';\nimport { ThemeBlueprint } from '@backstage/plugin-app-react';\n\nimport '../assets/fonts/font.min.css';\n\nimport { getAllThemes } from '../themes';\n\nconst rhdhThemeExtensions = getAllThemes().map(appTheme =>\n ThemeBlueprint.make({\n name: appTheme.id,\n params: {\n theme: {\n id: appTheme.id,\n title: appTheme.title,\n variant: appTheme.variant,\n icon: appTheme.icon,\n Provider: appTheme.Provider,\n },\n },\n }),\n);\n\n/*\n * @alpha\n */\nexport const rhdhThemeModule = createFrontendModule({\n pluginId: 'app',\n extensions: rhdhThemeExtensions,\n});\n"],"names":[],"mappings":";;;;;AA+BA,MAAM,mBAAA,GAAsB,cAAe,CAAA,GAAA;AAAA,EAAI,CAAA,QAAA,KAC7C,eAAe,IAAK,CAAA;AAAA,IAClB,MAAM,QAAS,CAAA,EAAA;AAAA,IACf,MAAQ,EAAA;AAAA,MACN,KAAO,EAAA;AAAA,QACL,IAAI,QAAS,CAAA,EAAA;AAAA,QACb,OAAO,QAAS,CAAA,KAAA;AAAA,QAChB,SAAS,QAAS,CAAA,OAAA;AAAA,QAClB,MAAM,QAAS,CAAA,IAAA;AAAA,QACf,UAAU,QAAS,CAAA;AAAA;AACrB;AACF,GACD;AACH,CAAA;AAKO,MAAM,kBAAkB,oBAAqB,CAAA;AAAA,EAClD,QAAU,EAAA,KAAA;AAAA,EACV,UAAY,EAAA;AACd,CAAC;;;;"}
@@ -0,0 +1,7 @@
1
+ import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
2
+
3
+ var css_248z = "@font-face {\n font-family: 'RedHatDisplay';\n src: url(./RedHatDisplay/RedHatDisplayVF.woff2) format('woff2-variations');\n font-weight: 300 900;\n font-style: normal;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatDisplay';\n src: url(./RedHatDisplay/RedHatDisplayVF-Italic.woff2)\n format('woff2-variations');\n font-weight: 300 900;\n font-style: italic;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatText';\n src: url(./RedHatText/RedHatTextVF.woff2) format('woff2-variations');\n font-weight: 300 700;\n font-style: normal;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatText';\n src: url(./RedHatText/RedHatTextVF-Italic.woff2) format('woff2-variations');\n font-weight: 300 700;\n font-style: italic;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatMono';\n src: url(./RedHatMono/RedHatMonoVF.woff2) format('woff2-variations');\n font-weight: 300 700;\n font-style: normal;\n font-display: fallback;\n}\n@font-face {\n font-family: 'RedHatMono';\n src: url(./RedHatMono/RedHatMonoVF-Italic.woff2) format('woff2-variations');\n font-weight: 300 700;\n font-style: italic;\n font-display: fallback;\n}\n";
4
+ styleInject(css_248z);
5
+
6
+ export { css_248z as default };
7
+ //# sourceMappingURL=font.min.css.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font.min.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
package/dist/index.esm.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export { default as LightIcon } from '@mui/icons-material/WbSunnyRounded';
2
2
  export { default as DarkIcon } from '@mui/icons-material/Brightness2Rounded';
3
+ import './assets/fonts/font.min.css.esm.js';
3
4
  export { useBranding } from './hooks/useBranding.esm.js';
4
5
  export { useThemeConfig } from './hooks/useThemeConfig.esm.js';
5
6
  export { useThemeOptions } from './hooks/useThemeOptions.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -0,0 +1,29 @@
1
+ function styleInject(css, ref) {
2
+ if ( ref === undefined ) ref = {};
3
+ var insertAt = ref.insertAt;
4
+
5
+ if (typeof document === 'undefined') { return; }
6
+
7
+ var head = document.head || document.getElementsByTagName('head')[0];
8
+ var style = document.createElement('style');
9
+ style.type = 'text/css';
10
+
11
+ if (insertAt === 'top') {
12
+ if (head.firstChild) {
13
+ head.insertBefore(style, head.firstChild);
14
+ } else {
15
+ head.appendChild(style);
16
+ }
17
+ } else {
18
+ head.appendChild(style);
19
+ }
20
+
21
+ if (style.styleSheet) {
22
+ style.styleSheet.cssText = css;
23
+ } else {
24
+ style.appendChild(document.createTextNode(css));
25
+ }
26
+ }
27
+
28
+ export { styleInject as default };
29
+ //# sourceMappingURL=style-inject.es.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style-inject.es.esm.js","sources":["../../../../../../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":"AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,SAAM,GAAG,GAAG,GAAG,EAAE;AAChC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ;;AAE7B,EAAE,IAAY,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO;;AAExD,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACtE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC;AAC7C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU;;AAEzB,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC;AAC/C,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC7B;AACA,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAC3B;;AAEA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG;AAClC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AACnD;AACA;;;;","x_google_ignoreList":[0]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@red-hat-developer-hub/backstage-plugin-theme",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "Red Hat Developer Hub Theme",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -20,7 +20,9 @@
20
20
  "@red-hat-developer-hub/backstage-plugin-theme"
21
21
  ]
22
22
  },
23
- "sideEffects": false,
23
+ "sideEffects": [
24
+ "*.css"
25
+ ],
24
26
  "exports": {
25
27
  ".": {
26
28
  "import": "./dist/index.esm.js",
@@ -69,8 +71,6 @@
69
71
  "@backstage/core-plugin-api": "^1.12.4",
70
72
  "@backstage/dev-utils": "^1.1.21",
71
73
  "@backstage/frontend-defaults": "^0.5.0",
72
- "@backstage/frontend-plugin-api": "^0.15.1",
73
- "@backstage/plugin-app-react": "^0.2.1",
74
74
  "@backstage/plugin-user-settings": "^0.9.1",
75
75
  "@backstage/test-utils": "^1.7.16",
76
76
  "@backstage/theme": "^0.7.2",
@@ -106,6 +106,8 @@
106
106
  "@divyanshiGupta"
107
107
  ],
108
108
  "dependencies": {
109
+ "@backstage/frontend-plugin-api": "^0.15.1",
110
+ "@backstage/plugin-app-react": "^0.2.1",
109
111
  "@mui/icons-material": "^5.17.1"
110
112
  },
111
113
  "module": "./dist/index.esm.js"