@panneau/core 3.0.40 → 3.0.45

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/es/contexts.js CHANGED
@@ -50,11 +50,11 @@ var useComponents = function useComponents() {
50
50
  var useComponent = function useComponent(name) {
51
51
  var defaultComponent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
52
52
  var namespace = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
53
- if (!isString(name)) {
54
- return name || defaultComponent;
55
- }
56
53
  var manager = useComponentsManager(namespace);
57
54
  return useMemo(function () {
55
+ if (!isString(name)) {
56
+ return name || defaultComponent;
57
+ }
58
58
  return manager.getComponent(name) || defaultComponent;
59
59
  }, [manager, name, defaultComponent]);
60
60
  };
package/es/utils.js CHANGED
@@ -61,7 +61,6 @@ var createUseEvent = function createUseEvent(eventsManager) {
61
61
  };
62
62
  var createUseEvent$1 = createUseEvent;
63
63
 
64
- var _copyClipboardApi, _copyExecCommand, _copyToClipboard;
65
64
  /*! clipboard-copy. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
66
65
 
67
66
  // @note vendoring this: https://github.com/feross/clipboard-copy/blob/master/index.js
@@ -71,7 +70,10 @@ function makeError() {
71
70
  return new DOMException('The request is not allowed', 'NotAllowedError');
72
71
  }
73
72
  function copyClipboardApi(_x) {
74
- return (_copyClipboardApi = _copyClipboardApi || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(text) {
73
+ return _copyClipboardApi.apply(this, arguments);
74
+ }
75
+ function _copyClipboardApi() {
76
+ _copyClipboardApi = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(text) {
75
77
  return _regeneratorRuntime().wrap(function _callee$(_context) {
76
78
  while (1) switch (_context.prev = _context.next) {
77
79
  case 0:
@@ -87,10 +89,14 @@ function copyClipboardApi(_x) {
87
89
  return _context.stop();
88
90
  }
89
91
  }, _callee);
90
- }))).apply(this, arguments);
92
+ }));
93
+ return _copyClipboardApi.apply(this, arguments);
91
94
  }
92
95
  function copyExecCommand(_x2) {
93
- return (_copyExecCommand = _copyExecCommand || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(text) {
96
+ return _copyExecCommand.apply(this, arguments);
97
+ }
98
+ function _copyExecCommand() {
99
+ _copyExecCommand = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(text) {
94
100
  var span, selection, range, success;
95
101
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
96
102
  while (1) switch (_context2.prev = _context2.next) {
@@ -133,10 +139,14 @@ function copyExecCommand(_x2) {
133
139
  return _context2.stop();
134
140
  }
135
141
  }, _callee2);
136
- }))).apply(this, arguments);
142
+ }));
143
+ return _copyExecCommand.apply(this, arguments);
137
144
  }
138
145
  function copyToClipboard(_x3) {
139
- return (_copyToClipboard = _copyToClipboard || _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(text) {
146
+ return _copyToClipboard.apply(this, arguments);
147
+ }
148
+ function _copyToClipboard() {
149
+ _copyToClipboard = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(text) {
140
150
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
141
151
  while (1) switch (_context3.prev = _context3.next) {
142
152
  case 0:
@@ -164,7 +174,8 @@ function copyToClipboard(_x3) {
164
174
  return _context3.stop();
165
175
  }
166
176
  }, _callee3, null, [[0, 5], [7, 12]]);
167
- }))).apply(this, arguments);
177
+ }));
178
+ return _copyToClipboard.apply(this, arguments);
168
179
  }
169
180
 
170
181
  var flattenComponents = function flattenComponents(components) {
package/lib/contexts.js CHANGED
@@ -65,11 +65,11 @@ var useComponents = function useComponents() {
65
65
  var useComponent = function useComponent(name) {
66
66
  var defaultComponent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
67
67
  var namespace = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
68
- if (!isString__default["default"](name)) {
69
- return name || defaultComponent;
70
- }
71
68
  var manager = useComponentsManager(namespace);
72
69
  return React.useMemo(function () {
70
+ if (!isString__default["default"](name)) {
71
+ return name || defaultComponent;
72
+ }
73
73
  return manager.getComponent(name) || defaultComponent;
74
74
  }, [manager, name, defaultComponent]);
75
75
  };
package/lib/utils.js CHANGED
@@ -82,7 +82,6 @@ var createUseEvent = function createUseEvent(eventsManager) {
82
82
  };
83
83
  var createUseEvent$1 = createUseEvent;
84
84
 
85
- var _copyClipboardApi, _copyExecCommand, _copyToClipboard;
86
85
  /*! clipboard-copy. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
87
86
 
88
87
  // @note vendoring this: https://github.com/feross/clipboard-copy/blob/master/index.js
@@ -92,7 +91,10 @@ function makeError() {
92
91
  return new DOMException('The request is not allowed', 'NotAllowedError');
93
92
  }
94
93
  function copyClipboardApi(_x) {
95
- return (_copyClipboardApi = _copyClipboardApi || _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"]().mark(function _callee(text) {
94
+ return _copyClipboardApi.apply(this, arguments);
95
+ }
96
+ function _copyClipboardApi() {
97
+ _copyClipboardApi = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"]().mark(function _callee(text) {
96
98
  return _regeneratorRuntime__default["default"]().wrap(function _callee$(_context) {
97
99
  while (1) switch (_context.prev = _context.next) {
98
100
  case 0:
@@ -108,10 +110,14 @@ function copyClipboardApi(_x) {
108
110
  return _context.stop();
109
111
  }
110
112
  }, _callee);
111
- }))).apply(this, arguments);
113
+ }));
114
+ return _copyClipboardApi.apply(this, arguments);
112
115
  }
113
116
  function copyExecCommand(_x2) {
114
- return (_copyExecCommand = _copyExecCommand || _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"]().mark(function _callee2(text) {
117
+ return _copyExecCommand.apply(this, arguments);
118
+ }
119
+ function _copyExecCommand() {
120
+ _copyExecCommand = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"]().mark(function _callee2(text) {
115
121
  var span, selection, range, success;
116
122
  return _regeneratorRuntime__default["default"]().wrap(function _callee2$(_context2) {
117
123
  while (1) switch (_context2.prev = _context2.next) {
@@ -154,10 +160,14 @@ function copyExecCommand(_x2) {
154
160
  return _context2.stop();
155
161
  }
156
162
  }, _callee2);
157
- }))).apply(this, arguments);
163
+ }));
164
+ return _copyExecCommand.apply(this, arguments);
158
165
  }
159
166
  function copyToClipboard(_x3) {
160
- return (_copyToClipboard = _copyToClipboard || _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"]().mark(function _callee3(text) {
167
+ return _copyToClipboard.apply(this, arguments);
168
+ }
169
+ function _copyToClipboard() {
170
+ _copyToClipboard = _asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"]().mark(function _callee3(text) {
161
171
  return _regeneratorRuntime__default["default"]().wrap(function _callee3$(_context3) {
162
172
  while (1) switch (_context3.prev = _context3.next) {
163
173
  case 0:
@@ -185,7 +195,8 @@ function copyToClipboard(_x3) {
185
195
  return _context3.stop();
186
196
  }
187
197
  }, _callee3, null, [[0, 5], [7, 12]]);
188
- }))).apply(this, arguments);
198
+ }));
199
+ return _copyToClipboard.apply(this, arguments);
189
200
  }
190
201
 
191
202
  var flattenComponents = function flattenComponents(components) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/core",
3
- "version": "3.0.40",
3
+ "version": "3.0.45",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -111,5 +111,5 @@
111
111
  "publishConfig": {
112
112
  "access": "public"
113
113
  },
114
- "gitHead": "b5e21c4c2f1e455c3bb627e987968e3ab148961b"
114
+ "gitHead": "03d2e24744a998a43327aad373158ca162f19af3"
115
115
  }