@botonic/nx-plugin 2.27.0 → 2.28.0
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 +12 -0
- package/package.json +1 -1
- package/src/generators/action/files/__name__.ts.template +1 -1
- package/src/generators/bot-app/files/src/client/webchat/index.html.template +1 -1
- package/src/generators/bot-app/files/src/client/webchat/styles.css.template +1 -0
- package/src/generators/bot-app/files/src/client/webchat/webchat-tokens-overrides.css.template +44 -0
- package/src/generators/bot-app/files/src/server/bot/actions/not-found.ts.template +1 -1
- package/src/generators/bot-app/files/src/server/bot/actions/welcome.ts.template +1 -1
- package/src/generators/bot-app/files/src/server/bot/index.ts.template +5 -2
- package/src/generators/bot-app/files/src/server/bot/plugins/ai-agents/index.ts.template +1 -1
- package/src/generators/bot-app/files/src/server/bot/plugins/flow-builder/index.ts.template +1 -1
- package/src/generators/bot-app/files/src/server/bot/routes.ts.template +1 -1
- package/src/generators/bot-app/files/src/server/bot/tracking.ts.template +1 -1
- package/src/generators/bot-app/lilara-version.json +1 -1
- package/src/generators/preset/files/.claude/skills/botonic-action/SKILL.md +2 -2
- package/src/generators/preset/files/.claude/skills/botonic-custom-message/SKILL.md +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 2.28.0 (2026-05-06)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **webchat:** message grouping, responsive layout, and token refinements (BLT-2359) ([#880](https://github.com/metis-ai/hubtype-product/pull/880))
|
|
6
|
+
- **lilara:** semantic token layer — primary/secondary scales, text/surface/radius tokens, component CSS migration ([#879](https://github.com/metis-ai/hubtype-product/pull/879))
|
|
7
|
+
- **foundations:** semantic token layer — PR 1 foundations (BLT-2358) ([#874](https://github.com/metis-ai/hubtype-product/pull/874))
|
|
8
|
+
|
|
9
|
+
### ❤️ Thank You
|
|
10
|
+
|
|
11
|
+
- David Hidalgo @Davidhidalgo
|
|
12
|
+
|
|
1
13
|
## 2.27.0 (2026-04-29)
|
|
2
14
|
|
|
3
15
|
### 🚀 Features
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<title><%= className %> Webchat</title>
|
|
6
6
|
<base href="/" />
|
|
7
7
|
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
9
9
|
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/src/generators/bot-app/files/src/client/webchat/webchat-tokens-overrides.css.template
CHANGED
|
@@ -1,2 +1,46 @@
|
|
|
1
1
|
@layer overrides {
|
|
2
|
+
:root {
|
|
3
|
+
/* ── Primary scale ─────────────────────────────────────────────────────────
|
|
4
|
+
* Override to apply your primary brand colour. All components that reference
|
|
5
|
+
* --primary-* will update automatically.
|
|
6
|
+
*
|
|
7
|
+
* --primary-25: ;
|
|
8
|
+
* --primary-50: ;
|
|
9
|
+
* --primary-100: ;
|
|
10
|
+
* --primary-200: ;
|
|
11
|
+
* --primary-300: ;
|
|
12
|
+
* --primary-400: ;
|
|
13
|
+
* --primary-500: ;
|
|
14
|
+
* --primary-600: ;
|
|
15
|
+
* --primary-700: ;
|
|
16
|
+
* --primary-800: ;
|
|
17
|
+
* --primary-900: ;
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/* ── Secondary scale ───────────────────────────────────────────────────────
|
|
21
|
+
* Override to apply your secondary / accent colour.
|
|
22
|
+
* Note: --secondary-600 also drives --color-focus (keyboard focus rings).
|
|
23
|
+
*
|
|
24
|
+
* --secondary-25: ;
|
|
25
|
+
* --secondary-50: ;
|
|
26
|
+
* --secondary-100: ;
|
|
27
|
+
* --secondary-200: ;
|
|
28
|
+
* --secondary-300: ;
|
|
29
|
+
* --secondary-400: ;
|
|
30
|
+
* --secondary-500: ;
|
|
31
|
+
* --secondary-600: ;
|
|
32
|
+
* --secondary-700: ;
|
|
33
|
+
* --secondary-800: ;
|
|
34
|
+
* --secondary-900: ;
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/* ── Webchat-specific overrides ────────────────────────────────────────────
|
|
38
|
+
* Use --webchat-* tokens to customise individual webchat components.
|
|
39
|
+
* See webchat-tokens.css for the full list of available tokens.
|
|
40
|
+
*
|
|
41
|
+
* --webchat-header-bg: var(--primary-600);
|
|
42
|
+
* --webchat-message-bubble-bot-bg: var(--primary-50);
|
|
43
|
+
* --webchat-trigger-bg: var(--primary-500);
|
|
44
|
+
*/
|
|
45
|
+
}
|
|
2
46
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
BotonicContext,
|
|
4
|
+
BotServerMessageFactory,
|
|
5
|
+
CoreBot,
|
|
6
|
+
} from '@botonic/core'
|
|
4
7
|
|
|
5
8
|
import { plugins } from './plugins'
|
|
6
9
|
import { routes } from './routes'
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
BotonicPluginFlowBuilderOptions,
|
|
5
5
|
FlowBuilderJSONVersion,
|
|
6
6
|
} from '@botonic/plugin-flow-builder'
|
|
7
|
-
import { BotonicContext } from '@botonic/
|
|
7
|
+
import { BotonicContext } from '@botonic/core'
|
|
8
8
|
|
|
9
9
|
import { trackEventToHubtypeAnalytics } from '../../tracking'
|
|
10
10
|
import { isLambdaLocal } from '../../utils'
|
|
@@ -78,10 +78,10 @@ If not already clear from context, ask: "What should this action do?"
|
|
|
78
78
|
Every action receives `BotonicContext` as its argument. The two key pieces for sending responses are:
|
|
79
79
|
|
|
80
80
|
- **`sendMessages`** — async function from `BotonicContext`. Pass an array of messages to send them in a single call.
|
|
81
|
-
- **`BotServerMessageFactory`** — imported from `@botonic/
|
|
81
|
+
- **`BotServerMessageFactory`** — imported from `@botonic/core`. Use its factory methods to build every message; never construct raw message objects by hand.
|
|
82
82
|
|
|
83
83
|
```typescript
|
|
84
|
-
import { BotonicContext, BotServerMessageFactory } from '@botonic/
|
|
84
|
+
import { BotonicContext, BotServerMessageFactory } from '@botonic/core'
|
|
85
85
|
|
|
86
86
|
export async function MyAction({ sendMessages }: BotonicContext) {
|
|
87
87
|
await sendMessages([BotServerMessageFactory.createText({ text: 'Hello!' })])
|
|
@@ -105,6 +105,9 @@ export const ProductCard: React.FC<ProductCardProps> = (props: any) => {
|
|
|
105
105
|
In the output action, build the button server-side and pass it as a prop:
|
|
106
106
|
|
|
107
107
|
```typescript
|
|
108
|
+
import type { BotonicContext } from '@botonic/core'
|
|
109
|
+
import { BotServerMessageFactory } from '@botonic/core'
|
|
110
|
+
|
|
108
111
|
export async function productCardOutput({ sendMessages, session }: BotonicContext) {
|
|
109
112
|
const button = BotServerMessageFactory.createWebviewButton({ title: 'View details', webview: WEBVIEWS.PRODUCT }, session)
|
|
110
113
|
await sendMessages([
|