chore: bump version to v1.0.6 and switch to IIFE distribution while keeping ESM source [By: AICoder]
This commit is contained in:
parent
81a688d532
commit
d8c1de0fa8
8
dist/bootstrap.js
vendored
8
dist/bootstrap.js
vendored
@ -2120,7 +2120,7 @@ url("data:font/woff;base64,d09GRgABAAAAAsBAAAsAAAAHavgAAQAAAAAAAAAAAAAAAAAAAAAAA
|
||||
console.error("vite-plugin-css-injected-by-js", e);
|
||||
}
|
||||
})();
|
||||
(function() {
|
||||
var ApigoBootstrap = function(exports) {
|
||||
"use strict";
|
||||
var top = "top";
|
||||
var bottom = "bottom";
|
||||
@ -7277,4 +7277,8 @@ url("data:font/woff;base64,d09GRgABAAAAAsBAAAsAAAAHavgAAQAAAAAAAAAAAAAAAAAAAAAAA
|
||||
globalThis.bootstrap = bootstrap;
|
||||
globalThis.Bootstrap = Bootstrap;
|
||||
}
|
||||
})();
|
||||
exports.Bootstrap = Bootstrap;
|
||||
exports.default = Bootstrap;
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
||||
return exports;
|
||||
}({});
|
||||
|
||||
4
dist/bootstrap.min.js
vendored
4
dist/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,9 +1,8 @@
|
||||
import * as bootstrap from 'bootstrap'
|
||||
import 'bootstrap/dist/css/bootstrap.min.css'
|
||||
import 'bootstrap-icons/font/bootstrap-icons.css'
|
||||
import '@apigo.cc/state'
|
||||
import { Hash, LocalStorage, RefreshState } from '@apigo.cc/state'
|
||||
|
||||
const { Hash, LocalStorage, _unsafeRefreshState } = globalThis
|
||||
const GlobalStates = { Hash, LocalStorage }
|
||||
|
||||
/**
|
||||
@ -11,8 +10,8 @@ const GlobalStates = { Hash, LocalStorage }
|
||||
* 自包含的 Bootstrap 5.3 集成引擎
|
||||
*/
|
||||
|
||||
// 定义增强功能对象
|
||||
const Bootstrap = {
|
||||
// 导出增强功能对象
|
||||
export const Bootstrap = {
|
||||
config: (options = {}) => {
|
||||
if (typeof document === 'undefined') return
|
||||
const root = document.documentElement
|
||||
@ -128,3 +127,5 @@ if (typeof globalThis !== 'undefined') {
|
||||
globalThis.Bootstrap = Bootstrap;
|
||||
}
|
||||
|
||||
export default Bootstrap;
|
||||
|
||||
|
||||
@ -22,14 +22,12 @@
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
import '@apigo.cc/state';
|
||||
import '@apigo.cc/bootstrap';
|
||||
|
||||
const { Bootstrap, LocalStorage } = globalThis;
|
||||
import { Bootstrap } from '@apigo.cc/bootstrap';
|
||||
import { LocalStorage } from '@apigo.cc/state';
|
||||
|
||||
// 初始化
|
||||
LocalStorage.darkMode = false;
|
||||
Bootstrap.config({ bindDarkMode: [LocalStorage, 'darkMode'] });
|
||||
Bootstrap.bindDarkMode(LocalStorage, 'darkMode');
|
||||
|
||||
document.getElementById('toggle-btn').onclick = () => {
|
||||
LocalStorage.darkMode = !LocalStorage.darkMode;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user