@cleanweb/oore 1.2.0-alpha.7 → 1.2.0-alpha.8

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.
@@ -36,6 +36,9 @@ var getComponentSlotName = function (TargetComponent, child) {
36
36
  var keyTypes = ['string', 'number', 'symbol'];
37
37
  var slotName = child.props['data-slot-name'];
38
38
  if (keyTypes.includes(typeof slotName)) {
39
+ if (typeof child.type === 'string') {
40
+ child.props.tagName = child.type;
41
+ }
39
42
  return slotName;
40
43
  }
41
44
  else
@@ -47,7 +50,6 @@ var getComponentSlotName = function (TargetComponent, child) {
47
50
  exports.getComponentSlotName = getComponentSlotName;
48
51
  var useSlots = function (children, slotComponents, _requiredSlots) {
49
52
  var useMemo = react_1.default.useMemo;
50
- console.log({ slotComponents: slotComponents });
51
53
  var slotsAliasLookup = useMemo(function () {
52
54
  var entries = Object.entries(slotComponents);
53
55
  var aliasLookup = {};
@@ -62,7 +64,6 @@ var useSlots = function (children, slotComponents, _requiredSlots) {
62
64
  });
63
65
  return aliasLookup;
64
66
  }, [slotComponents]);
65
- console.log({ slotsAliasLookup: slotsAliasLookup });
66
67
  var result = useMemo(function () {
67
68
  var slotNodes = {};
68
69
  var unmatchedChildren = [];
@@ -98,7 +99,6 @@ var useSlots = function (children, slotComponents, _requiredSlots) {
98
99
  else
99
100
  unmatchedChildren.push(child);
100
101
  });
101
- console.log({ unmatchedChildren: unmatchedChildren, invalidChildren: invalidChildren });
102
102
  requiredSlots.forEach(function (slotAlias) {
103
103
  if (!slotNodes[slotAlias]) {
104
104
  (0, errors_1.throwDevError)("Missing required slot \"".concat(String(slotAlias), "\"."));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleanweb/oore",
3
- "version": "1.2.0-alpha.7",
3
+ "version": "1.2.0-alpha.8",
4
4
  "description": "A library of helpers for writing cleaner React function components with object-oriented patterns.",
5
5
  "engines": {
6
6
  "node": ">=20"