unpoly-rails 2.6.0 → 2.7.1

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.
@@ -8,7 +8,7 @@
8
8
  @module up
9
9
  */
10
10
  window.up = {
11
- version: '2.6.0'
11
+ version: '2.7.1'
12
12
  };
13
13
 
14
14
 
@@ -51,6 +51,8 @@ You will recognize many functions form other utility libraries like [Lodash](htt
51
51
  While feature parity with Lodash is not a goal of `up.util`, you might find it sufficient
52
52
  to not include another library in your asset bundle.
53
53
 
54
+ @see url-patterns
55
+
54
56
  @module up.util
55
57
  */
56
58
  up.util = (function () {
@@ -2357,7 +2359,7 @@ up.browser = (function () {
2357
2359
 
2358
2360
  /***/ }),
2359
2361
  /* 7 */
2360
- /***/ (function() {
2362
+ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
2361
2363
 
2362
2364
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2363
2365
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
@@ -2368,6 +2370,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2368
2370
  }
2369
2371
  return to.concat(ar || Array.prototype.slice.call(from));
2370
2372
  };
2373
+ __webpack_require__(8);
2371
2374
  /*-
2372
2375
  DOM helpers
2373
2376
  ===========
@@ -2636,44 +2639,89 @@ up.element = (function () {
2636
2639
  /*-
2637
2640
  Hides the given element.
2638
2641
 
2639
- The element is hidden by setting an [inline style](https://www.codecademy.com/articles/html-inline-styles)
2640
- of `{ display: none }`.
2642
+ Also see `up.element.show()` and `up.element.toggle()`.
2643
+
2644
+ ### Implementation
2641
2645
 
2642
- Also see `up.element.show()`.
2646
+ The element is hidden by setting an `[hidden]` attribute.
2647
+ This effectively gives the element a `display: none` rule.
2648
+
2649
+ To customize the CSS rule for hiding, see `[hidden]`.
2643
2650
 
2644
2651
  @function up.element.hide
2645
2652
  @param {Element} element
2646
2653
  @stable
2647
2654
  */
2648
2655
  function hide(element) {
2649
- element.style.display = 'none';
2656
+ // Set an attribute that the user can style with custom "hidden" styles.
2657
+ // E.g. certain JavaScript components cannot initialize properly within a
2658
+ // { display: none }, as such an element has no width or height.
2659
+ element.setAttribute('hidden', '');
2660
+ }
2661
+ /*-
2662
+ Elements with this attribute are hidden from the page.
2663
+
2664
+ While `[hidden]` is a [standard HTML attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden)
2665
+ its default implementation is [not very useful](https://meowni.ca/hidden.is.a.lie.html).
2666
+ In particular it cannot hide elements with any `display` rule.
2667
+ Unpoly improves the default CSS styles of `[hidden]` so it can hide arbitrary elements.
2668
+
2669
+ ## Customizing the CSS
2670
+
2671
+ Unpoly's default styles for `[hidden]` look like this:
2672
+
2673
+ ```css
2674
+ [hidden][hidden] {
2675
+ display: none !important;
2676
+ }
2677
+ ```
2678
+
2679
+ You can override the CSS to hide an element in a different way, e.g. by giving it a zero height:
2680
+
2681
+ ```css
2682
+ .my-element[hidden] {
2683
+ display: block !important;
2684
+ height: 0 !important;
2650
2685
  }
2686
+ ```
2687
+
2688
+ Note that any overriding selector must have a [specificity of `(0, 2, 0)`](https://polypane.app/css-specificity-calculator/#selector=.element%5Bhidden%5D).
2689
+ Also all rules should be defined with [`!important`](https://www.w3schools.com/css/css_important.asp) to override other
2690
+ styles defined on that element.
2691
+
2692
+ @selector [hidden]
2693
+ @experimental
2694
+ */
2651
2695
  /*-
2652
2696
  Shows the given element.
2653
2697
 
2654
- Also see `up.element.hide()`.
2698
+ Also see `up.element.hide()` and `up.element.toggle()`.
2655
2699
 
2656
2700
  ### Limitations
2657
2701
 
2658
- The element is shown by setting an [inline style](https://www.codecademy.com/articles/html-inline-styles)
2659
- of `{ display: '' }`.
2702
+ The element is shown by removing the `[hidden]` attribute set by `up.element.hide()`.
2703
+ In case the element is hidden by an inline style (`[style="display: none"]`),
2704
+ that inline style is also removed.
2660
2705
 
2661
- You might have CSS rules causing the element to remain hidden after calling `up.element.show(element)`.
2662
- Unpoly will not handle such cases in order to keep this function performant. As a workaround, you may
2663
- manually set the `element.style.display` property. Also see discussion
2664
- in jQuery issues [#88](https://github.com/jquery/jquery.com/issues/88),
2665
- [#2057](https://github.com/jquery/jquery/issues/2057) and
2666
- [this WHATWG mailing list post](http://lists.w3.org/Archives/Public/public-whatwg-archive/2014Apr/0094.html).
2706
+ You may have CSS rules causing the element to remain hidden after calling `up.element.show(element)`.
2707
+ Unpoly will *not* handle such cases in order to keep this function performant. As a workaround, you may
2708
+ manually set `element.style.display = 'block'`.
2667
2709
 
2668
2710
  @function up.element.show
2669
2711
  @param {Element} element
2670
2712
  @stable
2671
2713
  */
2672
2714
  function show(element) {
2673
- element.style.display = '';
2715
+ // Remove the attribute set by `up.element.hide()`.
2716
+ element.removeAttribute('hidden');
2717
+ // In case the element was manually hidden through an inline style
2718
+ // of `display: none`, we also remove that.
2719
+ if (element.style.display === 'none') {
2720
+ element.style.display = '';
2721
+ }
2674
2722
  }
2675
2723
  /*-
2676
- Display or hide the given element, depending on its current visibility.
2724
+ Changes whether the given element is [shown](/up.element.show) or [hidden](/up.element.hide).
2677
2725
 
2678
2726
  @function up.element.toggle
2679
2727
  @param {Element} element
@@ -2689,10 +2737,6 @@ up.element = (function () {
2689
2737
  }
2690
2738
  (newVisible ? show : hide)(element);
2691
2739
  }
2692
- // trace = (fn) ->
2693
- // (args...) ->
2694
- // console.debug("Calling %o with %o", fn, args)
2695
- // fn(args...)
2696
2740
  /*-
2697
2741
  Adds or removes the given class from the given element.
2698
2742
 
@@ -3647,6 +3691,12 @@ up.element = (function () {
3647
3691
  /* 8 */
3648
3692
  /***/ (function() {
3649
3693
 
3694
+
3695
+
3696
+ /***/ }),
3697
+ /* 9 */
3698
+ /***/ (function() {
3699
+
3650
3700
  var u = up.util;
3651
3701
  up.Record = /** @class */ (function () {
3652
3702
  function Record(options) {
@@ -3677,7 +3727,7 @@ up.Record = /** @class */ (function () {
3677
3727
 
3678
3728
 
3679
3729
  /***/ }),
3680
- /* 9 */
3730
+ /* 10 */
3681
3731
  /***/ (function() {
3682
3732
 
3683
3733
  var u = up.util;
@@ -3695,18 +3745,9 @@ up.Config = /** @class */ (function () {
3695
3745
 
3696
3746
 
3697
3747
  /***/ }),
3698
- /* 10 */
3748
+ /* 11 */
3699
3749
  /***/ (function() {
3700
3750
 
3701
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3702
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3703
- if (ar || !(i in from)) {
3704
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
3705
- ar[i] = from[i];
3706
- }
3707
- }
3708
- return to.concat(ar || Array.prototype.slice.call(from));
3709
- };
3710
3751
  var u = up.util;
3711
3752
  /*-
3712
3753
  @class up.Cache
@@ -3721,8 +3762,6 @@ up.Cache = /** @class */ (function () {
3721
3762
  @param {number|Function(): number} [config.expiry]
3722
3763
  The number of milliseconds after which a cache entry
3723
3764
  will be discarded.
3724
- @param {string} [config.logPrefix]
3725
- A prefix for log entries printed by this cache object.
3726
3765
  @param {Function(entry): string} [config.key]
3727
3766
  A function that takes an argument and returns a string key
3728
3767
  for storage. If omitted, `toString()` is called on the argument.
@@ -3760,16 +3799,6 @@ up.Cache = /** @class */ (function () {
3760
3799
  Cache.prototype.clear = function () {
3761
3800
  this.store.clear();
3762
3801
  };
3763
- Cache.prototype.log = function () {
3764
- var args = [];
3765
- for (var _i = 0; _i < arguments.length; _i++) {
3766
- args[_i] = arguments[_i];
3767
- }
3768
- if (this.config.logPrefix) {
3769
- args[0] = "[".concat(this.config.logPrefix, "] ").concat(args[0]);
3770
- up.puts.apply(up, __spreadArray(['up.Cache'], args, false));
3771
- }
3772
- };
3773
3802
  Cache.prototype.keys = function () {
3774
3803
  return this.store.keys();
3775
3804
  };
@@ -3834,36 +3863,24 @@ up.Cache = /** @class */ (function () {
3834
3863
  return true;
3835
3864
  }
3836
3865
  };
3837
- Cache.prototype.get = function (key, options) {
3838
- if (options === void 0) { options = {}; }
3866
+ Cache.prototype.get = function (key) {
3839
3867
  var storeKey = this.normalizeStoreKey(key);
3840
3868
  var entry = this.store.get(storeKey);
3841
3869
  if (entry) {
3842
3870
  if (this.isFresh(entry)) {
3843
- if (!options.silent) {
3844
- this.log("Cache hit for '%s'", key);
3845
- }
3846
3871
  return entry.value;
3847
3872
  }
3848
3873
  else {
3849
- if (!options.silent) {
3850
- this.log("Discarding stale cache entry for '%s'", key);
3851
- }
3852
3874
  this.remove(key);
3853
3875
  }
3854
3876
  }
3855
- else {
3856
- if (!options.silent) {
3857
- this.log("Cache miss for '%s'", key);
3858
- }
3859
- }
3860
3877
  };
3861
3878
  return Cache;
3862
3879
  }());
3863
3880
 
3864
3881
 
3865
3882
  /***/ }),
3866
- /* 11 */
3883
+ /* 12 */
3867
3884
  /***/ (function() {
3868
3885
 
3869
3886
  var __extends = (this && this.__extends) || (function () {
@@ -3916,7 +3933,7 @@ up.Rect = /** @class */ (function (_super) {
3916
3933
 
3917
3934
 
3918
3935
  /***/ }),
3919
- /* 12 */
3936
+ /* 13 */
3920
3937
  /***/ (function() {
3921
3938
 
3922
3939
  var e = up.element;
@@ -3988,7 +4005,7 @@ up.BodyShifter = /** @class */ (function () {
3988
4005
 
3989
4006
 
3990
4007
  /***/ }),
3991
- /* 13 */
4008
+ /* 14 */
3992
4009
  /***/ (function() {
3993
4010
 
3994
4011
  var u = up.util;
@@ -4024,7 +4041,7 @@ up.Change = /** @class */ (function () {
4024
4041
 
4025
4042
 
4026
4043
  /***/ }),
4027
- /* 14 */
4044
+ /* 15 */
4028
4045
  /***/ (function() {
4029
4046
 
4030
4047
  var __extends = (this && this.__extends) || (function () {
@@ -4126,7 +4143,7 @@ up.Change.Addition = /** @class */ (function (_super) {
4126
4143
 
4127
4144
 
4128
4145
  /***/ }),
4129
- /* 15 */
4146
+ /* 16 */
4130
4147
  /***/ (function() {
4131
4148
 
4132
4149
  var __extends = (this && this.__extends) || (function () {
@@ -4154,7 +4171,7 @@ up.Change.Removal = /** @class */ (function (_super) {
4154
4171
 
4155
4172
 
4156
4173
  /***/ }),
4157
- /* 16 */
4174
+ /* 17 */
4158
4175
  /***/ (function() {
4159
4176
 
4160
4177
  var __extends = (this && this.__extends) || (function () {
@@ -4286,7 +4303,7 @@ up.Change.DestroyFragment = /** @class */ (function (_super) {
4286
4303
 
4287
4304
 
4288
4305
  /***/ }),
4289
- /* 17 */
4306
+ /* 18 */
4290
4307
  /***/ (function() {
4291
4308
 
4292
4309
  var __extends = (this && this.__extends) || (function () {
@@ -4484,7 +4501,7 @@ up.Change.OpenLayer = /** @class */ (function (_super) {
4484
4501
 
4485
4502
 
4486
4503
  /***/ }),
4487
- /* 18 */
4504
+ /* 19 */
4488
4505
  /***/ (function() {
4489
4506
 
4490
4507
  var __extends = (this && this.__extends) || (function () {
@@ -4960,7 +4977,7 @@ up.Change.UpdateLayer = /** @class */ (function (_super) {
4960
4977
 
4961
4978
 
4962
4979
  /***/ }),
4963
- /* 19 */
4980
+ /* 20 */
4964
4981
  /***/ (function() {
4965
4982
 
4966
4983
  var __extends = (this && this.__extends) || (function () {
@@ -5021,10 +5038,13 @@ up.Change.CloseLayer = /** @class */ (function (_super) {
5021
5038
  };
5022
5039
  CloseLayer.prototype.emitCloseEvent = function () {
5023
5040
  // The close event is emitted on the layer that is about to close.
5024
- return this.layer.emit(this.buildEvent("up:layer:".concat(this.verb)), {
5041
+ var event = this.layer.emit(this.buildEvent("up:layer:".concat(this.verb)), {
5025
5042
  callback: this.layer.callback("on".concat(u.upperCaseFirst(this.verb))),
5026
5043
  log: ["Will ".concat(this.verb, " ").concat(this.layer, " with value %o"), this.value]
5027
5044
  });
5045
+ // Allow an event listener to replace event.value with a new value.
5046
+ this.value = event.value;
5047
+ return event;
5028
5048
  };
5029
5049
  CloseLayer.prototype.emitClosedEvent = function (formerParent) {
5030
5050
  var verbPast = "".concat(this.verb, "ed");
@@ -5066,7 +5086,7 @@ up.Change.CloseLayer = /** @class */ (function (_super) {
5066
5086
 
5067
5087
 
5068
5088
  /***/ }),
5069
- /* 20 */
5089
+ /* 21 */
5070
5090
  /***/ (function() {
5071
5091
 
5072
5092
  var __extends = (this && this.__extends) || (function () {
@@ -5246,7 +5266,7 @@ up.Change.FromContent = /** @class */ (function (_super) {
5246
5266
 
5247
5267
 
5248
5268
  /***/ }),
5249
- /* 21 */
5269
+ /* 22 */
5250
5270
  /***/ (function() {
5251
5271
 
5252
5272
  var __extends = (this && this.__extends) || (function () {
@@ -5431,7 +5451,7 @@ up.Change.FromURL = /** @class */ (function (_super) {
5431
5451
 
5432
5452
 
5433
5453
  /***/ }),
5434
- /* 22 */
5454
+ /* 23 */
5435
5455
  /***/ (function() {
5436
5456
 
5437
5457
  var u = up.util;
@@ -5562,7 +5582,7 @@ up.CompilerPass = /** @class */ (function () {
5562
5582
 
5563
5583
 
5564
5584
  /***/ }),
5565
- /* 23 */
5585
+ /* 24 */
5566
5586
  /***/ (function() {
5567
5587
 
5568
5588
  var u = up.util;
@@ -5691,7 +5711,7 @@ up.CSSTransition = /** @class */ (function () {
5691
5711
 
5692
5712
 
5693
5713
  /***/ }),
5694
- /* 24 */
5714
+ /* 25 */
5695
5715
  /***/ (function() {
5696
5716
 
5697
5717
  var __assign = (this && this.__assign) || function () {
@@ -5748,7 +5768,7 @@ up.DestructorPass = /** @class */ (function () {
5748
5768
 
5749
5769
 
5750
5770
  /***/ }),
5751
- /* 25 */
5771
+ /* 26 */
5752
5772
  /***/ (function() {
5753
5773
 
5754
5774
  var __extends = (this && this.__extends) || (function () {
@@ -5918,7 +5938,7 @@ up.EventEmitter = /** @class */ (function (_super) {
5918
5938
 
5919
5939
 
5920
5940
  /***/ }),
5921
- /* 26 */
5941
+ /* 27 */
5922
5942
  /***/ (function() {
5923
5943
 
5924
5944
  var __extends = (this && this.__extends) || (function () {
@@ -6081,7 +6101,7 @@ up.EventListener = /** @class */ (function (_super) {
6081
6101
 
6082
6102
 
6083
6103
  /***/ }),
6084
- /* 27 */
6104
+ /* 28 */
6085
6105
  /***/ (function() {
6086
6106
 
6087
6107
  var __extends = (this && this.__extends) || (function () {
@@ -6201,7 +6221,7 @@ up.EventListenerGroup = /** @class */ (function (_super) {
6201
6221
 
6202
6222
 
6203
6223
  /***/ }),
6204
- /* 28 */
6224
+ /* 29 */
6205
6225
  /***/ (function() {
6206
6226
 
6207
6227
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
@@ -6345,7 +6365,7 @@ up.FieldObserver = /** @class */ (function () {
6345
6365
 
6346
6366
 
6347
6367
  /***/ }),
6348
- /* 29 */
6368
+ /* 30 */
6349
6369
  /***/ (function() {
6350
6370
 
6351
6371
  var __extends = (this && this.__extends) || (function () {
@@ -6422,7 +6442,7 @@ up.FocusCapsule = /** @class */ (function (_super) {
6422
6442
 
6423
6443
 
6424
6444
  /***/ }),
6425
- /* 30 */
6445
+ /* 31 */
6426
6446
  /***/ (function() {
6427
6447
 
6428
6448
  var __extends = (this && this.__extends) || (function () {
@@ -6502,7 +6522,7 @@ up.FragmentProcessor = /** @class */ (function (_super) {
6502
6522
 
6503
6523
 
6504
6524
  /***/ }),
6505
- /* 31 */
6525
+ /* 32 */
6506
6526
  /***/ (function() {
6507
6527
 
6508
6528
  var DESCENDANT_SELECTOR = /^([^ >+(]+) (.+)$/;
@@ -6541,7 +6561,7 @@ up.FragmentFinder = /** @class */ (function () {
6541
6561
 
6542
6562
 
6543
6563
  /***/ }),
6544
- /* 32 */
6564
+ /* 33 */
6545
6565
  /***/ (function() {
6546
6566
 
6547
6567
  var __extends = (this && this.__extends) || (function () {
@@ -6642,7 +6662,7 @@ up.FragmentFocus = /** @class */ (function (_super) {
6642
6662
 
6643
6663
 
6644
6664
  /***/ }),
6645
- /* 33 */
6665
+ /* 34 */
6646
6666
  /***/ (function() {
6647
6667
 
6648
6668
  var e = up.element;
@@ -6753,7 +6773,7 @@ up.FragmentPolling = /** @class */ (function () {
6753
6773
 
6754
6774
 
6755
6775
  /***/ }),
6756
- /* 34 */
6776
+ /* 35 */
6757
6777
  /***/ (function() {
6758
6778
 
6759
6779
  var __extends = (this && this.__extends) || (function () {
@@ -6862,7 +6882,7 @@ up.FragmentScrolling = /** @class */ (function (_super) {
6862
6882
 
6863
6883
 
6864
6884
  /***/ }),
6865
- /* 35 */
6885
+ /* 36 */
6866
6886
  /***/ (function() {
6867
6887
 
6868
6888
  var u = up.util;
@@ -6905,7 +6925,7 @@ up.HTMLWrapper = /** @class */ (function () {
6905
6925
 
6906
6926
 
6907
6927
  /***/ }),
6908
- /* 36 */
6928
+ /* 37 */
6909
6929
  /***/ (function() {
6910
6930
 
6911
6931
  var __extends = (this && this.__extends) || (function () {
@@ -6945,6 +6965,7 @@ even if that layer is not the frontmost layer. E.g. if you're compiling a fragme
6945
6965
  the background layer during compilation.
6946
6966
 
6947
6967
  @class up.Layer
6968
+ @parent up.layer
6948
6969
  */
6949
6970
  up.Layer = /** @class */ (function (_super) {
6950
6971
  __extends(Layer, _super);
@@ -7601,7 +7622,7 @@ up.Layer = /** @class */ (function (_super) {
7601
7622
  }
7602
7623
  },
7603
7624
  set: function (location) {
7604
- var previousLocation = this.savedLocation;
7625
+ var previousLocation = this.location;
7605
7626
  location = up.history.normalizeURL(location);
7606
7627
  if (previousLocation !== location) {
7607
7628
  this.savedLocation = location;
@@ -7667,7 +7688,7 @@ up.Layer = /** @class */ (function (_super) {
7667
7688
 
7668
7689
 
7669
7690
  /***/ }),
7670
- /* 37 */
7691
+ /* 38 */
7671
7692
  /***/ (function() {
7672
7693
 
7673
7694
  var __extends = (this && this.__extends) || (function () {
@@ -8064,7 +8085,7 @@ up.Layer.Overlay = /** @class */ (function (_super) {
8064
8085
 
8065
8086
 
8066
8087
  /***/ }),
8067
- /* 38 */
8088
+ /* 39 */
8068
8089
  /***/ (function() {
8069
8090
 
8070
8091
  var __extends = (this && this.__extends) || (function () {
@@ -8129,7 +8150,7 @@ up.Layer.OverlayWithTether = /** @class */ (function (_super) {
8129
8150
 
8130
8151
 
8131
8152
  /***/ }),
8132
- /* 39 */
8153
+ /* 40 */
8133
8154
  /***/ (function() {
8134
8155
 
8135
8156
  var __extends = (this && this.__extends) || (function () {
@@ -8201,7 +8222,7 @@ up.Layer.OverlayWithViewport = (_a = /** @class */ (function (_super) {
8201
8222
 
8202
8223
 
8203
8224
  /***/ }),
8204
- /* 40 */
8225
+ /* 41 */
8205
8226
  /***/ (function() {
8206
8227
 
8207
8228
  var __extends = (this && this.__extends) || (function () {
@@ -8295,7 +8316,7 @@ up.Layer.Root = (_a = /** @class */ (function (_super) {
8295
8316
 
8296
8317
 
8297
8318
  /***/ }),
8298
- /* 41 */
8319
+ /* 42 */
8299
8320
  /***/ (function() {
8300
8321
 
8301
8322
  var __extends = (this && this.__extends) || (function () {
@@ -8326,7 +8347,7 @@ up.Layer.Modal = (_a = /** @class */ (function (_super) {
8326
8347
 
8327
8348
 
8328
8349
  /***/ }),
8329
- /* 42 */
8350
+ /* 43 */
8330
8351
  /***/ (function() {
8331
8352
 
8332
8353
  var __extends = (this && this.__extends) || (function () {
@@ -8357,7 +8378,7 @@ up.Layer.Popup = (_a = /** @class */ (function (_super) {
8357
8378
 
8358
8379
 
8359
8380
  /***/ }),
8360
- /* 43 */
8381
+ /* 44 */
8361
8382
  /***/ (function() {
8362
8383
 
8363
8384
  var __extends = (this && this.__extends) || (function () {
@@ -8388,7 +8409,7 @@ up.Layer.Drawer = (_a = /** @class */ (function (_super) {
8388
8409
 
8389
8410
 
8390
8411
  /***/ }),
8391
- /* 44 */
8412
+ /* 45 */
8392
8413
  /***/ (function() {
8393
8414
 
8394
8415
  var __extends = (this && this.__extends) || (function () {
@@ -8419,7 +8440,7 @@ up.Layer.Cover = (_a = /** @class */ (function (_super) {
8419
8440
 
8420
8441
 
8421
8442
  /***/ }),
8422
- /* 45 */
8443
+ /* 46 */
8423
8444
  /***/ (function() {
8424
8445
 
8425
8446
  var __assign = (this && this.__assign) || function () {
@@ -8461,7 +8482,7 @@ up.LayerLookup = /** @class */ (function () {
8461
8482
  }
8462
8483
  this.values = u.splitValues(options.layer);
8463
8484
  this.origin = options.origin;
8464
- this.baseLayer = options.baseLayer || this.stack.current;
8485
+ this.baseLayer = options.baseLayer || this.originLayer() || this.stack.current;
8465
8486
  if (u.isString(this.baseLayer)) {
8466
8487
  // The { baseLayer } option may itself be a string like "parent".
8467
8488
  // In this case we look it up using a new up.LayerLookup instance, using
@@ -8544,7 +8565,7 @@ up.LayerLookup = /** @class */ (function () {
8544
8565
 
8545
8566
 
8546
8567
  /***/ }),
8547
- /* 46 */
8568
+ /* 47 */
8548
8569
  /***/ (function() {
8549
8570
 
8550
8571
  var __extends = (this && this.__extends) || (function () {
@@ -8749,7 +8770,7 @@ up.LayerStack = /** @class */ (function (_super) {
8749
8770
 
8750
8771
 
8751
8772
  /***/ }),
8752
- /* 47 */
8773
+ /* 48 */
8753
8774
  /***/ (function() {
8754
8775
 
8755
8776
  up.LinkFeedbackURLs = /** @class */ (function () {
@@ -8784,7 +8805,7 @@ up.LinkFeedbackURLs = /** @class */ (function () {
8784
8805
 
8785
8806
 
8786
8807
  /***/ }),
8787
- /* 48 */
8808
+ /* 49 */
8788
8809
  /***/ (function() {
8789
8810
 
8790
8811
  var u = up.util;
@@ -8865,7 +8886,7 @@ up.LinkPreloader = /** @class */ (function () {
8865
8886
 
8866
8887
 
8867
8888
  /***/ }),
8868
- /* 49 */
8889
+ /* 50 */
8869
8890
  /***/ (function() {
8870
8891
 
8871
8892
  var __assign = (this && this.__assign) || function () {
@@ -9118,7 +9139,7 @@ up.MotionController = /** @class */ (function () {
9118
9139
 
9119
9140
 
9120
9141
  /***/ }),
9121
- /* 50 */
9142
+ /* 51 */
9122
9143
  /***/ (function() {
9123
9144
 
9124
9145
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
@@ -9249,7 +9270,7 @@ up.NonceableCallback = /** @class */ (function () {
9249
9270
 
9250
9271
 
9251
9272
  /***/ }),
9252
- /* 51 */
9273
+ /* 52 */
9253
9274
  /***/ (function() {
9254
9275
 
9255
9276
  var __assign = (this && this.__assign) || function () {
@@ -9327,7 +9348,7 @@ up.OptionsParser = /** @class */ (function () {
9327
9348
 
9328
9349
 
9329
9350
  /***/ }),
9330
- /* 52 */
9351
+ /* 53 */
9331
9352
  /***/ (function() {
9332
9353
 
9333
9354
  var e = up.element;
@@ -9421,7 +9442,7 @@ up.OverlayFocus = /** @class */ (function () {
9421
9442
 
9422
9443
 
9423
9444
  /***/ }),
9424
- /* 53 */
9445
+ /* 54 */
9425
9446
  /***/ (function() {
9426
9447
 
9427
9448
  var u = up.util;
@@ -9445,6 +9466,7 @@ The following types of parameter representation are supported:
9445
9466
  On IE 11 and Edge, `FormData` payloads require a [polyfill for `FormData#entries()`](https://github.com/jimmywarting/FormData).
9446
9467
 
9447
9468
  @class up.Params
9469
+ @parent up.form
9448
9470
  */
9449
9471
  up.Params = /** @class */ (function () {
9450
9472
  /*-
@@ -9815,7 +9837,7 @@ up.Params = /** @class */ (function () {
9815
9837
  @param {string} name
9816
9838
  @return {any}
9817
9839
  The value of the param with the given name.
9818
- @internal
9840
+ @experimental
9819
9841
  */
9820
9842
  Params.prototype.getFirst = function (name) {
9821
9843
  var entry = u.find(this.entries, this.matchEntryFn(name));
@@ -9830,7 +9852,7 @@ up.Params = /** @class */ (function () {
9830
9852
  @param {string} name
9831
9853
  @return {Array}
9832
9854
  An array of all values with the given name.
9833
- @internal
9855
+ @experimental
9834
9856
  */
9835
9857
  Params.prototype.getAll = function (name) {
9836
9858
  if (this.isArrayKey(name)) {
@@ -10018,7 +10040,7 @@ up.Params = /** @class */ (function () {
10018
10040
 
10019
10041
 
10020
10042
  /***/ }),
10021
- /* 54 */
10043
+ /* 55 */
10022
10044
  /***/ (function() {
10023
10045
 
10024
10046
  var e = up.element;
@@ -10076,7 +10098,7 @@ up.ProgressBar = /** @class */ (function () {
10076
10098
 
10077
10099
 
10078
10100
  /***/ }),
10079
- /* 55 */
10101
+ /* 56 */
10080
10102
  /***/ (function() {
10081
10103
 
10082
10104
  var u = up.util;
@@ -10215,7 +10237,7 @@ up.RenderOptions = (function () {
10215
10237
 
10216
10238
 
10217
10239
  /***/ }),
10218
- /* 56 */
10240
+ /* 57 */
10219
10241
  /***/ (function() {
10220
10242
 
10221
10243
  var __extends = (this && this.__extends) || (function () {
@@ -10245,6 +10267,7 @@ console.log(result.layer) // => up.Layer.Root
10245
10267
  ```
10246
10268
 
10247
10269
  @class up.RenderResult
10270
+ @parent up.fragment
10248
10271
  */
10249
10272
  up.RenderResult = /** @class */ (function (_super) {
10250
10273
  __extends(RenderResult, _super);
@@ -10276,7 +10299,7 @@ up.RenderResult = /** @class */ (function (_super) {
10276
10299
 
10277
10300
 
10278
10301
  /***/ }),
10279
- /* 57 */
10302
+ /* 58 */
10280
10303
  /***/ (function() {
10281
10304
 
10282
10305
  var __extends = (this && this.__extends) || (function () {
@@ -10310,6 +10333,7 @@ console.log(response.text)
10310
10333
  ```
10311
10334
 
10312
10335
  @class up.Request
10336
+ @parent up.network
10313
10337
  */
10314
10338
  up.Request = /** @class */ (function (_super) {
10315
10339
  __extends(Request, _super);
@@ -10578,6 +10602,23 @@ up.Request = /** @class */ (function (_super) {
10578
10602
  'onQueued'
10579
10603
  ];
10580
10604
  };
10605
+ Object.defineProperty(Request.prototype, "xhr", {
10606
+ /*-
10607
+ Returns the underlying `XMLHttpRequest` instance.
10608
+
10609
+ @property up.Request#xhr
10610
+ @param {XMLHttpRequest} xhr
10611
+ @stable
10612
+ */
10613
+ get: function () {
10614
+ var _a;
10615
+ // Initialize the xhr request on first access,
10616
+ // so listeners on up:request:send events have a chance to access the xhr.
10617
+ return (_a = this._xhr) !== null && _a !== void 0 ? _a : (this._xhr = new XMLHttpRequest());
10618
+ },
10619
+ enumerable: false,
10620
+ configurable: true
10621
+ });
10581
10622
  Request.prototype.followState = function (sourceRequest) {
10582
10623
  u.delegate(this, ['deferred', 'state', 'preload'], function () { return sourceRequest; });
10583
10624
  };
@@ -10659,7 +10700,7 @@ up.Request = /** @class */ (function (_super) {
10659
10700
  }
10660
10701
  this.state = 'loading';
10661
10702
  // Convert from XHR's callback-based API to up.Request's promise-based API
10662
- this.xhr = new up.Request.XHRRenderer(this).buildAndSend({
10703
+ new up.Request.XHRRenderer(this).buildAndSend({
10663
10704
  onload: function () { return _this.onXHRLoad(); },
10664
10705
  onerror: function () { return _this.onXHRError(); },
10665
10706
  ontimeout: function () { return _this.onXHRTimeout(); },
@@ -10752,8 +10793,8 @@ up.Request = /** @class */ (function (_super) {
10752
10793
  Request.prototype.abort = function () {
10753
10794
  // setAbortedState() must be called before xhr.abort(), since xhr's event handlers
10754
10795
  // will call setAbortedState() a second time, without a message.
10755
- if (this.setAbortedState() && this.xhr) {
10756
- this.xhr.abort();
10796
+ if (this.setAbortedState() && this._xhr) {
10797
+ this._xhr.abort();
10757
10798
  }
10758
10799
  };
10759
10800
  Request.prototype.setAbortedState = function (reason) {
@@ -10908,7 +10949,7 @@ up.Request.tester = function (condition) {
10908
10949
 
10909
10950
 
10910
10951
  /***/ }),
10911
- /* 58 */
10952
+ /* 59 */
10912
10953
  /***/ (function() {
10913
10954
 
10914
10955
  var __extends = (this && this.__extends) || (function () {
@@ -10975,7 +11016,7 @@ up.Request.Cache = /** @class */ (function (_super) {
10975
11016
 
10976
11017
 
10977
11018
  /***/ }),
10978
- /* 59 */
11019
+ /* 60 */
10979
11020
  /***/ (function() {
10980
11021
 
10981
11022
  var u = up.util;
@@ -11129,7 +11170,7 @@ up.Request.Queue = /** @class */ (function () {
11129
11170
 
11130
11171
 
11131
11172
  /***/ }),
11132
- /* 60 */
11173
+ /* 61 */
11133
11174
  /***/ (function() {
11134
11175
 
11135
11176
  var u = up.util;
@@ -11182,7 +11223,7 @@ up.Request.FormRenderer = /** @class */ (function () {
11182
11223
 
11183
11224
 
11184
11225
  /***/ }),
11185
- /* 61 */
11226
+ /* 62 */
11186
11227
  /***/ (function() {
11187
11228
 
11188
11229
  var CONTENT_TYPE_URL_ENCODED = 'application/x-www-form-urlencoded';
@@ -11193,40 +11234,39 @@ up.Request.XHRRenderer = /** @class */ (function () {
11193
11234
  this.request = request;
11194
11235
  }
11195
11236
  XHRRenderer.prototype.buildAndSend = function (handlers) {
11196
- this.xhr = new XMLHttpRequest();
11237
+ var xhr = this.request.xhr;
11197
11238
  // We copy params since we will modify them below.
11198
11239
  // This would confuse API clients and cache key logic in up.network.
11199
11240
  this.params = u.copy(this.request.params);
11200
11241
  // IE11 explodes it we're setting an undefined timeout property
11201
11242
  if (this.request.timeout) {
11202
- this.xhr.timeout = this.request.timeout;
11243
+ xhr.timeout = this.request.timeout;
11203
11244
  }
11204
11245
  // The XMLHttpRequest method must be opened before we can add headers to it.
11205
- this.xhr.open(this.getMethod(), this.request.url);
11206
- // Add information about the response's intended use so the server may
11246
+ xhr.open(this.getMethod(), this.request.url);
11247
+ // Add information about the response's intended use, so the server may
11207
11248
  // customize or shorten its response.
11208
11249
  var metaProps = this.request.metaProps();
11209
11250
  for (var key in metaProps) {
11210
- this.addHeader(up.protocol.headerize(key), metaProps[key]);
11251
+ this.addHeader(xhr, up.protocol.headerize(key), metaProps[key]);
11211
11252
  }
11212
11253
  for (var header in this.request.headers) {
11213
- this.addHeader(header, this.request.headers[header]);
11254
+ this.addHeader(xhr, header, this.request.headers[header]);
11214
11255
  }
11215
11256
  var csrfHeader, csrfToken;
11216
11257
  if ((csrfHeader = this.request.csrfHeader()) && (csrfToken = this.request.csrfToken())) {
11217
- this.addHeader(csrfHeader, csrfToken);
11258
+ this.addHeader(xhr, csrfHeader, csrfToken);
11218
11259
  }
11219
- this.addHeader(up.protocol.headerize('version'), up.version);
11260
+ this.addHeader(xhr, up.protocol.headerize('version'), up.version);
11220
11261
  // The { contentType } will be missing in case of a FormData payload.
11221
11262
  // In this case the browser will choose a content-type with MIME boundary,
11222
11263
  // like: multipart/form-data; boundary=----WebKitFormBoundaryHkiKAbOweEFUtny8
11223
11264
  var contentType = this.getContentType();
11224
11265
  if (contentType) {
11225
- this.addHeader('Content-Type', contentType);
11266
+ this.addHeader(xhr, 'Content-Type', contentType);
11226
11267
  }
11227
- u.assign(this.xhr, handlers);
11228
- this.xhr.send(this.getPayload());
11229
- return this.xhr;
11268
+ u.assign(xhr, handlers);
11269
+ xhr.send(this.getPayload());
11230
11270
  };
11231
11271
  XHRRenderer.prototype.getMethod = function () {
11232
11272
  // By default HTTP methods other than `GET` or `POST` will be converted into a `POST`
@@ -11249,11 +11289,11 @@ up.Request.XHRRenderer = /** @class */ (function () {
11249
11289
  this.finalizePayload();
11250
11290
  return this.payload;
11251
11291
  };
11252
- XHRRenderer.prototype.addHeader = function (header, value) {
11292
+ XHRRenderer.prototype.addHeader = function (xhr, header, value) {
11253
11293
  if (u.isOptions(value) || u.isArray(value)) {
11254
11294
  value = JSON.stringify(value);
11255
11295
  }
11256
- this.xhr.setRequestHeader(header, value);
11296
+ xhr.setRequestHeader(header, value);
11257
11297
  };
11258
11298
  XHRRenderer.prototype.finalizePayload = function () {
11259
11299
  if (this.payloadFinalized) {
@@ -11290,7 +11330,7 @@ up.Request.XHRRenderer = /** @class */ (function () {
11290
11330
 
11291
11331
 
11292
11332
  /***/ }),
11293
- /* 62 */
11333
+ /* 63 */
11294
11334
  /***/ (function() {
11295
11335
 
11296
11336
  var __extends = (this && this.__extends) || (function () {
@@ -11319,6 +11359,7 @@ A response to an [HTTP request](/up.request).
11319
11359
  })
11320
11360
 
11321
11361
  @class up.Response
11362
+ @parent up.network
11322
11363
  */
11323
11364
  up.Response = /** @class */ (function (_super) {
11324
11365
  __extends(Response, _super);
@@ -11508,7 +11549,7 @@ up.Response = /** @class */ (function (_super) {
11508
11549
 
11509
11550
 
11510
11551
  /***/ }),
11511
- /* 63 */
11552
+ /* 64 */
11512
11553
  /***/ (function() {
11513
11554
 
11514
11555
  var u = up.util;
@@ -11617,7 +11658,7 @@ up.ResponseDoc = /** @class */ (function () {
11617
11658
 
11618
11659
 
11619
11660
  /***/ }),
11620
- /* 64 */
11661
+ /* 65 */
11621
11662
  /***/ (function() {
11622
11663
 
11623
11664
  var e = up.element;
@@ -11709,7 +11750,8 @@ up.RevealMotion = /** @class */ (function () {
11709
11750
  elementRect.height += 2 * this.padding;
11710
11751
  };
11711
11752
  RevealMotion.prototype.selectObstructions = function (selectors) {
11712
- return up.fragment.all(selectors.join(','), { layer: this.obstructionsLayer });
11753
+ var elements = up.fragment.all(selectors.join(','), { layer: this.obstructionsLayer });
11754
+ return u.filter(elements, e.isVisible);
11713
11755
  };
11714
11756
  RevealMotion.prototype.substractObstructions = function (viewportRect) {
11715
11757
  for (var _i = 0, _a = this.selectObstructions(this.topObstructions); _i < _a.length; _i++) {
@@ -11739,7 +11781,7 @@ up.RevealMotion = /** @class */ (function () {
11739
11781
 
11740
11782
 
11741
11783
  /***/ }),
11742
- /* 65 */
11784
+ /* 66 */
11743
11785
  /***/ (function() {
11744
11786
 
11745
11787
  var u = up.util;
@@ -11819,7 +11861,7 @@ up.ScrollMotion = /** @class */ (function () {
11819
11861
 
11820
11862
 
11821
11863
  /***/ }),
11822
- /* 66 */
11864
+ /* 67 */
11823
11865
  /***/ (function() {
11824
11866
 
11825
11867
  var e = up.element;
@@ -11873,7 +11915,7 @@ up.Selector = /** @class */ (function () {
11873
11915
 
11874
11916
 
11875
11917
  /***/ }),
11876
- /* 67 */
11918
+ /* 68 */
11877
11919
  /***/ (function() {
11878
11920
 
11879
11921
  var u = up.util;
@@ -11908,7 +11950,7 @@ up.store.Memory = /** @class */ (function () {
11908
11950
 
11909
11951
 
11910
11952
  /***/ }),
11911
- /* 68 */
11953
+ /* 69 */
11912
11954
  /***/ (function() {
11913
11955
 
11914
11956
  var __extends = (this && this.__extends) || (function () {
@@ -11996,7 +12038,7 @@ up.store.Session = /** @class */ (function (_super) {
11996
12038
 
11997
12039
 
11998
12040
  /***/ }),
11999
- /* 69 */
12041
+ /* 70 */
12000
12042
  /***/ (function() {
12001
12043
 
12002
12044
  var u = up.util;
@@ -12158,7 +12200,7 @@ up.Tether = /** @class */ (function () {
12158
12200
 
12159
12201
 
12160
12202
  /***/ }),
12161
- /* 70 */
12203
+ /* 71 */
12162
12204
  /***/ (function() {
12163
12205
 
12164
12206
  var u = up.util;
@@ -12252,7 +12294,7 @@ up.URLPattern = /** @class */ (function () {
12252
12294
 
12253
12295
 
12254
12296
  /***/ }),
12255
- /* 71 */
12297
+ /* 72 */
12256
12298
  /***/ (function() {
12257
12299
 
12258
12300
  /*-
@@ -12463,7 +12505,7 @@ up.boot = up.framework.boot;
12463
12505
 
12464
12506
 
12465
12507
  /***/ }),
12466
- /* 72 */
12508
+ /* 73 */
12467
12509
  /***/ (function() {
12468
12510
 
12469
12511
  /*-
@@ -13056,7 +13098,7 @@ up.emit = up.event.emit;
13056
13098
 
13057
13099
 
13058
13100
  /***/ }),
13059
- /* 73 */
13101
+ /* 74 */
13060
13102
  /***/ (function() {
13061
13103
 
13062
13104
  /*-
@@ -13855,7 +13897,7 @@ up.protocol = (function () {
13855
13897
 
13856
13898
 
13857
13899
  /***/ }),
13858
- /* 74 */
13900
+ /* 75 */
13859
13901
  /***/ (function() {
13860
13902
 
13861
13903
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
@@ -14078,7 +14120,7 @@ up.warn = up.log.warn;
14078
14120
 
14079
14121
 
14080
14122
  /***/ }),
14081
- /* 75 */
14123
+ /* 76 */
14082
14124
  /***/ (function() {
14083
14125
 
14084
14126
  /*-
@@ -14087,6 +14129,8 @@ Custom JavaScript
14087
14129
 
14088
14130
  The `up.syntax` package lets you pair HTML elements with JavaScript behavior.
14089
14131
 
14132
+ @see legacy-scripts
14133
+
14090
14134
  @see up.compiler
14091
14135
  @see [up-data]
14092
14136
  @see up.macro
@@ -14599,7 +14643,7 @@ up.data = up.syntax.data;
14599
14643
 
14600
14644
 
14601
14645
  /***/ }),
14602
- /* 76 */
14646
+ /* 77 */
14603
14647
  /***/ (function() {
14604
14648
 
14605
14649
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
@@ -14990,7 +15034,7 @@ up.history = (function () {
14990
15034
 
14991
15035
 
14992
15036
  /***/ }),
14993
- /* 77 */
15037
+ /* 78 */
14994
15038
  /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
14995
15039
 
14996
15040
  var __assign = (this && this.__assign) || function () {
@@ -15004,7 +15048,7 @@ var __assign = (this && this.__assign) || function () {
15004
15048
  };
15005
15049
  return __assign.apply(this, arguments);
15006
15050
  };
15007
- __webpack_require__(78);
15051
+ __webpack_require__(79);
15008
15052
  var u = up.util;
15009
15053
  var e = up.element;
15010
15054
  /*-
@@ -15029,6 +15073,10 @@ a server-rendered web application:
15029
15073
 
15030
15074
  For low-level DOM utilities that complement the browser's native API, see `up.element`.
15031
15075
 
15076
+ @see navigation
15077
+ @see focus-option
15078
+ @see csp
15079
+
15032
15080
  @see up.render
15033
15081
  @see up.navigate
15034
15082
  @see up.destroy
@@ -16843,13 +16891,13 @@ u.delegate(up, 'context', function () { return up.layer.current; });
16843
16891
 
16844
16892
 
16845
16893
  /***/ }),
16846
- /* 78 */
16894
+ /* 79 */
16847
16895
  /***/ (function() {
16848
16896
 
16849
16897
 
16850
16898
 
16851
16899
  /***/ }),
16852
- /* 79 */
16900
+ /* 80 */
16853
16901
  /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
16854
16902
 
16855
16903
  var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
@@ -16861,10 +16909,10 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
16861
16909
  }
16862
16910
  return to.concat(ar || Array.prototype.slice.call(from));
16863
16911
  };
16864
- __webpack_require__(80);
16912
+ __webpack_require__(81);
16865
16913
  /*-
16866
- Scrolling viewports
16867
- ===================
16914
+ Scrolling
16915
+ =========
16868
16916
 
16869
16917
  The `up.viewport` module controls the scroll position and focus within scrollable containers ("viewports").
16870
16918
 
@@ -16873,6 +16921,9 @@ define additional viewports by giving the CSS property `{ overflow-y: scroll }`
16873
16921
 
16874
16922
  Also see documentation for the [scroll option](/scroll-option) and [focus option](/focus-option).
16875
16923
 
16924
+ @see scroll-option
16925
+ @see scroll-tuning
16926
+
16876
16927
  @see up.reveal
16877
16928
  @see [up-fixed=top]
16878
16929
 
@@ -17740,13 +17791,13 @@ up.reveal = up.viewport.reveal;
17740
17791
 
17741
17792
 
17742
17793
  /***/ }),
17743
- /* 80 */
17794
+ /* 81 */
17744
17795
  /***/ (function() {
17745
17796
 
17746
17797
 
17747
17798
 
17748
17799
  /***/ }),
17749
- /* 81 */
17800
+ /* 82 */
17750
17801
  /***/ (function() {
17751
17802
 
17752
17803
  var __assign = (this && this.__assign) || function () {
@@ -17839,6 +17890,8 @@ and [predefined animations](/up.animate#named-animations).
17839
17890
  You can define custom animations using `up.transition()` and
17840
17891
  `up.animation()`.
17841
17892
 
17893
+ @see motion-tuning
17894
+
17842
17895
  @see a[up-transition]
17843
17896
  @see up.animation
17844
17897
  @see up.transition
@@ -18066,8 +18119,9 @@ up.motion = (function () {
18066
18119
  This event is emitted on an animating element by `up.motion.finish()` to
18067
18120
  request the animation to instantly finish and skip to the last frame.
18068
18121
 
18069
- Promises returned by animation and transition functions are expected
18070
- to settle.
18122
+ Custom [animation](/up.animation) and [transition](/up.transition) functions are expected
18123
+ to instantly settle their promises when this event is observed on the
18124
+ animating element.
18071
18125
 
18072
18126
  Animations started by `up.animate()` already handle this event.
18073
18127
 
@@ -18500,10 +18554,10 @@ up.animate = up.motion.animate;
18500
18554
 
18501
18555
 
18502
18556
  /***/ }),
18503
- /* 82 */
18557
+ /* 83 */
18504
18558
  /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
18505
18559
 
18506
- __webpack_require__(83);
18560
+ __webpack_require__(84);
18507
18561
  var u = up.util;
18508
18562
  /*-
18509
18563
  Network requests
@@ -18646,6 +18700,7 @@ up.network = (function () {
18646
18700
  return []
18647
18701
  }
18648
18702
  }
18703
+ ```
18649
18704
 
18650
18705
  @param {boolean|Function(): boolean} [config.progressBar]
18651
18706
  Whether to show a progress bar for [late requests](/up:request:late).
@@ -19396,13 +19451,13 @@ up.cache = up.network.cache;
19396
19451
 
19397
19452
 
19398
19453
  /***/ }),
19399
- /* 83 */
19454
+ /* 84 */
19400
19455
  /***/ (function() {
19401
19456
 
19402
19457
 
19403
19458
 
19404
19459
  /***/ }),
19405
- /* 84 */
19460
+ /* 85 */
19406
19461
  /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
19407
19462
 
19408
19463
  var __assign = (this && this.__assign) || function () {
@@ -19461,7 +19516,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
19461
19516
  }
19462
19517
  return to.concat(ar || Array.prototype.slice.call(from));
19463
19518
  };
19464
- __webpack_require__(85);
19519
+ __webpack_require__(86);
19465
19520
  var u = up.util;
19466
19521
  var e = up.element;
19467
19522
  /*-
@@ -19478,9 +19533,17 @@ or events from another layer. For instance, [fragment links](/up.link) will only
19478
19533
  unless you [explicitly target another layer](/layer-option).
19479
19534
 
19480
19535
  Overlays allow you to break up a complex screen into [subinteractions](/subinteractions).
19481
- Subinteractions take place in overlays and may span one or many pages. The original screen remains open in the background.
19536
+ Subinteractions take place in overlays and may span one or many pages while the original screen remains open in the background.
19482
19537
  Once the subinteraction is *done*, the overlay is closed and a result value is communicated back to the parent layer.
19483
19538
 
19539
+ @see layer-terminology
19540
+ @see layer-option
19541
+ @see opening-overlays
19542
+ @see closing-overlays
19543
+ @see subinteractions
19544
+ @see customizing-overlays
19545
+ @see context
19546
+
19484
19547
  @see a[up-layer=new]
19485
19548
  @see up.layer.current
19486
19549
  @see up.layer.on
@@ -20468,7 +20531,7 @@ up.layer = (function () {
20468
20531
  @stable
20469
20532
  */
20470
20533
  /*-
20471
- This event is emitted before a layer is [accepted](/closing-overlays).
20534
+ This event is emitted *before* a layer is [accepted](/closing-overlays).
20472
20535
 
20473
20536
  The event is emitted on the [element of the layer](/up.layer.element) that is about to close.
20474
20537
 
@@ -20477,6 +20540,8 @@ up.layer = (function () {
20477
20540
  The layer that is about to close.
20478
20541
  @param {Element} [event.value]
20479
20542
  The overlay's [acceptance value](/closing-overlays#overlay-result-values).
20543
+
20544
+ Listeners may replace or mutate this value.
20480
20545
  @param {Element} [event.origin]
20481
20546
  The element that is causing the layer to close.
20482
20547
  @param event.preventDefault()
@@ -20484,7 +20549,7 @@ up.layer = (function () {
20484
20549
  @stable
20485
20550
  */
20486
20551
  /*-
20487
- This event is emitted after a layer was [accepted](/closing-overlays).
20552
+ This event is emitted *after* a layer was [accepted](/closing-overlays).
20488
20553
 
20489
20554
  The event is emitted on the [layer's](/up.layer.element) when the close animation
20490
20555
  is starting. If the layer has no close animaton and was already removed from the DOM,
@@ -20494,7 +20559,7 @@ up.layer = (function () {
20494
20559
  @param {up.Layer} event.layer
20495
20560
  The layer that was closed.
20496
20561
  @param {Element} [event.value]
20497
- The overlay's [acceptance value](/closing-overlays#overlay-result-values).
20562
+ The overlay's final [acceptance value](/closing-overlays#overlay-result-values).
20498
20563
  @param {Element} [event.origin]
20499
20564
  The element that has caused the layer to close.
20500
20565
  @stable
@@ -20511,7 +20576,7 @@ up.layer = (function () {
20511
20576
  @stable
20512
20577
  */
20513
20578
  /*-
20514
- This event is emitted before a layer is [dismissed](/closing-overlays).
20579
+ This event is emitted *before* a layer is [dismissed](/closing-overlays).
20515
20580
 
20516
20581
  The event is emitted on the [element of the layer](/up.layer.element) that is about to close.
20517
20582
 
@@ -20520,6 +20585,8 @@ up.layer = (function () {
20520
20585
  The layer that is about to close.
20521
20586
  @param {Element} [event.value]
20522
20587
  The overlay's [dismissal value](/closing-overlays#overlay-result-values).
20588
+
20589
+ Listeners may replace or mutate this value.
20523
20590
  @param {Element} [event.origin]
20524
20591
  The element that is causing the layer to close.
20525
20592
  @param event.preventDefault()
@@ -20527,7 +20594,7 @@ up.layer = (function () {
20527
20594
  @stable
20528
20595
  */
20529
20596
  /*-
20530
- This event is emitted after a layer was [dismissed](/closing-overlays).
20597
+ This event is emitted *after* a layer was [dismissed](/closing-overlays).
20531
20598
 
20532
20599
  The event is emitted on the [layer's](/up.layer.element) when the close animation
20533
20600
  is starting. If the layer has no close animaton and was already removed from the DOM,
@@ -20537,7 +20604,7 @@ up.layer = (function () {
20537
20604
  @param {up.Layer} event.layer
20538
20605
  The layer that was closed.
20539
20606
  @param {Element} [event.value]
20540
- The overlay's [dismissal value](/closing-overlays#overlay-result-values).
20607
+ The overlay's final [dismissal value](/closing-overlays#overlay-result-values).
20541
20608
  @param {Element} [event.origin]
20542
20609
  The element that has caused the layer to close.
20543
20610
  @stable
@@ -20743,13 +20810,13 @@ up.layer = (function () {
20743
20810
 
20744
20811
 
20745
20812
  /***/ }),
20746
- /* 85 */
20813
+ /* 86 */
20747
20814
  /***/ (function() {
20748
20815
 
20749
20816
 
20750
20817
 
20751
20818
  /***/ }),
20752
- /* 86 */
20819
+ /* 87 */
20753
20820
  /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
20754
20821
 
20755
20822
  var __assign = (this && this.__assign) || function () {
@@ -20772,7 +20839,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
20772
20839
  }
20773
20840
  return to.concat(ar || Array.prototype.slice.call(from));
20774
20841
  };
20775
- __webpack_require__(87);
20842
+ __webpack_require__(88);
20776
20843
  /*-
20777
20844
  Linking to fragments
20778
20845
  ====================
@@ -20796,7 +20863,7 @@ This makes for an unfriendly experience:
20796
20863
  - The user sees a "flash" as the browser loads and renders the new page,
20797
20864
  even if large portions of the old and new page are the same (navigation, layout, etc.).
20798
20865
 
20799
- Unpoly fixes this by letting you annotate links with an [`up-target`](/a-up-follow#up-target)
20866
+ Unpoly fixes this by letting you annotate links with an [`[up-target]`](/a-up-follow#up-target)
20800
20867
  attribute. The value of this attribute is a CSS selector that indicates which page
20801
20868
  fragment to update. The server **still renders full HTML pages**, but we only use
20802
20869
  the targeted fragments and discard the rest:
@@ -20839,10 +20906,14 @@ with an `up-target` attribute:
20839
20906
 
20840
20907
  Note that instead of `article` you can use any other CSS selector like `#main .article`.
20841
20908
 
20842
- With these [`up-target`](/a-up-follow#up-target) annotations Unpoly only updates the targeted part of the screen.
20909
+ With these [`[up-target]`](/a-up-follow#up-target) annotations Unpoly only updates the targeted part of the screen.
20843
20910
  The JavaScript environment will persist and the user will not see a white flash while the
20844
20911
  new page is loading.
20845
20912
 
20913
+ @see fragment-placement
20914
+ @see handling-everything
20915
+ @see server-errors
20916
+
20846
20917
  @see a[up-follow]
20847
20918
  @see a[up-instant]
20848
20919
  @see a[up-preload]
@@ -21093,7 +21164,7 @@ up.link = (function () {
21093
21164
  }
21094
21165
  /*-
21095
21166
  Parses the [render](/up.render) options that would be used to
21096
- [`follow`](/up.follow) the given link, but does not render.
21167
+ [follow](/up.follow) the given link, but does not render.
21097
21168
 
21098
21169
  ### Example
21099
21170
 
@@ -21925,13 +21996,13 @@ up.follow = up.link.follow;
21925
21996
 
21926
21997
 
21927
21998
  /***/ }),
21928
- /* 87 */
21999
+ /* 88 */
21929
22000
  /***/ (function() {
21930
22001
 
21931
22002
 
21932
22003
 
21933
22004
  /***/ }),
21934
- /* 88 */
22005
+ /* 89 */
21935
22006
  /***/ (function() {
21936
22007
 
21937
22008
  var __assign = (this && this.__assign) || function () {
@@ -21948,7 +22019,7 @@ var __assign = (this && this.__assign) || function () {
21948
22019
  /*-
21949
22020
  Forms
21950
22021
  =====
21951
-
22022
+
21952
22023
  The `up.form` module helps you work with non-trivial forms.
21953
22024
 
21954
22025
  @see form[up-submit]
@@ -22136,7 +22207,7 @@ up.form = (function () {
22136
22207
  });
22137
22208
  /*-
22138
22209
  Parses the [render](/up.render) options that would be used to
22139
- [`submit`](/up.submit) the given form, but does not render.
22210
+ [submit](/up.submit) the given form, but does not render.
22140
22211
 
22141
22212
  ### Example
22142
22213
 
@@ -23072,10 +23143,10 @@ up.form = (function () {
23072
23143
  ```html
23073
23144
  <input name="query" up-observe="showSuggestions(value)">
23074
23145
  ```
23075
-
23146
+
23076
23147
  Note that the parameter name in the markup must be called `value` or it will not work.
23077
23148
  The parameter name can be called whatever you want in the JavaScript, however.
23078
-
23149
+
23079
23150
  Also note that the function must be declared on the `window` object to work, like so:
23080
23151
 
23081
23152
  ```js
@@ -23244,7 +23315,7 @@ up.validate = up.form.validate;
23244
23315
 
23245
23316
 
23246
23317
  /***/ }),
23247
- /* 89 */
23318
+ /* 90 */
23248
23319
  /***/ (function() {
23249
23320
 
23250
23321
  /*-
@@ -23681,7 +23752,7 @@ up.feedback = (function () {
23681
23752
 
23682
23753
 
23683
23754
  /***/ }),
23684
- /* 90 */
23755
+ /* 91 */
23685
23756
  /***/ (function() {
23686
23757
 
23687
23758
  /*-
@@ -23909,7 +23980,7 @@ up.radio = (function () {
23909
23980
 
23910
23981
 
23911
23982
  /***/ }),
23912
- /* 91 */
23983
+ /* 92 */
23913
23984
  /***/ (function() {
23914
23985
 
23915
23986
  /*
@@ -23980,7 +24051,6 @@ __webpack_require__(4);
23980
24051
  __webpack_require__(5);
23981
24052
  __webpack_require__(6);
23982
24053
  __webpack_require__(7);
23983
- __webpack_require__(8);
23984
24054
  __webpack_require__(9);
23985
24055
  __webpack_require__(10);
23986
24056
  __webpack_require__(11);
@@ -24050,15 +24120,16 @@ __webpack_require__(74);
24050
24120
  __webpack_require__(75);
24051
24121
  __webpack_require__(76);
24052
24122
  __webpack_require__(77);
24053
- __webpack_require__(79);
24054
- __webpack_require__(81);
24123
+ __webpack_require__(78);
24124
+ __webpack_require__(80);
24055
24125
  __webpack_require__(82);
24056
- __webpack_require__(84);
24057
- __webpack_require__(86);
24058
- __webpack_require__(88);
24126
+ __webpack_require__(83);
24127
+ __webpack_require__(85);
24128
+ __webpack_require__(87);
24059
24129
  __webpack_require__(89);
24060
24130
  __webpack_require__(90);
24061
24131
  __webpack_require__(91);
24132
+ __webpack_require__(92);
24062
24133
  up.framework.onEvaled();
24063
24134
 
24064
24135
  }();