@vve/create-react-context 9.0.0-alpha.1 → 9.0.0-alpha.10
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/index.js +83 -149
- package/lib/index.js.map +1 -0
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -1,192 +1,126 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
|
|
8
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
|
|
10
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
11
|
-
|
|
12
1
|
import React, { Component } from 'react';
|
|
13
2
|
import PropTypes from 'prop-types';
|
|
14
3
|
import gud from 'gud';
|
|
15
4
|
import warning from 'tiny-warning';
|
|
16
|
-
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
|
17
|
-
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
5
|
+
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
|
18
6
|
|
|
7
|
+
// Inlined Object.is polyfill.1
|
|
8
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
19
9
|
function objectIs(x, y) {
|
|
20
10
|
if (x === y) {
|
|
21
11
|
return x !== 0 || 1 / x === 1 / y;
|
|
22
12
|
}
|
|
23
|
-
|
|
24
13
|
return x !== x && y !== y;
|
|
25
14
|
}
|
|
26
|
-
|
|
27
15
|
function createEventEmitter(value) {
|
|
28
16
|
var handlers = [];
|
|
29
17
|
return {
|
|
30
|
-
on
|
|
18
|
+
on(handler) {
|
|
31
19
|
handlers.push(handler);
|
|
32
20
|
},
|
|
33
|
-
off
|
|
34
|
-
handlers = handlers.filter(
|
|
35
|
-
return h !== handler;
|
|
36
|
-
});
|
|
21
|
+
off(handler) {
|
|
22
|
+
handlers = handlers.filter(h => h !== handler);
|
|
37
23
|
},
|
|
38
|
-
get
|
|
24
|
+
get() {
|
|
39
25
|
return value;
|
|
40
26
|
},
|
|
41
|
-
set
|
|
27
|
+
set(newValue, changedBits) {
|
|
42
28
|
value = newValue;
|
|
43
|
-
handlers.forEach(
|
|
44
|
-
return handler(value, changedBits);
|
|
45
|
-
});
|
|
29
|
+
handlers.forEach(handler => handler(value, changedBits));
|
|
46
30
|
}
|
|
47
31
|
};
|
|
48
32
|
}
|
|
49
|
-
|
|
50
33
|
function onlyChild(children) {
|
|
51
34
|
return Array.isArray(children) ? children[0] : children;
|
|
52
35
|
}
|
|
53
|
-
|
|
54
36
|
export default function createReactContext(defaultValue, calculateChangedBits) {
|
|
55
37
|
var contextProp = '__create-react-context-' + gud() + '__';
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var _super = _createSuper(Provider);
|
|
61
|
-
|
|
62
|
-
function Provider(props, context) {
|
|
63
|
-
var _this;
|
|
64
|
-
|
|
65
|
-
_classCallCheck(this, Provider);
|
|
66
|
-
|
|
67
|
-
_this = _super.call(this, props, context);
|
|
68
|
-
_this.emitter = createEventEmitter(_this.props.value);
|
|
69
|
-
return _this;
|
|
38
|
+
class Provider extends Component {
|
|
39
|
+
constructor(props, context) {
|
|
40
|
+
super(props, context);
|
|
41
|
+
this.emitter = createEventEmitter(this.props.value);
|
|
70
42
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if (
|
|
86
|
-
changedBits
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
warning((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: ' + changedBits);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
changedBits |= 0;
|
|
95
|
-
|
|
96
|
-
if (changedBits !== 0) {
|
|
97
|
-
this.emitter.set(nextProps.value, changedBits);
|
|
98
|
-
}
|
|
43
|
+
getChildContext() {
|
|
44
|
+
return {
|
|
45
|
+
[contextProp]: this.emitter
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
49
|
+
if (this.props.value !== nextProps.value) {
|
|
50
|
+
var oldValue = this.props.value;
|
|
51
|
+
var newValue = nextProps.value;
|
|
52
|
+
var changedBits = 0;
|
|
53
|
+
if (objectIs(oldValue, newValue)) {
|
|
54
|
+
changedBits = 0; // No change
|
|
55
|
+
} else {
|
|
56
|
+
changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
|
|
57
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
58
|
+
warning((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: ' + changedBits);
|
|
59
|
+
}
|
|
60
|
+
changedBits |= 0;
|
|
61
|
+
if (changedBits !== 0) {
|
|
62
|
+
this.emitter.set(nextProps.value, changedBits);
|
|
99
63
|
}
|
|
100
64
|
}
|
|
101
65
|
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
_inherits(Consumer, _Component2);
|
|
116
|
-
|
|
117
|
-
var _super2 = _createSuper(Consumer);
|
|
118
|
-
|
|
119
|
-
function Consumer(props, context) {
|
|
120
|
-
var _this2;
|
|
121
|
-
|
|
122
|
-
_classCallCheck(this, Consumer);
|
|
123
|
-
|
|
124
|
-
_this2 = _super2.call(this, props, context);
|
|
125
|
-
_this2.state = {
|
|
126
|
-
value: _this2.getValue()
|
|
66
|
+
}
|
|
67
|
+
render() {
|
|
68
|
+
return this.props.children;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
Provider.childContextTypes = {
|
|
72
|
+
[contextProp]: PropTypes.object.isRequired
|
|
73
|
+
};
|
|
74
|
+
class Consumer extends Component {
|
|
75
|
+
constructor(props, context) {
|
|
76
|
+
super(props, context);
|
|
77
|
+
this.state = {
|
|
78
|
+
value: this.getValue()
|
|
127
79
|
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
var observedBits = _this2.observedBits | 0;
|
|
132
|
-
|
|
80
|
+
this.observedBits = 0;
|
|
81
|
+
this.onUpdate = (newValue, changedBits) => {
|
|
82
|
+
var observedBits = this.observedBits | 0;
|
|
133
83
|
if ((observedBits & changedBits) !== 0) {
|
|
134
|
-
|
|
135
|
-
value:
|
|
84
|
+
this.setState({
|
|
85
|
+
value: this.getValue()
|
|
136
86
|
});
|
|
137
87
|
}
|
|
138
88
|
};
|
|
139
|
-
|
|
140
|
-
return _this2;
|
|
141
89
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
value: function componentDidMount() {
|
|
146
|
-
if (this.context[contextProp]) {
|
|
147
|
-
this.context[contextProp].on(this.onUpdate);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
var observedBits = this.props.observedBits;
|
|
151
|
-
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default
|
|
152
|
-
: observedBits;
|
|
153
|
-
}
|
|
154
|
-
}, {
|
|
155
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
156
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
157
|
-
var observedBits = nextProps.observedBits;
|
|
158
|
-
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default
|
|
159
|
-
: observedBits;
|
|
90
|
+
componentDidMount() {
|
|
91
|
+
if (this.context[contextProp]) {
|
|
92
|
+
this.context[contextProp].on(this.onUpdate);
|
|
160
93
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
return defaultValue;
|
|
94
|
+
var observedBits = this.props.observedBits;
|
|
95
|
+
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default
|
|
96
|
+
: observedBits;
|
|
97
|
+
}
|
|
98
|
+
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
99
|
+
var observedBits = nextProps.observedBits;
|
|
100
|
+
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default
|
|
101
|
+
: observedBits;
|
|
102
|
+
}
|
|
103
|
+
componentWillUnmount() {
|
|
104
|
+
if (this.context[contextProp]) {
|
|
105
|
+
this.context[contextProp].off(this.onUpdate);
|
|
176
106
|
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
return
|
|
107
|
+
}
|
|
108
|
+
getValue() {
|
|
109
|
+
if (this.context[contextProp]) {
|
|
110
|
+
return this.context[contextProp].get();
|
|
181
111
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
112
|
+
return defaultValue;
|
|
113
|
+
}
|
|
114
|
+
render() {
|
|
115
|
+
return onlyChild(this.props.children)(this.state.value);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
Consumer.contextTypes = {
|
|
119
|
+
[contextProp]: PropTypes.object
|
|
120
|
+
};
|
|
188
121
|
return {
|
|
189
|
-
Provider
|
|
190
|
-
Consumer
|
|
122
|
+
Provider,
|
|
123
|
+
Consumer
|
|
191
124
|
};
|
|
192
|
-
}
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","Component","PropTypes","gud","warning","MAX_SIGNED_31_BIT_INT","objectIs","x","y","createEventEmitter","value","handlers","on","handler","push","off","filter","h","get","set","newValue","changedBits","forEach","onlyChild","children","Array","isArray","createReactContext","defaultValue","calculateChangedBits","contextProp","Provider","constructor","props","context","emitter","getChildContext","UNSAFE_componentWillReceiveProps","nextProps","oldValue","process","env","NODE_ENV","render","childContextTypes","object","isRequired","Consumer","state","getValue","observedBits","onUpdate","setState","componentDidMount","undefined","componentWillUnmount","contextTypes"],"sources":["../index.js"],"sourcesContent":["import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport gud from 'gud';\nimport warning from 'tiny-warning';\n\nconst MAX_SIGNED_31_BIT_INT = 1073741823;\n\n// Inlined Object.is polyfill.1\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction objectIs(x, y) {\n if (x === y) {\n return x !== 0 || 1 / x === 1 / y;\n }\n return x !== x && y !== y;\n}\n\nfunction createEventEmitter(value) {\n let handlers = [];\n return {\n on(handler) {\n handlers.push(handler);\n },\n\n off(handler) {\n handlers = handlers.filter(h => h !== handler);\n },\n\n get() {\n return value;\n },\n\n set(newValue, changedBits) {\n value = newValue;\n handlers.forEach(handler => handler(value, changedBits));\n },\n };\n}\n\nfunction onlyChild(children) {\n return Array.isArray(children) ? children[0] : children;\n}\n\nexport default function createReactContext(defaultValue, calculateChangedBits) {\n const contextProp = '__create-react-context-' + gud() + '__';\n\n class Provider extends Component {\n constructor(props, context) {\n super(props, context);\n this.emitter = createEventEmitter(this.props.value);\n }\n\n getChildContext() {\n return {\n [contextProp]: this.emitter,\n };\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n if (this.props.value !== nextProps.value) {\n const oldValue = this.props.value;\n const newValue = nextProps.value;\n let changedBits = 0;\n\n if (objectIs(oldValue, newValue)) {\n changedBits = 0; // No change\n } else {\n changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;\n if (process.env.NODE_ENV !== 'production') {\n warning(\n (changedBits & MAX_SIGNED_31_BIT_INT) === changedBits,\n 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: ' + changedBits,\n );\n }\n\n changedBits |= 0;\n\n if (changedBits !== 0) {\n this.emitter.set(nextProps.value, changedBits);\n }\n }\n }\n }\n\n render() {\n return this.props.children;\n }\n }\n\n Provider.childContextTypes = {\n [contextProp]: PropTypes.object.isRequired,\n };\n\n class Consumer extends Component {\n constructor(props, context) {\n super(props, context);\n this.state = {\n value: this.getValue(),\n };\n this.observedBits = 0;\n this.onUpdate = (newValue, changedBits) => {\n const observedBits = this.observedBits | 0;\n if ((observedBits & changedBits) !== 0) {\n this.setState({ value: this.getValue() });\n }\n };\n }\n\n componentDidMount() {\n if (this.context[contextProp]) {\n this.context[contextProp].on(this.onUpdate);\n }\n const { observedBits } = this.props;\n this.observedBits =\n observedBits === undefined || observedBits === null\n ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default\n : observedBits;\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const { observedBits } = nextProps;\n this.observedBits =\n observedBits === undefined || observedBits === null\n ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default\n : observedBits;\n }\n\n componentWillUnmount() {\n if (this.context[contextProp]) {\n this.context[contextProp].off(this.onUpdate);\n }\n }\n\n getValue() {\n if (this.context[contextProp]) {\n return this.context[contextProp].get();\n }\n return defaultValue;\n }\n\n render() {\n return onlyChild(this.props.children)(this.state.value);\n }\n }\n\n Consumer.contextTypes = {\n [contextProp]: PropTypes.object,\n };\n\n return {\n Provider,\n Consumer,\n };\n}\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,GAAG,MAAM,KAAK;AACrB,OAAOC,OAAO,MAAM,cAAc;AAElC,IAAMC,qBAAqB,GAAG,UAAU;;AAExC;AACA;AACA,SAASC,QAAQA,CAACC,CAAC,EAAEC,CAAC,EAAE;EACtB,IAAID,CAAC,KAAKC,CAAC,EAAE;IACX,OAAOD,CAAC,KAAK,CAAC,IAAI,CAAC,GAAGA,CAAC,KAAK,CAAC,GAAGC,CAAC;EACnC;EACA,OAAOD,CAAC,KAAKA,CAAC,IAAIC,CAAC,KAAKA,CAAC;AAC3B;AAEA,SAASC,kBAAkBA,CAACC,KAAK,EAAE;EACjC,IAAIC,QAAQ,GAAG,EAAE;EACjB,OAAO;IACLC,EAAEA,CAACC,OAAO,EAAE;MACVF,QAAQ,CAACG,IAAI,CAACD,OAAO,CAAC;IACxB,CAAC;IAEDE,GAAGA,CAACF,OAAO,EAAE;MACXF,QAAQ,GAAGA,QAAQ,CAACK,MAAM,CAACC,CAAC,IAAIA,CAAC,KAAKJ,OAAO,CAAC;IAChD,CAAC;IAEDK,GAAGA,CAAA,EAAG;MACJ,OAAOR,KA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.
|
|
3
|
+
"version": "9.0.0-alpha.10",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"gud": "^1.0.0",
|
|
6
6
|
"tiny-warning": "^1.0.2"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"main": "lib/index.js",
|
|
22
22
|
"gitHead": "f34305f0d8a335e0953d3a5df8a32a8d5507a6f0",
|
|
23
23
|
"scripts": {
|
|
24
|
-
"build": "
|
|
24
|
+
"build": "lecp",
|
|
25
25
|
"lint": "eslint src"
|
|
26
26
|
}
|
|
27
27
|
}
|