@rippling/pebble-sdui-web 0.9.0 → 0.9.1

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.
Files changed (66) hide show
  1. package/dist/catalogs/custom-apps/catalog.d.ts +2 -2
  2. package/dist/catalogs/custom-apps/component-events.d.ts +1 -0
  3. package/dist/catalogs/custom-apps/component-props.d.ts +93 -53
  4. package/dist/catalogs/custom-apps/components.d.ts +3 -2
  5. package/dist/catalogs/custom-apps/index.cjs +4 -3
  6. package/dist/catalogs/custom-apps/index.cjs.map +1 -1
  7. package/dist/catalogs/custom-apps/index.d.ts +3 -3
  8. package/dist/catalogs/custom-apps/index.js +330 -333
  9. package/dist/catalogs/custom-apps/index.js.map +1 -1
  10. package/dist/catalogs/hub_platform/catalog.d.ts +1 -1
  11. package/dist/catalogs/hub_platform/component-props.d.ts +14 -6
  12. package/dist/catalogs/hub_platform/index.cjs +1 -1
  13. package/dist/catalogs/hub_platform/index.cjs.map +1 -1
  14. package/dist/catalogs/hub_platform/index.d.ts +1 -1
  15. package/dist/catalogs/hub_platform/index.js +86 -137
  16. package/dist/catalogs/hub_platform/index.js.map +1 -1
  17. package/dist/core/catalog-validation.cjs +2 -0
  18. package/dist/core/catalog-validation.cjs.map +1 -0
  19. package/dist/core/catalog-validation.d.ts +21 -0
  20. package/dist/core/catalog-validation.js +245 -0
  21. package/dist/core/catalog-validation.js.map +1 -0
  22. package/dist/core/directives.cjs +2 -0
  23. package/dist/core/directives.cjs.map +1 -0
  24. package/dist/core/directives.d.ts +72 -0
  25. package/dist/core/directives.js +35 -0
  26. package/dist/core/directives.js.map +1 -0
  27. package/dist/core/expressions.d.ts +5 -15
  28. package/dist/core/index.cjs +1 -1
  29. package/dist/core/index.d.ts +2 -0
  30. package/dist/core/index.js +28 -20
  31. package/dist/core/index.js.map +1 -1
  32. package/dist/docs/typescript/web/catalogs/custom-apps/actions.md +3 -2
  33. package/dist/docs/typescript/web/catalogs/custom-apps/components.md +38 -7
  34. package/dist/docs/typescript/web/catalogs/custom-apps/readme.md +1 -1
  35. package/dist/docs/typescript/web/catalogs/custom-apps/types.md +64 -0
  36. package/dist/docs/typescript/web/catalogs/hub_platform/components.md +1 -1
  37. package/dist/docs/typescript/web/catalogs/hub_platform/types.md +14 -0
  38. package/dist/index.cjs +1 -1
  39. package/dist/index.d.ts +2 -2
  40. package/dist/index.js +25 -17
  41. package/dist/index.js.map +1 -1
  42. package/dist/sdk-docs.cjs +208 -1
  43. package/dist/sdk-docs.cjs.map +1 -1
  44. package/dist/sdk-docs.js +213 -0
  45. package/dist/sdk-docs.js.map +1 -1
  46. package/package.json +1 -6
  47. package/dist/catalogs/ai_gateway/action-params.d.ts +0 -5
  48. package/dist/catalogs/ai_gateway/actions.d.ts +0 -5
  49. package/dist/catalogs/ai_gateway/catalog.d.ts +0 -33
  50. package/dist/catalogs/ai_gateway/component-events.d.ts +0 -6
  51. package/dist/catalogs/ai_gateway/component-props.d.ts +0 -51
  52. package/dist/catalogs/ai_gateway/components.d.ts +0 -7
  53. package/dist/catalogs/ai_gateway/function-params.d.ts +0 -5
  54. package/dist/catalogs/ai_gateway/functions.d.ts +0 -5
  55. package/dist/catalogs/ai_gateway/index.cjs +0 -2
  56. package/dist/catalogs/ai_gateway/index.cjs.map +0 -1
  57. package/dist/catalogs/ai_gateway/index.d.ts +0 -11
  58. package/dist/catalogs/ai_gateway/index.js +0 -366
  59. package/dist/catalogs/ai_gateway/index.js.map +0 -1
  60. package/dist/catalogs/ai_gateway/render.d.ts +0 -20
  61. package/dist/docs/typescript/web/catalogs/ai_gateway/actions.md +0 -6
  62. package/dist/docs/typescript/web/catalogs/ai_gateway/components.md +0 -31
  63. package/dist/docs/typescript/web/catalogs/ai_gateway/computed-functions.md +0 -6
  64. package/dist/docs/typescript/web/catalogs/ai_gateway/definitions.md +0 -6
  65. package/dist/docs/typescript/web/catalogs/ai_gateway/readme.md +0 -16
  66. package/dist/docs/typescript/web/catalogs/ai_gateway/types.md +0 -75
@@ -182,7 +182,7 @@ Events: `change`, `blur`, `focus`, `paste`, `menuToggle`
182
182
  | `isRequired` | no | boolean | Marks the field as required |
183
183
  | `isSearchable` | no | boolean | Enable type-to-search filtering |
184
184
  | `label` | no | string | Label text above the select |
185
- | `list` | no | [AppGroupSelectList](./types.md#appgroupselectlist) \| [AppGroupSelectList](./types.md#appgroupselectlist)[] | Array of options or grouped options. Supports flat list or nested groups with label and list properties |
185
+ | `list` | no | [AppGroupSelectList](./types.md#appgroupselectlist) \| [AppGroupSelectListVariant2](./types.md#appgroupselectlistvariant2)[] | Array of options or grouped options. Supports flat list or nested groups with label and list properties |
186
186
  | `maxHeight` | no | string \| number | Max height of multi-select container (CSS value) |
187
187
  | `maxTruncationLines` | no | number | Max rows of chips visible before "+X" overflow chip appears |
188
188
  | `placeholder` | no | string | Placeholder text when empty |
@@ -366,12 +366,16 @@ Box is a flexible layout container built on CSS flexbox. It provides extensive s
366
366
  - Colors (backgroundColor, color)
367
367
  - Border radius (uniform or per-corner)
368
368
  - Dimension props support both number (pixels) and string (CSS) values
369
+ - containerType can define the Box as a CSS query container
369
370
 
370
371
  **Complex prop formats:**
371
372
  - padding/margin/gap/radius: Use strict spacing or radius token names, or object forms with token values
372
373
  - border: Can be string or object with top/right/bottom/left
373
374
  - Number values on dimension props automatically get 'px' suffix
374
375
 
376
+ **Native props:**
377
+ - Supports id, role, aria-label, aria-labelledby, aria-describedby, aria-hidden, and aria-disabled
378
+
375
379
  Catalog key: `Box`
376
380
  Builder: `Box`
377
381
  Props type: `BoxProps`
@@ -384,6 +388,11 @@ Events: _none_
384
388
  |---|---:|---|---|
385
389
  | `align` | no | string | Align items on cross axis. CSS align-items value (e.g., "center", "flex-start") |
386
390
  | `alignSelf` | no | string | Align this child on cross axis. CSS align-self value (e.g., "center", "flex-end") |
391
+ | `aria-describedby` | no | string | ID of element that describes this Box |
392
+ | `aria-disabled` | no | boolean | Marks this Box as disabled for assistive technology |
393
+ | `aria-hidden` | no | boolean | Hide this Box from assistive technology |
394
+ | `aria-label` | no | string | Accessible label |
395
+ | `aria-labelledby` | no | string | ID of element that labels this Box |
387
396
  | `backgroundColor` | no | [AvatarImageBackground](./definitions.md#avatarimagebackground) | Background surface color token |
388
397
  | `basis` | no | number \| string | Flex basis value. Number (pixels) or CSS string |
389
398
  | `border` | no | string \| [BoxBorder](./types.md#boxborder) \| [BoxBorder](./types.md#boxborder) | Border value. CSS string, strict token parts, or directional border object |
@@ -392,6 +401,7 @@ Events: _none_
392
401
  | `child` | no | boolean | Whether this Box is a flex child. Changes display to initial |
393
402
  | `color` | no | [ActionCardIconColor](./definitions.md#actioncardiconcolor) | Text/icon color token |
394
403
  | `container` | no | boolean \| string | Container query target. true for unnamed container, string for named container. Used with changeDirectionAbove |
404
+ | `containerType` | no | string | CSS container-type value. Defines the element as a query container |
395
405
  | `direction` | no | string | Flex direction. CSS flex-direction value (e.g., "row", "column") |
396
406
  | `flex` | no | string | CSS flex shorthand (e.g., "1", "0 1 auto") |
397
407
  | `gap` | no | [BoxGap](./definitions.md#boxgap) \| [BoxGap](./types.md#boxgap) | Gap between flex children. Spacing token or {row, column} spacing-token object |
@@ -462,6 +472,7 @@ Events: `select`
462
472
  | `items` | yes | [BreadcrumbItem](./types.md#breadcrumbitem)[] | Array of breadcrumb items: {title, value, isDisabled?, href?} |
463
473
  | `noMargin` | no | boolean | Remove default margin from the component. Default: false |
464
474
  | `shouldCollapseMiddle` | no | boolean | Collapse middle items into a dropdown on desktop. Default: false |
475
+ | `shouldTruncateItems` | no | boolean | Truncate breadcrumb item text to one line at 128px and show full text in a tooltip on overflow. Default: false |
465
476
 
466
477
  No additional properties.
467
478
 
@@ -1059,6 +1070,26 @@ Events: `change`, `blur`
1059
1070
 
1060
1071
  No additional properties.
1061
1072
 
1073
+ ## Dashboard
1074
+
1075
+ Embeds a saved Rippling Analytics dashboard by id. Loading, permissions, missing-dashboard, and widget behavior are handled by the dashboard viewer.
1076
+
1077
+ dashboardId: id of the saved Analytics dashboard. The dashboard loads its own data and handles loading, access, missing, and widget states.
1078
+
1079
+ Catalog key: `Dashboard`
1080
+ Builder: `Dashboard`
1081
+ Props type: `DashboardProps`
1082
+ Accepts children: no
1083
+ Events: _none_
1084
+
1085
+ ### Props
1086
+
1087
+ | Name | Required | Type | Description |
1088
+ |---|---:|---|---|
1089
+ | `dashboardId` | yes | string | Id of a saved Rippling Analytics dashboard. The dashboard loads its own data and handles loading, access, missing, and widget behavior. |
1090
+
1091
+ No additional properties.
1092
+
1062
1093
  ## Date
1063
1094
 
1064
1095
  A date input that lets users select a single date via calendar or keyboard entry. Use for collecting exact, approximate, or memorable dates (e.g. birth date, start date) and for scheduling. Optionally includes time selection with timezone support. Use DateRange for start/end date pairs; use DateInlineMulti for selecting multiple individual dates without an input field.
@@ -1330,7 +1361,7 @@ No additional properties.
1330
1361
 
1331
1362
  A popover menu that displays a list of actions or selectable options. Use for 3–15 choices triggered by a button; for form field selection, use Select instead.
1332
1363
 
1333
- Bind value to state to track the selected option. The change event fires when the user selects an item and the selected item value is written to state. Bind dropdownIsOpen to state to observe open/close; the toggle event fires after dropdownIsOpen is updated. The list supports flat items, nested items with a list field, and {isSeparator: true}. triggerLabel renders a Button as the dropdown trigger.
1364
+ Bind value to state to track the selected option. The change event fires when the user selects an item and the selected item value is written to state. Bind dropdownIsOpen to state to observe open/close; the toggle event fires after dropdownIsOpen is updated. The list supports flat items, nested items with a list field, and {isSeparator: true}. triggerLabel renders a Button as the dropdown trigger. Set showSelectedLabel to true to display the selected option label in the trigger; empty and unmatched values fall back to triggerLabel.
1334
1365
 
1335
1366
  Catalog key: `Dropdown`
1336
1367
  Builder: `Dropdown`
@@ -1347,12 +1378,13 @@ Events: `change`, `toggle`
1347
1378
  | `footer` | no | [DropdownFooter](./types.md#dropdownfooter) | Footer item rendered at the bottom of the list |
1348
1379
  | `isCompact` | no | boolean | Render in compact mode |
1349
1380
  | `isDisabled` | no | boolean | Disable the dropdown trigger |
1350
- | `list` | yes | [DropdownList2](./types.md#dropdownlist2) \| [DropdownList2](./types.md#dropdownlist2) \| [DropdownList2](./types.md#dropdownlist2)[] | Array of dropdown options: {label, value, isDisabled?} |
1381
+ | `list` | yes | [DropdownList2](./types.md#dropdownlist2) \| [DropdownListVariant2](./types.md#dropdownlistvariant2) \| [ListVariant3](./types.md#listvariant3)[] | Array of dropdown options: {label, value, isDisabled?} |
1351
1382
  | `maxHeight` | no | number | Max height of the dropdown list in px. Default: 224 |
1352
1383
  | `placement` | no | [DropdownPlacement](./definitions.md#dropdownplacement) | Popover position. Default: bottom-start |
1353
1384
  | `searchable` | no | boolean | Enable search within the dropdown list |
1354
1385
  | `shouldAutoClose` | no | boolean | Auto-close after item selection |
1355
1386
  | `shouldCloseOnScroll` | no | boolean | Close on document scroll |
1387
+ | `showSelectedLabel` | no | boolean | Display the selected option label in the trigger. Defaults to false; empty or unmatched values use triggerLabel |
1356
1388
  | `triggerLabel` | yes | string | Label for the dropdown trigger button |
1357
1389
  | `value` | no | unknown | Currently selected value. Bind to state for selection tracking |
1358
1390
  | `width` | no | number | Width of the dropdown list in px. Default: 192 |
@@ -3383,7 +3415,7 @@ Events: `actionClick`
3383
3415
  |---|---:|---|---|
3384
3416
  | `actionClickedId` | no | string | Stores the id of the clicked action. Bind to state path to access in actionClick event handler |
3385
3417
  | `actions` | no | [GridAction](./types.md#gridaction)[] | Array of action buttons displayed at the bottom of the grid. Each action emits actionClick event with id in state |
3386
- | `list` | yes | [GridList](./types.md#gridlist) \| [GridList](./types.md#gridlist)[] | Array of cells to display in the grid. Each cell has a label and renderer with props |
3418
+ | `list` | yes | [GridList](./types.md#gridlist) \| [GridListVariant2](./types.md#gridlistvariant2)[] | Array of cells to display in the grid. Each cell has a label and renderer with props |
3387
3419
  | `theme` | no | [GridTheme](./definitions.md#gridtheme) | Visual theme variant. NO_CARD removes card styling, TRANSPARENT uses transparent theme, NO_PADDING removes padding. Default: card with padding |
3388
3420
 
3389
3421
  No additional properties.
@@ -4150,7 +4182,7 @@ No additional properties.
4150
4182
 
4151
4183
  ## ObjectListView
4152
4184
 
4153
- Full-featured object list page with list view management. Supports multiple list views, view switching, inline editing, bulk actions, and record management. Use objectApiName to specify the object. Optionally set defaultListViewId to pre-select a specific list view.
4185
+ Full-featured object list page with list view management. Supports multiple list views, view switching, inline editing, bulk actions, and record management. Use objectApiName to specify the object.
4154
4186
 
4155
4187
  Wraps ObjectListPage which provides list view selector, manage views, add/delete records, CSV export, and RQL filtering.
4156
4188
 
@@ -4164,7 +4196,6 @@ Events: _none_
4164
4196
 
4165
4197
  | Name | Required | Type | Description |
4166
4198
  |---|---:|---|---|
4167
- | `defaultListViewId` | no | string | |
4168
4199
  | `objectApiName` | yes | string | |
4169
4200
 
4170
4201
  No additional properties.
@@ -4269,7 +4300,7 @@ Events: `actionClick`
4269
4300
  |---|---:|---|---|
4270
4301
  | `actionClickedId` | no | string | Stores the id of the clicked action. Bind to state path to access in actionClick event handler |
4271
4302
  | `actions` | no | [ObjectUIStatsAction](./types.md#objectuistatsaction)[] | Array of action buttons displayed at the bottom of the grid. Each action emits actionClick event with id in state |
4272
- | `list` | yes | [ObjectUIStatsList](./types.md#objectuistatslist) \| [ObjectUIStatsList](./types.md#objectuistatslist)[] | Array of cells to display in the stats grid. Each cell has a label and renderer with props |
4303
+ | `list` | yes | [ObjectUIStatsList](./types.md#objectuistatslist) \| [ObjectUIStatsListVariant2](./types.md#objectuistatslistvariant2)[] | Array of cells to display in the stats grid. Each cell has a label and renderer with props |
4273
4304
 
4274
4305
  No additional properties.
4275
4306
 
@@ -2,7 +2,7 @@
2
2
  # custom-apps Catalog
3
3
 
4
4
  Catalog: `custom-apps`
5
- Version: `1.3.0`
5
+ Version: `1.4.2`
6
6
  SDK language: `typescript`
7
7
 
8
8
  Use this catalog index after you have chosen this catalog for the spec. Do not mix components, actions, computed functions, or render helpers from another catalog unless that catalog explicitly documents compatibility.
@@ -223,6 +223,17 @@ Additional properties: unknown.
223
223
 
224
224
  No additional properties.
225
225
 
226
+ ## AppGroupSelectListVariant2
227
+
228
+ ### Fields
229
+
230
+ | Name | Required | Type | Description |
231
+ |---|---:|---|---|
232
+ | `label` | yes | string | Group label/header |
233
+ | `list` | yes | [AppGroupSelectList](./types.md#appgroupselectlist)[] | Options within this group |
234
+
235
+ No additional properties.
236
+
226
237
  ## AppNavBarAction
227
238
 
228
239
  ### Fields
@@ -1073,6 +1084,23 @@ No additional properties.
1073
1084
 
1074
1085
  Additional properties: unknown.
1075
1086
 
1087
+ ## DropdownListVariant2
1088
+
1089
+ ### Fields
1090
+
1091
+ | Name | Required | Type | Description |
1092
+ |---|---:|---|---|
1093
+ | `isDisabled` | no | boolean | Disables this option |
1094
+ | `isNestedMenu` | no | boolean | Marks this item as a nested menu |
1095
+ | `label` | yes | string | Display text for the nested menu item |
1096
+ | `labelIcon` | no | string | Icon name to show next to the label |
1097
+ | `leftIconType` | no | string | Icon name to show on the left side of the item |
1098
+ | `list` | yes | [DropdownList2](./types.md#dropdownlist2)[] | Nested flat list items |
1099
+ | `tag` | no | string \| [DropdownTag](./types.md#dropdowntag) | Tag shown beside the option text |
1100
+ | `value` | no | unknown | Value for the nested option |
1101
+
1102
+ Additional properties: unknown.
1103
+
1076
1104
  ## DropdownTag
1077
1105
 
1078
1106
  ### Fields
@@ -2527,6 +2555,19 @@ No additional properties.
2527
2555
 
2528
2556
  No additional properties.
2529
2557
 
2558
+ ## GridListVariant2
2559
+
2560
+ ### Fields
2561
+
2562
+ | Name | Required | Type | Description |
2563
+ |---|---:|---|---|
2564
+ | `label` | yes | string \| number | Label displayed in the cell header. String or number value |
2565
+ | `props` | yes | [GridProp](./types.md#gridprop) | Props passed to TextRenderer: { value, color? }. Color must be a Pebble text/icon color token. |
2566
+ | `renderer` | no | "TEXT" | Renderer type for the cell value. TEXT displays plain text. Default: TEXT |
2567
+ | `tip` | no | string \| [GridTip](./types.md#gridtip) | Tooltip for the cell label. Can be a simple string or tooltip configuration object |
2568
+
2569
+ No additional properties.
2570
+
2530
2571
  ## GridProp
2531
2572
 
2532
2573
  Props passed to LabelRenderer. Icon colors must be Pebble text/icon color tokens.
@@ -2890,6 +2931,16 @@ No additional properties.
2890
2931
 
2891
2932
  No additional properties.
2892
2933
 
2934
+ ## ListVariant3
2935
+
2936
+ ### Fields
2937
+
2938
+ | Name | Required | Type | Description |
2939
+ |---|---:|---|---|
2940
+ | `isSeparator` | yes | true | Render a visual separator |
2941
+
2942
+ No additional properties.
2943
+
2893
2944
  ## LoadConfig
2894
2945
 
2895
2946
  Semantic Lottie load configuration object
@@ -3158,6 +3209,19 @@ No additional properties.
3158
3209
 
3159
3210
  No additional properties.
3160
3211
 
3212
+ ## ObjectUIStatsListVariant2
3213
+
3214
+ ### Fields
3215
+
3216
+ | Name | Required | Type | Description |
3217
+ |---|---:|---|---|
3218
+ | `label` | yes | string \| number | Label displayed in the cell header. String or number value |
3219
+ | `props` | yes | [ObjectUIStatsProp](./types.md#objectuistatsprop) | Props passed to TextRenderer: { value, color? }. Color must be a Pebble text/icon color token. |
3220
+ | `renderer` | no | "TEXT" | Renderer type for the cell value. TEXT displays plain text. Default: TEXT |
3221
+ | `tip` | no | string \| [ObjectUIStatsTip](./types.md#objectuistatstip) | Tooltip for the cell label. Can be a simple string or tooltip configuration object |
3222
+
3223
+ No additional properties.
3224
+
3161
3225
  ## ObjectUIStatsProp
3162
3226
 
3163
3227
  Props passed to LabelRenderer. Icon colors must be Pebble text/icon color tokens.
@@ -27,7 +27,7 @@ Events: `load`, `change`, `validationChange`, `editToggle`, `saveStart`, `saveSu
27
27
  | `canSelectAll` | no | boolean | When true, enables select-all support where SuperGroup supports it. |
28
28
  | `command` | no | [Command](./types.md#command) | |
29
29
  | `commandPath` | no | string | JSON pointer path in the SDUI state model. |
30
- | `createPolicy` | no | [CreatePolicy](./types.md#createpolicy) \| [CreatePolicy](./types.md#createpolicy) | Declarative create config used for lazy group creation. |
30
+ | `createPolicy` | no | [CreatePolicy](./types.md#createpolicy) \| [CreatePolicyVariant2](./types.md#createpolicyvariant2) | Declarative create config used for lazy group creation. |
31
31
  | `defaultEditable` | no | boolean | When true, the editor starts in edit mode. |
32
32
  | `defaultRoleStates` | no | string[] | |
33
33
  | `defaultSelectedDateTimeConfig` | no | [DefaultSelectedDateTimeConfig](./types.md#defaultselecteddatetimeconfig) | |
@@ -40,6 +40,20 @@ Additional properties: unknown.
40
40
 
41
41
  Additional properties: unknown.
42
42
 
43
+ ## CreatePolicyVariant2
44
+
45
+ ### Fields
46
+
47
+ | Name | Required | Type | Description |
48
+ |---|---:|---|---|
49
+ | `controllerKey` | no | string | |
50
+ | `family` | yes | string | |
51
+ | `kind` | yes | "nonRole" | |
52
+ | `parent` | no | string | |
53
+ | `referenceId` | no | string | |
54
+
55
+ Additional properties: unknown.
56
+
43
57
  ## DefaultSelectedDateTimeConfig
44
58
 
45
59
  ### Fields
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./core/spec.cjs"),o=require("./core/component-utils.cjs"),r=require("./core/action-utils.cjs"),e=require("./core/conditions.cjs");exports.createSpec=t.createSpec;exports.buildNode=o.buildNode;exports.buildAction=r.buildAction;exports.$and=e.$and;exports.$or=e.$or;exports.$when=e.$when;exports.and_=e.$and;exports.equals=e.equals;exports.falsy=e.falsy;exports.gt=e.gt;exports.gte=e.gte;exports.lt=e.lt;exports.lte=e.lte;exports.neq=e.neq;exports.not_=e.not_;exports.or_=e.$or;exports.truthy=e.truthy;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./core/spec.cjs"),r=require("./core/component-utils.cjs"),n=require("./core/action-utils.cjs"),t=require("./core/directives.cjs"),e=require("./core/conditions.cjs");exports.createSpec=o.createSpec;exports.buildNode=r.buildNode;exports.buildAction=n.buildAction;exports.$concat=t.$concat;exports.$count=t.$count;exports.$format=t.$format;exports.$join=t.$join;exports.$math=t.$math;exports.$pluralize=t.$pluralize;exports.$truncate=t.$truncate;exports.$and=e.$and;exports.$or=e.$or;exports.$when=e.$when;exports.and_=e.$and;exports.equals=e.equals;exports.falsy=e.falsy;exports.gt=e.gt;exports.gte=e.gte;exports.lt=e.lt;exports.lte=e.lte;exports.neq=e.neq;exports.not_=e.not_;exports.or_=e.$or;exports.truthy=e.truthy;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { CoreSpec } from './core/index';
2
- export { createSpec, buildNode, buildAction, $when, equals, neq, gt, gte, lt, lte, truthy, falsy, not_, $and, $or, and_, or_, } from './core/index';
2
+ export { createSpec, buildNode, buildAction, $when, equals, neq, gt, gte, lt, lte, truthy, falsy, not_, $and, $or, and_, or_, $format, $math, $concat, $count, $truncate, $pluralize, $join, } from './core/index';
3
3
  export interface Spec extends CoreSpec {
4
4
  platform: 'web';
5
5
  catalog: string;
6
6
  catalogVersion: string;
7
7
  }
8
8
  export type { CoreSpec };
9
- export type { SpecContext, FlatSpec, FlatUIElement, ItemAccessor, ComponentInputs, ComponentInputsOptionalProps, InternalElementNode, ActionBinding, ActionConfirm, ActionOptions, ActionOnSuccess, ActionOnError, PropValue, WrapWithPropValue, StateRef, BindStateRef, ItemRef, BindItemRef, IndexRef, TemplateRef, CondRef, TemplateInterpolation, ActionParamValue, WrapWithActionParamValue, VisibilityBinding, ComparisonOps, StatePaths, ValueAt, ArrayPaths, ArrayItemAt, ItemPaths, ItemValueAt, ElementNode, RepeatBinding, } from './core/index';
9
+ export type { SpecContext, FlatSpec, FlatUIElement, ItemAccessor, ComponentInputs, ComponentInputsOptionalProps, InternalElementNode, ActionBinding, ActionConfirm, ActionOptions, ActionOnSuccess, ActionOnError, PropValue, WrapWithPropValue, StateRef, BindStateRef, ItemRef, BindItemRef, IndexRef, TemplateRef, CondRef, TemplateInterpolation, ActionParamValue, WrapWithActionParamValue, VisibilityBinding, ComparisonOps, StatePaths, ValueAt, ArrayPaths, ArrayItemAt, ItemPaths, ItemValueAt, ElementNode, RepeatBinding, DirectiveRef, FormatKind, FormatOptions, MathOperation, BinaryMathOperation, UnaryMathOperation, TruncateOptions, PluralizeOptions, JoinOptions, } from './core/index';
package/dist/index.js CHANGED
@@ -1,24 +1,32 @@
1
1
  import { createSpec as r } from "./core/spec.js";
2
2
  import { buildNode as a } from "./core/component-utils.js";
3
- import { buildAction as d } from "./core/action-utils.js";
4
- import { $and as f, $or as p, $when as $, $and as m, equals as s, falsy as u, gt as x, gte as c, lt as i, lte as _, neq as b, not_ as g, $or as h, truthy as q } from "./core/conditions.js";
3
+ import { buildAction as n } from "./core/action-utils.js";
4
+ import { $concat as c, $count as f, $format as m, $join as p, $math as u, $pluralize as d, $truncate as i } from "./core/directives.js";
5
+ import { $and as s, $or as h, $when as _, $and as b, equals as g, falsy as q, gt as y, gte as j, lt as w, lte as z, neq as A, not_ as N, $or as S, truthy as k } from "./core/conditions.js";
5
6
  export {
6
- f as $and,
7
- p as $or,
8
- $ as $when,
9
- m as and_,
10
- d as buildAction,
7
+ s as $and,
8
+ c as $concat,
9
+ f as $count,
10
+ m as $format,
11
+ p as $join,
12
+ u as $math,
13
+ h as $or,
14
+ d as $pluralize,
15
+ i as $truncate,
16
+ _ as $when,
17
+ b as and_,
18
+ n as buildAction,
11
19
  a as buildNode,
12
20
  r as createSpec,
13
- s as equals,
14
- u as falsy,
15
- x as gt,
16
- c as gte,
17
- i as lt,
18
- _ as lte,
19
- b as neq,
20
- g as not_,
21
- h as or_,
22
- q as truthy
21
+ g as equals,
22
+ q as falsy,
23
+ y as gt,
24
+ j as gte,
25
+ w as lt,
26
+ z as lte,
27
+ A as neq,
28
+ N as not_,
29
+ S as or_,
30
+ k as truthy
23
31
  };
24
32
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
package/dist/sdk-docs.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=[{key:"shared.readme",filePath:"sdk-docs/README.md",title:"Pebble Kit SDK documentation"},{key:"shared.ai-authoring",filePath:"sdk-docs/ai-authoring.md",title:"AI authoring guide"},{key:"shared.catalogs",filePath:"sdk-docs/catalogs.md",title:"Catalogs"},{key:"shared.concepts",filePath:"sdk-docs/concepts.md",title:"Concepts"},{key:"shared.validation",filePath:"sdk-docs/validation.md",title:"Validation"},{key:"typescript.readme",filePath:"sdk-docs/typescript/README.md",title:"TypeScript SDK"},{key:"typescript.components-actions-rendering",filePath:"sdk-docs/typescript/components-actions-rendering.md",title:"TypeScript components, actions, and rendering"},{key:"typescript.state-expressions",filePath:"sdk-docs/typescript/state-expressions.md",title:"TypeScript state and expressions"}],n={"sdk-docs/README.md":`# Pebble Kit SDK documentation
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=[{key:"shared.readme",filePath:"sdk-docs/README.md",title:"Pebble Kit SDK documentation"},{key:"shared.ai-authoring",filePath:"sdk-docs/ai-authoring.md",title:"AI authoring guide"},{key:"shared.catalogs",filePath:"sdk-docs/catalogs.md",title:"Catalogs"},{key:"shared.concepts",filePath:"sdk-docs/concepts.md",title:"Concepts"},{key:"shared.directives",filePath:"sdk-docs/directives.md",title:"Standard directives"},{key:"shared.validation",filePath:"sdk-docs/validation.md",title:"Validation"},{key:"typescript.readme",filePath:"sdk-docs/typescript/README.md",title:"TypeScript SDK"},{key:"typescript.components-actions-rendering",filePath:"sdk-docs/typescript/components-actions-rendering.md",title:"TypeScript components, actions, and rendering"},{key:"typescript.state-expressions",filePath:"sdk-docs/typescript/state-expressions.md",title:"TypeScript state and expressions"}],n={"sdk-docs/README.md":`# Pebble Kit SDK documentation
2
2
 
3
3
  Pebble Kit is a server-driven UI (SDUI) SDK for producing JSON specs that the \`json-render\` runtime can render. The SDK is designed for two authors:
4
4
 
@@ -27,6 +27,7 @@ These links point to the canonical files in the repo so they still work when thi
27
27
  - [concepts.md](https://github.com/Rippling/pebble-kit/blob/main/sdk-docs/concepts.md) — core SDUI concepts shared by humans and LLMs.
28
28
  - [catalogs.md](https://github.com/Rippling/pebble-kit/blob/main/sdk-docs/catalogs.md) — generated catalogs, component discovery, and action discovery.
29
29
  - [validation.md](https://github.com/Rippling/pebble-kit/blob/main/sdk-docs/validation.md) — validation workflow and error repair loop.
30
+ - [directives.md](https://github.com/Rippling/pebble-kit/blob/main/sdk-docs/directives.md) — formatting, math, string, count, and collection expressions evaluated by json-render.
30
31
  - [python/README.md](https://github.com/Rippling/pebble-kit/blob/main/sdk-docs/python/README.md) — Python SDK quick start.
31
32
  - [python/components-actions-rendering.md](https://github.com/Rippling/pebble-kit/blob/main/sdk-docs/python/components-actions-rendering.md) — Python components, events, actions, and render output.
32
33
  - [python/state-expressions.md](https://github.com/Rippling/pebble-kit/blob/main/sdk-docs/python/state-expressions.md) — Python state, refs, repeat, templates, conditions, and conditional expressions.
@@ -508,6 +509,212 @@ Use validation especially when:
508
509
  - JSON was hand-written
509
510
  - a spec crosses service boundaries
510
511
  - a component catalog was upgraded
512
+ `,"sdk-docs/directives.md":`# Standard directives
513
+
514
+ Directives compute prop values in the json-render runtime. Pebble Kit provides typed authoring helpers for the seven directives registered by \`@json-render/directives\`:
515
+
516
+ Directive authoring is currently supported by the web SDKs only. The React Native runtime does not currently integrate json-render directives.
517
+
518
+ | Wire directive | TypeScript | Python | Go | Result |
519
+ |---|---|---|---|---|
520
+ | \`$format\` | \`$format()\` | \`format_value()\` | \`Format()\` | string |
521
+ | \`$math\` | \`$math()\` | \`math()\` | \`Math()\` | number |
522
+ | \`$concat\` | \`$concat()\` | \`concat()\` | \`Concat()\` | string |
523
+ | \`$count\` | \`$count()\` | \`count()\` | \`Count()\` | number |
524
+ | \`$truncate\` | \`$truncate()\` | \`truncate()\` | \`Truncate()\` | string |
525
+ | \`$pluralize\` | \`$pluralize()\` | \`pluralize()\` | \`Pluralize()\` | string |
526
+ | \`$join\` | \`$join()\` | \`join()\` | \`Join()\` | string |
527
+
528
+ The consuming json-render runtime must register \`standardDirectives\` from \`@json-render/directives\`. Pebble Kit only authors and validates the JSON expressions; it does not evaluate them.
529
+
530
+ ## TypeScript
531
+
532
+ \`\`\`ts
533
+ import {
534
+ $count,
535
+ $format,
536
+ $math,
537
+ $pluralize,
538
+ createSpec,
539
+ } from '@rippling/pebble-sdui-web';
540
+ import {
541
+ Text,
542
+ VStack,
543
+ render,
544
+ } from '@rippling/pebble-sdui-web/catalogs/custom-apps';
545
+
546
+ const state = { price: 10, quantity: 2, items: ['first', 'second'] };
547
+ const { $state } = createSpec({ state });
548
+
549
+ const total = $format(
550
+ 'currency',
551
+ $math('multiply', $state('/price'), $state('/quantity')),
552
+ { currency: 'USD' }
553
+ );
554
+
555
+ const itemCount = $pluralize($count($state('/items')), {
556
+ one: 'item',
557
+ other: 'items',
558
+ zero: 'no items',
559
+ });
560
+
561
+ const root = VStack({
562
+ id: 'summary',
563
+ children: [
564
+ Text({ id: 'total', props: { text: total } }),
565
+ Text({ id: 'item-count', props: { text: itemCount } }),
566
+ ],
567
+ });
568
+
569
+ const spec = render({ root, state });
570
+ \`\`\`
571
+
572
+ ## Python
573
+
574
+ \`\`\`python
575
+ from pebble_sdui_web import count, create_state, format_value, math, pluralize
576
+ from pebble_sdui_web.catalogs.core import Text, VStack, render
577
+
578
+ class AppState:
579
+ price: float
580
+ quantity: float
581
+ items: list[str]
582
+
583
+ state = create_state(
584
+ AppState,
585
+ {"price": 10.0, "quantity": 2.0, "items": ["first", "second"]},
586
+ )
587
+
588
+ total = format_value(
589
+ "currency",
590
+ math("multiply", state.ref(lambda s: s.price), state.ref(lambda s: s.quantity)),
591
+ currency="USD",
592
+ )
593
+
594
+ item_count = pluralize(
595
+ count(state.ref(lambda s: s.items)),
596
+ one="item",
597
+ other="items",
598
+ zero="no items",
599
+ )
600
+
601
+ root = VStack(
602
+ id="summary",
603
+ children=[
604
+ Text(id="total", text=total),
605
+ Text(id="item-count", text=item_count),
606
+ ],
607
+ )
608
+
609
+ spec = render(root, state.to_dict())
610
+ \`\`\`
611
+
612
+ ## Go
613
+
614
+ Go uses typed constants for directive kinds and \`Lit\` for literal operands:
615
+
616
+ \`\`\`go
617
+ import (
618
+ sdui "github.com/Rippling/pebble-kit/packages/go/pebble-sdui-web"
619
+ catalog "github.com/Rippling/pebble-kit/packages/go/pebble-sdui-web/catalogs/core"
620
+ )
621
+
622
+ state := map[string]any{
623
+ "price": 10.0,
624
+ "quantity": 2.0,
625
+ "items": []string{"first", "second"},
626
+ }
627
+
628
+ total := sdui.Format(
629
+ sdui.FormatCurrency,
630
+ sdui.Math(
631
+ sdui.MathMultiply,
632
+ sdui.State[float64]("/price"),
633
+ sdui.State[float64]("/quantity"),
634
+ ),
635
+ sdui.FormatOptions{Currency: "USD"},
636
+ )
637
+
638
+ itemCount := sdui.Pluralize(
639
+ sdui.Count(sdui.State[[]any]("/items")),
640
+ sdui.PluralizeOptions{One: "item", Other: "items", Zero: sdui.Ptr("no items")},
641
+ )
642
+
643
+ root := catalog.VStack(
644
+ catalog.VStackProps{},
645
+ catalog.WithVStackID("summary"),
646
+ catalog.WithVStackChildren(
647
+ catalog.Text(catalog.TextProps{Text: total}, catalog.WithTextID("total")),
648
+ catalog.Text(catalog.TextProps{Text: itemCount}, catalog.WithTextID("item-count")),
649
+ ),
650
+ )
651
+
652
+ spec, err := catalog.Render(root, state)
653
+ if err != nil {
654
+ panic(err)
655
+ }
656
+ _ = spec
657
+ \`\`\`
658
+
659
+ ## Rendered wire shape
660
+
661
+ The TypeScript example renders the spec below. Python and Go produce the same
662
+ directive expressions; catalog metadata reflects the catalog imported by each
663
+ consumer.
664
+
665
+ \`\`\`json
666
+ {
667
+ "root": "summary",
668
+ "elements": {
669
+ "summary": {
670
+ "type": "VStack",
671
+ "props": {},
672
+ "children": ["total", "item-count"]
673
+ },
674
+ "total": {
675
+ "type": "Text",
676
+ "props": {
677
+ "text": {
678
+ "$format": "currency",
679
+ "value": {
680
+ "$math": "multiply",
681
+ "a": { "$state": "/price" },
682
+ "b": { "$state": "/quantity" }
683
+ },
684
+ "currency": "USD"
685
+ }
686
+ }
687
+ },
688
+ "item-count": {
689
+ "type": "Text",
690
+ "props": {
691
+ "text": {
692
+ "$pluralize": {
693
+ "$count": { "$state": "/items" }
694
+ },
695
+ "one": "item",
696
+ "other": "items",
697
+ "zero": "no items"
698
+ }
699
+ }
700
+ }
701
+ },
702
+ "state": {
703
+ "price": 10,
704
+ "quantity": 2,
705
+ "items": ["first", "second"]
706
+ },
707
+ "platform": "web",
708
+ "catalog": "custom-apps",
709
+ "catalogVersion": "1.3.0"
710
+ }
711
+ \`\`\`
712
+
713
+ ## Composition
714
+
715
+ Directive inputs may contain state/item references, computed expressions, conditions, or other directives. Nested directives resolve from the inside out. For example, \`$math\` runs before \`$format\` in the total-price examples above.
716
+
717
+ The \`$t\` i18n directive is not included because it requires runtime-specific locale and message configuration.
511
718
  `,"sdk-docs/validation.md":`# Validation
512
719
 
513
720
  Validation checks a spec against a catalog's component schemas and structural rules. It is required for LLM-authored or hand-authored JSON and recommended for service boundaries.