Add (param :as type) annotations to defcomp params across all services and templates
Annotates ~500 defcomp params across 62 files: market (5), blog (7), cart (5), events (3), federation (4), account (3), orders (2), shared templates (11), sx docs (14), plus remaining spec fn params (z3, test-framework, adapter-dom, adapter-async, engine, eval). Total annotations in codebase: 1043. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
;; Checkout return page components
|
||||
|
||||
(defcomp ~checkout-return-header (&key status)
|
||||
(defcomp ~checkout-return-header (&key (status :as string))
|
||||
(header :class "mb-1 sm:mb-2 flex flex-col sm:flex-row sm:items-center justify-between gap-3 sm:gap-4"
|
||||
(div :class "space-y-1"
|
||||
(h1 :class "text-xl sm:text-2xl md:text-3xl font-semibold tracking-tight"
|
||||
@@ -21,7 +21,7 @@
|
||||
(div :class "rounded-2xl border border-dashed border-rose-300 bg-rose-50/80 p-4 sm:p-6 text-sm text-rose-800"
|
||||
"We couldn\u2019t find that order. If you reached this page from an old link, please start a new order.")))
|
||||
|
||||
(defcomp ~checkout-return-failed (&key order-id)
|
||||
(defcomp ~checkout-return-failed (&key (order-id :as string))
|
||||
(div :class "rounded-2xl border border-rose-200 bg-rose-50/80 p-4 sm:p-6 text-sm text-rose-900 space-y-2"
|
||||
(p :class "font-medium" "Your payment was not completed.")
|
||||
(p "You can go back to your cart and try checkout again. If the problem persists, please contact us and mention order "
|
||||
@@ -32,7 +32,7 @@
|
||||
(p :class "font-medium" "All done!")
|
||||
(p "We\u2019ll start processing your order shortly.")))
|
||||
|
||||
(defcomp ~checkout-return-ticket (&key name pill state type-name date-str code price)
|
||||
(defcomp ~checkout-return-ticket (&key (name :as string) (pill :as string) (state :as string) (type-name :as string?) (date-str :as string) (code :as string) (price :as string))
|
||||
(li :class "px-4 py-3 flex items-start justify-between text-sm"
|
||||
(div
|
||||
(div :class "font-medium flex items-center gap-2"
|
||||
@@ -48,7 +48,7 @@
|
||||
(ul :class "divide-y divide-stone-200 rounded-2xl border border-stone-200 bg-white/80" items)))
|
||||
|
||||
;; Data-driven ticket items (replaces Python loop)
|
||||
(defcomp ~checkout-return-tickets-from-data (&key tickets)
|
||||
(defcomp ~checkout-return-tickets-from-data (&key (tickets :as list))
|
||||
(~checkout-return-tickets
|
||||
:items (<> (map (lambda (tk)
|
||||
(~checkout-return-ticket
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
;; --- orders layout: root + auth + orders rows ---
|
||||
|
||||
(defcomp ~orders-layout-full (&key list-url)
|
||||
(defcomp ~orders-layout-full (&key (list-url :as string))
|
||||
(<> (~root-header-auto)
|
||||
(~header-child-sx
|
||||
:inner (<> (~auth-header-row-auto)
|
||||
(~orders-header-row :list-url (or list-url "/"))))))
|
||||
|
||||
(defcomp ~orders-layout-oob (&key list-url)
|
||||
(defcomp ~orders-layout-oob (&key (list-url :as string))
|
||||
(<> (~auth-header-row-auto true)
|
||||
(~oob-header-sx
|
||||
:parent-id "auth-header-child"
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
;; --- order-detail layout: root + auth + orders + order rows ---
|
||||
|
||||
(defcomp ~order-detail-layout-full (&key list-url detail-url)
|
||||
(defcomp ~order-detail-layout-full (&key (list-url :as string) (detail-url :as string))
|
||||
(<> (~root-header-auto)
|
||||
(~order-detail-header-stack
|
||||
:auth (~auth-header-row-auto)
|
||||
@@ -30,7 +30,7 @@
|
||||
:link-href (or detail-url "/") :link-label "Order"
|
||||
:icon "fa fa-gbp"))))
|
||||
|
||||
(defcomp ~order-detail-layout-oob (&key detail-url)
|
||||
(defcomp ~order-detail-layout-oob (&key (detail-url :as string))
|
||||
(<> (~oob-header-sx
|
||||
:parent-id "orders-header-child"
|
||||
:row (~menu-row-sx :id "order-row" :level 3 :colour "sky"
|
||||
|
||||
Reference in New Issue
Block a user