@lukekaalim/act-web 5.1.0 → 5.2.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,23 @@
1
1
  # @lukekaalim/act-web
2
2
 
3
+ ## 5.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - bf3138f: Added PrimitiveRegistry for dynamically adding more elements to act-three, implemented in backstage
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [bf3138f]
12
+ - @lukekaalim/act-backstage@3.2.0
13
+ - @lukekaalim/act@4.3.0
14
+
15
+ ## 5.1.1
16
+
17
+ ### Patch Changes
18
+
19
+ - 114c53f: Fix issue with adding/remove ref props from Web elements
20
+
3
21
  ## 5.1.0
4
22
 
5
23
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukekaalim/act-web",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "type": "module",
5
5
  "main": "mod.ts",
6
6
  "exports": {
@@ -8,8 +8,8 @@
8
8
  "./node": "./nodejs/index.ts"
9
9
  },
10
10
  "dependencies": {
11
- "@lukekaalim/act": "^4.2.0",
12
- "@lukekaalim/act-backstage": "^3.1.1",
11
+ "@lukekaalim/act": "^4.3.0",
12
+ "@lukekaalim/act-backstage": "^3.2.0",
13
13
  "@lukekaalim/act-recon": "^4.0.0",
14
14
  "@types/hast": "^3.0.4",
15
15
  "hast-util-to-html": "^9.0.5",
package/props.ts CHANGED
@@ -41,7 +41,10 @@ export const setSVGElementProps = (
41
41
  }
42
42
  switch (name) {
43
43
  case 'ref':
44
- (next as any).current = node;
44
+ if (prev)
45
+ (prev as any).current = null;
46
+ if (next)
47
+ (next as any).current = node;
45
48
  return true;
46
49
  case 'style':
47
50
  return (setStyleProp(node.style, next as any, prev as any), true);
@@ -72,7 +75,10 @@ export const setHTMLElementProps = (
72
75
  }
73
76
  switch (name) {
74
77
  case 'ref':
75
- (next as any).current = node;
78
+ if (prev)
79
+ (prev as any).current = null;
80
+ if (next)
81
+ (next as any).current = node;
76
82
  return true;
77
83
  case 'style':
78
84
  return (setStyleProp(node.style, next as any, prev as any), true);
package/rehydrate.ts CHANGED
@@ -2,7 +2,6 @@ import { createId, Element, ElementType, h, primitiveNodeTypes, specialNodeTypes
2
2
  import { Commit2, CommitID, CommitRef2, Reconciler2 } from "@lukekaalim/act-recon";
3
3
  import { deserializeSSRPayload, RehydratableComponent, SSRContext, SSRPayload, ssrStringToSymbolMap } from "./ssr";
4
4
  import { RenderSpace2 } from "@lukekaalim/act-backstage";
5
- import { recon } from "../three/deps";
6
5
 
7
6
 
8
7
  export const rehydrate = (
package/space.ts CHANGED
@@ -22,7 +22,7 @@ export const createWebNodeBuilder = (
22
22
  switch (tag) {
23
23
  case act.primitiveNodeTypes.string:
24
24
  case act.primitiveNodeTypes.number:
25
- return window.document.createTextNode("<empty text>");
25
+ return window.document.createTextNode((element.props.value as any).toString());
26
26
  default:
27
27
  return null;
28
28
  }