"""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", "/language/docs/introduction"), ("Getting Started", "/language/docs/getting-started"), ("Components", "/language/docs/components"), ("Evaluator", "/language/docs/evaluator"), ("Primitives", "/language/docs/primitives"), ("CSS", "/language/docs/css"), ("Server Rendering", "/language/docs/server-rendering"), ] REFERENCE_NAV = [ ("Attributes", "/geography/hypermedia/reference/attributes"), ("Headers", "/geography/hypermedia/reference/headers"), ("Events", "/geography/hypermedia/reference/events"), ("JS API", "/geography/hypermedia/reference/js-api"), ] PROTOCOLS_NAV = [ ("Wire Format", "/applications/protocols/wire-format"), ("Fragments", "/applications/protocols/fragments"), ("Resolver I/O", "/applications/protocols/resolver-io"), ("Internal Services", "/applications/protocols/internal-services"), ("ActivityPub", "/applications/protocols/activitypub"), ("Future", "/applications/protocols/future"), ] EXAMPLES_NAV = [ ("Click to Load", "/geography/hypermedia/examples/click-to-load"), ("Form Submission", "/geography/hypermedia/examples/form-submission"), ("Polling", "/geography/hypermedia/examples/polling"), ("Delete Row", "/geography/hypermedia/examples/delete-row"), ("Inline Edit", "/geography/hypermedia/examples/inline-edit"), ("OOB Swaps", "/geography/hypermedia/examples/oob-swaps"), ("Lazy Loading", "/geography/hypermedia/examples/lazy-loading"), ("Infinite Scroll", "/geography/hypermedia/examples/infinite-scroll"), ("Progress Bar", "/geography/hypermedia/examples/progress-bar"), ("Active Search", "/geography/hypermedia/examples/active-search"), ("Inline Validation", "/geography/hypermedia/examples/inline-validation"), ("Value Select", "/geography/hypermedia/examples/value-select"), ("Reset on Submit", "/geography/hypermedia/examples/reset-on-submit"), ("Edit Row", "/geography/hypermedia/examples/edit-row"), ("Bulk Update", "/geography/hypermedia/examples/bulk-update"), ("Swap Positions", "/geography/hypermedia/examples/swap-positions"), ("Select Filter", "/geography/hypermedia/examples/select-filter"), ("Tabs", "/geography/hypermedia/examples/tabs"), ("Animations", "/geography/hypermedia/examples/animations"), ("Dialogs", "/geography/hypermedia/examples/dialogs"), ("Keyboard Shortcuts", "/geography/hypermedia/examples/keyboard-shortcuts"), ("PUT / PATCH", "/geography/hypermedia/examples/put-patch"), ("JSON Encoding", "/geography/hypermedia/examples/json-encoding"), ("Vals & Headers", "/geography/hypermedia/examples/vals-and-headers"), ("Loading States", "/geography/hypermedia/examples/loading-states"), ("Request Abort", "/geography/hypermedia/examples/sync-replace"), ("Retry", "/geography/hypermedia/examples/retry"), ] ESSAYS_NAV = [ ("sx sucks", "/etc/essays/sx-sucks"), ("Why S-Expressions", "/etc/essays/why-sexps"), ("The htmx/React Hybrid", "/etc/essays/htmx-react-hybrid"), ("On-Demand CSS", "/etc/essays/on-demand-css"), ("Client Reactivity", "/etc/essays/client-reactivity"), ("SX Native", "/etc/essays/sx-native"), ("The SX Manifesto", "/etc/philosophy/sx-manifesto"), ("Tail-Call Optimization", "/etc/essays/tail-call-optimization"), ("Continuations", "/etc/essays/continuations"), ] MAIN_NAV = [ ("Docs", "/language/docs/introduction"), ("Reference", "/geography/hypermedia/reference/"), ("Protocols", "/applications/protocols/wire-format"), ("Examples", "/geography/hypermedia/examples/click-to-load"), ("Essays", "/etc/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: