@rippling/pebble-sdui-mobile 1.1.5 → 1.1.6

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.
@@ -164,7 +164,7 @@ Rendered prop shape:
164
164
  }
165
165
  ```
166
166
 
167
- Put plain words directly in the template string. Use interpolations only for SDK expression refs.
167
+ Put plain words directly in the template string; interpolate only state refs, `null`, or `undefined`. In repeated children, use an item ref directly for a plain value. On web runtimes with standard directives, use `$concat('Task: ', item.$('title'))` for combined text instead of interpolating item or index refs in `$template`.
168
168
 
169
169
  ## Show Or Hide Components With Conditions
170
170
 
@@ -230,7 +230,7 @@ Both branches should resolve to the same prop type.
230
230
 
231
231
  ## Repeat Over Runtime Lists
232
232
 
233
- Use `repeat(path, key?)` when JSON-render should render one element per item in a state array.
233
+ Use `repeat(path, key?)` to render a container's children once per item in a state array. To repeat a Card, put it inside that container.
234
234
 
235
235
  ```ts
236
236
  interface Todo {
@@ -253,11 +253,16 @@ const { repeat } = createSpec<AppState>({
253
253
 
254
254
  const [todoRepeat, todo] = repeat('/todos', 'id');
255
255
 
256
- Text({
256
+ VStack({
257
257
  repeat: todoRepeat,
258
- props: {
259
- text: todo.$('title'),
260
- },
258
+ props: { gap: 'space300' },
259
+ children: [
260
+ Card({
261
+ id: 'todo-card',
262
+ props: { padding: 'space300' },
263
+ children: [Text({ props: { text: todo.$('title') } })],
264
+ }),
265
+ ],
261
266
  });
262
267
  ```
263
268
 
@@ -265,17 +270,16 @@ Rendered shape includes:
265
270
 
266
271
  ```json
267
272
  {
273
+ "type": "VStack",
268
274
  "repeat": {
269
275
  "statePath": "/todos",
270
276
  "key": "id"
271
277
  },
272
- "props": {
273
- "text": { "$item": "title" }
274
- }
278
+ "children": ["todo-card"]
275
279
  }
276
280
  ```
277
281
 
278
- Use `todo.$bind('field')` only when the repeated component should write back to that item field. Use `todo.$index()` when the UI needs the current item index.
282
+ Use `todo.$bind('field')` only when a repeated child should write back to that item field. Use `todo.$index()` when the UI needs the current item index.
279
283
 
280
284
  ## Use Components From A Catalog
281
285
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rippling/pebble-sdui-mobile",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Type-safe TypeScript mobile SDK for authoring json-render specs",
5
5
  "repository": {
6
6
  "type": "git",