@hashicorp/design-system-components 5.0.0-rc-20251017112620 → 5.0.0-rc-20251017112839
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isTesting } from '@embroider/macros';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Copyright (c) HashiCorp, Inc.
|
|
@@ -14,7 +14,7 @@ async function initialize(appInstance) {
|
|
|
14
14
|
|
|
15
15
|
// in test environments we can inject the sprite directly into the ember testing container
|
|
16
16
|
// to avoid issues with tools like Percy that only consider content inside that element
|
|
17
|
-
if (
|
|
17
|
+
if (isTesting()) {
|
|
18
18
|
const container = window.document?.getElementById('ember-testing');
|
|
19
19
|
if (container && !container.querySelector('.flight-sprite-container')) {
|
|
20
20
|
container.insertAdjacentHTML('afterbegin', svgSprite);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-sprite.js","sources":["../../src/instance-initializers/load-sprite.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"load-sprite.js","sources":["../../src/instance-initializers/load-sprite.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport { isTesting } from '@embroider/macros';\n\nimport type ApplicationInstance from '@ember/application/instance';\n\ninterface Config {\n flightIconsSpriteLazyEmbed?: boolean;\n}\n\nexport async function initialize(appInstance: ApplicationInstance) {\n const config = appInstance.resolveRegistration(\n 'config:environment'\n ) as Config;\n\n if (config.flightIconsSpriteLazyEmbed) {\n const { default: svgSprite } = await import(\n '@hashicorp/flight-icons/svg-sprite/svg-sprite-module'\n );\n\n // in test environments we can inject the sprite directly into the ember testing container\n // to avoid issues with tools like Percy that only consider content inside that element\n if (isTesting()) {\n const container = window.document?.getElementById('ember-testing');\n\n if (container && !container.querySelector('.flight-sprite-container')) {\n container.insertAdjacentHTML('afterbegin', svgSprite);\n }\n } else {\n const container = window.document?.body;\n\n if (container && !container.querySelector('.flight-sprite-container')) {\n container.insertAdjacentHTML('beforeend', svgSprite);\n }\n }\n }\n}\n\nexport default {\n initialize,\n};\n"],"names":["initialize","appInstance","config","resolveRegistration","flightIconsSpriteLazyEmbed","default","svgSprite","isTesting","container","window","document","getElementById","querySelector","insertAdjacentHTML","body"],"mappings":";;AAAA;AACA;AACA;AACA;;AAUO,eAAeA,UAAUA,CAACC,WAAgC,EAAE;AACjE,EAAA,MAAMC,MAAM,GAAGD,WAAW,CAACE,mBAAmB,CAC5C,oBACF,CAAW;EAEX,IAAID,MAAM,CAACE,0BAA0B,EAAE;IACrC,MAAM;AAAEC,MAAAA,OAAO,EAAEC;AAAU,KAAC,GAAG,MAAM,OACnC,sDACF,CAAC;;AAED;AACA;IACA,IAAIC,SAAS,EAAE,EAAE;MACf,MAAMC,SAAS,GAAGC,MAAM,CAACC,QAAQ,EAAEC,cAAc,CAAC,eAAe,CAAC;MAElE,IAAIH,SAAS,IAAI,CAACA,SAAS,CAACI,aAAa,CAAC,0BAA0B,CAAC,EAAE;AACrEJ,QAAAA,SAAS,CAACK,kBAAkB,CAAC,YAAY,EAAEP,SAAS,CAAC;AACvD,MAAA;AACF,IAAA,CAAC,MAAM;AACL,MAAA,MAAME,SAAS,GAAGC,MAAM,CAACC,QAAQ,EAAEI,IAAI;MAEvC,IAAIN,SAAS,IAAI,CAACA,SAAS,CAACI,aAAa,CAAC,0BAA0B,CAAC,EAAE;AACrEJ,QAAAA,SAAS,CAACK,kBAAkB,CAAC,WAAW,EAAEP,SAAS,CAAC;AACtD,MAAA;AACF,IAAA;AACF,EAAA;AACF;AAEA,iBAAe;AACbN,EAAAA;AACF,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hashicorp/design-system-components",
|
|
3
|
-
"version": "5.0.0-rc-
|
|
3
|
+
"version": "5.0.0-rc-20251017112839",
|
|
4
4
|
"description": "Helios Design System Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hashicorp",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@embroider/util": "^1.13.4",
|
|
37
37
|
"@floating-ui/dom": "^1.6.12",
|
|
38
38
|
"@hashicorp/design-system-tokens": "^3.0.0",
|
|
39
|
-
"@hashicorp/flight-icons": "4.0.0-rc-
|
|
39
|
+
"@hashicorp/flight-icons": "4.0.0-rc-20251017112839",
|
|
40
40
|
"@lezer/highlight": "^1.2.1",
|
|
41
41
|
"@nullvoxpopuli/ember-composable-helpers": "^5.2.11",
|
|
42
42
|
"clipboard-polyfill": "^4.1.1",
|