@okam/next-component 0.2.0 → 0.4.0
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/index.esm.js +30 -26
- package/package.json +13 -2
- package/src/lib/hello-server.d.ts +0 -1
- package/src/lib/next-component.d.ts +0 -4
- package/src/server.d.ts +0 -1
package/index.esm.js
CHANGED
|
@@ -34,7 +34,7 @@ function requireReact_production_min () {
|
|
|
34
34
|
}
|
|
35
35
|
var l = Symbol.for("react.element"), n = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), u = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), x = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), z = Symbol.iterator;
|
|
36
36
|
function A(a) {
|
|
37
|
-
if (null === a || "object" !== typeof a) return null;
|
|
37
|
+
if (null === a || "object" !== (typeof a === "undefined" ? "undefined" : _type_of(a))) return null;
|
|
38
38
|
a = z && a[z] || a["@@iterator"];
|
|
39
39
|
return "function" === typeof a ? a : null;
|
|
40
40
|
}
|
|
@@ -54,7 +54,7 @@ function requireReact_production_min () {
|
|
|
54
54
|
}
|
|
55
55
|
E.prototype.isReactComponent = {};
|
|
56
56
|
E.prototype.setState = function(a, b) {
|
|
57
|
-
if ("object" !== typeof a && "function" !== typeof a && null != a) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
57
|
+
if ("object" !== (typeof a === "undefined" ? "undefined" : _type_of(a)) && "function" !== typeof a && null != a) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
58
58
|
this.updater.enqueueSetState(this, a, b, "setState");
|
|
59
59
|
};
|
|
60
60
|
E.prototype.forceUpdate = function(a) {
|
|
@@ -110,7 +110,7 @@ function requireReact_production_min () {
|
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
function O(a) {
|
|
113
|
-
return "object" === typeof a && null !== a && a.$$typeof === l;
|
|
113
|
+
return "object" === (typeof a === "undefined" ? "undefined" : _type_of(a)) && null !== a && a.$$typeof === l;
|
|
114
114
|
}
|
|
115
115
|
function escape(a) {
|
|
116
116
|
var b = {
|
|
@@ -123,7 +123,7 @@ function requireReact_production_min () {
|
|
|
123
123
|
}
|
|
124
124
|
var P = /\/+/g;
|
|
125
125
|
function Q(a, b) {
|
|
126
|
-
return "object" === typeof a && null !== a && null != a.key ? escape("" + a.key) : b.toString(36);
|
|
126
|
+
return "object" === (typeof a === "undefined" ? "undefined" : _type_of(a)) && null !== a && null != a.key ? escape("" + a.key) : b.toString(36);
|
|
127
127
|
}
|
|
128
128
|
function R(a, b, e, d, c) {
|
|
129
129
|
var k = typeof a === "undefined" ? "undefined" : _type_of(a);
|
|
@@ -414,7 +414,7 @@ function requireReact_development () {
|
|
|
414
414
|
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
415
415
|
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
416
416
|
function getIteratorFn(maybeIterable) {
|
|
417
|
-
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
417
|
+
if (maybeIterable === null || (typeof maybeIterable === "undefined" ? "undefined" : _type_of(maybeIterable)) !== 'object') {
|
|
418
418
|
return null;
|
|
419
419
|
}
|
|
420
420
|
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
@@ -654,7 +654,7 @@ function requireReact_development () {
|
|
|
654
654
|
* @final
|
|
655
655
|
* @protected
|
|
656
656
|
*/ Component.prototype.setState = function(partialState, callback) {
|
|
657
|
-
if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {
|
|
657
|
+
if ((typeof partialState === "undefined" ? "undefined" : _type_of(partialState)) !== 'object' && typeof partialState !== 'function' && partialState != null) {
|
|
658
658
|
throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');
|
|
659
659
|
}
|
|
660
660
|
this.updater.enqueueSetState(this, partialState, callback, 'setState');
|
|
@@ -834,7 +834,7 @@ function requireReact_development () {
|
|
|
834
834
|
case REACT_SUSPENSE_LIST_TYPE:
|
|
835
835
|
return 'SuspenseList';
|
|
836
836
|
}
|
|
837
|
-
if (typeof type === 'object') {
|
|
837
|
+
if ((typeof type === "undefined" ? "undefined" : _type_of(type)) === 'object') {
|
|
838
838
|
switch(type.$$typeof){
|
|
839
839
|
case REACT_CONTEXT_TYPE:
|
|
840
840
|
var context = type;
|
|
@@ -1140,7 +1140,7 @@ function requireReact_development () {
|
|
|
1140
1140
|
* @return {boolean} True if `object` is a ReactElement.
|
|
1141
1141
|
* @final
|
|
1142
1142
|
*/ function isValidElement(object) {
|
|
1143
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1143
|
+
return (typeof object === "undefined" ? "undefined" : _type_of(object)) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1144
1144
|
}
|
|
1145
1145
|
var SEPARATOR = '.';
|
|
1146
1146
|
var SUBSEPARATOR = ':';
|
|
@@ -1177,7 +1177,7 @@ function requireReact_development () {
|
|
|
1177
1177
|
*/ function getElementKey(element, index) {
|
|
1178
1178
|
// Do some typechecking here since we call this blindly. We want to ensure
|
|
1179
1179
|
// that we don't block potential future ES APIs.
|
|
1180
|
-
if (typeof element === 'object' && element !== null && element.key != null) {
|
|
1180
|
+
if ((typeof element === "undefined" ? "undefined" : _type_of(element)) === 'object' && element !== null && element.key != null) {
|
|
1181
1181
|
// Explicit key
|
|
1182
1182
|
{
|
|
1183
1183
|
checkKeyStringCoercion(element.key);
|
|
@@ -1623,7 +1623,7 @@ function requireReact_development () {
|
|
|
1623
1623
|
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
1624
1624
|
return true;
|
|
1625
1625
|
}
|
|
1626
|
-
if (typeof type === 'object' && type !== null) {
|
|
1626
|
+
if ((typeof type === "undefined" ? "undefined" : _type_of(type)) === 'object' && type !== null) {
|
|
1627
1627
|
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
1628
1628
|
// types supported by any Flight configuration anywhere since
|
|
1629
1629
|
// we don't know which Flight build this will end up being used
|
|
@@ -1893,7 +1893,7 @@ function requireReact_development () {
|
|
|
1893
1893
|
throw Error();
|
|
1894
1894
|
}
|
|
1895
1895
|
});
|
|
1896
|
-
if (typeof Reflect === 'object' && Reflect.construct) {
|
|
1896
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _type_of(Reflect)) === 'object' && Reflect.construct) {
|
|
1897
1897
|
// We construct a different control for this case to include any extra
|
|
1898
1898
|
// frames added by the construct call.
|
|
1899
1899
|
try {
|
|
@@ -2015,7 +2015,7 @@ function requireReact_development () {
|
|
|
2015
2015
|
case REACT_SUSPENSE_LIST_TYPE:
|
|
2016
2016
|
return describeBuiltInComponentFrame('SuspenseList');
|
|
2017
2017
|
}
|
|
2018
|
-
if (typeof type === 'object') {
|
|
2018
|
+
if ((typeof type === "undefined" ? "undefined" : _type_of(type)) === 'object') {
|
|
2019
2019
|
switch(type.$$typeof){
|
|
2020
2020
|
case REACT_FORWARD_REF_TYPE:
|
|
2021
2021
|
return describeFunctionComponentFrame(type.render);
|
|
@@ -2183,7 +2183,7 @@ function requireReact_development () {
|
|
|
2183
2183
|
* @param {ReactNode} node Statically passed child of any type.
|
|
2184
2184
|
* @param {*} parentType node's parent's type.
|
|
2185
2185
|
*/ function validateChildKeys(node, parentType) {
|
|
2186
|
-
if (typeof node !== 'object') {
|
|
2186
|
+
if ((typeof node === "undefined" ? "undefined" : _type_of(node)) !== 'object') {
|
|
2187
2187
|
return;
|
|
2188
2188
|
}
|
|
2189
2189
|
if (isArray(node)) {
|
|
@@ -2229,7 +2229,7 @@ function requireReact_development () {
|
|
|
2229
2229
|
var propTypes;
|
|
2230
2230
|
if (typeof type === 'function') {
|
|
2231
2231
|
propTypes = type.propTypes;
|
|
2232
|
-
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
2232
|
+
} else if ((typeof type === "undefined" ? "undefined" : _type_of(type)) === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
2233
2233
|
// Inner props are checked in the reconciler.
|
|
2234
2234
|
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
2235
2235
|
propTypes = type.propTypes;
|
|
@@ -2277,7 +2277,7 @@ function requireReact_development () {
|
|
|
2277
2277
|
// succeed and there will likely be errors in render.
|
|
2278
2278
|
if (!validType) {
|
|
2279
2279
|
var info = '';
|
|
2280
|
-
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
2280
|
+
if (type === undefined || (typeof type === "undefined" ? "undefined" : _type_of(type)) === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
2281
2281
|
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
|
|
2282
2282
|
}
|
|
2283
2283
|
var sourceInfo = getSourceInfoErrorAddendumForProps(props);
|
|
@@ -2443,7 +2443,7 @@ function requireReact_development () {
|
|
|
2443
2443
|
} finally{
|
|
2444
2444
|
ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
|
|
2445
2445
|
}
|
|
2446
|
-
if (result !== null && typeof result === 'object' && typeof result.then === 'function') {
|
|
2446
|
+
if (result !== null && (typeof result === "undefined" ? "undefined" : _type_of(result)) === 'object' && typeof result.then === 'function') {
|
|
2447
2447
|
var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait
|
|
2448
2448
|
// for it to resolve before exiting the current scope.
|
|
2449
2449
|
var wasAwaited = false;
|
|
@@ -2737,7 +2737,7 @@ function requireReactJsxRuntime_development () {
|
|
|
2737
2737
|
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
2738
2738
|
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
2739
2739
|
function getIteratorFn(maybeIterable) {
|
|
2740
|
-
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
2740
|
+
if (maybeIterable === null || (typeof maybeIterable === "undefined" ? "undefined" : _type_of(maybeIterable)) !== 'object') {
|
|
2741
2741
|
return null;
|
|
2742
2742
|
}
|
|
2743
2743
|
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
@@ -2797,7 +2797,7 @@ function requireReactJsxRuntime_development () {
|
|
|
2797
2797
|
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
2798
2798
|
return true;
|
|
2799
2799
|
}
|
|
2800
|
-
if (typeof type === 'object' && type !== null) {
|
|
2800
|
+
if ((typeof type === "undefined" ? "undefined" : _type_of(type)) === 'object' && type !== null) {
|
|
2801
2801
|
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
2802
2802
|
// types supported by any Flight configuration anywhere since
|
|
2803
2803
|
// we don't know which Flight build this will end up being used
|
|
@@ -2849,7 +2849,7 @@ function requireReactJsxRuntime_development () {
|
|
|
2849
2849
|
case REACT_SUSPENSE_LIST_TYPE:
|
|
2850
2850
|
return 'SuspenseList';
|
|
2851
2851
|
}
|
|
2852
|
-
if (typeof type === 'object') {
|
|
2852
|
+
if ((typeof type === "undefined" ? "undefined" : _type_of(type)) === 'object') {
|
|
2853
2853
|
switch(type.$$typeof){
|
|
2854
2854
|
case REACT_CONTEXT_TYPE:
|
|
2855
2855
|
var context = type;
|
|
@@ -3020,7 +3020,7 @@ function requireReactJsxRuntime_development () {
|
|
|
3020
3020
|
throw Error();
|
|
3021
3021
|
}
|
|
3022
3022
|
});
|
|
3023
|
-
if (typeof Reflect === 'object' && Reflect.construct) {
|
|
3023
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _type_of(Reflect)) === 'object' && Reflect.construct) {
|
|
3024
3024
|
// We construct a different control for this case to include any extra
|
|
3025
3025
|
// frames added by the construct call.
|
|
3026
3026
|
try {
|
|
@@ -3142,7 +3142,7 @@ function requireReactJsxRuntime_development () {
|
|
|
3142
3142
|
case REACT_SUSPENSE_LIST_TYPE:
|
|
3143
3143
|
return describeBuiltInComponentFrame('SuspenseList');
|
|
3144
3144
|
}
|
|
3145
|
-
if (typeof type === 'object') {
|
|
3145
|
+
if ((typeof type === "undefined" ? "undefined" : _type_of(type)) === 'object') {
|
|
3146
3146
|
switch(type.$$typeof){
|
|
3147
3147
|
case REACT_FORWARD_REF_TYPE:
|
|
3148
3148
|
return describeFunctionComponentFrame(type.render);
|
|
@@ -3505,7 +3505,7 @@ function requireReactJsxRuntime_development () {
|
|
|
3505
3505
|
* @final
|
|
3506
3506
|
*/ function isValidElement(object) {
|
|
3507
3507
|
{
|
|
3508
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
3508
|
+
return (typeof object === "undefined" ? "undefined" : _type_of(object)) === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
3509
3509
|
}
|
|
3510
3510
|
}
|
|
3511
3511
|
function getDeclarationErrorAddendum() {
|
|
@@ -3584,7 +3584,7 @@ function requireReactJsxRuntime_development () {
|
|
|
3584
3584
|
* @param {*} parentType node's parent's type.
|
|
3585
3585
|
*/ function validateChildKeys(node, parentType) {
|
|
3586
3586
|
{
|
|
3587
|
-
if (typeof node !== 'object') {
|
|
3587
|
+
if ((typeof node === "undefined" ? "undefined" : _type_of(node)) !== 'object') {
|
|
3588
3588
|
return;
|
|
3589
3589
|
}
|
|
3590
3590
|
if (isArray(node)) {
|
|
@@ -3631,7 +3631,7 @@ function requireReactJsxRuntime_development () {
|
|
|
3631
3631
|
var propTypes;
|
|
3632
3632
|
if (typeof type === 'function') {
|
|
3633
3633
|
propTypes = type.propTypes;
|
|
3634
|
-
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
3634
|
+
} else if ((typeof type === "undefined" ? "undefined" : _type_of(type)) === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
3635
3635
|
// Inner props are checked in the reconciler.
|
|
3636
3636
|
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
3637
3637
|
propTypes = type.propTypes;
|
|
@@ -3681,7 +3681,7 @@ function requireReactJsxRuntime_development () {
|
|
|
3681
3681
|
// succeed and there will likely be errors in render.
|
|
3682
3682
|
if (!validType) {
|
|
3683
3683
|
var info = '';
|
|
3684
|
-
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
3684
|
+
if (type === undefined || (typeof type === "undefined" ? "undefined" : _type_of(type)) === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
3685
3685
|
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
|
|
3686
3686
|
}
|
|
3687
3687
|
var sourceInfo = getSourceInfoErrorAddendum();
|
|
@@ -3859,6 +3859,10 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
3859
3859
|
}
|
|
3860
3860
|
return target;
|
|
3861
3861
|
}
|
|
3862
|
+
function _type_of(obj) {
|
|
3863
|
+
"@swc/helpers - typeof";
|
|
3864
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
3865
|
+
}
|
|
3862
3866
|
var Img = function(props) {
|
|
3863
3867
|
var src = props.src, width = props.width, height = props.height, _props_themeName = props.themeName, themeName = _props_themeName === void 0 ? 'img' : _props_themeName, tokens = props.tokens, customTheme = props.customTheme, rest = _object_without_properties(props, [
|
|
3864
3868
|
"src",
|
|
@@ -3869,7 +3873,7 @@ var Img = function(props) {
|
|
|
3869
3873
|
"customTheme"
|
|
3870
3874
|
]);
|
|
3871
3875
|
var theme = useThemeContext(themeName, tokens, customTheme);
|
|
3872
|
-
if (typeof src === 'object') {
|
|
3876
|
+
if ((typeof src === "undefined" ? "undefined" : _type_of(src)) === 'object') {
|
|
3873
3877
|
var blurWidth = src.blurWidth, blurHeight = src.blurHeight, srcWidth = src.width, srcHeight = src.height, withoutBlurDimensions = _object_without_properties(src, [
|
|
3874
3878
|
"blurWidth",
|
|
3875
3879
|
"blurHeight",
|
package/package.json
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@okam/next-component",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"repository": {
|
|
8
|
+
"url": "https://github.com/OKAMca/stack.git"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@okam/stack-ui": "1.31.0",
|
|
12
|
+
"next": "^14.1.1"
|
|
13
|
+
},
|
|
4
14
|
"module": "./index.esm.js",
|
|
5
15
|
"type": "module",
|
|
6
|
-
"main": "./index.esm.js"
|
|
16
|
+
"main": "./index.esm.js",
|
|
17
|
+
"types": "./index.esm.d.ts"
|
|
7
18
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function HelloServer(): Promise<import("react/jsx-runtime").JSX.Element>;
|
package/src/server.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/hello-server';
|