chore: release v1.0.14 with component-based refactor and updated docs By: AICoder
This commit is contained in:
parent
402863fba8
commit
8a4a10f283
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,5 +1,15 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.0.18] - 2026-06-11
|
||||||
|
### Changed
|
||||||
|
- **Component-Based Refactor**: Reorganized source code into independent, PascalCase named modules (e.g., `AutoForm.js`, `TagsInput.js`, `List.js`) to improve maintainability.
|
||||||
|
- **De-ESM Architecture**: Eliminated internal ESM `import`/`export` dependencies between modules. Logic is now shared via `globalThis` and registration patterns, ensuring 100% UMD compatibility.
|
||||||
|
- **Improved Encapsulation**: Each component is now a self-contained unit responsible for its own registration and internal logic.
|
||||||
|
- **Global API Consistency**: Ensured all public APIs (`HTTP`, `UI`, `AutoForm`, etc.) are consistently mounted to `globalThis`.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- **Scope Initialization**: Fixed a critical `TypeError` in `DatePicker` and `TagsInput` by refining parent scope inheritance and preventing recursive self-parenting in the underlying `state` engine.
|
||||||
|
|
||||||
## [1.0.13] - 2026-06-08
|
## [1.0.13] - 2026-06-08
|
||||||
### Fixed
|
### Fixed
|
||||||
- **State Integration**: Bumped `@apigo.cc/state` to `1.0.18` to restore the globally injected `$`/`$$` helpers from the original UMD era, fixing `TagsInput` element targeting.
|
- **State Integration**: Bumped `@apigo.cc/state` to `1.0.18` to restore the globally injected `$`/`$$` helpers from the original UMD era, fixing `TagsInput` element targeting.
|
||||||
|
|||||||
12
README.md
12
README.md
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
### 同步 UMD 集成 (推荐:消灭异步时序风险,实现“秒开”渲染)
|
### 同步 UMD 集成 (推荐:消灭异步时序风险,实现“秒开”渲染)
|
||||||
将脚本放置在 `<head>` 中,确保地基在 DOM 解析前就绪:
|
将脚本放置在 `<head>` 中,确保地基在 DOM 解析前就绪:
|
||||||
|
|
||||||
|
**本地引入示例:**
|
||||||
```html
|
```html
|
||||||
<!-- 1. 基础状态机 (地基) -->
|
<!-- 1. 基础状态机 (地基) -->
|
||||||
<script src="dist/lib/state.js"></script>
|
<script src="dist/lib/state.js"></script>
|
||||||
@ -15,7 +17,17 @@
|
|||||||
<script src="dist/lib/bootstrap.js"></script>
|
<script src="dist/lib/bootstrap.js"></script>
|
||||||
<!-- 3. 本业务组件库 -->
|
<!-- 3. 本业务组件库 -->
|
||||||
<script src="dist/lib/base.js"></script>
|
<script src="dist/lib/base.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
|
**CDN 引入示例:**
|
||||||
|
```html
|
||||||
|
<!-- 1. 基础状态机 (地基) -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@apigo.cc/state@1.0.18/dist/state.min.js"></script>
|
||||||
|
<!-- 2. Bootstrap 适配层 -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@apigo.cc/bootstrap@1.0.7/dist/bootstrap.min.js"></script>
|
||||||
|
<!-- 3. 本业务组件库 -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@apigo.cc/base@1.0.18/dist/base.min.js"></script>
|
||||||
|
```
|
||||||
<script>
|
<script>
|
||||||
// 4. 数据先行 (在 body 解析前定义)
|
// 4. 数据先行 (在 body 解析前定义)
|
||||||
window.brand = { label: 'My App' };
|
window.brand = { label: 'My App' };
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@apigo.cc/base",
|
"name": "@apigo.cc/base",
|
||||||
"version": "1.0.7",
|
"version": "1.0.18",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@apigo.cc/base",
|
"name": "@apigo.cc/base",
|
||||||
"version": "1.0.7",
|
"version": "1.0.18",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@playwright/test": "^1.40.0",
|
"@playwright/test": "^1.40.0",
|
||||||
"@rollup/plugin-terser": "^1.0.0",
|
"@rollup/plugin-terser": "^1.0.0",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@apigo.cc/base",
|
"name": "@apigo.cc/base",
|
||||||
"version": "1.0.13",
|
"version": "1.0.18",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/base.js",
|
"main": "dist/base.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user