@pipelex/mthds-ui 0.61.0 → 0.62.0

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.
@@ -132,16 +132,9 @@ paths = { type = "list", item_type = "concept", item_concept_ref = "PathE
132
132
  run_control = { type = "text", description = "On an input page, the catalog component that runs the method, by name; the page has exactly one of it." }
133
133
  returns = { type = "list", item_type = "text", description = "On a composer, what one run gives back, one line per member of the result, read from the result's own titles and descriptions. Absent elsewhere." }
134
134
  frame = { choices = ["page", "composer", "result"], description = "Where the page sits: `page`, a whole product page of its own; `composer`, the inputs of a host's compose-then-result app, before a run; `result`, the result page of that app, after one. Absent reads as `page`." }
135
- style = { type = "concept", concept_ref = "Style", description = "The app style the team chose, which the page will wear: its name and its direction. Absent when the team chose none." }
135
+ shell = { type = "text", description = "The name of the page shell the host draws the app in, when the host has chosen one. The shell and the team's design system draw the look; the page decides only its composition. Absent when the host names none." }
136
136
  sample_state = { type = "text", description = "On a result page, the state of one real run as the host loads it, as JSON - what `/result` held after one actual run, so magnitudes and lengths can be judged. Never copied into a page." }
137
137
 
138
- [concept.Style]
139
- description = "An app style: a named look the components draw - faces, weights, radii, panels and rhythm - and the one sentence that says what it is, which the composition follows."
140
-
141
- [concept.Style.structure]
142
- name = { type = "text", description = "The style's name, as a team picks it: `Quiet`, `Soft`, `Editorial`, `Bold`.", required = true }
143
- direction = { type = "text", description = "The style's direction in one sentence, as a designer reads it.", required = true }
144
-
145
138
  [concept.PathEntry]
146
139
  description = "One path of the state, as the brief describes it: where it is, what it holds, what it is called, what constrains it, and whether the page lays it out or hands it back to the kernel's own control."
147
140
 
@@ -154,7 +147,13 @@ title = { type = "text", description = "The member's human title, whe
154
147
  description = { type = "text", description = "What the member is for, as the method's author wrote it." }
155
148
  required = { type = "boolean", description = "On an input page, whether the input must be filled before the run: true for a required input, false for an optional one." }
156
149
  gating = { type = "boolean", description = "On an input page, true when the run waits for this input - a top-level fact only." }
157
- notes = { type = "list", item_type = "text", description = "The constraints and hints in words, each on its own: `min 1`, `at most 80 characters`, `default \"x\"`, `examples ...`, `hints intent=label`." }
150
+ notes = { type = "list", item_type = "text", description = "The constraints in words, each on its own: `min 1`, `more than 0`, `at most 80 characters`, `matches the pattern ...`, `default \"x\"`, `examples ...`, and any hint the vocabulary below does not name, as `hints key=value`." }
151
+ unit = { type = "text", description = "What a number counts, exactly as the method writes it: a currency code (`EUR`), `percent` (100 is the whole), or a unit of measure (`kg`, `ms`). Absent when the method states none." }
152
+ aggregate = { choices = ["sum", "average"], description = "On a number member of a list's item, how the column combines across the items, when the method declares it: their total or their average." }
153
+ intent = { type = "text", description = "The intent word the method states for the value (`rating`, `quantity`, `code`, `identifier`, `question`, `photo`, ...), when it states one the vocabulary knows." }
154
+ role = { choices = ["subject", "context", "guidance", "reference", "setting"], description = "On an input page, what a top-level input is to the job: as the method states it, or the standard's default for it once any input of the method states one. Absent when none does." }
155
+ part = { choices = ["title", "summary", "verdict", "metric", "body", "evidence", "detail"], description = "On a result page, what part of its record a member is, when the method states one that applies to its kind." }
156
+ options = { type = "list", item_type = "concept", item_concept_ref = "OptionEntry", description = "On a choice whose options carry words or a tone, every option in the order of the choices, with what the method says of it." }
158
157
  default = { type = "text", description = "The authored default value, as JSON, when the method states one - the seed a `/state` patch sets." }
159
158
  delegated = { type = "boolean", description = "True when the page hands the path back to the kernel's own control - MthdsField on an input page, MthdsResult on a result page - because the catalog cannot enter or show it. A delegated structure's members are not listed.", required = true }
160
159
  relative = { type = "boolean", description = "True when the path is spelled relative to one item of the list above it, as a DataTable column or `$item` reads it, rather than from the page's root." }
@@ -162,6 +161,15 @@ item_kind = { type = "text", description = "On a list whose items the bri
162
161
  item_description = { type = "text", description = "On a list whose items the brief describes: what one item is for, as the method's author wrote it." }
163
162
  item_laid_out = { type = "boolean", description = "On a list whose items the brief describes: true when the item's members follow this entry, one each, spelled relative to one item." }
164
163
 
164
+ [concept.OptionEntry]
165
+ description = "One option of a choice: its value, and the words and the tone the method gives it. Only the value is ever written; the rest is how the option reads."
166
+
167
+ [concept.OptionEntry.structure]
168
+ value = { type = "text", description = "The option exactly as the choice lists it, the value a control writes.", required = true }
169
+ label = { type = "text", description = "The option's name for people, when the method gives one." }
170
+ description = { type = "text", description = "What choosing the option means, when the method says." }
171
+ tone = { choices = ["positive", "caution", "negative", "neutral"], description = "How the option reads to a person, when the method says: a component that reads tones colours it from this, and an option with none reads neutral." }
172
+
165
173
  [concept.PagePlan]
166
174
  description = "The designer's plan for one page, settled before any element is written: what the page is for, how it is composed - a decision the plan makes, with no shape given in advance - what each region shows or collects and with which components, what runs the method, and what is delegated."
167
175
 
@@ -207,6 +215,11 @@ template = """
207
215
  {% set delegated = brief.paths | selectattr("delegated") | rejectattr("relative") | list %}
208
216
  {% set defaults = brief.paths | selectattr("default") | list %}
209
217
  {% set gating = brief.paths | selectattr("gating") | list %}
218
+ {% set roled = brief.paths | selectattr("role") | list %}
219
+ {% set parted = brief.paths | selectattr("part") | list %}
220
+ {% set worded = brief.paths | selectattr("options") | list %}
221
+ {% set counted = brief.paths | selectattr("unit") | list %}
222
+ {% set totalled = brief.paths | selectattr("aggregate") | list %}
210
223
  # {{ "Input" if brief.side == "input" else "Result" }} page: {{ brief.pipe_ref }}
211
224
 
212
225
  {% if brief.description %}
@@ -220,7 +233,7 @@ The result of a method, described below.
220
233
  {% if brief.name %}
221
234
  ## Name
222
235
 
223
- The method is called «{{ brief.name }}», as the host lists it. That is the app's name wherever the layout asks for one; invent no other. Links, if the layout carries any, name this page's own sections. The page states nothing the method does not: no promise about storage, privacy, speed, or what happens after the run.
236
+ The method is called «{{ brief.name }}», as the host lists it. That is the app's name wherever the layout asks for one; invent no other. The page states nothing the method does not: no promise about storage, privacy, speed, or what happens after the run.
224
237
 
225
238
  {% endif %}
226
239
  {% if brief.frame == "composer" %}
@@ -251,12 +264,10 @@ The page is the result across the full width. It opens on its header, which name
251
264
  Show each value once: a figure a component already states, such as the total inside a ProportionBar, is not repeated beside it. When the result carries the request back - the same facts the person entered, such as the topic or the tone they chose - leave that part out: the host's bar already restates the request. Write a value as a person reads it: a date in words, an amount beside its currency when the result has one.
252
265
 
253
266
  {% endif %}
254
- {% if brief.style %}
255
- ## Style
267
+ {% if brief.shell %}
268
+ ## Shell
256
269
 
257
- The team's apps wear the {{ brief.style.name }} style: {{ brief.style.direction }}
258
-
259
- The components already draw its faces, weights, radii and panels, so the page sets none of them. What the page decides is its composition, and the composition should read as this style too: how much air there is between the groups, how large and how long the headline is, how many groups the inputs fall into and whether they are titled, how much the page says around them. A calm style asks for few groups and generous air, a literary one for a headline that reads like a title and a measured rhythm, a graphic one for a dense, firm page with short labels.
270
+ The host draws this app in its {{ brief.shell }} shell and dresses it in the team's own design system: the faces, the colours, the radii, the panels and everything around the page are the shell's and the components', never the page's. The page decides its composition inside the frame above, and nothing of the look.
260
271
 
261
272
  {% endif %}
262
273
  ## State
@@ -268,11 +279,36 @@ The host loads the run's result under `/result` before the page renders. Read ev
268
279
  {% endif %}
269
280
 
270
281
  {% for entry in brief.paths %}
271
- {{ " " * entry.depth }}- `{{ entry.path }}` — {{ entry.kind }}{% if brief.side == "input" %}, {{ "required" if entry.required else "optional" }}{% if entry.gating %}, gates the run{% endif %}{% endif %}{% if entry.name %} — {% if entry.title %}{{ entry.title }} (`{{ entry.name }}`){% else %}`{{ entry.name }}`{% endif %}{% endif %}{% if entry.description %}: {{ entry.description }}{% endif %}{% if entry.notes %} ({{ entry.notes | join("; ") }}){% endif %}{% if entry.delegated and entry.relative %} (a DataTable prints it as text; delegate the whole list to {{ hatch }} to render it properly){% elif entry.delegated %} **[delegate: {{ hatch }}]**{% endif +%}
282
+ {{ " " * entry.depth }}- `{{ entry.path }}` — {{ entry.kind }}{% if brief.side == "input" %}, {{ "required" if entry.required else "optional" }}{% if entry.gating %}, gates the run{% endif %}{% endif %}{% if entry.name %} — {% if entry.title %}{{ entry.title }} (`{{ entry.name }}`){% else %}`{{ entry.name }}`{% endif %}{% endif %}{% if entry.description %}: {{ entry.description }}{% endif %}{% if entry.role %} [role: {{ entry.role }}]{% endif %}{% if entry.part %} [part: {{ entry.part }}]{% endif %}{% if entry.intent %} [intent: {{ entry.intent }}]{% endif %}{% if entry.unit %} [unit: {{ entry.unit }}]{% endif %}{% if entry.aggregate %} [shows its column's {{ "total" if entry.aggregate == "sum" else "average" }}]{% endif %}{% if entry.notes %} ({{ entry.notes | join("; ") }}){% endif %}{% if entry.delegated and entry.relative %} (a DataTable prints it as text; delegate the whole list to {{ hatch }} to render it properly){% elif entry.delegated %} **[delegate: {{ hatch }}]**{% endif +%}
283
+ {% for option in entry.options or [] %}
284
+ {{ " " * (entry.depth + 1) }}- option `{{ option.value }}`{% if option.label %} «{{ option.label }}»{% endif %}{% if option.tone %}, tone {{ option.tone }}{% endif %}{% if option.description %}: {{ option.description }}{% endif +%}
285
+ {% endfor %}
272
286
  {% if entry.item_kind %}
273
287
  {{ " " * (entry.depth + 1) }}- each item is a {{ entry.item_kind }}{% if entry.item_description %} ({{ entry.item_description }}){% endif %}{% if entry.item_laid_out and entry.relative %}, with:{% elif entry.item_laid_out %}, with these members (paths relative to one item, for DataTable columns or $$item):{% endif +%}
274
288
  {% endif %}
275
289
  {% endfor %}
290
+ {% if roled or parted or worded or counted or totalled %}
291
+
292
+ ## Meaning
293
+
294
+ The method states what its values mean, and the page shows it as stated: it restates no fact in its own words and guesses none the method leaves out.
295
+
296
+ {% if roled %}
297
+ - An input's role says what it is to the job. The subject is the material the run works on: the page opens on it, first and largest, and never folds it away. Context and guidance follow it. A reference, the yardstick the run applies and the same next time, and a setting, a knob with a sensible default, are set once and rarely changed: they are never the page's hero, nothing of theirs comes before the subject, and they sit together in a component made to fold settings away - except one the run waits for that has no default, which stays in view. A reference is entered with a component that offers the one used last, where the catalog has one.
298
+ {% endif %}
299
+ {% if parted %}
300
+ - A member's part says what it is to its record. The verdict is the answer the reader came for: the page leads with it, large and in its tone, and shows no other value before it but the record's title and summary. The title names the record, the summary says it in a line, a metric is the figure a reader looks for first, the body is the record's text, the evidence is what backs it, and a detail is read last.
301
+ {% endif %}
302
+ {% if worded %}
303
+ - A choice whose options carry words or a tone is shown as its option reads, never as its raw value: with a component that reads the option's label and tone from the method and colours it from the tone. An option with no tone reads neutral; never colour a value by guessing from its words.
304
+ {% endif %}
305
+ {% if counted %}
306
+ - A number with a unit is written in it - money in its currency, a percentage, a measure - by a component that reads the unit from the method; the page never writes a currency or a unit of its own beside it. A number the method bounds on both sides may be shown against its bounds.
307
+ {% endif %}
308
+ {% if totalled %}
309
+ - A column that declares a total or an average shows it under its table, and a column that declares none shows none.
310
+ {% endif %}
311
+ {% endif %}
276
312
 
277
313
  ## Delegated
278
314
 
@@ -354,7 +390,8 @@ DESIGN DIRECTION:
354
390
  - Write copy a person would say: short labels, one helper sentence where a label is not enough and none where it is. The control that runs names the job ("Plan my trip"), never "Submit".
355
391
  - Every value binds to a path the brief lists, and the page reads clearly in both a light and a dark theme.
356
392
  - When the brief has a Frame section, the host has already drawn the rest of the screen: plan only the page that section describes, inside that frame - never a side panel, never a bar or a footer the host draws, never a second place the method is run from or a second copy of the request.
357
- - When the brief has a Style section, the team's apps wear that style, and the composition follows its direction: how much air the page takes, how large the headline reads, how dense the inputs sit and how they are grouped are yours to set in its spirit. The look itself - faces, radii, panels, colour - is the components', never the page's.
393
+ - When the brief has a Shell section, the host draws the page inside that shell, in the team's own design system: the look is decided, so the page decides its composition and nothing of the look - no face, radius, panel or colour.
394
+ - When the brief has a Meaning section, the method has said what its values mean, and the plan shows it: the subject leads an input page and the settings come after it, folded; a verdict leads a result page in its tone; a choice in its option's words and tone, a number in its unit, a bounded number against its bounds, a declared total under its column - each with the component whose description says it reads that fact from the method.
358
395
 
359
396
  AVAILABLE COMPONENTS ({{ catalog.components | length }}):
360
397
 
@@ -374,6 +411,9 @@ PLANNING RULES:
374
411
  6. Tabs and Steps hold exactly one panel per tab or step, in the same order, usually a Stack. Their own state - the active tab, the current step, an open Collapsible - is theirs, never the host's.
375
412
  7. An input page has exactly ONE control that runs the method, wherever the composition puts it, and no other Button: a Button bound to nothing does nothing, and navigation is never built out of Buttons, since Steps and Tabs carry their own.
376
413
  8. On an input page the only state the page sets is the defaults the brief lists under "Defaults"; on a result page it sets none.
414
+ 9. Settings and references are never the page's hero: none of them sits before the subject, the subject is never folded away, and a setting or reference the run waits for with no default stays in view.
415
+ 10. A result whose record states a verdict shows it first: no value of the result comes before it but the record's title and summary.
416
+ 11. A value the method gives a meaning to is shown by a component that reads it: a toned choice never through a Badge whose colour is guessed, and a number with a unit never through a component that writes a unit of its own.
377
417
 
378
418
  CREATIVE SEED:
379
419
  When a creative seed follows the brief, it is your ONLY source of variety. Read it the way a designer reads a found object: its runs of letters, its rare characters, its numbers, its rhythm. Derive from it a creative direction - the composition, the density, the tone of the copy, which controls you favour, where the emphasis sits - and commit to it.
@@ -465,7 +505,7 @@ EXECUTION:
465
505
  - Restraint reads premium. No label that restates the obvious, no card inside a card, no paragraph that explains the form, no more than two levels of heading. Every element must earn its place; when in doubt, remove it.
466
506
  - Write copy a person would say: short labels, one helper sentence where a label is not enough and none where it is. The control that runs names the job ("Plan my trip"), never "Submit".
467
507
  - Every value binds to a path the brief lists, and the page reads clearly in both a light and a dark theme.
468
- - When the brief has a Style section, build the plan's composition in its spirit: where the plan is silent - a gap, a column count, whether a group is titled - decide as that style would.
508
+ - When the brief has a Shell section, the look is the shell's and the team's design system's: build the plan's composition and set nothing of the look.
469
509
 
470
510
  AVAILABLE COMPONENTS ({{ catalog.components | length }}):
471
511
 
@@ -503,6 +543,9 @@ RULES:
503
543
  12. One root element, and it is a container that accepts children.
504
544
  13. The plan's title is on the page as its one h1 - a Heading at level h1, or the headline of a component whose description says it renders an h1 - and no other h1. Below it, heading levels increase by one and never skip: h2, then h3. A component whose description says it renders a heading counts at that level, so a Heading inside it starts one level down.
505
545
  14. Never set a "className" prop. Colour, spacing and type come from the components as they are.
546
+ 15. Settings and references are never the page's hero: none of them is placed before the subject, the subject is never inside a fold, and a setting or reference the run waits for with no default is not folded away.
547
+ 16. A result whose record states a verdict shows it first: no element shows a value of the result before it but the record's title and summary.
548
+ 17. A value the method gives a meaning to is shown by a component that reads it: a toned choice never through a Badge, whose colour would be guessed, and a number with a unit never through a component whose description does not say it reads the unit, since that one writes it without.
506
549
 
507
550
  ---
508
551