@lukekaalim/act-backstage 1.2.0 → 1.3.0

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/package.json +3 -3
  3. package/space.ts +2 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @lukekaalim/act-backstage
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added support for keys/reordering elements without unmounting them
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @lukekaalim/act-recon@1.2.0
13
+ - @lukekaalim/act@3.2.0
14
+
15
+ ## 1.2.1
16
+
17
+ ### Patch Changes
18
+
19
+ - 0017c07: Fix packages emitting debugging console logs
20
+ - Updated dependencies [0017c07]
21
+ - @lukekaalim/act-recon@1.1.1
22
+
3
23
  ## 1.2.0
4
24
 
5
25
  ### Minor Changes
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@lukekaalim/act-backstage",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "main": "mod.ts",
5
5
  "dependencies": {
6
- "@lukekaalim/act": "^3.1.0",
7
- "@lukekaalim/act-recon": "^1.1.0"
6
+ "@lukekaalim/act": "^3.2.0",
7
+ "@lukekaalim/act-recon": "^1.2.0"
8
8
  }
9
9
  }
package/space.ts CHANGED
@@ -59,7 +59,7 @@ export const createSimpleRenderSpace = <T, R extends string | Symbol>(
59
59
  if (node && !ignoreFirst)
60
60
  return [node];
61
61
  const commit = tree.commits.get(id);
62
- if (!commit || commit.suspended)
62
+ if (!commit)
63
63
  return [];
64
64
  if (commit.element.type === act.primitiveNodeTypes.null)
65
65
  return [];
@@ -146,20 +146,12 @@ export const createSimpleRenderSpace = <T, R extends string | Symbol>(
146
146
  if (!node)
147
147
  continue;
148
148
  args.update(node, delta.next.element, delta.prev.element);
149
-
150
- if (delta.prev.suspended !== delta.next.suspended) {
149
+ if (delta.moved) {
151
150
  const parent = findParent(delta.ref);
152
151
  const parentNode = parent && parent.node;
153
152
  if (parentNode) {
154
153
  needsReorder.add(parent.id)
155
154
  }
156
- console.log('altering suspention type', node, parentNode, delta.next)
157
- if (!parent || parentNode) {
158
- if (!delta.next.suspended && args.link)
159
- args.link(node, parentNode);
160
- if (delta.next.suspended && args.unlink)
161
- args.unlink(node, parentNode);
162
- }
163
155
  }
164
156
  }
165
157
  for (const delta of deltas.created) {