@symbo.ls/fetch 3.6.1 → 3.6.3

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 (2) hide show
  1. package/dist/iife/index.js +28 -6
  2. package/package.json +2 -2
@@ -2013,6 +2013,7 @@ var SmblsFetch = (() => {
2013
2013
  // ../utils/dist/esm/props.js
2014
2014
  var RE_UPPER = /^[A-Z]/;
2015
2015
  var RE_DIGITS = /^\d+$/;
2016
+ var CSS_SELECTOR_PREFIXES = /* @__PURE__ */ new Set([":", "@", "[", "*", "+", "~", "&", ">", "$", "-", ".", "!"]);
2016
2017
  var ELEMENT_INDICATOR_KEYS = /* @__PURE__ */ new Set([
2017
2018
  "extend",
2018
2019
  "props",
@@ -2059,11 +2060,27 @@ var SmblsFetch = (() => {
2059
2060
  delete obj[key];
2060
2061
  continue;
2061
2062
  }
2062
- const hasDefine = isObject(this.define?.[key]);
2063
- const hasGlobalDefine = isObject(this.context?.define?.[key]);
2063
+ if (key === "childProps") {
2064
+ obj.props[key] = value;
2065
+ delete obj[key];
2066
+ cachedKeys.push(key);
2067
+ continue;
2068
+ }
2069
+ const defineValue = this.define?.[key];
2070
+ const globalDefineValue = this.context?.define?.[key];
2071
+ const hasDefine = isObject(defineValue) || isFunction(defineValue);
2072
+ const hasGlobalDefine = isObject(globalDefineValue) || isFunction(globalDefineValue);
2073
+ if (hasDefine || hasGlobalDefine) continue;
2074
+ const firstChar = key.charAt(0);
2075
+ if (CSS_SELECTOR_PREFIXES.has(firstChar)) {
2076
+ obj.props[key] = value;
2077
+ delete obj[key];
2078
+ cachedKeys.push(key);
2079
+ continue;
2080
+ }
2064
2081
  const isElement = RE_UPPER.test(key) || RE_DIGITS.test(key) || looksLikeElement(value);
2065
2082
  const isBuiltin = DOMQ_PROPERTIES.has(key);
2066
- if (!isElement && !isBuiltin && !hasDefine && !hasGlobalDefine) {
2083
+ if (!isElement && !isBuiltin) {
2067
2084
  obj.props[key] = value;
2068
2085
  delete obj[key];
2069
2086
  cachedKeys.push(key);
@@ -2083,8 +2100,13 @@ var SmblsFetch = (() => {
2083
2100
  continue;
2084
2101
  }
2085
2102
  if (cachedKeys.includes(key)) continue;
2086
- const hasDefine = isObject(this.define?.[key]);
2087
- const hasGlobalDefine = isObject(this.context?.define?.[key]);
2103
+ if (key === "childProps") continue;
2104
+ const firstChar = key.charAt(0);
2105
+ if (CSS_SELECTOR_PREFIXES.has(firstChar)) continue;
2106
+ const defineValue = this.define?.[key];
2107
+ const globalDefineValue = this.context?.define?.[key];
2108
+ const hasDefine = isObject(defineValue) || isFunction(defineValue);
2109
+ const hasGlobalDefine = isObject(globalDefineValue) || isFunction(globalDefineValue);
2088
2110
  const isElement = RE_UPPER.test(key) || RE_DIGITS.test(key);
2089
2111
  const isBuiltin = DOMQ_PROPERTIES.has(key);
2090
2112
  if (isElement || isBuiltin || hasDefine || hasGlobalDefine) {
@@ -2123,7 +2145,7 @@ var SmblsFetch = (() => {
2123
2145
  const parentProps = parent.props;
2124
2146
  if (!parentProps) return propsStack;
2125
2147
  const matchParentKeyProps = parentProps[element.key];
2126
- const matchParentChildProps = parentProps.childProps;
2148
+ const matchParentChildProps = parentProps.childProps || parent.childProps;
2127
2149
  const ignoreChildProps = element.props?.ignoreChildProps;
2128
2150
  if (matchParentChildProps && !ignoreChildProps) {
2129
2151
  const childProps = objectizeStringProperty(matchParentChildProps);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbo.ls/fetch",
3
- "version": "3.6.1",
3
+ "version": "3.6.3",
4
4
  "license": "MIT",
5
5
  "gitHead": "9fc1b79b41cdc725ca6b24aec64920a599634681",
6
6
  "type": "module",
@@ -28,7 +28,7 @@
28
28
  "prepublish": "npm run build && npm run copy:package:cjs"
29
29
  },
30
30
  "dependencies": {
31
- "@domql/utils": "^3.6.1"
31
+ "@domql/utils": "^3.6.3"
32
32
  },
33
33
  "browser": "./dist/esm/index.js",
34
34
  "sideEffects": false,