Compare commits
No commits in common. "main" and "v1.0.8" have entirely different histories.
@ -1,10 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## 1.0.9 (2026-06-27)
|
|
||||||
|
|
||||||
### Fixes
|
|
||||||
- **Theme Engine**: Extended `Bootstrap.config` color patch coverage to `nav-pills`, `dropdown-menu` active state, and `navbar-nav .nav-link.active` so navigation components follow the configured primary color instead of Bootstrap default blue.
|
|
||||||
|
|
||||||
## 1.0.6 (2026-06-09)
|
## 1.0.6 (2026-06-09)
|
||||||
|
|
||||||
### Breaking Changes
|
### Breaking Changes
|
||||||
|
|||||||
@ -5,7 +5,7 @@ Bootstrap 5.3 自包含集成引擎。
|
|||||||
## 0. 快速开始 (Quick Start)
|
## 0. 快速开始 (Quick Start)
|
||||||
直接在 HTML 中引入(无需打包,完全非 ESM 注入):
|
直接在 HTML 中引入(无需打包,完全非 ESM 注入):
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@apigo.cc/bootstrap@1.0.9/dist/bootstrap.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/@apigo.cc/bootstrap@1.0.6/dist/bootstrap.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
## 1. 运行时接口
|
## 1. 运行时接口
|
||||||
@ -44,5 +44,5 @@ Bootstrap.config({ success: '#22c55e' });
|
|||||||
```
|
```
|
||||||
|
|
||||||
## 3. 核心机制 (Internal)
|
## 3. 核心机制 (Internal)
|
||||||
- **运行时样式补丁**: `Bootstrap.config` 动态更新 `id="bs-config-patch"` 的 `<style>` 标签。通过 `!important` 覆盖 Bootstrap 内部硬编码的组件颜色(如 `.btn`, `.form-switch`, `.form-range`, `.progress-bar`, `.list-group-item`, `.nav-pills`, `.dropdown-menu`, `.navbar-nav .nav-link.active` 等)。
|
- **运行时样式补丁**: `Bootstrap.config` 动态更新 `id="bs-config-patch"` 的 `<style>` 标签。通过 `!important` 覆盖 Bootstrap 内部硬编码的组件颜色(如 `.btn`, `.form-switch`, `.form-range`, `.progress-bar`, `.list-group-item` 等)。
|
||||||
- **零构建支持**: 无需 Sass 重新编译,在纯 ESM 环境下即可实现全量主题定制。
|
- **零构建支持**: 无需 Sass 重新编译,在纯 ESM 环境下即可实现全量主题定制。
|
||||||
|
|||||||
18
dist/bootstrap.js
vendored
18
dist/bootstrap.js
vendored
@ -7233,24 +7233,6 @@ url("data:font/woff;base64,d09GRgABAAAAAsBAAAsAAAAHavgAAQAAAAAAAAAAAAAAAAAAAAAAA
|
|||||||
border-color: var(--bs-primary) !important;
|
border-color: var(--bs-primary) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 导航与下拉菜单 (Nav & Dropdown) */
|
|
||||||
.nav {
|
|
||||||
--bs-nav-link-color: var(--bs-body-color) !important;
|
|
||||||
--bs-nav-link-hover-color: var(--bs-primary) !important;
|
|
||||||
}
|
|
||||||
.nav-pills {
|
|
||||||
--bs-nav-pills-link-active-bg: var(--bs-primary) !important;
|
|
||||||
--bs-nav-pills-link-active-color: #fff !important;
|
|
||||||
}
|
|
||||||
.dropdown-menu {
|
|
||||||
--bs-dropdown-link-active-bg: var(--bs-primary) !important;
|
|
||||||
--bs-dropdown-link-active-color: #fff !important;
|
|
||||||
}
|
|
||||||
.navbar-nav .nav-link.active,
|
|
||||||
.navbar-nav .nav-link.show {
|
|
||||||
color: var(--bs-primary) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 列表组 (List Group) */
|
/* 列表组 (List Group) */
|
||||||
.list-group-item.active {
|
.list-group-item.active {
|
||||||
background-color: var(--bs-primary) !important;
|
background-color: var(--bs-primary) !important;
|
||||||
|
|||||||
2
dist/bootstrap.min.js
vendored
2
dist/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@apigo.cc/bootstrap",
|
"name": "@apigo.cc/bootstrap",
|
||||||
"version": "1.0.9",
|
"version": "1.0.7",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/bootstrap.js",
|
"main": "dist/bootstrap.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
@ -22,9 +22,11 @@ try {
|
|||||||
const pkgPath = path.join(__dirname, '../package.json');
|
const pkgPath = path.join(__dirname, '../package.json');
|
||||||
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
||||||
|
|
||||||
// npm 要求包名全小写,scope + name 强制 toLowerCase
|
// 保持原有名称(如果已经带有 @apigo.cc/ 前缀)或替换前缀
|
||||||
const baseName = (pkg.name.includes('/') ? pkg.name.split('/')[1] : pkg.name).toLowerCase();
|
if (!pkg.name.startsWith('@apigo.cc/')) {
|
||||||
|
const baseName = pkg.name.includes('/') ? pkg.name.split('/')[1] : pkg.name;
|
||||||
pkg.name = `@apigo.cc/${baseName}`;
|
pkg.name = `@apigo.cc/${baseName}`;
|
||||||
|
}
|
||||||
pkg.version = version;
|
pkg.version = version;
|
||||||
|
|
||||||
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
|
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
|
||||||
|
|||||||
21
src/index.js
21
src/index.js
@ -1,7 +1,7 @@
|
|||||||
import * as bootstrap from 'bootstrap'
|
import * as bootstrap from 'bootstrap'
|
||||||
import 'bootstrap/dist/css/bootstrap.min.css'
|
import 'bootstrap/dist/css/bootstrap.min.css'
|
||||||
import 'bootstrap-icons/font/bootstrap-icons.css'
|
import 'bootstrap-icons/font/bootstrap-icons.css'
|
||||||
import { Hash, LocalStorage } from '@apigo.cc/state'
|
import { Hash, LocalStorage, RefreshState } from '@apigo.cc/state'
|
||||||
|
|
||||||
const GlobalStates = { Hash, LocalStorage }
|
const GlobalStates = { Hash, LocalStorage }
|
||||||
|
|
||||||
@ -70,24 +70,6 @@ export const Bootstrap = {
|
|||||||
border-color: var(--bs-primary) !important;
|
border-color: var(--bs-primary) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 导航与下拉菜单 (Nav & Dropdown) */
|
|
||||||
.nav {
|
|
||||||
--bs-nav-link-color: var(--bs-body-color) !important;
|
|
||||||
--bs-nav-link-hover-color: var(--bs-primary) !important;
|
|
||||||
}
|
|
||||||
.nav-pills {
|
|
||||||
--bs-nav-pills-link-active-bg: var(--bs-primary) !important;
|
|
||||||
--bs-nav-pills-link-active-color: #fff !important;
|
|
||||||
}
|
|
||||||
.dropdown-menu {
|
|
||||||
--bs-dropdown-link-active-bg: var(--bs-primary) !important;
|
|
||||||
--bs-dropdown-link-active-color: #fff !important;
|
|
||||||
}
|
|
||||||
.navbar-nav .nav-link.active,
|
|
||||||
.navbar-nav .nav-link.show {
|
|
||||||
color: var(--bs-primary) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 列表组 (List Group) */
|
/* 列表组 (List Group) */
|
||||||
.list-group-item.active {
|
.list-group-item.active {
|
||||||
background-color: var(--bs-primary) !important;
|
background-color: var(--bs-primary) !important;
|
||||||
@ -146,3 +128,4 @@ if (typeof globalThis !== 'undefined') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default Bootstrap;
|
export default Bootstrap;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user