@elaraai/e3-ui 1.0.102 → 1.0.104
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/dist/src/allocation/functions.d.ts +2 -1
- package/dist/src/allocation/functions.d.ts.map +1 -1
- package/dist/src/allocation/functions.js +3 -2
- package/dist/src/allocation/functions.js.map +1 -1
- package/dist/src/allocation/index.d.ts +120 -1
- package/dist/src/allocation/index.d.ts.map +1 -1
- package/dist/src/allocation/index.js +24 -4
- package/dist/src/allocation/index.js.map +1 -1
- package/dist/src/bind/data-indexed.d.ts +25 -4
- package/dist/src/bind/data-indexed.d.ts.map +1 -1
- package/dist/src/bind/data-indexed.js +58 -7
- package/dist/src/bind/data-indexed.js.map +1 -1
- package/dist/src/bind/data.d.ts +12 -14
- package/dist/src/bind/data.d.ts.map +1 -1
- package/dist/src/bind/data.js +11 -11
- package/dist/src/bind/data.js.map +1 -1
- package/dist/src/bind/func.d.ts +7 -2
- package/dist/src/bind/func.d.ts.map +1 -1
- package/dist/src/bind/func.js +10 -3
- package/dist/src/bind/func.js.map +1 -1
- package/dist/src/bind/record.d.ts +6 -6
- package/dist/src/bind/record.d.ts.map +1 -1
- package/dist/src/bind/record.js.map +1 -1
- package/dist/src/calendar/index.d.ts +148 -1
- package/dist/src/calendar/index.d.ts.map +1 -1
- package/dist/src/calendar/index.js +55 -5
- package/dist/src/calendar/index.js.map +1 -1
- package/dist/src/decision/bind.d.ts.map +1 -1
- package/dist/src/decision/index.d.ts +218 -218
- package/dist/src/decision/index.d.ts.map +1 -1
- package/dist/src/decision/types.d.ts.map +1 -1
- package/dist/src/flowchart/canvas.d.ts +32 -14
- package/dist/src/flowchart/canvas.d.ts.map +1 -1
- package/dist/src/flowchart/canvas.js +21 -6
- package/dist/src/flowchart/canvas.js.map +1 -1
- package/dist/src/flowchart/details.d.ts +469 -0
- package/dist/src/flowchart/details.d.ts.map +1 -0
- package/dist/src/flowchart/details.js +1035 -0
- package/dist/src/flowchart/details.js.map +1 -0
- package/dist/src/flowchart/flowchart.d.ts +16 -72
- package/dist/src/flowchart/flowchart.d.ts.map +1 -1
- package/dist/src/flowchart/flowchart.js +10 -1
- package/dist/src/flowchart/flowchart.js.map +1 -1
- package/dist/src/flowchart/index.d.ts +282 -251
- package/dist/src/flowchart/index.d.ts.map +1 -1
- package/dist/src/flowchart/index.js +234 -220
- package/dist/src/flowchart/index.js.map +1 -1
- package/dist/src/flowchart/kinds.d.ts +438 -0
- package/dist/src/flowchart/kinds.d.ts.map +1 -0
- package/dist/src/flowchart/kinds.js +799 -0
- package/dist/src/flowchart/kinds.js.map +1 -0
- package/dist/src/flowchart/library.d.ts +155 -740
- package/dist/src/flowchart/library.d.ts.map +1 -1
- package/dist/src/flowchart/library.js +191 -673
- package/dist/src/flowchart/library.js.map +1 -1
- package/dist/src/flowchart/payload.d.ts +3654 -7845
- package/dist/src/flowchart/payload.d.ts.map +1 -1
- package/dist/src/flowchart/payload.js +331 -469
- package/dist/src/flowchart/payload.js.map +1 -1
- package/dist/src/flowchart/templates.d.ts +657 -0
- package/dist/src/flowchart/templates.d.ts.map +1 -0
- package/dist/src/flowchart/templates.js +658 -0
- package/dist/src/flowchart/templates.js.map +1 -0
- package/dist/src/flowchart/types.d.ts +2258 -214
- package/dist/src/flowchart/types.d.ts.map +1 -1
- package/dist/src/flowchart/types.js +374 -124
- package/dist/src/flowchart/types.js.map +1 -1
- package/dist/src/index.d.ts +13 -15
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +24 -29
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal.d.ts +5 -7
- package/dist/src/internal.d.ts.map +1 -1
- package/dist/src/internal.js +12 -19
- package/dist/src/internal.js.map +1 -1
- package/dist/src/ontology/index.d.ts +44 -15
- package/dist/src/ontology/index.d.ts.map +1 -1
- package/dist/src/ontology/index.js +19 -11
- package/dist/src/ontology/index.js.map +1 -1
- package/dist/src/plan/builders.d.ts +26 -26
- package/dist/src/plan/builders.d.ts.map +1 -1
- package/dist/src/plan/builders.js.map +1 -1
- package/dist/src/plan/event-rows.d.ts +59 -58
- package/dist/src/plan/event-rows.d.ts.map +1 -1
- package/dist/src/plan/event-rows.js +6 -4
- package/dist/src/plan/event-rows.js.map +1 -1
- package/dist/src/plan/factories.js.map +1 -1
- package/dist/src/plan/ir.d.ts +1 -0
- package/dist/src/plan/ir.d.ts.map +1 -1
- package/dist/src/plan/library.d.ts.map +1 -1
- package/dist/src/plan/nested-checks.js.map +1 -1
- package/dist/src/plan/plan.d.ts +567 -423
- package/dist/src/plan/plan.d.ts.map +1 -1
- package/dist/src/plan/plan.js +67 -3
- package/dist/src/plan/plan.js.map +1 -1
- package/dist/src/plan/series.d.ts.map +1 -1
- package/dist/src/plan/series.js.map +1 -1
- package/dist/src/plan/types.d.ts +173 -172
- package/dist/src/plan/types.d.ts.map +1 -1
- package/dist/src/query/builder.d.ts +368 -321
- package/dist/src/query/builder.d.ts.map +1 -1
- package/dist/src/query/builder.js +12 -1
- package/dist/src/query/builder.js.map +1 -1
- package/dist/src/query/index.d.ts +5 -1
- package/dist/src/query/index.d.ts.map +1 -1
- package/dist/src/query/index.js +3 -1
- package/dist/src/query/index.js.map +1 -1
- package/dist/src/query/library.d.ts +6 -6
- package/dist/src/query/queries.d.ts +3 -3
- package/dist/src/roster/fit.d.ts +5 -2
- package/dist/src/roster/fit.d.ts.map +1 -1
- package/dist/src/roster/fit.js +5 -3
- package/dist/src/roster/fit.js.map +1 -1
- package/dist/src/roster/index.d.ts +103 -2
- package/dist/src/roster/index.d.ts.map +1 -1
- package/dist/src/roster/index.js +45 -6
- package/dist/src/roster/index.js.map +1 -1
- package/dist/src/runtime/index.d.ts +1 -3
- package/dist/src/runtime/index.d.ts.map +1 -1
- package/dist/src/runtime/index.js +1 -3
- package/dist/src/runtime/index.js.map +1 -1
- package/dist/src/schedule/fields.js.map +1 -1
- package/dist/src/schedule/library.js.map +1 -1
- package/dist/src/schedule/record-window.d.ts +27 -26
- package/dist/src/schedule/record-window.d.ts.map +1 -1
- package/dist/src/schedule/types.d.ts +196 -196
- package/dist/src/schematic/index.d.ts +1 -1
- package/dist/src/schematic/index.d.ts.map +1 -1
- package/dist/src/schematic/index.js +1 -1
- package/dist/src/schematic/index.js.map +1 -1
- package/dist/src/schematic/kinds.d.ts +4 -24
- package/dist/src/schematic/kinds.d.ts.map +1 -1
- package/dist/src/schematic/kinds.js +8 -212
- package/dist/src/schematic/kinds.js.map +1 -1
- package/dist/src/schematic/library.d.ts.map +1 -1
- package/dist/src/schematic/payload.d.ts +1688 -1549
- package/dist/src/schematic/payload.d.ts.map +1 -1
- package/dist/src/schematic/payload.js +38 -1
- package/dist/src/schematic/payload.js.map +1 -1
- package/dist/src/schematic/shapes.d.ts.map +1 -1
- package/dist/src/schematic/types.d.ts +978 -978
- package/dist/src/schematic/types.d.ts.map +1 -1
- package/dist/src/schematic/types.js +4 -36
- package/dist/src/schematic/types.js.map +1 -1
- package/dist/src/schematic/window.d.ts +9 -42
- package/dist/src/schematic/window.d.ts.map +1 -1
- package/dist/src/schematic/window.js +10 -115
- package/dist/src/schematic/window.js.map +1 -1
- package/dist/src/sheet/actions.d.ts +388 -0
- package/dist/src/sheet/actions.d.ts.map +1 -0
- package/dist/src/sheet/actions.js +594 -0
- package/dist/src/sheet/actions.js.map +1 -0
- package/dist/src/sheet/bridge.d.ts +12 -1
- package/dist/src/sheet/bridge.d.ts.map +1 -1
- package/dist/src/sheet/bridge.js +30 -6
- package/dist/src/sheet/bridge.js.map +1 -1
- package/dist/src/sheet/columns.d.ts +5 -2
- package/dist/src/sheet/columns.d.ts.map +1 -1
- package/dist/src/sheet/columns.js.map +1 -1
- package/dist/src/sheet/draft-bridge.d.ts +9 -4
- package/dist/src/sheet/draft-bridge.d.ts.map +1 -1
- package/dist/src/sheet/draft-bridge.js +22 -7
- package/dist/src/sheet/draft-bridge.js.map +1 -1
- package/dist/src/sheet/editing-types.d.ts +71 -71
- package/dist/src/sheet/fields.d.ts +13 -0
- package/dist/src/sheet/fields.d.ts.map +1 -1
- package/dist/src/sheet/fields.js +3 -0
- package/dist/src/sheet/fields.js.map +1 -1
- package/dist/src/sheet/group.js.map +1 -1
- package/dist/src/sheet/index.d.ts +32 -2
- package/dist/src/sheet/index.d.ts.map +1 -1
- package/dist/src/sheet/index.js +18 -3
- package/dist/src/sheet/index.js.map +1 -1
- package/dist/src/sheet/library.d.ts +8 -0
- package/dist/src/sheet/library.d.ts.map +1 -1
- package/dist/src/sheet/library.js.map +1 -1
- package/dist/src/sheet/link.d.ts.map +1 -1
- package/dist/src/sheet/record.js.map +1 -1
- package/dist/src/sheet/root.d.ts +23 -1
- package/dist/src/sheet/root.d.ts.map +1 -1
- package/dist/src/sheet/root.js +40 -5
- package/dist/src/sheet/root.js.map +1 -1
- package/dist/src/sheet/sheet.d.ts +9332 -5621
- package/dist/src/sheet/sheet.d.ts.map +1 -1
- package/dist/src/sheet/sheet.js +41 -2
- package/dist/src/sheet/sheet.js.map +1 -1
- package/dist/src/sheet/templates.d.ts +4 -0
- package/dist/src/sheet/templates.d.ts.map +1 -1
- package/dist/src/sheet/types.d.ts +13020 -5839
- package/dist/src/sheet/types.d.ts.map +1 -1
- package/dist/src/sheet/types.js +114 -2
- package/dist/src/sheet/types.js.map +1 -1
- package/dist/src/studio/builder.d.ts +6 -6
- package/dist/src/studio/library.d.ts +9 -9
- package/dist/src/studio/pages.d.ts +6 -6
- package/dist/src/studio/publish.d.ts +3 -3
- package/dist/src/utils/derive.d.ts +1 -1
- package/dist/src/utils/derive.js +1 -1
- package/dist/src/utils/derive.js.map +1 -1
- package/dist/src/utils/key-visibility.d.ts +1 -1
- package/dist/src/utils/record-kind.d.ts +625 -0
- package/dist/src/utils/record-kind.d.ts.map +1 -0
- package/dist/src/utils/record-kind.js +450 -0
- package/dist/src/utils/record-kind.js.map +1 -0
- package/dist/src/utils/views.d.ts +55 -0
- package/dist/src/utils/views.d.ts.map +1 -0
- package/dist/src/utils/views.js +72 -0
- package/dist/src/utils/views.js.map +1 -0
- package/dist/src/utils/vocabulary.d.ts +48 -0
- package/dist/src/utils/vocabulary.d.ts.map +1 -0
- package/dist/src/utils/vocabulary.js +47 -0
- package/dist/src/utils/vocabulary.js.map +1 -0
- package/dist/test/allocation/allocation.examples.d.ts +3 -1
- package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
- package/dist/test/allocation/allocation.examples.js +81 -2
- package/dist/test/allocation/allocation.examples.js.map +1 -1
- package/dist/test/bind/data/data.examples.d.ts +1 -1
- package/dist/test/bind/func/func.examples.d.ts +19 -1
- package/dist/test/bind/func/func.examples.d.ts.map +1 -1
- package/dist/test/bind/func/func.examples.js +36 -1
- package/dist/test/bind/func/func.examples.js.map +1 -1
- package/dist/test/calendar/calendar.examples.d.ts +2 -0
- package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
- package/dist/test/calendar/calendar.examples.js +80 -2
- package/dist/test/calendar/calendar.examples.js.map +1 -1
- package/dist/test/decision/queue.examples.d.ts +1 -0
- package/dist/test/decision/queue.examples.d.ts.map +1 -1
- package/dist/test/decision/queue.examples.js +12 -0
- package/dist/test/decision/queue.examples.js.map +1 -1
- package/dist/test/examples-package.d.ts.map +1 -1
- package/dist/test/examples-package.js +5 -4
- package/dist/test/examples-package.js.map +1 -1
- package/dist/test/flowchart/flowchart.examples.d.ts +1250 -4605
- package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
- package/dist/test/flowchart/flowchart.examples.js +861 -512
- package/dist/test/flowchart/flowchart.examples.js.map +1 -1
- package/dist/test/ontology/ontology.examples.d.ts +2 -3
- package/dist/test/ontology/ontology.examples.d.ts.map +1 -1
- package/dist/test/ontology/ontology.examples.js +32 -21
- package/dist/test/ontology/ontology.examples.js.map +1 -1
- package/dist/test/plan/plan-events.examples.d.ts +1 -0
- package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-events.examples.js +44 -0
- package/dist/test/plan/plan-events.examples.js.map +1 -1
- package/dist/test/plan/plan-nested.examples.d.ts +15 -15
- package/dist/test/plan/plan-nested.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-nested.examples.js +5 -5
- package/dist/test/plan/plan-nested.examples.js.map +1 -1
- package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
- package/dist/test/plan/plan-records.examples.js +1 -1
- package/dist/test/plan/plan-records.examples.js.map +1 -1
- package/dist/test/plan/plan.examples.js.map +1 -1
- package/dist/test/query/query.examples.d.ts +2 -0
- package/dist/test/query/query.examples.d.ts.map +1 -1
- package/dist/test/query/query.examples.js +37 -1
- package/dist/test/query/query.examples.js.map +1 -1
- package/dist/test/roster/domain.examples.d.ts.map +1 -1
- package/dist/test/roster/roster.examples.d.ts +2 -0
- package/dist/test/roster/roster.examples.d.ts.map +1 -1
- package/dist/test/roster/roster.examples.js +76 -15
- package/dist/test/roster/roster.examples.js.map +1 -1
- package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic-records.examples.js +6 -4
- package/dist/test/schematic/schematic-records.examples.js.map +1 -1
- package/dist/test/schematic/schematic.examples.d.ts +1 -0
- package/dist/test/schematic/schematic.examples.d.ts.map +1 -1
- package/dist/test/schematic/schematic.examples.js +144 -0
- package/dist/test/schematic/schematic.examples.js.map +1 -1
- package/dist/test/sheet/sheet-actions.examples.d.ts +1264 -0
- package/dist/test/sheet/sheet-actions.examples.d.ts.map +1 -0
- package/dist/test/sheet/sheet-actions.examples.js +394 -0
- package/dist/test/sheet/sheet-actions.examples.js.map +1 -0
- package/dist/test/sheet/sheet-records.examples.d.ts +1 -1
- package/dist/test/sheet/sheet.examples.d.ts +1 -0
- package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
- package/dist/test/sheet/sheet.examples.js +77 -0
- package/dist/test/sheet/sheet.examples.js.map +1 -1
- package/dist/test/studio/studio.examples.d.ts +1 -0
- package/dist/test/studio/studio.examples.d.ts.map +1 -1
- package/dist/test/studio/studio.examples.js +18 -8
- package/dist/test/studio/studio.examples.js.map +1 -1
- package/package.json +14 -13
- package/dist/src/diff/index.d.ts +0 -407
- package/dist/src/diff/index.d.ts.map +0 -1
- package/dist/src/diff/index.js +0 -203
- package/dist/src/diff/index.js.map +0 -1
- package/dist/src/experiment/index.d.ts +0 -1033
- package/dist/src/experiment/index.d.ts.map +0 -1
- package/dist/src/experiment/index.js +0 -197
- package/dist/src/experiment/index.js.map +0 -1
- package/dist/src/experiment/types.d.ts +0 -1093
- package/dist/src/experiment/types.d.ts.map +0 -1
- package/dist/src/experiment/types.js +0 -423
- package/dist/src/experiment/types.js.map +0 -1
- package/dist/src/flowchart/over.d.ts +0 -227
- package/dist/src/flowchart/over.d.ts.map +0 -1
- package/dist/src/flowchart/over.js +0 -213
- package/dist/src/flowchart/over.js.map +0 -1
- package/dist/src/flowchart/patch.d.ts +0 -64
- package/dist/src/flowchart/patch.d.ts.map +0 -1
- package/dist/src/flowchart/patch.js +0 -67
- package/dist/src/flowchart/patch.js.map +0 -1
- package/dist/src/flowchart/values.d.ts +0 -271
- package/dist/src/flowchart/values.d.ts.map +0 -1
- package/dist/src/flowchart/values.js +0 -220
- package/dist/src/flowchart/values.js.map +0 -1
- package/dist/src/flowchart/window.d.ts +0 -306
- package/dist/src/flowchart/window.d.ts.map +0 -1
- package/dist/src/flowchart/window.js +0 -63
- package/dist/src/flowchart/window.js.map +0 -1
- package/dist/src/runtime/diff.d.ts +0 -36
- package/dist/src/runtime/diff.d.ts.map +0 -1
- package/dist/src/runtime/diff.js +0 -34
- package/dist/src/runtime/diff.js.map +0 -1
- package/dist/src/runtime/experiment.d.ts +0 -48
- package/dist/src/runtime/experiment.d.ts.map +0 -1
- package/dist/src/runtime/experiment.js +0 -10
- package/dist/src/runtime/experiment.js.map +0 -1
- package/dist/test/diff/diff.examples.d.ts +0 -313
- package/dist/test/diff/diff.examples.d.ts.map +0 -1
- package/dist/test/diff/diff.examples.js +0 -452
- package/dist/test/diff/diff.examples.js.map +0 -1
- package/dist/test/experiment/experiment.examples.d.ts +0 -1512
- package/dist/test/experiment/experiment.examples.d.ts.map +0 -1
- package/dist/test/experiment/experiment.examples.js +0 -609
- package/dist/test/experiment/experiment.examples.js.map +0 -1
package/dist/src/diff/index.d.ts
DELETED
|
@@ -1,407 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
-
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Diff component — transactional review of pending changes for any
|
|
7
|
-
* combination of {@link Data.bind} bindings.
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* The Diff card surfaces the in-flight change for each binding the caller
|
|
11
|
-
* lists in `bindings`. Per-leaf Discard, per-group Discard-all, and a
|
|
12
|
-
* footer Apply button drive the binding's commit flow. Conflicts surface
|
|
13
|
-
* inline as orange chooser rows (staged-mode 3-way drift) and as orange
|
|
14
|
-
* "stale" warning badges (drift between a patch dataset's expectations
|
|
15
|
-
* and the current source).
|
|
16
|
-
*
|
|
17
|
-
* Declared via the `EastUI.component` extension API — the React renderer
|
|
18
|
-
* lives in `@elaraai/e3-ui-components` and is wired via
|
|
19
|
-
* `implementUIComponent(DiffComponent, EastChakraDiff)` at module load
|
|
20
|
-
* time.
|
|
21
|
-
*
|
|
22
|
-
* @packageDocumentation
|
|
23
|
-
*/
|
|
24
|
-
import { StringType, BooleanType, NullType, IntegerType, StructType, OptionType, ArrayType, FunctionType, type ExprType, type SubtypeExprOrValue } from "@elaraai/east";
|
|
25
|
-
import { DensityType, type DensityLiteral, type UIComponentType } from "@elaraai/east-ui";
|
|
26
|
-
import { DiffBindingType } from "../bind/data.js";
|
|
27
|
-
/**
|
|
28
|
-
* Visual style escape hatches for the Diff component. Every visible surface
|
|
29
|
-
* is tokenable; defaults come from the host's Chakra theme (Elara AI brand).
|
|
30
|
-
*
|
|
31
|
-
* @property addedBackground - Soft-tint background for added / inserted leaves.
|
|
32
|
-
* @property addedColor - Foreground for added leaves.
|
|
33
|
-
* @property addedBorderColor - Border for added chips.
|
|
34
|
-
* @property removedBackground - Soft-tint background for removed / deleted leaves.
|
|
35
|
-
* @property removedColor - Foreground for removed leaves.
|
|
36
|
-
* @property removedBorderColor - Border for removed chips.
|
|
37
|
-
* @property changedBackground - Soft-tint background for updated leaves.
|
|
38
|
-
* @property changedColor - Foreground for updated leaves.
|
|
39
|
-
* @property changedBorderColor - Border for updated chips.
|
|
40
|
-
* @property unchangedColor - Foreground for unchanged rows when shown.
|
|
41
|
-
* @property acceptedBackground - Lane background for accepted-row indicator.
|
|
42
|
-
* @property acceptedBorderColor - Left-edge accent stripe for accepted rows.
|
|
43
|
-
* @property rejectedBackground - Lane background for rejected rows.
|
|
44
|
-
* @property rejectedBorderColor - Border for rejected rows.
|
|
45
|
-
* @property headerBackground - Card header background.
|
|
46
|
-
* @property summaryBackground - Stats bar background.
|
|
47
|
-
* @property background - Card body background.
|
|
48
|
-
* @property borderColor - Card outer border.
|
|
49
|
-
* @property indentGuideColor - Vertical guide line for nested rows.
|
|
50
|
-
* @property lineNumberColor - Gutter line numbers in unified mode.
|
|
51
|
-
*/
|
|
52
|
-
export declare const DiffStyleType: StructType<{
|
|
53
|
-
readonly addedBackground: OptionType<StringType>;
|
|
54
|
-
readonly addedColor: OptionType<StringType>;
|
|
55
|
-
readonly addedBorderColor: OptionType<StringType>;
|
|
56
|
-
readonly removedBackground: OptionType<StringType>;
|
|
57
|
-
readonly removedColor: OptionType<StringType>;
|
|
58
|
-
readonly removedBorderColor: OptionType<StringType>;
|
|
59
|
-
readonly changedBackground: OptionType<StringType>;
|
|
60
|
-
readonly changedColor: OptionType<StringType>;
|
|
61
|
-
readonly changedBorderColor: OptionType<StringType>;
|
|
62
|
-
readonly unchangedColor: OptionType<StringType>;
|
|
63
|
-
readonly acceptedBackground: OptionType<StringType>;
|
|
64
|
-
readonly acceptedBorderColor: OptionType<StringType>;
|
|
65
|
-
readonly rejectedBackground: OptionType<StringType>;
|
|
66
|
-
readonly rejectedBorderColor: OptionType<StringType>;
|
|
67
|
-
readonly headerBackground: OptionType<StringType>;
|
|
68
|
-
readonly summaryBackground: OptionType<StringType>;
|
|
69
|
-
readonly background: OptionType<StringType>;
|
|
70
|
-
readonly borderColor: OptionType<StringType>;
|
|
71
|
-
readonly indentGuideColor: OptionType<StringType>;
|
|
72
|
-
readonly lineNumberColor: OptionType<StringType>;
|
|
73
|
-
}>;
|
|
74
|
-
/** Type alias for {@link DiffStyleType}. */
|
|
75
|
-
export type DiffStyleType = typeof DiffStyleType;
|
|
76
|
-
export { DiffBindingType } from "../bind/data.js";
|
|
77
|
-
/**
|
|
78
|
-
* Schema for the `Diff` extension component. Internal IR shape — the
|
|
79
|
-
* developer-facing factory `Diff.Root` accepts {@link DataBindHandleType}
|
|
80
|
-
* descriptors and forwards them as `bindings`.
|
|
81
|
-
*
|
|
82
|
-
* @property bindings - The set of bindings to surface in the card. Each
|
|
83
|
-
* entry is a {@link DiffBindingType} value (typically obtained via the
|
|
84
|
-
* `binding` field of a {@link Data.bind} handle).
|
|
85
|
-
* @property readonly - Render the Diff without per-leaf or per-group Discard
|
|
86
|
-
* buttons. The footer Apply / Discard-all still render. Default `false`
|
|
87
|
-
* (interactive review).
|
|
88
|
-
* @property hideUnchanged - Elide unchanged rows. None ⇒ false.
|
|
89
|
-
* @property maxDepth - Cap nesting depth before "Show more" collapses. None ⇒ no cap.
|
|
90
|
-
* @property density - Information-density preset (`comfortable` | `compact`
|
|
91
|
-
* | `condensed`). Defaults to `comfortable`.
|
|
92
|
-
* @property onCommitted - Fired after a successful commit (post-merge).
|
|
93
|
-
* @property onDiscarded - Fired after a successful discard.
|
|
94
|
-
* @property style - Visual style escape hatches.
|
|
95
|
-
*/
|
|
96
|
-
export declare const DiffPayloadType: StructType<{
|
|
97
|
-
readonly bindings: ArrayType<StructType<{
|
|
98
|
-
readonly source: ArrayType<import("@elaraai/east").VariantType<{
|
|
99
|
-
readonly field: StringType;
|
|
100
|
-
}>>;
|
|
101
|
-
readonly patch: OptionType<ArrayType<import("@elaraai/east").VariantType<{
|
|
102
|
-
readonly field: StringType;
|
|
103
|
-
}>>>;
|
|
104
|
-
readonly mode: import("@elaraai/east").VariantType<{
|
|
105
|
-
readonly staged: NullType;
|
|
106
|
-
readonly direct: NullType;
|
|
107
|
-
}>;
|
|
108
|
-
}>>;
|
|
109
|
-
readonly readonly: OptionType<BooleanType>;
|
|
110
|
-
readonly hideUnchanged: OptionType<BooleanType>;
|
|
111
|
-
readonly maxDepth: OptionType<IntegerType>;
|
|
112
|
-
readonly density: OptionType<import("@elaraai/east").VariantType<{
|
|
113
|
-
readonly comfortable: NullType;
|
|
114
|
-
readonly compact: NullType;
|
|
115
|
-
readonly condensed: NullType;
|
|
116
|
-
}>>;
|
|
117
|
-
readonly onCommitted: OptionType<FunctionType<[], NullType>>;
|
|
118
|
-
readonly onDiscarded: OptionType<FunctionType<[], NullType>>;
|
|
119
|
-
readonly style: OptionType<StructType<{
|
|
120
|
-
readonly addedBackground: OptionType<StringType>;
|
|
121
|
-
readonly addedColor: OptionType<StringType>;
|
|
122
|
-
readonly addedBorderColor: OptionType<StringType>;
|
|
123
|
-
readonly removedBackground: OptionType<StringType>;
|
|
124
|
-
readonly removedColor: OptionType<StringType>;
|
|
125
|
-
readonly removedBorderColor: OptionType<StringType>;
|
|
126
|
-
readonly changedBackground: OptionType<StringType>;
|
|
127
|
-
readonly changedColor: OptionType<StringType>;
|
|
128
|
-
readonly changedBorderColor: OptionType<StringType>;
|
|
129
|
-
readonly unchangedColor: OptionType<StringType>;
|
|
130
|
-
readonly acceptedBackground: OptionType<StringType>;
|
|
131
|
-
readonly acceptedBorderColor: OptionType<StringType>;
|
|
132
|
-
readonly rejectedBackground: OptionType<StringType>;
|
|
133
|
-
readonly rejectedBorderColor: OptionType<StringType>;
|
|
134
|
-
readonly headerBackground: OptionType<StringType>;
|
|
135
|
-
readonly summaryBackground: OptionType<StringType>;
|
|
136
|
-
readonly background: OptionType<StringType>;
|
|
137
|
-
readonly borderColor: OptionType<StringType>;
|
|
138
|
-
readonly indentGuideColor: OptionType<StringType>;
|
|
139
|
-
readonly lineNumberColor: OptionType<StringType>;
|
|
140
|
-
}>>;
|
|
141
|
-
}>;
|
|
142
|
-
/** Type alias for {@link DiffPayloadType}. */
|
|
143
|
-
export type DiffPayloadType = typeof DiffPayloadType;
|
|
144
|
-
/**
|
|
145
|
-
* Internal `EastUI.component` carrier. Renderers register against this in
|
|
146
|
-
* `@elaraai/e3-ui-components`. Most callers should use {@link Diff.Root}
|
|
147
|
-
* (which wraps this with the handle-friendly API) rather than touching
|
|
148
|
-
* `DiffComponent` directly.
|
|
149
|
-
*/
|
|
150
|
-
export declare const DiffComponent: import("@elaraai/east-ui").UIComponentDef<StructType<{
|
|
151
|
-
readonly bindings: ArrayType<StructType<{
|
|
152
|
-
readonly source: ArrayType<import("@elaraai/east").VariantType<{
|
|
153
|
-
readonly field: StringType;
|
|
154
|
-
}>>;
|
|
155
|
-
readonly patch: OptionType<ArrayType<import("@elaraai/east").VariantType<{
|
|
156
|
-
readonly field: StringType;
|
|
157
|
-
}>>>;
|
|
158
|
-
readonly mode: import("@elaraai/east").VariantType<{
|
|
159
|
-
readonly staged: NullType;
|
|
160
|
-
readonly direct: NullType;
|
|
161
|
-
}>;
|
|
162
|
-
}>>;
|
|
163
|
-
readonly readonly: OptionType<BooleanType>;
|
|
164
|
-
readonly hideUnchanged: OptionType<BooleanType>;
|
|
165
|
-
readonly maxDepth: OptionType<IntegerType>;
|
|
166
|
-
readonly density: OptionType<import("@elaraai/east").VariantType<{
|
|
167
|
-
readonly comfortable: NullType;
|
|
168
|
-
readonly compact: NullType;
|
|
169
|
-
readonly condensed: NullType;
|
|
170
|
-
}>>;
|
|
171
|
-
readonly onCommitted: OptionType<FunctionType<[], NullType>>;
|
|
172
|
-
readonly onDiscarded: OptionType<FunctionType<[], NullType>>;
|
|
173
|
-
readonly style: OptionType<StructType<{
|
|
174
|
-
readonly addedBackground: OptionType<StringType>;
|
|
175
|
-
readonly addedColor: OptionType<StringType>;
|
|
176
|
-
readonly addedBorderColor: OptionType<StringType>;
|
|
177
|
-
readonly removedBackground: OptionType<StringType>;
|
|
178
|
-
readonly removedColor: OptionType<StringType>;
|
|
179
|
-
readonly removedBorderColor: OptionType<StringType>;
|
|
180
|
-
readonly changedBackground: OptionType<StringType>;
|
|
181
|
-
readonly changedColor: OptionType<StringType>;
|
|
182
|
-
readonly changedBorderColor: OptionType<StringType>;
|
|
183
|
-
readonly unchangedColor: OptionType<StringType>;
|
|
184
|
-
readonly acceptedBackground: OptionType<StringType>;
|
|
185
|
-
readonly acceptedBorderColor: OptionType<StringType>;
|
|
186
|
-
readonly rejectedBackground: OptionType<StringType>;
|
|
187
|
-
readonly rejectedBorderColor: OptionType<StringType>;
|
|
188
|
-
readonly headerBackground: OptionType<StringType>;
|
|
189
|
-
readonly summaryBackground: OptionType<StringType>;
|
|
190
|
-
readonly background: OptionType<StringType>;
|
|
191
|
-
readonly borderColor: OptionType<StringType>;
|
|
192
|
-
readonly indentGuideColor: OptionType<StringType>;
|
|
193
|
-
readonly lineNumberColor: OptionType<StringType>;
|
|
194
|
-
}>>;
|
|
195
|
-
}>>;
|
|
196
|
-
/**
|
|
197
|
-
* Options for {@link Diff.Root}.
|
|
198
|
-
*
|
|
199
|
-
* @property bindings - The set of bindings to surface. Pass `view.binding`
|
|
200
|
-
* from each {@link Data.bind} handle, or hand-build descriptors of shape
|
|
201
|
-
* {@link DiffBindingType}.
|
|
202
|
-
* @property readonly - Render without per-leaf / per-group Discard buttons.
|
|
203
|
-
* The footer Apply / Discard-all still render. Defaults to false.
|
|
204
|
-
* @property hideUnchanged - Elide unchanged rows. Defaults to false.
|
|
205
|
-
* @property maxDepth - Cap nesting depth. Defaults to no cap.
|
|
206
|
-
* @property density - Information-density preset (`comfortable` | `compact`
|
|
207
|
-
* | `condensed`). Defaults to `comfortable`.
|
|
208
|
-
* @property onCommitted - Fired after the user commits.
|
|
209
|
-
* @property onDiscarded - Fired after the user discards.
|
|
210
|
-
* @property style - Visual style escape hatches.
|
|
211
|
-
*/
|
|
212
|
-
export interface DiffOptions {
|
|
213
|
-
/** Bindings to surface. Typically `[view.binding, ...]`. */
|
|
214
|
-
bindings: SubtypeExprOrValue<ArrayType<DiffBindingType>>;
|
|
215
|
-
/** Render without per-leaf / per-group Discard buttons. Defaults to false (interactive). */
|
|
216
|
-
readonly?: SubtypeExprOrValue<OptionType<BooleanType>>;
|
|
217
|
-
/** Elide unchanged rows. Defaults to false. */
|
|
218
|
-
hideUnchanged?: SubtypeExprOrValue<OptionType<BooleanType>>;
|
|
219
|
-
/** Cap nesting depth before "Show more" collapses. Defaults to no cap. */
|
|
220
|
-
maxDepth?: SubtypeExprOrValue<OptionType<IntegerType>>;
|
|
221
|
-
/** Information-density preset. */
|
|
222
|
-
density?: SubtypeExprOrValue<OptionType<DensityType>> | DensityLiteral;
|
|
223
|
-
/** Fired after a successful commit (post-merge). */
|
|
224
|
-
onCommitted?: SubtypeExprOrValue<OptionType<FunctionType<[], NullType>>>;
|
|
225
|
-
/** Fired after a successful discard. */
|
|
226
|
-
onDiscarded?: SubtypeExprOrValue<OptionType<FunctionType<[], NullType>>>;
|
|
227
|
-
/** Visual style escape hatches — see {@link DiffStyleType}. */
|
|
228
|
-
style?: SubtypeExprOrValue<OptionType<DiffStyleType>>;
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* The Diff component namespace. Surfaces transactional pending edits for
|
|
232
|
-
* review and commit, with merge-aware conflict resolution and stale-patch
|
|
233
|
-
* drift detection.
|
|
234
|
-
*
|
|
235
|
-
* @remarks
|
|
236
|
-
* Use `Diff.Root({ bindings: [view.binding, ...] })` to render the panel.
|
|
237
|
-
* The `Component` property is the internal {@link EastUI.component}
|
|
238
|
-
* carrier that renderers register against — most callers shouldn't need
|
|
239
|
-
* it.
|
|
240
|
-
*/
|
|
241
|
-
export declare const Diff: {
|
|
242
|
-
/**
|
|
243
|
-
* Build a Diff component. Surfaces every binding's in-flight change in
|
|
244
|
-
* a single review card, with per-leaf accept / reject and a footer
|
|
245
|
-
* Apply that runs the right commit per binding.
|
|
246
|
-
*
|
|
247
|
-
* @param options - {@link DiffOptions}. Only `bindings` is required;
|
|
248
|
-
* the rest default to absent / interactive.
|
|
249
|
-
* @returns An East expression of {@link UIComponentType} representing
|
|
250
|
-
* the Diff panel.
|
|
251
|
-
*
|
|
252
|
-
* @remarks
|
|
253
|
-
* The renderer reads each binding's IR descriptor (`source`, optional
|
|
254
|
-
* `patch`, `mode`), looks up the runtime types in the binding
|
|
255
|
-
* registry, and derives the in-flight change to display. Apply's
|
|
256
|
-
* commit code path depends on the binding's mode and patch presence —
|
|
257
|
-
* staged + no patch applies the buffer to source; staged + patch
|
|
258
|
-
* publishes the buffer as a fresh patch to the patch dataset; direct
|
|
259
|
-
* + patch applies the existing patch dataset to the source. Discard
|
|
260
|
-
* always drops the in-flight change in place.
|
|
261
|
-
*
|
|
262
|
-
* @example
|
|
263
|
-
* ```ts
|
|
264
|
-
* import { East, FloatType, variant } from "@elaraai/east";
|
|
265
|
-
* import { Reactive, UIComponentType } from "@elaraai/east-ui";
|
|
266
|
-
* import { Data, Diff } from "@elaraai/e3-ui";
|
|
267
|
-
* import * as e3 from "@elaraai/e3";
|
|
268
|
-
*
|
|
269
|
-
* const maxWeeklyHoursInput = e3.input("max_weekly_hours", FloatType, variant("value", 38.0));
|
|
270
|
-
*
|
|
271
|
-
* // Mirrors `diffDefaults` in test/diff.examples.ts (wired via Assert.examples).
|
|
272
|
-
* const diffDefaults = East.function([], UIComponentType, _$ => {
|
|
273
|
-
* return Reactive.Root(East.function([], UIComponentType, $ => {
|
|
274
|
-
* const view = $.let(Data.bind(maxWeeklyHoursInput, { mode: "staged" }));
|
|
275
|
-
* return Diff.Root({ bindings: [view.binding] });
|
|
276
|
-
* }));
|
|
277
|
-
* });
|
|
278
|
-
* ```
|
|
279
|
-
*/
|
|
280
|
-
readonly Root: (options: DiffOptions) => ExprType<UIComponentType>;
|
|
281
|
-
/**
|
|
282
|
-
* The internal {@link EastUI.component} carrier. Renderers register
|
|
283
|
-
* against this in `@elaraai/e3-ui-components` via
|
|
284
|
-
* `implementUIComponent(Diff.Component, EastChakraDiff)`. Most callers
|
|
285
|
-
* should use {@link Diff.Root} (the handle-friendly factory) and never
|
|
286
|
-
* touch this directly.
|
|
287
|
-
*/
|
|
288
|
-
readonly Component: import("@elaraai/east-ui").UIComponentDef<StructType<{
|
|
289
|
-
readonly bindings: ArrayType<StructType<{
|
|
290
|
-
readonly source: ArrayType<import("@elaraai/east").VariantType<{
|
|
291
|
-
readonly field: StringType;
|
|
292
|
-
}>>;
|
|
293
|
-
readonly patch: OptionType<ArrayType<import("@elaraai/east").VariantType<{
|
|
294
|
-
readonly field: StringType;
|
|
295
|
-
}>>>;
|
|
296
|
-
readonly mode: import("@elaraai/east").VariantType<{
|
|
297
|
-
readonly staged: NullType;
|
|
298
|
-
readonly direct: NullType;
|
|
299
|
-
}>;
|
|
300
|
-
}>>;
|
|
301
|
-
readonly readonly: OptionType<BooleanType>;
|
|
302
|
-
readonly hideUnchanged: OptionType<BooleanType>;
|
|
303
|
-
readonly maxDepth: OptionType<IntegerType>;
|
|
304
|
-
readonly density: OptionType<import("@elaraai/east").VariantType<{
|
|
305
|
-
readonly comfortable: NullType;
|
|
306
|
-
readonly compact: NullType;
|
|
307
|
-
readonly condensed: NullType;
|
|
308
|
-
}>>;
|
|
309
|
-
readonly onCommitted: OptionType<FunctionType<[], NullType>>;
|
|
310
|
-
readonly onDiscarded: OptionType<FunctionType<[], NullType>>;
|
|
311
|
-
readonly style: OptionType<StructType<{
|
|
312
|
-
readonly addedBackground: OptionType<StringType>;
|
|
313
|
-
readonly addedColor: OptionType<StringType>;
|
|
314
|
-
readonly addedBorderColor: OptionType<StringType>;
|
|
315
|
-
readonly removedBackground: OptionType<StringType>;
|
|
316
|
-
readonly removedColor: OptionType<StringType>;
|
|
317
|
-
readonly removedBorderColor: OptionType<StringType>;
|
|
318
|
-
readonly changedBackground: OptionType<StringType>;
|
|
319
|
-
readonly changedColor: OptionType<StringType>;
|
|
320
|
-
readonly changedBorderColor: OptionType<StringType>;
|
|
321
|
-
readonly unchangedColor: OptionType<StringType>;
|
|
322
|
-
readonly acceptedBackground: OptionType<StringType>;
|
|
323
|
-
readonly acceptedBorderColor: OptionType<StringType>;
|
|
324
|
-
readonly rejectedBackground: OptionType<StringType>;
|
|
325
|
-
readonly rejectedBorderColor: OptionType<StringType>;
|
|
326
|
-
readonly headerBackground: OptionType<StringType>;
|
|
327
|
-
readonly summaryBackground: OptionType<StringType>;
|
|
328
|
-
readonly background: OptionType<StringType>;
|
|
329
|
-
readonly borderColor: OptionType<StringType>;
|
|
330
|
-
readonly indentGuideColor: OptionType<StringType>;
|
|
331
|
-
readonly lineNumberColor: OptionType<StringType>;
|
|
332
|
-
}>>;
|
|
333
|
-
}>>;
|
|
334
|
-
readonly Types: {
|
|
335
|
-
/** Rendered Diff payload struct (bindings + style). */
|
|
336
|
-
readonly Payload: StructType<{
|
|
337
|
-
readonly bindings: ArrayType<StructType<{
|
|
338
|
-
readonly source: ArrayType<import("@elaraai/east").VariantType<{
|
|
339
|
-
readonly field: StringType;
|
|
340
|
-
}>>;
|
|
341
|
-
readonly patch: OptionType<ArrayType<import("@elaraai/east").VariantType<{
|
|
342
|
-
readonly field: StringType;
|
|
343
|
-
}>>>;
|
|
344
|
-
readonly mode: import("@elaraai/east").VariantType<{
|
|
345
|
-
readonly staged: NullType;
|
|
346
|
-
readonly direct: NullType;
|
|
347
|
-
}>;
|
|
348
|
-
}>>;
|
|
349
|
-
readonly readonly: OptionType<BooleanType>;
|
|
350
|
-
readonly hideUnchanged: OptionType<BooleanType>;
|
|
351
|
-
readonly maxDepth: OptionType<IntegerType>;
|
|
352
|
-
readonly density: OptionType<import("@elaraai/east").VariantType<{
|
|
353
|
-
readonly comfortable: NullType;
|
|
354
|
-
readonly compact: NullType;
|
|
355
|
-
readonly condensed: NullType;
|
|
356
|
-
}>>;
|
|
357
|
-
readonly onCommitted: OptionType<FunctionType<[], NullType>>;
|
|
358
|
-
readonly onDiscarded: OptionType<FunctionType<[], NullType>>;
|
|
359
|
-
readonly style: OptionType<StructType<{
|
|
360
|
-
readonly addedBackground: OptionType<StringType>;
|
|
361
|
-
readonly addedColor: OptionType<StringType>;
|
|
362
|
-
readonly addedBorderColor: OptionType<StringType>;
|
|
363
|
-
readonly removedBackground: OptionType<StringType>;
|
|
364
|
-
readonly removedColor: OptionType<StringType>;
|
|
365
|
-
readonly removedBorderColor: OptionType<StringType>;
|
|
366
|
-
readonly changedBackground: OptionType<StringType>;
|
|
367
|
-
readonly changedColor: OptionType<StringType>;
|
|
368
|
-
readonly changedBorderColor: OptionType<StringType>;
|
|
369
|
-
readonly unchangedColor: OptionType<StringType>;
|
|
370
|
-
readonly acceptedBackground: OptionType<StringType>;
|
|
371
|
-
readonly acceptedBorderColor: OptionType<StringType>;
|
|
372
|
-
readonly rejectedBackground: OptionType<StringType>;
|
|
373
|
-
readonly rejectedBorderColor: OptionType<StringType>;
|
|
374
|
-
readonly headerBackground: OptionType<StringType>;
|
|
375
|
-
readonly summaryBackground: OptionType<StringType>;
|
|
376
|
-
readonly background: OptionType<StringType>;
|
|
377
|
-
readonly borderColor: OptionType<StringType>;
|
|
378
|
-
readonly indentGuideColor: OptionType<StringType>;
|
|
379
|
-
readonly lineNumberColor: OptionType<StringType>;
|
|
380
|
-
}>>;
|
|
381
|
-
}>;
|
|
382
|
-
/** Visual-presentation sub-struct (density, layout). */
|
|
383
|
-
readonly Style: StructType<{
|
|
384
|
-
readonly addedBackground: OptionType<StringType>;
|
|
385
|
-
readonly addedColor: OptionType<StringType>;
|
|
386
|
-
readonly addedBorderColor: OptionType<StringType>;
|
|
387
|
-
readonly removedBackground: OptionType<StringType>;
|
|
388
|
-
readonly removedColor: OptionType<StringType>;
|
|
389
|
-
readonly removedBorderColor: OptionType<StringType>;
|
|
390
|
-
readonly changedBackground: OptionType<StringType>;
|
|
391
|
-
readonly changedColor: OptionType<StringType>;
|
|
392
|
-
readonly changedBorderColor: OptionType<StringType>;
|
|
393
|
-
readonly unchangedColor: OptionType<StringType>;
|
|
394
|
-
readonly acceptedBackground: OptionType<StringType>;
|
|
395
|
-
readonly acceptedBorderColor: OptionType<StringType>;
|
|
396
|
-
readonly rejectedBackground: OptionType<StringType>;
|
|
397
|
-
readonly rejectedBorderColor: OptionType<StringType>;
|
|
398
|
-
readonly headerBackground: OptionType<StringType>;
|
|
399
|
-
readonly summaryBackground: OptionType<StringType>;
|
|
400
|
-
readonly background: OptionType<StringType>;
|
|
401
|
-
readonly borderColor: OptionType<StringType>;
|
|
402
|
-
readonly indentGuideColor: OptionType<StringType>;
|
|
403
|
-
readonly lineNumberColor: OptionType<StringType>;
|
|
404
|
-
}>;
|
|
405
|
-
};
|
|
406
|
-
};
|
|
407
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/diff/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAEH,UAAU,EACV,WAAW,EACX,QAAQ,EACR,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,YAAY,EAIZ,KAAK,QAAQ,EACb,KAAK,kBAAkB,EAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAU,WAAW,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAElG,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAMlD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;EAqBxB,CAAC;AACH,4CAA4C;AAC5C,MAAM,MAAM,aAAa,GAAG,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G;AACH,eAAO,MAAM,IAAI;IACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqCG;6BACW,WAAW,KAAG,QAAQ,CAAC,eAAe,CAAC;IAiBrD;;;;;;OAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAGC,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAEvD,wDAAwD;;;;;;;;;;;;;;;;;;;;;;;;CAGtD,CAAC"}
|
package/dist/src/diff/index.js
DELETED
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025 Elara AI Pty Ltd
|
|
3
|
-
* Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Diff component — transactional review of pending changes for any
|
|
7
|
-
* combination of {@link Data.bind} bindings.
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* The Diff card surfaces the in-flight change for each binding the caller
|
|
11
|
-
* lists in `bindings`. Per-leaf Discard, per-group Discard-all, and a
|
|
12
|
-
* footer Apply button drive the binding's commit flow. Conflicts surface
|
|
13
|
-
* inline as orange chooser rows (staged-mode 3-way drift) and as orange
|
|
14
|
-
* "stale" warning badges (drift between a patch dataset's expectations
|
|
15
|
-
* and the current source).
|
|
16
|
-
*
|
|
17
|
-
* Declared via the `EastUI.component` extension API — the React renderer
|
|
18
|
-
* lives in `@elaraai/e3-ui-components` and is wired via
|
|
19
|
-
* `implementUIComponent(DiffComponent, EastChakraDiff)` at module load
|
|
20
|
-
* time.
|
|
21
|
-
*
|
|
22
|
-
* @packageDocumentation
|
|
23
|
-
*/
|
|
24
|
-
import { East, StringType, BooleanType, NullType, IntegerType, StructType, OptionType, ArrayType, FunctionType, none, some, variant, } from "@elaraai/east";
|
|
25
|
-
import { EastUI, DensityType } from "@elaraai/east-ui";
|
|
26
|
-
import { DiffBindingType } from "../bind/data.js";
|
|
27
|
-
// ============================================================================
|
|
28
|
-
// Sub-types — visual style escape hatches.
|
|
29
|
-
// ============================================================================
|
|
30
|
-
/**
|
|
31
|
-
* Visual style escape hatches for the Diff component. Every visible surface
|
|
32
|
-
* is tokenable; defaults come from the host's Chakra theme (Elara AI brand).
|
|
33
|
-
*
|
|
34
|
-
* @property addedBackground - Soft-tint background for added / inserted leaves.
|
|
35
|
-
* @property addedColor - Foreground for added leaves.
|
|
36
|
-
* @property addedBorderColor - Border for added chips.
|
|
37
|
-
* @property removedBackground - Soft-tint background for removed / deleted leaves.
|
|
38
|
-
* @property removedColor - Foreground for removed leaves.
|
|
39
|
-
* @property removedBorderColor - Border for removed chips.
|
|
40
|
-
* @property changedBackground - Soft-tint background for updated leaves.
|
|
41
|
-
* @property changedColor - Foreground for updated leaves.
|
|
42
|
-
* @property changedBorderColor - Border for updated chips.
|
|
43
|
-
* @property unchangedColor - Foreground for unchanged rows when shown.
|
|
44
|
-
* @property acceptedBackground - Lane background for accepted-row indicator.
|
|
45
|
-
* @property acceptedBorderColor - Left-edge accent stripe for accepted rows.
|
|
46
|
-
* @property rejectedBackground - Lane background for rejected rows.
|
|
47
|
-
* @property rejectedBorderColor - Border for rejected rows.
|
|
48
|
-
* @property headerBackground - Card header background.
|
|
49
|
-
* @property summaryBackground - Stats bar background.
|
|
50
|
-
* @property background - Card body background.
|
|
51
|
-
* @property borderColor - Card outer border.
|
|
52
|
-
* @property indentGuideColor - Vertical guide line for nested rows.
|
|
53
|
-
* @property lineNumberColor - Gutter line numbers in unified mode.
|
|
54
|
-
*/
|
|
55
|
-
export const DiffStyleType = StructType({
|
|
56
|
-
addedBackground: OptionType(StringType),
|
|
57
|
-
addedColor: OptionType(StringType),
|
|
58
|
-
addedBorderColor: OptionType(StringType),
|
|
59
|
-
removedBackground: OptionType(StringType),
|
|
60
|
-
removedColor: OptionType(StringType),
|
|
61
|
-
removedBorderColor: OptionType(StringType),
|
|
62
|
-
changedBackground: OptionType(StringType),
|
|
63
|
-
changedColor: OptionType(StringType),
|
|
64
|
-
changedBorderColor: OptionType(StringType),
|
|
65
|
-
unchangedColor: OptionType(StringType),
|
|
66
|
-
acceptedBackground: OptionType(StringType),
|
|
67
|
-
acceptedBorderColor: OptionType(StringType),
|
|
68
|
-
rejectedBackground: OptionType(StringType),
|
|
69
|
-
rejectedBorderColor: OptionType(StringType),
|
|
70
|
-
headerBackground: OptionType(StringType),
|
|
71
|
-
summaryBackground: OptionType(StringType),
|
|
72
|
-
background: OptionType(StringType),
|
|
73
|
-
borderColor: OptionType(StringType),
|
|
74
|
-
indentGuideColor: OptionType(StringType),
|
|
75
|
-
lineNumberColor: OptionType(StringType),
|
|
76
|
-
});
|
|
77
|
-
// ============================================================================
|
|
78
|
-
// Re-export the binding descriptor — it lives in `data.ts` to keep the
|
|
79
|
-
// dependency direction one-way (Diff consumes; Data produces).
|
|
80
|
-
// ============================================================================
|
|
81
|
-
export { DiffBindingType } from "../bind/data.js";
|
|
82
|
-
// ============================================================================
|
|
83
|
-
// Diff payload — IR shape consumed by the renderer.
|
|
84
|
-
// ============================================================================
|
|
85
|
-
/**
|
|
86
|
-
* Schema for the `Diff` extension component. Internal IR shape — the
|
|
87
|
-
* developer-facing factory `Diff.Root` accepts {@link DataBindHandleType}
|
|
88
|
-
* descriptors and forwards them as `bindings`.
|
|
89
|
-
*
|
|
90
|
-
* @property bindings - The set of bindings to surface in the card. Each
|
|
91
|
-
* entry is a {@link DiffBindingType} value (typically obtained via the
|
|
92
|
-
* `binding` field of a {@link Data.bind} handle).
|
|
93
|
-
* @property readonly - Render the Diff without per-leaf or per-group Discard
|
|
94
|
-
* buttons. The footer Apply / Discard-all still render. Default `false`
|
|
95
|
-
* (interactive review).
|
|
96
|
-
* @property hideUnchanged - Elide unchanged rows. None ⇒ false.
|
|
97
|
-
* @property maxDepth - Cap nesting depth before "Show more" collapses. None ⇒ no cap.
|
|
98
|
-
* @property density - Information-density preset (`comfortable` | `compact`
|
|
99
|
-
* | `condensed`). Defaults to `comfortable`.
|
|
100
|
-
* @property onCommitted - Fired after a successful commit (post-merge).
|
|
101
|
-
* @property onDiscarded - Fired after a successful discard.
|
|
102
|
-
* @property style - Visual style escape hatches.
|
|
103
|
-
*/
|
|
104
|
-
export const DiffPayloadType = StructType({
|
|
105
|
-
bindings: ArrayType(DiffBindingType),
|
|
106
|
-
readonly: OptionType(BooleanType),
|
|
107
|
-
hideUnchanged: OptionType(BooleanType),
|
|
108
|
-
maxDepth: OptionType(IntegerType),
|
|
109
|
-
density: OptionType(DensityType),
|
|
110
|
-
onCommitted: OptionType(FunctionType([], NullType)),
|
|
111
|
-
onDiscarded: OptionType(FunctionType([], NullType)),
|
|
112
|
-
style: OptionType(DiffStyleType),
|
|
113
|
-
});
|
|
114
|
-
/**
|
|
115
|
-
* Internal `EastUI.component` carrier. Renderers register against this in
|
|
116
|
-
* `@elaraai/e3-ui-components`. Most callers should use {@link Diff.Root}
|
|
117
|
-
* (which wraps this with the handle-friendly API) rather than touching
|
|
118
|
-
* `DiffComponent` directly.
|
|
119
|
-
*/
|
|
120
|
-
export const DiffComponent = EastUI.component("Diff", DiffPayloadType, { optional: true });
|
|
121
|
-
/**
|
|
122
|
-
* The Diff component namespace. Surfaces transactional pending edits for
|
|
123
|
-
* review and commit, with merge-aware conflict resolution and stale-patch
|
|
124
|
-
* drift detection.
|
|
125
|
-
*
|
|
126
|
-
* @remarks
|
|
127
|
-
* Use `Diff.Root({ bindings: [view.binding, ...] })` to render the panel.
|
|
128
|
-
* The `Component` property is the internal {@link EastUI.component}
|
|
129
|
-
* carrier that renderers register against — most callers shouldn't need
|
|
130
|
-
* it.
|
|
131
|
-
*/
|
|
132
|
-
export const Diff = {
|
|
133
|
-
/**
|
|
134
|
-
* Build a Diff component. Surfaces every binding's in-flight change in
|
|
135
|
-
* a single review card, with per-leaf accept / reject and a footer
|
|
136
|
-
* Apply that runs the right commit per binding.
|
|
137
|
-
*
|
|
138
|
-
* @param options - {@link DiffOptions}. Only `bindings` is required;
|
|
139
|
-
* the rest default to absent / interactive.
|
|
140
|
-
* @returns An East expression of {@link UIComponentType} representing
|
|
141
|
-
* the Diff panel.
|
|
142
|
-
*
|
|
143
|
-
* @remarks
|
|
144
|
-
* The renderer reads each binding's IR descriptor (`source`, optional
|
|
145
|
-
* `patch`, `mode`), looks up the runtime types in the binding
|
|
146
|
-
* registry, and derives the in-flight change to display. Apply's
|
|
147
|
-
* commit code path depends on the binding's mode and patch presence —
|
|
148
|
-
* staged + no patch applies the buffer to source; staged + patch
|
|
149
|
-
* publishes the buffer as a fresh patch to the patch dataset; direct
|
|
150
|
-
* + patch applies the existing patch dataset to the source. Discard
|
|
151
|
-
* always drops the in-flight change in place.
|
|
152
|
-
*
|
|
153
|
-
* @example
|
|
154
|
-
* ```ts
|
|
155
|
-
* import { East, FloatType, variant } from "@elaraai/east";
|
|
156
|
-
* import { Reactive, UIComponentType } from "@elaraai/east-ui";
|
|
157
|
-
* import { Data, Diff } from "@elaraai/e3-ui";
|
|
158
|
-
* import * as e3 from "@elaraai/e3";
|
|
159
|
-
*
|
|
160
|
-
* const maxWeeklyHoursInput = e3.input("max_weekly_hours", FloatType, variant("value", 38.0));
|
|
161
|
-
*
|
|
162
|
-
* // Mirrors `diffDefaults` in test/diff.examples.ts (wired via Assert.examples).
|
|
163
|
-
* const diffDefaults = East.function([], UIComponentType, _$ => {
|
|
164
|
-
* return Reactive.Root(East.function([], UIComponentType, $ => {
|
|
165
|
-
* const view = $.let(Data.bind(maxWeeklyHoursInput, { mode: "staged" }));
|
|
166
|
-
* return Diff.Root({ bindings: [view.binding] });
|
|
167
|
-
* }));
|
|
168
|
-
* });
|
|
169
|
-
* ```
|
|
170
|
-
*/
|
|
171
|
-
Root(options) {
|
|
172
|
-
const density = options.density === undefined
|
|
173
|
-
? none
|
|
174
|
-
: typeof options.density === "string"
|
|
175
|
-
? some(East.value(variant(options.density, null), DensityType))
|
|
176
|
-
: options.density;
|
|
177
|
-
return DiffComponent.Root({
|
|
178
|
-
bindings: options.bindings,
|
|
179
|
-
readonly: options.readonly ?? none,
|
|
180
|
-
hideUnchanged: options.hideUnchanged ?? none,
|
|
181
|
-
maxDepth: options.maxDepth ?? none,
|
|
182
|
-
density,
|
|
183
|
-
onCommitted: options.onCommitted ?? none,
|
|
184
|
-
onDiscarded: options.onDiscarded ?? none,
|
|
185
|
-
style: options.style ?? none,
|
|
186
|
-
});
|
|
187
|
-
},
|
|
188
|
-
/**
|
|
189
|
-
* The internal {@link EastUI.component} carrier. Renderers register
|
|
190
|
-
* against this in `@elaraai/e3-ui-components` via
|
|
191
|
-
* `implementUIComponent(Diff.Component, EastChakraDiff)`. Most callers
|
|
192
|
-
* should use {@link Diff.Root} (the handle-friendly factory) and never
|
|
193
|
-
* touch this directly.
|
|
194
|
-
*/
|
|
195
|
-
Component: DiffComponent,
|
|
196
|
-
Types: {
|
|
197
|
-
/** Rendered Diff payload struct (bindings + style). */
|
|
198
|
-
Payload: DiffPayloadType,
|
|
199
|
-
/** Visual-presentation sub-struct (density, layout). */
|
|
200
|
-
Style: DiffStyleType,
|
|
201
|
-
},
|
|
202
|
-
};
|
|
203
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/diff/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EACH,IAAI,EACJ,UAAU,EACV,WAAW,EACX,QAAQ,EACR,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,YAAY,EACZ,IAAI,EACJ,IAAI,EACJ,OAAO,GAGV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,MAAM,EAAE,WAAW,EAA6C,MAAM,kBAAkB,CAAC;AAElG,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,+EAA+E;AAC/E,2CAA2C;AAC3C,+EAA+E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