bobe 0.0.28 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -247,12 +247,13 @@ type BobeUI = {
247
247
  (isSub: boolean): Tokenizer;
248
248
  };
249
249
  type LogicNode = {
250
+ data: any;
250
251
  __logicType: FakeType;
251
252
  realParent: any;
252
253
  realBefore?: any;
253
254
  realAfter?: any;
254
255
  };
255
- type ForNode = LogicNode & {
256
+ type ForNode = Omit<LogicNode, 'data'> & {
256
257
  children: ForItemNode[];
257
258
  snapshot: ReturnType<Tokenizer['snapshot']>;
258
259
  itemExp: string | ((value: any) => any);
@@ -269,7 +270,6 @@ type ForNode = LogicNode & {
269
270
  type ForItemNode = LogicNode & {
270
271
  id: number;
271
272
  forNode: ForNode;
272
- data: any;
273
273
  effect: Scope;
274
274
  key?: any;
275
275
  };
@@ -282,11 +282,9 @@ type IfNode = LogicNode & {
282
282
  owner: ComponentNode | FragmentNode;
283
283
  };
284
284
  type FragmentNode = LogicNode & {
285
- data: Store;
286
285
  tokenizer: Tokenizer;
287
286
  };
288
287
  type ComponentNode = LogicNode & {
289
- data: Store;
290
288
  tokenizer: Tokenizer;
291
289
  };
292
290
 
package/dist/index.umd.js CHANGED
@@ -226,6 +226,7 @@
226
226
  prev: null
227
227
  }, (ctxProvider.__logicType & LogicalBit ? NodeSort.Logic : 0) | NodeSort.CtxProvider);
228
228
  }
229
+ const rootLen = stack.length;
229
230
  const ctx = this.ctx = {
230
231
  realParent: root,
231
232
  prevSibling: before,
@@ -265,7 +266,7 @@
265
266
  continue;
266
267
  }
267
268
  if (ctx.current) {
268
- if (stack.length === 2 && !ctx.prevSibling) {
269
+ if (stack.length === rootLen && !ctx.prevSibling) {
269
270
  ctx.prevSibling = before;
270
271
  }
271
272
  this.handleInsert(ctx.realParent, ctx.current, ctx.prevSibling);
@@ -732,7 +733,7 @@
732
733
  getData() {
733
734
  const _this$ctx$stack$peekB = this.ctx.stack.peekByType(NodeSort.CtxProvider),
734
735
  node = _this$ctx$stack$peekB.node;
735
- return node.data || node.owner.data;
736
+ return node.data;
736
737
  }
737
738
  onePropParsed(data, node, key, value, valueIsMapKey, isFn, hookI) {
738
739
  if (isFn) {
@@ -820,7 +821,8 @@
820
821
  preCond: preIsCond ? prevSibling : null,
821
822
  isFirstRender: true,
822
823
  effect: null,
823
- owner
824
+ owner,
825
+ data
824
826
  };
825
827
  let signal;
826
828
  switch (keyWord.value) {