Compare commits

..

No commits in common. "main" and "v1.0.5" have entirely different histories.
main ... v1.0.5

17 changed files with 9437 additions and 28 deletions

View File

@ -1,15 +1,5 @@
# Changelog
## 1.0.6 (2026-06-09)
### Breaking Changes
- **ESM Deprecation**: Completely removed ESM exports to align with the "zero-boilerplate" project philosophy. The library now relies solely on global injection via `globalThis`.
- **Build Format**: Switched build output to IIFE format only.
### Improvements
- **Integration**: Simplified dependency handling for `@apigo.cc/state` by using global variables.
- **Docs**: Updated README with new versioning and non-ESM usage instructions.
## 1.0.5 (2026-06-05)
### Features

View File

@ -3,16 +3,14 @@
Bootstrap 5.3 自包含集成引擎。
## 0. 快速开始 (Quick Start)
直接在 HTML 中引入(无需打包,完全非 ESM 注入
直接在 HTML 中引入(无需打包):
```html
<script src="https://cdn.jsdelivr.net/npm/@apigo.cc/bootstrap@1.0.6/dist/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@apigo.cc/bootstrap@1.0.5/dist/bootstrap.min.js"></script>
```
## 1. 运行时接口
- **`bootstrap`**: (Object) 官方原生 Bootstrap 镜像。已挂载至 `globalThis.bootstrap`
- **`Bootstrap`**: (Object) 增强控制接口。已挂载至 `globalThis.Bootstrap`
*(注意:本库自 v1.0.6 起全面废弃 ESM 导出,改为纯全局注入模式。)*
- **`bootstrap`**: (Object) 官方原生 Bootstrap 镜像。
- **`Bootstrap`**: (Object) 增强控制接口。
## 2. API 参考

13
dist/bootstrap.js vendored
View File

@ -2120,7 +2120,9 @@ url("data:font/woff;base64,d09GRgABAAAAAsBAAAsAAAAHavgAAQAAAAAAAAAAAAAAAAAAAAAAA
console.error("vite-plugin-css-injected-by-js", e);
}
})();
var ApigoBootstrap = function(exports) {
(function(global, factory) {
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@apigo.cc/state")) : typeof define === "function" && define.amd ? define(["exports", "@apigo.cc/state"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.ApigoBootstrap = {}));
})(this, function(exports2) {
"use strict";
var top = "top";
var bottom = "bottom";
@ -7277,8 +7279,7 @@ var ApigoBootstrap = function(exports) {
globalThis.bootstrap = bootstrap;
globalThis.Bootstrap = Bootstrap;
}
exports.Bootstrap = Bootstrap;
exports.default = Bootstrap;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
return exports;
}({});
exports2.Bootstrap = Bootstrap;
exports2.default = Bootstrap;
Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
});

File diff suppressed because one or more lines are too long

2128
dist/bootstrap.min.mjs vendored Normal file

File diff suppressed because one or more lines are too long

7282
dist/bootstrap.mjs vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,9 @@
{
"name": "@apigo.cc/bootstrap",
"version": "1.0.7",
"version": "1.0.5",
"type": "module",
"main": "dist/bootstrap.js",
"module": "dist/bootstrap.js",
"files": [
"dist"
],

View File

@ -17,13 +17,13 @@ export default defineConfig({
lib: {
entry: resolve(__dirname, 'src/index.js'),
name: 'ApigoBootstrap',
formats: ['iife']
formats: ['umd', 'es']
},
rollupOptions: {
external: ['@apigo.cc/state'],
output: [
{
format: 'iife',
format: 'umd',
name: 'ApigoBootstrap',
entryFileNames: 'bootstrap.js',
globals: {
@ -31,13 +31,22 @@ export default defineConfig({
}
},
{
format: 'iife',
format: 'umd',
name: 'ApigoBootstrap',
entryFileNames: 'bootstrap.min.js',
globals: {
'@apigo.cc/state': 'ApigoState'
},
plugins: [terser()]
},
{
format: 'es',
entryFileNames: 'bootstrap.mjs'
},
{
format: 'es',
entryFileNames: 'bootstrap.min.mjs',
plugins: [terser()]
}
]
},