@lukekaalim/act-web 3.4.0-alpha.0 → 3.4.0-alpha.2

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 +8 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @lukekaalim/act-web
2
2
 
3
+ ## 3.4.0-alpha.2
4
+
5
+ ### Minor Changes
6
+
7
+ - Add support for data-\* attributes on HTML elements
8
+
9
+ ## 3.4.0-alpha.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Added "Style" prop support to SVG
14
+
3
15
  ## 3.4.0-alpha.0
4
16
 
5
17
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lukekaalim/act-web",
3
- "version": "3.4.0-alpha.0",
3
+ "version": "3.4.0-alpha.2",
4
4
  "type": "module",
5
5
  "main": "mod.ts",
6
6
  "dependencies": {
package/props.ts CHANGED
@@ -43,6 +43,8 @@ export const setSVGElementProps = (
43
43
  case 'ref':
44
44
  (next as any).current = node;
45
45
  return true;
46
+ case 'style':
47
+ return (setStyleProp(node.style, next as any, prev as any), true);
46
48
  default:
47
49
  node.setAttribute(name, next as any);
48
50
  return true;
@@ -62,6 +64,12 @@ export const setHTMLElementProps = (
62
64
  setEventProp(node as any, eventName, next, prev);
63
65
  return true;
64
66
  }
67
+ if (name.startsWith('data-')) {
68
+ if (next === undefined)
69
+ node.removeAttribute(name);
70
+ else
71
+ node.setAttribute(name, next as string);
72
+ }
65
73
  switch (name) {
66
74
  case 'ref':
67
75
  (next as any).current = node;