@botonic/nx-plugin 2.23.1 β†’ 2.24.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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## 2.24.0 (2026-03-27)
2
+
3
+ ### πŸš€ Features
4
+
5
+ - **botonic:** remove webchat-react Lilara gateway and decouple CSS #BLT-2288 ([#770](https://github.com/metis-ai/hubtype-product/pull/770))
6
+
7
+ ### ❀️ Thank You
8
+
9
+ - David Hidalgo @Davidhidalgo
10
+
11
+ ## 2.23.2 (2026-03-23)
12
+
13
+ This was a version bump only for @botonic/nx-plugin to align it with other projects, there were no code changes.
14
+
1
15
  ## 2.23.1 (2026-03-23)
2
16
 
3
17
  This was a version bump only for @botonic/nx-plugin to align it with other projects, there were no code changes.
package/README.md CHANGED
@@ -4,10 +4,10 @@ Nx **generators** and **migrations** for Botonic bot apps and workspaces on the
4
4
 
5
5
  ## Source and versions
6
6
 
7
- | Line | npm | Source |
8
- | ----------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
9
- | **Legacy** | `0.x` | [github.com/hubtype/botonic](https://github.com/hubtype/botonic) |
10
- | **Current** | `2.x` | [github.com/hubtype/hubtype-product](https://github.com/hubtype/hubtype-product) Β· [`libs/botonic/nx-plugin`](https://github.com/hubtype/hubtype-product/tree/main/libs/botonic/nx-plugin) |
7
+ | Line | npm | Source |
8
+ | ----------- | ----- | ---------------------------------------------------------------- |
9
+ | **Legacy** | `0.x` | [github.com/hubtype/botonic](https://github.com/hubtype/botonic) |
10
+ | **Current** | `2.x` | Hubtype internal monorepo (not public; packages publish to npm) |
11
11
 
12
12
  Keep this package aligned in **major version** with `@botonic/core` and other `@botonic/*` dependencies in your workspace.
13
13
 
@@ -258,7 +258,7 @@ Migrations are designed to be safe:
258
258
 
259
259
  ## Contributing
260
260
 
261
- Changes land via the **[hubtype/hubtype-product](https://github.com/hubtype/hubtype-product)** repository (`libs/botonic/nx-plugin`). Add tests for new generators or migrations and open a pull request there.
261
+ Contributions are handled **inside Hubtype** (this plugin ships with the private Botonic source tree). Add tests for new generators or migrations and follow your team’s internal PR process.
262
262
 
263
263
  ## License
264
264
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botonic/nx-plugin",
3
- "version": "2.23.1",
3
+ "version": "2.24.0",
4
4
  "description": "Nx plugin for creating Botonic bot applications",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -1,3 +1,6 @@
1
+ import '@lilara/foundations/base.css'
2
+ import '@lilara/ui-web-react/styles.css'
3
+ import '@botonic/webchat-react/styles.css'
1
4
  import './styles.css'
2
5
 
3
6
  import type { WebchatConfig } from '@botonic/webchat-core'
@@ -1,6 +1,3 @@
1
- /* Import library styles (standard CSS import pattern) */
2
- @import '@botonic/webchat-react/styles.css';
3
-
4
1
  /* Import app-specific token overrides */
5
2
  @import './webchat-tokens-overrides.css';
6
3
 
@@ -1,3 +1,5 @@
1
+ import '@lilara/ui-web-react/styles.css'
2
+
1
3
  import { WebviewApp, WebviewDefinition } from '@botonic/webviews'
2
4
  import * as ReactDOM from 'react-dom/client'
3
5
 
@@ -17,4 +17,3 @@ export function getBaseConfig() {
17
17
  },
18
18
  }
19
19
  }
20
-
@@ -10,8 +10,13 @@ const server = BUILD_CONFIG.SERVER.webviews
10
10
 
11
11
  export function getWebviewsConfig(command: 'serve' | 'build'): UserConfig {
12
12
  return {
13
- // For serve mode, use the webviews directory as root so dev server finds index.html
14
- // For build mode, use project root to avoid relative path issues
13
+ resolve: {
14
+ dedupe: [
15
+ '@lilara/foundations',
16
+ '@lilara/ui-web-react',
17
+ '@lilara/ui-web',
18
+ ],
19
+ },
15
20
  root:
16
21
  command === 'serve'
17
22
  ? resolve(projectRoot, BUILD_CONFIG.INPUT.webviews.root)
@@ -32,9 +32,32 @@ __export(generator_exports, {
32
32
  });
33
33
  module.exports = __toCommonJS(generator_exports);
34
34
  var import_devkit = require("@nx/devkit");
35
+ var import_child_process = require("child_process");
35
36
  var fs = __toESM(require("fs"));
36
37
  var path = __toESM(require("path"));
37
38
  const MODULE_DIR = __dirname;
39
+ function getLilaraVersion() {
40
+ const jsonPath = path.join(MODULE_DIR, "lilara-version.json");
41
+ try {
42
+ if (fs.existsSync(jsonPath)) {
43
+ const data = JSON.parse(fs.readFileSync(jsonPath, "utf-8"));
44
+ if (data.version && typeof data.version === "string") {
45
+ return data.version.replace(/^[\^~]/, "");
46
+ }
47
+ }
48
+ } catch {
49
+ }
50
+ try {
51
+ const tag = (0, import_child_process.execSync)('git describe --tags --match "lilara-v*" --abbrev=0', {
52
+ encoding: "utf-8",
53
+ stdio: ["pipe", "pipe", "pipe"]
54
+ }).trim();
55
+ const v = tag.replace(/^lilara-v/, "");
56
+ if (v) return v;
57
+ } catch {
58
+ }
59
+ return "latest";
60
+ }
38
61
  function getBotonicVersion(options) {
39
62
  const version = options.botonicVersion;
40
63
  if (version && version !== "{{WORKSPACE_VERSION}}" && version !== "latest") {
@@ -109,7 +132,7 @@ function createProjectConfiguration(tree, options) {
109
132
  };
110
133
  (0, import_devkit.addProjectConfiguration)(tree, options.projectName, projectConfig);
111
134
  }
112
- function createPackageJson(tree, options, botonicVersion) {
135
+ function createPackageJson(tree, options, botonicVersion, lilaraVersion) {
113
136
  const packageJson = {
114
137
  name: options.projectName,
115
138
  version: "1.0.0",
@@ -120,26 +143,29 @@ function createPackageJson(tree, options, botonicVersion) {
120
143
  scripts: {},
121
144
  dependencies: {
122
145
  "@botonic/core": botonicVersion,
146
+ "@botonic/plugin-ai-agents": botonicVersion,
147
+ "@botonic/plugin-flow-builder": botonicVersion,
148
+ "@botonic/plugin-hubtype-analytics": botonicVersion,
123
149
  "@botonic/shared": botonicVersion,
124
150
  "@botonic/webchat-core": botonicVersion,
125
151
  "@botonic/webchat-react": botonicVersion,
126
152
  "@botonic/webviews": botonicVersion,
127
- "@botonic/plugin-hubtype-analytics": botonicVersion,
128
- "@botonic/plugin-flow-builder": botonicVersion,
129
- "@botonic/plugin-ai-agents": botonicVersion,
153
+ "@lilara/foundations": lilaraVersion,
154
+ "@lilara/ui-web": lilaraVersion,
155
+ "@lilara/ui-web-react": lilaraVersion,
130
156
  react: "18.3.1",
131
157
  "react-dom": "18.3.1"
132
158
  },
133
159
  devDependencies: {
134
- "@nx/vite": "21.0.3",
135
- "@types/node": "18.16.9",
160
+ "@nx/vite": "21.6.3",
161
+ "@types/node": "22.13.0",
136
162
  "@types/react": "18.3.1",
137
163
  "@types/react-dom": "18.3.0",
138
164
  "@vitejs/plugin-react": "^4.2.0",
139
165
  "@vitejs/plugin-react-swc": "^3.5.0",
140
166
  typescript: "5.7.3",
141
- vite: "^5.0.0",
142
- vitest: "^1.3.1"
167
+ vite: "7.1.9",
168
+ vitest: "^4.0.15"
143
169
  }
144
170
  };
145
171
  (0, import_devkit.writeJson)(tree, `${options.projectRoot}/package.json`, packageJson);
@@ -227,15 +253,15 @@ function addBotonicDependencies(tree, botonicVersion) {
227
253
  },
228
254
  // devDependencies
229
255
  {
230
- "@nx/vite": "21.0.3",
231
- "@types/node": "18.16.9",
256
+ "@nx/vite": "21.6.3",
257
+ "@types/node": "22.13.0",
232
258
  "@types/react": "18.3.1",
233
259
  "@types/react-dom": "18.3.0",
234
260
  "@vitejs/plugin-react": "4.2.0",
235
261
  "@vitejs/plugin-react-swc": "3.5.0",
236
262
  typescript: "5.7.3",
237
- vite: "5.0.0",
238
- vitest: "1.3.1"
263
+ vite: "7.1.9",
264
+ vitest: "^4.0.15"
239
265
  }
240
266
  );
241
267
  }
@@ -254,8 +280,10 @@ function addBotonicFiles(tree, options, botonicVersion) {
254
280
  }
255
281
  async function generator_default(tree, options) {
256
282
  const botonicVersion = getBotonicVersion(options);
283
+ const lilaraVersion = getLilaraVersion();
257
284
  const tasks = [];
258
285
  console.log(`\u{1F916} Using Botonic version: ${botonicVersion}`);
286
+ console.log(`\u{1F3A8} Using Lilara version: ${lilaraVersion}`);
259
287
  console.log(`\u{1F50D} Creating project using programmatic configuration...`);
260
288
  const normalizedOptions = normalizeOptions(tree, options);
261
289
  console.log(`\u{1F50D} Normalized options:`, {
@@ -264,7 +292,7 @@ async function generator_default(tree, options) {
264
292
  projectDirectory: normalizedOptions.projectDirectory
265
293
  });
266
294
  createProjectConfiguration(tree, normalizedOptions);
267
- createPackageJson(tree, normalizedOptions, botonicVersion);
295
+ createPackageJson(tree, normalizedOptions, botonicVersion, lilaraVersion);
268
296
  createTsConfigs(tree, normalizedOptions);
269
297
  const depsTask = addBotonicDependencies(tree, botonicVersion);
270
298
  tasks.push(depsTask);
@@ -0,0 +1,3 @@
1
+ {
2
+ "version": "0.4.0"
3
+ }
@@ -43,11 +43,13 @@ If not already clear from context, ask: "What should this webview display or all
43
43
  Use `WebviewFrame`, `WebviewHeader`, `WebviewBody` from `@botonic/webviews` as the structural shell.
44
44
  Access request data and the close handler via `useWebviewRequest`.
45
45
 
46
- > **CSS reset and design tokens are loaded automatically.** `WebviewApp` imports `@lilara/foundations/reset.css` and `@lilara/foundations/tokens.css` as side effects β€” no manual CSS import is needed in the app's `index.tsx`.
46
+ > **CSS loading.** `WebviewApp` (from `@botonic/webviews`) loads `@lilara/foundations` reset + tokens internally. The webview entry (`src/client/webviews/index.tsx`) only imports `@lilara/ui-web-react/styles.css` for Lilara component styles β€” this is generated for new bots.
47
47
 
48
- #### Always use UI components from `@botonic/webchat-react`
48
+ #### Always use UI components from `@lilara/ui-web-react`
49
49
 
50
- Never use raw HTML elements (`<input>`, `<button>`, `<select>`, etc.) in webviews. All interactive and display elements must come from `@botonic/webchat-react`, which re-exports the full design system.
50
+ Never use raw HTML elements (`<input>`, `<button>`, `<select>`, etc.) in webviews. Interactive and display primitives come from `@lilara/ui-web-react` (design system). Use `@botonic/webchat-react` only for webchat-specific pieces (e.g. `ButtonComponent` for message-style buttons).
51
+
52
+ The table below lists **@lilara/ui-web-react** exports (import from that package).
51
53
 
52
54
  > **react-aria conventions.** These components are built on react-aria β€” prop names differ from standard HTML. Check the `.d.ts` types before using any component. Key differences: `Button` uses `onPress` not `onClick`; `Checkbox` and `Switch` use `isSelected` not `checked`, and `onChange` receives a `boolean` not an event.
53
55
 
@@ -88,7 +90,7 @@ export const OrderDetail = () => {
88
90
  **Form with submission**
89
91
 
90
92
  ```tsx
91
- import { Button, TextInput } from '@botonic/webchat-react'
93
+ import { Button, TextInput } from '@lilara/ui-web-react'
92
94
  import { useWebviewRequest, WebviewBody, WebviewFrame, WebviewHeader } from '@botonic/webviews'
93
95
 
94
96
  export const BookingForm = () => {
@@ -117,7 +119,7 @@ export const BookingForm = () => {
117
119
  **Fetching data on load**
118
120
 
119
121
  ```tsx
120
- import { Banner, Spinner } from '@botonic/webchat-react'
122
+ import { Banner, Spinner } from '@lilara/ui-web-react'
121
123
  import { useWebviewRequest, WebviewBody, WebviewFrame, WebviewHeader } from '@botonic/webviews'
122
124
 
123
125
  export const OrderDetail = () => {