@elaraai/e3-ui-components 1.0.79 → 1.0.81
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.
- package/README.md +1 -1
- package/dist/components/DatasetPreview.d.ts +10 -2
- package/dist/components/DatasetPreview.d.ts.map +1 -1
- package/dist/components/EastValueViewer.d.ts.map +1 -1
- package/dist/components/PagedDatasetPreview.d.ts +15 -1
- package/dist/components/PagedDatasetPreview.d.ts.map +1 -1
- package/dist/components/TaskPreview.d.ts.map +1 -1
- package/dist/components/UITaskPreview.d.ts +7 -3
- package/dist/components/UITaskPreview.d.ts.map +1 -1
- package/dist/decision/constraint-format.d.ts +15 -7
- package/dist/decision/constraint-format.d.ts.map +1 -1
- package/dist/decision/contract.d.ts +28 -0
- package/dist/decision/contract.d.ts.map +1 -0
- package/dist/decision/facets.d.ts +21 -3
- package/dist/decision/facets.d.ts.map +1 -1
- package/dist/decision/grouping.d.ts +11 -0
- package/dist/decision/grouping.d.ts.map +1 -1
- package/dist/decision/handle-runtime.d.ts.map +1 -1
- package/dist/decision/journal.d.ts.map +1 -1
- package/dist/decision/lever-editor.d.ts +11 -18
- package/dist/decision/lever-editor.d.ts.map +1 -1
- package/dist/decision/queue.d.ts.map +1 -1
- package/dist/diff/format.d.ts +20 -12
- package/dist/diff/format.d.ts.map +1 -1
- package/dist/diff/index.d.ts.map +1 -1
- package/dist/diff/manual.d.ts +37 -18
- package/dist/diff/manual.d.ts.map +1 -1
- package/dist/diff/walker.d.ts +14 -6
- package/dist/diff/walker.d.ts.map +1 -1
- package/dist/experiment/charts.d.ts +4 -1
- package/dist/experiment/charts.d.ts.map +1 -1
- package/dist/experiment/derive.d.ts +25 -5
- package/dist/experiment/derive.d.ts.map +1 -1
- package/dist/experiment/index.d.ts.map +1 -1
- package/dist/experiment/run-runtime.d.ts +4 -8
- package/dist/experiment/run-runtime.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useDatasetValue.d.ts +13 -2
- package/dist/hooks/useDatasetValue.d.ts.map +1 -1
- package/dist/hooks/useTaskDetails.d.ts +1 -5
- package/dist/hooks/useTaskDetails.d.ts.map +1 -1
- package/dist/hooks/workspaces.d.ts +16 -3
- package/dist/hooks/workspaces.d.ts.map +1 -1
- package/dist/index.cjs +1361 -1028
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1385 -1052
- package/dist/index.js.map +1 -1
- package/dist/platform/bind-runtime.d.ts +14 -5
- package/dist/platform/bind-runtime.d.ts.map +1 -1
- package/dist/platform/dataset-hooks.d.ts +12 -4
- package/dist/platform/dataset-hooks.d.ts.map +1 -1
- package/dist/platform/dataset-store.d.ts +47 -11
- package/dist/platform/dataset-store.d.ts.map +1 -1
- package/dist/platform/func-runtime.d.ts +16 -6
- package/dist/platform/func-runtime.d.ts.map +1 -1
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/paged-runtime.d.ts +183 -49
- package/dist/platform/paged-runtime.d.ts.map +1 -1
- package/dist/platform/record-runtime.d.ts +14 -4
- package/dist/platform/record-runtime.d.ts.map +1 -1
- package/dist/platform/staged-store.d.ts +19 -2
- package/dist/platform/staged-store.d.ts.map +1 -1
- package/package.json +16 -15
package/README.md
CHANGED
|
@@ -172,7 +172,7 @@ Dual-licensed:
|
|
|
172
172
|
- [@elaraai/e3](https://www.npmjs.com/package/@elaraai/e3): SDK for authoring e3 packages with typed tasks and pipelines
|
|
173
173
|
- [@elaraai/e3-core](https://www.npmjs.com/package/@elaraai/e3-core): Object store, dataflow orchestrator, execution state
|
|
174
174
|
- [@elaraai/e3-types](https://www.npmjs.com/package/@elaraai/e3-types): Shared type definitions for e3 packages
|
|
175
|
-
- [@elaraai/e3-cli](https://www.npmjs.com/package/@elaraai/e3-cli): `e3 repo`, `e3 package`, `e3 workspace`, `e3
|
|
175
|
+
- [@elaraai/e3-cli](https://www.npmjs.com/package/@elaraai/e3-cli): `e3 repo`, `e3 package`, `e3 workspace`, `e3 dataflow run`, `e3 watch`, `e3 task logs` commands
|
|
176
176
|
- [@elaraai/e3-api-client](https://www.npmjs.com/package/@elaraai/e3-api-client): HTTP client for remote e3 repositories
|
|
177
177
|
- [@elaraai/e3-api-server](https://www.npmjs.com/package/@elaraai/e3-api-server): REST API server for e3 repositories
|
|
178
178
|
- [@elaraai/e3-api-tests](https://www.npmjs.com/package/@elaraai/e3-api-tests): Shared API compliance test suites
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RequestOptions } from '@elaraai/e3-api-client';
|
|
2
|
+
import { Formatters } from '@elaraai/east-ui-components';
|
|
2
3
|
export interface DatasetPreviewProps {
|
|
3
4
|
apiUrl: string;
|
|
4
5
|
repo: string;
|
|
@@ -13,8 +14,15 @@ export interface DatasetPreviewProps {
|
|
|
13
14
|
* this dataset path (for mutable inputs). Task outputs stay read-only. */
|
|
14
15
|
editable?: boolean;
|
|
15
16
|
}
|
|
16
|
-
/**
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Human-readable byte size, shared with the paged preview — its digits in the
|
|
19
|
+
* app's locale (#850).
|
|
20
|
+
*
|
|
21
|
+
* @param bytes - The size in bytes
|
|
22
|
+
* @param words - The formatters; the runtime locale's when omitted
|
|
23
|
+
* @returns `512 B`, `1.5 KB` or `2.25 MB` (`1,5 KB` in `de-DE`)
|
|
24
|
+
*/
|
|
25
|
+
export declare function formatSize(bytes: number, words?: Formatters): string;
|
|
18
26
|
/** Download trigger with its own in-flight state, shared with the paged preview. */
|
|
19
27
|
export declare function DownloadButton({ onClick, label }: {
|
|
20
28
|
onClick: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatasetPreview.d.ts","sourceRoot":"","sources":["../../src/components/DatasetPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"DatasetPreview.d.ts","sourceRoot":"","sources":["../../src/components/DatasetPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,OAAO,EAIH,KAAK,UAAU,EAKlB,MAAM,6BAA6B,CAAC;AAWrC,MAAM,WAAW,mBAAmB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mDAAmD;IACnD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;+EAC2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAOD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,UAAyB,GAAG,MAAM,CAIlF;AAED,oFAAoF;AACpF,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,2CAYzF;AAED,eAAO,MAAM,cAAc,2DAoOzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EastValueViewer.d.ts","sourceRoot":"","sources":["../../src/components/EastValueViewer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"EastValueViewer.d.ts","sourceRoot":"","sources":["../../src/components/EastValueViewer.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAY,KAAK,aAAa,EAAgB,MAAM,eAAe,CAAC;AAE3E,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;CAClB;AA6TD,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,oBAAoB,2CAapE"}
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
import { RequestOptions } from '@elaraai/e3-api-client';
|
|
1
|
+
import { DatasetPage, RequestOptions } from '@elaraai/e3-api-client';
|
|
2
2
|
import { EastTypeValue } from '@elaraai/east';
|
|
3
3
|
import { pruneRetainedPages } from '@elaraai/east-ui/internal';
|
|
4
|
+
/**
|
|
5
|
+
* The page size to address pages by, given one landed page (#829).
|
|
6
|
+
*
|
|
7
|
+
* The server trims every page of a dataset to the same byte budget, so a page
|
|
8
|
+
* that came back SHORT while the dataset has more beyond it tells the size
|
|
9
|
+
* every later page will be served at. Addressing pages by the requested size
|
|
10
|
+
* instead would start page `p + 1` past the trimmed page's end and skip the
|
|
11
|
+
* rows between for good. A short FINAL page is only the data ending.
|
|
12
|
+
*
|
|
13
|
+
* @param requested - Elements the page asked for
|
|
14
|
+
* @param page - The landed page's placement
|
|
15
|
+
* @returns The size to address pages by from here on
|
|
16
|
+
*/
|
|
17
|
+
export declare function servedPageSize(requested: number, page: Pick<DatasetPage, 'offset' | 'count' | 'totalElements'>): number;
|
|
4
18
|
/** Page retention — the row model's `pruneRetainedPages` (moved to
|
|
5
19
|
* `@elaraai/east-ui` in #719), re-exported here for its existing importers. */
|
|
6
20
|
export { pruneRetainedPages };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PagedDatasetPreview.d.ts","sourceRoot":"","sources":["../../src/components/PagedDatasetPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"PagedDatasetPreview.d.ts","sourceRoot":"","sources":["../../src/components/PagedDatasetPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG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AI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"TaskPreview.d.ts","sourceRoot":"","sources":["../../src/components/TaskPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAcH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAM7D,MAAM,WAAW,gBAAgB;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,WAAW,wDA+CyC,CAAC"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { E3Config } from '../platform/e3-config.js';
|
|
2
2
|
export interface UITaskPreviewProps {
|
|
3
|
-
/** Task name (
|
|
3
|
+
/** Task name (a task whose role is `ui`). */
|
|
4
4
|
task: string;
|
|
5
5
|
/**
|
|
6
|
-
* Override the surrounding `<E3Provider>`
|
|
7
|
-
*
|
|
6
|
+
* Override the surrounding `<E3Provider>`'s server identity, or supply one
|
|
7
|
+
* where there is none. A `workspace` it names must be the one the
|
|
8
|
+
* surrounding `<ReactiveDatasetProvider>` serves: `Data.bind` and
|
|
9
|
+
* `Data.bindPaged` read through process-global runtimes bound to that
|
|
10
|
+
* workspace, so a page previews one workspace, and a preview whose override
|
|
11
|
+
* names another shows an error.
|
|
8
12
|
*/
|
|
9
13
|
config?: E3Config;
|
|
10
14
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UITaskPreview.d.ts","sourceRoot":"","sources":["../../src/components/UITaskPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAyCH,OAAO,EAAuB,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAY9E,MAAM,WAAW,kBAAkB;IAC/B,
|
|
1
|
+
{"version":3,"file":"UITaskPreview.d.ts","sourceRoot":"","sources":["../../src/components/UITaskPreview.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAyCH,OAAO,EAAuB,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAY9E,MAAM,WAAW,kBAAkB;IAC/B,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAMD,eAAO,MAAM,aAAa,0DA8HxB,CAAC"}
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import { ValueTypeOf } from '@elaraai/east';
|
|
1
|
+
import { ValueTypeOf, variant } from '@elaraai/east';
|
|
2
2
|
import { LeverType } from '@elaraai/e3-ui/internal';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Formatters } from '@elaraai/east-ui-components';
|
|
4
|
+
import { ConstraintContract } from './contract.js';
|
|
5
5
|
type LeverValue = ValueTypeOf<typeof LeverType>;
|
|
6
6
|
/** Words for the well-known bounded-op case names. */
|
|
7
7
|
export declare const OP_WORDS: Record<string, string>;
|
|
8
8
|
/**
|
|
9
9
|
* The lever's display words plus the formatted payload. Dispatch is
|
|
10
|
-
* type-directed:
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* type-directed: the contract — walked off the judgements binding, as the
|
|
11
|
+
* lever editor's — gives the payload's East type, and the value's shape is
|
|
12
|
+
* never guessed. Without the contract (its binding not yet registered) the
|
|
13
|
+
* chip names the lever alone.
|
|
14
|
+
*
|
|
15
|
+
* @param constraint - The injected constraint, a value of the contract `C`
|
|
16
|
+
* @param contract - The solution's constraint contract
|
|
17
|
+
* @param levers - The decision's levers, for the display label
|
|
18
|
+
* @param words - The formatters dates and numbers print through (#850); the
|
|
19
|
+
* runtime locale's when omitted
|
|
20
|
+
* @returns The chip's lever, op and value words
|
|
13
21
|
*/
|
|
14
|
-
export declare function formatConstraint(constraint:
|
|
22
|
+
export declare function formatConstraint(constraint: variant<string, unknown>, contract: ConstraintContract | undefined, levers?: readonly LeverValue[], words?: Formatters): {
|
|
15
23
|
lever: string;
|
|
16
24
|
op: string;
|
|
17
25
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constraint-format.d.ts","sourceRoot":"","sources":["../../src/decision/constraint-format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"constraint-format.d.ts","sourceRoot":"","sources":["../../src/decision/constraint-format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;GAYG;AAEH,OAAO,EAMH,KAAK,WAAW,EAChB,KAAK,OAAO,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,KAAK,UAAU,GAAG,WAAW,CAAC,OAAO,SAAS,CAAC,CAAC;AAKhD,sDAAsD;AACtD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW3C,CAAC;AA8CF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAC5B,UAAU,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,QAAQ,EAAE,kBAAkB,GAAG,SAAS,EACxC,MAAM,CAAC,EAAE,SAAS,UAAU,EAAE,EAC9B,KAAK,GAAE,UAAyB,GACjC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAuB9C"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EastTypeValue } from '@elaraai/east';
|
|
2
|
+
import { DecisionHandleRefValue } from './handle-runtime.js';
|
|
3
|
+
/** A solution's constraint contract, as East types. */
|
|
4
|
+
export interface ConstraintContract {
|
|
5
|
+
/** The contract `C` itself — a by-name `VariantType`, perhaps recursive. */
|
|
6
|
+
readonly type: EastTypeValue;
|
|
7
|
+
/** Each of `C`'s cases' payload types, by case name. */
|
|
8
|
+
readonly payloads: ReadonlyMap<string, EastTypeValue>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The constraint contract a judgements dataset's type carries.
|
|
12
|
+
*
|
|
13
|
+
* @param judgementsType - The judgements binding's registered East type, a
|
|
14
|
+
* `Dict<String, JudgementInput<C>>`
|
|
15
|
+
* @returns The contract `C` and its cases' payload types; `undefined` when the
|
|
16
|
+
* type is not a judgements record
|
|
17
|
+
*/
|
|
18
|
+
export declare function constraintContractOf(judgementsType: EastTypeValue): ConstraintContract | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* The constraint contract of a decision handle's judgements binding — what the
|
|
21
|
+
* lever editor and the constraint chips dispatch on.
|
|
22
|
+
*
|
|
23
|
+
* @param ref - The decision handle's binding descriptors
|
|
24
|
+
* @returns The contract; `undefined` until the judgements binding's type is
|
|
25
|
+
* registered
|
|
26
|
+
*/
|
|
27
|
+
export declare function useConstraintContract(ref: DecisionHandleRefValue | null): ConstraintContract | undefined;
|
|
28
|
+
//# sourceMappingURL=contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/decision/contract.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,uDAAuD;AACvD,MAAM,WAAW,kBAAkB;IAC/B,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,wDAAwD;IACxD,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CACzD;AAOD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,aAAa,GAAG,kBAAkB,GAAG,SAAS,CAgBlG;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,sBAAsB,GAAG,IAAI,GAAG,kBAAkB,GAAG,SAAS,CAOxG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseDecisionHandleResult } from './handle-runtime.js';
|
|
2
|
-
import {
|
|
2
|
+
import { ConstraintContract } from './contract.js';
|
|
3
3
|
import { Decision } from './types.js';
|
|
4
4
|
export interface EvidenceFacetProps {
|
|
5
5
|
decision: Decision;
|
|
@@ -7,6 +7,23 @@ export interface EvidenceFacetProps {
|
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
}
|
|
9
9
|
export declare const EvidenceFacet: import('react').NamedExoticComponent<EvidenceFacetProps>;
|
|
10
|
+
export interface RankedOption {
|
|
11
|
+
rank: number;
|
|
12
|
+
label: string;
|
|
13
|
+
value: number;
|
|
14
|
+
downside: number | undefined;
|
|
15
|
+
confidence: number | undefined;
|
|
16
|
+
note: string | undefined;
|
|
17
|
+
recommended: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The Options facet's stack: the recommendation first, then its alternatives,
|
|
21
|
+
* the greater value first — values compared as East compares them.
|
|
22
|
+
*
|
|
23
|
+
* @param d - The decision
|
|
24
|
+
* @returns The ranked options
|
|
25
|
+
*/
|
|
26
|
+
export declare function rankOptions(d: Decision): RankedOption[];
|
|
10
27
|
export interface OptionsFacetProps {
|
|
11
28
|
decision: Decision;
|
|
12
29
|
/** Narrow hosts render the stacked meter-card layout. */
|
|
@@ -16,8 +33,9 @@ export declare const OptionsFacet: import('react').NamedExoticComponent<OptionsF
|
|
|
16
33
|
export interface JudgementFacetProps {
|
|
17
34
|
decision: Decision;
|
|
18
35
|
handle: UseDecisionHandleResult;
|
|
19
|
-
/**
|
|
20
|
-
|
|
36
|
+
/** The solution's constraint contract, walked off the judgements binding;
|
|
37
|
+
* `undefined` until its type is registered. */
|
|
38
|
+
contract: ConstraintContract | undefined;
|
|
21
39
|
}
|
|
22
40
|
export declare const JudgementFacet: import('react').NamedExoticComponent<JudgementFacetProps>;
|
|
23
41
|
//# sourceMappingURL=facets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"facets.d.ts","sourceRoot":"","sources":["../../src/decision/facets.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAuBH,OAAO,KAAK,EAAE,uBAAuB,EAA8B,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"facets.d.ts","sourceRoot":"","sources":["../../src/decision/facets.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAuBH,OAAO,KAAK,EAAE,uBAAuB,EAA8B,MAAM,qBAAqB,CAAC;AAE/F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAc3C,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,eAAO,MAAM,aAAa,0DAkCxB,CAAC;AAMH,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;CACxB;AAID;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,QAAQ,GAAG,YAAY,EAAE,CAsBvD;AAUD,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,EAAE,QAAQ,CAAC;IACnB,yDAAyD;IACzD,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,yDAoFvB,CAAC;AAYH,MAAM,WAAW,mBAAmB;IAChC,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,uBAAuB,CAAC;IAChC;oDACgD;IAChD,QAAQ,EAAE,kBAAkB,GAAG,SAAS,CAAC;CAC5C;AAED,eAAO,MAAM,cAAc,2DA0IzB,CAAC"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { Decision, UrgencyKind } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The queue's order: by urgency (overdue → due → routine), then the nearest
|
|
4
|
+
* deadline first — a row with none after every row with one — then the greater
|
|
5
|
+
* value first. Deadlines and values compare as East compares them, so a `NaN`
|
|
6
|
+
* value takes its one place in East's order rather than scrambling the sort.
|
|
7
|
+
*
|
|
8
|
+
* @param a - A row
|
|
9
|
+
* @param b - Another row
|
|
10
|
+
* @returns Negative when `a` comes first, positive when `b` does, else 0
|
|
11
|
+
*/
|
|
12
|
+
export declare function compareByUrgency(a: Decision, b: Decision): number;
|
|
2
13
|
/** Section labels for the built-in urgency grouping. */
|
|
3
14
|
export declare const URGENCY_GROUP_LABEL: Record<UrgencyKind, string>;
|
|
4
15
|
/** One Group-by toolbar option — a built-in key or a custom accessor facet. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grouping.d.ts","sourceRoot":"","sources":["../../src/decision/grouping.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"grouping.d.ts","sourceRoot":"","sources":["../../src/decision/grouping.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH,OAAO,EAAgB,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAK3E;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,MAAM,CAYjE;AAED,wDAAwD;AACxD,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAI3D,CAAC;AAEF,+EAA+E;AAC/E,MAAM,WAAW,WAAW;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,QAAQ,KAAK,MAAM,CAAC;CACtC;AAED,kCAAkC;AAClC,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,IAAI,EAAE,OAAO,CAAC;CACjB;AAED;;wEAEwE;AACxE,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,WAAW,GAAG,UAAU,EAAE,CA2B/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-runtime.d.ts","sourceRoot":"","sources":["../../src/decision/handle-runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,OAAO,
|
|
1
|
+
{"version":3,"file":"handle-runtime.d.ts","sourceRoot":"","sources":["../../src/decision/handle-runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,OAAO,EAiBH,KAAK,WAAW,EAEnB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,OAAO,EAGH,eAAe,EAEf,kBAAkB,E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c,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,WAAW,GAAG,IAAI,CAAC;IACvD,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,sEAAsE;IACtE,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACjC,kEAAkE;IAClE,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5E,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,iFAAiF;IACjF,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,KAAK,IAAI,CAAC;IAC9D;6BACyB;IACzB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACvD;AAsCD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,sBAAsB,GAAG,IAAI,GAAG,uBAAuB,CAqE7F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journal.d.ts","sourceRoot":"","sources":["../../src/decision/journal.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"journal.d.ts","sourceRoot":"","sources":["../../src/decision/journal.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAO1D,KAAK,oBAAoB,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAwBjF,MAAM,WAAW,8BAA8B;IAC3C,KAAK,EAAE,oBAAoB,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,yBAAyB,sEAwF7B,CAAC;AAIH,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -1,27 +1,20 @@
|
|
|
1
|
+
import { EastTypeValue } from '@elaraai/east';
|
|
1
2
|
import { ConstraintValue } from './handle-runtime.js';
|
|
2
|
-
/** Minimal structural view of an East runtime type object. */
|
|
3
|
-
export interface TypeNode {
|
|
4
|
-
type: string;
|
|
5
|
-
cases?: Record<string, TypeNode>;
|
|
6
|
-
fields?: Record<string, TypeNode>;
|
|
7
|
-
key?: TypeNode;
|
|
8
|
-
value?: TypeNode;
|
|
9
|
-
}
|
|
10
3
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
4
|
+
* Whether the editor can edit a lever's payload: a bare primitive, a struct
|
|
5
|
+
* of primitives, or an op variant whose case payloads are primitives or
|
|
6
|
+
* structs of primitives.
|
|
7
|
+
*
|
|
8
|
+
* @param payload - The contract case's payload type; `undefined` when the
|
|
9
|
+
* contract is not known yet
|
|
10
|
+
* @returns Whether the lever gets an editor
|
|
15
11
|
*/
|
|
16
|
-
export declare function
|
|
17
|
-
/** Editable shapes: bare primitive, struct of primitives, or an op variant
|
|
18
|
-
* whose case payloads are primitives / structs of primitives. */
|
|
19
|
-
export declare function leverPayloadEditable(node: TypeNode | undefined): boolean;
|
|
12
|
+
export declare function leverPayloadEditable(payload: EastTypeValue | undefined): boolean;
|
|
20
13
|
export interface LeverEditorProps {
|
|
21
14
|
/** The contract case name this lever injects. */
|
|
22
15
|
leverCase: string;
|
|
23
|
-
/** The case's payload type,
|
|
24
|
-
payload:
|
|
16
|
+
/** The case's payload type, from the solution's contract. */
|
|
17
|
+
payload: EastTypeValue;
|
|
25
18
|
onInject: (constraint: ConstraintValue) => void;
|
|
26
19
|
}
|
|
27
20
|
export declare function LeverEditor({ leverCase, payload, onInject }: LeverEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lever-editor.d.ts","sourceRoot":"","sources":["../../src/decision/lever-editor.tsx"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"lever-editor.d.ts","sourceRoot":"","sources":["../../src/decision/lever-editor.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAsBH,OAAO,EAAgE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AASjH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAoB3D;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,aAAa,GAAG,SAAS,GAAG,OAAO,CAOhF;AAED,MAAM,WAAW,gBAAgB;IAC7B,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,CAAC,UAAU,EAAE,eAAe,KAAK,IAAI,CAAC;CACnD;AAID,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,gBAAgB,2CA+G7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../src/decision/queue.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AA8BH,OAAO,EAAW,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../src/decision/queue.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AA8BH,OAAO,EAAW,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAsBxD,KAAK,kBAAkB,GAAG,WAAW,CAAC,OAAO,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AAyW7E,MAAM,WAAW,4BAA4B;IACzC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,uBAAuB,oEAuR3B,CAAC;AAIH,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
|
package/dist/diff/format.d.ts
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
import { EastTypeValue } from '@elaraai/east';
|
|
2
|
+
import { TreePath } from '@elaraai/e3-types';
|
|
3
|
+
import { Formatters } from '@elaraai/east-ui-components';
|
|
2
4
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* A leaf's value as the diff's chips show it: East's own text for it
|
|
6
|
+
* ({@link printFor}) — an Integer every digit, a DateTime its exact UTC
|
|
7
|
+
* instant, a String quoted, a variant `.case payload` — and a Float as East
|
|
8
|
+
* prints it in the viewer's decimal separator (#850). Text past
|
|
9
|
+
* {@link MAX_INLINE_CHARS} is cut with `…`, except a String's: a string leaf
|
|
10
|
+
* is the change itself, so it prints whole.
|
|
8
11
|
*
|
|
9
|
-
*
|
|
10
|
-
* `
|
|
12
|
+
* @param leafType - The leaf's East type, as the walker reports it
|
|
13
|
+
* @param value - A value of `leafType` — the side of the change being shown
|
|
14
|
+
* @param words - The formatters a Float prints through; the runtime locale's
|
|
15
|
+
* when omitted
|
|
16
|
+
* @returns The chip's text
|
|
11
17
|
*/
|
|
12
|
-
export declare function formatLeafValue(
|
|
18
|
+
export declare function formatLeafValue(leafType: EastTypeValue, value: unknown, words?: Formatters): string;
|
|
13
19
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
20
|
+
* A binding's label: the name of the last field on its dataset path, or
|
|
21
|
+
* `(root)` for the root.
|
|
22
|
+
*
|
|
23
|
+
* @param path - The binding's dataset path
|
|
24
|
+
* @returns The label
|
|
17
25
|
*/
|
|
18
|
-
export declare function formatBindingLabel(
|
|
26
|
+
export declare function formatBindingLabel(path: TreePath): string;
|
|
19
27
|
//# sourceMappingURL=format.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/diff/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/diff/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AAEH,OAAO,EAAY,KAAK,aAAa,EAAoC,MAAM,eAAe,CAAC;AAC/F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAK1E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,GAAE,UAAyB,GAAG,MAAM,CAIjH;AAOD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAMzD"}
|
package/dist/diff/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/diff/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AA2CH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/diff/index.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AA2CH,OAAO,EAWH,KAAK,WAAW,EAQnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,IAAI,EAAmB,MAAM,yBAAyB,CAAC;AAwBhE,KAAK,SAAS,GAAG,WAAW,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AA62B3D,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,cAAc,2DAgbsC,CAAC;AAM3D,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
package/dist/diff/manual.d.ts
CHANGED
|
@@ -1,25 +1,44 @@
|
|
|
1
|
-
import { EastTypeValue } from '@elaraai/east';
|
|
1
|
+
import { BooleanType, FloatType, IntegerType, DateTimeType, EastTypeValue, StringType, ValueTypeOf } from '@elaraai/east';
|
|
2
|
+
/** The value a Manual resolution carries — a value of one of the leaf types
|
|
3
|
+
* the editor edits inline. */
|
|
4
|
+
export type ManualValue = ValueTypeOf<BooleanType> | ValueTypeOf<IntegerType> | ValueTypeOf<FloatType> | ValueTypeOf<StringType> | ValueTypeOf<DateTimeType>;
|
|
5
|
+
/** A draft, read: its value, or refused. */
|
|
6
|
+
export type ManualDraft = {
|
|
7
|
+
ok: true;
|
|
8
|
+
value: ManualValue;
|
|
9
|
+
} | {
|
|
10
|
+
ok: false;
|
|
11
|
+
};
|
|
2
12
|
/**
|
|
3
|
-
* Whether a leaf type supports inline manual editing in the conflict
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Manual chooser
|
|
13
|
+
* Whether a leaf type supports inline manual editing in the conflict chooser:
|
|
14
|
+
* Boolean, Integer, Float, String and DateTime do. Container leaves
|
|
15
|
+
* (Struct/Array/Dict/Set/Variant/Ref) and the valueless primitives (Null/Blob)
|
|
16
|
+
* don't — the renderer hides the Manual chooser for those.
|
|
17
|
+
*
|
|
18
|
+
* @param leafType - The leaf's East type
|
|
19
|
+
* @returns Whether the Manual chooser shows
|
|
7
20
|
*/
|
|
8
|
-
export declare function isPrimitiveLeafType(
|
|
21
|
+
export declare function isPrimitiveLeafType(leafType: EastTypeValue): boolean;
|
|
9
22
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
23
|
+
* A leaf value as the Manual editor's draft: a Boolean, an Integer or a Float
|
|
24
|
+
* as East prints it, a String as itself, a DateTime as its UTC minute
|
|
25
|
+
* (`YYYY-MM-DDTHH:mm`, what a `datetime-local` input edits).
|
|
26
|
+
*
|
|
27
|
+
* @param leafType - The leaf's East type
|
|
28
|
+
* @param value - A value of `leafType`, or `undefined` when the change leaves
|
|
29
|
+
* none (a delete)
|
|
30
|
+
* @returns The draft — `""` when there is no value to draft, or the type is
|
|
31
|
+
* not one the editor edits
|
|
12
32
|
*/
|
|
13
|
-
export declare function formatManualDraft(leafType: EastTypeValue
|
|
33
|
+
export declare function formatManualDraft(leafType: EastTypeValue, value: unknown): string;
|
|
14
34
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
35
|
+
* Read a draft back as a value of its leaf type, with East's own parsers — an
|
|
36
|
+
* Integer in 64-bit range, a Float, a Boolean, a DateTime in UTC. A refused
|
|
37
|
+
* draft leaves the previous value standing: the renderer fires nothing.
|
|
38
|
+
*
|
|
39
|
+
* @param leafType - The leaf's East type
|
|
40
|
+
* @param draft - The input's text
|
|
41
|
+
* @returns The value, or `{ ok: false }` when the draft is not one
|
|
18
42
|
*/
|
|
19
|
-
export declare function parseManualDraft(leafType: EastTypeValue, draft: string):
|
|
20
|
-
ok: true;
|
|
21
|
-
value: any;
|
|
22
|
-
} | {
|
|
23
|
-
ok: false;
|
|
24
|
-
};
|
|
43
|
+
export declare function parseManualDraft(leafType: EastTypeValue, draft: string): ManualDraft;
|
|
25
44
|
//# sourceMappingURL=manual.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manual.d.ts","sourceRoot":"","sources":["../../src/diff/manual.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"manual.d.ts","sourceRoot":"","sources":["../../src/diff/manual.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EACH,WAAW,EACX,SAAS,EACT,WAAW,EAGX,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,WAAW,EACnB,MAAM,eAAe,CAAC;AAGvB;+BAC+B;AAC/B,MAAM,MAAM,WAAW,GACjB,WAAW,CAAC,WAAW,CAAC,GACxB,WAAW,CAAC,WAAW,CAAC,GACxB,WAAW,CAAC,SAAS,CAAC,GACtB,WAAW,CAAC,UAAU,CAAC,GACvB,WAAW,CAAC,YAAY,CAAC,CAAC;AAEhC,4CAA4C;AAC5C,MAAM,MAAM,WAAW,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAA;CAAE,CAAC;AAU3E;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAWpE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAcjF;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAuBpF"}
|
package/dist/diff/walker.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { EastTypeValue, PatchLeafOp } from '@elaraai/east';
|
|
1
|
+
import { EastTypeValue, PatchLeafOp, PatchVisitor, walkPatch } from '@elaraai/east';
|
|
2
2
|
export type LeafOp = PatchLeafOp;
|
|
3
|
+
/** One leaf as East's walker reports it. */
|
|
4
|
+
type LeafEvent = Parameters<PatchVisitor["leaf"]>[0];
|
|
3
5
|
/** A leaf change — one user-visible before/after pair. */
|
|
4
6
|
export interface LeafNode {
|
|
5
7
|
kind: "leaf";
|
|
@@ -8,9 +10,14 @@ export interface LeafNode {
|
|
|
8
10
|
/** Last segment, for display. */
|
|
9
11
|
label: string;
|
|
10
12
|
op: LeafOp;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
/** The leaf's East type — the walker always knows it. */
|
|
14
|
+
leafType: LeafEvent["type"];
|
|
15
|
+
/** The value before the change, a value of `leafType` — `undefined` for
|
|
16
|
+
* an insert. */
|
|
17
|
+
before: LeafEvent["before"];
|
|
18
|
+
/** The value after the change, a value of `leafType` — `undefined` for a
|
|
19
|
+
* delete. */
|
|
20
|
+
after: LeafEvent["after"];
|
|
14
21
|
/** Set when the patch's expectation at this leaf disagrees with the
|
|
15
22
|
* actual base value (overlay-mode drift). When present, the row should
|
|
16
23
|
* render a warning badge with `actual` so the user can see what the
|
|
@@ -44,9 +51,10 @@ export declare function collectLeaves(node: DiffNode, into?: LeafNode[]): LeafNo
|
|
|
44
51
|
* the patch is unchanged (no events fire).
|
|
45
52
|
*
|
|
46
53
|
* @param typeValue - Runtime EastTypeValue of the value being patched.
|
|
47
|
-
* @param patch - The patch (`PatchTypeOf<T>`).
|
|
54
|
+
* @param patch - The patch (`PatchTypeOf<T>`), as East's walker takes it.
|
|
48
55
|
* @param rootLabel - Display label for the root node (the renderer fills in
|
|
49
56
|
* the binding name here).
|
|
50
57
|
*/
|
|
51
|
-
export declare function walkPatchToTree(typeValue: EastTypeValue, patch:
|
|
58
|
+
export declare function walkPatchToTree(typeValue: EastTypeValue, patch: Parameters<typeof walkPatch>[1], rootLabel: string): DiffNode | null;
|
|
59
|
+
export {};
|
|
52
60
|
//# sourceMappingURL=walker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../src/diff/walker.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"walker.d.ts","sourceRoot":"","sources":["../../src/diff/walker.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;GAgB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;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC3B,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,EACtC,SAAS,EAAE,MAAM,GAClB,QAAQ,GAAG,IAAI,CAsDjB"}
|
|
@@ -33,6 +33,9 @@ export interface AreaRangeProps {
|
|
|
33
33
|
mid: number[];
|
|
34
34
|
hi: number[];
|
|
35
35
|
xTicks?: string[];
|
|
36
|
+
/** The x ticks are words (`none` … `stronger`), not numbers: drawn in the
|
|
37
|
+
* body face. (A localized number cannot be told from a word by its text.) */
|
|
38
|
+
xTickWords?: boolean;
|
|
36
39
|
yTicks?: string[];
|
|
37
40
|
zero?: number;
|
|
38
41
|
tone?: Tone;
|
|
@@ -42,7 +45,7 @@ export interface AreaRangeProps {
|
|
|
42
45
|
yFormat?: 'signed' | 'percent';
|
|
43
46
|
}
|
|
44
47
|
/** Low-high CI ribbon + mid line with hairline axes, optional zero + markers. */
|
|
45
|
-
export declare function AreaRange({ lo, mid, hi, xTicks, yTicks, zero, tone: toneName, marks, height, yFormat }: AreaRangeProps): ReactElement;
|
|
48
|
+
export declare function AreaRange({ lo, mid, hi, xTicks, xTickWords, yTicks, zero, tone: toneName, marks, height, yFormat }: AreaRangeProps): ReactElement;
|
|
46
49
|
export interface OverlapHistogramProps {
|
|
47
50
|
/** Treated-arm propensity histogram (one count/fraction per bin over [0,1]). */
|
|
48
51
|
treated: number[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charts.d.ts","sourceRoot":"","sources":["../../src/experiment/charts.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAyD,KAAK,YAAY,EAAkC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"charts.d.ts","sourceRoot":"","sources":["../../src/experiment/charts.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;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MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iFAAiF;IACjF,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAClC;AAID,iFAAiF;AACjF,wBAAgB,SAAS,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,MAAW,EAAE,UAAkB,EAAE,MAAW,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAU,EAAE,MAAM,EAAE,OAAkB,EAAE,EAAE,cAAc,GAAG,YAAY,CA8EnL;AAMD,MAAM,WAAW,qBAAqB;IAClC,gFAAgF;IAChF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,uDAAuD;IACvD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,qDAAqD;IACrD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sEAAsE;IACtE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,MAAe,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,qBAAqB,GAAG,YAAY,CAoD/I"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ValueTypeOf, option } from '@elaraai/east';
|
|
2
2
|
import { Experiment } from '@elaraai/e3-ui/internal';
|
|
3
|
+
import { Formatters } from '@elaraai/east-ui-components';
|
|
3
4
|
import { HelpId } from './help.js';
|
|
4
5
|
/** The complete, honest experiment result. */
|
|
5
6
|
export type ResultValue = ValueTypeOf<typeof Experiment.Types.Result>;
|
|
@@ -184,8 +185,15 @@ export interface VMJournalRow {
|
|
|
184
185
|
when: string;
|
|
185
186
|
preset: option<string>;
|
|
186
187
|
}
|
|
187
|
-
|
|
188
|
-
|
|
188
|
+
/**
|
|
189
|
+
* A number as the surface speaks it, in the app's locale (#850): a whole number
|
|
190
|
+
* as is, else one decimal. A value that rounds to zero prints unsigned — a
|
|
191
|
+
* `-0.0` is sign-confusing on exactly the degenerate results where clarity
|
|
192
|
+
* matters most.
|
|
193
|
+
*/
|
|
194
|
+
declare const fmt: (x: number, words: Formatters) => string;
|
|
195
|
+
/** A number with its sign — `+5.2`, `-5.2` — except one that rounds to zero (`0.0`). */
|
|
196
|
+
declare const signed: (x: number, words: Formatters) => string;
|
|
189
197
|
declare const cap: (s: string) => string;
|
|
190
198
|
declare const unitOf: (meta: ColMeta | undefined, col: string) => string;
|
|
191
199
|
/** The domain noun for one row (singular + plural) — `record(s)` by default. */
|
|
@@ -220,8 +228,10 @@ export interface ExperimentView {
|
|
|
220
228
|
* @param dataLen - Row count of the bound dataset (for the header label).
|
|
221
229
|
* @param now - "Now" for relative journal timestamps (injected for determinism).
|
|
222
230
|
* @param subject - The domain noun for one row (defaults to `record(s)`).
|
|
231
|
+
* @param words - The formatters every number and date prints through (#850);
|
|
232
|
+
* the runtime locale's when omitted.
|
|
223
233
|
*/
|
|
224
|
-
export declare function deriveView(config: ConfigValue, ranConfig: ConfigValue, cols: Column[], result: ResultValue | null, journal: JournalRowValue[] | null, meta: ColMeta | undefined, dataLen: number, now: Date, subject?: SubjectNouns): ExperimentView;
|
|
234
|
+
export declare function deriveView(config: ConfigValue, ranConfig: ConfigValue, cols: Column[], result: ResultValue | null, journal: JournalRowValue[] | null, meta: ColMeta | undefined, dataLen: number, now: Date, subject?: SubjectNouns, words?: Formatters): ExperimentView;
|
|
225
235
|
/** Decoded `ExperimentDesignType` (the `design` function's result). */
|
|
226
236
|
export type DesignValue = ValueTypeOf<typeof Experiment.Types.Design>;
|
|
227
237
|
export interface VMDesignOption {
|
|
@@ -263,7 +273,17 @@ export interface VMDesign {
|
|
|
263
273
|
/** Effect too faint to size sanely — the head-count is a capped sentinel. */
|
|
264
274
|
faint: boolean;
|
|
265
275
|
}
|
|
266
|
-
/**
|
|
267
|
-
|
|
276
|
+
/**
|
|
277
|
+
* Design value → the "Validate" tab view-model (numbers → recipe + chart).
|
|
278
|
+
*
|
|
279
|
+
* @param d - The design function's result
|
|
280
|
+
* @param result - The experiment result it sizes against, when there is one
|
|
281
|
+
* @param ranConfig - The config that produced `result`
|
|
282
|
+
* @param meta - Optional per-column display metadata
|
|
283
|
+
* @param words - The formatters every number prints through (#850); the
|
|
284
|
+
* runtime locale's when omitted
|
|
285
|
+
* @returns The Validate tab's view-model
|
|
286
|
+
*/
|
|
287
|
+
export declare function deriveDesign(d: DesignValue, result: ResultValue | null, ranConfig: ConfigValue, meta: ColMeta | undefined, words?: Formatters): VMDesign;
|
|
268
288
|
export { fmt, signed, cap, unitOf };
|
|
269
289
|
//# sourceMappingURL=derive.d.ts.map
|