@lukekaalim/act-web 6.0.0 → 6.1.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 +12 -0
  2. package/package.json +1 -1
  3. package/props.ts +7 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @lukekaalim/act-web
2
2
 
3
+ ## 6.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 1b7eec1: Allow kebab and camel case inline CSS propreties
8
+
9
+ ## 6.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 0f734f5: Fix issue with web refs not being applied at all
14
+
3
15
  ## 6.0.0
4
16
 
5
17
  ### Major Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukekaalim/act-web",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "type": "module",
5
5
  "main": "mod.ts",
6
6
  "exports": {
package/props.ts CHANGED
@@ -42,10 +42,8 @@ export const setSVGElementProps = (
42
42
  }
43
43
  switch (name) {
44
44
  case 'ref':
45
- if (prev)
46
- (prev as any).current = null;
47
45
  if (next)
48
- (next as any).current = node;
46
+ (next as act.WriteOnlyRef<SVGElement>).set(node)
49
47
  return true;
50
48
  case 'style':
51
49
  return (setStyleProp(node.style, next as any, prev as any), true);
@@ -76,10 +74,8 @@ export const setHTMLElementProps = (
76
74
  }
77
75
  switch (name) {
78
76
  case 'ref':
79
- if (prev)
80
- (prev as any).current = null;
81
77
  if (next)
82
- (next as any).current = node;
78
+ (next as act.WriteOnlyRef<HTMLElement>).set(node)
83
79
  return true;
84
80
  case 'style':
85
81
  return (setStyleProp(node.style, next as any, prev as any), true);
@@ -117,8 +113,11 @@ export const setStyleProp = (
117
113
  style: null | Record<keyof CSSStyleDeclaration, string | number>,
118
114
  prevStyle: null | Record<keyof CSSStyleDeclaration, string | number>,
119
115
  ) => {
120
- setPropObject(node as any, style, prevStyle, (name, value) =>
121
- (node.setProperty(name, value as string), true))
116
+ setPropObject(node as any, style, prevStyle, (name, value) => {
117
+ (node as any)[name] = value;
118
+ node.setProperty(name, value as string);
119
+ return true;
120
+ });
122
121
  }
123
122
 
124
123
  const setPropObject = (