"""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", "/hypermedia/reference/attributes"), ("Headers", "/hypermedia/reference/headers"), ("Events", "/hypermedia/reference/events"), ("JS API", "/hypermedia/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", "/hypermedia/examples/click-to-load"), ("Form Submission", "/hypermedia/examples/form-submission"), ("Polling", "/hypermedia/examples/polling"), ("Delete Row", "/hypermedia/examples/delete-row"), ("Inline Edit", "/hypermedia/examples/inline-edit"), ("OOB Swaps", "/hypermedia/examples/oob-swaps"), ("Lazy Loading", "/hypermedia/examples/lazy-loading"), ("Infinite Scroll", "/hypermedia/examples/infinite-scroll"), ("Progress Bar", "/hypermedia/examples/progress-bar"), ("Active Search", "/hypermedia/examples/active-search"), ("Inline Validation", "/hypermedia/examples/inline-validation"), ("Value Select", "/hypermedia/examples/value-select"), ("Reset on Submit", "/hypermedia/examples/reset-on-submit"), ("Edit Row", "/hypermedia/examples/edit-row"), ("Bulk Update", "/hypermedia/examples/bulk-update"), ("Swap Positions", "/hypermedia/examples/swap-positions"), ("Select Filter", "/hypermedia/examples/select-filter"), ("Tabs", "/hypermedia/examples/tabs"), ("Animations", "/hypermedia/examples/animations"), ("Dialogs", "/hypermedia/examples/dialogs"), ("Keyboard Shortcuts", "/hypermedia/examples/keyboard-shortcuts"), ("PUT / PATCH", "/hypermedia/examples/put-patch"), ("JSON Encoding", "/hypermedia/examples/json-encoding"), ("Vals & Headers", "/hypermedia/examples/vals-and-headers"), ("Loading States", "/hypermedia/examples/loading-states"), ("Request Abort", "/hypermedia/examples/sync-replace"), ("Retry", "/hypermedia/examples/retry"), ] 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"), ("Client Reactivity", "/essays/client-reactivity"), ("SX Native", "/essays/sx-native"), ("The SX Manifesto", "/philosophy/sx-manifesto"), ("Tail-Call Optimization", "/essays/tail-call-optimization"), ("Continuations", "/essays/continuations"), ] MAIN_NAV = [ ("Docs", "/docs/introduction"), ("Reference", "/hypermedia/reference/"), ("Protocols", "/protocols/wire-format"), ("Examples", "/hypermedia/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: