pulse-framework 0.1.74__py3-none-any.whl → 0.1.75__py3-none-any.whl
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.
- pulse/js/__init__.py +36 -0
- pulse/js/__init__.pyi +48 -0
- pulse/js/abort_controller.py +61 -0
- pulse/js/array_buffer.py +227 -0
- pulse/js/blob.py +60 -0
- pulse/js/crypto.py +69 -0
- pulse/js/custom_event.py +49 -0
- pulse/js/dom_parser.py +40 -0
- pulse/js/fetch_api.py +126 -0
- pulse/js/file.py +72 -0
- pulse/js/file_reader.py +37 -0
- pulse/js/form_data.py +58 -0
- pulse/js/intersection_observer.py +79 -0
- pulse/js/intl.py +101 -0
- pulse/js/mutation_observer.py +87 -0
- pulse/js/performance_observer.py +54 -0
- pulse/js/resize_observer.py +55 -0
- pulse/js/text_encoding.py +66 -0
- pulse/js/url.py +114 -0
- {pulse_framework-0.1.74.dist-info → pulse_framework-0.1.75.dist-info}/METADATA +1 -1
- {pulse_framework-0.1.74.dist-info → pulse_framework-0.1.75.dist-info}/RECORD +23 -6
- {pulse_framework-0.1.74.dist-info → pulse_framework-0.1.75.dist-info}/WHEEL +0 -0
- {pulse_framework-0.1.74.dist-info → pulse_framework-0.1.75.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""
|
|
2
|
+
JavaScript TextEncoder/TextDecoder builtins.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
|
|
6
|
+
```python
|
|
7
|
+
from pulse.js import TextEncoder, TextDecoder
|
|
8
|
+
|
|
9
|
+
@ps.javascript
|
|
10
|
+
def example(text: str, data):
|
|
11
|
+
encoder = TextEncoder()
|
|
12
|
+
encoded = encoder.encode(text)
|
|
13
|
+
decoder = TextDecoder("utf-8")
|
|
14
|
+
return decoder.decode(encoded)
|
|
15
|
+
```
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from typing import Any as _Any
|
|
19
|
+
from typing import TypedDict as _TypedDict
|
|
20
|
+
|
|
21
|
+
from pulse.transpiler.js_module import JsModule
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class TextDecoderOptions(_TypedDict, total=False):
|
|
25
|
+
fatal: bool
|
|
26
|
+
ignoreBOM: bool
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class TextDecodeOptions(_TypedDict, total=False):
|
|
30
|
+
stream: bool
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class TextEncoder:
|
|
34
|
+
"""UTF-8 encoder."""
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def encoding(self) -> str: ...
|
|
38
|
+
|
|
39
|
+
def encode(self, string: str = "", /) -> _Any: ...
|
|
40
|
+
|
|
41
|
+
def encodeInto(self, string: str, destination: _Any, /) -> _Any: ...
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class TextDecoder:
|
|
45
|
+
"""Text decoder for byte streams."""
|
|
46
|
+
|
|
47
|
+
def __init__(
|
|
48
|
+
self, label: str | None = None, options: TextDecoderOptions | None = None, /
|
|
49
|
+
) -> None: ...
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def encoding(self) -> str: ...
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def fatal(self) -> bool: ...
|
|
56
|
+
|
|
57
|
+
@property
|
|
58
|
+
def ignoreBOM(self) -> bool: ...
|
|
59
|
+
|
|
60
|
+
def decode(
|
|
61
|
+
self, input: _Any | None = None, options: TextDecodeOptions | None = None, /
|
|
62
|
+
) -> str: ...
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# Self-register this module as a JS builtin (global identifiers)
|
|
66
|
+
JsModule.register(name=None)
|
pulse/js/url.py
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"""
|
|
2
|
+
JavaScript URL and URLSearchParams builtins.
|
|
3
|
+
|
|
4
|
+
Usage:
|
|
5
|
+
|
|
6
|
+
```python
|
|
7
|
+
from pulse.js import URL, URLSearchParams
|
|
8
|
+
|
|
9
|
+
@ps.javascript
|
|
10
|
+
def example():
|
|
11
|
+
url = URL("https://example.com?foo=1")
|
|
12
|
+
params = URLSearchParams(url.search)
|
|
13
|
+
params.append("bar", "2")
|
|
14
|
+
return url.toString(), params.toString()
|
|
15
|
+
```
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
from collections.abc import Callable as _Callable
|
|
19
|
+
from collections.abc import Iterable as _Iterable
|
|
20
|
+
from typing import Any as _Any
|
|
21
|
+
|
|
22
|
+
from pulse.transpiler.js_module import JsModule
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class URLSearchParams:
|
|
26
|
+
"""Query string utility object."""
|
|
27
|
+
|
|
28
|
+
def __init__(
|
|
29
|
+
self,
|
|
30
|
+
init: str | _Iterable[tuple[str, str]] | dict[str, str] | None = None,
|
|
31
|
+
/,
|
|
32
|
+
) -> None: ...
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def size(self) -> int: ...
|
|
36
|
+
|
|
37
|
+
def append(self, name: str, value: str, /) -> None: ...
|
|
38
|
+
|
|
39
|
+
def delete(self, name: str, value: str | None = None, /) -> None: ...
|
|
40
|
+
|
|
41
|
+
def entries(self) -> _Iterable[tuple[str, str]]: ...
|
|
42
|
+
|
|
43
|
+
def forEach(
|
|
44
|
+
self,
|
|
45
|
+
callback: _Callable[[str, str, "URLSearchParams"], None],
|
|
46
|
+
thisArg: _Any | None = None,
|
|
47
|
+
/,
|
|
48
|
+
) -> None: ...
|
|
49
|
+
|
|
50
|
+
def get(self, name: str, /) -> str | None: ...
|
|
51
|
+
|
|
52
|
+
def getAll(self, name: str, /) -> list[str]: ...
|
|
53
|
+
|
|
54
|
+
def has(self, name: str, value: str | None = None, /) -> bool: ...
|
|
55
|
+
|
|
56
|
+
def keys(self) -> _Iterable[str]: ...
|
|
57
|
+
|
|
58
|
+
def set(self, name: str, value: str, /) -> None: ...
|
|
59
|
+
|
|
60
|
+
def sort(self) -> None: ...
|
|
61
|
+
|
|
62
|
+
def toString(self) -> str: ...
|
|
63
|
+
|
|
64
|
+
def values(self) -> _Iterable[str]: ...
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class URL:
|
|
68
|
+
"""URL parser and serializer."""
|
|
69
|
+
|
|
70
|
+
def __init__(self, url: str, base: str | None = None, /) -> None: ...
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def href(self) -> str: ...
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def origin(self) -> str: ...
|
|
77
|
+
|
|
78
|
+
@property
|
|
79
|
+
def protocol(self) -> str: ...
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def username(self) -> str: ...
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def password(self) -> str: ...
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def host(self) -> str: ...
|
|
89
|
+
|
|
90
|
+
@property
|
|
91
|
+
def hostname(self) -> str: ...
|
|
92
|
+
|
|
93
|
+
@property
|
|
94
|
+
def port(self) -> str: ...
|
|
95
|
+
|
|
96
|
+
@property
|
|
97
|
+
def pathname(self) -> str: ...
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def search(self) -> str: ...
|
|
101
|
+
|
|
102
|
+
@property
|
|
103
|
+
def hash(self) -> str: ...
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def searchParams(self) -> URLSearchParams: ...
|
|
107
|
+
|
|
108
|
+
def toString(self) -> str: ...
|
|
109
|
+
|
|
110
|
+
def toJSON(self) -> str: ...
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
# Self-register this module as a JS builtin (global identifiers)
|
|
114
|
+
JsModule.register(name=None)
|
|
@@ -48,27 +48,44 @@ pulse/hooks/runtime.py,sha256=ogrm4Prvr9ZNaBb5bLfZBHrzbJuYe1zKpIPkbdnIzsw,12286
|
|
|
48
48
|
pulse/hooks/setup.py,sha256=NcQPKnMV5dO0vUsWi4u9c9LB0wqFstrtiPGdvihtGiQ,6872
|
|
49
49
|
pulse/hooks/stable.py,sha256=hLCOl_oAbgdNwiaWwwUTk7ZsHvMqXFFozFztJZMyGbQ,3627
|
|
50
50
|
pulse/hooks/state.py,sha256=zRFlcOUdl-SBkJ-EzVXRLrLXzAc4-uRzgH4hD9rM1oU,5251
|
|
51
|
-
pulse/js/__init__.py,sha256=
|
|
52
|
-
pulse/js/__init__.pyi,sha256=
|
|
51
|
+
pulse/js/__init__.py,sha256=csEWvFon_ayAiR6OVQl2wnukaLWLK1_PPodVlcY_EvY,5062
|
|
52
|
+
pulse/js/__init__.pyi,sha256=DCgO3uNh6dQLVd9QD3I-LyiPP9VrtE7MZYYHr-8EvVg,5479
|
|
53
53
|
pulse/js/_types.py,sha256=F4Go2JtJ2dbxq1fXpc2ablG_nyvhvHzOlZLlEv0VmyU,7421
|
|
54
|
+
pulse/js/abort_controller.py,sha256=nKiUgS_uy2Rgh-MNG7fcGIm8Qd6g7hNV_UVk7OgK3qg,1161
|
|
54
55
|
pulse/js/array.py,sha256=_tC6QZlflWCXOXXUMMtowM3UK7iDWAtFM8BKqR5rjKk,8883
|
|
56
|
+
pulse/js/array_buffer.py,sha256=-iuiSZuv-rx3d0jpQtQYZLXZ2nLuMF93QrQBO-HXv5o,4100
|
|
57
|
+
pulse/js/blob.py,sha256=XiI4g_fKaKtB8OPzS6D4rFG0fRBZlCl9kbO7a5IFPPk,981
|
|
55
58
|
pulse/js/console.py,sha256=A-GNKEnPby10gdcTdYsBPVfz4m94PYzTXRwGhfaPRpc,1775
|
|
59
|
+
pulse/js/crypto.py,sha256=Atxtc2oqb4xnW9nQV3ruamQhCAl2O_H2XiECspN1JvI,1245
|
|
60
|
+
pulse/js/custom_event.py,sha256=SxtzPQJwgSXRmesd3SiaVdCGYHsFcrnAiPZA63YuunA,901
|
|
56
61
|
pulse/js/date.py,sha256=qJjdwupuUtKS95u8N8C8FKMKOIB8qjVMsYA3VYfe-tA,3363
|
|
57
62
|
pulse/js/document.py,sha256=SBinVGfb05jFpeyxAE0yk5Z__dkdW_mFsTI-rvgc-S8,3004
|
|
63
|
+
pulse/js/dom_parser.py,sha256=0qRlAHVr1gDphCPUOSJRcZR94giJF6JmsWOJv4I6p80,818
|
|
58
64
|
pulse/js/error.py,sha256=v0_DmpN5ESt_CJTrIYfy8980eerjK8mHhQatNV_1M_8,2611
|
|
65
|
+
pulse/js/fetch_api.py,sha256=-4qy5DkQcCeE9CvFMtq-by-WgA7PirgOrmgMflMsluQ,2342
|
|
66
|
+
pulse/js/file.py,sha256=LDoAUXyq82VUULVkIeSjcIj1Vvy2hCi_LRUWh8THyP8,1177
|
|
67
|
+
pulse/js/file_reader.py,sha256=-Y5rfjb2j9tQ-NDX-mWgERC6Alfllh2VvRr6rzXoII0,664
|
|
68
|
+
pulse/js/form_data.py,sha256=_NKZZmD4G4gHsq-QKFMAFwU73ZatGK06p6_oUdQnh_U,1258
|
|
69
|
+
pulse/js/intersection_observer.py,sha256=ZcNV1qyiXjKPOKz5zUQTMZ3oCpfxxSRxLCEDHS_5aKY,1672
|
|
70
|
+
pulse/js/intl.py,sha256=Y_a1YvdQPzOpJAnpPiyM7Ip03L5mh-noChRDeDneVjU,2034
|
|
59
71
|
pulse/js/json.py,sha256=P8nxOANjIxrzUA1XkBrd0SmNyAGyB3pVXZDPnA1OKks,1908
|
|
60
72
|
pulse/js/map.py,sha256=bhw75CUMIearH4JACCs9zAffdzfla3Rae7SKGcCLGoc,2243
|
|
61
73
|
pulse/js/math.py,sha256=OBbMlgoa6ZHLDgmXGNKMj5wYrvroV5ICIx-VsSE5_II,1757
|
|
74
|
+
pulse/js/mutation_observer.py,sha256=7Ai74vHZFkAnVS-OrGYRanY9TpJZmHJ4PrKpz8jmTTU,1831
|
|
62
75
|
pulse/js/navigator.py,sha256=2QWSr9xyyBfgd76P472qmayXQRYXIEo-b8zLzvfhHfg,1517
|
|
63
76
|
pulse/js/number.py,sha256=fX2M6hZ5ry2FPsYaHhGlqgO6reBEXw7C-gtu0-8_Zyw,1262
|
|
64
77
|
pulse/js/obj.py,sha256=8JG9OZZ1CNqAFoMTdYtxWhTmb6zs1BqxC-nLT7KYMF8,2030
|
|
65
78
|
pulse/js/object.py,sha256=95WvnGWgB-PL-D7l12UgdxNy_fxO5sJXool3Rx5ahUQ,4433
|
|
79
|
+
pulse/js/performance_observer.py,sha256=uletaqnJ6kvJqFSSFtmNo0j--FduK4uZHd8cfRqeN3A,1156
|
|
66
80
|
pulse/js/promise.py,sha256=vBXcL-U9BuZN-q1jbYhyzQaOL2niDPw4LsD7q7Y_yco,4670
|
|
67
81
|
pulse/js/pulse.py,sha256=m-LgqwhYygVBj7GzjeO-uo8fK5ThyVe7c3QvOJt_vc0,2962
|
|
68
82
|
pulse/js/react.py,sha256=eRMrgM8RsoAIn2lcHDoUYas3l4tImLOW51dwmw9AxQU,12057
|
|
69
83
|
pulse/js/regexp.py,sha256=qO-3nmt7uGN7V_bwimPCN-2RSsPfE6YiY7G1MjoP3YY,1055
|
|
84
|
+
pulse/js/resize_observer.py,sha256=MN0pqnBETmI7bSrWT1bus4_vTZKmJ0jwBoW-cYQWoT4,1162
|
|
70
85
|
pulse/js/set.py,sha256=omG3g-25GRHxgoKISSB4x-M8UDFlaXtFV9cSIpd5uB0,3017
|
|
71
86
|
pulse/js/string.py,sha256=VsvDF_ve8R9QIiBdDotLP2KpCKwmpEfGgRQWckOCmHk,813
|
|
87
|
+
pulse/js/text_encoding.py,sha256=5Qvl4XRva9m6tz9NKlv9Nej-O92epMG-y_bu6vCNHwI,1291
|
|
88
|
+
pulse/js/url.py,sha256=-sOthAlPOhJvkXh4hhNLOuWbPKd_ICnG7u--yHDPzY4,2200
|
|
72
89
|
pulse/js/weakmap.py,sha256=HACZEZ8EZk1xoaCmTXk__opvJLxlJ9_0U3y-01KQkHU,1412
|
|
73
90
|
pulse/js/weakset.py,sha256=jerMG9ubroR29HvOLIm6lkLxMj-GGWbiE57U9F6zRuQ,1256
|
|
74
91
|
pulse/js/window.py,sha256=yC1BjyH2jqp1x-CXJCUFta-ASyZ5668ozQ0AmAjZcxA,4097
|
|
@@ -127,7 +144,7 @@ pulse/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
127
144
|
pulse/types/event_handler.py,sha256=psQCydj-WEtBcFU5JU4mDwvyzkW8V2O0g_VFRU2EOHI,1618
|
|
128
145
|
pulse/user_session.py,sha256=nsnsMgqq2xGJZLpbHRMHUHcLrElMP8WcA4gjGMrcoBk,10208
|
|
129
146
|
pulse/version.py,sha256=711vaM1jVIQPgkisGgKZqwmw019qZIsc_QTae75K2pg,1895
|
|
130
|
-
pulse_framework-0.1.
|
|
131
|
-
pulse_framework-0.1.
|
|
132
|
-
pulse_framework-0.1.
|
|
133
|
-
pulse_framework-0.1.
|
|
147
|
+
pulse_framework-0.1.75.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
|
|
148
|
+
pulse_framework-0.1.75.dist-info/entry_points.txt,sha256=i7aohd3QaPu5IcuGKKvsQQEiMYMe5HcF56QEsaLVO64,46
|
|
149
|
+
pulse_framework-0.1.75.dist-info/METADATA,sha256=Y2M3HpMari75ZADpqGSxEfyP5YGCnRS2AkZ3tE3lmpA,8299
|
|
150
|
+
pulse_framework-0.1.75.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|