hypereffect-ui 0.1.0__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.
- hypereffect/__init__.py +45 -0
- hypereffect/_cel.py +702 -0
- hypereffect/client.py +616 -0
- hypereffect/components.py +149 -0
- hypereffect/message.py +365 -0
- hypereffect/server.py +123 -0
- hypereffect/signals.py +91 -0
- hypereffect/ui.py +77 -0
- hypereffect_ui-0.1.0.dist-info/METADATA +117 -0
- hypereffect_ui-0.1.0.dist-info/RECORD +11 -0
- hypereffect_ui-0.1.0.dist-info/WHEEL +4 -0
hypereffect/__init__.py
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""Types and helpers for `hypereffect <https://hypereffect.dev>`_, a small
|
|
2
|
+
hypermedia protocol for server-driven UI.
|
|
3
|
+
|
|
4
|
+
- Elements, handlers, server and renderer messages, and the line framing.
|
|
5
|
+
Building an interface looks like
|
|
6
|
+
``ui.text("title").parent("main").variant("h1").text("Inbox")``.
|
|
7
|
+
- :mod:`hypereffect.signals`: merge patch, local signals and signal paths.
|
|
8
|
+
- The components, their attributes and nesting rules.
|
|
9
|
+
- An :class:`App` base class for per-session logic, and a :class:`Server`
|
|
10
|
+
that drives one from any transport.
|
|
11
|
+
- :mod:`hypereffect.client`: the renderer side without drawing, and a
|
|
12
|
+
``Loopback`` that connects it to a Server for tests.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from . import signals, ui
|
|
16
|
+
from .components import Attr, AttrType, Component, accepts
|
|
17
|
+
from .message import (
|
|
18
|
+
Action,
|
|
19
|
+
Element,
|
|
20
|
+
Handler,
|
|
21
|
+
Hello,
|
|
22
|
+
Json,
|
|
23
|
+
LineBuffer,
|
|
24
|
+
Metadata,
|
|
25
|
+
ParseError,
|
|
26
|
+
ParseErrorKind,
|
|
27
|
+
RendererMessage,
|
|
28
|
+
Remove,
|
|
29
|
+
ServerMessage,
|
|
30
|
+
Signal,
|
|
31
|
+
cel,
|
|
32
|
+
encode_line,
|
|
33
|
+
is_cel,
|
|
34
|
+
parse_line,
|
|
35
|
+
parse_renderer_message,
|
|
36
|
+
parse_server_message,
|
|
37
|
+
)
|
|
38
|
+
from .server import App, Outbox, Server
|
|
39
|
+
|
|
40
|
+
__all__ = [
|
|
41
|
+
"Action", "App", "Attr", "AttrType", "Component", "Element", "Handler", "Hello", "Json",
|
|
42
|
+
"LineBuffer", "Metadata", "Outbox", "ParseError", "ParseErrorKind", "RendererMessage",
|
|
43
|
+
"Remove", "Server", "ServerMessage", "Signal", "accepts", "cel", "encode_line", "is_cel",
|
|
44
|
+
"parse_line", "parse_renderer_message", "parse_server_message", "signals", "ui",
|
|
45
|
+
]
|