assign-gingerly 0.0.27 → 0.0.28

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.
@@ -102,7 +102,14 @@ class ElementEnhancementContainer {
102
102
  let attrInitVals = undefined;
103
103
  if (registryItem.withAttrs && element) {
104
104
  try {
105
- attrInitVals = parseWithAttrs(element, registryItem.withAttrs, registryItem.allowUnprefixed || false);
105
+ // Create SpawnContext to pass to parseWithAttrs
106
+ // If mountCtx already has synthesizerElement, use it directly in the SpawnContext
107
+ const spawnContext = {
108
+ config: registryItem,
109
+ mountCtx,
110
+ synthesizerElement: mountCtx?.synthesizerElement
111
+ };
112
+ attrInitVals = parseWithAttrs(element, registryItem.withAttrs, registryItem.allowUnprefixed || false, spawnContext);
106
113
  }
107
114
  catch (e) {
108
115
  console.error('Error parsing attributes:', e);
@@ -178,10 +178,18 @@ class ElementEnhancementContainer {
178
178
  let attrInitVals: any = undefined;
179
179
  if (registryItem.withAttrs && element) {
180
180
  try {
181
+ // Create SpawnContext to pass to parseWithAttrs
182
+ // If mountCtx already has synthesizerElement, use it directly in the SpawnContext
183
+ const spawnContext = {
184
+ config: registryItem,
185
+ mountCtx,
186
+ synthesizerElement: (mountCtx as any)?.synthesizerElement
187
+ };
181
188
  attrInitVals = parseWithAttrs(
182
189
  element,
183
190
  registryItem.withAttrs,
184
- registryItem.allowUnprefixed || false
191
+ registryItem.allowUnprefixed || false,
192
+ spawnContext
185
193
  );
186
194
  } catch (e) {
187
195
  console.error('Error parsing attributes:', e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assign-gingerly",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "description": "This package provides a utility function for carefully merging one object into another.",
5
5
  "homepage": "https://github.com/bahrus/assign-gingerly#readme",
6
6
  "bugs": {