@semcore/core 17.0.0-prerelease.36 → 17.0.0-prerelease.37

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/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [17.0.0] - 2026-04-10
5
+ ## [17.0.0] - 2026-04-13
6
6
 
7
7
  ### BREAK
8
8
 
@@ -1,12 +1,12 @@
1
- const CORE_COMPONENT = Symbol("CORE_COMPONENT");
2
- const CORE_INSTANCE = Symbol("CORE_INSTANCE");
3
- const CORE_AS_PROPS = Symbol("CORE_AS_PROPS");
4
- const CORE_INIT = Symbol("CORE_INIT");
5
- const CONTEXT_COMPONENT = Symbol("CONTEXT_COMPONENT");
6
- const CREATE_COMPONENT = Symbol("CREATE_COMPONENT");
7
- const PARENT_COMPONENTS = Symbol("PARENT_COMPONENTS");
8
- const CHILDREN_COMPONENT = Symbol("CHILDREN_COMPONENT");
9
- const INHERITED_NAME = Symbol("INHERITED_NAME");
1
+ const CORE_COMPONENT = /* @__PURE__ */ Symbol("CORE_COMPONENT");
2
+ const CORE_INSTANCE = /* @__PURE__ */ Symbol("CORE_INSTANCE");
3
+ const CORE_AS_PROPS = /* @__PURE__ */ Symbol("CORE_AS_PROPS");
4
+ const CORE_INIT = /* @__PURE__ */ Symbol("CORE_INIT");
5
+ const CONTEXT_COMPONENT = /* @__PURE__ */ Symbol("CONTEXT_COMPONENT");
6
+ const CREATE_COMPONENT = /* @__PURE__ */ Symbol("CREATE_COMPONENT");
7
+ const PARENT_COMPONENTS = /* @__PURE__ */ Symbol("PARENT_COMPONENTS");
8
+ const CHILDREN_COMPONENT = /* @__PURE__ */ Symbol("CHILDREN_COMPONENT");
9
+ const INHERITED_NAME = /* @__PURE__ */ Symbol("INHERITED_NAME");
10
10
  export {
11
11
  CHILDREN_COMPONENT,
12
12
  CONTEXT_COMPONENT,
@@ -38,9 +38,9 @@ function createGetField(enhancements, Component2, isFunction) {
38
38
  }
39
39
  function createForwardWrapper(Component2, wrapperProps, statics, isFunction) {
40
40
  const RootComponent = Component2[ROOT_COMPONENT];
41
- const getterMethodName = getterMethodNameByDisplayName(Component2 == null ? void 0 : Component2.displayName);
42
- const getterMethod = (RootComponent == null ? void 0 : RootComponent.prototype) ? RootComponent.prototype[getterMethodName] : void 0;
43
- const useGetterIndex = (getterMethod == null ? void 0 : getterMethod.length) >= 2;
41
+ const getterMethodName = getterMethodNameByDisplayName(Component2?.displayName);
42
+ const getterMethod = RootComponent?.prototype ? RootComponent.prototype[getterMethodName] : void 0;
43
+ const useGetterIndex = getterMethod?.length >= 2;
44
44
  function WrapperForwardRefWithBind({
45
45
  forwardRef = null,
46
46
  ...other
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { CHILDREN_COMPONENT, CONTEXT_COMPONENT } from "../core-types/symbols.mjs";
3
- const CHILDREN_SELF = Symbol("CHILDREN_SELF");
3
+ const CHILDREN_SELF = /* @__PURE__ */ Symbol("CHILDREN_SELF");
4
4
  const GETTER_REG = /^get[\w]+Props$/;
5
5
  function splitPropsAndGetters(props) {
6
6
  return Object.entries(props).reduce((acc, [key, value]) => {
@@ -1,8 +1,7 @@
1
1
  function Enhancement() {
2
2
  return {
3
3
  condition: function(Component) {
4
- var _a;
5
- return Boolean((_a = Component.enhance) == null ? void 0 : _a.length);
4
+ return Boolean(Component.enhance?.length);
6
5
  },
7
6
  wrapperProps: function(props, WrapperComponent) {
8
7
  return WrapperComponent.enhance.reduce((acc, enhance) => enhance(acc), props);
@@ -26,9 +26,9 @@ function flatGetterMethodNames(childComponents, parentName) {
26
26
  return acc;
27
27
  }, []);
28
28
  }
29
- const STATIC_COMPONENT = Symbol("STATIC_COMPONENT");
30
- const ROOT_COMPONENT = Symbol("ROOT_COMPONENT");
31
- const SELF_GETTER_METHOD = Symbol("SELF_GETTER_METHOD");
29
+ const STATIC_COMPONENT = /* @__PURE__ */ Symbol("STATIC_COMPONENT");
30
+ const ROOT_COMPONENT = /* @__PURE__ */ Symbol("ROOT_COMPONENT");
31
+ const SELF_GETTER_METHOD = /* @__PURE__ */ Symbol("SELF_GETTER_METHOD");
32
32
  function Enhancement(childComponents, createComponent, options) {
33
33
  const getterMethodNames = flatGetterMethodNames(childComponents);
34
34
  return {
@@ -2,8 +2,8 @@ import React from "react";
2
2
  import { STATIC_COMPONENT } from "./staticChildren.mjs";
3
3
  import "../styled/index.mjs";
4
4
  import { sstyled } from "../styled/sstyled.mjs";
5
- const STYLES_CONTEXT = Symbol("STYLES_CONTEXT");
6
- const STYLES_SELF = Symbol("STYLES_SELF");
5
+ const STYLES_CONTEXT = /* @__PURE__ */ Symbol("STYLES_CONTEXT");
6
+ const STYLES_SELF = /* @__PURE__ */ Symbol("STYLES_SELF");
7
7
  function Enhancement(childComponents, Context) {
8
8
  return {
9
9
  condition: function(Component) {
@@ -55,7 +55,7 @@ function uncontrolledUniversal(props, config, uncontrolledProp2) {
55
55
  [propName]: value,
56
56
  [handlerName]: (eventOrValue, ...args) => {
57
57
  const result2 = [setter(eventOrValue, ...args), ...args];
58
- if (eventOrValue == null ? void 0 : eventOrValue.target) {
58
+ if (eventOrValue?.target) {
59
59
  result2.push(eventOrValue);
60
60
  }
61
61
  return handler(...result2);
@@ -1,12 +1,12 @@
1
- const CORE_COMPONENT = Symbol("CORE_COMPONENT");
2
- const CORE_INSTANCE = Symbol("CORE_INSTANCE");
3
- const CORE_AS_PROPS = Symbol("CORE_AS_PROPS");
4
- const CORE_INIT = Symbol("CORE_INIT");
5
- const CONTEXT_COMPONENT = Symbol("CONTEXT_COMPONENT");
6
- const CREATE_COMPONENT = Symbol("CREATE_COMPONENT");
7
- const PARENT_COMPONENTS = Symbol("PARENT_COMPONENTS");
8
- const CHILDREN_COMPONENT = Symbol("CHILDREN_COMPONENT");
9
- const INHERITED_NAME = Symbol("INHERITED_NAME");
1
+ const CORE_COMPONENT = /* @__PURE__ */ Symbol("CORE_COMPONENT");
2
+ const CORE_INSTANCE = /* @__PURE__ */ Symbol("CORE_INSTANCE");
3
+ const CORE_AS_PROPS = /* @__PURE__ */ Symbol("CORE_AS_PROPS");
4
+ const CORE_INIT = /* @__PURE__ */ Symbol("CORE_INIT");
5
+ const CONTEXT_COMPONENT = /* @__PURE__ */ Symbol("CONTEXT_COMPONENT");
6
+ const CREATE_COMPONENT = /* @__PURE__ */ Symbol("CREATE_COMPONENT");
7
+ const PARENT_COMPONENTS = /* @__PURE__ */ Symbol("PARENT_COMPONENTS");
8
+ const CHILDREN_COMPONENT = /* @__PURE__ */ Symbol("CHILDREN_COMPONENT");
9
+ const INHERITED_NAME = /* @__PURE__ */ Symbol("INHERITED_NAME");
10
10
  export {
11
11
  CHILDREN_COMPONENT,
12
12
  CONTEXT_COMPONENT,
@@ -38,9 +38,9 @@ function createGetField(enhancements, Component2, isFunction) {
38
38
  }
39
39
  function createForwardWrapper(Component2, wrapperProps, statics, isFunction) {
40
40
  const RootComponent = Component2[ROOT_COMPONENT];
41
- const getterMethodName = getterMethodNameByDisplayName(Component2 == null ? void 0 : Component2.displayName);
42
- const getterMethod = (RootComponent == null ? void 0 : RootComponent.prototype) ? RootComponent.prototype[getterMethodName] : void 0;
43
- const useGetterIndex = (getterMethod == null ? void 0 : getterMethod.length) >= 2;
41
+ const getterMethodName = getterMethodNameByDisplayName(Component2?.displayName);
42
+ const getterMethod = RootComponent?.prototype ? RootComponent.prototype[getterMethodName] : void 0;
43
+ const useGetterIndex = getterMethod?.length >= 2;
44
44
  function WrapperForwardRefWithBind({
45
45
  forwardRef = null,
46
46
  ...other
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { CHILDREN_COMPONENT, CONTEXT_COMPONENT } from "../core-types/symbols.mjs";
3
- const CHILDREN_SELF = Symbol("CHILDREN_SELF");
3
+ const CHILDREN_SELF = /* @__PURE__ */ Symbol("CHILDREN_SELF");
4
4
  const GETTER_REG = /^get[\w]+Props$/;
5
5
  function splitPropsAndGetters(props) {
6
6
  return Object.entries(props).reduce((acc, [key, value]) => {
@@ -1,8 +1,7 @@
1
1
  function Enhancement() {
2
2
  return {
3
3
  condition: function(Component) {
4
- var _a;
5
- return Boolean((_a = Component.enhance) == null ? void 0 : _a.length);
4
+ return Boolean(Component.enhance?.length);
6
5
  },
7
6
  wrapperProps: function(props, WrapperComponent) {
8
7
  return WrapperComponent.enhance.reduce((acc, enhance) => enhance(acc), props);
@@ -26,9 +26,9 @@ function flatGetterMethodNames(childComponents, parentName) {
26
26
  return acc;
27
27
  }, []);
28
28
  }
29
- const STATIC_COMPONENT = Symbol("STATIC_COMPONENT");
30
- const ROOT_COMPONENT = Symbol("ROOT_COMPONENT");
31
- const SELF_GETTER_METHOD = Symbol("SELF_GETTER_METHOD");
29
+ const STATIC_COMPONENT = /* @__PURE__ */ Symbol("STATIC_COMPONENT");
30
+ const ROOT_COMPONENT = /* @__PURE__ */ Symbol("ROOT_COMPONENT");
31
+ const SELF_GETTER_METHOD = /* @__PURE__ */ Symbol("SELF_GETTER_METHOD");
32
32
  function Enhancement(childComponents, createComponent, options) {
33
33
  const getterMethodNames = flatGetterMethodNames(childComponents);
34
34
  return {
@@ -2,8 +2,8 @@ import React from "react";
2
2
  import { STATIC_COMPONENT } from "./staticChildren.mjs";
3
3
  import "../styled/index.mjs";
4
4
  import { sstyled } from "../styled/sstyled.mjs";
5
- const STYLES_CONTEXT = Symbol("STYLES_CONTEXT");
6
- const STYLES_SELF = Symbol("STYLES_SELF");
5
+ const STYLES_CONTEXT = /* @__PURE__ */ Symbol("STYLES_CONTEXT");
6
+ const STYLES_SELF = /* @__PURE__ */ Symbol("STYLES_SELF");
7
7
  function Enhancement(childComponents, Context) {
8
8
  return {
9
9
  condition: function(Component) {
@@ -55,7 +55,7 @@ function uncontrolledUniversal(props, config, uncontrolledProp2) {
55
55
  [propName]: value,
56
56
  [handlerName]: (eventOrValue, ...args) => {
57
57
  const result2 = [setter(eventOrValue, ...args), ...args];
58
- if (eventOrValue == null ? void 0 : eventOrValue.target) {
58
+ if (eventOrValue?.target) {
59
59
  result2.push(eventOrValue);
60
60
  }
61
61
  return handler(...result2);
@@ -109,7 +109,7 @@ sstyled.css = function(_css) {
109
109
  sstyled.insert = insert;
110
110
  sstyled.merge = merge;
111
111
  sstyled.getStyles = getStyles;
112
- sstyled.SHADOW_STYLES = Symbol("SHADOW_STYLES");
112
+ sstyled.SHADOW_STYLES = /* @__PURE__ */ Symbol("SHADOW_STYLES");
113
113
  export {
114
114
  sstyled
115
115
  };
@@ -54,7 +54,7 @@ function assignProps(props = {}, source = {}) {
54
54
  }
55
55
  const sourceDescriptorRef = Object.getOwnPropertyDescriptor(source, "ref");
56
56
  const propsDescriptorRef = Object.getOwnPropertyDescriptor(props, "ref");
57
- if ((sourceDescriptorRef == null ? void 0 : sourceDescriptorRef.configurable) && (propsDescriptorRef == null ? void 0 : propsDescriptorRef.configurable)) {
57
+ if (sourceDescriptorRef?.configurable && propsDescriptorRef?.configurable) {
58
58
  newProps.ref = forkRef(source.ref, props.ref);
59
59
  }
60
60
  if (props.forwardRef) {
@@ -2,7 +2,7 @@ import React from "react";
2
2
  function setRef(ref, value) {
3
3
  if (typeof ref === "function") {
4
4
  ref(value);
5
- } else if (ref == null ? void 0 : ref.hasOwnProperty("current")) {
5
+ } else if (ref?.hasOwnProperty("current")) {
6
6
  ref["current"] = value;
7
7
  }
8
8
  }
@@ -109,7 +109,7 @@ sstyled.css = function(_css) {
109
109
  sstyled.insert = insert;
110
110
  sstyled.merge = merge;
111
111
  sstyled.getStyles = getStyles;
112
- sstyled.SHADOW_STYLES = Symbol("SHADOW_STYLES");
112
+ sstyled.SHADOW_STYLES = /* @__PURE__ */ Symbol("SHADOW_STYLES");
113
113
  export {
114
114
  sstyled
115
115
  };
@@ -54,7 +54,7 @@ function assignProps(props = {}, source = {}) {
54
54
  }
55
55
  const sourceDescriptorRef = Object.getOwnPropertyDescriptor(source, "ref");
56
56
  const propsDescriptorRef = Object.getOwnPropertyDescriptor(props, "ref");
57
- if ((sourceDescriptorRef == null ? void 0 : sourceDescriptorRef.configurable) && (propsDescriptorRef == null ? void 0 : propsDescriptorRef.configurable)) {
57
+ if (sourceDescriptorRef?.configurable && propsDescriptorRef?.configurable) {
58
58
  newProps.ref = forkRef(source.ref, props.ref);
59
59
  }
60
60
  if (props.forwardRef) {
package/lib/utils/ref.mjs CHANGED
@@ -2,7 +2,7 @@ import React from "react";
2
2
  function setRef(ref, value) {
3
3
  if (typeof ref === "function") {
4
4
  ref(value);
5
- } else if (ref == null ? void 0 : ref.hasOwnProperty("current")) {
5
+ } else if (ref?.hasOwnProperty("current")) {
6
6
  ref["current"] = value;
7
7
  }
8
8
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/core",
3
3
  "description": "Semrush Core Component",
4
- "version": "17.0.0-prerelease.36",
4
+ "version": "17.0.0-prerelease.37",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.mjs",
7
7
  "typings": "lib/index.d.ts",
package/vite.config.ts CHANGED
@@ -10,7 +10,6 @@ export default mergeConfig(
10
10
  entry: './src/index.ts',
11
11
  },
12
12
  rollupOptions: {
13
- treeshake: false,
14
13
  external: [
15
14
  'react',
16
15
  'react-dom',