brew-js-react 0.5.3 → 0.5.5

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.
Files changed (50) hide show
  1. package/app.js +3 -3
  2. package/dialog.js +6 -6
  3. package/dist/brew-js-react.js +283 -537
  4. package/dist/brew-js-react.js.map +1 -1
  5. package/dist/brew-js-react.min.js +2 -2
  6. package/dist/brew-js-react.min.js.map +1 -1
  7. package/entry.js +7 -4
  8. package/hooks.js +7 -18
  9. package/i18n.js +2 -2
  10. package/index.d.ts +1 -1
  11. package/index.js +1 -1
  12. package/mixin.js +10 -10
  13. package/mixins/AnimateMixin.js +1 -1
  14. package/mixins/AnimateSequenceItemMixin.js +1 -1
  15. package/mixins/AnimateSequenceMixin.js +3 -3
  16. package/mixins/ClassNameMixin.js +3 -3
  17. package/mixins/ClassNameToggleMixin.js +2 -2
  18. package/mixins/FlyoutMixin.d.ts +7 -1
  19. package/mixins/FlyoutMixin.js +18 -10
  20. package/mixins/FlyoutToggleMixin.d.ts +2 -1
  21. package/mixins/FlyoutToggleMixin.js +6 -6
  22. package/mixins/FocusStateMixin.js +3 -3
  23. package/mixins/LoadingStateMixin.js +4 -4
  24. package/mixins/Mixin.js +1 -1
  25. package/mixins/ScrollIntoViewMixin.js +2 -2
  26. package/mixins/ScrollableMixin.js +2 -2
  27. package/mixins/StatefulMixin.js +1 -1
  28. package/mixins/StaticAttributeMixin.js +1 -1
  29. package/mixins/UnmanagedClassNameMixin.js +1 -1
  30. package/package.json +4 -8
  31. package/view.d.ts +41 -0
  32. package/view.js +64 -44
  33. package/include/brew-js/anim.js +0 -1
  34. package/include/brew-js/app.js +0 -3
  35. package/include/brew-js/defaults.js +0 -2
  36. package/include/brew-js/directive.js +0 -1
  37. package/include/brew-js/domAction.js +0 -1
  38. package/include/brew-js/extension/router.js +0 -1
  39. package/include/brew-js/util/path.js +0 -1
  40. package/include/brew-js/var.js +0 -1
  41. package/include/external/jquery.js +0 -3
  42. package/include/external/react-dom-client.js +0 -4
  43. package/include/external/waterpipe.js +0 -3
  44. package/include/zeta-dom/cssUtil.js +0 -1
  45. package/include/zeta-dom/dom.js +0 -3
  46. package/include/zeta-dom/domLock.js +0 -1
  47. package/include/zeta-dom/domUtil.js +0 -1
  48. package/include/zeta-dom/events.js +0 -1
  49. package/include/zeta-dom/observe.js +0 -1
  50. package/include/zeta-dom/util.js +0 -1
@@ -1,77 +1,77 @@
1
- /*! brew-js-react v0.5.3 | (c) misonou | https://misonou.github.io */
1
+ /*! brew-js-react v0.5.5 | (c) misonou | https://misonou.github.io */
2
2
  (function webpackUniversalModuleDefinition(root, factory) {
3
3
  if(typeof exports === 'object' && typeof module === 'object')
4
- module.exports = factory(require("brew-js"), require("react"), require("react-dom"), require("zeta-dom"), require("zeta-dom-react"), require("waterpipe"), require("jquery"));
4
+ module.exports = factory(require("zeta-dom"), require("react"), require("react-dom"), require("brew-js"), require("zeta-dom-react"), require("waterpipe"), require("jquery"));
5
5
  else if(typeof define === 'function' && define.amd)
6
- define("brew-js-react", ["brew-js", "react", "react-dom", "zeta-dom", "zeta-dom-react", "waterpipe", "jquery"], factory);
6
+ define("brew-js-react", ["zeta-dom", "react", "react-dom", "brew-js", "zeta-dom-react", "waterpipe", "jquery"], factory);
7
7
  else if(typeof exports === 'object')
8
- exports["brew-js-react"] = factory(require("brew-js"), require("react"), require("react-dom"), require("zeta-dom"), require("zeta-dom-react"), require("waterpipe"), require("jquery"));
8
+ exports["brew-js-react"] = factory(require("zeta-dom"), require("react"), require("react-dom"), require("brew-js"), require("zeta-dom-react"), require("waterpipe"), require("jquery"));
9
9
  else
10
- root["brew-js-react"] = factory(root["brew"], root["React"], root["ReactDOM"], root["zeta"], root["zeta-dom-react"], root["waterpipe"], root["jQuery"]);
11
- })(self, function(__WEBPACK_EXTERNAL_MODULE__80__, __WEBPACK_EXTERNAL_MODULE__359__, __WEBPACK_EXTERNAL_MODULE__318__, __WEBPACK_EXTERNAL_MODULE__654__, __WEBPACK_EXTERNAL_MODULE__103__, __WEBPACK_EXTERNAL_MODULE__28__, __WEBPACK_EXTERNAL_MODULE__47__) {
10
+ root["brew"] = root["brew"] || {}, root["brew"]["react"] = factory(root["zeta"], root["React"], root["ReactDOM"], root["brew"], root["zeta"]["react"], root["waterpipe"], root["jQuery"]);
11
+ })(self, (__WEBPACK_EXTERNAL_MODULE__231__, __WEBPACK_EXTERNAL_MODULE__12__, __WEBPACK_EXTERNAL_MODULE__311__, __WEBPACK_EXTERNAL_MODULE__760__, __WEBPACK_EXTERNAL_MODULE__402__, __WEBPACK_EXTERNAL_MODULE__87__, __WEBPACK_EXTERNAL_MODULE__942__) => {
12
12
  return /******/ (() => { // webpackBootstrap
13
13
  /******/ var __webpack_modules__ = ({
14
14
 
15
- /***/ 28:
15
+ /***/ 87:
16
16
  /***/ ((module) => {
17
17
 
18
18
  "use strict";
19
- module.exports = __WEBPACK_EXTERNAL_MODULE__28__;
19
+ module.exports = __WEBPACK_EXTERNAL_MODULE__87__;
20
20
 
21
21
  /***/ }),
22
22
 
23
- /***/ 103:
23
+ /***/ 760:
24
24
  /***/ ((module) => {
25
25
 
26
26
  "use strict";
27
- module.exports = __WEBPACK_EXTERNAL_MODULE__103__;
27
+ module.exports = __WEBPACK_EXTERNAL_MODULE__760__;
28
28
 
29
29
  /***/ }),
30
30
 
31
- /***/ 80:
31
+ /***/ 942:
32
32
  /***/ ((module) => {
33
33
 
34
34
  "use strict";
35
- module.exports = __WEBPACK_EXTERNAL_MODULE__80__;
35
+ module.exports = __WEBPACK_EXTERNAL_MODULE__942__;
36
36
 
37
37
  /***/ }),
38
38
 
39
- /***/ 47:
39
+ /***/ 12:
40
40
  /***/ ((module) => {
41
41
 
42
42
  "use strict";
43
- module.exports = __WEBPACK_EXTERNAL_MODULE__47__;
43
+ module.exports = __WEBPACK_EXTERNAL_MODULE__12__;
44
44
 
45
45
  /***/ }),
46
46
 
47
- /***/ 359:
47
+ /***/ 311:
48
48
  /***/ ((module) => {
49
49
 
50
50
  "use strict";
51
- module.exports = __WEBPACK_EXTERNAL_MODULE__359__;
51
+ module.exports = __WEBPACK_EXTERNAL_MODULE__311__;
52
52
 
53
53
  /***/ }),
54
54
 
55
- /***/ 318:
55
+ /***/ 231:
56
56
  /***/ ((module) => {
57
57
 
58
58
  "use strict";
59
- module.exports = __WEBPACK_EXTERNAL_MODULE__318__;
59
+ module.exports = __WEBPACK_EXTERNAL_MODULE__231__;
60
60
 
61
61
  /***/ }),
62
62
 
63
- /***/ 654:
63
+ /***/ 402:
64
64
  /***/ ((module) => {
65
65
 
66
66
  "use strict";
67
- module.exports = __WEBPACK_EXTERNAL_MODULE__654__;
67
+ module.exports = __WEBPACK_EXTERNAL_MODULE__402__;
68
68
 
69
69
  /***/ }),
70
70
 
71
- /***/ 862:
71
+ /***/ 621:
72
72
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
73
73
 
74
- var ReactDOM = __webpack_require__(318);
74
+ var ReactDOM = __webpack_require__(311);
75
75
  var ReactDOMClient;
76
76
 
77
77
  if (ReactDOM.createRoot) {
@@ -161,268 +161,143 @@ var __webpack_exports__ = {};
161
161
  // This entry need to be wrapped in an IIFE because it need to be in strict mode.
162
162
  (() => {
163
163
  "use strict";
164
+ // ESM COMPAT FLAG
165
+ __webpack_require__.r(__webpack_exports__);
164
166
 
165
167
  // EXPORTS
166
168
  __webpack_require__.d(__webpack_exports__, {
167
- "default": () => (/* binding */ entry)
169
+ AnimateMixin: () => (/* reexport */ AnimateMixin),
170
+ AnimateSequenceItemMixin: () => (/* reexport */ AnimateSequenceItemMixin),
171
+ AnimateSequenceMixin: () => (/* reexport */ AnimateSequenceMixin),
172
+ ClassNameMixin: () => (/* reexport */ ClassNameMixin),
173
+ ClassNameToggleMixin: () => (/* reexport */ ClassNameToggleMixin),
174
+ Dialog: () => (/* reexport */ Dialog),
175
+ FlyoutMixin: () => (/* reexport */ FlyoutMixin),
176
+ FlyoutToggleMixin: () => (/* reexport */ FlyoutToggleMixin),
177
+ FocusStateMixin: () => (/* reexport */ FocusStateMixin),
178
+ LoadingStateMixin: () => (/* reexport */ LoadingStateMixin),
179
+ Mixin: () => (/* reexport */ Mixin),
180
+ ScrollIntoViewMixin: () => (/* reexport */ ScrollIntoViewMixin),
181
+ ScrollableMixin: () => (/* reexport */ ScrollableMixin),
182
+ StatefulMixin: () => (/* reexport */ StatefulMixin),
183
+ UnmanagedClassNameMixin: () => (/* reexport */ UnmanagedClassNameMixin),
184
+ ViewStateContainer: () => (/* reexport */ ViewStateContainer),
185
+ createDialog: () => (/* reexport */ createDialog),
186
+ isViewMatched: () => (/* reexport */ isViewMatched),
187
+ isViewRendered: () => (/* reexport */ isViewRendered),
188
+ linkTo: () => (/* reexport */ linkTo),
189
+ makeTranslation: () => (/* reexport */ makeTranslation),
190
+ matchView: () => (/* reexport */ matchView),
191
+ navigateTo: () => (/* reexport */ navigateTo),
192
+ redirectTo: () => (/* reexport */ redirectTo),
193
+ registerErrorView: () => (/* reexport */ registerErrorView),
194
+ registerView: () => (/* reexport */ registerView),
195
+ renderView: () => (/* reexport */ renderView),
196
+ resolvePath: () => (/* reexport */ resolvePath),
197
+ useAnimateMixin: () => (/* reexport */ useAnimateMixin),
198
+ useAnimateSequenceMixin: () => (/* reexport */ useAnimateSequenceMixin),
199
+ useAppReady: () => (/* reexport */ useAppReady),
200
+ useAppReadyState: () => (/* reexport */ useAppReadyState),
201
+ useClassNameToggleMixin: () => (/* reexport */ useClassNameToggleMixin),
202
+ useFlyoutMixin: () => (/* reexport */ useFlyoutMixin),
203
+ useFocusStateMixin: () => (/* reexport */ useFocusStateMixin),
204
+ useLanguage: () => (/* reexport */ useLanguage),
205
+ useLoadingStateMixin: () => (/* reexport */ useLoadingStateMixin),
206
+ useMixin: () => (/* reexport */ useMixin),
207
+ useMixinRef: () => (/* reexport */ useMixinRef),
208
+ useRouteParam: () => (/* reexport */ useRouteParam),
209
+ useRouteState: () => (/* reexport */ useRouteState),
210
+ useScrollIntoViewMixin: () => (/* reexport */ useScrollIntoViewMixin),
211
+ useScrollableMixin: () => (/* reexport */ useScrollableMixin),
212
+ useUnmanagedClassNameMixin: () => (/* reexport */ useUnmanagedClassNameMixin),
213
+ useViewContainerState: () => (/* reexport */ useViewContext),
214
+ useViewContext: () => (/* reexport */ useViewContext)
168
215
  });
169
216
 
170
- // NAMESPACE OBJECT: ./src/index.js
171
- var src_namespaceObject = {};
172
- __webpack_require__.r(src_namespaceObject);
173
- __webpack_require__.d(src_namespaceObject, {
174
- "AnimateMixin": () => (AnimateMixin),
175
- "AnimateSequenceItemMixin": () => (AnimateSequenceItemMixin),
176
- "AnimateSequenceMixin": () => (AnimateSequenceMixin),
177
- "ClassNameMixin": () => (ClassNameMixin),
178
- "ClassNameToggleMixin": () => (ClassNameToggleMixin),
179
- "Dialog": () => (Dialog),
180
- "FlyoutMixin": () => (FlyoutMixin),
181
- "FlyoutToggleMixin": () => (FlyoutToggleMixin),
182
- "FocusStateMixin": () => (FocusStateMixin),
183
- "LoadingStateMixin": () => (LoadingStateMixin),
184
- "Mixin": () => (Mixin),
185
- "ScrollIntoViewMixin": () => (ScrollIntoViewMixin),
186
- "ScrollableMixin": () => (ScrollableMixin),
187
- "StatefulMixin": () => (StatefulMixin),
188
- "UnmanagedClassNameMixin": () => (UnmanagedClassNameMixin),
189
- "ViewStateContainer": () => (ViewStateContainer),
190
- "createDialog": () => (createDialog),
191
- "default": () => (src),
192
- "isViewMatched": () => (isViewMatched),
193
- "linkTo": () => (linkTo),
194
- "makeTranslation": () => (makeTranslation),
195
- "matchView": () => (matchView),
196
- "navigateTo": () => (navigateTo),
197
- "redirectTo": () => (redirectTo),
198
- "registerErrorView": () => (registerErrorView),
199
- "registerView": () => (registerView),
200
- "renderView": () => (renderView),
201
- "resolvePath": () => (resolvePath),
202
- "useAnimateMixin": () => (useAnimateMixin),
203
- "useAnimateSequenceMixin": () => (useAnimateSequenceMixin),
204
- "useAppReady": () => (useAppReady),
205
- "useAppReadyState": () => (useAppReadyState),
206
- "useClassNameToggleMixin": () => (useClassNameToggleMixin),
207
- "useFlyoutMixin": () => (useFlyoutMixin),
208
- "useFocusStateMixin": () => (useFocusStateMixin),
209
- "useLanguage": () => (useLanguage),
210
- "useLoadingStateMixin": () => (useLoadingStateMixin),
211
- "useMixin": () => (useMixin),
212
- "useMixinRef": () => (useMixinRef),
213
- "useRouteParam": () => (useRouteParam),
214
- "useRouteState": () => (useRouteState),
215
- "useScrollIntoViewMixin": () => (useScrollIntoViewMixin),
216
- "useScrollableMixin": () => (useScrollableMixin),
217
- "useUnmanagedClassNameMixin": () => (useUnmanagedClassNameMixin),
218
- "useViewContainerState": () => (useViewContext),
219
- "useViewContext": () => (useViewContext)
220
- });
221
-
222
- // EXTERNAL MODULE: external {"commonjs":"brew-js","commonjs2":"brew-js","amd":"brew-js","root":"brew"}
223
- var external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_ = __webpack_require__(80);
224
- ;// CONCATENATED MODULE: ./tmp/brew-js/app.js
225
-
226
- var _defaultExport = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_;
227
- /* harmony default export */ const app = (_defaultExport);
228
- var install = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.install,
229
- addExtension = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.addExtension,
230
- addDetect = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.addDetect,
231
- emitAppEvent = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.emitAppEvent,
232
- isElementActive = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.isElementActive;
233
-
234
- ;// CONCATENATED MODULE: ./src/include/brew-js/app.js
235
-
236
-
237
- /* harmony default export */ const brew_js_app = (app);
238
- // EXTERNAL MODULE: external {"commonjs":"react","commonjs2":"react","amd":"react","root":"React"}
239
- var external_commonjs_react_commonjs2_react_amd_react_root_React_ = __webpack_require__(359);
240
- // EXTERNAL MODULE: external {"commonjs":"react-dom","commonjs2":"react-dom","amd":"react-dom","root":"ReactDOM"}
241
- var external_commonjs_react_dom_commonjs2_react_dom_amd_react_dom_root_ReactDOM_ = __webpack_require__(318);
242
- // EXTERNAL MODULE: ./node_modules/@misonou/react-dom-client/fallback.js
243
- var fallback = __webpack_require__(862);
244
- ;// CONCATENATED MODULE: ./src/include/external/react-dom-client.js
245
- // @ts-nocheck
246
-
247
- /** @type {import("react-dom/client")} */
248
-
249
- /* harmony default export */ const react_dom_client = (fallback);
250
217
  // EXTERNAL MODULE: external {"commonjs":"zeta-dom","commonjs2":"zeta-dom","amd":"zeta-dom","root":"zeta"}
251
- var external_commonjs_zeta_dom_commonjs2_zeta_dom_amd_zeta_dom_root_zeta_ = __webpack_require__(654);
252
- ;// CONCATENATED MODULE: ./tmp/zeta-dom/util.js
218
+ var external_commonjs_zeta_dom_commonjs2_zeta_dom_amd_zeta_dom_root_zeta_ = __webpack_require__(231);
219
+ ;// CONCATENATED MODULE: ./|umd|/zeta-dom/util.js
253
220
 
254
221
  var _lib$util = external_commonjs_zeta_dom_commonjs2_zeta_dom_amd_zeta_dom_root_zeta_.util,
255
- noop = _lib$util.noop,
256
- pipe = _lib$util.pipe,
257
- either = _lib$util.either,
258
- sameValueZero = _lib$util.sameValueZero,
259
- is = _lib$util.is,
260
- isUndefinedOrNull = _lib$util.isUndefinedOrNull,
261
- isArray = _lib$util.isArray,
262
- isFunction = _lib$util.isFunction,
263
- isThenable = _lib$util.isThenable,
264
- isPlainObject = _lib$util.isPlainObject,
265
- isArrayLike = _lib$util.isArrayLike,
266
- makeArray = _lib$util.makeArray,
267
- extend = _lib$util.extend,
268
- each = _lib$util.each,
269
- map = _lib$util.map,
270
- grep = _lib$util.grep,
271
- splice = _lib$util.splice,
272
- any = _lib$util.any,
273
- single = _lib$util.single,
274
- kv = _lib$util.kv,
275
- fill = _lib$util.fill,
276
- pick = _lib$util.pick,
277
- exclude = _lib$util.exclude,
278
- mapObject = _lib$util.mapObject,
279
- mapGet = _lib$util.mapGet,
280
- mapRemove = _lib$util.mapRemove,
281
- arrRemove = _lib$util.arrRemove,
282
- setAdd = _lib$util.setAdd,
283
- equal = _lib$util.equal,
284
- combineFn = _lib$util.combineFn,
285
- executeOnce = _lib$util.executeOnce,
286
- createPrivateStore = _lib$util.createPrivateStore,
287
- util_setTimeout = _lib$util.setTimeout,
288
- setTimeoutOnce = _lib$util.setTimeoutOnce,
289
- util_setInterval = _lib$util.setInterval,
290
- setIntervalSafe = _lib$util.setIntervalSafe,
291
- setImmediate = _lib$util.setImmediate,
292
- setImmediateOnce = _lib$util.setImmediateOnce,
293
- clearImmediateOnce = _lib$util.clearImmediateOnce,
294
- _throws = _lib$util["throws"],
295
- throwNotFunction = _lib$util.throwNotFunction,
296
- errorWithCode = _lib$util.errorWithCode,
297
- isErrorWithCode = _lib$util.isErrorWithCode,
298
- util_keys = _lib$util.keys,
299
- values = _lib$util.values,
300
- util_hasOwnProperty = _lib$util.hasOwnProperty,
301
- getOwnPropertyDescriptors = _lib$util.getOwnPropertyDescriptors,
302
- util_define = _lib$util.define,
303
- definePrototype = _lib$util.definePrototype,
304
- defineOwnProperty = _lib$util.defineOwnProperty,
305
- defineGetterProperty = _lib$util.defineGetterProperty,
306
- defineHiddenProperty = _lib$util.defineHiddenProperty,
307
- defineAliasProperty = _lib$util.defineAliasProperty,
308
- defineObservableProperty = _lib$util.defineObservableProperty,
309
- watch = _lib$util.watch,
310
- watchOnce = _lib$util.watchOnce,
311
- watchable = _lib$util.watchable,
312
- inherit = _lib$util.inherit,
313
- freeze = _lib$util.freeze,
314
- deepFreeze = _lib$util.deepFreeze,
315
- iequal = _lib$util.iequal,
316
- randomId = _lib$util.randomId,
317
- repeat = _lib$util.repeat,
318
- camel = _lib$util.camel,
319
- hyphenate = _lib$util.hyphenate,
320
- ucfirst = _lib$util.ucfirst,
321
- lcfirst = _lib$util.lcfirst,
322
- trim = _lib$util.trim,
323
- matchWord = _lib$util.matchWord,
324
- matchWordMulti = _lib$util.matchWordMulti,
325
- htmlDecode = _lib$util.htmlDecode,
326
- resolve = _lib$util.resolve,
327
- reject = _lib$util.reject,
328
- always = _lib$util.always,
329
- resolveAll = _lib$util.resolveAll,
330
- retryable = _lib$util.retryable,
331
- deferrable = _lib$util.deferrable,
332
- catchAsync = _lib$util.catchAsync,
333
- setPromiseTimeout = _lib$util.setPromiseTimeout,
334
- delay = _lib$util.delay,
335
- makeAsync = _lib$util.makeAsync;
336
-
337
- ;// CONCATENATED MODULE: ./tmp/zeta-dom/domUtil.js
222
+ any = _lib$util.any,
223
+ arrRemove = _lib$util.arrRemove,
224
+ catchAsync = _lib$util.catchAsync,
225
+ combineFn = _lib$util.combineFn,
226
+ createPrivateStore = _lib$util.createPrivateStore,
227
+ util_define = _lib$util.define,
228
+ defineGetterProperty = _lib$util.defineGetterProperty,
229
+ defineHiddenProperty = _lib$util.defineHiddenProperty,
230
+ defineObservableProperty = _lib$util.defineObservableProperty,
231
+ defineOwnProperty = _lib$util.defineOwnProperty,
232
+ definePrototype = _lib$util.definePrototype,
233
+ delay = _lib$util.delay,
234
+ each = _lib$util.each,
235
+ either = _lib$util.either,
236
+ equal = _lib$util.equal,
237
+ exclude = _lib$util.exclude,
238
+ executeOnce = _lib$util.executeOnce,
239
+ extend = _lib$util.extend,
240
+ fill = _lib$util.fill,
241
+ freeze = _lib$util.freeze,
242
+ grep = _lib$util.grep,
243
+ isArray = _lib$util.isArray,
244
+ isFunction = _lib$util.isFunction,
245
+ isPlainObject = _lib$util.isPlainObject,
246
+ isThenable = _lib$util.isThenable,
247
+ isUndefinedOrNull = _lib$util.isUndefinedOrNull,
248
+ util_keys = _lib$util.keys,
249
+ kv = _lib$util.kv,
250
+ makeArray = _lib$util.makeArray,
251
+ makeAsync = _lib$util.makeAsync,
252
+ map = _lib$util.map,
253
+ noop = _lib$util.noop,
254
+ pick = _lib$util.pick,
255
+ pipe = _lib$util.pipe,
256
+ randomId = _lib$util.randomId,
257
+ resolve = _lib$util.resolve,
258
+ resolveAll = _lib$util.resolveAll,
259
+ setImmediate = _lib$util.setImmediate,
260
+ setImmediateOnce = _lib$util.setImmediateOnce,
261
+ single = _lib$util.single,
262
+ throwNotFunction = _lib$util.throwNotFunction,
263
+ watch = _lib$util.watch,
264
+ watchable = _lib$util.watchable;
265
+
266
+ // EXTERNAL MODULE: external {"commonjs":"react","commonjs2":"react","amd":"react","root":["React"]}
267
+ var external_commonjs_react_commonjs2_react_amd_react_root_React_ = __webpack_require__(12);
268
+ // EXTERNAL MODULE: external {"commonjs":"react-dom","commonjs2":"react-dom","amd":"react-dom","root":["ReactDOM"]}
269
+ var external_commonjs_react_dom_commonjs2_react_dom_amd_react_dom_root_ReactDOM_ = __webpack_require__(311);
270
+ // EXTERNAL MODULE: ./node_modules/@misonou/react-dom-client/fallback.js
271
+ var fallback = __webpack_require__(621);
272
+ ;// CONCATENATED MODULE: ./|umd|/zeta-dom/domUtil.js
338
273
 
339
274
  var domUtil_lib$util = external_commonjs_zeta_dom_commonjs2_zeta_dom_amd_zeta_dom_root_zeta_.util,
340
- domReady = domUtil_lib$util.domReady,
341
- tagName = domUtil_lib$util.tagName,
342
- isVisible = domUtil_lib$util.isVisible,
343
- matchSelector = domUtil_lib$util.matchSelector,
344
- comparePosition = domUtil_lib$util.comparePosition,
345
- connected = domUtil_lib$util.connected,
346
- containsOrEquals = domUtil_lib$util.containsOrEquals,
347
- acceptNode = domUtil_lib$util.acceptNode,
348
- combineNodeFilters = domUtil_lib$util.combineNodeFilters,
349
- iterateNode = domUtil_lib$util.iterateNode,
350
- iterateNodeToArray = domUtil_lib$util.iterateNodeToArray,
351
- getCommonAncestor = domUtil_lib$util.getCommonAncestor,
352
- parentsAndSelf = domUtil_lib$util.parentsAndSelf,
353
- selectIncludeSelf = domUtil_lib$util.selectIncludeSelf,
354
- selectClosestRelative = domUtil_lib$util.selectClosestRelative,
355
- createNodeIterator = domUtil_lib$util.createNodeIterator,
356
- createTreeWalker = domUtil_lib$util.createTreeWalker,
357
- bind = domUtil_lib$util.bind,
358
- bindOnce = domUtil_lib$util.bindOnce,
359
- bindUntil = domUtil_lib$util.bindUntil,
360
- dispatchDOMMouseEvent = domUtil_lib$util.dispatchDOMMouseEvent,
361
- removeNode = domUtil_lib$util.removeNode,
362
- getClass = domUtil_lib$util.getClass,
363
- setClass = domUtil_lib$util.setClass,
364
- getSafeAreaInset = domUtil_lib$util.getSafeAreaInset,
365
- getScrollOffset = domUtil_lib$util.getScrollOffset,
366
- getScrollParent = domUtil_lib$util.getScrollParent,
367
- getContentRect = domUtil_lib$util.getContentRect,
368
- scrollBy = domUtil_lib$util.scrollBy,
369
- scrollIntoView = domUtil_lib$util.scrollIntoView,
370
- makeSelection = domUtil_lib$util.makeSelection,
371
- getRect = domUtil_lib$util.getRect,
372
- getRects = domUtil_lib$util.getRects,
373
- toPlainRect = domUtil_lib$util.toPlainRect,
374
- rectEquals = domUtil_lib$util.rectEquals,
375
- rectCovers = domUtil_lib$util.rectCovers,
376
- rectIntersects = domUtil_lib$util.rectIntersects,
377
- pointInRect = domUtil_lib$util.pointInRect,
378
- mergeRect = domUtil_lib$util.mergeRect,
379
- elementFromPoint = domUtil_lib$util.elementFromPoint;
380
-
381
- ;// CONCATENATED MODULE: ./tmp/zeta-dom/dom.js
382
-
383
- var dom_defaultExport = external_commonjs_zeta_dom_commonjs2_zeta_dom_amd_zeta_dom_root_zeta_.dom;
384
- /* harmony default export */ const dom = (dom_defaultExport);
385
- var _lib$dom = external_commonjs_zeta_dom_commonjs2_zeta_dom_amd_zeta_dom_root_zeta_.dom,
386
- textInputAllowed = _lib$dom.textInputAllowed,
387
- beginDrag = _lib$dom.beginDrag,
388
- beginPinchZoom = _lib$dom.beginPinchZoom,
389
- insertText = _lib$dom.insertText,
390
- getShortcut = _lib$dom.getShortcut,
391
- setShortcut = _lib$dom.setShortcut,
392
- focusable = _lib$dom.focusable,
393
- focused = _lib$dom.focused,
394
- setTabRoot = _lib$dom.setTabRoot,
395
- unsetTabRoot = _lib$dom.unsetTabRoot,
396
- setModal = _lib$dom.setModal,
397
- releaseModal = _lib$dom.releaseModal,
398
- retainFocus = _lib$dom.retainFocus,
399
- releaseFocus = _lib$dom.releaseFocus,
400
- iterateFocusPath = _lib$dom.iterateFocusPath,
401
- dom_focus = _lib$dom.focus,
402
- dom_blur = _lib$dom.blur;
403
-
404
- ;// CONCATENATED MODULE: ./src/include/zeta-dom/dom.js
275
+ containsOrEquals = domUtil_lib$util.containsOrEquals,
276
+ getClass = domUtil_lib$util.getClass,
277
+ removeNode = domUtil_lib$util.removeNode,
278
+ scrollIntoView = domUtil_lib$util.scrollIntoView,
279
+ setClass = domUtil_lib$util.setClass;
405
280
 
281
+ ;// CONCATENATED MODULE: ./|umd|/zeta-dom/dom.js
406
282
 
283
+ var dom = external_commonjs_zeta_dom_commonjs2_zeta_dom_amd_zeta_dom_root_zeta_.dom;
407
284
  /* harmony default export */ const zeta_dom_dom = (dom);
408
- ;// CONCATENATED MODULE: ./tmp/zeta-dom/domLock.js
285
+ ;// CONCATENATED MODULE: ./|umd|/zeta-dom/domLock.js
409
286
 
410
- var domLock_lib$dom = external_commonjs_zeta_dom_commonjs2_zeta_dom_amd_zeta_dom_root_zeta_.dom,
411
- lock = domLock_lib$dom.lock,
412
- locked = domLock_lib$dom.locked,
413
- cancelLock = domLock_lib$dom.cancelLock,
414
- subscribeAsync = domLock_lib$dom.subscribeAsync,
415
- notifyAsync = domLock_lib$dom.notifyAsync,
416
- runAsync = domLock_lib$dom.runAsync,
417
- preventLeave = domLock_lib$dom.preventLeave;
287
+ var _lib$dom = external_commonjs_zeta_dom_commonjs2_zeta_dom_amd_zeta_dom_root_zeta_.dom,
288
+ lock = _lib$dom.lock,
289
+ notifyAsync = _lib$dom.notifyAsync,
290
+ preventLeave = _lib$dom.preventLeave,
291
+ subscribeAsync = _lib$dom.subscribeAsync;
418
292
 
419
- ;// CONCATENATED MODULE: ./tmp/brew-js/domAction.js
293
+ // EXTERNAL MODULE: external {"commonjs":"brew-js","commonjs2":"brew-js","amd":"brew-js","root":"brew"}
294
+ var external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_ = __webpack_require__(760);
295
+ ;// CONCATENATED MODULE: ./|umd|/brew-js/domAction.js
420
296
 
421
- var addAsyncAction = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.addAsyncAction,
422
- isFlyoutOpen = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.isFlyoutOpen,
423
- closeFlyout = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.closeFlyout,
424
- toggleFlyout = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.toggleFlyout,
425
- openFlyout = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.openFlyout;
297
+ var closeFlyout = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.closeFlyout,
298
+ isFlyoutOpen = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.isFlyoutOpen,
299
+ openFlyout = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.openFlyout,
300
+ toggleFlyout = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.toggleFlyout;
426
301
 
427
302
  ;// CONCATENATED MODULE: ./src/dialog.js
428
303
 
@@ -433,16 +308,14 @@ var addAsyncAction = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_roo
433
308
 
434
309
 
435
310
 
311
+
436
312
  /**
437
313
  * @param {Partial<import("./dialog").DialogOptions<any>>} props
438
314
  */
439
-
440
315
  function createDialog(props) {
441
316
  var root = document.createElement('div');
442
- var reactRoot = react_dom_client.createRoot(root);
443
-
317
+ var reactRoot = fallback.createRoot(root);
444
318
  var _closeDialog = closeFlyout.bind(0, root);
445
-
446
319
  var promise;
447
320
  zeta_dom_dom.on(root, {
448
321
  flyoutshow: function flyoutshow() {
@@ -452,7 +325,6 @@ function createDialog(props) {
452
325
  promise = null;
453
326
  removeNode(root);
454
327
  (props.onClose || noop)(root);
455
-
456
328
  if (props.onRender) {
457
329
  reactRoot.unmount();
458
330
  }
@@ -467,15 +339,12 @@ function createDialog(props) {
467
339
  if (promise) {
468
340
  return promise;
469
341
  }
470
-
471
342
  root.className = props.className || '';
472
343
  document.body.appendChild(root);
473
344
  zeta_dom_dom.retainFocus(zeta_dom_dom.activeElement, root);
474
-
475
345
  if (props.modal) {
476
346
  root.setAttribute('is-modal', '');
477
347
  }
478
-
479
348
  if (props.onRender) {
480
349
  var dialogProps = extend({}, props, {
481
350
  closeDialog: function closeDialog(value) {
@@ -485,32 +354,27 @@ function createDialog(props) {
485
354
  }
486
355
  });
487
356
  var content = /*#__PURE__*/(0,external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement)(props.onRender, dialogProps);
488
-
489
357
  if (props.wrapper) {
490
358
  content = /*#__PURE__*/(0,external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement)(props.wrapper, dialogProps, content);
491
359
  }
492
-
493
360
  reactRoot.render(content);
494
361
  }
495
-
496
362
  promise = resolve().then(function () {
497
363
  return openFlyout(root, null, pick(props, ['focus']));
498
364
  });
499
-
500
365
  if (props.preventLeave) {
501
366
  preventLeave(root, promise);
502
367
  } else if (props.preventNavigation) {
503
368
  lock(root, promise);
504
369
  }
505
-
506
370
  return promise;
507
371
  }
508
372
  };
509
373
  }
374
+
510
375
  /**
511
376
  * @param {import("./dialog").DialogProps} props
512
377
  */
513
-
514
378
  function Dialog(props) {
515
379
  var _props = (0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useState)({})[0];
516
380
  var dialog = (0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useState)(function () {
@@ -519,7 +383,6 @@ function Dialog(props) {
519
383
  extend(_props, props);
520
384
  (0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useEffect)(function () {
521
385
  var opened = containsOrEquals(zeta_dom_dom.root, dialog.root);
522
-
523
386
  if (either(opened, _props.isOpen)) {
524
387
  if (!opened) {
525
388
  dialog.open();
@@ -533,25 +396,27 @@ function Dialog(props) {
533
396
  }, [dialog]);
534
397
  return /*#__PURE__*/external_commonjs_react_dom_commonjs2_react_dom_amd_react_dom_root_ReactDOM_.createPortal(props.children, dialog.root);
535
398
  }
536
- // EXTERNAL MODULE: external "zeta-dom-react"
537
- var external_zeta_dom_react_ = __webpack_require__(103);
538
- ;// CONCATENATED MODULE: ./tmp/zeta-dom/events.js
399
+ // EXTERNAL MODULE: external {"commonjs":"zeta-dom-react","commonjs2":"zeta-dom-react","amd":"zeta-dom-react","root":["zeta","react"]}
400
+ var external_commonjs_zeta_dom_react_commonjs2_zeta_dom_react_amd_zeta_dom_react_root_zeta_react_ = __webpack_require__(402);
401
+ ;// CONCATENATED MODULE: ./|umd|/zeta-dom/events.js
402
+
403
+ var EventContainer = external_commonjs_zeta_dom_commonjs2_zeta_dom_amd_zeta_dom_root_zeta_.EventContainer;
539
404
 
540
- var ZetaEventContainer = external_commonjs_zeta_dom_commonjs2_zeta_dom_amd_zeta_dom_root_zeta_.EventContainer;
405
+ ;// CONCATENATED MODULE: ./|umd|/brew-js/app.js
541
406
 
542
- ;// CONCATENATED MODULE: ./tmp/brew-js/defaults.js
407
+ /* harmony default export */ const app = ((/* unused pure expression or super */ null && (lib)));
408
+ var install = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.install;
543
409
 
544
- var defaults_defaultExport = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.defaults;
545
- /* harmony default export */ const defaults = (defaults_defaultExport);
546
- ;// CONCATENATED MODULE: ./src/include/brew-js/defaults.js
410
+ ;// CONCATENATED MODULE: ./|umd|/brew-js/defaults.js
547
411
 
412
+ var defaults = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.defaults;
548
413
  /* harmony default export */ const brew_js_defaults = (defaults);
549
414
  ;// CONCATENATED MODULE: ./src/app.js
550
415
 
551
416
 
552
417
 
553
- /** @type {Brew.AppInstance<Brew.WithRouter & Brew.WithI18n>} */
554
418
 
419
+ /** @type {Brew.AppInstance<Brew.WithRouter & Brew.WithI18n>} */
555
420
  var app_app;
556
421
  var appInitCallabcks = [];
557
422
  function onAppInit(callback) {
@@ -563,29 +428,16 @@ install('react', function (app_) {
563
428
  combineFn(appInitCallabcks)(app_app);
564
429
  });
565
430
  brew_js_defaults.react = true;
566
- ;// CONCATENATED MODULE: ./tmp/brew-js/anim.js
431
+ ;// CONCATENATED MODULE: ./|umd|/brew-js/anim.js
567
432
 
568
433
  var animateIn = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.animateIn,
569
- animateOut = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.animateOut,
570
- addAnimateIn = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.addAnimateIn,
571
- addAnimateOut = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.addAnimateOut;
572
-
573
- ;// CONCATENATED MODULE: ./tmp/brew-js/util/path.js
574
-
575
- var setBaseUrl = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.setBaseUrl,
576
- combinePath = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.combinePath,
577
- parsePath = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.parsePath,
578
- normalizePath = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.normalizePath,
579
- removeQueryAndHash = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.removeQueryAndHash,
580
- withBaseUrl = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.withBaseUrl,
581
- toAbsoluteUrl = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.toAbsoluteUrl,
582
- toRelativeUrl = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.toRelativeUrl,
583
- isSubPathOf = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.isSubPathOf,
584
- toSegments = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.toSegments;
434
+ animateOut = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.animateOut;
585
435
 
586
- ;// CONCATENATED MODULE: ./src/view.js
436
+ ;// CONCATENATED MODULE: ./|umd|/brew-js/util/path.js
587
437
 
438
+ var removeQueryAndHash = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.removeQueryAndHash;
588
439
 
440
+ ;// CONCATENATED MODULE: ./src/view.js
589
441
 
590
442
 
591
443
 
@@ -595,23 +447,20 @@ var setBaseUrl = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_br
595
447
 
596
448
 
597
449
 
598
- var _ = createPrivateStore();
599
450
 
451
+ var _ = createPrivateStore();
600
452
  var root = zeta_dom_dom.root;
601
453
  var routeMap = new Map();
602
454
  var usedParams = {};
603
455
  var sortedViews = [];
604
- var emitter = new ZetaEventContainer();
605
- var rootContext = freeze(extend(new ViewContext(null, null), {
456
+ var emitter = new EventContainer();
457
+ var rootContext = freeze(extend(new ViewContext(), {
606
458
  container: root
607
459
  }));
608
-
609
460
  var rootState = _(rootContext);
610
-
611
461
  var StateContext = /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createContext(rootContext);
612
462
  var errorView;
613
463
  /** @type {Partial<Zeta.ZetaEventType<"beforepageload", Brew.RouterEventMap, Element>>} */
614
-
615
464
  var view_event = {};
616
465
  onAppInit(function () {
617
466
  app_app.on('beforepageload', function (e) {
@@ -623,7 +472,6 @@ onAppInit(function () {
623
472
  if (!next[0]) {
624
473
  return resolve();
625
474
  }
626
-
627
475
  resolveAll(map(next, function (v) {
628
476
  return new Promise(function (resolve) {
629
477
  v.onRender = resolve;
@@ -638,41 +486,39 @@ onAppInit(function () {
638
486
  }));
639
487
  });
640
488
  });
641
-
642
- function ViewContext(view, page) {
489
+ function ViewContext(view, page, parent) {
643
490
  var self = this;
644
- watch(self, true);
645
- defineOwnProperty(self, 'view', view, true);
646
-
491
+ defineOwnProperty(self, 'view', view || null, true);
492
+ defineOwnProperty(self, 'parent', parent || null, true);
647
493
  _(self, {
648
494
  children: [],
649
- setPage: defineObservableProperty(self, 'page', page, true),
495
+ setPage: defineObservableProperty(self, 'page', page || null, true),
650
496
  setActive: defineObservableProperty(self, 'active', !!page, true)
651
497
  });
652
-
653
498
  watch(self, 'page', function (page, previousPage) {
654
499
  emitter.emit('pagechange', self, {
655
500
  previousPage: previousPage
656
501
  });
657
502
  });
658
503
  }
659
-
660
504
  definePrototype(ViewContext, {
505
+ getChildren: function getChildren() {
506
+ return map(_(this).children, function (v) {
507
+ return v.currentState;
508
+ });
509
+ },
661
510
  on: function on(event, handler) {
662
511
  return emitter.add(this, event, handler);
663
512
  }
664
513
  });
665
-
666
514
  function ErrorBoundary() {
667
515
  external_commonjs_react_commonjs2_react_amd_react_root_React_.Component.apply(this, arguments);
668
516
  this.state = {};
669
517
  }
670
-
671
518
  ErrorBoundary.contextType = StateContext;
672
519
  definePrototype(ErrorBoundary, external_commonjs_react_commonjs2_react_amd_react_root_React_.Component, {
673
520
  componentDidCatch: function componentDidCatch(error) {
674
521
  var self = this;
675
-
676
522
  if (errorView && !self.state.error) {
677
523
  self.setState({
678
524
  error: error
@@ -695,14 +541,12 @@ definePrototype(ErrorBoundary, external_commonjs_react_commonjs2_react_amd_react
695
541
  reset: self.reset.bind(self)
696
542
  };
697
543
  var onComponentLoaded = self.props.onComponentLoaded;
698
-
699
544
  if (props.error) {
700
545
  return /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement(errorView, {
701
546
  onComponentLoaded: onComponentLoaded,
702
547
  viewProps: props
703
548
  });
704
549
  }
705
-
706
550
  return /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement(props.view, {
707
551
  onComponentLoaded: onComponentLoaded,
708
552
  viewProps: self.props.viewProps
@@ -714,33 +558,37 @@ definePrototype(ErrorBoundary, external_commonjs_react_commonjs2_react_amd_react
714
558
  });
715
559
  }
716
560
  });
717
-
718
561
  function ViewContainer() {
719
562
  external_commonjs_react_commonjs2_react_amd_react_root_React_.Component.apply(this, arguments);
720
563
  }
721
-
722
564
  ViewContainer.contextType = StateContext;
723
565
  definePrototype(ViewContainer, external_commonjs_react_commonjs2_react_amd_react_root_React_.Component, {
566
+ setActive: noop,
724
567
  componentDidMount: function componentDidMount() {
725
568
  var self = this;
726
-
727
569
  var parent = _(self.context).children;
728
-
729
- parent.push(self);
730
- self.componentWillUnmount = combineFn(watch(app_app.route, function () {
731
- (self.setActive || noop)(self.getViewComponent() === self.currentViewComponent);
732
- }), function () {
733
- arrRemove(parent, self);
570
+ var unwatch = watch(app_app.route, function () {
571
+ self.setActive(self.getViewComponent() === self.currentViewComponent);
734
572
  });
573
+ self.componentWillUnmount = function () {
574
+ self.setActive(false);
575
+ arrRemove(parent, self);
576
+ unwatch();
577
+ setImmediate(function () {
578
+ if (self.unmountView && !self.currentState.active) {
579
+ self.unmountView();
580
+ }
581
+ });
582
+ };
583
+ parent.push(self);
584
+ self.setActive(true);
735
585
  },
736
586
  render: function render() {
737
587
  /** @type {any} */
738
588
  var self = this;
739
-
740
589
  if (self.context.active) {
741
590
  self.updateView();
742
591
  }
743
-
744
592
  (self.onRender || noop)();
745
593
  return /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement(external_commonjs_react_commonjs2_react_amd_react_root_React_.Fragment, null, self.prevView, self.currentView);
746
594
  },
@@ -748,51 +596,45 @@ definePrototype(ViewContainer, external_commonjs_react_commonjs2_react_amd_react
748
596
  var self = this;
749
597
  var V = self.getViewComponent();
750
598
  var viewChanged = V !== self.currentViewComponent;
751
-
752
599
  if (V && (viewChanged || !(self.children || '')[0])) {
753
600
  // ensure the current path actually corresponds to the matched view
754
601
  // when some views are not included in the list of allowed views
755
602
  var targetPath = resolvePath(V, getCurrentParams(V, true));
756
-
757
603
  if (targetPath !== removeQueryAndHash(app_app.path)) {
758
604
  app_app.navigate(targetPath, true);
759
605
  return;
760
606
  }
761
607
  }
762
-
763
608
  if (V && viewChanged) {
764
- var prevElement = self.currentElement;
765
-
766
- if (prevElement) {
767
- self.setActive(false);
768
- self.prevView = self.currentView;
769
- self.currentElement = undefined;
770
- app_app.emit('pageleave', prevElement, {
771
- pathname: self.currentPath
772
- }, true);
773
- animateOut(prevElement, 'show').then(function () {
774
- self.prevView = undefined;
775
- self.forceUpdate();
776
- });
777
- }
778
-
779
- (self.cancelPrevious || noop)();
609
+ (self.unmountView || noop)(true);
610
+ var state = new ViewContext(V, app_app.page, self.context);
780
611
  var onComponentLoaded;
781
612
  var promise = new Promise(function (resolve) {
782
613
  onComponentLoaded = resolve;
783
614
  });
615
+ var unmountView = onComponentLoaded;
784
616
  var initElement = executeOnce(function (element) {
785
- self.currentElement = element;
786
617
  state.container = element;
787
618
  promise.then(function () {
788
- animateIn(element, 'show', '[brew-view]', true);
789
- app_app.emit('pageenter', element, {
790
- pathname: app_app.path
791
- }, true);
619
+ if (self.currentState === state) {
620
+ unmountView = function unmountView() {
621
+ self.prevView = self.currentView;
622
+ app_app.emit('pageleave', element, {
623
+ pathname: state.page.path
624
+ }, true);
625
+ animateOut(element, 'show').then(function () {
626
+ self.prevView = undefined;
627
+ self.forceUpdate();
628
+ });
629
+ };
630
+ animateIn(element, 'show', '[brew-view]', true);
631
+ app_app.emit('pageenter', element, {
632
+ pathname: state.page.path
633
+ }, true);
634
+ }
792
635
  });
793
636
  notifyAsync(element, promise);
794
637
  });
795
- var state = new ViewContext(V, app_app.page);
796
638
  var viewProps = freeze({
797
639
  navigationType: view_event.navigationType,
798
640
  viewContext: state,
@@ -809,14 +651,18 @@ definePrototype(ViewContainer, external_commonjs_react_commonjs2_react_amd_react
809
651
  viewProps: viewProps
810
652
  }))));
811
653
  extend(self, _(state), {
812
- cancelPrevious: onComponentLoaded,
813
- currentPath: app_app.path,
654
+ currentState: state,
814
655
  currentView: view,
815
- currentViewComponent: V
656
+ currentViewComponent: V,
657
+ unmountView: executeOnce(function () {
658
+ self.setActive(false);
659
+ routeMap.get(V).rendered--;
660
+ unmountView();
661
+ })
816
662
  });
663
+ routeMap.get(V).rendered++;
817
664
  (view_event.waitFor || noop)(promise);
818
665
  }
819
-
820
666
  (self.setPage || noop)(app_app.page);
821
667
  },
822
668
  getViewComponent: function getViewComponent() {
@@ -824,10 +670,8 @@ definePrototype(ViewContainer, external_commonjs_react_commonjs2_react_amd_react
824
670
  return any(props.views, isViewMatched) || props.defaultView;
825
671
  }
826
672
  });
827
-
828
673
  function getCurrentParams(view, includeAll, params) {
829
674
  var state = routeMap.get(view);
830
-
831
675
  if (!state.maxParams) {
832
676
  var matchers = exclude(state.matchers, ['remainingSegments']);
833
677
  var matched = map(app_app.routes, function (v) {
@@ -838,7 +682,6 @@ function getCurrentParams(view, includeAll, params) {
838
682
  });
839
683
  return matched ? route : null;
840
684
  });
841
-
842
685
  if (matched[1]) {
843
686
  matched = grep(matched, function (v) {
844
687
  return !single(v.params, function (v, i) {
@@ -846,7 +689,6 @@ function getCurrentParams(view, includeAll, params) {
846
689
  });
847
690
  });
848
691
  }
849
-
850
692
  if (matched[0]) {
851
693
  var last = matched.slice(-1)[0];
852
694
  state.maxParams = util_keys(extend.apply(0, [{
@@ -859,14 +701,11 @@ function getCurrentParams(view, includeAll, params) {
859
701
  });
860
702
  }
861
703
  }
862
-
863
704
  return pick(params || app_app.route, includeAll ? state.maxParams : state.minParams);
864
705
  }
865
-
866
706
  function sortViews(a, b) {
867
707
  return (routeMap.get(b) || {}).matchCount - (routeMap.get(a) || {}).matchCount;
868
708
  }
869
-
870
709
  function matchViewParams(view, route) {
871
710
  var params = routeMap.get(view);
872
711
  return !!params && !single(params.matchers, function (v, i) {
@@ -874,59 +713,50 @@ function matchViewParams(view, route) {
874
713
  return isFunction(v) ? !v(value) : (v || '') !== value;
875
714
  });
876
715
  }
877
-
878
716
  function createViewComponent(factory) {
879
717
  var promise;
880
718
  throwNotFunction(factory);
881
-
882
719
  if (factory.prototype instanceof external_commonjs_react_commonjs2_react_amd_react_root_React_.Component) {
883
720
  factory = external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement.bind(null, factory);
884
721
  }
885
-
886
722
  return function fn(props) {
887
723
  var viewProps = props.viewProps;
888
724
  var children = !promise && factory(viewProps);
889
-
890
725
  if (isThenable(children)) {
891
726
  promise = children;
892
727
  children = null;
893
728
  catchAsync(promise);
894
729
  }
895
-
896
- var state = (0,external_zeta_dom_react_.useAsync)(function () {
730
+ var state = (0,external_commonjs_zeta_dom_react_commonjs2_zeta_dom_react_amd_zeta_dom_react_root_zeta_react_.useAsync)(function () {
897
731
  return promise.then(function (s) {
898
732
  return /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement(s["default"], viewProps);
899
733
  });
900
734
  }, !!promise)[1];
901
-
902
735
  if (!promise || !state.loading) {
903
736
  props.onComponentLoaded();
904
-
905
737
  if (state.error) {
906
738
  throw state.error;
907
739
  }
908
740
  }
909
-
910
741
  return children || state.value || /*#__PURE__*/external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement(external_commonjs_react_commonjs2_react_amd_react_root_React_.Fragment);
911
742
  };
912
743
  }
913
-
914
744
  function useViewContext() {
915
745
  return external_commonjs_react_commonjs2_react_amd_react_root_React_.useContext(StateContext);
916
746
  }
917
747
  function isViewMatched(view) {
918
748
  return matchViewParams(view, app_app.route);
919
749
  }
920
- function matchView(path, views) {
750
+ function isViewRendered(view) {
751
+ return !!(routeMap.get(view) || '').rendered;
752
+ }
753
+ function matchView() {
754
+ var views = makeArray(arguments);
921
755
  var route = app_app.route;
922
-
923
- if (typeof path === 'string') {
924
- route = route.parse(path);
925
- } else {
926
- views = path;
756
+ if (typeof views[0] === 'string') {
757
+ route = route.parse(views.shift());
927
758
  }
928
-
929
- views = views ? makeArray(views).sort(sortViews) : sortedViews;
759
+ views = views[0] ? (isArray(views[0]) ? makeArray(views[0]) : views).sort(sortViews) : sortedViews;
930
760
  return any(views, function (v) {
931
761
  return matchViewParams(v, route);
932
762
  }) || undefined;
@@ -936,13 +766,13 @@ function registerView(factory, routeParams) {
936
766
  routeParams = extend({}, routeParams);
937
767
  each(routeParams, function (i, v) {
938
768
  usedParams[i] = true;
939
-
940
769
  if (v instanceof RegExp) {
941
770
  routeParams[i] = v.test.bind(v);
942
771
  }
943
772
  });
944
773
  routeMap.set(Component, {
945
774
  id: randomId(),
775
+ rendered: 0,
946
776
  matchCount: util_keys(routeParams).length,
947
777
  matchers: routeParams,
948
778
  params: pick(routeParams, function (v) {
@@ -974,11 +804,9 @@ function renderView() {
974
804
  }
975
805
  function resolvePath(view, params) {
976
806
  var state = routeMap.get(view);
977
-
978
807
  if (!state) {
979
808
  return '/';
980
809
  }
981
-
982
810
  var newParams = extend(getCurrentParams(view), getCurrentParams(view, true, params || {}), state.params);
983
811
  return app_app.route.getPath(newParams);
984
812
  }
@@ -999,18 +827,15 @@ function redirectTo(view, params, data) {
999
827
 
1000
828
 
1001
829
 
1002
- var hooks_emitter = new ZetaEventContainer();
1003
-
830
+ var hooks_emitter = new EventContainer();
1004
831
  function getCurrentStates() {
1005
832
  return app_app.historyStorage.current;
1006
833
  }
1007
-
1008
834
  function ViewState(key, dispose) {
1009
835
  this.key = key;
1010
836
  this.store = getCurrentStates();
1011
837
  this.dispose = dispose;
1012
838
  }
1013
-
1014
839
  definePrototype(ViewState, {
1015
840
  get: function get() {
1016
841
  return this.store.get(this.key);
@@ -1025,35 +850,28 @@ definePrototype(ViewState, {
1025
850
  });
1026
851
  }
1027
852
  });
1028
-
1029
853
  function updatePersistedValue(cur, key, value, snapshot) {
1030
854
  if (cur.get(key) !== value) {
1031
855
  if (snapshot && cur.has(key)) {
1032
856
  app_app.snapshot();
1033
857
  cur = getCurrentStates();
1034
858
  }
1035
-
1036
859
  cur.set(key, value);
1037
860
  }
1038
-
1039
861
  return cur;
1040
862
  }
1041
-
1042
863
  function updateViewState(state, key, store) {
1043
864
  var newValue = state.get();
1044
-
1045
865
  if (key !== state.key || store !== state.store && store.has(key)) {
1046
866
  newValue = store.get(key);
1047
867
  hooks_emitter.emit('popstate', state, {
1048
868
  newValue: newValue
1049
869
  });
1050
870
  }
1051
-
1052
871
  state.key = key;
1053
872
  state.store = store;
1054
873
  store.set(key, newValue);
1055
874
  }
1056
-
1057
875
  function useViewContextWithEffect(callback, deps) {
1058
876
  var container = useViewContext();
1059
877
  (0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useEffect)(function () {
@@ -1065,12 +883,11 @@ function useViewContextWithEffect(callback, deps) {
1065
883
  }, deps);
1066
884
  return container;
1067
885
  }
1068
-
1069
886
  function useAppReady() {
1070
887
  return useAppReadyState().ready;
1071
888
  }
1072
889
  function useAppReadyState() {
1073
- var readyState = (0,external_zeta_dom_react_.useObservableProperty)(app_app, 'readyState');
890
+ var readyState = (0,external_commonjs_zeta_dom_react_commonjs2_zeta_dom_react_amd_zeta_dom_react_root_zeta_react_.useObservableProperty)(app_app, 'readyState');
1074
891
  return {
1075
892
  ready: readyState === 'ready',
1076
893
  error: readyState === 'error'
@@ -1079,41 +896,24 @@ function useAppReadyState() {
1079
896
  function useRouteParam(name, defaultValue) {
1080
897
  var container = useViewContext();
1081
898
  var params = container.page.params;
1082
- var route = app_app.route;
1083
899
  var value = params[name] || '';
1084
900
  var ref = (0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useRef)(value);
1085
- var forceUpdate = (0,external_zeta_dom_react_.useUpdateTrigger)();
901
+ var forceUpdate = (0,external_commonjs_zeta_dom_react_commonjs2_zeta_dom_react_amd_zeta_dom_react_root_zeta_react_.useUpdateTrigger)();
1086
902
  (0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useEffect)(function () {
1087
903
  var setValue = function setValue() {
1088
- var current = route[name] || '';
1089
-
904
+ var current = container.page.params[name] || '';
1090
905
  if (current !== ref.current) {
1091
- if (container.active) {
1092
- ref.current = current;
1093
- forceUpdate();
1094
- } else {
1095
- watch(container, 'active', setValue);
1096
- }
906
+ forceUpdate();
1097
907
  }
1098
- }; // route parameter might be changed after state initialization and before useEffect hook is called
1099
-
1100
-
908
+ };
909
+ // route parameter might be changed after state initialization and before useEffect hook is called
1101
910
  setValue();
1102
-
1103
- if (name in route) {
1104
- return route.watch(name, function () {
1105
- setImmediateOnce(setValue);
1106
- });
1107
- }
1108
-
1109
- console.error('Route parameter ' + name + ' does not exist');
1110
- }, [name, defaultValue]);
911
+ return container.on('pagechange', setValue);
912
+ }, [name]);
1111
913
  ref.current = value;
1112
-
1113
914
  if (defaultValue && container.active && (!value || name === 'remainingSegments' && value === '/')) {
1114
- app_app.navigate(route.getPath(extend({}, params, kv(name, defaultValue))), true);
915
+ app_app.navigate(app_app.route.getPath(extend({}, params, kv(name, defaultValue))), true);
1115
916
  }
1116
-
1117
917
  return value;
1118
918
  }
1119
919
  function useRouteState(key, defaultValue, snapshotOnUpdate) {
@@ -1124,14 +924,12 @@ function useRouteState(key, defaultValue, snapshotOnUpdate) {
1124
924
  return cur.has(key) ? cur.get(key) : (cur.set(key, oldValue), oldValue);
1125
925
  });
1126
926
  }, [key]);
1127
-
1128
927
  if (!cur) {
1129
928
  // delay app ready to ensure that beforepageload event can be caught
1130
929
  app_app.beforeInit(delay(1));
1131
930
  } else if (container.active) {
1132
931
  updatePersistedValue(cur, key, state[0], snapshotOnUpdate);
1133
932
  }
1134
-
1135
933
  return state;
1136
934
  }
1137
935
  function ViewStateContainer(props) {
@@ -1145,27 +943,21 @@ function ViewStateContainer(props) {
1145
943
  return {
1146
944
  getState: function getState(uniqueId, key) {
1147
945
  var state = cache[uniqueId];
1148
-
1149
946
  if (state && container.active) {
1150
947
  updateViewState(state, key, getCurrentStates());
1151
948
  }
1152
-
1153
949
  return state || (cache[uniqueId] = new ViewState(key, function () {
1154
950
  delete cache[uniqueId];
1155
951
  }));
1156
952
  }
1157
953
  };
1158
954
  })[0];
1159
- return /*#__PURE__*/(0,external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement)(external_zeta_dom_react_.ViewStateProvider, {
955
+ return /*#__PURE__*/(0,external_commonjs_react_commonjs2_react_amd_react_root_React_.createElement)(external_commonjs_zeta_dom_react_commonjs2_zeta_dom_react_amd_zeta_dom_react_root_zeta_react_.ViewStateProvider, {
1160
956
  value: provider
1161
957
  }, props.children);
1162
958
  }
1163
959
  // EXTERNAL MODULE: external "waterpipe"
1164
- var external_waterpipe_ = __webpack_require__(28);
1165
- ;// CONCATENATED MODULE: ./src/include/external/waterpipe.js
1166
- // @ts-nocheck
1167
-
1168
- /* harmony default export */ const waterpipe = (external_waterpipe_);
960
+ var external_waterpipe_ = __webpack_require__(87);
1169
961
  ;// CONCATENATED MODULE: ./src/i18n.js
1170
962
 
1171
963
 
@@ -1173,23 +965,19 @@ var external_waterpipe_ = __webpack_require__(28);
1173
965
 
1174
966
  var empty = Object.create(null);
1175
967
  var toPrimitive = typeof Symbol === 'function' && Symbol.toPrimitive;
1176
-
1177
968
  function TString(toString) {
1178
969
  this.toString = toString;
1179
970
  }
1180
-
1181
971
  if (toPrimitive) {
1182
972
  TString.prototype[toPrimitive] = function () {
1183
973
  return this.toString();
1184
974
  };
1185
975
  }
1186
-
1187
976
  function createCallback(translate) {
1188
977
  var callback = function callback(key, data, lang) {
1189
978
  var result = translate(key, data, lang, true);
1190
979
  return result !== undefined ? result : key;
1191
980
  };
1192
-
1193
981
  return extend(callback, {
1194
982
  html: function html(id, data, lang) {
1195
983
  return {
@@ -1201,38 +989,31 @@ function createCallback(translate) {
1201
989
  }
1202
990
  });
1203
991
  }
1204
-
1205
992
  function useLanguage() {
1206
- return (0,external_zeta_dom_react_.useObservableProperty)(app_app, 'language');
993
+ return (0,external_commonjs_zeta_dom_react_commonjs2_zeta_dom_react_amd_zeta_dom_react_root_zeta_react_.useObservableProperty)(app_app, 'language');
1207
994
  }
1208
995
  function makeTranslation(resources, defaultLang) {
1209
996
  var re = new RegExp('^(' + Object.keys(resources[defaultLang]).join('|') + ')\\.');
1210
997
  var cache = {};
1211
-
1212
998
  function getTranslation(prefix, name, data, noEncode, lang) {
1213
999
  var str = ((resources[lang] || empty)[prefix] || empty)[name];
1214
-
1215
1000
  if (typeof str === 'string') {
1216
1001
  if (str && (!noEncode || data !== undefined)) {
1217
- return waterpipe(str, data, {
1002
+ return external_waterpipe_(str, data, {
1218
1003
  noEncode: noEncode
1219
1004
  });
1220
1005
  }
1221
-
1222
1006
  return str;
1223
1007
  }
1224
-
1225
1008
  if (lang !== defaultLang) {
1226
1009
  return getTranslation(prefix, name, data, noEncode, defaultLang);
1227
1010
  }
1228
1011
  }
1229
-
1230
1012
  function translate(key, data, lang, noEncode) {
1231
1013
  var prefix = re.test(key) ? RegExp.$1 : '';
1232
1014
  var name = prefix ? key.slice(RegExp.lastMatch.length) : key;
1233
1015
  return getTranslation(prefix, name, data, noEncode, lang || app_app.language);
1234
1016
  }
1235
-
1236
1017
  function getTranslationCallback() {
1237
1018
  var currentLang = String(this);
1238
1019
  var prefix = makeArray(arguments);
@@ -1246,7 +1027,6 @@ function makeTranslation(resources, defaultLang) {
1246
1027
  return translate(key, data, lang || currentLang, noEncode);
1247
1028
  }));
1248
1029
  }
1249
-
1250
1030
  function useTranslation() {
1251
1031
  var language = useLanguage();
1252
1032
  var t = getTranslationCallback.apply(language, arguments);
@@ -1255,7 +1035,6 @@ function makeTranslation(resources, defaultLang) {
1255
1035
  t: t
1256
1036
  };
1257
1037
  }
1258
-
1259
1038
  return {
1260
1039
  translate: createCallback(translate),
1261
1040
  getTranslation: getTranslationCallback.bind(''),
@@ -1303,11 +1082,9 @@ util_define(Mixin, {
1303
1082
  get scrollableTarget() {
1304
1083
  return new StaticAttributeMixin('scrollable-target');
1305
1084
  },
1306
-
1307
1085
  get tabRoot() {
1308
1086
  return new StaticAttributeMixin('tab-root');
1309
1087
  },
1310
-
1311
1088
  use: function use() {
1312
1089
  var args = makeArray(arguments);
1313
1090
  var ref = args[0];
@@ -1318,7 +1095,6 @@ util_define(Mixin, {
1318
1095
  var refs = mixins.map(function (v) {
1319
1096
  return v.getRef();
1320
1097
  });
1321
-
1322
1098
  if (ref && !(ref instanceof Mixin)) {
1323
1099
  if (typeof ref !== 'function') {
1324
1100
  refs.push(function (v) {
@@ -1327,18 +1103,16 @@ util_define(Mixin, {
1327
1103
  } else {
1328
1104
  refs.push(ref);
1329
1105
  }
1330
-
1331
1106
  args.shift();
1332
1107
  } else if (!ref) {
1333
1108
  args.shift();
1334
1109
  }
1335
-
1336
1110
  each(mixins, function (i, v) {
1337
1111
  extend(props, v.getCustomAttributes());
1338
1112
  });
1339
1113
  extend(props, {
1340
1114
  ref: combineFn(refs),
1341
- className: external_zeta_dom_react_.classNames.apply(null, args)
1115
+ className: external_commonjs_zeta_dom_react_commonjs2_zeta_dom_react_amd_zeta_dom_react_root_zeta_react_.classNames.apply(null, args)
1342
1116
  });
1343
1117
  each(mixins, function (i, v) {
1344
1118
  v.next();
@@ -1346,27 +1120,19 @@ util_define(Mixin, {
1346
1120
  return props;
1347
1121
  }
1348
1122
  });
1349
- ;// CONCATENATED MODULE: ./tmp/zeta-dom/observe.js
1123
+ ;// CONCATENATED MODULE: ./|umd|/zeta-dom/observe.js
1350
1124
 
1351
1125
  var observe_lib$dom = external_commonjs_zeta_dom_commonjs2_zeta_dom_amd_zeta_dom_root_zeta_.dom,
1352
- observe = observe_lib$dom.observe,
1353
- registerCleanup = observe_lib$dom.registerCleanup,
1354
- createAutoCleanupMap = observe_lib$dom.createAutoCleanupMap,
1355
- afterDetached = observe_lib$dom.afterDetached,
1356
- watchElements = observe_lib$dom.watchElements,
1357
- watchAttributes = observe_lib$dom.watchAttributes,
1358
- watchOwnAttributes = observe_lib$dom.watchOwnAttributes;
1126
+ watchElements = observe_lib$dom.watchElements,
1127
+ watchOwnAttributes = observe_lib$dom.watchOwnAttributes;
1359
1128
 
1360
1129
  ;// CONCATENATED MODULE: ./src/mixins/StatefulMixin.js
1361
1130
 
1362
1131
 
1363
-
1364
1132
  var StatefulMixin_ = createPrivateStore();
1365
-
1366
1133
  function MixinRefImpl(mixin) {
1367
1134
  this.mixin = mixin;
1368
1135
  }
1369
-
1370
1136
  definePrototype(MixinRefImpl, {
1371
1137
  getMixin: function getMixin() {
1372
1138
  return this.mixin;
@@ -1374,7 +1140,6 @@ definePrototype(MixinRefImpl, {
1374
1140
  });
1375
1141
  function StatefulMixin() {
1376
1142
  Mixin.call(this);
1377
-
1378
1143
  StatefulMixin_(this, {
1379
1144
  elements: new Set(),
1380
1145
  states: new WeakMap(),
@@ -1385,14 +1150,11 @@ function StatefulMixin() {
1385
1150
  definePrototype(StatefulMixin, Mixin, {
1386
1151
  get ref() {
1387
1152
  var state = StatefulMixin_(this);
1388
-
1389
1153
  return state.ref || (state.ref = new MixinRefImpl(this));
1390
1154
  },
1391
-
1392
1155
  get state() {
1393
1156
  return StatefulMixin_(this).pending;
1394
1157
  },
1395
-
1396
1158
  reset: function reset() {
1397
1159
  StatefulMixin_(this).pending = {};
1398
1160
  return this;
@@ -1403,15 +1165,12 @@ definePrototype(StatefulMixin, Mixin, {
1403
1165
  },
1404
1166
  getRef: function getRef() {
1405
1167
  var self = this;
1406
-
1407
1168
  var obj = StatefulMixin_(self);
1408
-
1409
1169
  var newState = obj.pending;
1410
1170
  var state;
1411
1171
  return function (current) {
1412
1172
  if (current) {
1413
1173
  state = obj.states.get(current) || extend(self.initState(), newState);
1414
-
1415
1174
  if (state.element !== current) {
1416
1175
  state.element = current;
1417
1176
  self.initElement(current, state);
@@ -1419,7 +1178,6 @@ definePrototype(StatefulMixin, Mixin, {
1419
1178
  } else if (util_keys(newState)[0]) {
1420
1179
  self.mergeState(current, state, newState);
1421
1180
  }
1422
-
1423
1181
  self.onLayoutEffect(current, state);
1424
1182
  obj.elements.add(current);
1425
1183
  } else if (state) {
@@ -1451,7 +1209,6 @@ definePrototype(StatefulMixin, Mixin, {
1451
1209
  },
1452
1210
  dispose: function dispose() {
1453
1211
  var state = StatefulMixin_(this);
1454
-
1455
1212
  combineFn(state.dispose.splice(0))();
1456
1213
  state.flush();
1457
1214
  state.states = {};
@@ -1463,20 +1220,17 @@ definePrototype(StatefulMixin, Mixin, {
1463
1220
 
1464
1221
 
1465
1222
 
1466
-
1467
1223
  function checkState(self, element, state, fireEvent) {
1468
1224
  var classNames = state.classNames;
1469
1225
  var prev = extend({}, classNames);
1470
1226
  each(classNames, function (i) {
1471
1227
  classNames[i] = element.classList.contains(i);
1472
1228
  });
1473
-
1474
1229
  if (fireEvent && !equal(state.prev || prev, classNames)) {
1475
1230
  state.prev = prev;
1476
1231
  self.onClassNameUpdated(element, prev, extend({}, classNames));
1477
1232
  }
1478
1233
  }
1479
-
1480
1234
  function ClassNameMixin(classNames) {
1481
1235
  StatefulMixin.call(this);
1482
1236
  this.classNames = classNames || [];
@@ -1553,12 +1307,8 @@ definePrototype(AnimateSequenceItemMixin, ClassNameMixin, {
1553
1307
  return [this.className].concat(AnimateSequenceItemMixinSuper.getClassNames.call(this));
1554
1308
  }
1555
1309
  });
1556
- // EXTERNAL MODULE: external {"commonjs":"jquery","commonjs2":"jquery","amd":"jquery","root":"jQuery"}
1557
- var external_commonjs_jquery_commonjs2_jquery_amd_jquery_root_jQuery_ = __webpack_require__(47);
1558
- ;// CONCATENATED MODULE: ./src/include/external/jquery.js
1559
- // @ts-nocheck
1560
-
1561
- /* harmony default export */ const jquery = (external_commonjs_jquery_commonjs2_jquery_amd_jquery_root_jQuery_);
1310
+ // EXTERNAL MODULE: external {"commonjs":"jquery","commonjs2":"jquery","amd":"jquery","root":["jQuery"]}
1311
+ var external_commonjs_jquery_commonjs2_jquery_amd_jquery_root_jQuery_ = __webpack_require__(942);
1562
1312
  ;// CONCATENATED MODULE: ./src/mixins/AnimateSequenceMixin.js
1563
1313
 
1564
1314
 
@@ -1589,10 +1339,9 @@ definePrototype(AnimateSequenceMixin, AnimateMixin, {
1589
1339
  initElement: function initElement(element, state) {
1590
1340
  var self = this;
1591
1341
  AnimateSequenceMixinSuper.initElement.call(self, element, state);
1592
-
1593
1342
  if (self.selector) {
1594
1343
  self.onDispose(watchElements(element, self.selector, function (addedNodes) {
1595
- jquery(addedNodes).attr('is-animate-sequence', '');
1344
+ external_commonjs_jquery_commonjs2_jquery_amd_jquery_root_jQuery_(addedNodes).attr('is-animate-sequence', '');
1596
1345
  }));
1597
1346
  }
1598
1347
  }
@@ -1630,8 +1379,8 @@ function FlyoutToggleMixin(mixin) {
1630
1379
  this.flyoutMixin = mixin;
1631
1380
  }
1632
1381
  definePrototype(FlyoutToggleMixin, ClassNameMixin, {
1633
- open: function open(value) {
1634
- return this.flyoutMixin.open(value);
1382
+ open: function open(value, source) {
1383
+ return this.flyoutMixin.open(value, source);
1635
1384
  },
1636
1385
  close: function close(value) {
1637
1386
  return this.flyoutMixin.close(value);
@@ -1640,7 +1389,7 @@ definePrototype(FlyoutToggleMixin, ClassNameMixin, {
1640
1389
  var self = this;
1641
1390
  FlyoutToggleMixinSuper.initElement.call(self, element, state);
1642
1391
  self.onDispose(zeta_dom_dom.on(element, 'click', function () {
1643
- toggleFlyout(self.flyoutMixin.elements()[0], element, self.flyoutMixin.flyoutOptions);
1392
+ toggleFlyout(self.flyoutMixin.elements()[0], element, self.flyoutMixin.getOptions());
1644
1393
  }));
1645
1394
  }
1646
1395
  });
@@ -1665,19 +1414,18 @@ function FlyoutMixin() {
1665
1414
  self.onDispose(function () {
1666
1415
  self.isFlyoutOpened = false;
1667
1416
  self.visible = false;
1417
+ self.toggle.dispose();
1668
1418
  });
1669
1419
  }
1670
1420
  definePrototype(FlyoutMixin, ClassNameMixin, {
1671
- get flyoutOptions() {
1672
- var options = {};
1673
-
1674
- if (this.initialFocus !== undefined) {
1675
- options.focus = this.initialFocus;
1421
+ getOptions: function getOptions() {
1422
+ var self = this;
1423
+ var options = pick(self, ['closeOnBlur']);
1424
+ if (self.initialFocus !== undefined) {
1425
+ options.focus = self.initialFocus;
1676
1426
  }
1677
-
1678
1427
  return options;
1679
1428
  },
1680
-
1681
1429
  next: function next() {
1682
1430
  this.effects = undefined;
1683
1431
  return FlyoutMixinSuper.next.call(this);
@@ -1701,10 +1449,12 @@ definePrototype(FlyoutMixin, ClassNameMixin, {
1701
1449
  'animate-out': ''
1702
1450
  });
1703
1451
  },
1704
- open: function open(value) {
1452
+ open: function open(value, source) {
1705
1453
  var element = this.elements()[0];
1706
- valueMap.set(element, value);
1707
- return openFlyout(element, null, this.flyoutOptions);
1454
+ if (!isFlyoutOpen(element)) {
1455
+ valueMap.set(element, value);
1456
+ }
1457
+ return openFlyout(element, source, this.getOptions());
1708
1458
  },
1709
1459
  close: function close(value) {
1710
1460
  return closeFlyout(this.elements()[0], value);
@@ -1737,8 +1487,12 @@ definePrototype(FlyoutMixin, ClassNameMixin, {
1737
1487
  },
1738
1488
  onClassNameUpdated: function onClassNameUpdated(element, prevState, state) {
1739
1489
  var self = this;
1490
+ var isFlyoutOpened = isFlyoutOpen(element);
1491
+ if (!isFlyoutOpened) {
1492
+ valueMap["delete"](element);
1493
+ }
1740
1494
  self.visible = state.open;
1741
- self.isFlyoutOpened = state.open && !state.closing && !state['tweening-out'];
1495
+ self.isFlyoutOpened = isFlyoutOpened;
1742
1496
  }
1743
1497
  });
1744
1498
  ;// CONCATENATED MODULE: ./src/mixins/FocusStateMixin.js
@@ -1757,16 +1511,13 @@ definePrototype(FocusStateMixin, StatefulMixin, {
1757
1511
  },
1758
1512
  initElement: function initElement(element, state) {
1759
1513
  FocusStateMixinSuper.initElement.call(this, element, state);
1760
-
1761
1514
  var checkTarget = function checkTarget(callback, arg) {
1762
1515
  var ref = state.ref;
1763
1516
  var target = ref && (typeof ref === 'string' ? element.querySelector(ref) : ref.current);
1764
-
1765
1517
  if (target && !zeta_dom_dom.focused(target)) {
1766
1518
  callback(arg || target);
1767
1519
  }
1768
1520
  };
1769
-
1770
1521
  this.onDispose(zeta_dom_dom.on(element, {
1771
1522
  focusin: function focusin(e) {
1772
1523
  state.focused = e.source;
@@ -1786,11 +1537,9 @@ definePrototype(FocusStateMixin, StatefulMixin, {
1786
1537
  setClass(element, 'focused', state.focused);
1787
1538
  }
1788
1539
  });
1789
- ;// CONCATENATED MODULE: ./tmp/brew-js/directive.js
1540
+ ;// CONCATENATED MODULE: ./|umd|/brew-js/directive.js
1790
1541
 
1791
- var getDirectiveComponent = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.getDirectiveComponent,
1792
- registerSimpleDirective = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.registerSimpleDirective,
1793
- registerDirective = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.registerDirective;
1542
+ var getDirectiveComponent = external_commonjs_brew_js_commonjs2_brew_js_amd_brew_js_root_brew_.getDirectiveComponent;
1794
1543
 
1795
1544
  ;// CONCATENATED MODULE: ./src/mixins/LoadingStateMixin.js
1796
1545
 
@@ -1891,7 +1640,6 @@ definePrototype(ScrollIntoViewMixin, StatefulMixin, {
1891
1640
  if (newState.deps && !equal(newState.deps, state.deps)) {
1892
1641
  setImmediateOnce(state.callback);
1893
1642
  }
1894
-
1895
1643
  extend(state, newState);
1896
1644
  }
1897
1645
  });
@@ -1924,11 +1672,9 @@ definePrototype(UnmanagedClassNameMixin, ClassNameMixin, {
1924
1672
 
1925
1673
 
1926
1674
 
1927
-
1928
1675
  function extendSelf(options) {
1929
1676
  extend(this, options);
1930
1677
  }
1931
-
1932
1678
  function createUseFunction(ctor) {
1933
1679
  return function () {
1934
1680
  var mixin = useMixin(ctor);
@@ -1936,18 +1682,17 @@ function createUseFunction(ctor) {
1936
1682
  return mixin;
1937
1683
  };
1938
1684
  }
1939
-
1940
- var useAnimateMixin = createUseFunction(AnimateMixin);
1941
- var useAnimateSequenceMixin = createUseFunction(AnimateSequenceMixin);
1942
- var useClassNameToggleMixin = createUseFunction(ClassNameToggleMixin);
1943
- var useFlyoutMixin = createUseFunction(FlyoutMixin);
1944
- var useFocusStateMixin = createUseFunction(FocusStateMixin);
1945
- var useLoadingStateMixin = createUseFunction(LoadingStateMixin);
1946
- var useScrollableMixin = createUseFunction(ScrollableMixin);
1947
- var useScrollIntoViewMixin = createUseFunction(ScrollIntoViewMixin);
1948
- var useUnmanagedClassNameMixin = createUseFunction(UnmanagedClassNameMixin);
1685
+ var useAnimateMixin = /*#__PURE__*/createUseFunction(AnimateMixin);
1686
+ var useAnimateSequenceMixin = /*#__PURE__*/createUseFunction(AnimateSequenceMixin);
1687
+ var useClassNameToggleMixin = /*#__PURE__*/createUseFunction(ClassNameToggleMixin);
1688
+ var useFlyoutMixin = /*#__PURE__*/createUseFunction(FlyoutMixin);
1689
+ var useFocusStateMixin = /*#__PURE__*/createUseFunction(FocusStateMixin);
1690
+ var useLoadingStateMixin = /*#__PURE__*/createUseFunction(LoadingStateMixin);
1691
+ var useScrollableMixin = /*#__PURE__*/createUseFunction(ScrollableMixin);
1692
+ var useScrollIntoViewMixin = /*#__PURE__*/createUseFunction(ScrollIntoViewMixin);
1693
+ var useUnmanagedClassNameMixin = /*#__PURE__*/createUseFunction(UnmanagedClassNameMixin);
1949
1694
  function useMixin(ctor) {
1950
- return (0,external_zeta_dom_react_.useSingleton)(function () {
1695
+ return (0,external_commonjs_zeta_dom_react_commonjs2_zeta_dom_react_amd_zeta_dom_react_root_zeta_react_.useSingleton)(function () {
1951
1696
  return new ctor();
1952
1697
  }).reset();
1953
1698
  }
@@ -1957,7 +1702,7 @@ function useMixinRef(mixin) {
1957
1702
 
1958
1703
  ;// CONCATENATED MODULE: ./src/index.js
1959
1704
 
1960
- /* harmony default export */ const src = (brew_js_app);
1705
+ /* harmony default export */ const src = ((/* unused pure expression or super */ null && (brew)));
1961
1706
 
1962
1707
 
1963
1708
 
@@ -1965,12 +1710,13 @@ function useMixinRef(mixin) {
1965
1710
 
1966
1711
  ;// CONCATENATED MODULE: ./src/entry.js
1967
1712
 
1968
- /* harmony default export */ const entry = (src_namespaceObject);
1713
+ defineGetterProperty(window, 'brew-js-react', function () {
1714
+ console.warn('window["brew-js-react"] is deprecated, access brew.react instead.');
1715
+ return brew.react;
1716
+ });
1969
1717
 
1970
- brew_js_app.react = src_namespaceObject;
1971
1718
  })();
1972
1719
 
1973
- __webpack_exports__ = __webpack_exports__["default"];
1974
1720
  /******/ return __webpack_exports__;
1975
1721
  /******/ })()
1976
1722
  ;