fjkit 0.1.0.dev0__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.
- fjkit/__init__.py +49 -0
- fjkit/auth/__init__.py +54 -0
- fjkit/auth/csrf.py +88 -0
- fjkit/auth/errors.py +31 -0
- fjkit/auth/plugin.py +496 -0
- fjkit/auth/sources.py +24 -0
- fjkit/auth/stores.py +141 -0
- fjkit/auth/types.py +141 -0
- fjkit/cli/__init__.py +67 -0
- fjkit/cli/build_css.py +135 -0
- fjkit/cli/check.py +193 -0
- fjkit/cli/eject.py +562 -0
- fjkit/cli/ejected.py +202 -0
- fjkit/cli/vocabulary.py +85 -0
- fjkit/config.py +130 -0
- fjkit/errors.py +156 -0
- fjkit/flash.py +189 -0
- fjkit/forms.py +145 -0
- fjkit/htmx.py +76 -0
- fjkit/icons.py +60 -0
- fjkit/messages.py +227 -0
- fjkit/mounting.py +72 -0
- fjkit/plugins.py +223 -0
- fjkit/py.typed +0 -0
- fjkit/rendering.py +554 -0
- fjkit/signing.py +63 -0
- fjkit/static/brand/torii-bolt.png +0 -0
- fjkit/static/dist/fjkit-luma.css +2 -0
- fjkit/static/dist/fjkit-lyra.css +2 -0
- fjkit/static/dist/fjkit-maia.css +2 -0
- fjkit/static/dist/fjkit-mira.css +2 -0
- fjkit/static/dist/fjkit-nova.css +2 -0
- fjkit/static/dist/fjkit-rhea.css +2 -0
- fjkit/static/dist/fjkit-sera.css +2 -0
- fjkit/static/dist/fjkit-vega.css +2 -0
- fjkit/static/icons/lucide.json +1 -0
- fjkit/static/js/errors.js +117 -0
- fjkit/static/js/multiselect.js +126 -0
- fjkit/static/js/reveal.js +51 -0
- fjkit/static/js/select.js +113 -0
- fjkit/static/src/fjkit.css +385 -0
- fjkit/static/vendor/basecoat/base/base.css +136 -0
- fjkit/static/vendor/basecoat/basecoat-base.css +2 -0
- fjkit/static/vendor/basecoat/basecoat-components.css +39 -0
- fjkit/static/vendor/basecoat/basecoat-luma.css +2 -0
- fjkit/static/vendor/basecoat/basecoat-lyra.css +2 -0
- fjkit/static/vendor/basecoat/basecoat-maia.css +2 -0
- fjkit/static/vendor/basecoat/basecoat-mira.css +2 -0
- fjkit/static/vendor/basecoat/basecoat-nova.css +2 -0
- fjkit/static/vendor/basecoat/basecoat-rhea.css +2 -0
- fjkit/static/vendor/basecoat/basecoat-sera.css +2 -0
- fjkit/static/vendor/basecoat/basecoat-vega.css +2 -0
- fjkit/static/vendor/basecoat/basecoat.all.css +1 -0
- fjkit/static/vendor/basecoat/basecoat.css +1 -0
- fjkit/static/vendor/basecoat/components/accordion.css +27 -0
- fjkit/static/vendor/basecoat/components/alert.css +38 -0
- fjkit/static/vendor/basecoat/components/avatar.css +47 -0
- fjkit/static/vendor/basecoat/components/badge.css +6 -0
- fjkit/static/vendor/basecoat/components/breadcrumb.css +30 -0
- fjkit/static/vendor/basecoat/components/button-group.css +54 -0
- fjkit/static/vendor/basecoat/components/button.css +6 -0
- fjkit/static/vendor/basecoat/components/card.css +26 -0
- fjkit/static/vendor/basecoat/components/chart.css +56 -0
- fjkit/static/vendor/basecoat/components/checkbox.css +12 -0
- fjkit/static/vendor/basecoat/components/collapsible.css +21 -0
- fjkit/static/vendor/basecoat/components/combobox.css +99 -0
- fjkit/static/vendor/basecoat/components/command.css +140 -0
- fjkit/static/vendor/basecoat/components/dialog.css +101 -0
- fjkit/static/vendor/basecoat/components/drawer.css +89 -0
- fjkit/static/vendor/basecoat/components/dropdown-menu.css +56 -0
- fjkit/static/vendor/basecoat/components/empty.css +26 -0
- fjkit/static/vendor/basecoat/components/field.css +82 -0
- fjkit/static/vendor/basecoat/components/form.css +9 -0
- fjkit/static/vendor/basecoat/components/input-group.css +74 -0
- fjkit/static/vendor/basecoat/components/input.css +32 -0
- fjkit/static/vendor/basecoat/components/item.css +50 -0
- fjkit/static/vendor/basecoat/components/kbd.css +6 -0
- fjkit/static/vendor/basecoat/components/label.css +13 -0
- fjkit/static/vendor/basecoat/components/native-select.css +12 -0
- fjkit/static/vendor/basecoat/components/popover.css +107 -0
- fjkit/static/vendor/basecoat/components/progress.css +14 -0
- fjkit/static/vendor/basecoat/components/radio.css +11 -0
- fjkit/static/vendor/basecoat/components/range.css +50 -0
- fjkit/static/vendor/basecoat/components/scrollbar.css +46 -0
- fjkit/static/vendor/basecoat/components/select.css +64 -0
- fjkit/static/vendor/basecoat/components/sidebar.css +101 -0
- fjkit/static/vendor/basecoat/components/skeleton.css +6 -0
- fjkit/static/vendor/basecoat/components/switch.css +8 -0
- fjkit/static/vendor/basecoat/components/table.css +34 -0
- fjkit/static/vendor/basecoat/components/tabs.css +31 -0
- fjkit/static/vendor/basecoat/components/textarea.css +7 -0
- fjkit/static/vendor/basecoat/components/toast.css +57 -0
- fjkit/static/vendor/basecoat/components/tooltip.css +82 -0
- fjkit/static/vendor/basecoat/js/all.min.js +1 -0
- fjkit/static/vendor/basecoat/styles/luma.css +1376 -0
- fjkit/static/vendor/basecoat/styles/lyra.css +1379 -0
- fjkit/static/vendor/basecoat/styles/maia.css +1364 -0
- fjkit/static/vendor/basecoat/styles/mira.css +1373 -0
- fjkit/static/vendor/basecoat/styles/nova.css +1387 -0
- fjkit/static/vendor/basecoat/styles/rhea.css +1381 -0
- fjkit/static/vendor/basecoat/styles/sera.css +1397 -0
- fjkit/static/vendor/basecoat/styles/vega.css +1386 -0
- fjkit/static/vendor/htmx/htmx.min.js +1 -0
- fjkit/static/vendor/htmx/json-enc.js +38 -0
- fjkit/styles.py +30 -0
- fjkit/templates/errors/page.html +92 -0
- fjkit/templates/ui/attrs.html +18 -0
- fjkit/templates/ui/button.html +64 -0
- fjkit/templates/ui/data.html +362 -0
- fjkit/templates/ui/disclosure.html +89 -0
- fjkit/templates/ui/feedback.html +313 -0
- fjkit/templates/ui/form.html +595 -0
- fjkit/templates/ui/icon.html +13 -0
- fjkit/templates/ui/layout.html +189 -0
- fjkit/templates/ui/nav.html +110 -0
- fjkit/templates/ui/overlay.html +624 -0
- fjkit/templates/ui/shell.html +170 -0
- fjkit/templates/ui/sidebar.html +170 -0
- fjkit/templates/ui/table.html +427 -0
- fjkit/templates/ui/tabs.html +133 -0
- fjkit/templating.py +365 -0
- fjkit/vendored.py +46 -0
- fjkit-0.1.0.dev0.dist-info/METADATA +119 -0
- fjkit-0.1.0.dev0.dist-info/RECORD +127 -0
- fjkit-0.1.0.dev0.dist-info/WHEEL +4 -0
- fjkit-0.1.0.dev0.dist-info/entry_points.txt +2 -0
- fjkit-0.1.0.dev0.dist-info/licenses/LICENSE +21 -0
fjkit/templating.py
ADDED
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
"""Builds and owns the Jinja `Environment`.
|
|
2
|
+
|
|
3
|
+
Routers never touch `Environment` directly, so compilation settings and
|
|
4
|
+
profiling have one location.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from collections.abc import Iterator, Mapping
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
from typing import Any
|
|
12
|
+
|
|
13
|
+
from fastapi import Request
|
|
14
|
+
from fastapi.responses import HTMLResponse, StreamingResponse
|
|
15
|
+
from jinja2 import (
|
|
16
|
+
BaseLoader,
|
|
17
|
+
ChainableUndefined,
|
|
18
|
+
ChoiceLoader,
|
|
19
|
+
Environment,
|
|
20
|
+
FileSystemBytecodeCache,
|
|
21
|
+
FileSystemLoader,
|
|
22
|
+
PrefixLoader,
|
|
23
|
+
StrictUndefined,
|
|
24
|
+
pass_context,
|
|
25
|
+
select_autoescape,
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
from fjkit.config import STATIC_DIR, TEMPLATE_DIR, FjkitConfig
|
|
29
|
+
from fjkit.icons import path as _icon_path
|
|
30
|
+
from fjkit.messages import TOAST_EVENT
|
|
31
|
+
from fjkit.messages import queue as _message_queue
|
|
32
|
+
from fjkit.plugins import collect_env
|
|
33
|
+
from fjkit.styles import resolve_style
|
|
34
|
+
|
|
35
|
+
__all__ = ["FJKIT_NAMESPACE", "Templates", "build_environment", "get_templates", "static_url"]
|
|
36
|
+
|
|
37
|
+
#: The reserved prefix under which the kit's own templates are always reachable,
|
|
38
|
+
#: whatever an app has shadowed. See `_ReservedNamespace`.
|
|
39
|
+
FJKIT_NAMESPACE = "fjkit"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class _ReservedNamespace(PrefixLoader):
|
|
43
|
+
"""`fjkit/ui/form.html` — the kit's own copy, even when `ui/form.html` is not.
|
|
44
|
+
|
|
45
|
+
An ejected override lives at `ui/form.html` and shadows the kit's file of
|
|
46
|
+
that name. To re-export the macros it did not take, it has to name the very
|
|
47
|
+
file it shadows — and by then `ui/form.html` means itself, an import loop.
|
|
48
|
+
This loader gives that file a second, unshadowable name.
|
|
49
|
+
|
|
50
|
+
It sits first in the chain on purpose: an app cannot take the prefix back by
|
|
51
|
+
creating `templates/fjkit/ui/form.html`, so an override can never be tricked
|
|
52
|
+
into re-exporting from something other than the package.
|
|
53
|
+
|
|
54
|
+
It lists nothing. The loader at the end of the chain already lists the same
|
|
55
|
+
files under their bare names, and a second entry for each would double every
|
|
56
|
+
"compile every template" sweep — including the cold-start benchmark that
|
|
57
|
+
guards §7 of the charter.
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
def list_templates(self) -> list[str]:
|
|
61
|
+
return []
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def build_environment(config: FjkitConfig | None = None) -> Environment:
|
|
65
|
+
"""Build the Environment holding the compile-time settings for every
|
|
66
|
+
template the app renders.
|
|
67
|
+
|
|
68
|
+
Also the one place plugins' `extend` hooks run, so their context processors
|
|
69
|
+
end up on the returned Environment as `fjkit_context_processors`. They ride
|
|
70
|
+
there because `Templates` is built from an Environment and nothing else;
|
|
71
|
+
collecting them by running the hooks again would call plugin code twice for
|
|
72
|
+
one app.
|
|
73
|
+
"""
|
|
74
|
+
config = config or FjkitConfig()
|
|
75
|
+
contributions = collect_env(config)
|
|
76
|
+
|
|
77
|
+
# The reserved `fjkit/…` namespace first — nothing may shadow it, because an
|
|
78
|
+
# ejected override reaches back through it for the macros it did not take.
|
|
79
|
+
# Then the app's templates, then any a plugin shipped, then the kit's. A file
|
|
80
|
+
# at the same path in the app wins: that is how `fjkit eject` works, and why
|
|
81
|
+
# shadowing is a supported feature rather than a fork. Plugins sit in the
|
|
82
|
+
# middle so one can replace a kit macro but never a file the app wrote.
|
|
83
|
+
searchpath: list[BaseLoader] = [
|
|
84
|
+
_ReservedNamespace({FJKIT_NAMESPACE: FileSystemLoader(TEMPLATE_DIR, encoding="utf-8")})
|
|
85
|
+
]
|
|
86
|
+
if config.template_dir is not None:
|
|
87
|
+
searchpath.append(FileSystemLoader(config.template_dir, encoding="utf-8"))
|
|
88
|
+
searchpath.extend(FileSystemLoader(d, encoding="utf-8") for d in contributions.template_dirs)
|
|
89
|
+
searchpath.append(FileSystemLoader(TEMPLATE_DIR, encoding="utf-8"))
|
|
90
|
+
|
|
91
|
+
bytecode_cache = None
|
|
92
|
+
if config.bytecode_cache_dir is not None:
|
|
93
|
+
config.bytecode_cache_dir.mkdir(parents=True, exist_ok=True)
|
|
94
|
+
bytecode_cache = FileSystemBytecodeCache(str(config.bytecode_cache_dir), "%s.j2c")
|
|
95
|
+
|
|
96
|
+
env = Environment(
|
|
97
|
+
loader=ChoiceLoader(searchpath),
|
|
98
|
+
# Only `.html`/`.jinja` are escaped; a template that renders JSON or CSV
|
|
99
|
+
# opts out by extension instead of by sprinkling `|safe`.
|
|
100
|
+
autoescape=select_autoescape(("html", "jinja")),
|
|
101
|
+
auto_reload=config.auto_reload,
|
|
102
|
+
bytecode_cache=bytecode_cache,
|
|
103
|
+
cache_size=config.cache_size,
|
|
104
|
+
# Drop the newline after a block tag and the indentation before it.
|
|
105
|
+
# Templates stay indented for humans; the bytes on the wire do not pay
|
|
106
|
+
# for it. Typically 10-20% off a nested page.
|
|
107
|
+
trim_blocks=True,
|
|
108
|
+
lstrip_blocks=True,
|
|
109
|
+
undefined=StrictUndefined if config.strict_undefined else ChainableUndefined,
|
|
110
|
+
# Async rendering exists for awaiting inside templates. fjkit hands
|
|
111
|
+
# templates finished data instead, so sync rendering avoids the
|
|
112
|
+
# coroutine wrapper on every block.
|
|
113
|
+
enable_async=False,
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
# Resolved once per Environment. Anything a template needs on every page
|
|
117
|
+
# belongs here rather than in every route's context dict.
|
|
118
|
+
env.globals["url_for"] = _url_for
|
|
119
|
+
env.globals["is_active"] = _is_active
|
|
120
|
+
env.globals["fjkit_static"] = static_url(config.static_url, auto_reload=config.auto_reload)
|
|
121
|
+
env.globals["fjkit_icon_path"] = _icon_path
|
|
122
|
+
env.globals["fjkit_version"] = _versions()
|
|
123
|
+
# A global rather than a context key: the shell reads it on every page, and
|
|
124
|
+
# a context key would have to be merged into every render — including the
|
|
125
|
+
# ones with nothing to say. It finds the request in the context itself, so
|
|
126
|
+
# the shell need not name it, and a render driven without one (the docs
|
|
127
|
+
# builder, the benchmark) has no messages rather than an undefined name.
|
|
128
|
+
env.globals["fjkit_messages"] = _messages_in_context
|
|
129
|
+
#: The event name the shell's listener binds. Exposed rather than written
|
|
130
|
+
#: twice, so `HX-Trigger` and the listener cannot drift apart.
|
|
131
|
+
env.globals["fjkit_toast_event"] = TOAST_EVENT
|
|
132
|
+
# The shell builds its stylesheet URL from this. Exposed as the pack name
|
|
133
|
+
# rather than a finished URL, so a custom shell can also report or switch on
|
|
134
|
+
# which pack is live.
|
|
135
|
+
env.globals["fjkit_style"] = resolve_style(config.style)
|
|
136
|
+
|
|
137
|
+
# Plugins before the app's own globals: an app can always override what a
|
|
138
|
+
# plugin exposed, and never the other way round.
|
|
139
|
+
env.globals.update(contributions.globals)
|
|
140
|
+
env.filters.update(contributions.filters)
|
|
141
|
+
env.globals.update(config.globals)
|
|
142
|
+
|
|
143
|
+
#: Read by `Templates.page()` and `.stream()`. A tuple, so the hot path
|
|
144
|
+
#: tests it with one truthiness check and skips the merge entirely when no
|
|
145
|
+
#: plugin asked for a per-request context — the common case.
|
|
146
|
+
env.fjkit_context_processors = tuple(contributions.processors) # type: ignore[attr-defined]
|
|
147
|
+
return env
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
@pass_context
|
|
151
|
+
def _messages_in_context(context: Any) -> Any:
|
|
152
|
+
"""Return the queue for the request this render is for, or an empty queue.
|
|
153
|
+
|
|
154
|
+
`context.get("request")` rather than a parameter: every render through
|
|
155
|
+
`Templates` passes `request`, but a bare `Environment.from_string(...)` in a
|
|
156
|
+
test or a build script does not, and under `strict_undefined` naming it in
|
|
157
|
+
the shell would raise on a page that has nothing to do with messages. A
|
|
158
|
+
missing request and an `Undefined` one mean the same thing here.
|
|
159
|
+
"""
|
|
160
|
+
request = context.get("request")
|
|
161
|
+
return _message_queue(request if isinstance(request, Request) else None)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def _url_for(request: Request, name: str, /, **path_params: Any) -> str:
|
|
165
|
+
"""Root-relative URL for a named route.
|
|
166
|
+
|
|
167
|
+
Starlette's `url_for` returns an absolute URL. Root-relative wins on three
|
|
168
|
+
counts: it survives proxies and hostname changes, it is correct in the htmx
|
|
169
|
+
partials swapped into an already-loaded page, and it is ~25 bytes shorter at
|
|
170
|
+
every call site, which on a table of links is real output.
|
|
171
|
+
"""
|
|
172
|
+
url = request.url_for(name, **path_params)
|
|
173
|
+
return url.path + (f"?{url.query}" if url.query else "")
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
def _is_active(request: Request, name: str) -> bool:
|
|
177
|
+
route = request.scope.get("route")
|
|
178
|
+
return getattr(route, "name", None) == name
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
def static_url(prefix: str, root: Path | None = None, *, auto_reload: bool = False):
|
|
182
|
+
"""Bind the configured prefix once, so a template only names the file.
|
|
183
|
+
|
|
184
|
+
Not `request.url_for`: `mount_fjkit()` mounts the kit's assets at a path the
|
|
185
|
+
config already knows, and going through the route table would make a missing
|
|
186
|
+
mount fail deep inside a template render instead of at startup.
|
|
187
|
+
|
|
188
|
+
**Every URL carries `?v=<mtime>`.** `StaticFiles` sends `ETag` and
|
|
189
|
+
`Last-Modified` but no `Cache-Control`, so a browser may apply heuristic
|
|
190
|
+
caching and keep a stylesheet it was never told the lifetime of. That
|
|
191
|
+
failure is the worst kind: the page renders, the markup is current, and the
|
|
192
|
+
rules for half of it are missing, so a layout degrades with nothing anywhere
|
|
193
|
+
to say why. It costs a day the first time and ten minutes every time after.
|
|
194
|
+
|
|
195
|
+
The mtime is the right key in both places this runs. While developing fjkit
|
|
196
|
+
the version never changes but `fjkit build-css` rewrites the file, so a
|
|
197
|
+
version stamp would pin the very asset being iterated on. In an installed
|
|
198
|
+
wheel the mtime is fixed at install time and moves on upgrade, exactly the
|
|
199
|
+
boundary a cache should break at.
|
|
200
|
+
|
|
201
|
+
Stat'd once per path and remembered, except under `auto_reload` — the trade
|
|
202
|
+
Jinja makes for templates, for the same reason: a `stat` per render is
|
|
203
|
+
unwanted in production and unavoidable in development.
|
|
204
|
+
|
|
205
|
+
`root` is where the files are. It is public so that a plugin mounting its
|
|
206
|
+
own assets gets the same stamping rather than a second answer to the caching
|
|
207
|
+
question above. Defaults to the kit's own static directory.
|
|
208
|
+
"""
|
|
209
|
+
base = prefix.rstrip("/")
|
|
210
|
+
directory = STATIC_DIR if root is None else root
|
|
211
|
+
stamps: dict[str, str] = {}
|
|
212
|
+
|
|
213
|
+
def fjkit_static(path: str) -> str:
|
|
214
|
+
clean = path.lstrip("/")
|
|
215
|
+
stamp = stamps.get(clean)
|
|
216
|
+
if stamp is None or auto_reload:
|
|
217
|
+
stamp = stamps[clean] = _stamp(clean, directory)
|
|
218
|
+
return f"{base}/{clean}?v={stamp}"
|
|
219
|
+
|
|
220
|
+
return fjkit_static
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
def _stamp(path: str, root: Path = STATIC_DIR) -> str:
|
|
224
|
+
"""Build a cache key for one asset: its mtime, or the kit's version when the
|
|
225
|
+
file is gone.
|
|
226
|
+
|
|
227
|
+
Reporting a missing file is not this function's job. `mount_fjkit` already
|
|
228
|
+
refuses to start without the stylesheet, and a template naming an absent
|
|
229
|
+
asset should 404 visibly rather than raise inside a render.
|
|
230
|
+
"""
|
|
231
|
+
try:
|
|
232
|
+
return str(int((root / path).stat().st_mtime))
|
|
233
|
+
except OSError:
|
|
234
|
+
return _versions()["fjkit"]
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def _versions() -> dict[str, str]:
|
|
238
|
+
from importlib.metadata import version
|
|
239
|
+
|
|
240
|
+
from fjkit.vendored import BASECOAT_VERSION, HTMX_VERSION
|
|
241
|
+
|
|
242
|
+
return {
|
|
243
|
+
"fjkit": version("fjkit"),
|
|
244
|
+
"jinja2": version("jinja2"),
|
|
245
|
+
"fastapi": version("fastapi"),
|
|
246
|
+
"basecoat": BASECOAT_VERSION,
|
|
247
|
+
"htmx": HTMX_VERSION,
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
class Templates:
|
|
252
|
+
"""Render helpers bound to one Environment.
|
|
253
|
+
|
|
254
|
+
Two ways out, on purpose:
|
|
255
|
+
|
|
256
|
+
* `page()` builds the whole string, then hands it to Starlette. Right for
|
|
257
|
+
anything that fits in memory, which is nearly everything. It also returns
|
|
258
|
+
a partial: an htmx endpoint is a `page()` call naming a `_*.html` file.
|
|
259
|
+
* `stream()` yields the page in chunks. Right when the output is large or
|
|
260
|
+
unbounded (exports, long report tables): peak memory becomes one buffer
|
|
261
|
+
instead of the whole document, and the browser starts painting the
|
|
262
|
+
`<head>` before the query at the bottom has finished.
|
|
263
|
+
"""
|
|
264
|
+
|
|
265
|
+
__slots__ = ("config", "env")
|
|
266
|
+
|
|
267
|
+
def __init__(self, env: Environment, config: FjkitConfig | None = None) -> None:
|
|
268
|
+
self.env = env
|
|
269
|
+
# Kept alongside the Environment, not only consumed by it: `@render`
|
|
270
|
+
# reaches through `app.state.templates` for `render_mode`, and a config
|
|
271
|
+
# that survived only as compiled-in Environment settings would leave it
|
|
272
|
+
# with nowhere to look.
|
|
273
|
+
self.config = config or FjkitConfig()
|
|
274
|
+
|
|
275
|
+
@classmethod
|
|
276
|
+
def create(cls, config: FjkitConfig | None = None) -> Templates:
|
|
277
|
+
"""Build the Environment and wrap it. Call once, per process.
|
|
278
|
+
|
|
279
|
+
`mount_fjkit()` already does this; call it directly only to render
|
|
280
|
+
outside an app — a build script, a benchmark.
|
|
281
|
+
|
|
282
|
+
Compiling a template is expensive; looking one up in the Environment's
|
|
283
|
+
LRU afterwards is a dict hit. Building an Environment per request pays
|
|
284
|
+
the former on every render.
|
|
285
|
+
"""
|
|
286
|
+
config = config or FjkitConfig()
|
|
287
|
+
return cls(build_environment(config), config)
|
|
288
|
+
|
|
289
|
+
def page(
|
|
290
|
+
self,
|
|
291
|
+
request: Request,
|
|
292
|
+
name: str,
|
|
293
|
+
context: Mapping[str, Any] | None = None,
|
|
294
|
+
*,
|
|
295
|
+
status_code: int = 200,
|
|
296
|
+
headers: Mapping[str, str] | None = None,
|
|
297
|
+
) -> HTMLResponse:
|
|
298
|
+
template = self.env.get_template(name)
|
|
299
|
+
html = template.render(request=request, **self._context(request, context))
|
|
300
|
+
return HTMLResponse(html, status_code=status_code, headers=dict(headers or {}))
|
|
301
|
+
|
|
302
|
+
def stream(
|
|
303
|
+
self,
|
|
304
|
+
request: Request,
|
|
305
|
+
name: str,
|
|
306
|
+
context: Mapping[str, Any] | None = None,
|
|
307
|
+
*,
|
|
308
|
+
buffer_size: int = 64,
|
|
309
|
+
status_code: int = 200,
|
|
310
|
+
headers: Mapping[str, str] | None = None,
|
|
311
|
+
) -> StreamingResponse:
|
|
312
|
+
template = self.env.get_template(name)
|
|
313
|
+
|
|
314
|
+
merged = self._context(request, context)
|
|
315
|
+
|
|
316
|
+
def chunks() -> Iterator[str]:
|
|
317
|
+
stream = template.stream(request=request, **merged)
|
|
318
|
+
# Unbuffered, Jinja yields one string per literal or expression,
|
|
319
|
+
# and every fragment costs an ASGI message plus an HTTP chunk frame.
|
|
320
|
+
# Buffering batches them. The win scales with the fragment count, so
|
|
321
|
+
# it is large on a page that yields thousands and small on one whose
|
|
322
|
+
# body is a `{% call %}` block. See `docs/jinja-performance.md`.
|
|
323
|
+
stream.enable_buffering(buffer_size)
|
|
324
|
+
yield from stream
|
|
325
|
+
|
|
326
|
+
return StreamingResponse(
|
|
327
|
+
chunks(),
|
|
328
|
+
status_code=status_code,
|
|
329
|
+
media_type="text/html",
|
|
330
|
+
headers=dict(headers or {}),
|
|
331
|
+
)
|
|
332
|
+
|
|
333
|
+
def _context(self, request: Request, context: Mapping[str, Any] | None) -> dict[str, Any]:
|
|
334
|
+
"""Merge the route's context over every plugin's per-request values.
|
|
335
|
+
|
|
336
|
+
The route wins: a handler that returns `user` overrides the plugin that
|
|
337
|
+
provides one, because the specific caller knows something the app-wide
|
|
338
|
+
rule does not.
|
|
339
|
+
"""
|
|
340
|
+
processors = getattr(self.env, "fjkit_context_processors", ())
|
|
341
|
+
if not processors:
|
|
342
|
+
# The common case, and the hot path: no copy, no merge, no loop.
|
|
343
|
+
return dict(context or {})
|
|
344
|
+
|
|
345
|
+
merged: dict[str, Any] = {}
|
|
346
|
+
for plugin, provides, processor in processors:
|
|
347
|
+
values = processor(request)
|
|
348
|
+
if self.config.strict_undefined:
|
|
349
|
+
# Same dev/prod switch as undefined names, for the same reason:
|
|
350
|
+
# a key a plugin never declared stays invisible until two
|
|
351
|
+
# plugins collide over it, and by then the page is wrong.
|
|
352
|
+
undeclared = set(values) - set(provides)
|
|
353
|
+
if undeclared:
|
|
354
|
+
raise RuntimeError(
|
|
355
|
+
f"fjkit plugin {plugin!r} returned context key(s) "
|
|
356
|
+
f"{sorted(undeclared)} it did not declare in `provides=`."
|
|
357
|
+
)
|
|
358
|
+
merged.update(values)
|
|
359
|
+
merged.update(context or {})
|
|
360
|
+
return merged
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
def get_templates(request: Request) -> Templates:
|
|
364
|
+
"""FastAPI dependency. The Environment is built once, by `mount_fjkit()`."""
|
|
365
|
+
return request.app.state.templates
|
fjkit/vendored.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""Pinned versions of the front-end assets shipped inside the package.
|
|
2
|
+
|
|
3
|
+
Single source of truth: the vendoring script reads these to know what to
|
|
4
|
+
download, and the shell's footer reads them to report what is loaded. The footer
|
|
5
|
+
therefore cannot drift from the bytes on disk.
|
|
6
|
+
|
|
7
|
+
These pins are also CHARTER §7's whitelist of client-side JavaScript: what is
|
|
8
|
+
listed here, and nothing else, may ship inside this wheel. Two of them reach
|
|
9
|
+
every page; `HTMX_JSON_ENC_VERSION` does not, which is why it is a separate pin.
|
|
10
|
+
|
|
11
|
+
Plotly is whitelisted by §7 too, but pinned in `fjkit_charts` rather than here:
|
|
12
|
+
the bundle ships in that distribution, and a kit that cannot serve the bytes
|
|
13
|
+
should not claim to know their version.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
from typing import Literal, get_args
|
|
19
|
+
|
|
20
|
+
BASECOAT_VERSION = "1.0.2"
|
|
21
|
+
HTMX_VERSION = "2.0.10"
|
|
22
|
+
|
|
23
|
+
#: htmx's `json-enc` extension, which makes a submit send JSON instead of
|
|
24
|
+
#: urlencoded fields. Its own npm package and therefore its own version: htmx 2
|
|
25
|
+
#: moved every extension out of the core repository, and this pin tracks the
|
|
26
|
+
#: extension rather than the core it plugs into.
|
|
27
|
+
#:
|
|
28
|
+
#: **No page loads it unless that page asks for it** — `form_scripts()` in
|
|
29
|
+
#: `ui/form.html`, the same page-level opt-in `chart_scripts()` uses for Plotly.
|
|
30
|
+
#: CHARTER §7 budgets what a page downloads by default, and that answer has to
|
|
31
|
+
#: stay "htmx and Basecoat", so 1,012 bytes that only some forms need cannot go
|
|
32
|
+
#: in the shell.
|
|
33
|
+
HTMX_JSON_ENC_VERSION = "2.0.3"
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
#: The Basecoat style packs vendored alongside each other under
|
|
37
|
+
#: `static/vendor/basecoat/styles/`. They share one token vocabulary and one
|
|
38
|
+
#: selector set — a pack changes geometry (radii, control heights, borders,
|
|
39
|
+
#: shadows), never the names a template writes. That is why fjkit can ship all
|
|
40
|
+
#: eight and why swapping one touches no template.
|
|
41
|
+
StylePack = Literal["vega", "nova", "maia", "lyra", "mira", "luma", "sera", "rhea"]
|
|
42
|
+
|
|
43
|
+
#: Upstream's own default, and therefore ours: `basecoat.css` aliases it.
|
|
44
|
+
DEFAULT_STYLE: StylePack = "vega"
|
|
45
|
+
|
|
46
|
+
STYLE_PACKS: tuple[StylePack, ...] = get_args(StylePack)
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: fjkit
|
|
3
|
+
Version: 0.1.0.dev0
|
|
4
|
+
Summary: Server-rendered UI kit for FastAPI — Jinja2 + Basecoat + htmx, no front-end build
|
|
5
|
+
Project-URL: Homepage, https://liweicheng00.github.io/fjkit/
|
|
6
|
+
Project-URL: Documentation, https://liweicheng00.github.io/fjkit/
|
|
7
|
+
Project-URL: Repository, https://github.com/liweicheng00/fjkit
|
|
8
|
+
Project-URL: Issues, https://github.com/liweicheng00/fjkit/issues
|
|
9
|
+
Author: liweicheng00
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: basecoat,dark-mode,fastapi,forms,html,htmx,jinja2,no-build,server-rendered,server-side-rendering,tables,templates,ui,ui-components
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Web Environment
|
|
15
|
+
Classifier: Framework :: FastAPI
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
20
|
+
Classifier: Topic :: Software Development :: User Interfaces
|
|
21
|
+
Classifier: Topic :: Text Processing :: Markup :: HTML
|
|
22
|
+
Classifier: Typing :: Typed
|
|
23
|
+
Requires-Python: >=3.13
|
|
24
|
+
Requires-Dist: fastapi>=0.115
|
|
25
|
+
Requires-Dist: jinja2>=3.1.6
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# fjkit
|
|
29
|
+
|
|
30
|
+
fjkit is the UI layer FastAPI does not ship: pages, tables, forms, navigation,
|
|
31
|
+
dark mode and htmx swaps, composed as Jinja macros in the same codebase as your
|
|
32
|
+
handlers.
|
|
33
|
+
|
|
34
|
+
**Your app has no front-end build step.** The stylesheet is compiled when fjkit
|
|
35
|
+
is released, not when your app runs, so your repo has no `package.json`, no
|
|
36
|
+
`node_modules` and no Tailwind binary. Every other rule in fjkit protects that
|
|
37
|
+
one.
|
|
38
|
+
|
|
39
|
+
## Install
|
|
40
|
+
|
|
41
|
+
Requires Python 3.13+. The runtime dependencies are `fastapi`, `jinja2` and
|
|
42
|
+
`pydantic`, and `fastapi` already requires `pydantic`.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
uv add fjkit
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## A working page
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from pathlib import Path
|
|
52
|
+
|
|
53
|
+
from fastapi import FastAPI
|
|
54
|
+
from fjkit import FjkitConfig, mount_fjkit
|
|
55
|
+
|
|
56
|
+
config = FjkitConfig(template_dir=Path(__file__).parent / "templates")
|
|
57
|
+
|
|
58
|
+
app = FastAPI()
|
|
59
|
+
mount_fjkit(app, config)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```jinja
|
|
63
|
+
{% extends "ui/shell.html" %}
|
|
64
|
+
{% from "ui/layout.html" import page_header, grid %}
|
|
65
|
+
{% from "ui/data.html" import stat %}
|
|
66
|
+
|
|
67
|
+
{% block content %}
|
|
68
|
+
{{ page_header("Overview", "How the board is doing") }}
|
|
69
|
+
{% call grid(cols=4) %}
|
|
70
|
+
{{ stat("Total", 42, icon_name="list") }}
|
|
71
|
+
{% endcall %}
|
|
72
|
+
{% endblock %}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Rebranding
|
|
76
|
+
|
|
77
|
+
One knob, plain CSS, no build:
|
|
78
|
+
|
|
79
|
+
```css
|
|
80
|
+
/* your own stylesheet, loaded after fjkit's */
|
|
81
|
+
:root { --primary: oklch(0.55 0.2 145); --primary-foreground: oklch(0.99 0 0); }
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## One handler, two wire formats
|
|
85
|
+
|
|
86
|
+
A handler returns a model, not markup. `@render` picks the format from whether
|
|
87
|
+
the caller has markup waiting, so a fragment route is the app's JSON API
|
|
88
|
+
without a second route:
|
|
89
|
+
|
|
90
|
+
```console
|
|
91
|
+
$ curl -s localhost:8000/tasks/board
|
|
92
|
+
{"tasks": [...], "stats": {"total": 8, "done_pct": 25}}
|
|
93
|
+
|
|
94
|
+
$ curl -s -H 'HX-Request: true' localhost:8000/tasks/board
|
|
95
|
+
<div id="board">...</div>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The return annotation describes both, so FastAPI has already put the JSON in
|
|
99
|
+
`/docs`. `mode="html"` or `mode="json"` on the decorator forces one.
|
|
100
|
+
|
|
101
|
+
## Checking your templates
|
|
102
|
+
|
|
103
|
+
fjkit's class vocabulary is closed — apps compose macros rather than writing
|
|
104
|
+
utility classes. That is what makes the no-build promise hold, and it is
|
|
105
|
+
enforceable:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
uv run fjkit check app/templates
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Documentation
|
|
112
|
+
|
|
113
|
+
**[Docs](https://liweicheng00.github.io/fjkit/)**
|
|
114
|
+
|
|
115
|
+
Status: pre-release, under active development.
|
|
116
|
+
|
|
117
|
+
## License
|
|
118
|
+
|
|
119
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
fjkit/__init__.py,sha256=HgbDahezuIVehxxImgsD2vWj6itVckPt4kGkKRVB5qo,1401
|
|
2
|
+
fjkit/config.py,sha256=0y7U001s6KE7CN6aTB2Cc-_wG4_d_8mfuzs2Auc9Yts,6213
|
|
3
|
+
fjkit/errors.py,sha256=TADbCAVtOM3kdBfT2EJDhqTY4PqxqRJI7zE1D27AS24,6818
|
|
4
|
+
fjkit/flash.py,sha256=edAkOppvP2wZSHoFK4ctZcY3wZacNUArQqAFhw9VCD8,7344
|
|
5
|
+
fjkit/forms.py,sha256=8CfPeST1QKnUfUHitt8kae2qSo6MpNK3lDv0oBIseiM,5112
|
|
6
|
+
fjkit/htmx.py,sha256=63bG23S5bfSXN7XTgSlEW4Kbykm2_qVB46l7AQf_7rA,2402
|
|
7
|
+
fjkit/icons.py,sha256=dku7LKqdRth--KEj2O-E5Kfx1mCoN0CPQQ1B3CEdR3g,1921
|
|
8
|
+
fjkit/messages.py,sha256=PDwQeasz-n8THzqKFY9Kjyju0aj2o138byU15FNBdkE,8671
|
|
9
|
+
fjkit/mounting.py,sha256=TcoKdPhtwcMkaJ48-iNCaGBQcSrRavvJw8gglqeqjec,2999
|
|
10
|
+
fjkit/plugins.py,sha256=85dAeVCOWzVkPZqD059xzIgOsYHNAWdsGcEK-0vHMRg,8680
|
|
11
|
+
fjkit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
+
fjkit/rendering.py,sha256=PBfoOCA4mEzHY5Yhw8PCK8pppNfb0ie2BePDAtrqUgk,24798
|
|
13
|
+
fjkit/signing.py,sha256=9reRJPf5Fl7JzNVZYgLRKqvQCj6eO6bZiXTLxULMEao,2251
|
|
14
|
+
fjkit/styles.py,sha256=CHfKhg74sQQux7IcdMB6-vF1vddDDvpNwI6E-RQyu7Y,1038
|
|
15
|
+
fjkit/templating.py,sha256=gY9oPBB-d4-6j1WodCwQTYH10MvUxoP0-MlBUJDuve8,15795
|
|
16
|
+
fjkit/vendored.py,sha256=KQLZdzB-YaOr7PJxh3trLYA8lXVkFNqJQiCqQJmxVPo,2093
|
|
17
|
+
fjkit/auth/__init__.py,sha256=GXE7uDyD60mVlTBNrbNqRH8On5MvFvlLyR1nvsu1NNg,1555
|
|
18
|
+
fjkit/auth/csrf.py,sha256=VOWkTaRgHt_lsIX94iufnzQCWg2VMJOKutkaN7I7ju4,3454
|
|
19
|
+
fjkit/auth/errors.py,sha256=ZAuNCqDvyLgvs0y8f8TzDy39n_pHb7sytDJ2T_Idyq8,1004
|
|
20
|
+
fjkit/auth/plugin.py,sha256=QvGQVMOOanGZTp4vcAqfrgotBT9kPQV6LOiIIKmoyEw,21865
|
|
21
|
+
fjkit/auth/sources.py,sha256=fVijDFxgLbVmAWbzwuq1SlWySReZ7DrB7FuQYzmcbiA,722
|
|
22
|
+
fjkit/auth/stores.py,sha256=AIgGzammD_VdZcbiDaKTO3QU8jMknHYTmjfRG5mwkY8,4960
|
|
23
|
+
fjkit/auth/types.py,sha256=MWOd2eOr69ZcDxhbrKmavDJWn_JCsG28cjwimQ0o17I,4909
|
|
24
|
+
fjkit/cli/__init__.py,sha256=WhRfhzyS78cgb1kWXVTp6FcQhQBY2xtz_Yd9yVh-nQM,2263
|
|
25
|
+
fjkit/cli/build_css.py,sha256=fLhKDXDgJqDMCX2_1Zq2KS8v3y93hdxg7H41lQ-q8aQ,5164
|
|
26
|
+
fjkit/cli/check.py,sha256=LOgjOth9PR-yny8eCENQcc7YyO_NkDsccEE8ewciRmQ,8518
|
|
27
|
+
fjkit/cli/eject.py,sha256=sXvtVK7SBDtmPCh4CSoFT3GDgJ2pK72pvuUwaSzkjU8,22317
|
|
28
|
+
fjkit/cli/ejected.py,sha256=Il2BgG-ATLlHhJDtd_4EgUw7New9Ftpr7XIzqQ8Fi_k,7858
|
|
29
|
+
fjkit/cli/vocabulary.py,sha256=ecnCqeLukA-n-vze9OWUc1JDEzJ3jxAn0ZUQohwxp40,3242
|
|
30
|
+
fjkit/static/brand/torii-bolt.png,sha256=vTcwx2Yd4Nb0xDQYlPW7auLTpuT6-VikOUz7zy7XAo4,30667
|
|
31
|
+
fjkit/static/dist/fjkit-luma.css,sha256=L0etNpo1koFOXG00COlw_HmUUqIeAkbYAhYvTeRdVlw,240948
|
|
32
|
+
fjkit/static/dist/fjkit-lyra.css,sha256=3iGERmRw8S-l9nk2SYTeFOkMJi9q8dQSvW682LK961A,238458
|
|
33
|
+
fjkit/static/dist/fjkit-maia.css,sha256=ziZ9gmLewAzqnSWkvLwVDX_o2NlrpzE9VkjtyZho-Ho,237322
|
|
34
|
+
fjkit/static/dist/fjkit-mira.css,sha256=Lhfpm5eabwc8Sp0v1WrY3BsfTeemNzQwax8emRE7agg,238979
|
|
35
|
+
fjkit/static/dist/fjkit-nova.css,sha256=yn9SAmpFbYfm6c9tLq5Qc2vl0n3Xt7eHXWpPEstXo_s,242874
|
|
36
|
+
fjkit/static/dist/fjkit-rhea.css,sha256=o0XWJzr-FlmF6zIefhpqEkGNzlvZHYEfGdmAZESgu8M,241228
|
|
37
|
+
fjkit/static/dist/fjkit-sera.css,sha256=tshTuoJJOAb3n5fOOT40gKSZhgnVDO2ALHB_waSSNA8,224408
|
|
38
|
+
fjkit/static/dist/fjkit-vega.css,sha256=ZBMe-N8LhZQ24iQXBrlGSyhCDIGxb5sTPxuHVhrbTOg,238206
|
|
39
|
+
fjkit/static/icons/lucide.json,sha256=cuvuHvAA0YTMN1R_1fvRTO5P9BVtd1e4ZE3GbnpKaLc,366366
|
|
40
|
+
fjkit/static/js/errors.js,sha256=tUyxikOMMytsb541QXKBdMAwWYCFpHtGQsu5cLK9qFk,4223
|
|
41
|
+
fjkit/static/js/multiselect.js,sha256=Rq_qchmpGp1U1TM52Nk7lqEwYzpAY0iHZfsPMBgxMKg,5459
|
|
42
|
+
fjkit/static/js/reveal.js,sha256=S-65CK3PICiAhgxRC_qpLyzf4mZZdBB2vQsGzq1LkVA,2506
|
|
43
|
+
fjkit/static/js/select.js,sha256=KkoDoyWip4wHB7eVrVYWwy8aE53Rq3w0tGtbttjnNPo,5170
|
|
44
|
+
fjkit/static/src/fjkit.css,sha256=zD4Wy3f3MYWn3gb94CQwu5R_01jxFqqNl407KEmeOB8,17489
|
|
45
|
+
fjkit/static/vendor/basecoat/basecoat-base.css,sha256=8js5K_8qTNrn7YyhqcWbhP8ah-6cmSVYXSN6BIf8vOI,64
|
|
46
|
+
fjkit/static/vendor/basecoat/basecoat-components.css,sha256=1tCl1eY5qKw8qNq9yuPh8PZHWFoy4rp5uCOaKp8gL9E,1381
|
|
47
|
+
fjkit/static/vendor/basecoat/basecoat-luma.css,sha256=EUZk8qr26oJVmxDLYqiKTWy3zlRxgWjOzdM85htbBn8,60
|
|
48
|
+
fjkit/static/vendor/basecoat/basecoat-lyra.css,sha256=j_EFJNcZ2ZL-Z6N0Y7KF2UXXr0jSkz3zq7LgF9snxG0,60
|
|
49
|
+
fjkit/static/vendor/basecoat/basecoat-maia.css,sha256=GhR6sBuQgpRnQTb6jvRCBezlzwIRNLiycLgyirZjd_o,60
|
|
50
|
+
fjkit/static/vendor/basecoat/basecoat-mira.css,sha256=YXyuAANxpWKqCdEB1dEppbM-Y4Xt6dl2pjhJ11d376w,60
|
|
51
|
+
fjkit/static/vendor/basecoat/basecoat-nova.css,sha256=PeZq7WEQ-q1aTTTO60kRBbH-ZwWmP5P98hv1eFRaK4Q,60
|
|
52
|
+
fjkit/static/vendor/basecoat/basecoat-rhea.css,sha256=yQf3MIcuJyOsvd9rCaZvXH8hpH6_YB3lq6fCplWzjRI,60
|
|
53
|
+
fjkit/static/vendor/basecoat/basecoat-sera.css,sha256=CFJmKkjuKfSjiWX2eiv7N-O0zqTAnQ_KeYgdNOIGReE,60
|
|
54
|
+
fjkit/static/vendor/basecoat/basecoat-vega.css,sha256=g_OriatpuCWrK4cO8qwfAYQielyjiu5fEBI0KvYKu88,60
|
|
55
|
+
fjkit/static/vendor/basecoat/basecoat.all.css,sha256=bKTrmfmcIamUZn1xQBdUCeq47epq41_WCXSkE_AFbGI,26
|
|
56
|
+
fjkit/static/vendor/basecoat/basecoat.css,sha256=0HqaGtgvK9pwI7VJH2Up2YZRL5QHs7PIhXm2q-t8qPw,31
|
|
57
|
+
fjkit/static/vendor/basecoat/base/base.css,sha256=-T2NUI_RvXL-UrvRM5A0BlCIp9Zkq_JSqLMwjM3xB2o,6581
|
|
58
|
+
fjkit/static/vendor/basecoat/components/accordion.css,sha256=IctXQGNZ7URp_Mzf3SUzwLGrc6K81C-OAcBR4pk6OuY,717
|
|
59
|
+
fjkit/static/vendor/basecoat/components/alert.css,sha256=q1GR86amq62BZ-BeEHyZT39qK4GAk5Xp0Vw-gGkgrr4,553
|
|
60
|
+
fjkit/static/vendor/basecoat/components/avatar.css,sha256=JH6lL2GkiBl0oOU7PIc1Bt95RW4jSXYM1usuuitX1es,1323
|
|
61
|
+
fjkit/static/vendor/basecoat/components/badge.css,sha256=Hk92NIC0FGLQp_ulx0cDLsEIJWvEmA4woc_-D0_vKmk,359
|
|
62
|
+
fjkit/static/vendor/basecoat/components/breadcrumb.css,sha256=pVDo4lCUPNs_yKL_t2bVRcxFMTRoZ2D6by-P9fh-J8w,604
|
|
63
|
+
fjkit/static/vendor/basecoat/components/button-group.css,sha256=6s_5LAlMJFpswXFA5gU6x2Rf299thX67tMISP2anF88,1436
|
|
64
|
+
fjkit/static/vendor/basecoat/components/button.css,sha256=zn10lekeqxaCKeT8NyXFUQ64CReRuHfMvX_YhA2sX18,261
|
|
65
|
+
fjkit/static/vendor/basecoat/components/card.css,sha256=Vdu56Qs_76vgWnZUmVT923AjMXSD-DwsLPoFmhhcFmM,623
|
|
66
|
+
fjkit/static/vendor/basecoat/components/chart.css,sha256=-lJkITg8QJtD0Y-ZWljOy7sxqt3FDKKXjJmmrJ_OaoA,1206
|
|
67
|
+
fjkit/static/vendor/basecoat/components/checkbox.css,sha256=l-QmJpfpdVcGJ94TyrlYdzoN42atFBXsuT1sgrnVyjQ,423
|
|
68
|
+
fjkit/static/vendor/basecoat/components/collapsible.css,sha256=rs9_OEucGnWo6sx02HW5rJ7ICoIeH7bJh88_wFiJrtQ,445
|
|
69
|
+
fjkit/static/vendor/basecoat/components/combobox.css,sha256=XotQkdEt1j75WolyJWPLaHE3Bd86pBpX-cY-eJ99Qh4,3266
|
|
70
|
+
fjkit/static/vendor/basecoat/components/command.css,sha256=Ka5YUjk5eb_2CJbSDQIsv51HFxkc57TX3BhlATSEvkM,3765
|
|
71
|
+
fjkit/static/vendor/basecoat/components/dialog.css,sha256=Sy5FzoKxArJ7QOhzSrszBh75Ay2709JB_Wjj2VGilyQ,2633
|
|
72
|
+
fjkit/static/vendor/basecoat/components/drawer.css,sha256=Ult8kx3WLu14nekovoRDzuNx3BpODxg2ERDVhSGfqTA,2245
|
|
73
|
+
fjkit/static/vendor/basecoat/components/dropdown-menu.css,sha256=B917iLOGwEZ2cqmK9df-cg8EgJCi5_a2Q2Rk4pecFMY,1547
|
|
74
|
+
fjkit/static/vendor/basecoat/components/empty.css,sha256=xe-LlyHNH6vX8pamjSFmf8lDTlUdWLJMebbm0cpYO-I,666
|
|
75
|
+
fjkit/static/vendor/basecoat/components/field.css,sha256=ybzJyy-S_W8gZzO26ABwCMk2wK6HrZK2Qb89F-aauKg,2101
|
|
76
|
+
fjkit/static/vendor/basecoat/components/form.css,sha256=3jxYYZ9A6itw7bTRFu6cGZTMrMYV9yETJISn4ww0Ppc,223
|
|
77
|
+
fjkit/static/vendor/basecoat/components/input-group.css,sha256=b72ZVW8CwEZH5ey1wA1Oi_gVmNWKbUTowq0WR6pAHBE,2330
|
|
78
|
+
fjkit/static/vendor/basecoat/components/input.css,sha256=Xq0XuRBhlnqGceWPcDENn-Ghy3P1MTqpKF7hnUXghzU,1146
|
|
79
|
+
fjkit/static/vendor/basecoat/components/item.css,sha256=dW9CmHOZPGJJwarJkDgQiPtQDbrfLCDf2rOUX07rnxg,1095
|
|
80
|
+
fjkit/static/vendor/basecoat/components/kbd.css,sha256=l_TaF0HGHKGCB5BYENUPHty5p8kwtbvwQ0JpNjoNMe0,129
|
|
81
|
+
fjkit/static/vendor/basecoat/components/label.css,sha256=dYjdXR2lPc2MikwVng6jPJSCI-ywItSEDWeZs8qxNzI,261
|
|
82
|
+
fjkit/static/vendor/basecoat/components/native-select.css,sha256=MTqjoVKRns-0v7QlvN7ABnDfuRe5LIiRokKo-hzTd0Q,270
|
|
83
|
+
fjkit/static/vendor/basecoat/components/popover.css,sha256=vumHUhtVBl9TkUCGO-aZ3EqdrTtEUJ8B049jV6Q9olw,2019
|
|
84
|
+
fjkit/static/vendor/basecoat/components/progress.css,sha256=LSUUKrEpMilXBS1QfevKBMzS15aVHJv2BAUJoIOXpYo,225
|
|
85
|
+
fjkit/static/vendor/basecoat/components/radio.css,sha256=v-6uPC7-F60JuMVywOF7QuqcWCRm5yJwCPdFxMK63ZY,339
|
|
86
|
+
fjkit/static/vendor/basecoat/components/range.css,sha256=VuTO3xDWSWhWwGjKOqHVbLzGXn7P0dQIGIDJV18Q-K8,1344
|
|
87
|
+
fjkit/static/vendor/basecoat/components/scrollbar.css,sha256=cuaa1xy0WvZX7BYLvgQEyve_8dpCIEuZ-aif-0sGU9g,1220
|
|
88
|
+
fjkit/static/vendor/basecoat/components/select.css,sha256=juu6-TXScZlg7vR5frBZe2jt6KFKV27_JS1e13ccU8E,2197
|
|
89
|
+
fjkit/static/vendor/basecoat/components/sidebar.css,sha256=uqhJhnB4rRMsKBktDdLqU0nN1LjGsehfGRVMhrIDIWM,2692
|
|
90
|
+
fjkit/static/vendor/basecoat/components/skeleton.css,sha256=T6M5YdkVzglziDHjdFiBW7SxEwRQJArjNqCmBGmbxKI,81
|
|
91
|
+
fjkit/static/vendor/basecoat/components/switch.css,sha256=xYGVCUETPXdByUI9sStkEvhy2mOK-RdqdFgm2QZnQLc,384
|
|
92
|
+
fjkit/static/vendor/basecoat/components/table.css,sha256=7xj6Mp9ZKH_juvoenAtFnDyTXEdzoQwMkF4-q_NFx4A,698
|
|
93
|
+
fjkit/static/vendor/basecoat/components/tabs.css,sha256=JIqVhz9NjQtArNh4ymuiJjiXElxQru-cXlE8w0PUwso,877
|
|
94
|
+
fjkit/static/vendor/basecoat/components/textarea.css,sha256=rZSs7qySYCRlrffpVIf2YbEjl3zL7MgS4wL6MgKBwTo,225
|
|
95
|
+
fjkit/static/vendor/basecoat/components/toast.css,sha256=W8n9-glgdqQxdpwGEeB9z5DtnISzaCzTyE-Rn4Weyp8,1344
|
|
96
|
+
fjkit/static/vendor/basecoat/components/tooltip.css,sha256=aj4EKi5EtJl_s1Xkk96BXhmaDJdT6ImnBpfO9VbtkXg,2284
|
|
97
|
+
fjkit/static/vendor/basecoat/js/all.min.js,sha256=vbNk1D4PPnuN_Ponu76LqsliSeV7eefw0kG_cLBW6pg,43909
|
|
98
|
+
fjkit/static/vendor/basecoat/styles/luma.css,sha256=qF3QAGFH4xk7W3QCSjFyk-F0JXjuGNO78-hTdE_FfhQ,42953
|
|
99
|
+
fjkit/static/vendor/basecoat/styles/lyra.css,sha256=n1fc5K-rw9GetGf9_F3O_Q7oqjmfP8SM0HDwjaYwk2A,42460
|
|
100
|
+
fjkit/static/vendor/basecoat/styles/maia.css,sha256=3cYa1hfnPkO9rfFlAWfIlrBcYfd5NQLk8waDLJXorcI,42005
|
|
101
|
+
fjkit/static/vendor/basecoat/styles/mira.css,sha256=IIlf3i1f41CeJ9chu_1sCg60a_AXKVEfN1QL5jFnHTU,42865
|
|
102
|
+
fjkit/static/vendor/basecoat/styles/nova.css,sha256=xiAvH95Ph2uVRF8adTtRs4jCYt1XEjYbnO---v6hohM,42901
|
|
103
|
+
fjkit/static/vendor/basecoat/styles/rhea.css,sha256=mGmtXdaHMfv6FsTMOmgA-vx7kTtksYrj7-iMNF3BgW4,43007
|
|
104
|
+
fjkit/static/vendor/basecoat/styles/sera.css,sha256=UKN0Bal5lgIMM9EylZDL7Zj9INeOy6_JiQuWHoqVW1Q,42773
|
|
105
|
+
fjkit/static/vendor/basecoat/styles/vega.css,sha256=UB1eblz-5fOlvtdttBcJ4yv5QxLyg4pJ6R8vSBJvwH4,42671
|
|
106
|
+
fjkit/static/vendor/htmx/htmx.min.js,sha256=cepnGFv6jJjDnTFxfG_OXYUjcPzf0SnbRUN3TTFFwN4,51238
|
|
107
|
+
fjkit/static/vendor/htmx/json-enc.js,sha256=n-FPqu23kscMGH4hmy2Ocv7ZKJE3UgXa2d_v4Y2azOo,1012
|
|
108
|
+
fjkit/templates/errors/page.html,sha256=31S3l5S7eStvZT7aqdzKdCCGcAwht6hcKS1CB64HX04,3949
|
|
109
|
+
fjkit/templates/ui/attrs.html,sha256=yOkXiR3nTmM2dzgUgqZ3Ly7cz2pXOMHpJ7-tDjEv0ZI,762
|
|
110
|
+
fjkit/templates/ui/button.html,sha256=LKlpBDAWseUILYRbPTF-D6bmFDvujt3WyzLGv1rB42E,2707
|
|
111
|
+
fjkit/templates/ui/data.html,sha256=J2Wt0yJlxwkRJX9ECB2RjzZRVQw62wWFTHW9ddfLWe0,15115
|
|
112
|
+
fjkit/templates/ui/disclosure.html,sha256=aHCg4jKYOvF7Y4r-a2uLqSd8TxD4hxq_QP_1feZDX-8,3852
|
|
113
|
+
fjkit/templates/ui/feedback.html,sha256=ZhnJQaEdQnAgJMMPqe4t0sqM6xuAawNy0z-o6v_jWg8,13747
|
|
114
|
+
fjkit/templates/ui/form.html,sha256=sakNfknfY8Kqn7TD6DNw45AwtPZkyw6nu6AA4sNXUgI,28890
|
|
115
|
+
fjkit/templates/ui/icon.html,sha256=52NeNKpozyD2styyl0b_DdPnG7VGo3OeXS8BOanT0vY,697
|
|
116
|
+
fjkit/templates/ui/layout.html,sha256=0L5HtERm7TKmn2q2Gw26LXRi1hTsyjhEJNDtaANz4HM,7096
|
|
117
|
+
fjkit/templates/ui/nav.html,sha256=kTp-hH8292wQudgn8yln01RgDA1AeAK6KnXXsqzc3YQ,4604
|
|
118
|
+
fjkit/templates/ui/overlay.html,sha256=CJKudl4l_SGiHl0lCno9VphoPlQSVTh2HRsemD-XlFM,31095
|
|
119
|
+
fjkit/templates/ui/shell.html,sha256=wKT9DXQJlhgX-EW4xAn-moLywUPupBJbpD28GlTzaKo,7691
|
|
120
|
+
fjkit/templates/ui/sidebar.html,sha256=QxPFBA7pyLAHolv9JJvfTLybKlCgBCTamepp00RB4pw,7717
|
|
121
|
+
fjkit/templates/ui/table.html,sha256=qfwyxt6Z9r9dvhBHTLjbDaGAhrcr8OvCAX0HoMqXzFU,19558
|
|
122
|
+
fjkit/templates/ui/tabs.html,sha256=9jXFgVHkvjfe6vLdKE7-Y6Pmqfm6zkavg_dDzmk-zuE,6899
|
|
123
|
+
fjkit-0.1.0.dev0.dist-info/METADATA,sha256=ztitWLPmcVxphpQS9gbQivmn_bklUeaNznbF1iQ9b4g,3527
|
|
124
|
+
fjkit-0.1.0.dev0.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
125
|
+
fjkit-0.1.0.dev0.dist-info/entry_points.txt,sha256=ubNlnPVYyVRjdIblPDKOxjq4FrKTEMyuCz8QFW8tpMg,41
|
|
126
|
+
fjkit-0.1.0.dev0.dist-info/licenses/LICENSE,sha256=v9Zxk93rK8VFzWgDplbJjq_kF_d1BBZTmB6L8hWJpnU,1069
|
|
127
|
+
fjkit-0.1.0.dev0.dist-info/RECORD,,
|