@thebase/ui 1.2.0 → 1.3.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 +32 -260
- package/LICENSE +1 -1
- package/README.md +98 -93
- package/bin/{create-baseui-app.mjs → create-nodexui-app.mjs} +65 -65
- package/dist/{baseui.apidoc.esm.js → nodexui.apidoc.esm.js} +136 -136
- package/dist/{baseui.apidoc.min.js → nodexui.apidoc.min.js} +137 -137
- package/dist/nodexui.esm.js +58 -0
- package/dist/nodexui.i18n.esm.js +2 -0
- package/dist/nodexui.i18n.min.js +2 -0
- package/dist/nodexui.icons.esm.js +1 -0
- package/dist/{baseui.min.css → nodexui.min.css} +1 -1
- package/dist/nodexui.min.js +77 -0
- package/dist/{baseui.pwa.esm.js → nodexui.pwa.esm.js} +5 -5
- package/dist/{baseui.registry.json → nodexui.registry.json} +162 -162
- package/dist/{baseui.templates.xml → nodexui.templates.xml} +573 -573
- package/dist/{baseui.vite.esm.js → nodexui.vite.esm.js} +6 -6
- package/dist/runtime/mermaid/mermaid.esm.min.mjs +2 -2
- package/dist/runtime/milkdown/milkdown-editor.js +1 -1
- package/dist/runtime/milkdown/milkdown-text-editor.js +1 -1
- package/dist/themes/{baseui-dark.css → nodexui-dark.css} +2 -2
- package/dist/themes/{baseui-light.css → nodexui-light.css} +2 -2
- package/dist/types/analytics.d.ts +12 -12
- package/dist/types/apidoc.d.ts +1 -1
- package/dist/types/i18n.d.ts +25 -0
- package/dist/types/index.d.ts +16 -14
- package/dist/types/vite.d.ts +2 -2
- package/docs/analytics.md +12 -12
- package/docs/base-ui-skill.md +4 -4
- package/docs/blocks.md +6 -6
- package/docs/components/accordion.md +4 -4
- package/docs/components/alert-dialog.md +2 -2
- package/docs/components/alert.md +5 -5
- package/docs/components/apidoc.md +14 -14
- package/docs/components/aspect-ratio.md +2 -2
- package/docs/components/attachment.md +5 -5
- package/docs/components/avatar.md +7 -7
- package/docs/components/badge.md +2 -2
- package/docs/components/block-viewer.md +8 -8
- package/docs/components/breadcrumb.md +3 -3
- package/docs/components/bubble.md +2 -2
- package/docs/components/button-group.md +2 -2
- package/docs/components/button.md +2 -2
- package/docs/components/calendar.md +7 -7
- package/docs/components/card.md +2 -2
- package/docs/components/carousel.md +9 -9
- package/docs/components/chart.md +7 -7
- package/docs/components/checkbox.md +2 -2
- package/docs/components/clipboard-button.md +7 -7
- package/docs/components/code-editor.md +1 -1
- package/docs/components/collapsible.md +4 -4
- package/docs/components/combobox.md +7 -7
- package/docs/components/command.md +7 -7
- package/docs/components/context-menu.md +7 -7
- package/docs/components/data-table.md +9 -9
- package/docs/components/date-picker.md +7 -7
- package/docs/components/dialog.md +5 -5
- package/docs/components/direction.md +2 -2
- package/docs/components/drawer.md +4 -4
- package/docs/components/dropdown-menu.md +3 -3
- package/docs/components/empty.md +3 -3
- package/docs/components/field.md +1 -1
- package/docs/components/form.md +3 -3
- package/docs/components/hover-card.md +2 -2
- package/docs/components/icon.md +3 -3
- package/docs/components/input-otp.md +7 -7
- package/docs/components/input.md +6 -6
- package/docs/components/item.md +3 -3
- package/docs/components/kbd.md +2 -2
- package/docs/components/label.md +2 -2
- package/docs/components/markdown.md +13 -13
- package/docs/components/marker.md +2 -2
- package/docs/components/menubar.md +2 -2
- package/docs/components/message-scroller.md +7 -7
- package/docs/components/message.md +7 -7
- package/docs/components/native-select.md +3 -3
- package/docs/components/navigation-menu.md +3 -3
- package/docs/components/pagination.md +3 -3
- package/docs/components/popover.md +10 -10
- package/docs/components/progress.md +2 -2
- package/docs/components/pwa.md +4 -4
- package/docs/components/questionnaire.md +7 -7
- package/docs/components/radio-group.md +2 -2
- package/docs/components/resizable.md +7 -7
- package/docs/components/scroll-area.md +7 -7
- package/docs/components/select.md +2 -2
- package/docs/components/separator.md +2 -2
- package/docs/components/sheet.md +3 -3
- package/docs/components/shell.md +7 -7
- package/docs/components/sidebar.md +3 -3
- package/docs/components/skeleton.md +2 -2
- package/docs/components/slider.md +2 -2
- package/docs/components/spinner.md +4 -4
- package/docs/components/switch.md +2 -2
- package/docs/components/table.md +2 -2
- package/docs/components/tabs.md +6 -6
- package/docs/components/text-editor.md +6 -6
- package/docs/components/textarea.md +3 -3
- package/docs/components/theme-button.md +6 -6
- package/docs/components/toast.md +6 -6
- package/docs/components/toggle-group.md +7 -7
- package/docs/components/toggle.md +7 -7
- package/docs/components/tooltip.md +9 -9
- package/docs/components/typography.md +9 -9
- package/docs/i18n.md +119 -0
- package/docs/icons.md +9 -9
- package/docs/installation.md +31 -32
- package/docs/owl-components.md +36 -38
- package/docs/registry.md +14 -13
- package/docs/runtime-api.md +14 -12
- package/docs/theming.md +15 -15
- package/docs/usage-guide.md +54 -56
- package/package.json +51 -35
- package/dist/baseui.esm.js +0 -58
- package/dist/baseui.icons.esm.js +0 -1
- package/dist/baseui.min.js +0 -77
- /package/dist/{baseui.analytics.esm.js → nodexui.analytics.esm.js} +0 -0
- /package/dist/{baseui.analytics.min.js → nodexui.analytics.min.js} +0 -0
- /package/dist/themes/{baseui-dark.min.css → nodexui-dark.min.css} +0 -0
- /package/dist/themes/{baseui-light.min.css → nodexui-light.min.css} +0 -0
package/README.md
CHANGED
|
@@ -1,28 +1,54 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Nodex UI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Nodex UI** is an HTML-first, framework-independent UI component library for the web. It ships its own styling and behavior, loads straight from a CDN or npm, and needs no build step. Use it as **Nodex components** (`<Button/>`-style imports in your own application) or as the static `b-ui` markup adapter for plain HTML, server-rendered pages and CMS pages.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- npm package: [`nodexui`](https://www.npmjs.com/package/nodexui) · current version **1.3.0**
|
|
6
|
+
- Website, live demos and docs: <https://ui.thebase.vn>
|
|
7
|
+
- Release history: [CHANGELOG.md](CHANGELOG.md)
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
## Why Nodex UI
|
|
10
|
+
|
|
11
|
+
- **No build step.** Every component runs from a CDN `<script>` or import map; nothing to compile.
|
|
12
|
+
- **No framework lock-in.** Vanilla JavaScript/TypeScript, no JSX, no React or Vue required.
|
|
13
|
+
- **Modular.** Each component is a self-contained unit you import or mark up on its own (74 in the current registry).
|
|
14
|
+
- **Dynamic-friendly.** Components mount, unmount and re-render from user-driven markup, which suits WYSIWYG website builders and drag-and-drop editors.
|
|
15
|
+
- **Batteries included.** Lucide icons, light/dark theming, PWA tooling, ApiDoc, i18n and cookieless analytics (the last three are optional standalone bundles).
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
### npm
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npm install nodexui
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import { Component, mount, xml } from "nodexui";
|
|
27
|
+
import { Button, Card, CardBody, CardHeader, CardTitle } from "nodexui";
|
|
28
|
+
import "nodexui/nodexui.css";
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Subpath exports: `nodexui/analytics`, `nodexui/i18n`, `nodexui/apidoc`, `nodexui/icons`, `nodexui/pwa`, `nodexui/vite`, `nodexui/registry`.
|
|
32
|
+
|
|
33
|
+
### CDN (Nodex components)
|
|
34
|
+
|
|
35
|
+
Both APIs load from jsDelivr or unpkg. The snippets use `@latest` for readability; pin an exact version (`@1.3.0`, or `@1` for non-breaking updates) on any production page.
|
|
8
36
|
|
|
9
37
|
```html
|
|
10
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm
|
|
38
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nodexui@latest/dist/nodexui.min.css">
|
|
11
39
|
<script type="importmap">
|
|
12
40
|
{
|
|
13
41
|
"imports": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"@base/theme": "https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.esm.js",
|
|
17
|
-
"@base/templates": "https://cdn.jsdelivr.net/npm/@thebase/ui@latest/dist/baseui.templates.xml"
|
|
42
|
+
"nodexui": "https://cdn.jsdelivr.net/npm/nodexui@latest/dist/nodexui.esm.js",
|
|
43
|
+
"nodexui/templates": "https://cdn.jsdelivr.net/npm/nodexui@latest/dist/nodexui.templates.xml"
|
|
18
44
|
}
|
|
19
45
|
}
|
|
20
46
|
</script>
|
|
21
47
|
<script type="module">
|
|
22
|
-
import { Component, mount, xml } from "
|
|
23
|
-
import { Button, Card, CardBody, CardHeader, CardTitle } from "
|
|
48
|
+
import { Component, mount, xml } from "nodexui";
|
|
49
|
+
import { Button, Card, CardBody, CardHeader, CardTitle } from "nodexui";
|
|
24
50
|
|
|
25
|
-
const templates = await fetch(import.meta.resolve("
|
|
51
|
+
const templates = await fetch(import.meta.resolve("nodexui/templates")).then((r) => r.text());
|
|
26
52
|
|
|
27
53
|
class Root extends Component {
|
|
28
54
|
static components = { Button, Card, CardBody, CardHeader, CardTitle };
|
|
@@ -39,110 +65,89 @@ Both APIs load straight from a CDN — jsDelivr or unpkg — no build step, no s
|
|
|
39
65
|
</script>
|
|
40
66
|
```
|
|
41
67
|
|
|
42
|
-
|
|
68
|
+
Swap `cdn.jsdelivr.net/npm` for `unpkg.com` if jsDelivr is unreachable. See [Nodex Components](docs/owl-components.md) for the full API and bundler usage.
|
|
69
|
+
|
|
70
|
+
### CDN (static `b-ui` markup)
|
|
43
71
|
|
|
44
|
-
|
|
72
|
+
With no application of your own, use one stylesheet and one script tag, no import map:
|
|
45
73
|
|
|
46
74
|
```html
|
|
47
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm
|
|
48
|
-
<script src="https://cdn.jsdelivr.net/npm
|
|
75
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nodexui@latest/dist/nodexui.min.css">
|
|
76
|
+
<script src="https://cdn.jsdelivr.net/npm/nodexui@latest/dist/nodexui.min.js" defer></script>
|
|
49
77
|
```
|
|
50
78
|
|
|
51
|
-
`dist/
|
|
79
|
+
`dist/nodexui.min.js` and `dist/nodexui.esm.js` are self-contained and back both APIs: the JS bundle, the Nodex runtime, every component class and the theme helper are embedded in load order. There is no separate runtime, components or theme file.
|
|
52
80
|
|
|
53
|
-
|
|
81
|
+
Every component ships both APIs from `src/components/<name>/`: the static adapter (`<name>.js`, using `b-att-*` attributes and `nodexui:*` events) and a component class (`<name>.component.js`). A few components are intentionally reshaped in the component API, notably `chart` and the data-driven `data-table`, `combobox`, `command` and `calendar`. Each page under `docs/components/` explains the specifics.
|
|
54
82
|
|
|
55
|
-
|
|
83
|
+
## Theming
|
|
56
84
|
|
|
57
|
-
|
|
85
|
+
Colour tokens, `--base-radius` and `--b-overlay` live in the downloadable `nodexui-light.css` and `nodexui-dark.css` themes. The **Theme** tab of the examples app (`examples/index.html#/theme`) builds a custom pair for you. For app-level light/dark toggles, import `createThemeController` / `NodexUITheme` as `nodexui` (import map) or from `nodexui` (bundler). See [Theming](docs/theming.md).
|
|
58
86
|
|
|
59
|
-
##
|
|
87
|
+
## Optional services
|
|
60
88
|
|
|
61
|
-
|
|
89
|
+
| Service | Import | What it is |
|
|
90
|
+
| --- | --- | --- |
|
|
91
|
+
| **Analytics** | `nodexui/analytics`, `dist/nodexui.analytics.min.js` | Cookieless, standalone (about 5.6 KB min). Nothing is collected until `init()` is called. Covers pageviews (including SPA), engagement, outbound links, downloads and forms. See [Analytics](docs/analytics.md) and [`examples/analytics/`](examples/analytics/). |
|
|
92
|
+
| **i18n** | `nodexui/i18n`, `dist/nodexui.i18n.min.js` | Gettext-style `.po` catalogs, no runtime dependencies. See [i18n](docs/i18n.md) and [`examples/i18n/`](examples/i18n/). |
|
|
93
|
+
| **ApiDoc** | `nodexui/apidoc` | Renders an OpenAPI 3 JSON file as browsable docs with a Try It panel and 17 code-sample languages. See [ApiDoc](docs/components/apidoc.md) and [`examples/apidoc/`](examples/apidoc/). |
|
|
94
|
+
| **PWA toolkit** | `nodexui/pwa`, `nodexui/vite` | `buildManifest`, `buildServiceWorker` and the `nodexuiPwa()` Vite plugin. |
|
|
62
95
|
|
|
63
96
|
```html
|
|
64
97
|
<script type="module">
|
|
65
|
-
import { init, track } from "https://cdn.jsdelivr.net/npm
|
|
98
|
+
import { init, track } from "https://cdn.jsdelivr.net/npm/nodexui@1.3.0/dist/nodexui.analytics.esm.js";
|
|
66
99
|
init({ backendUrl: "https://stats.example.com" }); // events POST to <backendUrl>/api/event
|
|
67
100
|
track("Signup", { props: { plan: "pro" } });
|
|
68
101
|
</script>
|
|
69
102
|
```
|
|
70
103
|
|
|
71
|
-
|
|
104
|
+
```js
|
|
105
|
+
import { init, t, loadCatalog } from "https://cdn.jsdelivr.net/npm/nodexui@1.3.0/dist/nodexui.i18n.esm.js";
|
|
106
|
+
init({ languages: [{ code: "en", label: "English" }, { code: "vi", label: "Tiếng Việt" }] });
|
|
107
|
+
await loadCatalog(import.meta.url); // fetches ./i18n/vi.po when Vietnamese is picked
|
|
108
|
+
console.log(t("Hello {name}", { name: "An" }));
|
|
109
|
+
```
|
|
72
110
|
|
|
73
|
-
|
|
111
|
+
### Project CLI
|
|
74
112
|
|
|
75
|
-
|
|
113
|
+
`create-nodexui-app` scaffolds a static-importmap or Vite PWA project (`create`, `init`, `convert`) and generates the manifest, service worker and icons (`pwa`):
|
|
76
114
|
|
|
77
115
|
```sh
|
|
78
|
-
npx create-
|
|
79
|
-
npx create-
|
|
116
|
+
npx create-nodexui-app create my-app
|
|
117
|
+
npx create-nodexui-app pwa . --config nodexui.pwa.config.js
|
|
80
118
|
```
|
|
81
119
|
|
|
82
|
-
See [Usage Guide §5b](docs/usage-guide.md) and the [PWA component](docs/components/pwa.md).
|
|
83
|
-
|
|
84
|
-
## Outlined fields
|
|
120
|
+
See [Usage Guide §5b](docs/usage-guide.md) and the [PWA component](docs/components/pwa.md).
|
|
85
121
|
|
|
86
|
-
|
|
122
|
+
## Search and discoverability
|
|
87
123
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
New in 1.1.3: `ApiDoc` (`b-ui="apidoc"`) renders an OpenAPI 3 JSON file as browsable API docs — grouped sidebar, parameters, request bodies, responses, a Try It panel with code samples in 17 languages, and an Authorize dialog. See [ApiDoc](docs/components/apidoc.md), the `apidoc-01` block, and the live demo in [`examples/apidoc/`](examples/apidoc/).
|
|
91
|
-
|
|
92
|
-
## Theming
|
|
93
|
-
|
|
94
|
-
New in 1.2.0: colour tokens, `--base-radius` and `--b-overlay` live only in the downloadable `baseui-light.css` / `baseui-dark.css` themes (new `--b-success|warning|info` status tokens), and the **Theme** tab of the examples app (`examples/index.html#/theme`) builds a custom pair for you. **Breaking in 1.2.0:** the `bu-` class and `--bu-*` variable prefix is now `b-` (`bu-button` -> `b-button`); see the CHANGELOG migration note. See [Theming](docs/theming.md).
|
|
95
|
-
|
|
96
|
-
## Release notes
|
|
97
|
-
|
|
98
|
-
See [CHANGELOG.md](CHANGELOG.md) for the full version history. Current version: **1.2.0**.
|
|
124
|
+
The public site <https://ui.thebase.vn> keeps its hostname and URLs under the Nodex UI brand. The examples app sets per-route title, description, canonical and Open Graph tags (`examples/seo.js`), ships `sitemap.xml`, and reports first-party events through `examples/tracking.js`. Search Console is used for search visibility; Google Analytics is not. The plan, constraints and KPIs are in [the SEO, developer marketing and analytics brief](.agents/knowledge/base-ui-seo-analytics-ai-agent-brief.md).
|
|
99
125
|
|
|
100
126
|
## Versioning policy
|
|
101
127
|
|
|
102
|
-
|
|
128
|
+
Nodex UI follows [Semantic Versioning](https://semver.org/) from **1.3.0**. The public API covered by this promise is:
|
|
103
129
|
|
|
104
|
-
-
|
|
105
|
-
- Static markup: `b-ui
|
|
130
|
+
- Component classes, their names, props, slots and callback props exported from `nodexui`.
|
|
131
|
+
- Static markup: `b-ui` / `b-icon` names, `b-att-*` attributes and `nodexui:*` events.
|
|
106
132
|
- CSS: `b-*` class names and `--b-*` design tokens.
|
|
107
|
-
- Runtime exports (`
|
|
108
|
-
|
|
109
|
-
What each release type means:
|
|
110
|
-
|
|
111
|
-
- **Major** (`2.0.0`): removes or renames any of the above, or changes its behavior or default look in a way existing pages must adapt to. Every breaking change is listed under a **Breaking** heading in the CHANGELOG with a migration note.
|
|
112
|
-
- **Minor** (`1.1.0`): new components, props, variants, tokens, or icons — existing code keeps working unchanged.
|
|
113
|
-
- **Patch** (`1.0.1`): bug fixes and visual fixes that don't change the API.
|
|
133
|
+
- Runtime exports (`NodexUI`, `Component`, `mount`, `xml`, `cn`, `mergeStyle`, theme helpers), the published `dist/` file names and the package `exports` paths.
|
|
114
134
|
|
|
115
|
-
|
|
135
|
+
**Major** releases remove or rename any of the above (listed under **Breaking** in the CHANGELOG with a migration note), **minor** releases add components, props, variants, tokens or icons, and **patch** releases fix bugs without changing the API. Names prefixed `_`, undocumented internals, `docs/` and `examples/` sources, and the authoring helpers in [Component Authoring](docs/component-authoring.md) are not public API. Deprecated APIs keep working until the next major and are flagged in the CHANGELOG first.
|
|
116
136
|
|
|
117
|
-
|
|
137
|
+
Pin an exact version (`@1.3.0`) for byte-identical output, or the major range (`@1` on jsDelivr/unpkg, `^1.3.0` in npm) to receive non-breaking updates. Avoid `@latest` in production.
|
|
118
138
|
|
|
119
|
-
##
|
|
139
|
+
## Documentation
|
|
120
140
|
|
|
121
|
-
|
|
141
|
+
- [Usage Guide](docs/usage-guide.md): the entry point for integrating Nodex UI into a project.
|
|
142
|
+
- [Installation](docs/installation.md): CDN, npm, self-hosting, icon assets, pinned versions, release guardrails.
|
|
143
|
+
- [Nodex Components](docs/owl-components.md): the component API, what to load, common mistakes.
|
|
144
|
+
- [Runtime API](docs/runtime-api.md): the `window.thebase` global, mounting lifecycle, theming API, destroy behavior.
|
|
145
|
+
- [Registry](docs/registry.md): `dist/nodexui.registry.json`, build files, component and block metadata.
|
|
146
|
+
- [Theming](docs/theming.md), [Icons](docs/icons.md), [Blocks](docs/blocks.md), [Analytics](docs/analytics.md), [i18n](docs/i18n.md).
|
|
147
|
+
- [Component reference](docs/components/button.md): usage, attributes, events and accessibility per component.
|
|
148
|
+
- [Component Authoring](docs/component-authoring.md): the `src/components/<name>/` contract (repo only, not published).
|
|
122
149
|
|
|
123
|
-
|
|
124
|
-
- [Installation](docs/installation.md) covers CDN, npm, self-hosted usage, icon assets, pinned versions, and release guardrails.
|
|
125
|
-
- [Analytics](docs/analytics.md) documents the optional, standalone cookieless analytics service (`@thebase/ui/analytics`).
|
|
126
|
-
- [Runtime API](docs/runtime-api.md) documents the `window.thebase` global, mounting lifecycle, theming API, and destroy behavior.
|
|
127
|
-
- [Registry](docs/registry.md) explains `dist/baseui.registry.json`, build files, block metadata, component metadata, and integrity hashes.
|
|
128
|
-
- [Theming](docs/theming.md) describes `b-theme`, runtime theme overrides, shadcn-aligned tokens, Bootstrap variable mapping, and shared example theme persistence.
|
|
129
|
-
- [Built-in Icons](docs/icons.md) covers the Lucide icon library, `b-icon` markup, accessibility rules, self-hosted icon paths, and JavaScript helpers.
|
|
130
|
-
- [Component Authoring](docs/component-authoring.md) defines the `src/components/<name>/` source contract, component registration rules, event naming, cleanup requirements, and CSS scoping policy. Repo-only — not published to npm (see below).
|
|
131
|
-
- [Base Components](docs/owl-components.md) covers the Base component API (`@thebase/ui` + `dist/baseui.templates.xml`), what to load, and common mistakes.
|
|
132
|
-
- [Blocks](docs/blocks.md) documents copyable static shadcn-style blocks, source stylesheet ownership under `examples/blocks/`, gallery/viewer URLs, and block icon rules.
|
|
133
|
-
- [Component Reference](docs/components/button.md) starts the per-component documentation set in `docs/components/`; each component page includes usage, attributes, events, accessibility notes, and test guidance where relevant.
|
|
134
|
-
- [Frontend Implementation Plan](.agents/planning/2026-08-11-frontend-baseui-bootstrap-owl-implementation-plan.md) records the completed the Base UI 1.0.0 delivery checklist and earlier decisions for engineering context.
|
|
135
|
-
- [Historical Product Plan](.agents/knowledge/baseUI/2026-08-11-baseui-bootstrap-owl-plan.md) preserves the original Bootstrap 5 + Owl product brief; use current `docs/` and registry files when they disagree with older planning assumptions.
|
|
136
|
-
|
|
137
|
-
The links above work as-is when browsing this repo. `docs/*.md` and `docs/components/` also ship inside the published npm package (see `files` in `package.json`), so the same docs are reachable straight from a CDN without cloning the repo — no HTML rendering, just the raw Markdown source:
|
|
138
|
-
|
|
139
|
-
```text
|
|
140
|
-
https://unpkg.com/@thebase/ui@latest/docs/usage-guide.md
|
|
141
|
-
https://unpkg.com/@thebase/ui@latest/docs/components/button.md
|
|
142
|
-
https://cdn.jsdelivr.net/npm/@thebase/ui@latest/docs/usage-guide.md
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
Drop the version (`@thebase/ui/docs/...`) to always resolve to latest, or pin a version the way the rest of this README recommends pinning `dist/` assets. `docs/v2/` (the vendored general Owl framework reference) and `docs/component-authoring.md` (the Base UI's own component-authoring contract) are intentionally **not** published — they're development-time references for working inside this repo, not something a consumer needs to use the library.
|
|
150
|
+
`docs/*.md` and `docs/components/` also ship in the npm package, so the raw Markdown is reachable from a CDN, for example `https://cdn.jsdelivr.net/npm/nodexui@1.3.0/docs/usage-guide.md`. `docs/v2/` and `docs/component-authoring.md` are not published.
|
|
146
151
|
|
|
147
152
|
## Development
|
|
148
153
|
|
|
@@ -152,22 +157,22 @@ npm run build
|
|
|
152
157
|
npm run dev
|
|
153
158
|
```
|
|
154
159
|
|
|
155
|
-
Open `examples/index.html` through the dev server
|
|
160
|
+
Open `examples/index.html` through the dev server. It is the single shell for docs, the component gallery, blocks, icons and charts, routed by hash (`#/docs`, `#/components`, `#/blocks`, `#/icons`, `#/chart`). Standalone demos: `examples/apidoc/`, `examples/analytics/` and `momo_demo/` (static `b-ui` admin page).
|
|
156
161
|
|
|
157
|
-
|
|
162
|
+
Lucide's full SVG set is built in: `<span b-icon="search"></span>` in HTML or `thebase.icons.lucide.url("search")` from JavaScript. Builds publish the SVGs to `dist/icons/lucide/` and an index at `dist/icons/lucide.json`.
|
|
158
163
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
- `npm run test` runs runtime tests.
|
|
167
|
-
- `npm publish` runs `prepublishOnly` first.
|
|
164
|
+
| Script | Purpose |
|
|
165
|
+
| --- | --- |
|
|
166
|
+
| `npm run dev` | Static server for examples and built `dist/` assets |
|
|
167
|
+
| `npm run build` | Build CDN and npm artifacts into `dist/` |
|
|
168
|
+
| `npm run lint` | JavaScript and CSS policy checks |
|
|
169
|
+
| `npm run test` | Runtime tests |
|
|
170
|
+
| `npm publish` | Runs `prepublishOnly` (lint, test, build) first |
|
|
168
171
|
|
|
169
172
|
## Distribution
|
|
170
173
|
|
|
171
|
-
The npm package publishes the built `dist/` artifacts
|
|
174
|
+
The npm package `nodexui` publishes the built `dist/` artifacts, `docs/`, `README.md`, `CHANGELOG.md` and `LICENSE`. Everything is minified, with no unminified twins. Deliberate separate files: `dist/nodexui.icons.esm.js` (2000+ generated icon components), the ApiDoc language logos in `dist/apidoc/img/`, the analytics, i18n and ApiDoc bundles, and `dist/bootstrap.bundle.min.js` (unmodified, for projects that vendor built-in JS themselves).
|
|
175
|
+
|
|
176
|
+
## License
|
|
172
177
|
|
|
173
|
-
|
|
178
|
+
MIT. See [LICENSE](LICENSE).
|