@signalsafe/tree-spec-editor 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +246 -69
  3. package/README.standalone.md +14 -0
  4. package/dist/index.d.ts +34 -26
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +18 -14
  7. package/dist/lib/PanelHeaderCollapseCarets.d.ts +1 -1
  8. package/dist/lib/PanelHeaderCollapseCarets.d.ts.map +1 -1
  9. package/dist/lib/buildDefaultToolbarSpec.d.ts +3 -79
  10. package/dist/lib/buildDefaultToolbarSpec.d.ts.map +1 -1
  11. package/dist/lib/buildDefaultToolbarSpec.js +9 -155
  12. package/dist/lib/panelNodeLink.d.ts +13 -0
  13. package/dist/lib/panelNodeLink.d.ts.map +1 -0
  14. package/dist/lib/panelNodeLink.js +12 -0
  15. package/dist/lib/selectionStyles.d.ts +9 -0
  16. package/dist/lib/selectionStyles.d.ts.map +1 -0
  17. package/dist/lib/selectionStyles.js +8 -0
  18. package/dist/lib/toolbar/defaultToolbarTypes.d.ts +89 -0
  19. package/dist/lib/toolbar/defaultToolbarTypes.d.ts.map +1 -0
  20. package/dist/lib/toolbar/defaultToolbarTypes.js +1 -0
  21. package/dist/lib/toolbar/toolbarSectionBuilders.d.ts +10 -0
  22. package/dist/lib/toolbar/toolbarSectionBuilders.d.ts.map +1 -0
  23. package/dist/lib/toolbar/toolbarSectionBuilders.js +153 -0
  24. package/dist/modals/AuditLogModal.d.ts +1 -1
  25. package/dist/modals/AuditLogModal.d.ts.map +1 -1
  26. package/dist/modals/AuditLogModal.js +1 -1
  27. package/dist/modals/DraftHistoryModal.d.ts +1 -1
  28. package/dist/modals/DraftHistoryModal.d.ts.map +1 -1
  29. package/dist/modals/DraftHistoryModal.js +1 -1
  30. package/dist/modals/PublishReviewModal.d.ts +1 -1
  31. package/dist/modals/PublishReviewModal.d.ts.map +1 -1
  32. package/dist/panels/AdvancedJsonPanel.d.ts +1 -1
  33. package/dist/panels/AdvancedJsonPanel.d.ts.map +1 -1
  34. package/dist/panels/AdvancedJsonPanel.js +1 -1
  35. package/dist/panels/AppearancePanel.d.ts +26 -0
  36. package/dist/panels/AppearancePanel.d.ts.map +1 -0
  37. package/dist/panels/AppearancePanel.js +76 -0
  38. package/dist/panels/ChoiceEdgeAppearanceFields.d.ts +10 -0
  39. package/dist/panels/ChoiceEdgeAppearanceFields.d.ts.map +1 -0
  40. package/dist/panels/ChoiceEdgeAppearanceFields.js +13 -0
  41. package/dist/panels/ChoiceTemplatesPanel.d.ts +27 -0
  42. package/dist/panels/ChoiceTemplatesPanel.d.ts.map +1 -0
  43. package/dist/panels/ChoiceTemplatesPanel.js +9 -0
  44. package/dist/panels/GraphEditorInfoPanel.d.ts +5 -2
  45. package/dist/panels/GraphEditorInfoPanel.d.ts.map +1 -1
  46. package/dist/panels/GraphEditorInfoPanel.js +7 -7
  47. package/dist/panels/InspectorPanel.d.ts +3 -78
  48. package/dist/panels/InspectorPanel.d.ts.map +1 -1
  49. package/dist/panels/InspectorPanel.js +20 -60
  50. package/dist/panels/IssuesPanel.d.ts +6 -2
  51. package/dist/panels/IssuesPanel.d.ts.map +1 -1
  52. package/dist/panels/IssuesPanel.js +17 -5
  53. package/dist/panels/NodesPanel.d.ts +3 -1
  54. package/dist/panels/NodesPanel.d.ts.map +1 -1
  55. package/dist/panels/NodesPanel.js +13 -7
  56. package/dist/panels/SelectedEdgePanel.d.ts +10 -3
  57. package/dist/panels/SelectedEdgePanel.d.ts.map +1 -1
  58. package/dist/panels/SelectedEdgePanel.js +5 -6
  59. package/dist/panels/ToolbarPanel.d.ts +1 -1
  60. package/dist/panels/ToolbarPanel.d.ts.map +1 -1
  61. package/dist/panels/ToolbarPanel.js +2 -4
  62. package/dist/panels/inspector/ChoiceEditorCard.d.ts +28 -0
  63. package/dist/panels/inspector/ChoiceEditorCard.d.ts.map +1 -0
  64. package/dist/panels/inspector/ChoiceEditorCard.js +36 -0
  65. package/dist/panels/inspector/ChoiceEditorList.d.ts +25 -0
  66. package/dist/panels/inspector/ChoiceEditorList.d.ts.map +1 -0
  67. package/dist/panels/inspector/ChoiceEditorList.js +10 -0
  68. package/dist/panels/inspector/NodeTypeField.d.ts +8 -0
  69. package/dist/panels/inspector/NodeTypeField.d.ts.map +1 -0
  70. package/dist/panels/inspector/NodeTypeField.js +12 -0
  71. package/dist/panels/inspector/RequiredNodeCard.d.ts +14 -0
  72. package/dist/panels/inspector/RequiredNodeCard.d.ts.map +1 -0
  73. package/dist/panels/inspector/RequiredNodeCard.js +16 -0
  74. package/dist/panels/inspector/choiceActionIconProps.d.ts +12 -0
  75. package/dist/panels/inspector/choiceActionIconProps.d.ts.map +1 -0
  76. package/dist/panels/inspector/choiceActionIconProps.js +26 -0
  77. package/dist/panels/inspector/types.d.ts +77 -0
  78. package/dist/panels/inspector/types.d.ts.map +1 -0
  79. package/dist/panels/inspector/types.js +11 -0
  80. package/package.json +86 -65
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SignalSafe Software
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,20 +1,70 @@
1
1
  # `@signalsafe/tree-spec-editor`
2
2
 
3
- React graph editor for authoring `TreeSpec` content.
3
+ React **Bootstrap UI shell** for authoring TreeSpec graphs: canvas (from `@signalsafe/tree-spec-editor-react`), sidebar panels, modals, and toolbar helpers.
4
4
 
5
- This package gives you a ready-to-embed editor component plus a small set of editor helpers. It is focused on graph editing only: nodes, choices, transitions, selection, layout, and validation hints.
5
+ | | |
6
+ |---|---|
7
+ | **npm** | `@signalsafe/tree-spec-editor` |
8
+ | **GitHub** | [SignalSafeSoftware/tree-spec-editor](https://github.com/SignalSafeSoftware/tree-spec-editor) |
9
+ | **Peer deps** | `react`, `react-dom`, `reactflow`, `react-bootstrap` |
10
+
11
+ ## What this package does
12
+
13
+ - Ships a ready-to-embed **graph editor UI** (`TreeSpecGraphEditor` re-export, panels, modals, toolbar).
14
+ - Re-exports selected **editor-core helpers** and types for one-stop imports in Bootstrap hosts.
15
+
16
+ ## What this package does not do
17
+
18
+ - Routing, REST/GraphQL clients, or authentication — your host app loads/saves drafts and enforces permissions.
19
+ - Wire compile/publish without your adapter — use `useTreeSpecEditor` from `@signalsafe/tree-spec-editor-react` with a host adapter.
20
+ - React Flow CSS by itself — the canvas lives in `-editor-react`; **consumers may need** `import 'reactflow/dist/style.css'` in the app entry (see `@signalsafe/tree-spec-editor-react` README). This package keeps `sideEffects: false` because it does not import CSS directly.
21
+
22
+ ## Package stack
23
+
24
+ | Layer | Package |
25
+ |---|---|
26
+ | Wire | `@signalsafe/tree-spec` |
27
+ | Editor model | `@signalsafe/tree-spec-editor-core` |
28
+ | React Flow canvas | `@signalsafe/tree-spec-editor-react` |
29
+ | **Bootstrap shell (this package)** | `@signalsafe/tree-spec-editor` |
6
30
 
7
31
  ## Install
8
32
 
9
33
  ```bash
10
- npm install @signalsafe/tree-spec-editor react react-dom reactflow react-bootstrap
34
+ npm install @signalsafe/tree-spec-editor @signalsafe/tree-spec-editor-react @signalsafe/tree-spec-editor-core @signalsafe/tree-spec react react-dom reactflow react-bootstrap bootstrap
35
+ ```
36
+
37
+ Load Bootstrap CSS in your app. Import React Flow CSS as documented in `@signalsafe/tree-spec-editor-react`.
38
+
39
+ ## Development
40
+
41
+ `yarn build` uses `tsconfig.build.json` and resolves `@signalsafe/*` from `node_modules`. Ecosystem sibling `paths` in `tsconfig.json` apply to local typecheck/tests only.
42
+
43
+ ```bash
44
+ yarn install
45
+ yarn build
46
+ yarn test
47
+ yarn typecheck
11
48
  ```
12
49
 
13
- The package ships React components that use `react-bootstrap` primitives (cards, buttons, form controls). The consuming app must install `react-bootstrap@^2.10.0` and load Bootstrap CSS in the usual way.
50
+ ## Security
51
+
52
+ See [SECURITY.md](./SECURITY.md). Host applications must enforce authorization, validate TreeSpec server-side, and control publish permissions.
53
+
54
+ ## Changelog and releases
55
+
56
+ - [CHANGELOG.md](./CHANGELOG.md)
57
+ - [RELEASING.md](./RELEASING.md)
58
+
59
+ ---
60
+
61
+ ## Detailed component reference
62
+
63
+ The sections below document panels, modals, toolbar items, and integration patterns. Import from **`@signalsafe/tree-spec-editor`** package root only (no subpath exports).
14
64
 
15
65
  ## Source layout (maintainers)
16
66
 
17
- Published consumers import only the package root (`@signalsafe/tree-spec-editor`). This package is the **React + Bootstrap UI shell** in the layered editor stack:
67
+ Published consumers import only the package root. Layer stack:
18
68
 
19
69
  | Layer | Package | Owns |
20
70
  |-------|---------|------|
@@ -30,7 +80,7 @@ Published consumers import only the package root (`@signalsafe/tree-spec-editor`
30
80
  | `src/lib/panelHelpers.ts` | `getIssueSeverityBadgeClass` (Bootstrap-flavored — Material / Angular shells ship their own equivalent) |
31
81
  | `src/index.ts` | Public barrel — **do not** import from subpaths in apps. Re-exports the canvas from `@signalsafe/tree-spec-editor-react` and the framework-agnostic surface from `@signalsafe/tree-spec-editor-core` |
32
82
 
33
- Tests live under `tests/panels/`, `tests/modals/`, plus `tests/index.test.ts` for the barrel. The canvas test lives in **`packages/tree-spec-editor-react/tests/`** and the framework-agnostic helper tests live in **`packages/tree-spec-editor-core/tests/`**.
83
+ Tests live under `tests/panels/`, `tests/modals/`, and `tests/index.test.ts` in this repo. Canvas tests live in **`tree-spec-editor-react`**; core helper tests live in **`tree-spec-editor-core`**.
34
84
 
35
85
  ## Choosing the right package
36
86
 
@@ -41,6 +91,35 @@ Tests live under `tests/panels/`, `tests/modals/`, plus `tests/index.test.ts` fo
41
91
  | Just the framework-agnostic helpers (CLI, server-side preview, Angular shell) | `@signalsafe/tree-spec-editor-core` |
42
92
  | Just the wire contract (validation, compile, lint) | `@signalsafe/tree-spec` |
43
93
 
94
+ ### Planned framework shells (separate packages)
95
+
96
+ | You want… | Import from |
97
+ |----------|-------------|
98
+ | React + Material panels/modals (reuse React Flow canvas) | `@signalsafe/tree-spec-editor-react-mui` (planned) + `-react` |
99
+ | Angular editor | `@signalsafe/tree-spec-editor-angular` (planned) + `-core` |
100
+ | Vue editor | `@signalsafe/tree-spec-editor-vue` (planned) + `-core` |
101
+
102
+ This package (`@signalsafe/tree-spec-editor`) **remains the Bootstrap reference shell** — it does not become Material, Angular, or Vue.
103
+
104
+ See package READMEs in the [`tree-spec-editor-core`](https://github.com/SignalSafeSoftware/tree-spec-editor-core) and [`tree-spec-editor-react`](https://github.com/SignalSafeSoftware/tree-spec-editor-react) repos for layer rules.
105
+
106
+ ## Host import pattern
107
+
108
+ Typical host apps import from **three** packages:
109
+
110
+ ```tsx
111
+ // Bootstrap UI shell — panels, modals, toolbar, canvas default export
112
+ import TreeSpecGraphEditor, { AppearancePanel, buildDefaultToolbarSpec, … } from '@signalsafe/tree-spec-editor';
113
+
114
+ // Stateful orchestration hook (not re-exported from the shell barrel)
115
+ import { useTreeSpecEditor } from '@signalsafe/tree-spec-editor-react';
116
+
117
+ // Framework-agnostic helpers and constants (prefer over shell re-exports)
118
+ import { resolveDefaultEdgeType, GRAPH_SELECTION_KIND, computeTreeDiffSummary } from '@signalsafe/tree-spec-editor-core';
119
+ ```
120
+
121
+ ESLint nudges hosts to import listed framework-agnostic symbols from `-core` instead of the shell barrel.
122
+
44
123
  ## Happy Path
45
124
 
46
125
  The smallest useful integration is:
@@ -49,9 +128,9 @@ The smallest useful integration is:
49
128
  2. Render `TreeSpecGraphEditor`.
50
129
  3. Replace the state value in `onChange`.
51
130
 
52
- The screenshot below was captured from the exact example tree in this section.
131
+ The example below uses a minimal in-memory tree (screenshot assets are not bundled in the npm package).
53
132
 
54
- ![Happy path editor example](https://raw.githubusercontent.com/denverprogrammer/DeliveryPlus/main/packages/tree-spec-editor/docs/tree-spec-editor-happy-path.png)
133
+ <!-- Screenshot: add your own capture when integrating the editor in your app -->
55
134
 
56
135
  ```tsx
57
136
  import { useState, type JSX } from 'react';
@@ -123,8 +202,14 @@ export function ExampleTreeSpecEditor(): JSX.Element {
123
202
  - `TreeSpecGraphEditor`: the default React editor component.
124
203
  - `IssuesPanel`, `NodesPanel`: presentational sidebar panels for issues and node search/selection.
125
204
  - `AdvancedJsonPanel`: presentational card chrome for displaying a host-owned JSON renderer (e.g. the compiled `tree_spec`).
126
- - `InspectorPanel`: right-rail node inspector (Type / Prompt / Choices with Label / Next / Outcome / Delete) with optional render-prop slots and overridable outcome options for project-specific extensions.
127
- - `SelectedEdgePanel`: compact read-only card showing the currently selected transition.
205
+ - `GraphEditorInfoPanel`: left-rail metadata card (scenario/version ids, draft/published badge, autosave status, validation timestamp, scenario-level default edge type).
206
+ - `InspectorPanel`: right-rail node inspector (Type / Prompt / Choices with Type / Label / Next / Outcome / reorder-delete icon actions) with optional render-prop slots, `onFocusChoice` for selection sync, and overridable outcome options.
207
+ - `AppearancePanel`: right-rail canvas-only styling for the selected node and/or the selected edge's source choice (node appearance + per-choice edge appearance in one panel).
208
+ - `ChoiceEdgeAppearanceFields`: embeddable per-choice edge styling fields (used by `AppearancePanel`; also exported for custom layouts).
209
+ - `ChoiceTemplatesPanel`: preset choice bundles for custom host layouts (**not wired** in the reference graph editor page; pair with `appendChoiceTemplate` from `-core`).
210
+ - `SelectedEdgePanel`: optional compact **read-only** card for a selected transition (for editing, use `AppearancePanel`).
211
+ - `LIST_SELECTION_CLASS`, `CANVAS_SELECTION_CLASS`, …: shared CSS class helpers for list/canvas selection highlighting.
212
+ - `buildDefaultToolbarSpec`: builds the default action toolbar (`+ Add`, Templates, layout, Undo/Redo, validate/history/audit/snapshot/clone, save/publish/preview) without status chrome — draft/autosave live in `GraphEditorInfoPanel`.
128
213
  - `PublishReviewModal`, `DraftHistoryModal`, `AuditLogModal`: presentational modals for the publish-review / draft-snapshot / audit-log authoring flows; all strings are overridable.
129
214
  - `ToolbarPanel`: data-driven toolbar that takes an `items: ToolbarItem[]` array (`button` / `dropdown` / `badge` / `text` / `custom` kinds) and renders Bootstrap chrome in a single flex wrapper.
130
215
  - `duplicateNode`, `deleteNode`, `computeTreeDiffSummary`, `applyTreeTemplate`: project-agnostic tree-operation helpers (clone a node, delete a node with cascade, summarize a structural diff, insert a reusable subgraph template).
@@ -144,9 +229,9 @@ export function ExampleTreeSpecEditor(): JSX.Element {
144
229
 
145
230
  Pass `issues` when you want the editor to highlight problem nodes and edges.
146
231
 
147
- The screenshot below was captured from the exact example tree in this section.
232
+ The example below demonstrates validation highlighting (screenshot assets are not bundled in the npm package).
148
233
 
149
- ![Validation issues example](https://raw.githubusercontent.com/denverprogrammer/DeliveryPlus/main/packages/tree-spec-editor/docs/tree-spec-editor-issues.png)
234
+ <!-- Screenshot: add your own capture when integrating the editor in your app -->
150
235
 
151
236
  ```tsx
152
237
  import { useMemo, useState, type JSX } from 'react';
@@ -445,19 +530,19 @@ export function CompiledTreeSpecPanel({ tree }: Props): JSX.Element {
445
530
 
446
531
  ### `InspectorPanel`
447
532
 
448
- The right-rail node inspector. When a node is selected, it renders two Bootstrap cards: **Required** (Type, Prompt, and `renderExtraNodeFields`) and **Choices** (list-group rows). The universal fields the package owns:
533
+ The right-rail node inspector. When a node is in context (selected directly, or as the source of a selected edge), it renders two Bootstrap cards: **Required** (Type, Prompt, and `renderExtraNodeFields`) and **Choices** (list-group rows). The universal fields the package owns:
449
534
 
450
- - **Type** `<select>` (with the package's `TREE_SPEC_NODE_TYPE_PRESETS` + custom-value input).
535
+ - **Type** `<select>` (with the package's `TREE_SPEC_NODE_TYPE_PRESETS` + custom-value input, or a host-supplied **choice type** catalog via `choiceTypes` / `onSetChoiceType`).
451
536
  - **Prompt** `<textarea>`.
452
- - **Choices** list with **Label**, **Next** (target-node `<select>`), and a **delete** control per choice.
453
- - **Outcome** `<select>` per choice — only shown when the choice targets `END_NODE_ID`. Default options are the canonical `TerminalOutcome` values from `@signalsafe/tree-spec` (`safe` / `at_risk` / `compromised`).
537
+ - **Choices** list with per-row **Type**, **Label**, **Next** (target-node `<select>`), **Outcome** (only when Next is `END_NODE_ID`), and **reorder / delete** icon actions styled like agGrid row actions (`action-icon`).
538
+ - Focusing any field in a choice row should call `onFocusChoice(choiceId)` so the canvas, nodes list, and choice highlight stay in sync (typical host: `selectChoice(nodeId, choiceId)`).
454
539
 
455
540
  For project-specific UI, `InspectorPanel` exposes **render-prop slots** so the package stays generic while hosts can extend it without forking. The package owns nothing app-specific.
456
541
 
457
542
  ```tsx
458
543
  import {
544
+ AppearancePanel,
459
545
  InspectorPanel,
460
- SelectedEdgePanel,
461
546
  type EditorNode,
462
547
  type EditorTree,
463
548
  type EditorTransition,
@@ -465,6 +550,7 @@ import {
465
550
 
466
551
  function RightRail({
467
552
  tree,
553
+ inspectorNode,
468
554
  selectedNode,
469
555
  selectedEdge,
470
556
  focusChoiceId,
@@ -472,10 +558,17 @@ function RightRail({
472
558
  onUpdateSelectedNode,
473
559
  onAddChoice,
474
560
  onDeleteChoice,
561
+ onMoveChoice,
562
+ onSetChoiceType,
475
563
  onSetChoiceTarget,
476
564
  onSetChoiceOutcome,
565
+ onFocusChoice,
566
+ onUpdateChoiceEdgeHints,
567
+ choiceTypes,
477
568
  }: {
478
569
  tree: EditorTree;
570
+ /** Node shown in Required/Choices — selected node or edge source node. */
571
+ inspectorNode: EditorNode | null;
479
572
  selectedNode: EditorNode | null;
480
573
  selectedEdge: EditorTransition | null;
481
574
  focusChoiceId: string | null;
@@ -483,29 +576,57 @@ function RightRail({
483
576
  onUpdateSelectedNode: (patch: Partial<EditorNode>) => void;
484
577
  onAddChoice: () => void;
485
578
  onDeleteChoice: (choiceId: string) => void;
579
+ onMoveChoice?: (choiceId: string, direction: 'up' | 'down') => void;
580
+ onSetChoiceType?: (choiceId: string, typeId: string, defaultLabel?: string) => void;
486
581
  onSetChoiceTarget: (choiceId: string, targetNodeId: string) => void;
487
582
  onSetChoiceOutcome: (choiceId: string, outcome: string) => void;
583
+ onFocusChoice?: (choiceId: string) => void;
584
+ onUpdateChoiceEdgeHints?: (
585
+ nodeId: string,
586
+ choiceId: string,
587
+ patch: Partial<import('@signalsafe/tree-spec-editor-core').ChoiceEdgeHints>,
588
+ ) => void;
589
+ choiceTypes?: ReadonlyArray<{ id: string; label: string }>;
488
590
  }) {
489
591
  return (
490
592
  <>
491
- <InspectorPanel
492
- tree={tree}
493
- selectedNode={selectedNode}
494
- focusChoiceId={focusChoiceId}
495
- isPublished={isPublished}
496
- onUpdateSelectedNode={onUpdateSelectedNode}
497
- onAddChoice={onAddChoice}
498
- onDeleteChoice={onDeleteChoice}
499
- onSetChoiceTarget={onSetChoiceTarget}
500
- onSetChoiceOutcome={onSetChoiceOutcome}
501
- renderExtraNodeFields={({ node, onUpdateNode }) => (
502
- <YourProjectNodeMetadataFields node={node} onChange={onUpdateNode} />
503
- )}
504
- renderExtraChoiceFields={({ choice, onUpdateNode }) => (
505
- <YourProjectChoiceMetadataFields choice={choice} onChange={onUpdateNode} />
506
- )}
507
- />
508
- <SelectedEdgePanel selectedEdge={selectedEdge} />
593
+ {inspectorNode ? (
594
+ <InspectorPanel
595
+ tree={tree}
596
+ selectedNode={inspectorNode}
597
+ focusChoiceId={focusChoiceId}
598
+ isPublished={isPublished}
599
+ onUpdateSelectedNode={onUpdateSelectedNode}
600
+ onAddChoice={onAddChoice}
601
+ onDeleteChoice={onDeleteChoice}
602
+ onMoveChoice={onMoveChoice}
603
+ onSetChoiceType={onSetChoiceType}
604
+ onSetChoiceTarget={onSetChoiceTarget}
605
+ onSetChoiceOutcome={onSetChoiceOutcome}
606
+ onFocusChoice={onFocusChoice}
607
+ choiceTypes={choiceTypes}
608
+ renderExtraNodeFields={({ node, onUpdateNode }) => (
609
+ <YourProjectNodeMetadataFields node={node} onChange={onUpdateNode} />
610
+ )}
611
+ renderExtraChoiceFields={({ choice, onUpdateNode }) => (
612
+ <YourProjectChoiceMetadataFields choice={choice} onChange={onUpdateNode} />
613
+ )}
614
+ />
615
+ ) : null}
616
+ {selectedNode || selectedEdge ? (
617
+ <AppearancePanel
618
+ tree={tree}
619
+ selectedNode={selectedNode}
620
+ selectedEdge={selectedEdge}
621
+ focusChoiceId={focusChoiceId}
622
+ isPublished={isPublished}
623
+ onUpdateSelectedNode={onUpdateSelectedNode}
624
+ onUpdateChoiceEdgeHints={onUpdateChoiceEdgeHints}
625
+ renderAppearanceFields={({ node, isPublished, onUpdateNode }) => (
626
+ <NodeAppearanceFields node={node} isPublished={isPublished} onUpdateNode={onUpdateNode} />
627
+ )}
628
+ />
629
+ ) : null}
509
630
  </>
510
631
  );
511
632
  }
@@ -515,6 +636,9 @@ function RightRail({
515
636
 
516
637
  - `outcomeOptions`: override the END-transition outcome `<select>` options (e.g. `[{ value: 'pass', label: 'Pass' }, { value: 'fail', label: 'Fail' }]`). Defaults to the canonical `TerminalOutcome` values exported as `DEFAULT_OUTCOME_OPTIONS`.
517
638
  - `hideOutcomeField`: hide the outcome `<select>` entirely (useful when the host manages outcomes via `renderExtraChoiceFields` or stores them outside the wire format).
639
+ - `choiceTypes` / `onSetChoiceType`: host-defined stable choice-type ids for the per-choice **Type** `<select>` (e.g. `verify`, `risky`, `bad`).
640
+ - `onMoveChoice`: when set, shows up/down icon actions to reorder choices within the node.
641
+ - `onFocusChoice`: invoked when the user focuses any control inside a choice card; use to sync canvas/node-list highlighting.
518
642
  - `renderExtraNodeFields({ tree, node, isPublished, onUpdateNode })`: render extra UI below the Prompt textarea, scoped to the currently-selected node. Use for project-specific node metadata (render hints, scoring, classification, etc.).
519
643
  - `renderExtraChoiceFields({ tree, node, choice, transition, isPublished, onUpdateNode })`: render extra UI below each choice card (after Next/Outcome). Use for project-specific per-choice metadata.
520
644
  - `onDeleteSelectedNode`: when set, shows a delete-node icon in the Required card header; wire to `useTreeSpecEditor().actions.deleteSelectedNode` (or equivalent). Disabled automatically when `isPublished` is true.
@@ -522,14 +646,53 @@ function RightRail({
522
646
  - `emptyStateText`: text shown when no node is selected (default `"Select a node to edit it."`).
523
647
  - `typeHelperText`: muted helper text under the Type field (default explains the open `type` string).
524
648
 
649
+ ### `GraphEditorInfoPanel`
650
+
651
+ Left-rail metadata card for the scenario version being edited. Shows scenario/version ids, name, created/updated timestamps, a **Draft** / **Published** badge, **autosave status**, last validation time, and (when wired) the scenario-level **default edge type** dropdown (`smoothstep` / `straight` / `step`).
652
+
653
+ Use this panel instead of duplicating draft/autosave badges in the top toolbar.
654
+
655
+ ### `AppearancePanel`
656
+
657
+ Right-rail panel for **canvas-only** styling. Combines:
658
+
659
+ - **Node appearance** (colors, width/height, text wrap, lock) when a node is selected and no choice/edge context is active — hosts inject fields via `renderAppearanceFields`.
660
+ - **Edge appearance** for the active choice when an edge is selected or a choice is focused — stroke color (default matches React Flow gray via `DEFAULT_CANVAS_EDGE_STROKE`), label visibility, and per-choice edge type override.
661
+
662
+ Scenario-level default edge routing lives in `GraphEditorInfoPanel`, not here.
663
+
664
+ Hosts typically pair node fields with a project-specific component:
665
+
666
+ ```tsx
667
+ import { AppearancePanel, InspectorPanel } from '@signalsafe/tree-spec-editor';
668
+ import NodeAppearanceFields from '../ui/components/NodeAppearanceFields';
669
+
670
+ <InspectorPanel /* Required + Choices; pass inspectorNode when edge-selected */ />
671
+ <AppearancePanel
672
+ tree={tree}
673
+ selectedNode={selectedNode}
674
+ selectedEdge={selectedEdge}
675
+ focusChoiceId={focusChoiceId}
676
+ isPublished={isPublished}
677
+ onUpdateSelectedNode={onUpdateSelectedNode}
678
+ onUpdateChoiceEdgeHints={updateChoiceEdgeHints}
679
+ renderAppearanceFields={({ node, isPublished, onUpdateNode }) => (
680
+ <NodeAppearanceFields node={node} isPublished={isPublished} onUpdateNode={onUpdateNode} />
681
+ )}
682
+ />
683
+ ```
684
+
685
+ Wire format details: [`@signalsafe/tree-spec` README](../tree-spec/README.md) — **Graph editor metadata**.
686
+
525
687
  ### `SelectedEdgePanel`
526
688
 
527
- The compact read-only card that surfaces the currently selected transition. Returns `null` when `selectedEdge` is `null`, so hosts can render it unconditionally.
689
+ Optional compact read-only card that surfaces the currently selected transition. Returns `null` when `selectedEdge` is `null`. **For editing**, prefer `AppearancePanel` + `InspectorPanel` (edge selection keeps the source node's choices visible and focuses the source choice). Keep `SelectedEdgePanel` only when you want a minimal read-only summary without the full appearance UI.
528
690
 
529
691
  `SelectedEdgePanel` accepts these optional props:
530
692
 
531
693
  - `title`: header title text (default `"Selected Edge"`).
532
- - `renderDetails(edge)`: replace the default `from · choice → to` line with a custom renderer.
694
+ - `onNodeSelect(nodeId)`: when set, the default details line renders **from** and **to** node ids as link buttons that invoke this callback (typical host: `setSelection({ kind: 'node', id })` plus `setFocusNodeId`).
695
+ - `renderDetails(edge, { onNodeSelect })`: replace the default `from · choice → to` line with a custom renderer.
533
696
 
534
697
  ## Modals
535
698
 
@@ -682,32 +845,52 @@ function AuditLogModalContainer({
682
845
 
683
846
  ## Toolbar
684
847
 
848
+ ### `buildDefaultToolbarSpec`
849
+
850
+ Builds the default TreeSpec editor toolbar item list from hook state, actions, and adapter capability flags. Includes **+ Add**, **Templates**, layout buttons, **Undo** / **Redo** (when `actions.undo` / `actions.redo` are wired), optional validate/history/audit/snapshot/clone actions, **Save draft**, **Publish**, and **Preview** — but **not** draft/autosave status chrome (use `GraphEditorInfoPanel` for that) and **not** a back link by default (use page breadcrumbs or pass optional `toolbarBackSlot` when you want a toolbar back control).
851
+
852
+ ```tsx
853
+ import { buildDefaultToolbarSpec, ToolbarPanel } from '@signalsafe/tree-spec-editor';
854
+
855
+ const items = buildDefaultToolbarSpec({
856
+ state: editor, // isPublished, canUndo, canRedo, saving, publishing, canPublish, hasTree, …
857
+ actions: {
858
+ ...editor.actions,
859
+ undo: () => editor.actions.undo(),
860
+ redo: () => editor.actions.redo(),
861
+ },
862
+ capabilities: {
863
+ canValidate: Boolean(adapter.validate),
864
+ canPublish: Boolean(adapter.publish),
865
+ // …
866
+ },
867
+ nodeTypes: [{ type: 'prompt' }, { type: 'email' }],
868
+ templates: [{ id: 'starter', label: 'Starter', spec: MY_TEMPLATE }],
869
+ preview: { onClick: openPreview, disabled: !versionId },
870
+ // toolbarBackSlot: { render: () => <Link to="/library">Back</Link> }, // optional — prefer breadcrumbs
871
+ showUndoRedo: true, // default; set false to hide Undo/Redo buttons
872
+ extraItems: [], // optional trailing ToolbarItem entries
873
+ });
874
+
875
+ <ToolbarPanel items={items} />;
876
+ ```
877
+
685
878
  ### `ToolbarPanel`
686
879
 
687
880
  A data-driven toolbar for editor pages. Hosts pass an `items: ToolbarItem[]`
688
881
  array; the package renders Bootstrap chrome (`Button`, `Dropdown`, badge,
689
- muted text) inside a single flex wrapper. All project-specific concerns —
690
- adapter capability gates, dropdown vocabularies, button labels, disabled
691
- rules, and router-aware links — stay in the host as closures inside each
692
- item.
882
+ muted text) inside a single flex wrapper. Project-specific concerns —
883
+ adapter capability gates, dropdown vocabularies, button labels, and disabled
884
+ rules — stay in the host as closures inside each item. Prefer
885
+ `buildDefaultToolbarSpec` for the standard action set.
693
886
 
694
887
  ```tsx
695
888
  import {
696
889
  ToolbarPanel,
697
890
  type ToolbarItem,
698
891
  } from '@signalsafe/tree-spec-editor';
699
- import { Link } from 'react-router-dom';
700
892
 
701
893
  const items: ToolbarItem[] = [
702
- {
703
- kind: 'custom',
704
- id: 'back',
705
- render: () => (
706
- <Link className="btn btn-outline-secondary" to="/scenarios">
707
- Back
708
- </Link>
709
- ),
710
- },
711
894
  {
712
895
  kind: 'dropdown',
713
896
  id: 'add',
@@ -716,14 +899,11 @@ const items: ToolbarItem[] = [
716
899
  entries: [
717
900
  { id: 'prompt', label: 'Prompt', onClick: () => addNode('prompt') },
718
901
  { id: 'email', label: 'Email', onClick: () => addNode('email') },
719
- { id: 'div', label: '', divider: true },
720
- { id: 'outcome', label: 'Outcome node', onClick: () => addNode('outcome') },
721
902
  ],
722
903
  },
723
- { kind: 'button', id: 'reset', label: 'Reset view', onClick: onReset, title: 'Reset view to fit graph' },
724
- { kind: 'button', id: 'save', label: saving ? 'Saving…' : 'Save Draft', variant: 'primary', onClick: onSave, disabled: saving },
725
- { kind: 'badge', id: 'status', label: isPublished ? 'Published (read-only)' : 'Draft', variant: isPublished ? 'success' : 'secondary' },
726
- { kind: 'text', id: 'autosave', content: autosaveLabel },
904
+ { kind: 'button', id: 'reset', label: 'Reset view', onClick: onReset },
905
+ { kind: 'button', id: 'save', label: saving ? 'Saving…' : 'Save draft', onClick: onSave, disabled: saving },
906
+ { kind: 'button', id: 'preview', label: 'Preview', onClick: onPreview },
727
907
  ];
728
908
 
729
909
  <ToolbarPanel items={items} />;
@@ -843,21 +1023,12 @@ Small pure helpers for the parts of an editor page that aren't graph-shaped: the
843
1023
 
844
1024
  ### `getAutosaveStatusLabel(status)`
845
1025
 
846
- Maps an `AutosaveStatus` (`'idle' | 'dirty' | 'saving' | 'saved'`) to a default toolbar label. Returns the empty string for `'idle'` so the toolbar can render nothing between editing sessions.
1026
+ Maps an `AutosaveStatus` (`'idle' | 'dirty' | 'saving' | 'saved'`) to a default label. Returns the empty string for `'idle'`. The reference host page shows this in **`GraphEditorInfoPanel`**, not the top toolbar.
847
1027
 
848
1028
  ```tsx
849
- import {
850
- getAutosaveStatusLabel,
851
- ToolbarPanel,
852
- type AutosaveStatus,
853
- type ToolbarItem,
854
- } from '@signalsafe/tree-spec-editor';
1029
+ import { getAutosaveStatusLabel } from '@signalsafe/tree-spec-editor';
855
1030
 
856
- function buildToolbar(autosaveStatus: AutosaveStatus): ToolbarItem[] {
857
- return [
858
- { kind: 'text', id: 'autosave', content: getAutosaveStatusLabel(autosaveStatus) },
859
- ];
860
- }
1031
+ const label = getAutosaveStatusLabel(autosaveStatus); // e.g. "Saved ✓"
861
1032
  ```
862
1033
 
863
1034
  ### `getKeyboardShortcutAction(params)`
@@ -1026,3 +1197,9 @@ function addPromptNode(tree: EditorTree): EditorTree {
1026
1197
  - Import from the package root only.
1027
1198
  - Install `react`, `react-dom`, `reactflow`, and `react-bootstrap` in the consuming app, and load Bootstrap CSS as usual.
1028
1199
  - If you need wire-format compile/decompile helpers, use `@signalsafe/tree-spec`.
1200
+
1201
+ ## Repository
1202
+
1203
+ Standalone source and releases: [SignalSafeSoftware/tree-spec-editor](https://github.com/SignalSafeSoftware/tree-spec-editor).
1204
+
1205
+ Published as [`@signalsafe/tree-spec-editor`](https://www.npmjs.com/package/@signalsafe/tree-spec-editor) on npm.
@@ -0,0 +1,14 @@
1
+ # Standalone export
2
+
3
+ This tree was generated by `scripts/export-standalone-npm-package.sh tree-spec-editor` from the DeliveryPlus monorepo.
4
+
5
+ ```bash
6
+ git init
7
+ git branch -M main
8
+ git add .
9
+ git commit -m "Sync tree-spec-editor from DeliveryPlus"
10
+ git remote add origin git@github.com:SignalSafeSoftware/tree-spec-editor.git
11
+ git push -u origin main
12
+ ```
13
+
14
+ See `RELEASING.md` for npm publish steps.
package/dist/index.d.ts CHANGED
@@ -23,31 +23,39 @@
23
23
  */
24
24
  export { default } from '@signalsafe/tree-spec-editor-react';
25
25
  export type { TreeSpecGraphEditorProps, GraphEditorVersionInfo } from '@signalsafe/tree-spec-editor-react';
26
- export { default as IssuesPanel } from './panels/IssuesPanel';
27
- export type { IssuesPanelProps } from './panels/IssuesPanel';
28
- export { default as GraphEditorInfoPanel } from './panels/GraphEditorInfoPanel';
29
- export type { GraphEditorInfoPanelProps } from './panels/GraphEditorInfoPanel';
30
- export { default as NodesPanel } from './panels/NodesPanel';
31
- export type { NodesPanelProps } from './panels/NodesPanel';
32
- export { default as AdvancedJsonPanel } from './panels/AdvancedJsonPanel';
33
- export type { AdvancedJsonPanelProps } from './panels/AdvancedJsonPanel';
34
- export { default as InspectorPanel, DEFAULT_OUTCOME_OPTIONS } from './panels/InspectorPanel';
35
- export type { InspectorPanelProps, InspectorNodeRenderContext, InspectorChoiceRenderContext, } from './panels/InspectorPanel';
36
- export { default as SelectedEdgePanel } from './panels/SelectedEdgePanel';
37
- export type { SelectedEdgePanelProps } from './panels/SelectedEdgePanel';
38
- export { default as PublishReviewModal } from './modals/PublishReviewModal';
39
- export type { PublishReviewModalProps } from './modals/PublishReviewModal';
40
- export { default as DraftHistoryModal } from './modals/DraftHistoryModal';
41
- export type { DraftHistoryModalProps } from './modals/DraftHistoryModal';
42
- export { default as AuditLogModal } from './modals/AuditLogModal';
43
- export type { AuditLogModalProps } from './modals/AuditLogModal';
44
- export { default as ToolbarPanel, TOOLBAR_ITEM_KIND } from './panels/ToolbarPanel';
45
- export type { ToolbarPanelProps, ToolbarItem, ToolbarItemKind, ToolbarButtonItem, ToolbarDropdownItem, ToolbarDropdownEntry, ToolbarBadgeItem, ToolbarTextItem, ToolbarCustomItem, } from './panels/ToolbarPanel';
46
- export { getIssueSeverityBadgeClass } from './lib/panelHelpers';
47
- export { default as PanelHeaderCollapseCarets } from './lib/PanelHeaderCollapseCarets';
48
- export { buildDefaultToolbarSpec } from './lib/buildDefaultToolbarSpec';
49
- export type { BuildDefaultToolbarSpecOptions, DefaultToolbarActions, DefaultToolbarCapabilities, DefaultToolbarLabels, DefaultToolbarNodeType, DefaultToolbarState, DefaultToolbarTemplate, } from './lib/buildDefaultToolbarSpec';
50
- export { END_NODE_ID, GRAPH_SELECTION_KIND, safeUUID, getTransition, upsertTransition, deleteTransitionsForChoice, lintEditorTree, parsePydanticOutcomeErrors, shouldQueueInitialValidation, TREE_SPEC_NODE_TYPE_PRESETS, autoLayoutTree, getNextSpawnPosition, getAutosaveStatusLabel, AUTOSAVE_STATUS, getKeyboardShortcutAction, KEYBOARD_SHORTCUT_ACTION, applyTreeTemplate, computeTreeDiffSummary, deleteNode, duplicateNode, buildStableEntries, } from '@signalsafe/tree-spec-editor-core';
51
- export type { EditorChoice, EditorNode, EditorTransition, EditorTree, GraphEditorIssue, GraphSelection, GraphSelectionKind, ReactFlowEdgeChange, ReactFlowNodeChange, TreeSpecAuditEventItem, TreeSpecSnapshotItem, TreeSpecNodeTypePreset, AutosaveStatus, KeyboardShortcutAction, KeyboardShortcutParams, ApplyTreeTemplateOptions, TreeDiffSummary, TreeTemplateNodeSpec, TreeTemplateSpec, TreeTemplateTransitionSpec, } from '@signalsafe/tree-spec-editor-core';
26
+ export { default as IssuesPanel } from './panels/IssuesPanel.js';
27
+ export type { IssuesPanelProps } from './panels/IssuesPanel.js';
28
+ export { default as GraphEditorInfoPanel } from './panels/GraphEditorInfoPanel.js';
29
+ export type { GraphEditorInfoPanelProps } from './panels/GraphEditorInfoPanel.js';
30
+ export { default as NodesPanel } from './panels/NodesPanel.js';
31
+ export type { NodesPanelProps } from './panels/NodesPanel.js';
32
+ export { default as AdvancedJsonPanel } from './panels/AdvancedJsonPanel.js';
33
+ export type { AdvancedJsonPanelProps } from './panels/AdvancedJsonPanel.js';
34
+ export { default as InspectorPanel, DEFAULT_OUTCOME_OPTIONS } from './panels/InspectorPanel.js';
35
+ export type { InspectorPanelProps, InspectorNodeRenderContext, InspectorChoiceRenderContext, } from './panels/InspectorPanel.js';
36
+ export { default as AppearancePanel } from './panels/AppearancePanel.js';
37
+ export type { AppearancePanelProps } from './panels/AppearancePanel.js';
38
+ export { default as SelectedEdgePanel } from './panels/SelectedEdgePanel.js';
39
+ export type { SelectedEdgePanelProps } from './panels/SelectedEdgePanel.js';
40
+ export { default as ChoiceTemplatesPanel } from './panels/ChoiceTemplatesPanel.js';
41
+ export type { ChoiceTemplatesPanelProps, ChoiceTemplateItem, ChoicePresetItem } from './panels/ChoiceTemplatesPanel.js';
42
+ export type { ChoiceTypeOption } from './panels/InspectorPanel.js';
43
+ export { default as ChoiceEdgeAppearanceFields } from './panels/ChoiceEdgeAppearanceFields.js';
44
+ export type { ChoiceEdgeAppearanceFieldsProps } from './panels/ChoiceEdgeAppearanceFields.js';
45
+ export { default as PublishReviewModal } from './modals/PublishReviewModal.js';
46
+ export type { PublishReviewModalProps } from './modals/PublishReviewModal.js';
47
+ export { default as DraftHistoryModal } from './modals/DraftHistoryModal.js';
48
+ export type { DraftHistoryModalProps } from './modals/DraftHistoryModal.js';
49
+ export { default as AuditLogModal } from './modals/AuditLogModal.js';
50
+ export type { AuditLogModalProps } from './modals/AuditLogModal.js';
51
+ export { default as ToolbarPanel, TOOLBAR_ITEM_KIND } from './panels/ToolbarPanel.js';
52
+ export type { ToolbarPanelProps, ToolbarItem, ToolbarItemKind, ToolbarButtonItem, ToolbarDropdownItem, ToolbarDropdownEntry, ToolbarBadgeItem, ToolbarTextItem, ToolbarCustomItem, } from './panels/ToolbarPanel.js';
53
+ export { getIssueSeverityBadgeClass } from './lib/panelHelpers.js';
54
+ export { LIST_SELECTION_CLASS, CANVAS_SELECTION_CLASS, LIST_SELECTION_TEXT_CLASS, CANVAS_SELECTION_TEXT_CLASS } from './lib/selectionStyles.js';
55
+ export { default as PanelHeaderCollapseCarets } from './lib/PanelHeaderCollapseCarets.js';
56
+ export { buildDefaultToolbarSpec } from './lib/buildDefaultToolbarSpec.js';
57
+ export type { BuildDefaultToolbarSpecOptions, DefaultToolbarActions, DefaultToolbarCapabilities, DefaultToolbarLabels, DefaultToolbarNodeType, DefaultToolbarState, DefaultToolbarTemplate, } from './lib/buildDefaultToolbarSpec.js';
58
+ export { END_NODE_ID, GRAPH_SELECTION_KIND, safeUUID, getTransition, upsertTransition, deleteTransitionsForChoice, lintEditorTree, parsePydanticOutcomeErrors, shouldQueueInitialValidation, TREE_SPEC_NODE_TYPE_PRESETS, autoLayoutTree, getNextSpawnPosition, needsInitialLayout, getThemeHints, getEditorHints, isNodeLocked, patchEditorHints, editorHintsToStyle, RENDER_HINTS_THEME_NS, RENDER_HINTS_EDITOR_NS, GRAPH_POSITION_KEY, getAutosaveStatusLabel, AUTOSAVE_STATUS, getKeyboardShortcutAction, KEYBOARD_SHORTCUT_ACTION, applyTreeTemplate, applyEditorConnectOnDrop, computeTreeDiffSummary, deleteNode, duplicateNode, buildStableEntries, } from '@signalsafe/tree-spec-editor-core';
59
+ export type { EditorChoice, EditorNode, EditorTransition, EditorTree, GraphEditorIssue, GraphSelection, GraphSelectionKind, ReactFlowEdgeChange, ReactFlowNodeChange, TreeSpecAuditEventItem, TreeSpecSnapshotItem, TreeSpecNodeTypePreset, AutosaveStatus, KeyboardShortcutAction, KeyboardShortcutParams, ApplyTreeTemplateOptions, TreeDiffSummary, TreeTemplateNodeSpec, TreeTemplateSpec, TreeTemplateTransitionSpec, ConnectOnDropOptions, NodeEditorHints, GraphPosition, } from '@signalsafe/tree-spec-editor-core';
52
60
  export type { TreeSpecIssue, TreeSpecWire } from '@signalsafe/tree-spec';
53
61
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAE7D,YAAY,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE3G,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,OAAO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