From 79e1f568d8210b47c676802175048f42278340c0 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 25 Mar 2026 10:29:33 +0000
Subject: [PATCH 1/4] feat: add CDN UMD and IIFE bundles
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/ui/sessions/41f463e2-6e2f-4c6a-9801-867666f86bb3
---
README.md | 1 +
docs/guide/installation.md | 18 ++++++++++++++++--
package.json | 5 ++++-
vite.cdn.config.ts | 27 +++++++++++++++++++++++++++
4 files changed, 48 insertions(+), 3 deletions(-)
create mode 100644 vite.cdn.config.ts
diff --git a/README.md b/README.md
index 66f48e3..13b5497 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,7 @@ It is designed to give teams the kind of component coverage, polish, accessibili
- **Accessible by default** with keyboard support, ARIA roles, focus management, and screen reader announcements
- **Themeable via design tokens** and CSS custom properties
- **Tree-shakeable ESM exports** with per-component imports
+- **CDN-ready root bundles** for ES modules, UMD, and IIFE delivery
- **Built-in dark mode, i18n, and event-driven APIs**
## Component Coverage
diff --git a/docs/guide/installation.md b/docs/guide/installation.md
index 3cf47f8..c2ee5cd 100644
--- a/docs/guide/installation.md
+++ b/docs/guide/installation.md
@@ -22,14 +22,28 @@ bun add @bquery/ui
:::
-## CDN / ESM
+## CDN / ESM / UMD / IIFE
-```html
+::: code-group
+
+```html [ESM]
```
+```html [UMD]
+
+```
+
+```html [IIFE]
+
+```
+
+:::
+
+The UMD and IIFE bundles register all `bq-*` elements on load and expose the library on `window.BQueryUI`.
+
## TypeScript
The package ships with full TypeScript declarations. No `@types` package needed.
diff --git a/package.json b/package.json
index d3ef944..dd55139 100644
--- a/package.json
+++ b/package.json
@@ -6,6 +6,8 @@
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist-types/index.d.ts",
+ "unpkg": "./dist/index.umd.js",
+ "jsdelivr": "./dist/index.umd.js",
"exports": {
".": {
"import": "./dist/index.js",
@@ -55,8 +57,9 @@
],
"scripts": {
"dev": "vite",
- "build": "npm run build:lib && npm run build:types",
+ "build": "npm run build:lib && npm run build:cdn && npm run build:types",
"build:lib": "vite build",
+ "build:cdn": "vite build --config vite.cdn.config.ts",
"build:types": "tsc --emitDeclarationOnly --outDir dist-types",
"build:docs": "vitepress build docs",
"dev:docs": "vitepress dev docs",
diff --git a/vite.cdn.config.ts b/vite.cdn.config.ts
new file mode 100644
index 0000000..413fd5e
--- /dev/null
+++ b/vite.cdn.config.ts
@@ -0,0 +1,27 @@
+import { resolve } from 'path';
+import { defineConfig } from 'vite';
+
+export default defineConfig({
+ build: {
+ emptyOutDir: false,
+ lib: {
+ entry: resolve(__dirname, 'src/index.ts'),
+ name: 'BQueryUI',
+ formats: ['umd', 'iife'],
+ fileName: (format) => `index.${format}.js`,
+ },
+ rollupOptions: {
+ output: {
+ exports: 'named',
+ },
+ },
+ sourcemap: true,
+ minify: false,
+ target: 'es2020',
+ },
+ resolve: {
+ alias: {
+ '@': resolve(__dirname, 'src'),
+ },
+ },
+});
From 2e0f81fa2ec0bf86f4d6750e2809c5725ead0dea Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 25 Mar 2026 10:31:31 +0000
Subject: [PATCH 2/4] chore: minify CDN bundles
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/ui/sessions/41f463e2-6e2f-4c6a-9801-867666f86bb3
---
vite.cdn.config.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vite.cdn.config.ts b/vite.cdn.config.ts
index 413fd5e..8c6b265 100644
--- a/vite.cdn.config.ts
+++ b/vite.cdn.config.ts
@@ -16,7 +16,7 @@ export default defineConfig({
},
},
sourcemap: true,
- minify: false,
+ minify: true,
target: 'es2020',
},
resolve: {
From 20722a1d28d6df7cf1dabf572e5835289550c523 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 25 Mar 2026 10:40:52 +0000
Subject: [PATCH 3/4] docs: bump version references to 1.1.0
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/ui/sessions/8028c0d0-ef4b-4193-8480-9578c9a165b0
---
README.md | 19 +++++++++++++++++++
docs/guide/installation.md | 7 ++++---
package.json | 2 +-
3 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 13b5497..2842d13 100644
--- a/README.md
+++ b/README.md
@@ -47,6 +47,8 @@ For the full catalog and feature coverage, see [`docs/components/index.md`](./do
npm install @bquery/ui
```
+Current release for the CDN-ready root bundles: **v1.1.0**
+
### Import once
```ts
@@ -63,6 +65,23 @@ import '@bquery/ui';
```
+### Use from a CDN
+
+```html
+
+
+
+
+
+
+
+
+```
+
+The UMD and IIFE bundles expose the library on `window.BQueryUI`.
+
## Tree-Shakeable Usage
Import only the component entry points you need for the smallest bundle:
diff --git a/docs/guide/installation.md b/docs/guide/installation.md
index c2ee5cd..dd40036 100644
--- a/docs/guide/installation.md
+++ b/docs/guide/installation.md
@@ -28,21 +28,22 @@ bun add @bquery/ui
```html [ESM]
```
```html [UMD]
-
+
```
```html [IIFE]
-
+
```
:::
The UMD and IIFE bundles register all `bq-*` elements on load and expose the library on `window.BQueryUI`.
+Pinning the version in CDN URLs keeps production integrations reproducible across future releases.
## TypeScript
diff --git a/package.json b/package.json
index dd55139..1c19256 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@bquery/ui",
- "version": "1.0.0",
+ "version": "1.1.0",
"description": "Production-grade web component library for the bQuery project",
"type": "module",
"main": "./dist/index.cjs",
From 2a64ee877e10a79f6ede1f3b69f14c4c8e8c9f7d Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Wed, 25 Mar 2026 10:55:17 +0000
Subject: [PATCH 4/4] docs: clarify CDN bundle examples
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bQuery/ui/sessions/2f3b7603-67ec-4d58-9c67-aad7634ea3f7
---
README.md | 4 +---
docs/guide/installation.md | 2 +-
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 2842d13..ddfdc2d 100644
--- a/README.md
+++ b/README.md
@@ -47,8 +47,6 @@ For the full catalog and feature coverage, see [`docs/components/index.md`](./do
npm install @bquery/ui
```
-Current release for the CDN-ready root bundles: **v1.1.0**
-
### Import once
```ts
@@ -74,7 +72,7 @@ import '@bquery/ui';
-
+
diff --git a/docs/guide/installation.md b/docs/guide/installation.md
index dd40036..cd219df 100644
--- a/docs/guide/installation.md
+++ b/docs/guide/installation.md
@@ -33,7 +33,7 @@ bun add @bquery/ui
```
```html [UMD]
-
+
```
```html [IIFE]