Rename all 1,169 components to path-based names with namespace support
Component names now reflect filesystem location using / as path separator and : as namespace separator for shared components: ~sx-header → ~layouts/header ~layout-app-body → ~shared:layout/app-body ~blog-admin-dashboard → ~admin/dashboard 209 files, 4,941 replacements across all services. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
;; Market cart components
|
||||
|
||||
(defcomp ~market-cart-add-empty (&key cart-id action csrf)
|
||||
(defcomp ~cart/add-empty (&key cart-id action csrf)
|
||||
(div :id cart-id
|
||||
(form :action action :method "post" :sx-post action :sx-target "#cart-mini" :sx-swap "outerHTML" :class "rounded flex items-center"
|
||||
(input :type "hidden" :name "csrf_token" :value csrf)
|
||||
@@ -9,7 +9,7 @@
|
||||
(span :class "relative inline-flex items-center justify-center"
|
||||
(i :class "fa fa-cart-plus text-4xl" :aria-hidden "true"))))))
|
||||
|
||||
(defcomp ~market-cart-add-quantity (&key cart-id action csrf minus-val plus-val quantity cart-href)
|
||||
(defcomp ~cart/add-quantity (&key cart-id action csrf minus-val plus-val quantity cart-href)
|
||||
(div :id cart-id
|
||||
(div :class "rounded flex items-center gap-2"
|
||||
(form :action action :method "post" :sx-post action :sx-target "#cart-mini" :sx-swap "outerHTML"
|
||||
@@ -26,7 +26,7 @@
|
||||
(input :type "hidden" :name "count" :value plus-val)
|
||||
(button :type "submit" :class "inline-flex items-center justify-center w-8 h-8 text-sm font-medium rounded-full border border-emerald-600 text-emerald-700 hover:bg-emerald-50 text-xl" "+")))))
|
||||
|
||||
(defcomp ~market-cart-mini-count (&key href count)
|
||||
(defcomp ~cart/mini-count (&key href count)
|
||||
(div :id "cart-mini" :sx-swap-oob "outerHTML"
|
||||
(a :href href :class "relative inline-flex items-center justify-center"
|
||||
(span :class "relative inline-flex items-center justify-center"
|
||||
@@ -35,25 +35,25 @@
|
||||
(span :class "flex items-center justify-center bg-emerald-500 text-white rounded-full min-w-[1.25rem] h-5 text-xs font-bold px-1"
|
||||
count))))))
|
||||
|
||||
(defcomp ~market-cart-mini-empty (&key href logo)
|
||||
(defcomp ~cart/mini-empty (&key href logo)
|
||||
(div :id "cart-mini" :sx-swap-oob "outerHTML"
|
||||
(a :href href :class "relative inline-flex items-center justify-center"
|
||||
(img :src logo :class "h-8 w-8 rounded-full object-cover border border-stone-300" :alt ""))))
|
||||
|
||||
(defcomp ~market-cart-add-oob (&key id content inner)
|
||||
(defcomp ~cart/add-oob (&key id content inner)
|
||||
(div :id id :sx-swap-oob "outerHTML"
|
||||
(if content content (when inner inner))))
|
||||
|
||||
;; Cart added response — composes cart mini + add/remove OOB in sx
|
||||
(defcomp ~market-cart-added-response (&key has-count cart-href blog-href logo
|
||||
(defcomp ~cart/added-response (&key has-count cart-href blog-href logo
|
||||
slug action csrf quantity minus-val plus-val)
|
||||
(<>
|
||||
(if has-count
|
||||
(~market-cart-mini-count :href cart-href :count (str has-count))
|
||||
(~market-cart-mini-empty :href blog-href :logo logo))
|
||||
(~market-cart-add-oob :id (str "cart-add-" slug)
|
||||
(~cart/mini-count :href cart-href :count (str has-count))
|
||||
(~cart/mini-empty :href blog-href :logo logo))
|
||||
(~cart/add-oob :id (str "cart-add-" slug)
|
||||
:inner (if (= (or quantity "0") "0")
|
||||
(~market-cart-add-empty :cart-id (str "cart-" slug) :action action :csrf csrf)
|
||||
(~market-cart-add-quantity :cart-id (str "cart-" slug) :action action :csrf csrf
|
||||
(~cart/add-empty :cart-id (str "cart-" slug) :action action :csrf csrf)
|
||||
(~cart/add-quantity :cart-id (str "cart-" slug) :action action :csrf csrf
|
||||
:minus-val minus-val :plus-val plus-val
|
||||
:quantity quantity :cart-href cart-href)))))
|
||||
|
||||
Reference in New Issue
Block a user