@semcore/core 16.0.0-prerelease.6 → 16.0.0-prerelease.9
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/lib/LastInteractionType.mjs +16 -14
- package/lib/core-types/Component.mjs +22 -25
- package/lib/core-types/symbols.mjs +20 -10
- package/lib/coreFactory.mjs +154 -173
- package/lib/enhancement/Children.mjs +30 -45
- package/lib/enhancement/Root.mjs +22 -32
- package/lib/enhancement/bindHandler.mjs +10 -9
- package/lib/enhancement/dataName.mjs +4 -3
- package/lib/enhancement/enhance.mjs +4 -3
- package/lib/enhancement/functionDefaultProps.mjs +5 -5
- package/lib/enhancement/hoistProps.mjs +18 -28
- package/lib/enhancement/i18n.mjs +6 -6
- package/lib/enhancement/inheritedName.mjs +3 -2
- package/lib/enhancement/staticChildren.mjs +32 -35
- package/lib/enhancement/style.mjs +13 -14
- package/lib/enhancement/uncontrolledProps.mjs +21 -37
- package/lib/esm/LastInteractionType.mjs +51 -0
- package/lib/esm/core-types/Component.mjs +51 -0
- package/lib/esm/core-types/symbols.mjs +20 -0
- package/lib/esm/coreFactory.mjs +324 -0
- package/lib/esm/enhancement/Children.mjs +96 -0
- package/lib/esm/enhancement/Root.mjs +60 -0
- package/lib/esm/enhancement/bindHandler.mjs +48 -0
- package/lib/esm/enhancement/dataName.mjs +13 -0
- package/lib/esm/enhancement/enhance.mjs +16 -0
- package/lib/esm/enhancement/functionDefaultProps.mjs +29 -0
- package/lib/esm/enhancement/hoistProps.mjs +78 -0
- package/lib/esm/enhancement/i18n.mjs +20 -0
- package/lib/esm/enhancement/inheritedName.mjs +16 -0
- package/lib/esm/enhancement/staticChildren.mjs +120 -0
- package/lib/esm/enhancement/style.mjs +50 -0
- package/lib/esm/enhancement/uncontrolledProps.mjs +107 -0
- package/lib/esm/index.mjs +23 -0
- package/lib/esm/register.mjs +31 -0
- package/lib/esm/styled/reshadow-core.mjs +18 -0
- package/lib/esm/styled/sstyled.mjs +121 -0
- package/lib/esm/utils/assignProps.mjs +76 -0
- package/lib/esm/utils/canUseDOM.mjs +6 -0
- package/lib/esm/utils/capitalizeFirstLetter.mjs +6 -0
- package/lib/esm/utils/enhances/WithI18n.mjs +54 -0
- package/lib/esm/utils/logger.mjs +35 -0
- package/lib/esm/utils/pick.mjs +15 -0
- package/lib/esm/utils/ref.mjs +43 -0
- package/lib/esm/utils/use/useEnhancedEffect.mjs +6 -0
- package/lib/index.mjs +22 -8
- package/lib/register.mjs +10 -8
- package/lib/styled/reshadow-core.mjs +8 -233
- package/lib/styled/sstyled.mjs +38 -59
- package/lib/theme/light.json +1 -1
- package/lib/theme/themes/auto.css +1 -1
- package/lib/theme/themes/default.cjs +1 -1
- package/lib/theme/themes/default.cjs.map +1 -1
- package/lib/theme/themes/default.css +1 -1
- package/lib/theme/themes/default.mjs +1 -1
- package/lib/theme/themes/default.mjs.map +1 -1
- package/lib/theme/themes/light.cjs +1 -1
- package/lib/theme/themes/light.cjs.map +1 -1
- package/lib/theme/themes/light.css +1 -1
- package/lib/theme/themes/light.mjs +1 -1
- package/lib/theme/themes/light.mjs.map +1 -1
- package/lib/utils/assignProps.mjs +25 -33
- package/lib/utils/canUseDOM.mjs +5 -3
- package/lib/utils/capitalizeFirstLetter.mjs +4 -2
- package/lib/utils/enhances/WithI18n.mjs +22 -51
- package/lib/utils/logger.mjs +16 -13
- package/lib/utils/pick.mjs +4 -2
- package/lib/utils/ref.mjs +19 -59
- package/lib/utils/use/useEnhancedEffect.mjs +4 -3
- package/package.json +2 -2
- package/vite.config.ts +8 -0
|
@@ -2,22 +2,22 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import canUseDOM from "./utils/canUseDOM.mjs";
|
|
5
|
-
var LastInteractionType =
|
|
6
|
-
function
|
|
7
|
-
_classCallCheck(this,
|
|
8
|
-
_defineProperty(this, "lastFocusSource",
|
|
5
|
+
var LastInteractionType = /* @__PURE__ */ function() {
|
|
6
|
+
function LastInteractionType2() {
|
|
7
|
+
_classCallCheck(this, LastInteractionType2);
|
|
8
|
+
_defineProperty(this, "lastFocusSource", "none");
|
|
9
9
|
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
10
10
|
this.handleMouseDown = this.handleMouseDown.bind(this);
|
|
11
11
|
if (canUseDOM()) {
|
|
12
|
-
document.addEventListener(
|
|
12
|
+
document.addEventListener("mousedown", this.handleMouseDown, {
|
|
13
13
|
capture: true
|
|
14
14
|
});
|
|
15
|
-
document.addEventListener(
|
|
15
|
+
document.addEventListener("keydown", this.handleKeyDown, {
|
|
16
16
|
capture: true
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
_createClass(
|
|
20
|
+
_createClass(LastInteractionType2, [{
|
|
21
21
|
key: "type",
|
|
22
22
|
get: function get() {
|
|
23
23
|
return this.lastFocusSource;
|
|
@@ -25,25 +25,27 @@ var LastInteractionType = /*#__PURE__*/function () {
|
|
|
25
25
|
}, {
|
|
26
26
|
key: "isKeyboard",
|
|
27
27
|
value: function isKeyboard() {
|
|
28
|
-
return this.lastFocusSource ===
|
|
28
|
+
return this.lastFocusSource === "keyboard";
|
|
29
29
|
}
|
|
30
30
|
}, {
|
|
31
31
|
key: "isMouse",
|
|
32
32
|
value: function isMouse() {
|
|
33
|
-
return this.lastFocusSource ===
|
|
33
|
+
return this.lastFocusSource === "mouse";
|
|
34
34
|
}
|
|
35
35
|
}, {
|
|
36
36
|
key: "handleMouseDown",
|
|
37
37
|
value: function handleMouseDown() {
|
|
38
|
-
this.lastFocusSource =
|
|
38
|
+
this.lastFocusSource = "mouse";
|
|
39
39
|
}
|
|
40
40
|
}, {
|
|
41
41
|
key: "handleKeyDown",
|
|
42
42
|
value: function handleKeyDown() {
|
|
43
|
-
this.lastFocusSource =
|
|
43
|
+
this.lastFocusSource = "keyboard";
|
|
44
44
|
}
|
|
45
45
|
}]);
|
|
46
|
-
return
|
|
46
|
+
return LastInteractionType2;
|
|
47
47
|
}();
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
var lastInteraction = new LastInteractionType();
|
|
49
|
+
export {
|
|
50
|
+
lastInteraction
|
|
51
|
+
};
|
|
@@ -4,30 +4,23 @@ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitial
|
|
|
4
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
5
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
import { PureComponent } from
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export { Root };
|
|
14
|
-
|
|
15
|
-
/** @deprecated */
|
|
16
|
-
var RootComponent = /*#__PURE__*/function (_PureComponent) {
|
|
17
|
-
_inherits(RootComponent, _PureComponent);
|
|
18
|
-
var _super = _createSuper(RootComponent);
|
|
19
|
-
function RootComponent() {
|
|
7
|
+
import { PureComponent } from "react";
|
|
8
|
+
var Root = void 0;
|
|
9
|
+
var RootComponent = /* @__PURE__ */ function(_PureComponent) {
|
|
10
|
+
_inherits(RootComponent2, _PureComponent);
|
|
11
|
+
var _super = _createSuper(RootComponent2);
|
|
12
|
+
function RootComponent2() {
|
|
20
13
|
var _this;
|
|
21
14
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
22
15
|
args[_key] = arguments[_key];
|
|
23
16
|
}
|
|
24
|
-
_classCallCheck(this,
|
|
17
|
+
_classCallCheck(this, RootComponent2);
|
|
25
18
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
26
|
-
_defineProperty(_assertThisInitialized(_this), "Root",
|
|
19
|
+
_defineProperty(_assertThisInitialized(_this), "Root", void 0);
|
|
27
20
|
_defineProperty(_assertThisInitialized(_this), "isControlled", false);
|
|
28
21
|
return _this;
|
|
29
22
|
}
|
|
30
|
-
_createClass(
|
|
23
|
+
_createClass(RootComponent2, [{
|
|
31
24
|
key: "handlers",
|
|
32
25
|
get: function get() {
|
|
33
26
|
return {};
|
|
@@ -38,17 +31,21 @@ var RootComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
38
31
|
return {};
|
|
39
32
|
}
|
|
40
33
|
}]);
|
|
41
|
-
return
|
|
34
|
+
return RootComponent2;
|
|
42
35
|
}(PureComponent);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
export var Intergalactic;
|
|
47
|
-
(function (_Intergalactic) {
|
|
36
|
+
var Component = RootComponent;
|
|
37
|
+
var Intergalactic;
|
|
38
|
+
(function(_Intergalactic) {
|
|
48
39
|
var InternalTypings;
|
|
49
|
-
(function
|
|
40
|
+
/* @__PURE__ */ (function(_InternalTypings) {
|
|
41
|
+
})(InternalTypings || (InternalTypings = _Intergalactic.InternalTypings || (_Intergalactic.InternalTypings = {})));
|
|
50
42
|
})(Intergalactic || (Intergalactic = {}));
|
|
51
|
-
|
|
43
|
+
var wrapIntergalacticComponent = function wrapIntergalacticComponent2(wrapper) {
|
|
52
44
|
return wrapper;
|
|
53
45
|
};
|
|
54
|
-
|
|
46
|
+
export {
|
|
47
|
+
Component,
|
|
48
|
+
Intergalactic,
|
|
49
|
+
Root,
|
|
50
|
+
wrapIntergalacticComponent
|
|
51
|
+
};
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
var CORE_COMPONENT = Symbol("CORE_COMPONENT");
|
|
2
|
+
var CORE_INSTANCE = Symbol("CORE_INSTANCE");
|
|
3
|
+
var CORE_AS_PROPS = Symbol("CORE_AS_PROPS");
|
|
4
|
+
var CORE_INIT = Symbol("CORE_INIT");
|
|
5
|
+
var CONTEXT_COMPONENT = Symbol("CONTEXT_COMPONENT");
|
|
6
|
+
var CREATE_COMPONENT = Symbol("CREATE_COMPONENT");
|
|
7
|
+
var PARENT_COMPONENTS = Symbol("PARENT_COMPONENTS");
|
|
8
|
+
var CHILDREN_COMPONENT = Symbol("CHILDREN_COMPONENT");
|
|
9
|
+
var INHERITED_NAME = Symbol("INHERITED_NAME");
|
|
10
|
+
export {
|
|
11
|
+
CHILDREN_COMPONENT,
|
|
12
|
+
CONTEXT_COMPONENT,
|
|
13
|
+
CORE_AS_PROPS,
|
|
14
|
+
CORE_COMPONENT,
|
|
15
|
+
CORE_INIT,
|
|
16
|
+
CORE_INSTANCE,
|
|
17
|
+
CREATE_COMPONENT,
|
|
18
|
+
INHERITED_NAME,
|
|
19
|
+
PARENT_COMPONENTS
|
|
20
|
+
};
|