@hashicorp/design-system-components 5.0.0-rc-20251017103721 → 5.0.0-rc-20251017111344
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/addon-main.cjs
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Copyright (c) HashiCorp, Inc.
|
|
3
3
|
* SPDX-License-Identifier: MPL-2.0
|
|
4
4
|
*/
|
|
5
|
-
|
|
5
|
+
import type ApplicationInstance from '@ember/application/instance';
|
|
6
|
+
export declare function initialize(appInstance: ApplicationInstance): Promise<void>;
|
|
6
7
|
declare const _default: {
|
|
7
8
|
initialize: typeof initialize;
|
|
8
9
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { macroCondition,
|
|
1
|
+
import { macroCondition, isTesting } from '@embroider/macros';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Copyright (c) HashiCorp, Inc.
|
|
5
5
|
* SPDX-License-Identifier: MPL-2.0
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
async function initialize() {
|
|
9
|
-
|
|
8
|
+
async function initialize(appInstance) {
|
|
9
|
+
const config = appInstance.lookup('config:environment');
|
|
10
|
+
if (config.flightIconsSpriteLazyEmbed || !config?.flightIconsSpriteLazyEmbed) {
|
|
10
11
|
const {
|
|
11
12
|
default: svgSprite
|
|
12
13
|
} = await import('@hashicorp/flight-icons/svg-sprite/svg-sprite-module');
|
|
@@ -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 { macroCondition, isTesting
|
|
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 { macroCondition, 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.lookup('config:environment') as Config;\n\n if (\n config.flightIconsSpriteLazyEmbed ||\n !config?.flightIconsSpriteLazyEmbed\n ) {\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 (macroCondition(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","lookup","flightIconsSpriteLazyEmbed","default","svgSprite","macroCondition","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,MAAM,CAAC,oBAAoB,CAAW;EAEjE,IACED,MAAM,CAACE,0BAA0B,IACjC,CAACF,MAAM,EAAEE,0BAA0B,EACnC;IACA,MAAM;AAAEC,MAAAA,OAAO,EAAEC;AAAU,KAAC,GAAG,MAAM,OACnC,sDACF,CAAC;;AAED;AACA;AACA,IAAA,IAAIC,cAAc,CAACC,SAAS,EAAE,CAAC,EAAE;MAC/B,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,EAAER,SAAS,CAAC;AACvD,MAAA;AACF,IAAA,CAAC,MAAM;AACL,MAAA,MAAMG,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,EAAER,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-20251017111344",
|
|
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-20251017111344",
|
|
40
40
|
"@lezer/highlight": "^1.2.1",
|
|
41
41
|
"@nullvoxpopuli/ember-composable-helpers": "^5.2.11",
|
|
42
42
|
"clipboard-polyfill": "^4.1.1",
|