@boxcustodia/library 1.7.4 → 1.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es100.js +1 -1
- package/dist/index.es105.js +3 -310
- package/dist/index.es106.js +4 -13
- package/dist/index.es107.js +15 -55
- package/dist/index.es108.js +4 -54
- package/dist/index.es109.js +56 -113
- package/dist/index.es110.js +27 -44
- package/dist/index.es111.js +21 -24
- package/dist/index.es112.js +10 -31
- package/dist/index.es113.js +55 -10
- package/dist/index.es114.js +53 -39
- package/dist/index.es115.js +113 -57
- package/dist/index.es116.js +44 -18
- package/dist/index.es117.js +22 -38
- package/dist/index.es118.js +29 -257
- package/dist/index.es119.js +14 -7
- package/dist/index.es120.js +310 -3
- package/dist/index.es121.js +13 -4
- package/dist/index.es122.js +58 -15
- package/dist/index.es123.js +39 -5
- package/dist/index.es124.js +13 -57
- package/dist/index.es125.js +14 -22
- package/dist/index.es126.js +39 -18
- package/dist/index.es127.js +17 -38
- package/dist/index.es128.js +41 -14
- package/dist/index.es129.js +1 -1
- package/dist/index.es130.js +23 -24
- package/dist/index.es134.js +259 -4
- package/dist/index.es135.js +19 -23
- package/dist/index.es136.js +7 -4
- package/dist/index.es137.js +3 -3
- package/dist/index.es138.js +10 -22
- package/dist/index.es139.js +6 -3
- package/dist/index.es140.js +846 -17
- package/dist/index.es141.js +4 -21
- package/dist/index.es142.js +4 -4
- package/dist/index.es143.js +69 -10
- package/dist/index.es144.js +4 -224
- package/dist/index.es145.js +224 -10
- package/dist/index.es146.js +10 -41
- package/dist/index.es147.js +41 -4
- package/dist/index.es148.js +237 -15
- package/dist/index.es149.js +4 -44
- package/dist/index.es150.js +19 -22
- package/dist/index.es151.js +21 -7
- package/dist/index.es152.js +18 -13
- package/dist/index.es153.js +40 -65
- package/dist/index.es154.js +32 -847
- package/dist/index.es155.js +5 -239
- package/dist/index.es156.js +22 -33
- package/dist/index.es157.js +10 -6
- package/dist/index.es158.js +215 -16
- package/dist/index.es159.js +78 -14
- package/dist/index.es16.js +1 -1
- package/dist/index.es160.js +92 -13
- package/dist/index.es161.js +352 -14
- package/dist/index.es162.js +120 -212
- package/dist/index.es163.js +16 -77
- package/dist/index.es164.js +14 -92
- package/dist/index.es165.js +13 -352
- package/dist/index.es166.js +14 -124
- package/dist/index.es167.js +2 -2
- package/dist/index.es170.js +1 -1
- package/dist/index.es171.js +1 -1
- package/dist/index.es172.js +18 -14
- package/dist/index.es173.js +35 -32
- package/dist/index.es174.js +3674 -10
- package/dist/index.es175.js +5 -26
- package/dist/index.es176.js +2 -19
- package/dist/index.es177.js +20 -35
- package/dist/index.es178.js +33 -17
- package/dist/index.es179.js +7 -33
- package/dist/index.es18.js +1 -1
- package/dist/index.es180.js +25 -9
- package/dist/index.es181.js +205 -7
- package/dist/index.es182.js +12 -65
- package/dist/index.es183.js +31 -123
- package/dist/index.es184.js +10 -134
- package/dist/index.es185.js +45 -14
- package/dist/index.es186.js +6 -14
- package/dist/index.es187.js +68 -9
- package/dist/index.es188.js +122 -47
- package/dist/index.es189.js +133 -203
- package/dist/index.es190.js +14 -3675
- package/dist/index.es191.js +14 -5
- package/dist/index.es192.js +9 -2
- package/dist/index.es193.js +47 -42
- package/dist/index.es194.js +3 -649
- package/dist/index.es195.js +217 -3
- package/dist/index.es196.js +3 -217
- package/dist/index.es197.js +45 -3
- package/dist/index.es198.js +7 -45
- package/dist/index.es199.js +5 -7
- package/dist/index.es2.js +1 -1
- package/dist/index.es200.js +28 -6
- package/dist/index.es201.js +646 -24
- package/dist/index.es202.js +3 -2
- package/dist/index.es203.js +2 -4
- package/dist/index.es204.js +2052 -23
- package/dist/index.es205.js +26 -17
- package/dist/index.es206.js +2498 -37
- package/dist/index.es207.js +35 -18
- package/dist/index.es208.js +118 -3
- package/dist/index.es209.js +4 -2
- package/dist/index.es210.js +2 -2054
- package/dist/index.es211.js +7 -25
- package/dist/index.es212.js +5 -2498
- package/dist/index.es213.js +6 -35
- package/dist/index.es214.js +18 -118
- package/dist/index.es215.js +5 -5
- package/dist/index.es216.js +7 -84
- package/dist/index.es217.js +5 -5
- package/dist/index.es218.js +13 -17
- package/dist/index.es219.js +15 -9
- package/dist/index.es22.js +1 -1
- package/dist/index.es220.js +8 -6
- package/dist/index.es221.js +6 -5
- package/dist/index.es222.js +2 -2
- package/dist/index.es223.js +5 -11
- package/dist/index.es224.js +15 -19
- package/dist/index.es225.js +6 -14
- package/dist/index.es226.js +6 -6
- package/dist/index.es227.js +6 -6
- package/dist/index.es228.js +5 -53
- package/dist/index.es229.js +580 -10
- package/dist/index.es230.js +50 -7
- package/dist/index.es231.js +17 -10
- package/dist/index.es232.js +6 -7
- package/dist/index.es233.js +18 -16
- package/dist/index.es234.js +8 -6
- package/dist/index.es235.js +5 -5
- package/dist/index.es236.js +6 -7
- package/dist/index.es237.js +5 -10
- package/dist/index.es238.js +6 -11
- package/dist/index.es239.js +9 -7
- package/dist/index.es24.js +1 -1
- package/dist/index.es240.js +5 -5
- package/dist/index.es241.js +8 -5
- package/dist/index.es242.js +13 -7
- package/dist/index.es243.js +9 -5
- package/dist/index.es244.js +8 -13
- package/dist/index.es245.js +10 -15
- package/dist/index.es246.js +14 -8
- package/dist/index.es247.js +5 -5
- package/dist/index.es248.js +11 -4
- package/dist/index.es249.js +10 -580
- package/dist/index.es250.js +11 -50
- package/dist/index.es251.js +6 -17
- package/dist/index.es252.js +9 -6
- package/dist/index.es253.js +83 -18
- package/dist/index.es254.js +38 -8
- package/dist/index.es255.js +65 -7
- package/dist/index.es256.js +9 -7
- package/dist/index.es257.js +8 -5
- package/dist/index.es258.js +7 -6
- package/dist/index.es259.js +10 -9
- package/dist/index.es26.js +2 -2
- package/dist/index.es260.js +7 -5
- package/dist/index.es261.js +7 -8
- package/dist/index.es262.js +6 -12
- package/dist/index.es263.js +5 -9
- package/dist/index.es264.js +15 -10
- package/dist/index.es265.js +25 -15
- package/dist/index.es266.js +17 -39
- package/dist/index.es267.js +38 -65
- package/dist/index.es268.js +18 -10
- package/dist/index.es269.js +11 -8
- package/dist/index.es270.js +204 -7
- package/dist/index.es271.js +22 -8
- package/dist/index.es272.js +24 -15
- package/dist/index.es273.js +385 -170
- package/dist/index.es274.js +17 -29
- package/dist/index.es275.js +51 -203
- package/dist/index.es276.js +17 -22
- package/dist/index.es277.js +30 -24
- package/dist/index.es278.js +7 -392
- package/dist/index.es279.js +2 -8
- package/dist/index.es28.js +2 -2
- package/dist/index.es280.js +23 -2
- package/dist/index.es281.js +11 -11
- package/dist/index.es282.js +20 -22
- package/dist/index.es283.js +2 -21
- package/dist/index.es284.js +9406 -2
- package/dist/index.es285.js +14903 -8997
- package/dist/index.es286.js +3 -15312
- package/dist/index.es287.js +61 -3
- package/dist/index.es288.js +8 -59
- package/dist/index.es289.js +3 -10
- package/dist/index.es290.js +5 -3
- package/dist/index.es291.js +178 -5
- package/dist/index.es292.js +8 -12
- package/dist/index.es293.js +3 -8
- package/dist/index.es294.js +45 -3
- package/dist/index.es295.js +27 -43
- package/dist/index.es296.js +54 -26
- package/dist/index.es297.js +18 -55
- package/dist/index.es298.js +21 -19
- package/dist/index.es299.js +44 -21
- package/dist/index.es30.js +1 -1
- package/dist/index.es300.js +29 -42
- package/dist/index.es301.js +80 -28
- package/dist/index.es302.js +5 -82
- package/dist/index.es303.js +14 -6
- package/dist/index.es304.js +41 -12
- package/dist/index.es305.js +32 -42
- package/dist/index.es306.js +24 -30
- package/dist/index.es307.js +25 -27
- package/dist/index.es308.js +6 -24
- package/dist/index.es309.js +419 -6
- package/dist/index.es310.js +9 -417
- package/dist/index.es311.js +33 -11
- package/dist/index.es312.js +12 -35
- package/dist/index.es313.js +14 -24
- package/dist/index.es314.js +3 -29
- package/dist/index.es315.js +5 -5
- package/dist/index.es316.js +56 -14
- package/dist/index.es317.js +31 -3
- package/dist/index.es318.js +46 -4
- package/dist/index.es319.js +64 -54
- package/dist/index.es32.js +1 -1
- package/dist/index.es320.js +32 -25
- package/dist/index.es321.js +13 -41
- package/dist/index.es322.js +53 -47
- package/dist/index.es323.js +55 -20
- package/dist/index.es324.js +69 -13
- package/dist/index.es325.js +49 -47
- package/dist/index.es326.js +26 -53
- package/dist/index.es327.js +26 -54
- package/dist/index.es328.js +37 -53
- package/dist/index.es329.js +25 -22
- package/dist/index.es33.js +3 -3
- package/dist/index.es330.js +38 -38
- package/dist/index.es331.js +59 -40
- package/dist/index.es332.js +56 -27
- package/dist/index.es333.js +90 -34
- package/dist/index.es334.js +32 -63
- package/dist/index.es335.js +35 -66
- package/dist/index.es336.js +38 -94
- package/dist/index.es337.js +23 -39
- package/dist/index.es338.js +22 -39
- package/dist/index.es339.js +22 -39
- package/dist/index.es34.js +6 -6
- package/dist/index.es340.js +19 -19
- package/dist/index.es341.js +18 -18
- package/dist/index.es342.js +18 -18
- package/dist/index.es343.js +14 -25
- package/dist/index.es344.js +38 -22
- package/dist/index.es345.js +38 -22
- package/dist/index.es346.js +14 -14
- package/dist/index.es347.js +14 -40
- package/dist/index.es348.js +23 -44
- package/dist/index.es349.js +29 -20
- package/dist/index.es350.js +5 -20
- package/dist/index.es353.js +1 -1
- package/dist/index.es354.js +2 -2
- package/dist/index.es355.js +1 -1
- package/dist/index.es367.js +3 -3
- package/dist/index.es38.js +1 -1
- package/dist/index.es39.js +23 -23
- package/dist/index.es391.js +2 -2
- package/dist/index.es394.js +1 -1
- package/dist/index.es395.js +68 -5
- package/dist/index.es396.js +31 -3
- package/dist/index.es397.js +9 -24
- package/dist/index.es398.js +152 -109
- package/dist/index.es399.js +107 -15
- package/dist/index.es40.js +5 -5
- package/dist/index.es400.js +19 -67
- package/dist/index.es401.js +101 -31
- package/dist/index.es402.js +47 -9
- package/dist/index.es403.js +5 -153
- package/dist/index.es404.js +3 -108
- package/dist/index.es405.js +24 -68
- package/dist/index.es406.js +110 -31
- package/dist/index.es407.js +16 -16
- package/dist/index.es408.js +520 -138
- package/dist/index.es409.js +126 -113
- package/dist/index.es41.js +2 -2
- package/dist/index.es410.js +126 -17
- package/dist/index.es411.js +67 -100
- package/dist/index.es412.js +30 -46
- package/dist/index.es413.js +16 -6
- package/dist/index.es414.js +141 -15
- package/dist/index.es415.js +114 -2
- package/dist/index.es416.js +2 -8
- package/dist/index.es417.js +218 -314
- package/dist/index.es418.js +233 -49
- package/dist/index.es419.js +5 -3
- package/dist/index.es420.js +15 -2
- package/dist/index.es421.js +2 -231
- package/dist/index.es422.js +7 -233
- package/dist/index.es423.js +305 -501
- package/dist/index.es424.js +48 -125
- package/dist/index.es425.js +3 -128
- package/dist/index.es44.js +3 -3
- package/dist/index.es449.js +23 -270
- package/dist/index.es45.js +1 -1
- package/dist/index.es450.js +5 -79
- package/dist/index.es451.js +122 -160
- package/dist/index.es452.js +24 -24
- package/dist/index.es453.js +4 -5
- package/dist/index.es454.js +11 -126
- package/dist/index.es455.js +40 -22
- package/dist/index.es456.js +57 -4
- package/dist/index.es457.js +40 -11
- package/dist/index.es458.js +25 -39
- package/dist/index.es459.js +30 -56
- package/dist/index.es460.js +14 -41
- package/dist/index.es461.js +10 -28
- package/dist/index.es462.js +10 -31
- package/dist/index.es463.js +9 -14
- package/dist/index.es464.js +6 -10
- package/dist/index.es465.js +5 -10
- package/dist/index.es466.js +7 -9
- package/dist/index.es467.js +29 -6
- package/dist/index.es468.js +18 -5
- package/dist/index.es469.js +13 -7
- package/dist/index.es47.js +1 -1
- package/dist/index.es470.js +42 -28
- package/dist/index.es471.js +8 -18
- package/dist/index.es472.js +3 -14
- package/dist/index.es473.js +4 -43
- package/dist/index.es474.js +23 -7
- package/dist/index.es475.js +272 -3
- package/dist/index.es476.js +79 -4
- package/dist/index.es477.js +164 -23
- package/dist/index.es478.js +2 -2
- package/dist/index.es479.js +4 -4
- package/dist/index.es480.js +3 -3
- package/dist/index.es481.js +3 -3
- package/dist/index.es484.js +11 -11
- package/dist/index.es485.js +3 -3
- package/dist/index.es49.js +2 -2
- package/dist/index.es490.js +5 -5
- package/dist/index.es491.js +4 -4
- package/dist/index.es492.js +1 -1
- package/dist/index.es496.js +1 -1
- package/dist/index.es497.js +1 -1
- package/dist/index.es498.js +2 -2
- package/dist/index.es499.js +7 -56
- package/dist/index.es50.js +1 -1
- package/dist/index.es500.js +2 -13
- package/dist/index.es501.js +52 -21
- package/dist/index.es502.js +60 -55
- package/dist/index.es503.js +7 -33
- package/dist/index.es504.js +29 -167
- package/dist/index.es505.js +18 -119
- package/dist/index.es506.js +44 -7
- package/dist/index.es507.js +29 -19
- package/dist/index.es508.js +8 -33
- package/dist/index.es509.js +56 -20
- package/dist/index.es510.js +11 -43
- package/dist/index.es511.js +21 -29
- package/dist/index.es512.js +59 -8
- package/dist/index.es513.js +30 -228
- package/dist/index.es514.js +170 -20
- package/dist/index.es515.js +115 -23
- package/dist/index.es516.js +18 -117
- package/dist/index.es517.js +229 -35
- package/dist/index.es518.js +22 -72
- package/dist/index.es519.js +29 -7
- package/dist/index.es52.js +1 -1
- package/dist/index.es520.js +119 -2
- package/dist/index.es521.js +33 -48
- package/dist/index.es522.js +72 -65
- package/dist/index.es526.js +5 -63
- package/dist/index.es527.js +16 -69
- package/dist/index.es528.js +28 -8
- package/dist/index.es529.js +13 -14
- package/dist/index.es53.js +1 -1
- package/dist/index.es530.js +68 -61
- package/dist/index.es531.js +8 -15
- package/dist/index.es532.js +14 -29
- package/dist/index.es533.js +62 -13
- package/dist/index.es534.js +63 -5
- package/dist/index.es535.js +2 -2
- package/dist/index.es536.js +2 -76
- package/dist/index.es537.js +2 -93
- package/dist/index.es538.js +73 -49
- package/dist/index.es539.js +92 -7
- package/dist/index.es54.js +1 -1
- package/dist/index.es540.js +51 -4
- package/dist/index.es541.js +7 -51
- package/dist/index.es542.js +5 -2
- package/dist/index.es543.js +52 -2
- package/dist/index.es56.js +2 -2
- package/dist/index.es57.js +4 -4
- package/dist/index.es58.js +1 -1
- package/dist/index.es59.js +10 -10
- package/dist/index.es60.js +3 -3
- package/dist/index.es61.js +5 -5
- package/dist/index.es62.js +2 -2
- package/dist/index.es63.js +1 -1
- package/dist/index.es66.js +3 -3
- package/dist/index.es67.js +2 -2
- package/dist/index.es699.js +2 -42
- package/dist/index.es70.js +1 -1
- package/dist/index.es700.js +2 -72
- package/dist/index.es701.js +42 -6
- package/dist/index.es702.js +71 -5
- package/dist/index.es703.js +2 -2
- package/dist/index.es704.js +5 -5
- package/dist/index.es705.js +5 -5
- package/dist/index.es706.js +5 -5
- package/dist/index.es707.js +5 -5
- package/dist/index.es708.js +5 -5
- package/dist/index.es709.js +2 -2
- package/dist/index.es710.js +2 -2
- package/dist/index.es711.js +5 -5
- package/dist/index.es712.js +5 -5
- package/dist/index.es713.js +5 -5
- package/dist/index.es714.js +5 -5
- package/dist/index.es715.js +2 -2
- package/dist/index.es716.js +2 -2
- package/dist/index.es717.js +5 -5
- package/dist/index.es718.js +2 -2
- package/dist/index.es719.js +5 -5
- package/dist/index.es72.js +1 -1
- package/dist/index.es720.js +5 -5
- package/dist/index.es721.js +2 -2
- package/dist/index.es722.js +2 -2
- package/dist/index.es723.js +5 -5
- package/dist/index.es724.js +2 -2
- package/dist/index.es725.js +2 -2
- package/dist/index.es726.js +5 -5
- package/dist/index.es727.js +5 -5
- package/dist/index.es728.js +5 -5
- package/dist/index.es729.js +2 -2
- package/dist/index.es730.js +5 -5
- package/dist/index.es731.js +2 -2
- package/dist/index.es732.js +5 -5
- package/dist/index.es733.js +2 -2
- package/dist/index.es734.js +5 -5
- package/dist/index.es735.js +6 -2
- package/dist/index.es736.js +5 -1
- package/dist/index.es74.js +2 -2
- package/dist/index.es76.js +1 -1
- package/dist/index.es77.js +1 -1
- package/dist/index.es78.js +1 -1
- package/dist/index.es80.js +1 -1
- package/dist/index.es81.js +1 -1
- package/dist/index.es82.js +2 -2
- package/dist/index.es83.js +1 -1
- package/dist/index.es85.js +4 -4
- package/dist/index.es86.js +2 -2
- package/dist/index.es88.js +2 -2
- package/dist/index.es89.js +5 -5
- package/dist/index.es99.js +1 -1
- package/package.json +1 -1
package/dist/index.es519.js
CHANGED
|
@@ -1,10 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { useRef as l } from "react";
|
|
2
|
+
const f = 1e3;
|
|
3
|
+
function g(r) {
|
|
4
|
+
let { keyboardDelegate: o, selectionManager: c, onTypeSelect: i } = r, t = l({
|
|
5
|
+
search: "",
|
|
6
|
+
timeout: void 0
|
|
7
|
+
}).current, u = (e) => {
|
|
8
|
+
let a = s(e.key);
|
|
9
|
+
if (!(!a || e.ctrlKey || e.metaKey || !e.currentTarget.contains(e.target))) {
|
|
10
|
+
if (a === " " && t.search.trim().length > 0 && (e.preventDefault(), "continuePropagation" in e || e.stopPropagation()), t.search += a, o.getKeyForSearch != null) {
|
|
11
|
+
let n = o.getKeyForSearch(t.search, c.focusedKey);
|
|
12
|
+
n == null && (n = o.getKeyForSearch(t.search)), n != null && (c.setFocusedKey(n), i && i(n));
|
|
13
|
+
}
|
|
14
|
+
clearTimeout(t.timeout), t.timeout = setTimeout(() => {
|
|
15
|
+
t.search = "";
|
|
16
|
+
}, f);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
typeSelectProps: {
|
|
21
|
+
// Using a capturing listener to catch the keydown event before
|
|
22
|
+
// other hooks in order to handle the Spacebar event.
|
|
23
|
+
onKeyDownCapture: o.getKeyForSearch ? u : void 0
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function s(r) {
|
|
28
|
+
return r.length === 1 || !/^[A-Z]/i.test(r) ? r : "";
|
|
7
29
|
}
|
|
8
30
|
export {
|
|
9
|
-
|
|
31
|
+
g as useTypeSelect
|
|
10
32
|
};
|
package/dist/index.es52.js
CHANGED
package/dist/index.es520.js
CHANGED
|
@@ -1,4 +1,121 @@
|
|
|
1
|
-
|
|
1
|
+
import { DOMLayoutDelegate as n } from "./index.es521.js";
|
|
2
|
+
import { isScrollable as r } from "./index.es465.js";
|
|
3
|
+
class g {
|
|
4
|
+
isDisabled(t) {
|
|
5
|
+
var e;
|
|
6
|
+
return this.disabledBehavior === "all" && (((e = t.props) === null || e === void 0 ? void 0 : e.isDisabled) || this.disabledKeys.has(t.key));
|
|
7
|
+
}
|
|
8
|
+
findNextNonDisabled(t, e) {
|
|
9
|
+
let l = t;
|
|
10
|
+
for (; l != null; ) {
|
|
11
|
+
let i = this.collection.getItem(l);
|
|
12
|
+
if ((i == null ? void 0 : i.type) === "item" && !this.isDisabled(i)) return l;
|
|
13
|
+
l = e(l);
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
getNextKey(t) {
|
|
18
|
+
let e = t;
|
|
19
|
+
return e = this.collection.getKeyAfter(e), this.findNextNonDisabled(e, (l) => this.collection.getKeyAfter(l));
|
|
20
|
+
}
|
|
21
|
+
getPreviousKey(t) {
|
|
22
|
+
let e = t;
|
|
23
|
+
return e = this.collection.getKeyBefore(e), this.findNextNonDisabled(e, (l) => this.collection.getKeyBefore(l));
|
|
24
|
+
}
|
|
25
|
+
findKey(t, e, l) {
|
|
26
|
+
let i = t, s = this.layoutDelegate.getItemRect(i);
|
|
27
|
+
if (!s || i == null) return null;
|
|
28
|
+
let o = s;
|
|
29
|
+
do {
|
|
30
|
+
if (i = e(i), i == null) break;
|
|
31
|
+
s = this.layoutDelegate.getItemRect(i);
|
|
32
|
+
} while (s && l(o, s) && i != null);
|
|
33
|
+
return i;
|
|
34
|
+
}
|
|
35
|
+
isSameRow(t, e) {
|
|
36
|
+
return t.y === e.y || t.x !== e.x;
|
|
37
|
+
}
|
|
38
|
+
isSameColumn(t, e) {
|
|
39
|
+
return t.x === e.x || t.y !== e.y;
|
|
40
|
+
}
|
|
41
|
+
getKeyBelow(t) {
|
|
42
|
+
return this.layout === "grid" && this.orientation === "vertical" ? this.findKey(t, (e) => this.getNextKey(e), this.isSameRow) : this.getNextKey(t);
|
|
43
|
+
}
|
|
44
|
+
getKeyAbove(t) {
|
|
45
|
+
return this.layout === "grid" && this.orientation === "vertical" ? this.findKey(t, (e) => this.getPreviousKey(e), this.isSameRow) : this.getPreviousKey(t);
|
|
46
|
+
}
|
|
47
|
+
getNextColumn(t, e) {
|
|
48
|
+
return e ? this.getPreviousKey(t) : this.getNextKey(t);
|
|
49
|
+
}
|
|
50
|
+
getKeyRightOf(t) {
|
|
51
|
+
let e = this.direction === "ltr" ? "getKeyRightOf" : "getKeyLeftOf";
|
|
52
|
+
return this.layoutDelegate[e] ? (t = this.layoutDelegate[e](t), this.findNextNonDisabled(t, (l) => this.layoutDelegate[e](l))) : this.layout === "grid" ? this.orientation === "vertical" ? this.getNextColumn(t, this.direction === "rtl") : this.findKey(t, (l) => this.getNextColumn(l, this.direction === "rtl"), this.isSameColumn) : this.orientation === "horizontal" ? this.getNextColumn(t, this.direction === "rtl") : null;
|
|
53
|
+
}
|
|
54
|
+
getKeyLeftOf(t) {
|
|
55
|
+
let e = this.direction === "ltr" ? "getKeyLeftOf" : "getKeyRightOf";
|
|
56
|
+
return this.layoutDelegate[e] ? (t = this.layoutDelegate[e](t), this.findNextNonDisabled(t, (l) => this.layoutDelegate[e](l))) : this.layout === "grid" ? this.orientation === "vertical" ? this.getNextColumn(t, this.direction === "ltr") : this.findKey(t, (l) => this.getNextColumn(l, this.direction === "ltr"), this.isSameColumn) : this.orientation === "horizontal" ? this.getNextColumn(t, this.direction === "ltr") : null;
|
|
57
|
+
}
|
|
58
|
+
getFirstKey() {
|
|
59
|
+
let t = this.collection.getFirstKey();
|
|
60
|
+
return this.findNextNonDisabled(t, (e) => this.collection.getKeyAfter(e));
|
|
61
|
+
}
|
|
62
|
+
getLastKey() {
|
|
63
|
+
let t = this.collection.getLastKey();
|
|
64
|
+
return this.findNextNonDisabled(t, (e) => this.collection.getKeyBefore(e));
|
|
65
|
+
}
|
|
66
|
+
getKeyPageAbove(t) {
|
|
67
|
+
let e = this.ref.current, l = this.layoutDelegate.getItemRect(t);
|
|
68
|
+
if (!l) return null;
|
|
69
|
+
if (e && !r(e)) return this.getFirstKey();
|
|
70
|
+
let i = t;
|
|
71
|
+
if (this.orientation === "horizontal") {
|
|
72
|
+
let s = Math.max(0, l.x + l.width - this.layoutDelegate.getVisibleRect().width);
|
|
73
|
+
for (; l && l.x > s && i != null; )
|
|
74
|
+
i = this.getKeyAbove(i), l = i == null ? null : this.layoutDelegate.getItemRect(i);
|
|
75
|
+
} else {
|
|
76
|
+
let s = Math.max(0, l.y + l.height - this.layoutDelegate.getVisibleRect().height);
|
|
77
|
+
for (; l && l.y > s && i != null; )
|
|
78
|
+
i = this.getKeyAbove(i), l = i == null ? null : this.layoutDelegate.getItemRect(i);
|
|
79
|
+
}
|
|
80
|
+
return i ?? this.getFirstKey();
|
|
81
|
+
}
|
|
82
|
+
getKeyPageBelow(t) {
|
|
83
|
+
let e = this.ref.current, l = this.layoutDelegate.getItemRect(t);
|
|
84
|
+
if (!l) return null;
|
|
85
|
+
if (e && !r(e)) return this.getLastKey();
|
|
86
|
+
let i = t;
|
|
87
|
+
if (this.orientation === "horizontal") {
|
|
88
|
+
let s = Math.min(this.layoutDelegate.getContentSize().width, l.y - l.width + this.layoutDelegate.getVisibleRect().width);
|
|
89
|
+
for (; l && l.x < s && i != null; )
|
|
90
|
+
i = this.getKeyBelow(i), l = i == null ? null : this.layoutDelegate.getItemRect(i);
|
|
91
|
+
} else {
|
|
92
|
+
let s = Math.min(this.layoutDelegate.getContentSize().height, l.y - l.height + this.layoutDelegate.getVisibleRect().height);
|
|
93
|
+
for (; l && l.y < s && i != null; )
|
|
94
|
+
i = this.getKeyBelow(i), l = i == null ? null : this.layoutDelegate.getItemRect(i);
|
|
95
|
+
}
|
|
96
|
+
return i ?? this.getLastKey();
|
|
97
|
+
}
|
|
98
|
+
getKeyForSearch(t, e) {
|
|
99
|
+
if (!this.collator) return null;
|
|
100
|
+
let l = this.collection, i = e || this.getFirstKey();
|
|
101
|
+
for (; i != null; ) {
|
|
102
|
+
let s = l.getItem(i);
|
|
103
|
+
if (!s) return null;
|
|
104
|
+
let o = s.textValue.slice(0, t.length);
|
|
105
|
+
if (s.textValue && this.collator.compare(o, t) === 0) return i;
|
|
106
|
+
i = this.getNextKey(i);
|
|
107
|
+
}
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
constructor(...t) {
|
|
111
|
+
if (t.length === 1) {
|
|
112
|
+
let e = t[0];
|
|
113
|
+
this.collection = e.collection, this.ref = e.ref, this.collator = e.collator, this.disabledKeys = e.disabledKeys || /* @__PURE__ */ new Set(), this.disabledBehavior = e.disabledBehavior || "all", this.orientation = e.orientation || "vertical", this.direction = e.direction, this.layout = e.layout || "stack", this.layoutDelegate = e.layoutDelegate || new n(e.ref);
|
|
114
|
+
} else
|
|
115
|
+
this.collection = t[0], this.disabledKeys = t[1], this.ref = t[2], this.collator = t[3], this.layout = "stack", this.orientation = "vertical", this.disabledBehavior = "all", this.layoutDelegate = new n(this.ref);
|
|
116
|
+
this.layout === "stack" && this.orientation === "vertical" && (this.getKeyLeftOf = void 0, this.getKeyRightOf = void 0);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
2
119
|
export {
|
|
3
|
-
|
|
120
|
+
g as ListKeyboardDelegate
|
|
4
121
|
};
|
package/dist/index.es521.js
CHANGED
|
@@ -1,55 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
f = 1;
|
|
16
|
-
var u = h;
|
|
17
|
-
function s(e, t) {
|
|
18
|
-
return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
|
|
1
|
+
import { getItemElement as n } from "./index.es518.js";
|
|
2
|
+
class f {
|
|
3
|
+
getItemRect(t) {
|
|
4
|
+
let e = this.ref.current;
|
|
5
|
+
if (!e) return null;
|
|
6
|
+
let l = t != null ? n(this.ref, t) : null;
|
|
7
|
+
if (!l) return null;
|
|
8
|
+
let o = e.getBoundingClientRect(), i = l.getBoundingClientRect();
|
|
9
|
+
return {
|
|
10
|
+
x: i.left - o.left + e.scrollLeft,
|
|
11
|
+
y: i.top - o.top + e.scrollTop,
|
|
12
|
+
width: i.width,
|
|
13
|
+
height: i.height
|
|
14
|
+
};
|
|
19
15
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
[e, r, t]
|
|
28
|
-
), l(
|
|
29
|
-
function() {
|
|
30
|
-
return o(n) && c({ inst: n }), e(function() {
|
|
31
|
-
o(n) && c({ inst: n });
|
|
32
|
-
});
|
|
33
|
-
},
|
|
34
|
-
[e]
|
|
35
|
-
), E(r), r;
|
|
16
|
+
getContentSize() {
|
|
17
|
+
let t = this.ref.current;
|
|
18
|
+
var e, l;
|
|
19
|
+
return {
|
|
20
|
+
width: (e = t == null ? void 0 : t.scrollWidth) !== null && e !== void 0 ? e : 0,
|
|
21
|
+
height: (l = t == null ? void 0 : t.scrollHeight) !== null && l !== void 0 ? l : 0
|
|
22
|
+
};
|
|
36
23
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
e
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
24
|
+
getVisibleRect() {
|
|
25
|
+
let t = this.ref.current;
|
|
26
|
+
var e, l, o, i;
|
|
27
|
+
return {
|
|
28
|
+
x: (e = t == null ? void 0 : t.scrollLeft) !== null && e !== void 0 ? e : 0,
|
|
29
|
+
y: (l = t == null ? void 0 : t.scrollTop) !== null && l !== void 0 ? l : 0,
|
|
30
|
+
width: (o = t == null ? void 0 : t.offsetWidth) !== null && o !== void 0 ? o : 0,
|
|
31
|
+
height: (i = t == null ? void 0 : t.offsetHeight) !== null && i !== void 0 ? i : 0
|
|
32
|
+
};
|
|
46
33
|
}
|
|
47
|
-
|
|
48
|
-
|
|
34
|
+
constructor(t) {
|
|
35
|
+
this.ref = t;
|
|
49
36
|
}
|
|
50
|
-
var m = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? y : v;
|
|
51
|
-
return i.useSyncExternalStore = u.useSyncExternalStore !== void 0 ? u.useSyncExternalStore : m, i;
|
|
52
37
|
}
|
|
53
38
|
export {
|
|
54
|
-
|
|
39
|
+
f as DOMLayoutDelegate
|
|
55
40
|
};
|
package/dist/index.es522.js
CHANGED
|
@@ -1,67 +1,74 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
1
|
+
import r from "./index.es703.js";
|
|
2
|
+
import o from "./index.es704.js";
|
|
3
|
+
import e from "./index.es705.js";
|
|
4
|
+
import t from "./index.es706.js";
|
|
5
|
+
import p from "./index.es707.js";
|
|
6
|
+
import $ from "./index.es708.js";
|
|
7
|
+
import m from "./index.es709.js";
|
|
8
|
+
import f from "./index.es710.js";
|
|
9
|
+
import b from "./index.es711.js";
|
|
10
|
+
import a from "./index.es712.js";
|
|
11
|
+
import s from "./index.es713.js";
|
|
12
|
+
import d from "./index.es714.js";
|
|
13
|
+
import c from "./index.es715.js";
|
|
14
|
+
import i from "./index.es716.js";
|
|
15
|
+
import x from "./index.es717.js";
|
|
16
|
+
import R from "./index.es718.js";
|
|
17
|
+
import l from "./index.es719.js";
|
|
18
|
+
import E from "./index.es720.js";
|
|
19
|
+
import S from "./index.es721.js";
|
|
20
|
+
import h from "./index.es722.js";
|
|
21
|
+
import L from "./index.es723.js";
|
|
22
|
+
import T from "./index.es724.js";
|
|
23
|
+
import u from "./index.es725.js";
|
|
24
|
+
import I from "./index.es726.js";
|
|
25
|
+
import P from "./index.es727.js";
|
|
26
|
+
import U from "./index.es728.js";
|
|
27
|
+
import k from "./index.es729.js";
|
|
28
|
+
import n from "./index.es730.js";
|
|
29
|
+
import v from "./index.es731.js";
|
|
30
|
+
import K from "./index.es732.js";
|
|
31
|
+
import N from "./index.es733.js";
|
|
32
|
+
import z from "./index.es734.js";
|
|
33
|
+
import A from "./index.es735.js";
|
|
34
|
+
import B from "./index.es736.js";
|
|
35
|
+
var C = {};
|
|
36
|
+
C = {
|
|
37
|
+
"ar-AE": r,
|
|
38
|
+
"bg-BG": o,
|
|
39
|
+
"cs-CZ": e,
|
|
40
|
+
"da-DK": t,
|
|
41
|
+
"de-DE": p,
|
|
42
|
+
"el-GR": $,
|
|
43
|
+
"en-US": m,
|
|
44
|
+
"es-ES": f,
|
|
45
|
+
"et-EE": b,
|
|
46
|
+
"fi-FI": a,
|
|
47
|
+
"fr-FR": s,
|
|
48
|
+
"he-IL": d,
|
|
49
|
+
"hr-HR": c,
|
|
50
|
+
"hu-HU": i,
|
|
51
|
+
"it-IT": x,
|
|
52
|
+
"ja-JP": R,
|
|
53
|
+
"ko-KR": l,
|
|
54
|
+
"lt-LT": E,
|
|
55
|
+
"lv-LV": S,
|
|
56
|
+
"nb-NO": h,
|
|
57
|
+
"nl-NL": L,
|
|
58
|
+
"pl-PL": T,
|
|
59
|
+
"pt-BR": u,
|
|
60
|
+
"pt-PT": I,
|
|
61
|
+
"ro-RO": P,
|
|
62
|
+
"ru-RU": U,
|
|
63
|
+
"sk-SK": k,
|
|
64
|
+
"sl-SI": n,
|
|
65
|
+
"sr-SP": v,
|
|
66
|
+
"sv-SE": K,
|
|
67
|
+
"tr-TR": N,
|
|
68
|
+
"uk-UA": z,
|
|
69
|
+
"zh-CN": A,
|
|
70
|
+
"zh-TW": B
|
|
71
|
+
};
|
|
65
72
|
export {
|
|
66
|
-
|
|
73
|
+
C as default
|
|
67
74
|
};
|
package/dist/index.es526.js
CHANGED
|
@@ -1,67 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function h(r, t) {
|
|
6
|
-
t === void 0 && (t = l);
|
|
7
|
-
var e = [], o = !1, c = {
|
|
8
|
-
read: function() {
|
|
9
|
-
if (o)
|
|
10
|
-
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
11
|
-
return e.length ? e[e.length - 1] : r;
|
|
12
|
-
},
|
|
13
|
-
useMedium: function(u) {
|
|
14
|
-
var n = t(u, o);
|
|
15
|
-
return e.push(n), function() {
|
|
16
|
-
e = e.filter(function(i) {
|
|
17
|
-
return i !== n;
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
},
|
|
21
|
-
assignSyncMedium: function(u) {
|
|
22
|
-
for (o = !0; e.length; ) {
|
|
23
|
-
var n = e;
|
|
24
|
-
e = [], n.forEach(u);
|
|
25
|
-
}
|
|
26
|
-
e = {
|
|
27
|
-
push: function(i) {
|
|
28
|
-
return u(i);
|
|
29
|
-
},
|
|
30
|
-
filter: function() {
|
|
31
|
-
return e;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
assignMedium: function(u) {
|
|
36
|
-
o = !0;
|
|
37
|
-
var n = [];
|
|
38
|
-
if (e.length) {
|
|
39
|
-
var i = e;
|
|
40
|
-
e = [], i.forEach(u), n = e;
|
|
41
|
-
}
|
|
42
|
-
var s = function() {
|
|
43
|
-
var f = n;
|
|
44
|
-
n = [], f.forEach(u);
|
|
45
|
-
}, a = function() {
|
|
46
|
-
return Promise.resolve().then(s);
|
|
47
|
-
};
|
|
48
|
-
a(), e = {
|
|
49
|
-
push: function(f) {
|
|
50
|
-
n.push(f), a();
|
|
51
|
-
},
|
|
52
|
-
filter: function(f) {
|
|
53
|
-
return n = n.filter(f), e;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
}
|
|
1
|
+
function r(t) {
|
|
2
|
+
return (d = {}) => {
|
|
3
|
+
const n = d.width ? String(d.width) : t.defaultWidth;
|
|
4
|
+
return t.formats[n] || t.formats[t.defaultWidth];
|
|
57
5
|
};
|
|
58
|
-
return c;
|
|
59
|
-
}
|
|
60
|
-
function v(r) {
|
|
61
|
-
r === void 0 && (r = {});
|
|
62
|
-
var t = h(null);
|
|
63
|
-
return t.options = d({ async: !0, ssr: !1 }, r), t;
|
|
64
6
|
}
|
|
65
7
|
export {
|
|
66
|
-
|
|
8
|
+
r as buildFormatLongFn
|
|
67
9
|
};
|
package/dist/index.es527.js
CHANGED
|
@@ -1,71 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
a && "position: relative ".concat(t, ";"),
|
|
17
|
-
o === "margin" && `
|
|
18
|
-
padding-left: `.concat(r, `px;
|
|
19
|
-
padding-top: `).concat(i, `px;
|
|
20
|
-
padding-right: `).concat(s, `px;
|
|
21
|
-
margin-left:0;
|
|
22
|
-
margin-top:0;
|
|
23
|
-
margin-right: `).concat(c, "px ").concat(t, `;
|
|
24
|
-
`),
|
|
25
|
-
o === "padding" && "padding-right: ".concat(c, "px ").concat(t, ";")
|
|
26
|
-
].filter(Boolean).join(""), `
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.`).concat(g, ` {
|
|
30
|
-
right: `).concat(c, "px ").concat(t, `;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.`).concat(l, ` {
|
|
34
|
-
margin-right: `).concat(c, "px ").concat(t, `;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.`).concat(g, " .").concat(g, ` {
|
|
38
|
-
right: 0 `).concat(t, `;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.`).concat(l, " .").concat(l, ` {
|
|
42
|
-
margin-right: 0 `).concat(t, `;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
body[`).concat(e, `] {
|
|
46
|
-
`).concat(v, ": ").concat(c, `px;
|
|
47
|
-
}
|
|
48
|
-
`);
|
|
49
|
-
}, u = function() {
|
|
50
|
-
var n = parseInt(document.body.getAttribute(e) || "0", 10);
|
|
51
|
-
return isFinite(n) ? n : 0;
|
|
52
|
-
}, x = function() {
|
|
53
|
-
d.useEffect(function() {
|
|
54
|
-
return document.body.setAttribute(e, (u() + 1).toString()), function() {
|
|
55
|
-
var n = u() - 1;
|
|
56
|
-
n <= 0 ? document.body.removeAttribute(e) : document.body.setAttribute(e, n.toString());
|
|
57
|
-
};
|
|
58
|
-
}, []);
|
|
59
|
-
}, C = function(n) {
|
|
60
|
-
var a = n.noRelative, o = n.noImportant, t = n.gapMode, r = t === void 0 ? "margin" : t;
|
|
61
|
-
x();
|
|
62
|
-
var i = d.useMemo(function() {
|
|
63
|
-
return m(r);
|
|
64
|
-
}, [r]);
|
|
65
|
-
return d.createElement(b, { styles: h(i, !a, r, o ? "" : "!important") });
|
|
66
|
-
};
|
|
1
|
+
function h(e) {
|
|
2
|
+
return (a, t) => {
|
|
3
|
+
const c = t != null && t.context ? String(t.context) : "standalone";
|
|
4
|
+
let l;
|
|
5
|
+
if (c === "formatting" && e.formattingValues) {
|
|
6
|
+
const d = e.defaultFormattingWidth || e.defaultWidth, u = t != null && t.width ? String(t.width) : d;
|
|
7
|
+
l = e.formattingValues[u] || e.formattingValues[d];
|
|
8
|
+
} else {
|
|
9
|
+
const d = e.defaultWidth, u = t != null && t.width ? String(t.width) : e.defaultWidth;
|
|
10
|
+
l = e.values[u] || e.values[d];
|
|
11
|
+
}
|
|
12
|
+
const f = e.argumentCallback ? e.argumentCallback(a) : a;
|
|
13
|
+
return l[f];
|
|
14
|
+
};
|
|
15
|
+
}
|
|
67
16
|
export {
|
|
68
|
-
|
|
69
|
-
e as lockAttribute,
|
|
70
|
-
x as useLockAttribute
|
|
17
|
+
h as buildLocalizeFn
|
|
71
18
|
};
|
package/dist/index.es528.js
CHANGED
|
@@ -1,11 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
function P(t) {
|
|
2
|
+
return (n, e = {}) => {
|
|
3
|
+
const l = e.width, h = l && t.matchPatterns[l] || t.matchPatterns[t.defaultMatchWidth], i = n.match(h);
|
|
4
|
+
if (!i)
|
|
5
|
+
return null;
|
|
6
|
+
const r = i[0], c = l && t.parsePatterns[l] || t.parsePatterns[t.defaultParseWidth], d = Array.isArray(c) ? o(c, (u) => u.test(r)) : (
|
|
7
|
+
// [TODO] -- I challenge you to fix the type
|
|
8
|
+
s(c, (u) => u.test(r))
|
|
9
|
+
);
|
|
10
|
+
let a;
|
|
11
|
+
a = t.valueCallback ? t.valueCallback(d) : d, a = e.valueCallback ? (
|
|
12
|
+
// [TODO] -- I challenge you to fix the type
|
|
13
|
+
e.valueCallback(a)
|
|
14
|
+
) : a;
|
|
15
|
+
const f = n.slice(r.length);
|
|
16
|
+
return { value: a, rest: f };
|
|
6
17
|
};
|
|
7
|
-
|
|
8
|
-
|
|
18
|
+
}
|
|
19
|
+
function s(t, n) {
|
|
20
|
+
for (const e in t)
|
|
21
|
+
if (Object.prototype.hasOwnProperty.call(t, e) && n(t[e]))
|
|
22
|
+
return e;
|
|
23
|
+
}
|
|
24
|
+
function o(t, n) {
|
|
25
|
+
for (let e = 0; e < t.length; e++)
|
|
26
|
+
if (n(t[e]))
|
|
27
|
+
return e;
|
|
28
|
+
}
|
|
9
29
|
export {
|
|
10
|
-
|
|
30
|
+
P as buildMatchFn
|
|
11
31
|
};
|
package/dist/index.es529.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var a = r ? { passive: !1 } : !1;
|
|
1
|
+
function h(t) {
|
|
2
|
+
return (e, c = {}) => {
|
|
3
|
+
const n = e.match(t.matchPattern);
|
|
4
|
+
if (!n) return null;
|
|
5
|
+
const u = n[0], a = e.match(t.parsePattern);
|
|
6
|
+
if (!a) return null;
|
|
7
|
+
let l = t.valueCallback ? t.valueCallback(a[0]) : a[0];
|
|
8
|
+
l = c.valueCallback ? c.valueCallback(l) : l;
|
|
9
|
+
const r = e.slice(u.length);
|
|
10
|
+
return { value: l, rest: r };
|
|
11
|
+
};
|
|
12
|
+
}
|
|
14
13
|
export {
|
|
15
|
-
|
|
14
|
+
h as buildMatchPatternFn
|
|
16
15
|
};
|