@rpcbase/ui 0.210.0 → 0.212.0
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.js +73 -25
- package/dist/index.js.map +1 -0
- package/dist/index10.js +666 -18
- package/dist/index10.js.map +1 -1
- package/dist/index100.js +46 -9
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +7 -14
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +50 -10
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +233 -15
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +25 -21
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +27 -27
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +404 -9
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +609 -9
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +55 -10
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +6 -8
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +459 -1673
- package/dist/index11.js.map +1 -1
- package/dist/index110.js +7 -8
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +17 -7
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +8 -11
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +10 -10
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +19 -37
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +6 -9
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +7 -8
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +8 -10
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +8 -12
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +6 -7
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +79 -10
- package/dist/index12.js.map +1 -1
- package/dist/index120.js +6 -8
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +8 -7
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +27 -8
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +9 -9
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +6 -7
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +8 -7
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +8 -10
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +8 -60
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +8 -9
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +8 -23
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +23 -21
- package/dist/index13.js.map +1 -1
- package/dist/index130.js +11 -22
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +8 -37
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +7 -8
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +7 -11
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +9 -17
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +148 -13
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +42 -9
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +7 -8
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +10 -8
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +16 -8
- package/dist/index139.js.map +1 -1
- package/dist/index14.js +20 -194
- package/dist/index14.js.map +1 -1
- package/dist/index140.js +16 -8
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +10 -7
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +34 -9
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +14 -24
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +13 -11
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +11 -10
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +16 -9
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +104 -9
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +23 -8
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +56 -7
- package/dist/index149.js.map +1 -1
- package/dist/index15.js +30 -33
- package/dist/index15.js.map +1 -1
- package/dist/index150.js +75 -8
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +12 -7
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +23 -8
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +19 -7
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +26 -7
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +9 -7
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +9 -32
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +26 -35
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +38 -19
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +19 -15
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +268 -57
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +9 -12
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +7 -19
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +7 -89
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +7 -50
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +7 -20
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +6 -11
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +9 -13
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +27 -9
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +10 -25
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +9 -10
- package/dist/index169.js.map +1 -1
- package/dist/index17.js +179 -9
- package/dist/index17.js.map +1 -1
- package/dist/index170.js +8 -9
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +6 -9
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +6 -7
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +7 -9
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +6 -70
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +7 -20
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +6 -15
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +6 -12
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +6 -23
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +16 -20
- package/dist/index179.js.map +1 -1
- package/dist/index18.js +469 -27
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +158 -59
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +33 -13
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +12 -9
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +51 -29
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +14 -29
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +47 -16
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +98 -16
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +90 -10
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +109 -27
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +55 -388
- package/dist/index189.js.map +1 -1
- package/dist/index19.js +266 -65
- package/dist/index19.js.map +1 -1
- package/dist/index190.js +15 -499
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +39 -132
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +11 -55
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +6 -80
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +12 -902
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +119 -22
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +21 -452
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +18 -7
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +38 -59
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +23 -64
- package/dist/index199.js.map +1 -1
- package/dist/index2.js +8 -10
- package/dist/index2.js.map +1 -0
- package/dist/index20.js +5 -43
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +11 -63
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +22 -11
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +31 -19
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +20 -148
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +28 -7
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +32 -14
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +7 -107
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +65 -355
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +184 -99
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +49 -329
- package/dist/index209.js.map +1 -1
- package/dist/index21.js +28 -11
- package/dist/index21.js.map +1 -1
- package/dist/index210.js +60 -212
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +12 -22
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +69 -30
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +21 -189
- package/dist/index213.js.map +1 -1
- package/dist/index214.js +20 -21
- package/dist/index214.js.map +1 -1
- package/dist/index215.js +9 -65
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +8 -46
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +9 -12
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +8 -28
- package/dist/index218.js.map +1 -1
- package/dist/index219.js +9 -47
- package/dist/index219.js.map +1 -1
- package/dist/index22.js +48 -16
- package/dist/index22.js.map +1 -1
- package/dist/index220.js +19 -20
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +8 -6
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +7 -7
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +15 -23
- package/dist/index223.js.map +1 -1
- package/dist/index224.js +12 -27
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +16 -70
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +16 -17
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +8 -7
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +8 -53
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +9 -8
- package/dist/index229.js.map +1 -1
- package/dist/index23.js +37 -109
- package/dist/index23.js.map +1 -1
- package/dist/index230.js +7 -28
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +57 -16
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +11 -12
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +8 -3
- package/dist/index233.js.map +1 -0
- package/dist/index234.js +7 -28
- package/dist/index234.js.map +1 -1
- package/dist/index235.js +11 -71
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +8 -3
- package/dist/index236.js.map +1 -0
- package/dist/index237.js +7 -14
- package/dist/index237.js.map +1 -1
- package/dist/index238.js +6 -53
- package/dist/index238.js.map +1 -1
- package/dist/index239.js +13 -117
- package/dist/index239.js.map +1 -1
- package/dist/index24.js +227 -11
- package/dist/index24.js.map +1 -1
- package/dist/index240.js +13 -9
- package/dist/index240.js.map +1 -1
- package/dist/index241.js +13 -16
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +13 -689
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +14 -256
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +13 -704
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +9 -7433
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +8 -9
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +7 -15
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +8 -8
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +9 -462
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +32 -23
- package/dist/index25.js.map +1 -1
- package/dist/index250.js +9 -41
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +19 -22
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +10 -30
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +13 -7
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +14 -62
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +24 -10
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +13 -15
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +13 -6
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +12 -19
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +7 -28
- package/dist/index259.js.map +1 -1
- package/dist/index26.js +16 -60
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +9 -47
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +19 -16
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +12 -28
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +21 -20
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +18 -38
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +15 -8
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +32 -12
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +15 -11
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +28 -12
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +8 -13
- package/dist/index269.js.map +1 -1
- package/dist/index27.js +2924 -58
- package/dist/index27.js.map +1 -1
- package/dist/index270.js +23 -10
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +8 -77
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +5 -174
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +27 -118
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +115 -17
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +17 -82
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +528 -45
- package/dist/index276.js.map +1 -1
- package/dist/index277.js +129 -17
- package/dist/index277.js.map +1 -1
- package/dist/index278.js +137 -20
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +8 -103
- package/dist/index279.js.map +1 -1
- package/dist/index28.js +6 -1
- package/dist/index28.js.map +1 -0
- package/dist/index280.js +21 -60
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +16 -112
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +65 -72
- package/dist/index282.js.map +1 -1
- package/dist/index283.js +72 -117
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +12 -59
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +17 -47
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +69 -146
- package/dist/index286.js.map +1 -1
- package/dist/index287.js +8 -143
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +8 -258
- package/dist/index288.js.map +1 -1
- package/dist/index289.js +7 -244
- package/dist/index289.js.map +1 -1
- package/dist/index29.js +40 -5
- package/dist/index29.js.map +1 -0
- package/dist/index290.js +19 -302
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +11 -8
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +8 -9
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +7 -10
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +548 -9
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +50 -10
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +20 -24
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +8 -13
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +11 -130
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +9 -167
- package/dist/index299.js.map +1 -1
- package/dist/index3.js +181 -6
- package/dist/index3.js.map +1 -1
- package/dist/index30.js +6 -8
- package/dist/index30.js.map +1 -1
- package/dist/index300.js +11 -72
- package/dist/index300.js.map +1 -1
- package/dist/index301.js +14 -112
- package/dist/index301.js.map +1 -1
- package/dist/index302.js +12 -495
- package/dist/index302.js.map +1 -1
- package/dist/index303.js +15 -65
- package/dist/index303.js.map +1 -1
- package/dist/index304.js +7 -7
- package/dist/index304.js.map +1 -1
- package/dist/index305.js +25 -30
- package/dist/index305.js.map +1 -1
- package/dist/index306.js +6 -67
- package/dist/index306.js.map +1 -1
- package/dist/index307.js +58 -155
- package/dist/index307.js.map +1 -1
- package/dist/index308.js +71 -65
- package/dist/index308.js.map +1 -1
- package/dist/index309.js +32 -563
- package/dist/index309.js.map +1 -1
- package/dist/index31.js +128 -9
- package/dist/index31.js.map +1 -1
- package/dist/index310.js +11 -213
- package/dist/index310.js.map +1 -1
- package/dist/index311.js +156 -335
- package/dist/index311.js.map +1 -1
- package/dist/index312.js +110 -271
- package/dist/index312.js.map +1 -1
- package/dist/index313.js +26 -0
- package/dist/index313.js.map +1 -0
- package/dist/index314.js +16 -0
- package/dist/index314.js.map +1 -0
- package/dist/index315.js +31 -0
- package/dist/index315.js.map +1 -0
- package/dist/index316.js +8 -0
- package/dist/index316.js.map +1 -0
- package/dist/index317.js +19 -0
- package/dist/index317.js.map +1 -0
- package/dist/index318.js +32 -0
- package/dist/index318.js.map +1 -0
- package/dist/index319.js +16 -0
- package/dist/index319.js.map +1 -0
- package/dist/index32.js +234 -8
- package/dist/index32.js.map +1 -1
- package/dist/index320.js +10 -0
- package/dist/index320.js.map +1 -0
- package/dist/index33.js +26 -10
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +54 -14
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +24 -8
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +133 -11
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +225 -12
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +94 -16
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +121 -9
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +28 -25
- package/dist/index4.js.map +1 -1
- package/dist/index40.js +8 -9
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +847 -10
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +60 -13
- package/dist/index42.js.map +1 -1
- package/dist/index43.js +10 -11
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +5 -9
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +14 -8
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +21 -14
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +10 -14
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +5 -11
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +26 -7
- package/dist/index49.js.map +1 -1
- package/dist/index5.js +41 -34
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +236 -9
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +9 -9
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +36 -9
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +29 -12
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +10 -16
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +14 -9
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +5 -10
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +5 -10
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +5 -17
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +5 -11
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +469 -42
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +208 -12
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +8 -70
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +10 -10
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +8 -33
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +7 -13
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +50 -18
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +53 -203
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +10 -23
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +17 -19
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +136 -125
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +138 -224
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +13 -21
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +219 -11
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +16 -13
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +49 -16
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +52 -12
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +7 -13
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +8 -7
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +30 -44
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +52 -383
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +11 -41
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +875 -37
- package/dist/index8.js.map +1 -1
- package/dist/index80.js +46 -21
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +8 -60
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +72 -11
- package/dist/index82.js.map +1 -1
- package/dist/index83.js +5 -9
- package/dist/index83.js.map +1 -1
- package/dist/index84.js +367 -9
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +265 -9
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +64 -9
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +50 -10
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +173 -10
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +113 -14
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +8 -33
- package/dist/index9.js.map +1 -1
- package/dist/index90.js +27 -10
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +11 -10
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +7 -8
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +8 -10
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +7 -50
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +469 -108
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +188 -13
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +110 -9
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +265 -9
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +12 -8
- package/dist/index99.js.map +1 -1
- package/package.json +7 -7
package/dist/index158.js
CHANGED
|
@@ -1,19 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { enUS as f } from "./index280.js";
|
|
2
|
+
import { format as n } from "./index231.js";
|
|
3
|
+
const s = {
|
|
4
|
+
...f,
|
|
5
|
+
labels: {
|
|
6
|
+
labelDayButton: (r, a, o, e) => {
|
|
7
|
+
let t;
|
|
8
|
+
e && typeof e.format == "function" ? t = e.format.bind(e) : t = (m, c) => n(m, c, { locale: f, ...o });
|
|
9
|
+
let l = t(r, "PPPP");
|
|
10
|
+
return a.today && (l = `Today, ${l}`), a.selected && (l = `${l}, selected`), l;
|
|
11
|
+
},
|
|
12
|
+
labelMonthDropdown: "Choose the Month",
|
|
13
|
+
labelNext: "Go to the Next Month",
|
|
14
|
+
labelPrevious: "Go to the Previous Month",
|
|
15
|
+
labelWeekNumber: (r) => `Week ${r}`,
|
|
16
|
+
labelYearDropdown: "Choose the Year",
|
|
17
|
+
labelGrid: (r, a, o) => {
|
|
18
|
+
let e;
|
|
19
|
+
return o && typeof o.format == "function" ? e = o.format.bind(o) : e = (t, l) => n(t, l, { locale: f, ...a }), e(r, "LLLL yyyy");
|
|
20
|
+
},
|
|
21
|
+
labelGridcell: (r, a, o, e) => {
|
|
22
|
+
let t;
|
|
23
|
+
e && typeof e.format == "function" ? t = e.format.bind(e) : t = (m, c) => n(m, c, { locale: f, ...o });
|
|
24
|
+
let l = t(r, "PPPP");
|
|
25
|
+
return a?.today && (l = `Today, ${l}`), l;
|
|
26
|
+
},
|
|
27
|
+
labelNav: "Navigation bar",
|
|
28
|
+
labelWeekNumberHeader: "Week Number",
|
|
29
|
+
labelWeekday: (r, a, o) => {
|
|
30
|
+
let e;
|
|
31
|
+
return o && typeof o.format == "function" ? e = o.format.bind(o) : e = (t, l) => n(t, l, { locale: f, ...a }), e(r, "cccc");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
s as enUS
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=index158.js.map
|
package/dist/index158.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index158.js","
|
|
1
|
+
{"version":3,"file":"index158.js","sources":["../../../node_modules/react-day-picker/dist/esm/locale/en-US.js"],"sourcesContent":["import { format } from \"date-fns\";\nimport { enUS as dateFnsEnUS } from \"date-fns/locale\";\n/** English (United States) locale extended with DayPicker-specific translations. */\nexport const enUS = {\n ...dateFnsEnUS,\n labels: {\n labelDayButton: (date, modifiers, options, dateLib) => {\n let formatDate;\n if (dateLib && typeof dateLib.format === \"function\") {\n formatDate = dateLib.format.bind(dateLib);\n }\n else {\n formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });\n }\n let label = formatDate(date, \"PPPP\");\n if (modifiers.today)\n label = `Today, ${label}`;\n if (modifiers.selected)\n label = `${label}, selected`;\n return label;\n },\n labelMonthDropdown: \"Choose the Month\",\n labelNext: \"Go to the Next Month\",\n labelPrevious: \"Go to the Previous Month\",\n labelWeekNumber: (weekNumber) => `Week ${weekNumber}`,\n labelYearDropdown: \"Choose the Year\",\n labelGrid: (date, options, dateLib) => {\n let formatDate;\n if (dateLib && typeof dateLib.format === \"function\") {\n formatDate = dateLib.format.bind(dateLib);\n }\n else {\n formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });\n }\n return formatDate(date, \"LLLL yyyy\");\n },\n labelGridcell: (date, modifiers, options, dateLib) => {\n let formatDate;\n if (dateLib && typeof dateLib.format === \"function\") {\n formatDate = dateLib.format.bind(dateLib);\n }\n else {\n formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });\n }\n let label = formatDate(date, \"PPPP\");\n if (modifiers?.today) {\n label = `Today, ${label}`;\n }\n return label;\n },\n labelNav: \"Navigation bar\",\n labelWeekNumberHeader: \"Week Number\",\n labelWeekday: (date, options, dateLib) => {\n let formatDate;\n if (dateLib && typeof dateLib.format === \"function\") {\n formatDate = dateLib.format.bind(dateLib);\n }\n else {\n formatDate = (d, pattern) => format(d, pattern, { locale: dateFnsEnUS, ...options });\n }\n return formatDate(date, \"cccc\");\n },\n },\n};\n"],"names":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;AAAA,IACX;AAAA,IACA,UAAU;AAAA,IACV,uBAAuB;AAAA,IACvB,cAAc,CAACR,GAAME,GAASC,MAAY;AACtC,UAAIC;AACJ,aAAID,KAAW,OAAOA,EAAQ,UAAW,aACrCC,IAAaD,EAAQ,OAAO,KAAKA,CAAO,IAGxCC,IAAa,CAACC,GAAGC,MAAYC,EAAOF,GAAGC,GAAS,EAAE,QAAQP,GAAa,GAAGG,EAAO,CAAE,GAEhFE,EAAWJ,GAAM,MAAM;AAAA,IAClC;AAAA,EACR;AACA;","x_google_ignoreList":[0]}
|
package/dist/index159.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { formatCaption as t, formatMonthCaption as e } from "./index160.js";
|
|
2
|
+
import { formatDay as a } from "./index161.js";
|
|
3
|
+
import { formatMonthDropdown as p } from "./index162.js";
|
|
4
|
+
import { formatWeekdayName as x } from "./index163.js";
|
|
5
|
+
import { formatWeekNumber as i } from "./index164.js";
|
|
6
|
+
import { formatWeekNumberHeader as C } from "./index165.js";
|
|
7
|
+
import { formatYearCaption as N, formatYearDropdown as W } from "./index166.js";
|
|
8
|
+
export {
|
|
9
|
+
t as formatCaption,
|
|
10
|
+
a as formatDay,
|
|
11
|
+
e as formatMonthCaption,
|
|
12
|
+
p as formatMonthDropdown,
|
|
13
|
+
i as formatWeekNumber,
|
|
14
|
+
C as formatWeekNumberHeader,
|
|
15
|
+
x as formatWeekdayName,
|
|
16
|
+
N as formatYearCaption,
|
|
17
|
+
W as formatYearDropdown
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=index159.js.map
|
package/dist/index159.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index159.js","
|
|
1
|
+
{"version":3,"file":"index159.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
package/dist/index16.js
CHANGED
|
@@ -1,58 +1,269 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as
|
|
3
|
-
import "react";
|
|
4
|
-
import
|
|
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
|
-
|
|
1
|
+
import { j as t } from "./index30.js";
|
|
2
|
+
import { c as H } from "./index28.js";
|
|
3
|
+
import { useContext as Q, useState as T, useMemo as $, useCallback as W, useEffect as J, createContext as Z } from "react";
|
|
4
|
+
import * as F from "@radix-ui/react-dialog";
|
|
5
|
+
import { Trigger as _, Item as K, Root as ee, Portal as te, Content as ne } from "./index60.js";
|
|
6
|
+
import { X as se, Loader2 as oe, MoreVertical as re } from "lucide-react";
|
|
7
|
+
import { cn as P } from "./index2.js";
|
|
8
|
+
const q = (i) => {
|
|
9
|
+
const e = Date.parse(i);
|
|
10
|
+
return Number.isFinite(e) ? e : 0;
|
|
11
|
+
}, ie = (i) => {
|
|
12
|
+
const e = new Date(q(i));
|
|
13
|
+
if (!Number.isFinite(e.getTime())) return "unknown";
|
|
14
|
+
const n = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), a = String(e.getDate()).padStart(2, "0");
|
|
15
|
+
return `${n}-${r}-${a}`;
|
|
16
|
+
}, ae = (i) => {
|
|
17
|
+
if (i === "unknown") return "Unknown date";
|
|
18
|
+
const [e, n, r] = i.split("-"), a = Number(e), f = Number(n), s = Number(r);
|
|
19
|
+
if (!Number.isFinite(a) || !Number.isFinite(f) || !Number.isFinite(s)) return "Unknown date";
|
|
20
|
+
const y = new Date(a, f - 1, s);
|
|
21
|
+
if (!Number.isFinite(y.getTime())) return "Unknown date";
|
|
22
|
+
const x = (/* @__PURE__ */ new Date()).getFullYear() !== a;
|
|
23
|
+
return y.toLocaleDateString(void 0, x ? {
|
|
24
|
+
weekday: "short",
|
|
25
|
+
month: "short",
|
|
26
|
+
day: "numeric",
|
|
27
|
+
year: "numeric"
|
|
28
|
+
} : {
|
|
29
|
+
weekday: "short",
|
|
30
|
+
month: "short",
|
|
31
|
+
day: "numeric"
|
|
32
|
+
});
|
|
33
|
+
}, V = (i) => {
|
|
34
|
+
const e = [];
|
|
35
|
+
let n = null;
|
|
36
|
+
for (const r of i) {
|
|
37
|
+
const a = ie(r.createdAt);
|
|
38
|
+
a !== n && (n = a, e.push({
|
|
39
|
+
key: a,
|
|
40
|
+
label: ae(a),
|
|
41
|
+
items: []
|
|
42
|
+
})), e[e.length - 1].items.push(r);
|
|
43
|
+
}
|
|
44
|
+
return e;
|
|
45
|
+
}, le = Z(null);
|
|
46
|
+
function he({
|
|
47
|
+
open: i,
|
|
48
|
+
onOpenChange: e,
|
|
49
|
+
className: n,
|
|
50
|
+
limit: r = 50,
|
|
51
|
+
defaultUnreadOnly: a = !1,
|
|
52
|
+
realtimeContext: f
|
|
53
|
+
}) {
|
|
54
|
+
const s = Q(f ?? le), [y, C] = T([]), [x, h] = T(0), [A, p] = T(0), [S, j] = T(!1), [M, b] = T(null), [c, U] = T(a), v = s?.notifications ?? y, D = s?.unreadCount ?? x, N = s?.unseenCount ?? A, R = s?.loading ?? S, w = s?.error ? s.error instanceof Error ? s.error.message : String(s.error) : M, g = $(() => v.slice(0, r), [r, v]), I = $(() => g.filter((o) => !o.readAt), [g]), E = $(() => g.filter((o) => !!o.readAt), [g]), L = $(() => V(I), [I]), Y = $(() => V(E), [E]), z = W(async ({
|
|
55
|
+
unreadOnly: o,
|
|
56
|
+
markSeen: d
|
|
57
|
+
}) => {
|
|
58
|
+
j(!0), b(null);
|
|
59
|
+
try {
|
|
60
|
+
const O = await fetch("/api/rb/notifications", {
|
|
61
|
+
method: "POST",
|
|
62
|
+
headers: {
|
|
63
|
+
"Content-Type": "application/json"
|
|
64
|
+
},
|
|
65
|
+
credentials: "include",
|
|
66
|
+
body: JSON.stringify({
|
|
67
|
+
limit: r,
|
|
68
|
+
unreadOnly: o,
|
|
69
|
+
markSeen: d
|
|
70
|
+
})
|
|
71
|
+
}), l = await O.json().catch(() => null);
|
|
72
|
+
if (!O.ok || !l?.ok) {
|
|
73
|
+
b(l?.error || "Unable to load notifications.");
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const k = Array.isArray(l.notifications) ? l.notifications : [];
|
|
77
|
+
C(k), h(Number.isFinite(l.unreadCount) ? Math.max(0, Math.floor(l.unreadCount ?? 0)) : 0), p(Number.isFinite(l.unseenCount) ? Math.max(0, Math.floor(l.unseenCount ?? 0)) : 0);
|
|
78
|
+
} catch {
|
|
79
|
+
b("Unable to load notifications.");
|
|
80
|
+
} finally {
|
|
81
|
+
j(!1);
|
|
82
|
+
}
|
|
83
|
+
}, [r]);
|
|
84
|
+
J(() => {
|
|
85
|
+
if (i) {
|
|
86
|
+
if (s) {
|
|
87
|
+
(async () => {
|
|
88
|
+
try {
|
|
89
|
+
await fetch("/api/rb/notifications", {
|
|
90
|
+
method: "POST",
|
|
91
|
+
headers: {
|
|
92
|
+
"Content-Type": "application/json"
|
|
93
|
+
},
|
|
94
|
+
credentials: "include",
|
|
95
|
+
keepalive: !0,
|
|
96
|
+
body: JSON.stringify({
|
|
97
|
+
limit: 1,
|
|
98
|
+
markSeen: !0
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
} catch {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
})();
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
z({
|
|
108
|
+
unreadOnly: c,
|
|
109
|
+
markSeen: !0
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}, [i, s, z, c]), J(() => {
|
|
113
|
+
i && (s || z({
|
|
114
|
+
unreadOnly: c,
|
|
115
|
+
markSeen: !1
|
|
116
|
+
}));
|
|
117
|
+
}, [i, s, z, c]);
|
|
118
|
+
const B = async (o) => {
|
|
119
|
+
try {
|
|
120
|
+
const d = await fetch(`/api/rb/notifications/${encodeURIComponent(o)}/read`, {
|
|
121
|
+
method: "POST",
|
|
122
|
+
headers: {
|
|
123
|
+
"Content-Type": "application/json"
|
|
124
|
+
},
|
|
125
|
+
credentials: "include",
|
|
126
|
+
keepalive: !0,
|
|
127
|
+
body: "{}"
|
|
128
|
+
}), O = await d.json().catch(() => null);
|
|
129
|
+
if (!d.ok || !O?.ok) return;
|
|
130
|
+
const l = (/* @__PURE__ */ new Date()).toISOString();
|
|
131
|
+
if (s) return;
|
|
132
|
+
C((k) => {
|
|
133
|
+
const m = k.find((u) => u.id === o);
|
|
134
|
+
return m && !m.readAt && h((u) => Math.max(0, u - 1)), m && !m.seenAt && p((u) => Math.max(0, u - 1)), k.map((u) => u.id === o && !u.readAt ? {
|
|
135
|
+
...u,
|
|
136
|
+
readAt: l,
|
|
137
|
+
...u.seenAt ? {} : {
|
|
138
|
+
seenAt: l
|
|
139
|
+
}
|
|
140
|
+
} : u);
|
|
141
|
+
});
|
|
142
|
+
} catch {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
}, G = async (o) => {
|
|
146
|
+
try {
|
|
147
|
+
const d = await fetch(`/api/rb/notifications/${encodeURIComponent(o)}/archive`, {
|
|
148
|
+
method: "POST",
|
|
149
|
+
headers: {
|
|
150
|
+
"Content-Type": "application/json"
|
|
151
|
+
},
|
|
152
|
+
credentials: "include",
|
|
153
|
+
body: "{}"
|
|
154
|
+
}), O = await d.json().catch(() => null);
|
|
155
|
+
if (!d.ok || !O?.ok || s) return;
|
|
156
|
+
C((l) => {
|
|
157
|
+
const k = l.find((m) => m.id === o);
|
|
158
|
+
return k && !k.readAt && h((m) => Math.max(0, m - 1)), k && !k.seenAt && p((m) => Math.max(0, m - 1)), l.filter((m) => m.id !== o);
|
|
159
|
+
});
|
|
160
|
+
} catch {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
return /* @__PURE__ */ t.jsx(F.Root, { open: i, onOpenChange: e, children: /* @__PURE__ */ t.jsxs(F.Portal, { children: [
|
|
165
|
+
/* @__PURE__ */ t.jsx(F.Overlay, { className: "fixed inset-0 z-50 bg-black/50" }),
|
|
166
|
+
/* @__PURE__ */ t.jsxs(F.Content, { className: P("fixed right-0 top-0 z-50 flex h-full w-full max-w-md flex-col border-l bg-background shadow-xl outline-none", n), children: [
|
|
167
|
+
/* @__PURE__ */ t.jsxs("header", { className: "flex items-center justify-between gap-2 border-b px-4 py-3", children: [
|
|
168
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
169
|
+
/* @__PURE__ */ t.jsx(F.Title, { className: "text-sm font-semibold", children: "Notifications" }),
|
|
170
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-xs text-muted-foreground", children: D > 0 ? `${D} unread` : N > 0 ? `${N} new` : "All caught up" })
|
|
171
|
+
] }),
|
|
172
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
173
|
+
/* @__PURE__ */ t.jsx("button", { type: "button", onClick: () => U((o) => !o), className: P("rounded-md border px-2 py-1 text-xs", c ? "bg-accent text-foreground" : "bg-background text-muted-foreground hover:bg-accent"), children: c ? "Unread" : "All" }),
|
|
174
|
+
/* @__PURE__ */ t.jsx(F.Close, { asChild: !0, children: /* @__PURE__ */ t.jsx("button", { type: "button", className: "inline-flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent", children: /* @__PURE__ */ t.jsx(se, { className: "h-4 w-4" }) }) })
|
|
175
|
+
] })
|
|
176
|
+
] }),
|
|
177
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex-1 overflow-y-auto px-4 pb-3", children: R ? /* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-center py-10 text-muted-foreground", children: /* @__PURE__ */ t.jsx(oe, { className: "h-4 w-4 animate-spin" }) }) : w ? /* @__PURE__ */ t.jsx("div", { className: "py-10 text-center text-sm text-muted-foreground", children: w }) : g.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "py-10 text-center text-sm text-muted-foreground", children: "No notifications." }) : /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
178
|
+
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
179
|
+
/* @__PURE__ */ t.jsx("div", { className: "sticky top-0 z-20 -mx-4 flex h-8 items-center border-b bg-background px-4 text-xs font-semibold text-muted-foreground", children: "Unread notifications" }),
|
|
180
|
+
L.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "py-6 text-center text-sm text-muted-foreground", children: "No unread notifications." }) : L.map((o) => /* @__PURE__ */ t.jsxs("div", { children: [
|
|
181
|
+
/* @__PURE__ */ t.jsx("div", { className: "sticky top-8 z-10 -mx-4 flex h-7 items-center bg-background px-4 text-[11px] font-semibold text-muted-foreground", children: o.label }),
|
|
182
|
+
/* @__PURE__ */ t.jsx("div", { className: "-mx-4 flex flex-col divide-y divide-border", children: o.items.map((d) => /* @__PURE__ */ t.jsx(X, { notification: d, onMarkRead: B, onArchive: G }, d.id)) })
|
|
183
|
+
] }, `unread:${o.key}`))
|
|
184
|
+
] }),
|
|
185
|
+
c ? null : /* @__PURE__ */ t.jsxs("div", { children: [
|
|
186
|
+
/* @__PURE__ */ t.jsx("div", { className: "sticky top-0 z-20 -mx-4 flex h-8 items-center border-b bg-background px-4 text-xs font-semibold text-muted-foreground", children: "Previous notifications" }),
|
|
187
|
+
Y.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "py-6 text-center text-sm text-muted-foreground", children: "No previous notifications." }) : Y.map((o) => /* @__PURE__ */ t.jsxs("div", { children: [
|
|
188
|
+
/* @__PURE__ */ t.jsx("div", { className: "sticky top-8 z-10 -mx-4 flex h-7 items-center bg-background px-4 text-[11px] font-semibold text-muted-foreground", children: o.label }),
|
|
189
|
+
/* @__PURE__ */ t.jsx("div", { className: "-mx-4 flex flex-col divide-y divide-border", children: o.items.map((d) => /* @__PURE__ */ t.jsx(X, { notification: d, onMarkRead: B, onArchive: G }, d.id)) })
|
|
190
|
+
] }, `previous:${o.key}`))
|
|
191
|
+
] })
|
|
192
|
+
] }) })
|
|
193
|
+
] })
|
|
194
|
+
] }) });
|
|
195
|
+
}
|
|
196
|
+
function X(i) {
|
|
197
|
+
const e = H.c(43), {
|
|
198
|
+
notification: n,
|
|
199
|
+
onMarkRead: r,
|
|
200
|
+
onArchive: a
|
|
201
|
+
} = i, f = !n.readAt;
|
|
202
|
+
let s;
|
|
203
|
+
if (e[0] !== n.createdAt) {
|
|
204
|
+
e: {
|
|
205
|
+
const I = new Date(q(n.createdAt));
|
|
206
|
+
if (!Number.isFinite(I.getTime())) {
|
|
207
|
+
s = "";
|
|
208
|
+
break e;
|
|
209
|
+
}
|
|
210
|
+
s = I.toLocaleString();
|
|
211
|
+
}
|
|
212
|
+
e[0] = n.createdAt, e[1] = s;
|
|
213
|
+
} else
|
|
214
|
+
s = e[1];
|
|
215
|
+
const y = s, C = f ? "bg-primary/5" : "bg-background";
|
|
216
|
+
let x;
|
|
217
|
+
e[2] !== C ? (x = P("group flex w-full gap-3 px-4 py-3 hover:bg-accent/40", C), e[2] = C, e[3] = x) : x = e[3];
|
|
218
|
+
let h;
|
|
219
|
+
e[4] !== f || e[5] !== n.id || e[6] !== n.url || e[7] !== r ? (h = () => {
|
|
220
|
+
f && r(n.id), n.url && (window.location.href = n.url);
|
|
221
|
+
}, e[4] = f, e[5] = n.id, e[6] = n.url, e[7] = r, e[8] = h) : h = e[8];
|
|
222
|
+
let A;
|
|
223
|
+
e[9] !== n.title ? (A = /* @__PURE__ */ t.jsx("div", { className: "truncate text-sm font-semibold", children: n.title }), e[9] = n.title, e[10] = A) : A = e[10];
|
|
224
|
+
let p;
|
|
225
|
+
e[11] !== n.body ? (p = n.body ? /* @__PURE__ */ t.jsx("div", { className: "mt-0.5 line-clamp-2 text-xs text-muted-foreground", children: n.body }) : null, e[11] = n.body, e[12] = p) : p = e[12];
|
|
226
|
+
let S;
|
|
227
|
+
e[13] !== A || e[14] !== p ? (S = /* @__PURE__ */ t.jsxs("div", { className: "min-w-0", children: [
|
|
228
|
+
A,
|
|
229
|
+
p
|
|
230
|
+
] }), e[13] = A, e[14] = p, e[15] = S) : S = e[15];
|
|
231
|
+
let j;
|
|
232
|
+
e[16] !== n.url ? (j = n.url ? /* @__PURE__ */ t.jsx("div", { className: "mt-2 truncate text-xs text-primary", children: n.url }) : null, e[16] = n.url, e[17] = j) : j = e[17];
|
|
233
|
+
let M;
|
|
234
|
+
e[18] !== y ? (M = y ? /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-[11px] text-muted-foreground", children: y }) : null, e[18] = y, e[19] = M) : M = e[19];
|
|
235
|
+
let b;
|
|
236
|
+
e[20] !== h || e[21] !== S || e[22] !== j || e[23] !== M ? (b = /* @__PURE__ */ t.jsxs("button", { type: "button", className: "min-w-0 flex-1 text-left", onClick: h, children: [
|
|
237
|
+
S,
|
|
238
|
+
j,
|
|
239
|
+
M
|
|
240
|
+
] }), e[20] = h, e[21] = S, e[22] = j, e[23] = M, e[24] = b) : b = e[24];
|
|
241
|
+
let c;
|
|
242
|
+
e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ t.jsx(_, { asChild: !0, children: /* @__PURE__ */ t.jsx("button", { type: "button", className: "inline-flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent", "aria-label": "Notification options", children: /* @__PURE__ */ t.jsx(re, { className: "h-4 w-4" }) }) }), e[25] = c) : c = e[25];
|
|
243
|
+
let U;
|
|
244
|
+
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (U = P("z-50 min-w-[10rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md", "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"), e[26] = U) : U = e[26];
|
|
245
|
+
let v;
|
|
246
|
+
e[27] !== n.id || e[28] !== a ? (v = /* @__PURE__ */ t.jsx(K, { className: "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", onSelect: () => a(n.id), children: "Archive" }), e[27] = n.id, e[28] = a, e[29] = v) : v = e[29];
|
|
247
|
+
const D = !f;
|
|
248
|
+
let N;
|
|
249
|
+
e[30] !== n.id || e[31] !== r ? (N = () => r(n.id), e[30] = n.id, e[31] = r, e[32] = N) : N = e[32];
|
|
250
|
+
let R;
|
|
251
|
+
e[33] !== D || e[34] !== N ? (R = /* @__PURE__ */ t.jsx(K, { className: "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", disabled: D, onSelect: N, children: "Mark as read" }), e[33] = D, e[34] = N, e[35] = R) : R = e[35];
|
|
252
|
+
let w;
|
|
253
|
+
e[36] !== v || e[37] !== R ? (w = /* @__PURE__ */ t.jsx("div", { className: "flex items-start", children: /* @__PURE__ */ t.jsxs(ee, { children: [
|
|
254
|
+
c,
|
|
255
|
+
/* @__PURE__ */ t.jsx(te, { children: /* @__PURE__ */ t.jsxs(ne, { align: "end", sideOffset: 6, className: U, children: [
|
|
256
|
+
v,
|
|
257
|
+
R
|
|
258
|
+
] }) })
|
|
259
|
+
] }) }), e[36] = v, e[37] = R, e[38] = w) : w = e[38];
|
|
260
|
+
let g;
|
|
261
|
+
return e[39] !== b || e[40] !== w || e[41] !== x ? (g = /* @__PURE__ */ t.jsxs("div", { className: x, children: [
|
|
262
|
+
b,
|
|
263
|
+
w
|
|
264
|
+
] }), e[39] = b, e[40] = w, e[41] = x, e[42] = g) : g = e[42], g;
|
|
265
|
+
}
|
|
266
|
+
export {
|
|
267
|
+
he as NotificationsDrawer
|
|
54
268
|
};
|
|
55
|
-
//#
|
|
56
|
-
export { a as Checkbox };
|
|
57
|
-
|
|
58
|
-
//# sourceMappingURL=index16.js.map
|
|
269
|
+
//# sourceMappingURL=index16.js.map
|
package/dist/index16.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index16.js","names":["React","cn","colorVariants","red","sky","primary","CheckboxProps","Partial","Omit","InputHTMLAttributes","HTMLInputElement","id","name","checked","onChange","event","ChangeEvent","color","Checkbox","t0","$","_c","className","defaultChecked","defaultValue","props","t1","undefined","colorClasses","t2","t3","t4","Symbol","for","t5"],"sources":["../src/components/Checkbox/index.tsx"],"sourcesContent":["import React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nconst colorVariants = {\n red: \"checked:border-red-700 checked:bg-red-700 indeterminate:border-red-700 indeterminate:bg-red-700 focus-visible:outline-red-700\",\n sky: \"checked:border-sky-600 checked:bg-sky-600 indeterminate:border-sky-600 indeterminate:bg-sky-600 focus-visible:outline-sky-600\",\n primary:\n \"checked:border-primary checked:bg-primary indeterminate:border-primary indeterminate:bg-primary focus-visible:outline-primary\",\n}\n\ninterface CheckboxProps\n extends Partial<Omit<React.InputHTMLAttributes<HTMLInputElement>, \"type\">> {\n id: string;\n name: string;\n checked: boolean;\n onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;\n color?: keyof typeof colorVariants;\n};\n\nexport const Checkbox = ({\n id,\n name,\n defaultValue,\n defaultChecked,\n checked,\n onChange,\n color = \"primary\",\n className,\n ...props\n}: CheckboxProps) => {\n\n const colorClasses = colorVariants[color]\n\n return (\n <div className=\"flex h-6 shrink-0 items-center\">\n <div className=\"group grid size-4 grid-cols-1\">\n <input\n {...props}\n id={id}\n name={name}\n type=\"checkbox\"\n defaultValue={defaultValue}\n defaultChecked={defaultChecked}\n checked={checked}\n onChange={onChange}\n className={cn(\n \"col-start-1 row-start-1 appearance-none cursor-pointer rounded-sm border border-gray-300 bg-white focus-visible:outline-2 focus-visible:outline-offset-2 disabled:border-gray-300 disabled:bg-gray-100 disabled:checked:bg-gray-100 forced-colors:appearance-auto\",\n colorClasses,\n className,\n )}\n />\n <svg\n fill=\"none\"\n viewBox=\"0 0 14 14\"\n className=\"pointer-events-none col-start-1 row-start-1 size-3.5 self-center justify-self-center stroke-white group-has-disabled:stroke-gray-950/25\"\n >\n <path\n d=\"M3 8L6 11L11 3.5\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"opacity-0 group-has-checked:opacity-100\"\n />\n <path\n d=\"M3 7H11\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"opacity-0 group-has-indeterminate:opacity-100\"\n />\n </svg>\n </div>\n </div>\n )\n}\n"],"mappings":";;;;;AAKA,IAAME,IAAgB;CACpBC,KAAK;CACLC,KAAK;CACLC,SACE;CACH,EAWYa,KAAWC,MAAA;CAAA,IAAAC,IAAAC,EAAA,GAAA,EAAAR,GAAAS,GAAAC,GAAAC,GAAAb,GAAAC,GAAAE,GA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,EAAA,QAAAY,OAAAC,IAAA,4BAAA,IACFF,IAAA,kBAAA,OAAA;EACO,MAAA;EACG,SAAA;EACE,WAAA;YAHZ,CAKE,kBAAA,QAAA;GACI,GAAA;GACW,aAAA;GACC,eAAA;GACC,gBAAA;GACL,WAAA;GAEZ,CAAA,EAAA,kBAAA,QAAA;GACI,GAAA;GACW,aAAA;GACC,eAAA;GACC,gBAAA;GACL,WAAA;GAEd,CAAA,CAAM;KAAAX,EAAA,MAAAW,KAAAA,IAAAX,EAAA;CAAA,IAAAc;AAEJ,QAFId,EAAA,QAAAU,IAEJI,IAAAd,EAAA,OAtCNc,IAAA,kBAAA,OAAA;EAAe,WAAA;YACb,kBAAA,OAAA;GAAe,WAAA;aAAf,CACEJ,GAeAC,EAqBJ;;EAAM,CAAA,EAAAX,EAAA,MAAAU,GAAAV,EAAA,MAAAc,IAtCNA"}
|
|
1
|
+
{"version":3,"file":"index16.js","sources":["../src/components/Notifications/NotificationsDrawer.tsx"],"sourcesContent":["import { createContext, useCallback, useContext, useEffect, useMemo, useState, type Context } from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Loader2, MoreVertical, X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nimport type { NotificationItem, NotificationsRealtimeState } from \"./types\"\n\n\ntype ListResponse = {\n ok?: boolean\n error?: string\n notifications?: NotificationItem[]\n unreadCount?: number\n unseenCount?: number\n}\n\ntype DayGroup = {\n key: string\n label: string\n items: NotificationItem[]\n}\n\nconst toMs = (iso: string): number => {\n const ms = Date.parse(iso)\n return Number.isFinite(ms) ? ms : 0\n}\n\nconst getDayKey = (iso: string): string => {\n const date = new Date(toMs(iso))\n if (!Number.isFinite(date.getTime())) return \"unknown\"\n\n const year = date.getFullYear()\n const month = String(date.getMonth() + 1).padStart(2, \"0\")\n const day = String(date.getDate()).padStart(2, \"0\")\n\n return `${year}-${month}-${day}`\n}\n\nconst formatDayLabel = (key: string): string => {\n if (key === \"unknown\") return \"Unknown date\"\n const [yearRaw, monthRaw, dayRaw] = key.split(\"-\")\n const year = Number(yearRaw)\n const month = Number(monthRaw)\n const day = Number(dayRaw)\n\n if (!Number.isFinite(year) || !Number.isFinite(month) || !Number.isFinite(day)) return \"Unknown date\"\n\n const date = new Date(year, month - 1, day)\n if (!Number.isFinite(date.getTime())) return \"Unknown date\"\n\n const now = new Date()\n const includeYear = now.getFullYear() !== year\n return date.toLocaleDateString(undefined, includeYear\n ? { weekday: \"short\", month: \"short\", day: \"numeric\", year: \"numeric\" }\n : { weekday: \"short\", month: \"short\", day: \"numeric\" })\n}\n\nconst groupByDay = (items: NotificationItem[]): DayGroup[] => {\n const groups: DayGroup[] = []\n let currentKey: string | null = null\n\n for (const item of items) {\n const key = getDayKey(item.createdAt)\n if (key !== currentKey) {\n currentKey = key\n groups.push({ key, label: formatDayLabel(key), items: [] })\n }\n groups[groups.length - 1]!.items.push(item)\n }\n\n return groups\n}\n\nconst EmptyRealtimeContext = createContext<NotificationsRealtimeState | null>(null)\n\nexport function NotificationsDrawer({\n open,\n onOpenChange,\n className,\n limit = 50,\n defaultUnreadOnly = false,\n realtimeContext,\n}: {\n open: boolean\n onOpenChange: (open: boolean) => void\n className?: string\n limit?: number\n defaultUnreadOnly?: boolean\n realtimeContext?: Context<NotificationsRealtimeState | null>\n}) {\n const realtime = useContext(realtimeContext ?? EmptyRealtimeContext)\n\n const [items, setItems] = useState<NotificationItem[]>([])\n const [unreadCount, setUnreadCount] = useState<number>(0)\n const [unseenCount, setUnseenCount] = useState<number>(0)\n const [loading, setLoading] = useState(false)\n const [error, setError] = useState<string | null>(null)\n const [unreadOnly, setUnreadOnly] = useState<boolean>(defaultUnreadOnly)\n\n const mergedItems = realtime?.notifications ?? items\n const mergedUnreadCount = realtime?.unreadCount ?? unreadCount\n const mergedUnseenCount = realtime?.unseenCount ?? unseenCount\n const mergedLoading = realtime?.loading ?? loading\n const mergedError = realtime?.error\n ? (realtime.error instanceof Error ? realtime.error.message : String(realtime.error))\n : error\n\n const visibleItems = useMemo(() => mergedItems.slice(0, limit), [limit, mergedItems])\n\n const unread = useMemo(() => visibleItems.filter((n) => !n.readAt), [visibleItems])\n const read = useMemo(() => visibleItems.filter((n) => Boolean(n.readAt)), [visibleItems])\n const unreadGroups = useMemo(() => groupByDay(unread), [unread])\n const readGroups = useMemo(() => groupByDay(read), [read])\n\n const refresh = useCallback(async ({ unreadOnly, markSeen }: { unreadOnly: boolean; markSeen: boolean }) => {\n setLoading(true)\n setError(null)\n\n try {\n const res = await fetch(\"/api/rb/notifications\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n credentials: \"include\",\n body: JSON.stringify({ limit, unreadOnly, markSeen }),\n })\n\n const json = (await res.json().catch(() => null)) as ListResponse | null\n if (!res.ok || !json?.ok) {\n setError(json?.error || \"Unable to load notifications.\")\n return\n }\n\n const nextItems = Array.isArray(json.notifications) ? json.notifications : []\n setItems(nextItems)\n setUnreadCount(Number.isFinite(json.unreadCount) ? Math.max(0, Math.floor(json.unreadCount ?? 0)) : 0)\n setUnseenCount(Number.isFinite(json.unseenCount) ? Math.max(0, Math.floor(json.unseenCount ?? 0)) : 0)\n } catch {\n setError(\"Unable to load notifications.\")\n } finally {\n setLoading(false)\n }\n }, [limit])\n\n useEffect(() => {\n if (!open) return\n if (realtime) {\n void (async () => {\n try {\n await fetch(\"/api/rb/notifications\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n credentials: \"include\",\n keepalive: true,\n body: JSON.stringify({ limit: 1, markSeen: true }),\n })\n } catch {\n return\n }\n })()\n return\n }\n void refresh({ unreadOnly, markSeen: true })\n }, [open, realtime, refresh, unreadOnly])\n\n useEffect(() => {\n if (!open) return\n if (realtime) return\n void refresh({ unreadOnly, markSeen: false })\n }, [open, realtime, refresh, unreadOnly])\n\n const markAsRead = async (id: string) => {\n try {\n const res = await fetch(`/api/rb/notifications/${encodeURIComponent(id)}/read`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n credentials: \"include\",\n keepalive: true,\n body: \"{}\",\n })\n\n const json = (await res.json().catch(() => null)) as { ok?: boolean } | null\n if (!res.ok || !json?.ok) return\n\n const nowIso = new Date().toISOString()\n if (realtime) return\n setItems((current) => {\n const target = current.find((n) => n.id === id)\n if (target && !target.readAt) {\n setUnreadCount((count) => Math.max(0, count - 1))\n }\n if (target && !target.seenAt) {\n setUnseenCount((count) => Math.max(0, count - 1))\n }\n return current.map((n) => (n.id === id && !n.readAt ? { ...n, readAt: nowIso, ...(n.seenAt ? {} : { seenAt: nowIso }) } : n))\n })\n } catch {\n return\n }\n }\n\n const archive = async (id: string) => {\n try {\n const res = await fetch(`/api/rb/notifications/${encodeURIComponent(id)}/archive`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n credentials: \"include\",\n body: \"{}\",\n })\n\n const json = (await res.json().catch(() => null)) as { ok?: boolean } | null\n if (!res.ok || !json?.ok) return\n\n if (realtime) return\n setItems((current) => {\n const target = current.find((n) => n.id === id)\n if (target && !target.readAt) {\n setUnreadCount((count) => Math.max(0, count - 1))\n }\n if (target && !target.seenAt) {\n setUnseenCount((count) => Math.max(0, count - 1))\n }\n return current.filter((n) => n.id !== id)\n })\n } catch {\n return\n }\n }\n\n return (\n <DialogPrimitive.Root open={open} onOpenChange={onOpenChange}>\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/50\" />\n <DialogPrimitive.Content\n className={cn(\n \"fixed right-0 top-0 z-50 flex h-full w-full max-w-md flex-col border-l bg-background shadow-xl outline-none\",\n className,\n )}\n >\n <header className=\"flex items-center justify-between gap-2 border-b px-4 py-3\">\n <div className=\"flex min-w-0 flex-col\">\n <DialogPrimitive.Title className=\"text-sm font-semibold\">Notifications</DialogPrimitive.Title>\n <span className=\"text-xs text-muted-foreground\">\n {mergedUnreadCount > 0 ? `${mergedUnreadCount} unread` : mergedUnseenCount > 0 ? `${mergedUnseenCount} new` : \"All caught up\"}\n </span>\n </div>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => setUnreadOnly((v) => !v)}\n className={cn(\n \"rounded-md border px-2 py-1 text-xs\",\n unreadOnly ? \"bg-accent text-foreground\" : \"bg-background text-muted-foreground hover:bg-accent\",\n )}\n >\n {unreadOnly ? \"Unread\" : \"All\"}\n </button>\n <DialogPrimitive.Close asChild>\n <button type=\"button\" className=\"inline-flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent\">\n <X className=\"h-4 w-4\" />\n </button>\n </DialogPrimitive.Close>\n </div>\n </header>\n\n <div className=\"flex-1 overflow-y-auto px-4 pb-3\">\n {mergedLoading ? (\n <div className=\"flex items-center justify-center py-10 text-muted-foreground\">\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n </div>\n ) : mergedError ? (\n <div className=\"py-10 text-center text-sm text-muted-foreground\">{mergedError}</div>\n ) : visibleItems.length === 0 ? (\n <div className=\"py-10 text-center text-sm text-muted-foreground\">No notifications.</div>\n ) : (\n <div className=\"flex flex-col gap-4\">\n <div>\n <div className=\"sticky top-0 z-20 -mx-4 flex h-8 items-center border-b bg-background px-4 text-xs font-semibold text-muted-foreground\">\n Unread notifications\n </div>\n {unreadGroups.length === 0 ? (\n <div className=\"py-6 text-center text-sm text-muted-foreground\">No unread notifications.</div>\n ) : (\n unreadGroups.map((group) => (\n <div key={`unread:${group.key}`}>\n <div className=\"sticky top-8 z-10 -mx-4 flex h-7 items-center bg-background px-4 text-[11px] font-semibold text-muted-foreground\">\n {group.label}\n </div>\n <div className=\"-mx-4 flex flex-col divide-y divide-border\">\n {group.items.map((n) => (\n <NotificationRow\n key={n.id}\n notification={n}\n onMarkRead={markAsRead}\n onArchive={archive}\n />\n ))}\n </div>\n </div>\n ))\n )}\n </div>\n\n {unreadOnly ? null : (\n <div>\n <div className=\"sticky top-0 z-20 -mx-4 flex h-8 items-center border-b bg-background px-4 text-xs font-semibold text-muted-foreground\">\n Previous notifications\n </div>\n {readGroups.length === 0 ? (\n <div className=\"py-6 text-center text-sm text-muted-foreground\">No previous notifications.</div>\n ) : (\n readGroups.map((group) => (\n <div key={`previous:${group.key}`}>\n <div className=\"sticky top-8 z-10 -mx-4 flex h-7 items-center bg-background px-4 text-[11px] font-semibold text-muted-foreground\">\n {group.label}\n </div>\n <div className=\"-mx-4 flex flex-col divide-y divide-border\">\n {group.items.map((n) => (\n <NotificationRow\n key={n.id}\n notification={n}\n onMarkRead={markAsRead}\n onArchive={archive}\n />\n ))}\n </div>\n </div>\n ))\n )}\n </div>\n )}\n </div>\n )}\n </div>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n )\n}\n\nfunction NotificationRow({\n notification,\n onMarkRead,\n onArchive,\n}: {\n notification: NotificationItem\n onMarkRead: (id: string) => void\n onArchive: (id: string) => void\n}) {\n const isUnread = !notification.readAt\n const createdAtLabel = (() => {\n const date = new Date(toMs(notification.createdAt))\n if (!Number.isFinite(date.getTime())) return \"\"\n return date.toLocaleString()\n })()\n\n return (\n <div\n className={cn(\n \"group flex w-full gap-3 px-4 py-3 hover:bg-accent/40\",\n isUnread ? \"bg-primary/5\" : \"bg-background\",\n )}\n >\n <button\n type=\"button\"\n className=\"min-w-0 flex-1 text-left\"\n onClick={() => {\n if (isUnread) {\n void onMarkRead(notification.id)\n }\n if (notification.url) {\n window.location.href = notification.url\n }\n }}\n >\n <div className=\"min-w-0\">\n <div className=\"truncate text-sm font-semibold\">{notification.title}</div>\n {notification.body ? (\n <div className=\"mt-0.5 line-clamp-2 text-xs text-muted-foreground\">{notification.body}</div>\n ) : null}\n </div>\n {notification.url ? <div className=\"mt-2 truncate text-xs text-primary\">{notification.url}</div> : null}\n {createdAtLabel ? (\n <div className=\"mt-2 text-[11px] text-muted-foreground\">{createdAtLabel}</div>\n ) : null}\n </button>\n <div className=\"flex items-start\">\n <DropdownMenuPrimitive.Root>\n <DropdownMenuPrimitive.Trigger asChild>\n <button\n type=\"button\"\n className=\"inline-flex h-8 w-8 items-center justify-center rounded-md hover:bg-accent\"\n aria-label=\"Notification options\"\n >\n <MoreVertical className=\"h-4 w-4\" />\n </button>\n </DropdownMenuPrimitive.Trigger>\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n align=\"end\"\n sideOffset={6}\n className={cn(\n \"z-50 min-w-[10rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n )}\n >\n <DropdownMenuPrimitive.Item\n className=\"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\"\n onSelect={() => onArchive(notification.id)}\n >\n Archive\n </DropdownMenuPrimitive.Item>\n <DropdownMenuPrimitive.Item\n className=\"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\"\n disabled={!isUnread}\n onSelect={() => onMarkRead(notification.id)}\n >\n Mark as read\n </DropdownMenuPrimitive.Item>\n </DropdownMenuPrimitive.Content>\n </DropdownMenuPrimitive.Portal>\n </DropdownMenuPrimitive.Root>\n </div>\n </div>\n )\n}\n"],"names":["toMs","iso","ms","Date","parse","Number","isFinite","getDayKey","date","getTime","year","getFullYear","month","String","getMonth","padStart","day","getDate","formatDayLabel","key","yearRaw","monthRaw","dayRaw","split","includeYear","toLocaleDateString","undefined","weekday","groupByDay","items","groups","currentKey","item","createdAt","push","label","length","EmptyRealtimeContext","createContext","NotificationsDrawer","open","onOpenChange","className","limit","defaultUnreadOnly","realtimeContext","realtime","useContext","setItems","useState","unreadCount","setUnreadCount","unseenCount","setUnseenCount","loading","setLoading","error","setError","unreadOnly","setUnreadOnly","mergedItems","notifications","mergedUnreadCount","mergedUnseenCount","mergedLoading","mergedError","Error","message","visibleItems","useMemo","slice","unread","filter","n","readAt","read","Boolean","unreadGroups","readGroups","refresh","useCallback","markSeen","res","fetch","method","headers","credentials","body","JSON","stringify","json","catch","ok","nextItems","Array","isArray","Math","max","floor","useEffect","keepalive","markAsRead","id","encodeURIComponent","nowIso","toISOString","current","target","find","count","seenAt","map","archive","jsx","DialogPrimitive","jsxs","cn","v","X","Loader2","group","NotificationRow","t0","$","_c","notification","onMarkRead","onArchive","isUnread","t1","bb0","toLocaleString","createdAtLabel","t2","t3","t4","url","window","location","href","t5","title","t6","t7","t8","t9","t10","t11","Symbol","for","DropdownMenuPrimitive.Trigger","MoreVertical","t12","t13","t14","t15","t16","t17","DropdownMenuPrimitive.Root","DropdownMenuPrimitive.Content","t18"],"mappings":";;;;;;;AAwBA,MAAMA,IAAOA,CAACC,MAAwB;AACpC,QAAMC,IAAKC,KAAKC,MAAMH,CAAG;AACzB,SAAOI,OAAOC,SAASJ,CAAE,IAAIA,IAAK;AACpC,GAEMK,KAAYA,CAACN,MAAwB;AACzC,QAAMO,IAAO,IAAIL,KAAKH,EAAKC,CAAG,CAAC;AAC/B,MAAI,CAACI,OAAOC,SAASE,EAAKC,QAAAA,CAAS,EAAG,QAAO;AAE7C,QAAMC,IAAOF,EAAKG,YAAAA,GACZC,IAAQC,OAAOL,EAAKM,SAAAA,IAAa,CAAC,EAAEC,SAAS,GAAG,GAAG,GACnDC,IAAMH,OAAOL,EAAKS,QAAAA,CAAS,EAAEF,SAAS,GAAG,GAAG;AAElD,SAAO,GAAGL,CAAI,IAAIE,CAAK,IAAII,CAAG;AAChC,GAEME,KAAiBA,CAACC,MAAwB;AAC9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
+
import { DateLib as r } from "./index135.js";
|
|
2
|
+
function a(t, o, n) {
|
|
3
|
+
return (n ?? new r(o)).formatMonthYear(t);
|
|
9
4
|
}
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
const f = a;
|
|
6
|
+
export {
|
|
7
|
+
a as formatCaption,
|
|
8
|
+
f as formatMonthCaption
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index160.js.map
|
package/dist/index160.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index160.js","
|
|
1
|
+
{"version":3,"file":"index160.js","sources":["../../../node_modules/react-day-picker/dist/esm/formatters/formatCaption.js"],"sourcesContent":["import { DateLib } from \"../classes/DateLib.js\";\n/**\n * Formats the caption of the month.\n *\n * @defaultValue Locale-specific month/year order (e.g., \"November 2022\").\n * @param month The date representing the month.\n * @param options Configuration options for the date library.\n * @param dateLib The date library to use for formatting. If not provided, a new\n * instance is created.\n * @returns The formatted caption as a string.\n * @group Formatters\n * @see https://daypicker.dev/docs/translation#custom-formatters\n */\nexport function formatCaption(month, options, dateLib) {\n const lib = dateLib ?? new DateLib(options);\n return lib.formatMonthYear(month);\n}\n/**\n * @private\n * @deprecated Use {@link formatCaption} instead.\n * @group Formatters\n */\nexport const formatMonthCaption = formatCaption;\n"],"names":["formatCaption","month","options","dateLib","DateLib","formatMonthCaption"],"mappings":";AAaO,SAASA,EAAcC,GAAOC,GAASC,GAAS;AAEnD,UADYA,KAAW,IAAIC,EAAQF,CAAO,GAC/B,gBAAgBD,CAAK;AACpC;AAMY,MAACI,IAAqBL;","x_google_ignoreList":[0]}
|
package/dist/index161.js
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
let { startOfYear: a, endOfYear: o, eachYearOfInterval: s, getYear: c } = r, l = s({
|
|
5
|
-
start: a(e),
|
|
6
|
-
end: o(t)
|
|
7
|
-
});
|
|
8
|
-
return i && l.reverse(), l.map((e) => {
|
|
9
|
-
let t = n.formatYearDropdown(e, r);
|
|
10
|
-
return {
|
|
11
|
-
value: c(e),
|
|
12
|
-
label: t,
|
|
13
|
-
disabled: !1
|
|
14
|
-
};
|
|
15
|
-
});
|
|
1
|
+
import { DateLib as a } from "./index135.js";
|
|
2
|
+
function f(r, t, o) {
|
|
3
|
+
return (o ?? new a(t)).format(r, "d");
|
|
16
4
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=index161.js.map
|
|
5
|
+
export {
|
|
6
|
+
f as formatDay
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=index161.js.map
|