@tellegen/svelte 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/Sparkline.svelte.d.ts +0 -1
- package/dist/TellegenMap.svelte +3 -37
- package/dist/TellegenMap.svelte.d.ts +0 -1
- package/dist/TellegenProvider.svelte.d.ts +0 -1
- package/dist/TellegenShell.svelte.d.ts +0 -1
- package/dist/TellegenViewer.svelte.d.ts +0 -1
- package/dist/api.d.ts +0 -1
- package/dist/colors.d.ts +0 -1
- package/dist/components/AppFooter.svelte.d.ts +0 -1
- package/dist/components/AppHeader.svelte +4 -2
- package/dist/components/AppHeader.svelte.d.ts +0 -1
- package/dist/components/BindingLines.svelte.d.ts +0 -1
- package/dist/components/BusPicker.svelte.d.ts +0 -1
- package/dist/components/ControlPanel.svelte.d.ts +0 -1
- package/dist/components/DemandSlider.svelte +28 -8
- package/dist/components/DemandSlider.svelte.d.ts +0 -1
- package/dist/components/DisplayControls.svelte.d.ts +0 -1
- package/dist/components/DropZone.svelte.d.ts +0 -1
- package/dist/components/FormulationSelector.svelte.d.ts +0 -1
- package/dist/components/LocalCaseDetails.svelte +5 -2
- package/dist/components/LocalCaseDetails.svelte.d.ts +0 -1
- package/dist/components/MulticonductorDetails.svelte +3 -3
- package/dist/components/MulticonductorDetails.svelte.d.ts +0 -1
- package/dist/components/NetworkStats.svelte.d.ts +0 -1
- package/dist/components/PlacementCue.svelte.d.ts +0 -1
- package/dist/components/RatingSlider.svelte.d.ts +0 -1
- package/dist/components/RestoreDefaultsButton.svelte.d.ts +0 -1
- package/dist/components/SensitivityReadout.svelte.d.ts +0 -1
- package/dist/components/SizeLegend.svelte.d.ts +0 -1
- package/dist/components/SolveCard.svelte.d.ts +0 -1
- package/dist/components/TopMovers.svelte.d.ts +0 -1
- package/dist/components.d.ts +0 -1
- package/dist/context.svelte.d.ts +0 -1
- package/dist/controller.svelte.d.ts +24 -12
- package/dist/controller.svelte.js +218 -101
- package/dist/display.d.ts +0 -1
- package/dist/drop-classify.d.ts +5 -42
- package/dist/drop-classify.js +5 -78
- package/dist/drop-limits.d.ts +27 -0
- package/dist/drop-limits.js +83 -0
- package/dist/format.d.ts +0 -1
- package/dist/index.d.ts +3 -5
- package/dist/index.js +2 -2
- package/dist/map-bounds.d.ts +5 -0
- package/dist/map-bounds.js +41 -0
- package/dist/map.d.ts +0 -1
- package/dist/multiconductor.d.ts +0 -1
- package/dist/state.svelte.d.ts +0 -1
- package/dist/study-package.d.ts +0 -1
- package/dist/synthetic-layout.d.ts +0 -1
- package/dist/synthetic-layout.js +16 -2
- package/dist/transformer-icon.d.ts +0 -1
- package/dist/types.d.ts +0 -1
- package/package.json +14 -11
- package/dist/Sparkline.svelte.d.ts.map +0 -1
- package/dist/TellegenMap.svelte.d.ts.map +0 -1
- package/dist/TellegenProvider.svelte.d.ts.map +0 -1
- package/dist/TellegenShell.svelte.d.ts.map +0 -1
- package/dist/TellegenViewer.svelte.d.ts.map +0 -1
- package/dist/api.d.ts.map +0 -1
- package/dist/colors.d.ts.map +0 -1
- package/dist/components/AppFooter.svelte.d.ts.map +0 -1
- package/dist/components/AppHeader.svelte.d.ts.map +0 -1
- package/dist/components/BindingLines.svelte.d.ts.map +0 -1
- package/dist/components/BusPicker.svelte.d.ts.map +0 -1
- package/dist/components/ControlPanel.svelte.d.ts.map +0 -1
- package/dist/components/DemandSlider.svelte.d.ts.map +0 -1
- package/dist/components/DisplayControls.svelte.d.ts.map +0 -1
- package/dist/components/DropZone.svelte.d.ts.map +0 -1
- package/dist/components/FormulationSelector.svelte.d.ts.map +0 -1
- package/dist/components/LocalCaseDetails.svelte.d.ts.map +0 -1
- package/dist/components/MulticonductorDetails.svelte.d.ts.map +0 -1
- package/dist/components/NetworkStats.svelte.d.ts.map +0 -1
- package/dist/components/PlacementCue.svelte.d.ts.map +0 -1
- package/dist/components/RatingSlider.svelte.d.ts.map +0 -1
- package/dist/components/RestoreDefaultsButton.svelte.d.ts.map +0 -1
- package/dist/components/SensitivityReadout.svelte.d.ts.map +0 -1
- package/dist/components/SizeLegend.svelte.d.ts.map +0 -1
- package/dist/components/SolveCard.svelte.d.ts.map +0 -1
- package/dist/components/TopMovers.svelte.d.ts.map +0 -1
- package/dist/components.d.ts.map +0 -1
- package/dist/context.svelte.d.ts.map +0 -1
- package/dist/controller.svelte.d.ts.map +0 -1
- package/dist/display.d.ts.map +0 -1
- package/dist/drop-classify.d.ts.map +0 -1
- package/dist/format.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/map.d.ts.map +0 -1
- package/dist/multiconductor.d.ts.map +0 -1
- package/dist/state.svelte.d.ts.map +0 -1
- package/dist/study-package.d.ts.map +0 -1
- package/dist/synthetic-layout.d.ts.map +0 -1
- package/dist/transformer-icon.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -28,6 +28,10 @@ Use local files only by disabling bundled case loading:
|
|
|
28
28
|
<TellegenViewer loadDefaultCases={false} showFooter={false} />
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
The viewer accepts at most 32 files in one ingestion batch. Each file must be
|
|
32
|
+
at most 128 MiB, and the aggregate batch must also be at most 128 MiB. Files
|
|
33
|
+
remain in the browser on this path.
|
|
34
|
+
|
|
31
35
|
`TellegenViewer` accepts:
|
|
32
36
|
|
|
33
37
|
- `apiBase`, default `/api`
|
|
@@ -50,6 +54,17 @@ Use `TellegenProvider` and `TellegenShell` when state should survive route chang
|
|
|
50
54
|
</TellegenProvider>
|
|
51
55
|
```
|
|
52
56
|
|
|
57
|
+
## Engine Reexports
|
|
58
|
+
|
|
59
|
+
The package reexports the browser engine helpers, including `ingestCase`,
|
|
60
|
+
`classifyJson`, and `ingestJsonDrop`, for custom drop surfaces. In 0.2 these
|
|
61
|
+
APIs use byte input: pass `Uint8Array` to `ingestCase`, await
|
|
62
|
+
`classifyJson(bytes)` and read its `{ kind, format }` result, and use
|
|
63
|
+
`ingestJsonDrop(bytes)` to classify and parse in one call. `isStudyPackageText`
|
|
64
|
+
was removed; test for `kind === "balanced-package"` instead. `JsonDropKind` now
|
|
65
|
+
includes `transmission`, `distribution`, `ambiguous`, and `unknown`; BMOPF and
|
|
66
|
+
PMD are distribution `format` values rather than separate kinds.
|
|
67
|
+
|
|
53
68
|
## Release
|
|
54
69
|
|
|
55
70
|
Build and inspect the package from the repository root:
|
package/dist/TellegenMap.svelte
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
type TransformerMark
|
|
33
33
|
} from './multiconductor.js';
|
|
34
34
|
import { transformerIcon } from './transformer-icon.js';
|
|
35
|
+
import { foldMapBounds } from './map-bounds.js';
|
|
35
36
|
import { getAppState, getController } from './context.svelte.js';
|
|
36
37
|
import { displayFmt, fmt, rgbaCss } from './format.js';
|
|
37
38
|
import type { RGBA } from './colors.js';
|
|
@@ -505,43 +506,8 @@
|
|
|
505
506
|
: { top: 96, left: 380, right: 60, bottom: 64 };
|
|
506
507
|
}
|
|
507
508
|
|
|
508
|
-
/** Fold lon/lat pairs into LngLat bounds; null when no point is finite. */
|
|
509
|
-
function foldBounds(
|
|
510
|
-
points: Iterable<[number, number]>
|
|
511
|
-
): [[number, number], [number, number]] | null {
|
|
512
|
-
let minLon = Infinity;
|
|
513
|
-
let minLat = Infinity;
|
|
514
|
-
let maxLon = -Infinity;
|
|
515
|
-
let maxLat = -Infinity;
|
|
516
|
-
for (const [lon, lat] of points) {
|
|
517
|
-
minLon = Math.min(minLon, lon);
|
|
518
|
-
minLat = Math.min(minLat, lat);
|
|
519
|
-
maxLon = Math.max(maxLon, lon);
|
|
520
|
-
maxLat = Math.max(maxLat, lat);
|
|
521
|
-
}
|
|
522
|
-
if (!Number.isFinite(minLon) || !Number.isFinite(minLat)) return null;
|
|
523
|
-
return [
|
|
524
|
-
[minLon, minLat],
|
|
525
|
-
[maxLon, maxLat]
|
|
526
|
-
];
|
|
527
|
-
}
|
|
528
|
-
|
|
529
509
|
function branchBounds(path: [number, number][]): LngLatBoundsLike | null {
|
|
530
|
-
|
|
531
|
-
if (!bounds) return null;
|
|
532
|
-
let [[minLon, minLat], [maxLon, maxLat]] = bounds;
|
|
533
|
-
if (minLon === maxLon) {
|
|
534
|
-
minLon -= 0.005;
|
|
535
|
-
maxLon += 0.005;
|
|
536
|
-
}
|
|
537
|
-
if (minLat === maxLat) {
|
|
538
|
-
minLat -= 0.005;
|
|
539
|
-
maxLat += 0.005;
|
|
540
|
-
}
|
|
541
|
-
return [
|
|
542
|
-
[minLon, minLat],
|
|
543
|
-
[maxLon, maxLat]
|
|
544
|
-
];
|
|
510
|
+
return foldMapBounds(path);
|
|
545
511
|
}
|
|
546
512
|
|
|
547
513
|
function prefersReducedMotion(): boolean {
|
|
@@ -1180,7 +1146,7 @@
|
|
|
1180
1146
|
if (target !== 'all' && c.id !== target) continue;
|
|
1181
1147
|
if (c.view) fold(c.view.buses);
|
|
1182
1148
|
}
|
|
1183
|
-
return
|
|
1149
|
+
return foldMapBounds(points);
|
|
1184
1150
|
}
|
|
1185
1151
|
|
|
1186
1152
|
// Fly to whatever the header, the initial load, or a branch selection asked
|
package/dist/api.d.ts
CHANGED
package/dist/colors.d.ts
CHANGED
|
@@ -48,4 +48,3 @@ export declare function branchWidth(loading: number): number;
|
|
|
48
48
|
/** Bus radius in px; area tracks max(load, gen) so big plants and big loads
|
|
49
49
|
* both read at a glance. Shared by the map layers and the size legend. */
|
|
50
50
|
export declare function busRadius(maxMw: number): number;
|
|
51
|
-
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -97,13 +97,15 @@
|
|
|
97
97
|
</span>
|
|
98
98
|
<input
|
|
99
99
|
type="file"
|
|
100
|
-
accept=".m,.raw,.aux,.dss,.pwd,.csv,.json,.geojson"
|
|
100
|
+
accept=".m,.raw,.aux,.epc,.pwb,.dss,.pwd,.csv,.json,.geojson"
|
|
101
101
|
multiple
|
|
102
102
|
hidden
|
|
103
103
|
bind:this={fileInput}
|
|
104
104
|
onchange={(e) => {
|
|
105
105
|
const input = e.currentTarget;
|
|
106
|
-
|
|
106
|
+
// Pass the FileList through unchanged: the controller checks its declared
|
|
107
|
+
// count before materializing any entries.
|
|
108
|
+
if (input.files) ctrl.ingestFiles(input.files);
|
|
107
109
|
input.value = '';
|
|
108
110
|
}}
|
|
109
111
|
/>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
const app = getAppState();
|
|
6
6
|
const ctrl = getController();
|
|
7
|
+
const disabled = $derived(ctrl.sliderDisabled);
|
|
7
8
|
|
|
8
9
|
// Fill from the committed demand to the live thumb. The local number line stays
|
|
9
10
|
// stable after release; only the committed tick moves.
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
const fillHi = $derived(valFrac < neutralFrac ? neutralPos : valPos);
|
|
24
25
|
const sliderTip =
|
|
25
26
|
'The black tick marks the last committed demand. Drag the knob to preview a new demand; release to solve and move the tick to that point.';
|
|
27
|
+
const disabledTip = 'this analysis bus is display-only; demand is not adjustable';
|
|
26
28
|
const scoreTip =
|
|
27
29
|
'Gradient is the estimate of total cost change versus base before the solve finishes. It uses the selected bus LMP times the demand step, plus local curvature when the preview engine is unavailable. Exact is the resolved OPF objective change.';
|
|
28
30
|
</script>
|
|
@@ -39,32 +41,41 @@
|
|
|
39
41
|
<button
|
|
40
42
|
type="button"
|
|
41
43
|
class:active={app.demandRangeMode === 'local'}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
aria-pressed={app.demandRangeMode === 'local'}
|
|
45
|
+
aria-label="nearby demand range"
|
|
46
|
+
disabled={disabled}
|
|
44
47
|
title="range near the selected demand setting"
|
|
45
48
|
onclick={() => ctrl.setDemandRangeMode('local')}>nearby</button
|
|
46
49
|
>
|
|
47
50
|
<button
|
|
48
51
|
type="button"
|
|
49
52
|
class:active={app.demandRangeMode === 'full'}
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
aria-pressed={app.demandRangeMode === 'full'}
|
|
54
|
+
aria-label="full demand range"
|
|
55
|
+
disabled={disabled}
|
|
52
56
|
title="range from zero load to the local physical limit"
|
|
53
57
|
onclick={() => ctrl.setDemandRangeMode('full')}>full range</button
|
|
54
58
|
>
|
|
55
59
|
</div>
|
|
56
|
-
|
|
60
|
+
<span class="mono dim">
|
|
61
|
+
{#if disabled}
|
|
62
|
+
not adjustable
|
|
63
|
+
{:else}
|
|
64
|
+
{fmt.format(ctrl.sliderMin)} to {fmt.format(ctrl.sliderMax)} MW
|
|
65
|
+
{/if}
|
|
66
|
+
</span>
|
|
57
67
|
</div>
|
|
58
68
|
<div
|
|
59
69
|
class="slider-track"
|
|
60
70
|
style="--fill-lo:{fillLo}; --fill-hi:{fillHi}; --neutral-pos:{neutralPos}"
|
|
61
|
-
|
|
71
|
+
title={disabled ? disabledTip : sliderTip}
|
|
62
72
|
>
|
|
63
73
|
<input
|
|
64
74
|
type="range"
|
|
65
75
|
min={ctrl.sliderMin}
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
max={ctrl.sliderMax}
|
|
77
|
+
step="any"
|
|
78
|
+
disabled={disabled}
|
|
68
79
|
bind:value={ctrl.sliderCurrent, ctrl.setSliderPreview}
|
|
69
80
|
aria-label="demand delta at selected bus"
|
|
70
81
|
onpointerdown={() => ctrl.setSliderPreview(ctrl.sliderValue)}
|
|
@@ -173,6 +184,15 @@
|
|
|
173
184
|
margin: 0;
|
|
174
185
|
}
|
|
175
186
|
|
|
187
|
+
input[type='range']:disabled {
|
|
188
|
+
opacity: 0.45;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.range-mode button:disabled {
|
|
192
|
+
cursor: default;
|
|
193
|
+
opacity: 0.45;
|
|
194
|
+
}
|
|
195
|
+
|
|
176
196
|
input[type='range']::-webkit-slider-thumb {
|
|
177
197
|
-webkit-appearance: none;
|
|
178
198
|
appearance: none;
|
|
@@ -16,4 +16,3 @@ declare const FormulationSelector: $$__sveltets_2_IsomorphicComponent<Record<str
|
|
|
16
16
|
}, {}, {}, string>;
|
|
17
17
|
type FormulationSelector = InstanceType<typeof FormulationSelector>;
|
|
18
18
|
export default FormulationSelector;
|
|
19
|
-
//# sourceMappingURL=FormulationSelector.svelte.d.ts.map
|
|
@@ -6,13 +6,16 @@
|
|
|
6
6
|
const app = getAppState();
|
|
7
7
|
const ctrl = getController();
|
|
8
8
|
|
|
9
|
-
//
|
|
9
|
+
// Export tokens the committed state writes to; labels carry their extensions.
|
|
10
|
+
// `model-json` is powerio's own model document, not a case format.
|
|
10
11
|
const EXPORT_FORMATS = [
|
|
11
12
|
{ token: 'matpower', label: 'MATPOWER (.m)' },
|
|
12
13
|
{ token: 'psse', label: 'PSS/E (.raw)' },
|
|
14
|
+
{ token: 'powerworld', label: 'PowerWorld (.aux)' },
|
|
15
|
+
{ token: 'pslf', label: 'PSLF (.epc)' },
|
|
13
16
|
{ token: 'powermodels-json', label: 'PowerModels (.json)' },
|
|
14
17
|
{ token: 'pandapower-json', label: 'pandapower (.json)' },
|
|
15
|
-
{ token: '
|
|
18
|
+
{ token: 'model-json', label: 'PowerIO model (.json)' }
|
|
16
19
|
];
|
|
17
20
|
|
|
18
21
|
let busy = $state(false);
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
<dt>sources / loads / gens</dt>
|
|
55
55
|
<dd>{s.n_source} / {s.n_load} / {s.n_generator}</dd>
|
|
56
56
|
</div>
|
|
57
|
-
{#if s.n_ibr > 0 || s.n_shunt > 0}
|
|
57
|
+
{#if s.n_ibr > 0 || s.n_shunt > 0 || (s.n_capacitor ?? 0) > 0}
|
|
58
58
|
<div>
|
|
59
|
-
<dt>IBRs / shunts</dt>
|
|
60
|
-
<dd>{s.n_ibr} / {s.n_shunt}</dd>
|
|
59
|
+
<dt>IBRs / shunts / caps</dt>
|
|
60
|
+
<dd>{s.n_ibr} / {s.n_shunt} / {s.n_capacitor ?? 0}</dd>
|
|
61
61
|
</div>
|
|
62
62
|
{/if}
|
|
63
63
|
</dl>
|
|
@@ -16,4 +16,3 @@ declare const MulticonductorDetails: $$__sveltets_2_IsomorphicComponent<Record<s
|
|
|
16
16
|
}, {}, {}, string>;
|
|
17
17
|
type MulticonductorDetails = InstanceType<typeof MulticonductorDetails>;
|
|
18
18
|
export default MulticonductorDetails;
|
|
19
|
-
//# sourceMappingURL=MulticonductorDetails.svelte.d.ts.map
|
|
@@ -16,4 +16,3 @@ declare const RestoreDefaultsButton: $$__sveltets_2_IsomorphicComponent<Record<s
|
|
|
16
16
|
}, {}, {}, string>;
|
|
17
17
|
type RestoreDefaultsButton = InstanceType<typeof RestoreDefaultsButton>;
|
|
18
18
|
export default RestoreDefaultsButton;
|
|
19
|
-
//# sourceMappingURL=RestoreDefaultsButton.svelte.d.ts.map
|
package/dist/components.d.ts
CHANGED
|
@@ -16,4 +16,3 @@ export { default as SizeLegend } from './components/SizeLegend.svelte';
|
|
|
16
16
|
export { default as SolveCard } from './components/SolveCard.svelte';
|
|
17
17
|
export { default as TopMovers } from './components/TopMovers.svelte';
|
|
18
18
|
export { default as Sparkline } from './Sparkline.svelte';
|
|
19
|
-
//# sourceMappingURL=components.d.ts.map
|
package/dist/context.svelte.d.ts
CHANGED
|
@@ -17,4 +17,3 @@ export declare const setUiConfig: (config: TellegenUiConfig) => TellegenUiConfig
|
|
|
17
17
|
export declare const getAppState: () => AppState;
|
|
18
18
|
export declare const getController: () => Controller;
|
|
19
19
|
export declare const getUiConfig: () => TellegenUiConfig;
|
|
20
|
-
//# sourceMappingURL=context.svelte.d.ts.map
|
|
@@ -10,6 +10,11 @@ type GeoLayerFile = {
|
|
|
10
10
|
layer: string;
|
|
11
11
|
warnings: string[];
|
|
12
12
|
};
|
|
13
|
+
/** A lowered analysis row is view-only only when a current producer says so;
|
|
14
|
+
* absence keeps payloads from older compatible engine/server versions editable. */
|
|
15
|
+
export declare function isDisplayOnlyElement(element: {
|
|
16
|
+
editable?: boolean;
|
|
17
|
+
} | null | undefined): boolean;
|
|
13
18
|
export type { SolvableCase };
|
|
14
19
|
type DemandRangeAnchor = {
|
|
15
20
|
caseId: string;
|
|
@@ -41,6 +46,7 @@ export declare class Controller {
|
|
|
41
46
|
}>;
|
|
42
47
|
localSeq: number;
|
|
43
48
|
loading: Promise<void> | null;
|
|
49
|
+
private readonly dropBatchGate;
|
|
44
50
|
nearbyRangeAnchor: DemandRangeAnchor | null;
|
|
45
51
|
hiddenDefaults: Set<string>;
|
|
46
52
|
casesLoaded: boolean;
|
|
@@ -144,6 +150,7 @@ export declare class Controller {
|
|
|
144
150
|
};
|
|
145
151
|
sliderMin: number;
|
|
146
152
|
sliderMax: number;
|
|
153
|
+
sliderDisabled: boolean;
|
|
147
154
|
committedRating: number;
|
|
148
155
|
ratingSliderValue: number;
|
|
149
156
|
ratingBounds: {
|
|
@@ -262,23 +269,26 @@ export declare class Controller {
|
|
|
262
269
|
resetCase: (c: SolvableCase) => void;
|
|
263
270
|
changeFormulation: (c: SolvableCase, next: Formulation) => void;
|
|
264
271
|
/** Parse dropped files in the browser via the powerio wasm module. Case
|
|
265
|
-
* files (.m, .raw, .aux) become local networks; geographic files can
|
|
272
|
+
* files (.m, .raw, .aux, .epc, .pwb) become local networks; geographic files can
|
|
266
273
|
* place those networks; a PowerWorld .pwd becomes a substation point
|
|
267
274
|
* preview. Files run serially; nothing uploads. */
|
|
268
275
|
ingestFiles: (files: FileList | File[]) => Promise<void>;
|
|
276
|
+
private ingestFileBatch;
|
|
277
|
+
/** Apply co-dropped geographic data before a local case becomes active and
|
|
278
|
+
* starts solving. Without geographic data, let a coordinate-less case borrow
|
|
279
|
+
* the first matching PowerWorld display. A failed geographic join keeps the
|
|
280
|
+
* parsed case and returns the user-facing placement error. */
|
|
281
|
+
private prepareDroppedLocal;
|
|
269
282
|
/** Fill a coordinate-less case's positions from a co-dropped PowerWorld
|
|
270
283
|
* `.pwd`: the display's substation points project to approximate
|
|
271
284
|
* longitude/latitude and join onto buses through the `SubNum` extras key.
|
|
272
285
|
* The first display that joins wins; one that matches nothing stays
|
|
273
286
|
* available as its own preview entry, and the case stays placeable. */
|
|
274
287
|
private fillFromDisplaySibling;
|
|
275
|
-
/** Route a dropped `.json` by its content
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
|
|
279
|
-
* falls through to the caller's geo/case handling. `drop-classify` is the
|
|
280
|
-
* single owner of the classification. */
|
|
281
|
-
private ingestJsonDrop;
|
|
288
|
+
/** Route a dropped `.json` by its content. Recognized payloads return without
|
|
289
|
+
* mutating case state so co-dropped sidecars can be applied first; unrouted
|
|
290
|
+
* content returns the bytes already read for the geographic fallback. */
|
|
291
|
+
private routeJsonDrop;
|
|
282
292
|
/** Parse a dropped OpenDSS `.dss` file into a multiconductor viewing case.
|
|
283
293
|
* Returns true when a case landed; a parse failure sets the panel error. */
|
|
284
294
|
private ingestDistFile;
|
|
@@ -303,9 +313,12 @@ export declare class Controller {
|
|
|
303
313
|
/** The unified map click-to-place: a pending multiconductor case takes the
|
|
304
314
|
* click first, otherwise a pending local case does. */
|
|
305
315
|
placeCase: (lon: number, lat: number) => void;
|
|
306
|
-
/** Build a local case from a
|
|
307
|
-
*
|
|
308
|
-
private
|
|
316
|
+
/** Build a local case from a bare balanced ingest payload without activating
|
|
317
|
+
* it yet; co-dropped placement data is applied before the first solve. */
|
|
318
|
+
private localFromBalancedPayload;
|
|
319
|
+
/** Build a local case from a saved package, including its edit state and
|
|
320
|
+
* formulation, without activating it until sidecars have been applied. */
|
|
321
|
+
private localFromPackage;
|
|
309
322
|
/** Build (or reuse) the case's Study and commit it at the current edit state, so a
|
|
310
323
|
* save or export captures exactly what is on screen. Null (with an error set) when no
|
|
311
324
|
* network or Study is available. */
|
|
@@ -334,4 +347,3 @@ export declare class Controller {
|
|
|
334
347
|
ratingSliderCurrent: () => number;
|
|
335
348
|
}
|
|
336
349
|
export declare function createController(app: AppState, options?: ControllerOptions): Controller;
|
|
337
|
-
//# sourceMappingURL=controller.svelte.d.ts.map
|