diff --git a/README.en.md b/README.en.md index 525ae457..da9ce51d 100644 --- a/README.en.md +++ b/README.en.md @@ -17,6 +17,7 @@ - [Helux-nextjs-starter](https://github.com/heluxjs/helux-nextjs-starter) It has the following features: + - Developed based on the fastest immutable js library [limu](https://github.com/tnfe/limu), with super performance - Atom supports dependency collection, which means that atom does not need to be split into details. Atom can be equivalent to model, which is naturally friendly to `DDD` domain-driven design. - Built-in signal response mechanism, which can achieve 0 hook encoding + DOM granular update diff --git a/README.md b/README.md index 085f0b31..b70e64b1 100644 --- a/README.md +++ b/README.md @@ -215,5 +215,3 @@ watch( 小小鼓励,给予我们更多力量坚持做出更好的开源项目 image - - diff --git a/docs/docs/playground/demos/Playground/index.tsx b/docs/docs/playground/demos/Playground/index.tsx index 79dc507d..9c82c933 100644 --- a/docs/docs/playground/demos/Playground/index.tsx +++ b/docs/docs/playground/demos/Playground/index.tsx @@ -31,7 +31,7 @@ export default () => { const { name } = info; cachedSubNames[name] = subName; setInfo({ name, subName, code: getCode(name, subName) }); - } + }; return ( diff --git a/packages/helux-core/src/api.ts b/packages/helux-core/src/api.ts index 4640f842..3126dea9 100644 --- a/packages/helux-core/src/api.ts +++ b/packages/helux-core/src/api.ts @@ -37,7 +37,7 @@ import { } from './hooks'; import { block, dynamicBlock, signal } from './signal'; -const { shallowCompare, isDiff } = limuUtils; +const { shallowCompare, isDiff, isDraft } = limuUtils; const createShared = share; // for compatible wit v2 helux const $ = signal; // signal api alias @@ -111,6 +111,7 @@ export { isDerivedResult, isDiff, isSharedState, + isDraft, shallowCompare, markRaw, storeSrv, diff --git a/packages/helux-core/src/consts/user.ts b/packages/helux-core/src/consts/user.ts index 5dff8ab2..c55ba015 100644 --- a/packages/helux-core/src/consts/user.ts +++ b/packages/helux-core/src/consts/user.ts @@ -1,6 +1,6 @@ import { VER as limuVer } from 'limu'; -export const VER = '4.1.5'; +export const VER = '4.1.6'; export const LIMU_VER = limuVer; diff --git a/packages/helux-core/src/types/api.d.ts b/packages/helux-core/src/types/api.d.ts index 2220377d..30ee4826 100644 --- a/packages/helux-core/src/types/api.d.ts +++ b/packages/helux-core/src/types/api.d.ts @@ -1,6 +1,6 @@ /* |------------------------------------------------------------------------------------------------ -| helux-core@4.1.5 +| helux-core@4.1.6 | A state library core that integrates atom, signal, collection dep, derive and watch, | it supports all react like frameworks ( including react 18 ). |------------------------------------------------------------------------------------------------ @@ -68,7 +68,7 @@ import type { } from './base'; export declare const cst: { - VER: '4.1.5'; + VER: '4.1.6'; LIMU_VER: string; EVENT_NAME: { /** 共享状态创建时的事件 */ @@ -747,6 +747,11 @@ interface IProduce { */ export declare function isDiff(val1: any, val2: any): boolean; +/** + * 来自 LimuUtils.isDraft,判断是否是草稿节点 + */ +export declare function isDraft(mayDraft: any): boolean; + export declare const produce: IProduce; /** diff --git a/packages/helux-openinula/src/index.ts b/packages/helux-openinula/src/index.ts index 3d4b62f1..089bf2cd 100644 --- a/packages/helux-openinula/src/index.ts +++ b/packages/helux-openinula/src/index.ts @@ -81,6 +81,7 @@ export const { isSharedState, isDerivedAtom, isDerivedResult, + isDraft, storeSrv, shallowCompare, markRaw, diff --git a/packages/helux/src/index.ts b/packages/helux/src/index.ts index 29e096b5..0165d2f5 100644 --- a/packages/helux/src/index.ts +++ b/packages/helux/src/index.ts @@ -76,6 +76,7 @@ export const { isSharedState, isDerivedAtom, isDerivedResult, + isDraft, storeSrv, shallowCompare, markRaw, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e868b4f8..ec0cb93d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -95,7 +95,7 @@ importers: dumi: ^2.2.16 eslint: ^8.23.0 father: ^4.1.0 - helux: 4.1.4 + helux: 4.1.5 husky: ^8.0.1 lint-staged: ^13.0.3 lodash: ^4.17.21 @@ -213,7 +213,7 @@ importers: hel-micro: ^4.8.11 hel-micro-core: ^4.8.7 hel-types: ^4.3.3 - helux: ^4.1.0 + helux: ^4.1.5 react: '>=16.10.2' react-dom: '>=16.10.2' rollup: ^2.23.0 @@ -12367,6 +12367,7 @@ packages: /limu/3.12.3: resolution: {integrity: sha512-Xe/ljbUc6fvW2R9yf3/ipUwoThFYdJUGrGrjIfTmPFKKu9LCcRRyUZZoeq2dIDpO5LsVMmRDre0/EhvotJ5ytg==} dev: false + bundledDependencies: [] /lines-and-columns/1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}