htmy 0.8.0__tar.gz → 0.8.2__tar.gz
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.
Potentially problematic release.
This version of htmy might be problematic. Click here for more details.
- {htmy-0.8.0 → htmy-0.8.2}/PKG-INFO +1 -1
- {htmy-0.8.0 → htmy-0.8.2}/htmy/__init__.py +1 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/html.py +12 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/renderer/baseline.py +2 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/renderer/default.py +2 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/typing.py +21 -0
- {htmy-0.8.0 → htmy-0.8.2}/pyproject.toml +10 -5
- {htmy-0.8.0 → htmy-0.8.2}/LICENSE +0 -0
- {htmy-0.8.0 → htmy-0.8.2}/README.md +0 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/core.py +0 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/etree.py +0 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/function_component.py +0 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/i18n.py +0 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/io.py +0 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/md/__init__.py +0 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/md/core.py +0 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/md/typing.py +0 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/py.typed +0 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/renderer/__init__.py +0 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/snippet.py +0 -0
- {htmy-0.8.0 → htmy-0.8.2}/htmy/utils.py +0 -0
|
@@ -30,6 +30,7 @@ from .typing import HTMYComponentType as HTMYComponentType
|
|
|
30
30
|
from .typing import MutableContext as MutableContext
|
|
31
31
|
from .typing import Properties as Properties
|
|
32
32
|
from .typing import PropertyValue as PropertyValue
|
|
33
|
+
from .typing import RendererType as RendererType
|
|
33
34
|
from .typing import SyncComponent as SyncComponent
|
|
34
35
|
from .typing import SyncContextProvider as SyncContextProvider
|
|
35
36
|
from .utils import as_component_sequence as as_component_sequence
|
|
@@ -709,6 +709,18 @@ class i(Tag):
|
|
|
709
709
|
tag_config = _DefaultTagConfig.inline_children
|
|
710
710
|
|
|
711
711
|
|
|
712
|
+
class kbd(Tag):
|
|
713
|
+
"""
|
|
714
|
+
`<kbd>` element.
|
|
715
|
+
|
|
716
|
+
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd.
|
|
717
|
+
"""
|
|
718
|
+
|
|
719
|
+
__slots__ = ()
|
|
720
|
+
|
|
721
|
+
tag_config = _DefaultTagConfig.inline_children
|
|
722
|
+
|
|
723
|
+
|
|
712
724
|
class picture(Tag):
|
|
713
725
|
"""
|
|
714
726
|
`<picture>` element.
|
|
@@ -65,6 +65,27 @@ ComponentSequence: TypeAlias = list[ComponentType] | tuple[ComponentType, ...]
|
|
|
65
65
|
Component: TypeAlias = ComponentType | ComponentSequence
|
|
66
66
|
"""Component type: a single component or a sequence of components."""
|
|
67
67
|
|
|
68
|
+
|
|
69
|
+
# -- Renderer
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class RendererType(Protocol):
|
|
73
|
+
"""Protocol definition for `htmy` renderers."""
|
|
74
|
+
|
|
75
|
+
async def render(self, component: Component, context: Context | None = None) -> str:
|
|
76
|
+
"""
|
|
77
|
+
Renders the given component.
|
|
78
|
+
|
|
79
|
+
Arguments:
|
|
80
|
+
component: The component to render.
|
|
81
|
+
context: An optional rendering context.
|
|
82
|
+
|
|
83
|
+
Returns:
|
|
84
|
+
The rendered string.
|
|
85
|
+
"""
|
|
86
|
+
...
|
|
87
|
+
|
|
88
|
+
|
|
68
89
|
# -- Context providers
|
|
69
90
|
|
|
70
91
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "htmy"
|
|
3
|
-
version = "0.8.
|
|
3
|
+
version = "0.8.2"
|
|
4
4
|
description = "Async, pure-Python server-side rendering engine."
|
|
5
5
|
authors = ["Peter Volf <do.volfp@gmail.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -71,12 +71,17 @@ lint.select = [
|
|
|
71
71
|
"tests/**/*" = ["S101"] # S101: use of assert detected
|
|
72
72
|
|
|
73
73
|
[tool.poe.tasks]
|
|
74
|
-
|
|
75
|
-
format = "ruff format ."
|
|
74
|
+
format = "ruff format --check ."
|
|
75
|
+
format-fix = "ruff format ."
|
|
76
|
+
|
|
76
77
|
lint = "ruff check ."
|
|
77
78
|
lint-fix = "ruff . --fix"
|
|
79
|
+
|
|
78
80
|
mypy = "mypy ."
|
|
81
|
+
|
|
82
|
+
check.sequence = ["format", "lint", "mypy"]
|
|
83
|
+
check.ignore_fail = "return_non_zero"
|
|
84
|
+
|
|
79
85
|
test = "python -m pytest tests"
|
|
80
|
-
|
|
81
|
-
static-checks.ignore_fail = "return_non_zero"
|
|
86
|
+
|
|
82
87
|
serve-docs = "mkdocs serve"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|