@domql/element 2.5.35 → 2.5.38

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.
@@ -86,8 +86,9 @@ const applyComponentFromContext = (element, parent, options) => {
86
86
  const { extend } = element;
87
87
  const execExtend = (0, import_utils.exec)(extend, element);
88
88
  if ((0, import_utils.isString)(execExtend)) {
89
- if (components[execExtend])
90
- element.extend = components[execExtend];
89
+ const componentExists = components[execExtend] || components["smbls." + execExtend];
90
+ if (componentExists)
91
+ element.extend = componentExists;
91
92
  else {
92
93
  if ((ENV === "test" || ENV === "development") && options.verbose) {
93
94
  console.warn(execExtend, "is not in library", components, element);
@@ -125,8 +125,9 @@ const cloneAndMergeArrayExtend = (stack) => {
125
125
  const fallbackStringExtend = (extend, context, options = {}) => {
126
126
  const COMPONENTS = context && context.components || options.components;
127
127
  if ((0, import_utils.isString)(extend)) {
128
- if (COMPONENTS && COMPONENTS[extend]) {
129
- return COMPONENTS[extend];
128
+ const componentExists = COMPONENTS[extend] || COMPONENTS["smbls." + extend];
129
+ if (COMPONENTS && componentExists) {
130
+ return componentExists;
130
131
  } else {
131
132
  if (ENV !== "test" || ENV !== "development") {
132
133
  console.warn("Extend is string but component was not found:", extend);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/element",
3
- "version": "2.5.35",
3
+ "version": "2.5.38",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -31,7 +31,7 @@
31
31
  "@domql/state": "latest",
32
32
  "@domql/utils": "latest"
33
33
  },
34
- "gitHead": "8d7684fd84f5c48fb5cf71e76a05eda071c118f7",
34
+ "gitHead": "58e7232b8f8553780368bc463000766575565816",
35
35
  "devDependencies": {
36
36
  "@babel/core": "^7.12.0"
37
37
  }
@@ -65,7 +65,8 @@ export const applyComponentFromContext = (element, parent, options) => {
65
65
  const { extend } = element
66
66
  const execExtend = exec(extend, element)
67
67
  if (isString(execExtend)) {
68
- if (components[execExtend]) element.extend = components[execExtend]
68
+ const componentExists = components[execExtend] || components['smbls.' + execExtend]
69
+ if (componentExists) element.extend = componentExists
69
70
  else {
70
71
  if ((ENV === 'test' || ENV === 'development') && options.verbose) {
71
72
  console.warn(execExtend, 'is not in library', components, element)
@@ -93,8 +93,9 @@ export const cloneAndMergeArrayExtend = stack => {
93
93
  export const fallbackStringExtend = (extend, context, options = {}) => {
94
94
  const COMPONENTS = (context && context.components) || options.components
95
95
  if (isString(extend)) {
96
- if (COMPONENTS && COMPONENTS[extend]) {
97
- return COMPONENTS[extend]
96
+ const componentExists = COMPONENTS[extend] || COMPONENTS['smbls.' + extend]
97
+ if (COMPONENTS && componentExists) {
98
+ return componentExists
98
99
  } else {
99
100
  if (ENV !== 'test' || ENV !== 'development') {
100
101
  console.warn('Extend is string but component was not found:', extend)