@cloudscape-design/chat-components 1.0.28 → 1.0.30
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/chat-bubble/styles.css.js +9 -9
- package/chat-bubble/styles.scoped.css +11 -9
- package/chat-bubble/styles.selectors.js +9 -9
- 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
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"message-area": "awsui_message-
|
|
6
|
-
"with-loading-bar": "awsui_with-loading-
|
|
7
|
-
"chat-bubble-type-outgoing": "awsui_chat-bubble-type-
|
|
8
|
-
"chat-bubble-type-incoming": "awsui_chat-bubble-type-
|
|
9
|
-
"avatar": "
|
|
10
|
-
"hide": "
|
|
11
|
-
"content": "
|
|
12
|
-
"actions": "
|
|
4
|
+
"root": "awsui_root_cdujn_1bnjm_11",
|
|
5
|
+
"message-area": "awsui_message-area_cdujn_1bnjm_45",
|
|
6
|
+
"with-loading-bar": "awsui_with-loading-bar_cdujn_1bnjm_57",
|
|
7
|
+
"chat-bubble-type-outgoing": "awsui_chat-bubble-type-outgoing_cdujn_1bnjm_60",
|
|
8
|
+
"chat-bubble-type-incoming": "awsui_chat-bubble-type-incoming_cdujn_1bnjm_64",
|
|
9
|
+
"avatar": "awsui_avatar_cdujn_1bnjm_69",
|
|
10
|
+
"hide": "awsui_hide_cdujn_1bnjm_72",
|
|
11
|
+
"content": "awsui_content_cdujn_1bnjm_76",
|
|
12
|
+
"actions": "awsui_actions_cdujn_1bnjm_80"
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
10
10
|
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
11
|
-
.
|
|
11
|
+
.awsui_root_cdujn_1bnjm_11:not(#\9) {
|
|
12
12
|
border-collapse: separate;
|
|
13
13
|
border-spacing: 0;
|
|
14
14
|
box-sizing: border-box;
|
|
@@ -43,39 +43,41 @@
|
|
|
43
43
|
line-height: var(--line-height-heading-m-50evfk, 22px);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.awsui_message-
|
|
46
|
+
.awsui_message-area_cdujn_1bnjm_45:not(#\9) {
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-direction: column;
|
|
49
49
|
gap: var(--space-scaled-s-aqzyko, 12px);
|
|
50
50
|
padding: var(--space-scaled-s-aqzyko, 12px);
|
|
51
|
+
min-width: 0;
|
|
52
|
+
overflow-x: auto;
|
|
51
53
|
border-start-start-radius: var(--border-radius-chat-bubble-qvkt36, 8px);
|
|
52
54
|
border-start-end-radius: var(--border-radius-chat-bubble-qvkt36, 8px);
|
|
53
55
|
border-end-start-radius: var(--border-radius-chat-bubble-qvkt36, 8px);
|
|
54
56
|
border-end-end-radius: var(--border-radius-chat-bubble-qvkt36, 8px);
|
|
55
57
|
}
|
|
56
|
-
.awsui_message-
|
|
58
|
+
.awsui_message-area_cdujn_1bnjm_45.awsui_with-loading-bar_cdujn_1bnjm_57:not(#\9) {
|
|
57
59
|
padding-block-end: 0;
|
|
58
60
|
}
|
|
59
|
-
.awsui_message-
|
|
61
|
+
.awsui_message-area_cdujn_1bnjm_45.awsui_chat-bubble-type-outgoing_cdujn_1bnjm_60:not(#\9) {
|
|
60
62
|
color: var(--color-text-chat-bubble-outgoing-bvbr0v, #0f141a);
|
|
61
63
|
background-color: var(--color-background-chat-bubble-outgoing-pfqan2, transparent);
|
|
62
64
|
}
|
|
63
|
-
.awsui_message-
|
|
65
|
+
.awsui_message-area_cdujn_1bnjm_45.awsui_chat-bubble-type-incoming_cdujn_1bnjm_64:not(#\9) {
|
|
64
66
|
color: var(--color-text-chat-bubble-incoming-x2kig8, #0f141a);
|
|
65
67
|
background-color: var(--color-background-chat-bubble-incoming-8pi0ow, #f6f6f9);
|
|
66
68
|
}
|
|
67
69
|
|
|
68
|
-
.
|
|
70
|
+
.awsui_avatar_cdujn_1bnjm_69:not(#\9) {
|
|
69
71
|
padding-block: var(--space-scaled-xs-26e2du, 8px);
|
|
70
72
|
}
|
|
71
|
-
.
|
|
73
|
+
.awsui_avatar_cdujn_1bnjm_69.awsui_hide_cdujn_1bnjm_72:not(#\9) {
|
|
72
74
|
opacity: 0;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
|
-
.
|
|
77
|
+
.awsui_content_cdujn_1bnjm_76:not(#\9) {
|
|
76
78
|
/* Used in test utils */
|
|
77
79
|
}
|
|
78
80
|
|
|
79
|
-
.
|
|
81
|
+
.awsui_actions_cdujn_1bnjm_80:not(#\9) {
|
|
80
82
|
/* Used in test utils */
|
|
81
83
|
}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"message-area": "awsui_message-
|
|
7
|
-
"with-loading-bar": "awsui_with-loading-
|
|
8
|
-
"chat-bubble-type-outgoing": "awsui_chat-bubble-type-
|
|
9
|
-
"chat-bubble-type-incoming": "awsui_chat-bubble-type-
|
|
10
|
-
"avatar": "
|
|
11
|
-
"hide": "
|
|
12
|
-
"content": "
|
|
13
|
-
"actions": "
|
|
5
|
+
"root": "awsui_root_cdujn_1bnjm_11",
|
|
6
|
+
"message-area": "awsui_message-area_cdujn_1bnjm_45",
|
|
7
|
+
"with-loading-bar": "awsui_with-loading-bar_cdujn_1bnjm_57",
|
|
8
|
+
"chat-bubble-type-outgoing": "awsui_chat-bubble-type-outgoing_cdujn_1bnjm_60",
|
|
9
|
+
"chat-bubble-type-incoming": "awsui_chat-bubble-type-incoming_cdujn_1bnjm_64",
|
|
10
|
+
"avatar": "awsui_avatar_cdujn_1bnjm_69",
|
|
11
|
+
"hide": "awsui_hide_cdujn_1bnjm_72",
|
|
12
|
+
"content": "awsui_content_cdujn_1bnjm_76",
|
|
13
|
+
"actions": "awsui_actions_cdujn_1bnjm_80"
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -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/chat-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cloudscape-design/chat-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
|
},
|