@rokt/dcui-orchestrator 1.2.1-rc.11 → 1.2.1-rc.13

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.
@@ -2,9 +2,9 @@ import React from 'react';
2
2
  import { CatalogSelectorsStackedModel, LayoutSchemaModel, WhenPredicate } from '@rokt/dcui-layout-schema';
3
3
  export interface CatalogSelectorsStackedProps<Template extends LayoutSchemaModel> {
4
4
  /**
5
- * - `default`: the template rendered once per variant dimension. Each render
6
- * resolves the dimension it is rendering, so one shared template can label
7
- * itself:
5
+ * - `default`: the template rendered once per variant dimension.
6
+ * `CatalogDropdown` includes its own visible dimension label. Do not add a
7
+ * separate label node. Each render also exposes tokens for custom content:
8
8
  * * `%^DATA.variantAttribute.attributeId^%`: the dimension id, e.g.
9
9
  * `color`. It comes from the merchant's variant option key and is
10
10
  * neither normalised nor guaranteed lowercase or single-word, so
@@ -12,22 +12,15 @@ export interface CatalogSelectorsStackedProps<Template extends LayoutSchemaModel
12
12
  * `text.textTransform` rather than transforming the value, so `When`
13
13
  * comparisons stay stable.
14
14
  * * `%^DATA.variantAttribute.hasMultipleOptions^%`: `"true"` or `"false"`.
15
- * `CatalogDropdown` renders nothing for a single option, so a label
16
- * would otherwise sit above no control. Gate the label on this.
15
+ * `CatalogDropdown` renders neither label nor control for a single option.
17
16
  * Tokens from the enclosing scope stay resolvable alongside these.
18
17
  *
19
- * Put a `When` on `hasMultipleOptions` around the label node **only**, and
20
- * keep `CatalogDropdown` as its sibling:
21
- *
22
- * Column [ When(hasMultipleOptions is "true") [ BasicText ],
23
- * CatalogDropdown ]
24
- *
25
- * A `When` that encloses the dropdown instead would stop it mounting, and
18
+ * Keep the dropdown mounted. A `When` that encloses it would stop it mounting, and
26
19
  * a dropdown that never mounts never registers its validator field key —
27
20
  * a trigger that then resolves zero keys fails closed, blocking the CTA
28
21
  * with nothing on screen to explain it.
29
22
  *
30
- * Bind the label with `BasicText`. `RichText` sends the value through the
23
+ * Bind custom text with `BasicText`. `RichText` sends the value through the
31
24
  * HTML sanitiser, which throws on markup-shaped input; the node is then
32
25
  * dropped by its error boundary.
33
26
  * - `dropdown`: accepted by the layout schema, currently ignored — this
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokt/dcui-orchestrator",
3
- "version": "1.2.1-rc.11",
3
+ "version": "1.2.1-rc.13",
4
4
  "description": "Rokt's DCUI rendering process",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",