shaka-video-element 0.6.16 → 0.6.18

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/dist/cjs/react.js CHANGED
@@ -65,6 +65,7 @@ function createComponent({
65
65
  elementClass,
66
66
  events,
67
67
  displayName,
68
+ defaultProps,
68
69
  toAttributeName = defaultToAttributeName,
69
70
  toAttributeValue = defaultToAttributeValue
70
71
  }) {
@@ -99,7 +100,12 @@ function createComponent({
99
100
  }
100
101
  }
101
102
  if (attrName && IS_REACT_19_OR_NEWER) {
102
- reactProps[attrName] = v;
103
+ const attrValueFromDefault = defaultToAttributeValue(v);
104
+ if (attrValue !== attrValueFromDefault) {
105
+ reactProps[attrName] = attrValue;
106
+ } else {
107
+ reactProps[attrName] = v;
108
+ }
103
109
  }
104
110
  }
105
111
  if (typeof window !== "undefined") {
@@ -145,6 +151,7 @@ function createComponent({
145
151
  reactProps.children = [templateShadowRoot, reactProps.children];
146
152
  }
147
153
  return React2.createElement(tagName, {
154
+ ...defaultProps,
148
155
  ...reactProps,
149
156
  ref: React2.useCallback(
150
157
  (node) => {
package/dist/react.js CHANGED
@@ -33,6 +33,7 @@ function createComponent({
33
33
  elementClass,
34
34
  events,
35
35
  displayName,
36
+ defaultProps,
36
37
  toAttributeName = defaultToAttributeName,
37
38
  toAttributeValue = defaultToAttributeValue
38
39
  }) {
@@ -67,7 +68,12 @@ function createComponent({
67
68
  }
68
69
  }
69
70
  if (attrName && IS_REACT_19_OR_NEWER) {
70
- reactProps[attrName] = v;
71
+ const attrValueFromDefault = defaultToAttributeValue(v);
72
+ if (attrValue !== attrValueFromDefault) {
73
+ reactProps[attrName] = attrValue;
74
+ } else {
75
+ reactProps[attrName] = v;
76
+ }
71
77
  }
72
78
  }
73
79
  if (typeof window !== "undefined") {
@@ -113,6 +119,7 @@ function createComponent({
113
119
  reactProps.children = [templateShadowRoot, reactProps.children];
114
120
  }
115
121
  return React2.createElement(tagName, {
122
+ ...defaultProps,
116
123
  ...reactProps,
117
124
  ref: React2.useCallback(
118
125
  (node) => {