@lukekaalim/act-backstage 3.2.1 → 4.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lukekaalim/act-backstage
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 41b49aa: Upgraded NodeBuilder to pass element during destruction, fixed Sprites not being assigned materials in act-three, and act-three objects will set ref to null on destruction
8
+
3
9
  ## 3.2.1
4
10
 
5
11
  ### Patch Changes
package/builder.ts CHANGED
@@ -10,7 +10,7 @@ export type NodeBuilder<TNode, TRoot = string | symbol> = {
10
10
  roots: Set<TRoot>,
11
11
 
12
12
  create: (element: Element, root: TRoot, ref: CommitRef2) => null | TNode,
13
- destroy?: (el: TNode) => unknown,
13
+ destroy?: (el: TNode, prev: Element) => unknown,
14
14
 
15
15
  linkRoot?: (child: TNode) => unknown,
16
16
  unlinkRoot?: (child: TNode) => unknown,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukekaalim/act-backstage",
3
- "version": "3.2.1",
3
+ "version": "4.0.0",
4
4
  "type": "module",
5
5
  "main": "mod.ts",
6
6
  "dependencies": {
package/space2.ts CHANGED
@@ -244,7 +244,7 @@ export class RenderSpace2<TNode, TRoot extends string | symbol> {
244
244
  if (unlinkRoot && !parent.commit)
245
245
  unlinkRoot(node)
246
246
  if (destroy)
247
- destroy(node);
247
+ destroy(node, prev.element);
248
248
  }
249
249
  }
250
250