stimulus_plumbers_mcp 0.4.15 → 0.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b74416de442716229d477c2ceeafef320aae39e8098a96cc6360d60b8f1adf4
|
|
4
|
+
data.tar.gz: a067330ce0282468226ad6ed6afce034fb509cc9fef86a09396b7ecdbb2c5ad4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b11b725c3f03b8d1bc1e06171356bedc9631f95206cccd48f77ce9b41e81e74d99a1683e0b3ba2143ee3edcb591d01156d8969420942b08bbd899d5ae83a5909
|
|
7
|
+
data.tar.gz: f9b15122832b707adf993100122c627bd33b9944159c7a595361de7fcde99b86e9aa03fb97d348c759e98a88e3a759bd231fdba10ad502cbe04e9983422e0005
|
|
@@ -15,8 +15,8 @@ Tools: `list_guides`, `get_guide(name:)`.
|
|
|
15
15
|
## Building forms and views
|
|
16
16
|
Valid `as:` values: `get_field_as_values(builder_method:)`. Combobox-backed `as:` values' controller
|
|
17
17
|
identifier: `get_field_as_controller(as:)` — `component://{name}/schema` keys are renderer-level, not
|
|
18
|
-
`as:` values. Component helper surface: `get_component_helper(name)`; themed params:
|
|
19
|
-
`get_component_schema(name)`; ERB examples: `get_component_examples(name)`. List everything with
|
|
18
|
+
`as:` values. Component helper surface: `get_component_helper(name:)`; themed params:
|
|
19
|
+
`get_component_schema(name:)`; ERB examples: `get_component_examples(name:)`. List everything with
|
|
20
20
|
`list_components`; `list_component_docs` shows which components have full docs
|
|
21
21
|
(`component://{name}/docs`) and helper signatures (`component://{name}/helper`). Icon options take a
|
|
22
22
|
name from `component://icons` (or `list_icons`). All schema components are queryable via
|
|
@@ -27,8 +27,9 @@ see what's covered. Full form builder reference: `component://form/docs`.
|
|
|
27
27
|
Most display components are pure markup; interactive ones (combobox, popover, calendar) emit their
|
|
28
28
|
`data-controller` attributes automatically. Component → required controllers: `component://integration`.
|
|
29
29
|
Controller identifiers and details (targets/values/outlets/classes): `controller://index`,
|
|
30
|
-
`get_controller_schema(
|
|
31
|
-
Narrative docs by controller family: `get_controller_docs(name)` / `controller://docs/{name}
|
|
30
|
+
`get_controller_schema(name:)` / `list_controllers` — `name:` is the identifier (`combobox-date`).
|
|
31
|
+
Narrative docs by controller family: `get_controller_docs(name:)` / `controller://docs/{name}` —
|
|
32
|
+
here `name:` is the family (`combobox`); `list_controller_docs` lists them.
|
|
32
33
|
|
|
33
34
|
## How this server is organized
|
|
34
35
|
- **Resources** live under entity namespaces — `component://` (Rails `sp_*` helper surface: schema,
|
|
@@ -25,7 +25,7 @@ module StimulusPlumbers
|
|
|
25
25
|
def option_helpers(tables)
|
|
26
26
|
tables.select { |t| t[:header].first == "Option" }
|
|
27
27
|
.filter_map do |t|
|
|
28
|
-
options = t[:rows].map { |r| option_row(r) }
|
|
28
|
+
options = t[:rows].map { |r| option_row(r, t[:header]) }
|
|
29
29
|
{ signature: t[:heading], options: options } unless options.empty?
|
|
30
30
|
end
|
|
31
31
|
end
|
|
@@ -35,8 +35,14 @@ module StimulusPlumbers
|
|
|
35
35
|
.flat_map { |t| t[:rows].map { |r| slot_row(r) } }
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
# Column order varies across docs — locate by header name, not position.
|
|
39
|
+
def option_row(cells, header)
|
|
40
|
+
default_at = header.index("Default")
|
|
41
|
+
{
|
|
42
|
+
option: clean(cells[0]),
|
|
43
|
+
default: default_at ? clean(cells[default_at]) : "",
|
|
44
|
+
description: cells[header.index("Description") || 2].to_s
|
|
45
|
+
}
|
|
40
46
|
end
|
|
41
47
|
|
|
42
48
|
def slot_row(cells)
|