@thebase/ui 1.1.2 → 1.1.4

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.
Files changed (120) hide show
  1. package/CHANGELOG.md +42 -16
  2. package/README.md +37 -22
  3. package/bin/create-baseui-app.mjs +21 -8
  4. package/dist/apidoc/img/bash-plain.svg +1 -0
  5. package/dist/apidoc/img/c-original.svg +1 -0
  6. package/dist/apidoc/img/csharp-original.svg +1 -0
  7. package/dist/apidoc/img/dart-original.svg +1 -0
  8. package/dist/apidoc/img/go-original-wordmark.svg +1 -0
  9. package/dist/apidoc/img/java-original.svg +1 -0
  10. package/dist/apidoc/img/javascript-original.svg +1 -0
  11. package/dist/apidoc/img/kotlin-original.svg +10 -0
  12. package/dist/apidoc/img/lua.svg +7 -0
  13. package/dist/apidoc/img/nodejs-original.svg +1 -0
  14. package/dist/apidoc/img/objectivec-plain.svg +1 -0
  15. package/dist/apidoc/img/php-original.svg +2 -0
  16. package/dist/apidoc/img/python-original.svg +1 -0
  17. package/dist/apidoc/img/ruby-plain.svg +1 -0
  18. package/dist/apidoc/img/rust-original.svg +1 -0
  19. package/dist/apidoc/img/swift-original.svg +1 -0
  20. package/dist/apidoc/img/windows8-original.svg +1 -0
  21. package/dist/baseui.apidoc.esm.js +935 -0
  22. package/dist/baseui.apidoc.min.js +936 -0
  23. package/dist/baseui.esm.js +33 -11
  24. package/dist/baseui.min.css +1 -1
  25. package/dist/baseui.min.js +33 -11
  26. package/dist/baseui.pwa.esm.js +4 -4
  27. package/dist/baseui.registry.json +42 -5
  28. package/dist/baseui.templates.xml +470 -2
  29. package/dist/pwa-icons/apple-touch-icon.png +0 -0
  30. package/dist/pwa-icons/favicon-16x16.png +0 -0
  31. package/dist/pwa-icons/favicon-32x32.png +0 -0
  32. package/dist/pwa-icons/favicon.ico +0 -0
  33. package/dist/pwa-icons/icon-192.png +0 -0
  34. package/dist/pwa-icons/icon-512.png +0 -0
  35. package/dist/types/apidoc.d.ts +27 -0
  36. package/dist/types/pwa.d.ts +9 -1
  37. package/docs/analytics.md +5 -5
  38. package/docs/blocks.md +5 -4
  39. package/docs/components/accordion.md +3 -3
  40. package/docs/components/alert-dialog.md +2 -2
  41. package/docs/components/alert.md +2 -2
  42. package/docs/components/apidoc.md +79 -0
  43. package/docs/components/aspect-ratio.md +2 -2
  44. package/docs/components/attachment.md +3 -3
  45. package/docs/components/avatar.md +5 -5
  46. package/docs/components/badge.md +2 -2
  47. package/docs/components/block-viewer.md +4 -4
  48. package/docs/components/breadcrumb.md +3 -3
  49. package/docs/components/bubble.md +2 -2
  50. package/docs/components/button-group.md +2 -2
  51. package/docs/components/button.md +2 -2
  52. package/docs/components/calendar.md +5 -5
  53. package/docs/components/card.md +2 -2
  54. package/docs/components/carousel.md +5 -5
  55. package/docs/components/chart.md +5 -5
  56. package/docs/components/checkbox.md +2 -2
  57. package/docs/components/clipboard-button.md +2 -2
  58. package/docs/components/collapsible.md +2 -2
  59. package/docs/components/combobox.md +5 -5
  60. package/docs/components/command.md +5 -5
  61. package/docs/components/context-menu.md +5 -5
  62. package/docs/components/data-table.md +6 -6
  63. package/docs/components/date-picker.md +5 -5
  64. package/docs/components/dialog.md +4 -4
  65. package/docs/components/direction.md +2 -2
  66. package/docs/components/drawer.md +3 -3
  67. package/docs/components/dropdown-menu.md +3 -3
  68. package/docs/components/empty.md +3 -3
  69. package/docs/components/field.md +1 -1
  70. package/docs/components/form.md +3 -3
  71. package/docs/components/hover-card.md +2 -2
  72. package/docs/components/icon.md +3 -3
  73. package/docs/components/input-group.md +2 -2
  74. package/docs/components/input-otp.md +5 -5
  75. package/docs/components/input.md +22 -5
  76. package/docs/components/item.md +2 -2
  77. package/docs/components/kbd.md +2 -2
  78. package/docs/components/label.md +2 -2
  79. package/docs/components/markdown.md +4 -4
  80. package/docs/components/marker.md +2 -2
  81. package/docs/components/menubar.md +2 -2
  82. package/docs/components/message-scroller.md +5 -5
  83. package/docs/components/message.md +5 -5
  84. package/docs/components/native-select.md +2 -2
  85. package/docs/components/navigation-menu.md +3 -3
  86. package/docs/components/pagination.md +3 -3
  87. package/docs/components/popover.md +7 -7
  88. package/docs/components/progress.md +2 -2
  89. package/docs/components/pwa.md +2 -2
  90. package/docs/components/questionnaire.md +5 -5
  91. package/docs/components/radio-group.md +2 -2
  92. package/docs/components/resizable.md +5 -5
  93. package/docs/components/scroll-area.md +5 -5
  94. package/docs/components/select.md +2 -2
  95. package/docs/components/separator.md +2 -2
  96. package/docs/components/sheet.md +3 -3
  97. package/docs/components/shell.md +2 -2
  98. package/docs/components/sidebar.md +2 -2
  99. package/docs/components/skeleton.md +2 -2
  100. package/docs/components/slider.md +2 -2
  101. package/docs/components/spinner.md +3 -3
  102. package/docs/components/switch.md +2 -2
  103. package/docs/components/table.md +2 -2
  104. package/docs/components/tabs.md +4 -4
  105. package/docs/components/text-editor.md +2 -2
  106. package/docs/components/textarea.md +3 -3
  107. package/docs/components/theme-button.md +4 -4
  108. package/docs/components/toast.md +3 -3
  109. package/docs/components/toggle-group.md +5 -5
  110. package/docs/components/toggle.md +5 -5
  111. package/docs/components/tooltip.md +7 -7
  112. package/docs/components/typography.md +3 -3
  113. package/docs/icons.md +7 -7
  114. package/docs/installation.md +14 -13
  115. package/docs/owl-components.md +16 -16
  116. package/docs/registry.md +8 -8
  117. package/docs/runtime-api.md +3 -3
  118. package/docs/theming.md +5 -5
  119. package/docs/usage-guide.md +30 -27
  120. package/package.json +10 -1
package/docs/theming.md CHANGED
@@ -13,7 +13,7 @@ thebase.theme.set("dark");
13
13
  thebase.theme.set({ primary: "#0057d8", radius: "0.5rem" });
14
14
  ```
15
15
 
16
- BaseUI maps semantic tokens such as `--b-background`, `--b-primary`, `--b-border`, and `--b-radius` into Bootstrap 5 variables. Radius tokens are sourced from the shorter public alias family `--base-radius`, `--base-radius-sm`, `--base-radius-md`, `--base-radius-lg`, `--base-radius-xl`, `--base-radius-2xl`, `--base-radius-3xl`, `--base-radius-4xl`, and `--base-radius-full`, then mirrored to `--b-radius*` for component CSS.
16
+ The Base UI maps semantic tokens such as `--b-background`, `--b-primary`, `--b-border`, and `--b-radius` into Bootstrap 5 variables. Radius tokens are sourced from the shorter public alias family `--base-radius`, `--base-radius-sm`, `--base-radius-md`, `--base-radius-lg`, `--base-radius-xl`, `--base-radius-2xl`, `--base-radius-3xl`, `--base-radius-4xl`, and `--base-radius-full`, then mirrored to `--b-radius*` for component CSS.
17
17
 
18
18
  For a reusable theme toggle with persistence, URL override, button-label sync, and iframe preview sync, import the theme helper:
19
19
 
@@ -38,9 +38,9 @@ For a reusable theme toggle with persistence, URL override, button-label sync, a
38
38
  </script>
39
39
  ```
40
40
 
41
- `https://unpkg.com/@thebase/ui@latest/dist/baseui.esm.js` mirrors the same file as an alternative CDN if jsDelivr is unreachable. Pin an exact version (e.g. `@1.1.1`, or `@1` to take only non-breaking updates) instead of `@latest` for production. Npm/bundler consumers can import the same API from `@thebase/ui`.
41
+ `https://unpkg.com/@thebase/ui@latest/dist/baseui.esm.js` mirrors the same file as an alternative CDN if jsDelivr is unreachable. Pin an exact version (e.g. `@1.1.3`, or `@1` to take only non-breaking updates) instead of `@latest` for production. Npm/bundler consumers can import the same API from `@thebase/ui`.
42
42
 
43
- For a ready-made icon button, use the BaseUI component instead of wiring your own click handler:
43
+ For a ready-made icon button, use the Base UI component instead of wiring your own click handler:
44
44
 
45
45
  ```html
46
46
  <button b-ui="theme-button" b-att-variant="outline" b-att-storage-key="my-app-theme" type="button"></button>
@@ -50,6 +50,6 @@ The documentation and example pages use the same theme infrastructure. Owl examp
50
50
 
51
51
  ## Design tokens
52
52
 
53
- The default light/dark palettes and radius follow the current [shadcn/ui](https://ui.shadcn.com) Base UI neutral theme: black/neutral primary on white in light mode, neutral-900/50 foreground-background inversion in dark mode, neutral `--b-secondary`/`--b-muted`/`--b-accent` surfaces, `--base-radius: var(--radius, 0.625rem)`, and a derived radius scale (`--base-radius-sm|md|lg|xl`, mirrored as `--b-radius-sm|md|lg|xl`) and shadow scale (`--b-shadow-sm|md|lg`) for consistent elevation across popovers, menus, dialogs, and toasts. BaseUI reads an existing upstream `--radius` value when present, but it does not redefine `--radius` back to `--b-radius`; that one-way bridge avoids CSS custom-property cycles. `--b-card`/`--b-popover` alias `--b-surface` for shadcn-token-name parity.
53
+ The default light/dark palettes and radius follow the current [shadcn/ui](https://ui.shadcn.com) Base UI neutral theme: black/neutral primary on white in light mode, neutral-900/50 foreground-background inversion in dark mode, neutral `--b-secondary`/`--b-muted`/`--b-accent` surfaces, `--base-radius: var(--radius, 0.625rem)`, and a derived radius scale (`--base-radius-sm|md|lg|xl`, mirrored as `--b-radius-sm|md|lg|xl`) and shadow scale (`--b-shadow-sm|md|lg`) for consistent elevation across popovers, menus, dialogs, and toasts. The Base UI reads an existing upstream `--radius` value when present, but it does not redefine `--radius` back to `--b-radius`; that one-way bridge avoids CSS custom-property cycles. `--b-card`/`--b-popover` alias `--b-surface` for shadcn-token-name parity.
54
54
 
55
- Because BaseUI ships Bootstrap's stock precompiled CSS, most `.btn-*`/badge colors are not driven by `--bs-*` variables directly — `src/styles/baseui.css` re-points the `.btn-primary`/`.btn-secondary`/`.btn-danger`/`.btn-outline-secondary`/`.btn-light` variants at BaseUI tokens so `thebase.theme.set(...)` overrides actually render. Badges use their own `bu-badge-*` classes (`src/components/badge/badge.css`) instead of Bootstrap's `text-bg-*`, which hardcode non-overridable colors.
55
+ Because the Base UI ships Bootstrap's stock precompiled CSS, most `.btn-*`/badge colors are not driven by `--bs-*` variables directly — `src/styles/baseui.css` re-points the `.btn-primary`/`.btn-secondary`/`.btn-danger`/`.btn-outline-secondary`/`.btn-light` variants at the Base UI tokens so `thebase.theme.set(...)` overrides actually render. Badges use their own `bu-badge-*` classes (`src/components/badge/badge.css`) instead of Bootstrap's `text-bg-*`, which hardcode non-overridable colors.
@@ -1,12 +1,12 @@
1
- # Usage Guide — Integrating BaseUI Into a Project
1
+ # Usage Guide — Integrating the Base UI Into a Project
2
2
 
3
- This is the single entry point for adding BaseUI to a consumer project (a static page, a Base HUB website page, a server-rendered app, or your own Owl app). It sequences the existing reference docs into one path and gives copy-paste-ready examples — read the linked page for exhaustive detail on any step.
3
+ This is the single entry point for adding the Base UI to a consumer project (a static page, a Base HUB website page, a server-rendered app, or your own application). It sequences the existing reference docs into one path and gives copy-paste-ready examples — read the linked page for exhaustive detail on any step.
4
4
 
5
5
  Audience: engineers and AI coding agents integrating `@thebase/ui` into a project that is **not** this repository.
6
6
 
7
7
  ## Quick start (copy-paste, works as-is)
8
8
 
9
- Save this as an `.html` file and open it — no build step, no server required. It installs BaseUI from the pinned CDN and renders a button, an input, and a card using the static `b-ui` markup API (the zero-build alternative). If you're building an Owl app, skip straight to the [pure Owl install](#2-install-pure-owl-api--recommended) below — it's the recommended way to consume BaseUI.
9
+ Save this as an `.html` file and open it — no build step, no server required. It installs the Base UI from the pinned CDN and renders a button, an input, and a card using the base static markup (`b-ui`) API (the zero-build alternative). If you're building an application, skip straight to the [pure Base install](#2-install-pure-owl-api--recommended) below — it's the recommended way to consume the Base UI.
10
10
 
11
11
  ```html
12
12
  <!doctype html>
@@ -32,22 +32,22 @@ Save this as an `.html` file and open it — no build step, no server required.
32
32
  </html>
33
33
  ```
34
34
 
35
- `https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/...` is the real jsDelivr URL for the published `@thebase/ui` npm package's `latest` tag, used here for a copy-paste-and-go quick start. Pin an exact version instead (e.g. `@1.1.1`, or `@1` to take only non-breaking updates) for production, so a new release can't change what your page loads. See [Installation](installation.md) for jsDelivr/unpkg/npm/self-hosted paths.
35
+ `https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/...` is the real jsDelivr URL for the published `@thebase/ui` npm package's `latest` tag, used here for a copy-paste-and-go quick start. Pin an exact version instead (e.g. `@1.1.3`, or `@1` to take only non-breaking updates) for production, so a new release can't change what your page loads. See [Installation](installation.md) for jsDelivr/unpkg/npm/self-hosted paths.
36
36
 
37
- The static bundle calls `thebase.mountAll()` automatically on `DOMContentLoaded`, so initial `[b-ui]` and `[b-icon]` markup mounts without an extra script. Call `thebase.mountAll(root)` yourself only after injecting new markup or when mounting a specific fragment. If the consumer is itself an Owl app, use [step 2](#2-install-pure-owl-api--recommended) instead — that's the recommended path.
37
+ The static bundle calls `thebase.mountAll()` automatically on `DOMContentLoaded`, so initial `[b-ui]` and `[b-icon]` markup mounts without an extra script. Call `thebase.mountAll(root)` yourself only after injecting new markup or when mounting a specific fragment. If the consumer is itself an application, use [step 2](#2-install-pure-owl-api--recommended) instead — that's the recommended path.
38
38
 
39
39
  ## 1. Decide which API you need
40
40
 
41
41
  | You are building... | Use | Install | Full reference |
42
42
  | --- | --- | --- | --- |
43
- | Your own Owl app that wants `<Button/>`, `<Card/>`, `<Dialog/>` as real component classes | The pure Owl component API (recommended) | CSS + the same `baseui.min.js`/`baseui.esm.js` (via `@base/owl`/`@base/component` import-map keys or a plain npm import) + `dist/baseui.templates.xml` | [Pure Owl Components](owl-components.md) |
44
- | Static HTML, a server-rendered page, or a Base HUB website page with no Owl runtime | The static `b-ui` markup API (alternative) | One CSS file + one `<script>` tag | [Installation](installation.md) |
43
+ | Your own application that wants `<Button/>`, `<Card/>`, `<Dialog/>` as real component classes | The Base component API (recommended) | CSS + the same `baseui.min.js`/`baseui.esm.js` (via `@base/owl`/`@base/component` import-map keys or a plain npm import) + `dist/baseui.templates.xml` | [Base Components](owl-components.md) |
44
+ | Static HTML, a server-rendered page, or a Base HUB website page with no Owl runtime | The base static markup (`b-ui`) API (alternative) | One CSS file + one `<script>` tag | [Installation](installation.md) |
45
45
 
46
- Both APIs come from the same package and the same CSS file, and can be mixed on one page. Prefer the pure Owl component API by default — real component classes, props, and slots compose more predictably than markup attributes. Reach for the static API only when the target page has no Owl runtime of its own (plain HTML, server-rendered templates, a Base HUB website page) and adding one isn't worthwhile just to use BaseUI.
46
+ Both APIs come from the same package and the same CSS file, and can be mixed on one page. Prefer the Base component API by default — real component classes, props, and slots compose more predictably than markup attributes. Reach for the static API only when the target page has no Owl runtime of its own (plain HTML, server-rendered templates, a Base HUB website page) and adding one isn't worthwhile just to use the Base UI.
47
47
 
48
48
  **[VERIFY]** Before choosing, confirm whether the target project already runs Owl (check for `@odoo/owl` or `@base/owl` in its `package.json`), or whether it's a plain page you'd rather not add a component-mount step to. Use the static API for the latter.
49
49
 
50
- ## 2. Install (pure Owl API — recommended)
50
+ ## 2. Install (pure Base API — recommended)
51
51
 
52
52
  ```html
53
53
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.min.css">
@@ -63,7 +63,7 @@ Both APIs come from the same package and the same CSS file, and can be mixed on
63
63
  </script>
64
64
  ```
65
65
 
66
- `https://unpkg.com/@thebase/ui@latest/dist/...` mirrors the same files as an alternative CDN if jsDelivr is unreachable — swap the host in each URL above. Pin an exact version (e.g. `@1.1.1`, or `@1` to take only non-breaking updates) instead of `@latest` for production.
66
+ `https://unpkg.com/@thebase/ui@latest/dist/...` mirrors the same files as an alternative CDN if jsDelivr is unreachable — swap the host in each URL above. Pin an exact version (e.g. `@1.1.3`, or `@1` to take only non-breaking updates) instead of `@latest` for production.
67
67
 
68
68
  ```html
69
69
  <script type="module">
@@ -87,12 +87,12 @@ Both APIs come from the same package and the same CSS file, and can be mixed on
87
87
  </script>
88
88
  ```
89
89
 
90
- `@base/owl`, `@base/component`, and `@base/theme` all resolve to the exact same `dist/baseui.esm.js` — the one file this whole guide installs for the static API too. For npm/bundler usage, skip the import map entirely and import everything straight from `@thebase/ui` (plus `@thebase/ui/dist/baseui.templates.xml` as a fetch target) — see [Pure Owl Components](owl-components.md#npm--bundler-usage).
90
+ `@base/owl`, `@base/component`, and `@base/theme` all resolve to the exact same `dist/baseui.esm.js` — the one file this whole guide installs for the static API too. For npm/bundler usage, skip the import map entirely and import everything straight from `@thebase/ui` (plus `@thebase/ui/dist/baseui.templates.xml` as a fetch target) — see [Base Components](owl-components.md#npm--bundler-usage).
91
91
 
92
- Two rules that account for most integration failures — see [Pure Owl Components](owl-components.md#common-mistakes) for the worked example:
92
+ Two rules that account for most integration failures — see [Base Components](owl-components.md#common-mistakes) for the worked example:
93
93
 
94
- 1. `dist/baseui.templates.xml` must be loaded and passed to `mount()` before any BaseUI tag renders.
95
- 2. Import Owl itself from `@base/owl`, never `@odoo/owl` — otherwise the consumer's `Component` class and BaseUI's are different runtime identities and mounting throws.
94
+ 1. `dist/baseui.templates.xml` must be loaded and passed to `mount()` before any Base UI tag renders.
95
+ 2. Import Owl itself from `@base/owl`, never `@odoo/owl` — otherwise the consumer's `Component` class and the Base UI's are different runtime identities and mounting throws.
96
96
 
97
97
  ## 3. Install (static `b-ui` API — alternative, no Owl runtime needed)
98
98
 
@@ -103,7 +103,7 @@ Two rules that account for most integration failures — see [Pure Owl Component
103
103
  <script src="https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.min.js" defer></script>
104
104
  ```
105
105
 
106
- `https://unpkg.com/@thebase/ui@latest/dist/...` mirrors the same files as an alternative CDN if jsDelivr is unreachable. Pin an exact version (e.g. `@1.1.1`, or `@1` to take only non-breaking updates) instead of `@latest` for production.
106
+ `https://unpkg.com/@thebase/ui@latest/dist/...` mirrors the same files as an alternative CDN if jsDelivr is unreachable. Pin an exact version (e.g. `@1.1.3`, or `@1` to take only non-breaking updates) instead of `@latest` for production.
107
107
 
108
108
  **Option B — npm (bundler-based apps: Vite, webpack, etc.):**
109
109
 
@@ -116,11 +116,11 @@ import "@thebase/ui/baseui.css";
116
116
  import "@thebase/ui"; // side-effect import: registers window.thebase and auto-mounts on DOMContentLoaded
117
117
  ```
118
118
 
119
- `dist/baseui.min.js`/`baseui.esm.js` are fully self-contained — Bootstrap's JS bundle and the Owl runtime are embedded ahead of BaseUI's own code, in load order, inside this one file. No other script or import is needed for the static API.
119
+ `dist/baseui.min.js`/`baseui.esm.js` are fully self-contained — Bootstrap's JS bundle and the Owl runtime are embedded ahead of the Base UI's own code, in load order, inside this one file. No other script or import is needed for the static API.
120
120
 
121
121
  Rule that applies to both options:
122
122
 
123
- - Production pages must use a pinned version (e.g. `@thebase/ui@1.1.1` or `@thebase/ui@1`), never `@latest`.
123
+ - Production pages must use a pinned version (e.g. `@thebase/ui@1.1.3` or `@thebase/ui@1`), never `@latest`.
124
124
 
125
125
  Mount markup:
126
126
 
@@ -198,11 +198,11 @@ Full token list and the shadcn-aligned default palette: [Theming](theming.md).
198
198
  </button>
199
199
  ```
200
200
 
201
- Icons ship with the normal BaseUI assets — no separate script tag, and every Lucide icon name is available by kebab-case (`panel-left`), camelCase, or snake_case. Sizing, color, accessibility rules, and self-hosting: [Built-in Icons](icons.md).
201
+ Icons ship with the normal the Base UI assets — no separate script tag, and every Lucide icon name is available by kebab-case (`panel-left`), camelCase, or snake_case. Sizing, color, accessibility rules, and self-hosting: [Built-in Icons](icons.md).
202
202
 
203
203
  ## 5b. PWA toolkit (optional) — generate manifest.webmanifest + sw.js
204
204
 
205
- Any BaseUI app can become an installable PWA without hand-writing a service worker. `@thebase/ui/pwa`
205
+ Any Base UI app can become an installable PWA without hand-writing a service worker. `@thebase/ui/pwa`
206
206
  exports two pure functions, `buildManifest(config)` and `buildServiceWorker(config)`, that turn a
207
207
  config object into the exact manifest JSON and service-worker source a hand-written PWA needs
208
208
  (precache the app shell, network-first for same-origin requests, cache-first for the pinned CDN
@@ -219,7 +219,7 @@ export default {
219
219
  },
220
220
  serviceWorker: {
221
221
  cacheName: "my-app-cache-v1",
222
- cdnVersion: "1.1.1", // pin to match the importmap in index.html
222
+ cdnVersion: "1.1.3", // pin to match the importmap in index.html
223
223
  appFiles: ["/app.css", "/app.js", "/app.xml", "/favicon.svg", "/icons/icon-192.png", "/icons/icon-512.png"],
224
224
  },
225
225
  };
@@ -233,7 +233,10 @@ npx create-baseui-app pwa . --config baseui.pwa.config.js
233
233
  Re-run the command whenever `appFiles`, the CDN pin, or manifest fields change — both output files are
234
234
  fully regenerated, never hand-patched. Only `manifest.name`, `serviceWorker.cacheName`, and
235
235
  `serviceWorker.cdnVersion` are required; everything else (icons, theme/background color, display
236
- mode, extra precache URLs) has the same defaults the `qr-page` example ships with. See
236
+ mode, extra precache URLs) has defaults. The default logo and favicon set (`favicon.ico`, 16/32 px favicons,
237
+ `apple-touch-icon.png`, `icon-192.png`, `icon-512.png`) is copied into `<path>/icons/` by the command (existing
238
+ files are kept, so your own icons win). Serving icons from another folder? Set `iconsBase` (manifest and
239
+ service worker) and `manifestUrl` (service worker) in the config. See
237
240
  `dist/types/pwa.d.ts` for the full config shape.
238
241
 
239
242
  ## 6. Copy a block instead of assembling from primitives
@@ -245,7 +248,7 @@ For common layouts (dashboard shells, sidebars, login/signup forms, charts), cop
245
248
  - [ ] Only `baseui.min.css` + `baseui.min.js` (or `baseui.esm.js`) are loaded — no separate `baseui.owl.*`/`bootstrap.bundle.min.js`/`baseui.components.esm.js` files needed, for either API.
246
249
  - [ ] `thebase.version` returns the expected pinned version in the browser console.
247
250
  - [ ] Initial static markup mounts without an extra call; injected markup mounts after `thebase.mountAll(root)`.
248
- - [ ] Pure Owl components render with no console errors (a missing-template error means step 2's `dist/baseui.templates.xml` load is missing or unawaited).
251
+ - [ ] Base components render with no console errors (a missing-template error means step 2's `dist/baseui.templates.xml` load is missing or unawaited).
249
252
  - [ ] Toggling `b-theme` actually changes rendered colors (a no-op usually means CSS custom properties are being overridden by the consumer's own stylesheet loaded after `baseui.min.css`).
250
253
  - [ ] Look up the specific component in [`docs/components/`](components/) for its attributes, events, and accessibility notes before wiring it up.
251
254
 
@@ -256,10 +259,10 @@ For common layouts (dashboard shells, sidebars, login/signup forms, charts), cop
256
259
  | `ReferenceError: BaseUI is not defined` | The bundle script hasn't run yet, or its `<script>` tag is missing/mistyped. | Confirm the `<script src=".../baseui.min.js" defer>` tag is present and the network tab shows it loading (200, not 404). |
257
260
  | Components render unstyled (plain HTML, no Bootstrap look) | `baseui.min.css` isn't loaded, or loaded after your own stylesheet overrides it. | Load `baseui.min.css` in `<head>`, before any of your own CSS that touches the same elements. |
258
261
  | `tabs` (or another Owl-backed static component) silently does nothing | `baseui.min.js` didn't finish loading. | Confirm `baseui.min.js` loads (network tab, 200 not 404). |
259
- | Pure Owl mount throws `"X is not a Component. It must inherit from the Component class"` | Your app imports `@odoo/owl` directly somewhere instead of `@base/owl`. | Replace every `@odoo/owl` import with `@base/owl` in your own app code — both must resolve to the same `globalThis.owl` instance. |
260
- | Pure Owl component renders blank / throws a template-not-found error | `dist/baseui.templates.xml` was never fetched and passed to `mount()`. | Fetch the templates string and pass it as `{ templates }` to `mount()` (or `app.addTemplates(...)`) before rendering any BaseUI tag. |
262
+ | Pure Base mount throws `"X is not a Component. It must inherit from the Component class"` | Your app imports `@odoo/owl` directly somewhere instead of `@base/owl`. | Replace every `@odoo/owl` import with `@base/owl` in your own app code — both must resolve to the same `globalThis.owl` instance. |
263
+ | Base component renders blank / throws a template-not-found error | `dist/baseui.templates.xml` was never fetched and passed to `mount()`. | Fetch the templates string and pass it as `{ templates }` to `mount()` (or `app.addTemplates(...)`) before rendering any Base UI tag. |
261
264
  | New markup injected via AJAX/fetch doesn't turn into components | Auto-mount only covers markup present when the bundle initializes. | Call `thebase.mountAll(root)` after injecting new `[b-ui]` or `[b-icon]` markup — it's idempotent, safe to call repeatedly. |
262
- | `thebase.theme.set(...)` has no visible effect | A page stylesheet loaded after `baseui.min.css` re-hardcodes the same properties, or the element isn't a descendant of the themed root. | Load consumer CSS after BaseUI's, and confirm `b-theme` is set on `<html>` or an ancestor of the components you expect to change. |
265
+ | `thebase.theme.set(...)` has no visible effect | A page stylesheet loaded after `baseui.min.css` re-hardcodes the same properties, or the element isn't a descendant of the themed root. | Load consumer CSS after the Base UI's, and confirm `b-theme` is set on `<html>` or an ancestor of the components you expect to change. |
263
266
 
264
267
  ## 9. Common mistakes
265
268
 
@@ -267,8 +270,8 @@ For common layouts (dashboard shells, sidebars, login/signup forms, charts), cop
267
270
  - Using `/latest/` CDN paths in production instead of a pinned version.
268
271
  - Assuming auto-mount watches the DOM forever — it does not; call `thebase.mountAll(root)` after injecting new `[b-ui]` markup client-side (e.g. from a fetched partial).
269
272
  - Mixing `@odoo/owl` imports into a project that also imports `@thebase/ui` — always go through `@base/owl`.
270
- - Expecting `thebase.mountAll()` to pick up Owl component tags (`<Button/>`) — it only mounts static `[b-ui]` markers; pure Owl components are registered and mounted through your own app's `static components` + `mount()`, per step 2.
273
+ - Expecting `thebase.mountAll()` to pick up Owl component tags (`<Button/>`) — it only mounts static `[b-ui]` markers; Base components are registered and mounted through your own app's `static components` + `mount()`, per step 2.
271
274
 
272
275
  ## Related docs
273
276
 
274
- [Installation](installation.md) · [Runtime API](runtime-api.md) · [Theming](theming.md) · [Built-in Icons](icons.md) · [Pure Owl Components](owl-components.md) · [Blocks](blocks.md) · [Component Authoring](component-authoring.md) (for contributing to BaseUI itself, not for consuming it) · [Registry](registry.md) · [Component Reference index](components/button.md) (per-component pages live under `docs/components/`)
277
+ [Installation](installation.md) · [Runtime API](runtime-api.md) · [Theming](theming.md) · [Built-in Icons](icons.md) · [Base Components](owl-components.md) · [Blocks](blocks.md) · [Component Authoring](component-authoring.md) (for contributing to the Base UI itself, not for consuming it) · [Registry](registry.md) · [Component Reference index](components/button.md) (per-component pages live under `docs/components/`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thebase/ui",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "CDN-installable Owl and Bootstrap 5 UI component library.",
5
5
  "type": "module",
6
6
  "main": "./dist/baseui.min.js",
@@ -25,6 +25,11 @@
25
25
  "import": "./dist/baseui.analytics.esm.js",
26
26
  "default": "./dist/baseui.analytics.min.js"
27
27
  },
28
+ "./apidoc": {
29
+ "types": "./dist/types/apidoc.d.ts",
30
+ "import": "./dist/baseui.apidoc.esm.js",
31
+ "default": "./dist/baseui.apidoc.min.js"
32
+ },
28
33
  "./pwa": {
29
34
  "types": "./dist/types/pwa.d.ts",
30
35
  "import": "./dist/baseui.pwa.esm.js"
@@ -39,9 +44,13 @@
39
44
  "dist/baseui.icons.esm.js",
40
45
  "dist/baseui.analytics.esm.js",
41
46
  "dist/baseui.analytics.min.js",
47
+ "dist/baseui.apidoc.esm.js",
48
+ "dist/baseui.apidoc.min.js",
42
49
  "dist/baseui.pwa.esm.js",
43
50
  "dist/baseui.templates.xml",
44
51
  "dist/icons",
52
+ "dist/pwa-icons",
53
+ "dist/apidoc",
45
54
  "dist/baseui.registry.json",
46
55
  "dist/runtime",
47
56
  "dist/themes",