Fix component-source calls: use explicit ~name, no magic prefix
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 19m57s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 19m57s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
(<>
|
||||
(~click-result :time now)
|
||||
(~doc-oob-code :target-id "click-comp"
|
||||
:text (component-source "click-result"))
|
||||
:text (component-source "~click-result"))
|
||||
(~doc-oob-code :target-id "click-wire"
|
||||
:text (str "(~click-result :time \"" now "\")")))))
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
(<>
|
||||
(~form-result :name name)
|
||||
(~doc-oob-code :target-id "form-comp"
|
||||
:text (component-source "form-result"))
|
||||
:text (component-source "~form-result"))
|
||||
(~doc-oob-code :target-id "form-wire"
|
||||
:text (str "(~form-result :name \"" name "\")")))))
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
(<>
|
||||
(~poll-result :time now :count count)
|
||||
(~doc-oob-code :target-id "poll-comp"
|
||||
:text (component-source "poll-result"))
|
||||
:text (component-source "~poll-result"))
|
||||
(~doc-oob-code :target-id "poll-wire"
|
||||
:text (str "(~poll-result :time \"" now "\" :count " count ")"))))))
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
(&key item-id)
|
||||
(<>
|
||||
(~doc-oob-code :target-id "delete-comp"
|
||||
:text (component-source "delete-row"))
|
||||
:text (component-source "~delete-row"))
|
||||
(~doc-oob-code :target-id "delete-wire"
|
||||
:text "(empty — row removed by outerHTML swap)")))
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
(<>
|
||||
(~inline-edit-form :value value)
|
||||
(~doc-oob-code :target-id "edit-comp"
|
||||
:text (component-source "inline-edit-form"))
|
||||
:text (component-source "~inline-edit-form"))
|
||||
(~doc-oob-code :target-id "edit-wire"
|
||||
:text (str "(~inline-edit-form :value \"" value "\")")))))
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
(<>
|
||||
(~inline-view :value value)
|
||||
(~doc-oob-code :target-id "edit-comp"
|
||||
:text (component-source "inline-view"))
|
||||
:text (component-source "~inline-view"))
|
||||
(~doc-oob-code :target-id "edit-wire"
|
||||
:text (str "(~inline-view :value \"" value "\")")))))
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
(<>
|
||||
(~inline-view :value value)
|
||||
(~doc-oob-code :target-id "edit-comp"
|
||||
:text (component-source "inline-view"))
|
||||
:text (component-source "~inline-view"))
|
||||
(~doc-oob-code :target-id "edit-wire"
|
||||
:text (str "(~inline-view :value \"" value "\")")))))
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
(<>
|
||||
(~lazy-result :time now)
|
||||
(~doc-oob-code :target-id "lazy-comp"
|
||||
:text (component-source "lazy-result"))
|
||||
:text (component-source "~lazy-result"))
|
||||
(~doc-oob-code :target-id "lazy-wire"
|
||||
:text (str "(~lazy-result :time \"" now "\")")))))
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
(<>
|
||||
(~progress-status :percent 0 :job-id job-id)
|
||||
(~doc-oob-code :target-id "progress-comp"
|
||||
:text (component-source "progress-status"))
|
||||
:text (component-source "~progress-status"))
|
||||
(~doc-oob-code :target-id "progress-wire"
|
||||
:text (str "(~progress-status :percent 0 :job-id \"" job-id "\")"))))))
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
(<>
|
||||
(~progress-status :percent next :job-id job-id)
|
||||
(~doc-oob-code :target-id "progress-comp"
|
||||
:text (component-source "progress-status"))
|
||||
:text (component-source "~progress-status"))
|
||||
(~doc-oob-code :target-id "progress-wire"
|
||||
:text (str "(~progress-status :percent " next " :job-id \"" job-id "\")")))))))
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
(<>
|
||||
(~search-results :items results :query q)
|
||||
(~doc-oob-code :target-id "search-comp"
|
||||
:text (component-source "search-results"))
|
||||
:text (component-source "~search-results"))
|
||||
(~doc-oob-code :target-id "search-wire"
|
||||
:text (str "(~search-results :items (list ...) :query \"" q "\")"))))))
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
(<>
|
||||
(~reset-message :message msg :time now)
|
||||
(~doc-oob-code :target-id "reset-comp"
|
||||
:text (component-source "reset-message"))
|
||||
:text (component-source "~reset-message"))
|
||||
(~doc-oob-code :target-id "reset-wire"
|
||||
:text (str "(~reset-message :message \"" msg "\" :time \"" now "\")")))))
|
||||
|
||||
@@ -397,7 +397,7 @@
|
||||
(~edit-row-form :id (get row "id") :name (get row "name")
|
||||
:price (get row "price") :stock (get row "stock"))
|
||||
(~doc-oob-code :target-id "editrow-comp"
|
||||
:text (component-source "edit-row-form"))
|
||||
:text (component-source "~edit-row-form"))
|
||||
(~doc-oob-code :target-id "editrow-wire"
|
||||
:text (str "(~edit-row-form :id \"" (get row "id") "\" ...)"))))))
|
||||
|
||||
@@ -415,7 +415,7 @@
|
||||
(<>
|
||||
(~edit-row-view :id row-id :name name :price price :stock stock)
|
||||
(~doc-oob-code :target-id "editrow-comp"
|
||||
:text (component-source "edit-row-view"))
|
||||
:text (component-source "~edit-row-view"))
|
||||
(~doc-oob-code :target-id "editrow-wire"
|
||||
:text (str "(~edit-row-view :id \"" row-id "\" ...)")))))
|
||||
|
||||
@@ -430,7 +430,7 @@
|
||||
(~edit-row-view :id (get row "id") :name (get row "name")
|
||||
:price (get row "price") :stock (get row "stock"))
|
||||
(~doc-oob-code :target-id "editrow-comp"
|
||||
:text (component-source "edit-row-view"))
|
||||
:text (component-source "~edit-row-view"))
|
||||
(~doc-oob-code :target-id "editrow-wire"
|
||||
:text (str "(~edit-row-view :id \"" (get row "id") "\" ...)"))))))
|
||||
|
||||
@@ -466,7 +466,7 @@
|
||||
(<>
|
||||
rows
|
||||
(~doc-oob-code :target-id "bulk-comp"
|
||||
:text (component-source "bulk-row"))
|
||||
:text (component-source "~bulk-row"))
|
||||
(~doc-oob-code :target-id "bulk-wire"
|
||||
:text (str "(updated " (len ids) " users to " new-status ")")))))))
|
||||
|
||||
@@ -561,7 +561,7 @@
|
||||
(<>
|
||||
(~anim-result :color color :time now)
|
||||
(~doc-oob-code :target-id "anim-comp"
|
||||
:text (component-source "anim-result"))
|
||||
:text (component-source "~anim-result"))
|
||||
(~doc-oob-code :target-id "anim-wire"
|
||||
:text (str "(~anim-result :color \"" color "\" :time \"" now "\")"))))))
|
||||
|
||||
@@ -579,7 +579,7 @@
|
||||
(~dialog-modal :title "Confirm Action"
|
||||
:message "Are you sure you want to proceed? This is a demo dialog rendered entirely with sx components.")
|
||||
(~doc-oob-code :target-id "dialog-comp"
|
||||
:text (component-source "dialog-modal"))
|
||||
:text (component-source "~dialog-modal"))
|
||||
(~doc-oob-code :target-id "dialog-wire"
|
||||
:text "(~dialog-modal :title \"Confirm Action\" :message \"...\")")))
|
||||
|
||||
@@ -607,7 +607,7 @@
|
||||
(<>
|
||||
(~kbd-result :key key :action action)
|
||||
(~doc-oob-code :target-id "kbd-comp"
|
||||
:text (component-source "kbd-result"))
|
||||
:text (component-source "~kbd-result"))
|
||||
(~doc-oob-code :target-id "kbd-wire"
|
||||
:text (str "(~kbd-result :key \"" key "\" :action \"" action "\")"))))))
|
||||
|
||||
@@ -626,7 +626,7 @@
|
||||
(<>
|
||||
(~pp-form-full :name (get p "name") :email (get p "email") :role (get p "role"))
|
||||
(~doc-oob-code :target-id "pp-comp"
|
||||
:text (component-source "pp-form-full"))
|
||||
:text (component-source "~pp-form-full"))
|
||||
(~doc-oob-code :target-id "pp-wire"
|
||||
:text (str "(~pp-form-full :name \"" (get p "name") "\" ...)")))))
|
||||
|
||||
@@ -643,7 +643,7 @@
|
||||
(<>
|
||||
(~pp-view :name name :email email :role role)
|
||||
(~doc-oob-code :target-id "pp-comp"
|
||||
:text (component-source "pp-view"))
|
||||
:text (component-source "~pp-view"))
|
||||
(~doc-oob-code :target-id "pp-wire"
|
||||
:text (str "(~pp-view :name \"" name "\" ...)")))))
|
||||
|
||||
@@ -657,7 +657,7 @@
|
||||
(<>
|
||||
(~pp-view :name (get p "name") :email (get p "email") :role (get p "role"))
|
||||
(~doc-oob-code :target-id "pp-comp"
|
||||
:text (component-source "pp-view"))
|
||||
:text (component-source "~pp-view"))
|
||||
(~doc-oob-code :target-id "pp-wire"
|
||||
:text (str "(~pp-view :name \"" (get p "name") "\" ...)")))))
|
||||
|
||||
@@ -678,7 +678,7 @@
|
||||
(<>
|
||||
(~json-result :body body :content-type ct)
|
||||
(~doc-oob-code :target-id "json-comp"
|
||||
:text (component-source "json-result"))
|
||||
:text (component-source "~json-result"))
|
||||
(~doc-oob-code :target-id "json-wire"
|
||||
:text (str "(~json-result :body \"" body "\" :content-type \"" ct "\")"))))))
|
||||
|
||||
@@ -700,7 +700,7 @@
|
||||
(<>
|
||||
(~echo-result :label "values" :items items)
|
||||
(~doc-oob-code :target-id "vals-comp"
|
||||
:text (component-source "echo-result"))
|
||||
:text (component-source "~echo-result"))
|
||||
(~doc-oob-code :target-id "vals-wire"
|
||||
:text (str "(~echo-result :label \"values\" :items (list ...))")))))))
|
||||
|
||||
@@ -715,7 +715,7 @@
|
||||
(<>
|
||||
(~echo-result :label "headers" :items items)
|
||||
(~doc-oob-code :target-id "vals-comp"
|
||||
:text (component-source "echo-result"))
|
||||
:text (component-source "~echo-result"))
|
||||
(~doc-oob-code :target-id "vals-wire"
|
||||
:text (str "(~echo-result :label \"headers\" :items (list ...))")))))))
|
||||
|
||||
@@ -734,7 +734,7 @@
|
||||
(<>
|
||||
(~loading-result :time now)
|
||||
(~doc-oob-code :target-id "loading-comp"
|
||||
:text (component-source "loading-result"))
|
||||
:text (component-source "~loading-result"))
|
||||
(~doc-oob-code :target-id "loading-wire"
|
||||
:text (str "(~loading-result :time \"" now "\")")))))
|
||||
|
||||
@@ -754,7 +754,7 @@
|
||||
(<>
|
||||
(~sync-result :query q :delay (str delay-ms))
|
||||
(~doc-oob-code :target-id "sync-comp"
|
||||
:text (component-source "sync-result"))
|
||||
:text (component-source "~sync-result"))
|
||||
(~doc-oob-code :target-id "sync-wire"
|
||||
:text (str "(~sync-result :query \"" q "\" :delay \"" delay-ms "\")"))))))
|
||||
|
||||
@@ -777,6 +777,6 @@
|
||||
(<>
|
||||
(~retry-result :attempt (str n) :message "Success! The endpoint finally responded.")
|
||||
(~doc-oob-code :target-id "retry-comp"
|
||||
:text (component-source "retry-result"))
|
||||
:text (component-source "~retry-result"))
|
||||
(~doc-oob-code :target-id "retry-wire"
|
||||
:text (str "(~retry-result :attempt \"" n "\" ...)"))))))
|
||||
|
||||
@@ -46,8 +46,7 @@ def _component_source(name: str) -> str:
|
||||
from shared.sx.types import Component, Island
|
||||
from shared.sx.ref.sx_ref import build_component_source
|
||||
|
||||
key = name if name.startswith("~") else f"~{name}"
|
||||
comp = get_component_env().get(key)
|
||||
comp = get_component_env().get(name)
|
||||
if isinstance(comp, Island):
|
||||
return build_component_source({
|
||||
"type": "island", "name": name,
|
||||
|
||||
Reference in New Issue
Block a user