@rippling/pebble-sdui-web 0.3.2 → 0.4.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.
@@ -52,16 +52,22 @@ export interface CondRef<T> {
52
52
  readonly $else: T | StateRef<T> | BindStateRef<T> | ItemRef<T> | BindItemRef<T>;
53
53
  readonly [__phantom]: T;
54
54
  }
55
+ /** Computed function expression. Carries resolved value type T. */
56
+ export interface ComputedRef<T> {
57
+ readonly $computed: string;
58
+ readonly args: Record<string, unknown>;
59
+ readonly [__phantom]: T;
60
+ }
55
61
  /**
56
62
  * A prop value that is either a literal T or a phantom-typed expression
57
63
  * that resolves to T at runtime.
58
64
  */
59
- export type PropValue<T> = T | StateRef<T> | BindStateRef<T> | ItemRef<T> | BindItemRef<T> | (T extends number ? IndexRef : never) | (T extends string ? TemplateRef : never) | CondRef<T>;
65
+ export type PropValue<T> = T | StateRef<T> | BindStateRef<T> | ItemRef<T> | BindItemRef<T> | (T extends number ? IndexRef : never) | (T extends string ? TemplateRef : never) | CondRef<T> | ComputedRef<T>;
60
66
  /**
61
67
  * A value in an action param: literal T or a read-only expression.
62
68
  * Narrower than PropValue — no bind refs, templates, or cond.
63
69
  */
64
- export type ActionParamValue<T> = T | StateRef<T> | ItemRef<T> | (T extends number ? IndexRef : never);
70
+ export type ActionParamValue<T> = T | StateRef<T> | ItemRef<T> | (T extends number ? IndexRef : never) | ComputedRef<T>;
65
71
  /**
66
72
  * Takes a plain props type and wraps each field with PropValue<T>.
67
73
  * Preserves optionality: required fields stay required, optional stay optional.
@@ -7,7 +7,7 @@ export { buildNode } from './component-utils';
7
7
  export type { ComponentInputs, ComponentInputsOptionalProps, EventAction, InternalElementNode, } from './component-utils';
8
8
  export { buildAction } from './action-utils';
9
9
  export type { ActionBinding, ActionConfirm, ActionOptions, ActionOnSuccess, ActionOnError, } from './action-utils';
10
- export type { PropValue, WrapWithPropValue, StateRef, BindStateRef, ItemRef, BindItemRef, IndexRef, TemplateRef, CondRef, TemplateInterpolation, ActionParamValue, WrapWithActionParamValue, } from './expressions';
10
+ export type { PropValue, WrapWithPropValue, StateRef, BindStateRef, ItemRef, BindItemRef, IndexRef, TemplateRef, CondRef, ComputedRef, TemplateInterpolation, ActionParamValue, WrapWithActionParamValue, } from './expressions';
11
11
  export { $when, equals, neq, gt, gte, lt, lte, truthy, falsy, not_, $and, $or, and_, or_, } from './conditions';
12
12
  export type { VisibilityBinding, ComparisonOps } from './conditions';
13
13
  export type { StatePaths, ValueAt, ArrayPaths, ArrayItemAt, ItemPaths, ItemValueAt, } from './paths';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rippling/pebble-sdui-web",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "description": "Type-safe TypeScript web SDK for authoring json-render specs",
5
5
  "repository": {
6
6
  "type": "git",