"""Documentation content for the sx docs site. All page content as Python data structures, consumed by sx_components.py to build s-expression page trees. """ from __future__ import annotations # --------------------------------------------------------------------------- # Navigation # --------------------------------------------------------------------------- DOCS_NAV = [ ("Introduction", "/docs/introduction"), ("Getting Started", "/docs/getting-started"), ("Components", "/docs/components"), ("Evaluator", "/docs/evaluator"), ("Primitives", "/docs/primitives"), ("CSS", "/docs/css"), ("Server Rendering", "/docs/server-rendering"), ] REFERENCE_NAV = [ ("Attributes", "/reference/"), ("Headers", "/reference/headers"), ("Events", "/reference/events"), ("JS API", "/reference/js-api"), ] PROTOCOLS_NAV = [ ("Wire Format", "/protocols/wire-format"), ("Fragments", "/protocols/fragments"), ("Resolver I/O", "/protocols/resolver-io"), ("Internal Services", "/protocols/internal-services"), ("ActivityPub", "/protocols/activitypub"), ("Future", "/protocols/future"), ] EXAMPLES_NAV = [ ("Click to Load", "/examples/click-to-load"), ("Form Submission", "/examples/form-submission"), ("Polling", "/examples/polling"), ("Delete Row", "/examples/delete-row"), ("Inline Edit", "/examples/inline-edit"), ("OOB Swaps", "/examples/oob-swaps"), ] ESSAYS_NAV = [ ("sx sucks", "/essays/sx-sucks"), ("Why S-Expressions", "/essays/why-sexps"), ("The htmx/React Hybrid", "/essays/htmx-react-hybrid"), ("On-Demand CSS", "/essays/on-demand-css"), ] MAIN_NAV = [ ("Docs", "/docs/introduction"), ("Reference", "/reference/"), ("Protocols", "/protocols/wire-format"), ("Examples", "/examples/click-to-load"), ("Essays", "/essays/sx-sucks"), ] # --------------------------------------------------------------------------- # Reference: Attributes # --------------------------------------------------------------------------- REQUEST_ATTRS = [ ("sx-get", "Issue a GET request to the given URL", True), ("sx-post", "Issue a POST request to the given URL", True), ("sx-put", "Issue a PUT request to the given URL", True), ("sx-delete", "Issue a DELETE request to the given URL", True), ("sx-patch", "Issue a PATCH request to the given URL", True), ] BEHAVIOR_ATTRS = [ ("sx-trigger", "Specifies the event that triggers the request. Modifiers: once, changed, delay: