@cloudscape-design/board-components 3.0.93 → 3.0.95
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/internal/base-component/use-telemetry.js +3 -1
- package/internal/base-component/use-telemetry.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/internal/utils/get-visual-theme.d.ts +1 -0
- package/internal/utils/get-visual-theme.js +9 -0
- package/internal/utils/get-visual-theme.js.map +1 -0
- package/package.json +1 -2
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { useComponentMetrics } from "@cloudscape-design/component-toolkit/internal";
|
|
4
4
|
import { PACKAGE_SOURCE, PACKAGE_VERSION, THEME } from "../environment";
|
|
5
|
+
import { getVisualTheme } from "../utils/get-visual-theme";
|
|
5
6
|
import { useVisualRefresh } from "./use-visual-refresh";
|
|
6
7
|
export function useTelemetry(componentName, config) {
|
|
7
|
-
const
|
|
8
|
+
const isVisualRefresh = useVisualRefresh();
|
|
9
|
+
const theme = getVisualTheme(THEME, isVisualRefresh);
|
|
8
10
|
useComponentMetrics(componentName, { packageSource: PACKAGE_SOURCE, packageVersion: PACKAGE_VERSION, theme }, config);
|
|
9
11
|
}
|
|
10
12
|
//# sourceMappingURL=use-telemetry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-telemetry.js","sourceRoot":"","sources":["../../../../src/internal/base-component/use-telemetry.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAA0B,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAE5G,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,UAAU,YAAY,CAAC,aAAqB,EAAE,MAA+B;IACjF,MAAM,
|
|
1
|
+
{"version":3,"file":"use-telemetry.js","sourceRoot":"","sources":["../../../../src/internal/base-component/use-telemetry.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAA0B,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAE5G,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,UAAU,YAAY,CAAC,aAAqB,EAAE,MAA+B;IACjF,MAAM,eAAe,GAAG,gBAAgB,EAAE,CAAC;IAC3C,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACrD,mBAAmB,CAAC,aAAa,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;AACxH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ComponentConfiguration, useComponentMetrics } from \"@cloudscape-design/component-toolkit/internal\";\n\nimport { PACKAGE_SOURCE, PACKAGE_VERSION, THEME } from \"../environment\";\nimport { getVisualTheme } from \"../utils/get-visual-theme\";\nimport { useVisualRefresh } from \"./use-visual-refresh\";\n\nexport function useTelemetry(componentName: string, config?: ComponentConfiguration) {\n const isVisualRefresh = useVisualRefresh();\n const theme = getVisualTheme(THEME, isVisualRefresh);\n useComponentMetrics(componentName, { packageSource: PACKAGE_SOURCE, packageVersion: PACKAGE_VERSION, theme }, config);\n}\n"]}
|
package/internal/environment.js
CHANGED
package/internal/manifest.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getVisualTheme: (theme: string, isVR: boolean) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
export const getVisualTheme = (theme, isVR) => {
|
|
4
|
+
if (theme === "polaris" && isVR) {
|
|
5
|
+
return "vr";
|
|
6
|
+
}
|
|
7
|
+
return theme;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=get-visual-theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-visual-theme.js","sourceRoot":"","sources":["../../../../src/internal/utils/get-visual-theme.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,IAAa,EAAE,EAAE;IAC7D,IAAI,KAAK,KAAK,SAAS,IAAI,IAAI,EAAE;QAC/B,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport const getVisualTheme = (theme: string, isVR: boolean) => {\n if (theme === \"polaris\" && isVR) {\n return \"vr\";\n }\n\n return theme;\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudscape-design/board-components",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.95",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/cloudscape-design/board-components.git"
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@cloudscape-design/components": "^3",
|
|
26
|
-
"@cloudscape-design/design-tokens": "^3",
|
|
27
26
|
"react": "^18.2.0",
|
|
28
27
|
"react-dom": "^18.2.0"
|
|
29
28
|
},
|