@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.
Files changed (95) hide show
  1. package/README.md +15 -0
  2. package/dist/Sparkline.svelte.d.ts +0 -1
  3. package/dist/TellegenMap.svelte +3 -37
  4. package/dist/TellegenMap.svelte.d.ts +0 -1
  5. package/dist/TellegenProvider.svelte.d.ts +0 -1
  6. package/dist/TellegenShell.svelte.d.ts +0 -1
  7. package/dist/TellegenViewer.svelte.d.ts +0 -1
  8. package/dist/api.d.ts +0 -1
  9. package/dist/colors.d.ts +0 -1
  10. package/dist/components/AppFooter.svelte.d.ts +0 -1
  11. package/dist/components/AppHeader.svelte +4 -2
  12. package/dist/components/AppHeader.svelte.d.ts +0 -1
  13. package/dist/components/BindingLines.svelte.d.ts +0 -1
  14. package/dist/components/BusPicker.svelte.d.ts +0 -1
  15. package/dist/components/ControlPanel.svelte.d.ts +0 -1
  16. package/dist/components/DemandSlider.svelte +28 -8
  17. package/dist/components/DemandSlider.svelte.d.ts +0 -1
  18. package/dist/components/DisplayControls.svelte.d.ts +0 -1
  19. package/dist/components/DropZone.svelte.d.ts +0 -1
  20. package/dist/components/FormulationSelector.svelte.d.ts +0 -1
  21. package/dist/components/LocalCaseDetails.svelte +5 -2
  22. package/dist/components/LocalCaseDetails.svelte.d.ts +0 -1
  23. package/dist/components/MulticonductorDetails.svelte +3 -3
  24. package/dist/components/MulticonductorDetails.svelte.d.ts +0 -1
  25. package/dist/components/NetworkStats.svelte.d.ts +0 -1
  26. package/dist/components/PlacementCue.svelte.d.ts +0 -1
  27. package/dist/components/RatingSlider.svelte.d.ts +0 -1
  28. package/dist/components/RestoreDefaultsButton.svelte.d.ts +0 -1
  29. package/dist/components/SensitivityReadout.svelte.d.ts +0 -1
  30. package/dist/components/SizeLegend.svelte.d.ts +0 -1
  31. package/dist/components/SolveCard.svelte.d.ts +0 -1
  32. package/dist/components/TopMovers.svelte.d.ts +0 -1
  33. package/dist/components.d.ts +0 -1
  34. package/dist/context.svelte.d.ts +0 -1
  35. package/dist/controller.svelte.d.ts +24 -12
  36. package/dist/controller.svelte.js +218 -101
  37. package/dist/display.d.ts +0 -1
  38. package/dist/drop-classify.d.ts +5 -42
  39. package/dist/drop-classify.js +5 -78
  40. package/dist/drop-limits.d.ts +27 -0
  41. package/dist/drop-limits.js +83 -0
  42. package/dist/format.d.ts +0 -1
  43. package/dist/index.d.ts +3 -5
  44. package/dist/index.js +2 -2
  45. package/dist/map-bounds.d.ts +5 -0
  46. package/dist/map-bounds.js +41 -0
  47. package/dist/map.d.ts +0 -1
  48. package/dist/multiconductor.d.ts +0 -1
  49. package/dist/state.svelte.d.ts +0 -1
  50. package/dist/study-package.d.ts +0 -1
  51. package/dist/synthetic-layout.d.ts +0 -1
  52. package/dist/synthetic-layout.js +16 -2
  53. package/dist/transformer-icon.d.ts +0 -1
  54. package/dist/types.d.ts +0 -1
  55. package/package.json +14 -11
  56. package/dist/Sparkline.svelte.d.ts.map +0 -1
  57. package/dist/TellegenMap.svelte.d.ts.map +0 -1
  58. package/dist/TellegenProvider.svelte.d.ts.map +0 -1
  59. package/dist/TellegenShell.svelte.d.ts.map +0 -1
  60. package/dist/TellegenViewer.svelte.d.ts.map +0 -1
  61. package/dist/api.d.ts.map +0 -1
  62. package/dist/colors.d.ts.map +0 -1
  63. package/dist/components/AppFooter.svelte.d.ts.map +0 -1
  64. package/dist/components/AppHeader.svelte.d.ts.map +0 -1
  65. package/dist/components/BindingLines.svelte.d.ts.map +0 -1
  66. package/dist/components/BusPicker.svelte.d.ts.map +0 -1
  67. package/dist/components/ControlPanel.svelte.d.ts.map +0 -1
  68. package/dist/components/DemandSlider.svelte.d.ts.map +0 -1
  69. package/dist/components/DisplayControls.svelte.d.ts.map +0 -1
  70. package/dist/components/DropZone.svelte.d.ts.map +0 -1
  71. package/dist/components/FormulationSelector.svelte.d.ts.map +0 -1
  72. package/dist/components/LocalCaseDetails.svelte.d.ts.map +0 -1
  73. package/dist/components/MulticonductorDetails.svelte.d.ts.map +0 -1
  74. package/dist/components/NetworkStats.svelte.d.ts.map +0 -1
  75. package/dist/components/PlacementCue.svelte.d.ts.map +0 -1
  76. package/dist/components/RatingSlider.svelte.d.ts.map +0 -1
  77. package/dist/components/RestoreDefaultsButton.svelte.d.ts.map +0 -1
  78. package/dist/components/SensitivityReadout.svelte.d.ts.map +0 -1
  79. package/dist/components/SizeLegend.svelte.d.ts.map +0 -1
  80. package/dist/components/SolveCard.svelte.d.ts.map +0 -1
  81. package/dist/components/TopMovers.svelte.d.ts.map +0 -1
  82. package/dist/components.d.ts.map +0 -1
  83. package/dist/context.svelte.d.ts.map +0 -1
  84. package/dist/controller.svelte.d.ts.map +0 -1
  85. package/dist/display.d.ts.map +0 -1
  86. package/dist/drop-classify.d.ts.map +0 -1
  87. package/dist/format.d.ts.map +0 -1
  88. package/dist/index.d.ts.map +0 -1
  89. package/dist/map.d.ts.map +0 -1
  90. package/dist/multiconductor.d.ts.map +0 -1
  91. package/dist/state.svelte.d.ts.map +0 -1
  92. package/dist/study-package.d.ts.map +0 -1
  93. package/dist/synthetic-layout.d.ts.map +0 -1
  94. package/dist/transformer-icon.d.ts.map +0 -1
  95. 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:
@@ -5,4 +5,3 @@ type $$ComponentProps = {
5
5
  declare const Sparkline: import("svelte").Component<$$ComponentProps, {}, "">;
6
6
  type Sparkline = ReturnType<typeof Sparkline>;
7
7
  export default Sparkline;
8
- //# sourceMappingURL=Sparkline.svelte.d.ts.map
@@ -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
- const bounds = foldBounds(path);
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 foldBounds(points);
1149
+ return foldMapBounds(points);
1184
1150
  }
1185
1151
 
1186
1152
  // Fly to whatever the header, the initial load, or a branch selection asked
@@ -12,4 +12,3 @@ type $$ComponentProps = {
12
12
  declare const TellegenMap: import("svelte").Component<$$ComponentProps, {}, "">;
13
13
  type TellegenMap = ReturnType<typeof TellegenMap>;
14
14
  export default TellegenMap;
15
- //# sourceMappingURL=TellegenMap.svelte.d.ts.map
@@ -6,4 +6,3 @@ interface Props extends TellegenUiOptions {
6
6
  declare const TellegenProvider: import("svelte").Component<Props, {}, "">;
7
7
  type TellegenProvider = ReturnType<typeof TellegenProvider>;
8
8
  export default TellegenProvider;
9
- //# sourceMappingURL=TellegenProvider.svelte.d.ts.map
@@ -1,4 +1,3 @@
1
1
  declare const TellegenShell: import("svelte").Component<Record<string, never>, {}, "">;
2
2
  type TellegenShell = ReturnType<typeof TellegenShell>;
3
3
  export default TellegenShell;
4
- //# sourceMappingURL=TellegenShell.svelte.d.ts.map
@@ -1,4 +1,3 @@
1
1
  declare const TellegenViewer: import("svelte").Component<Partial<import("./context.svelte.js").TellegenUiConfig>, {}, "">;
2
2
  type TellegenViewer = ReturnType<typeof TellegenViewer>;
3
3
  export default TellegenViewer;
4
- //# sourceMappingURL=TellegenViewer.svelte.d.ts.map
package/dist/api.d.ts CHANGED
@@ -41,4 +41,3 @@ export interface SolveStreamHandlers {
41
41
  ondone?: () => void;
42
42
  }
43
43
  export declare function createApiClient(options?: TellegenApiClientOptions): TellegenApiClient;
44
- //# sourceMappingURL=api.d.ts.map
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
@@ -4,4 +4,3 @@ type $$ComponentProps = {
4
4
  declare const AppFooter: import("svelte").Component<$$ComponentProps, {}, "">;
5
5
  type AppFooter = ReturnType<typeof AppFooter>;
6
6
  export default AppFooter;
7
- //# sourceMappingURL=AppFooter.svelte.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
- if (input.files) ctrl.ingestFiles(Array.from(input.files));
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
  />
@@ -1,4 +1,3 @@
1
1
  declare const AppHeader: import("svelte").Component<Record<string, never>, {}, "">;
2
2
  type AppHeader = ReturnType<typeof AppHeader>;
3
3
  export default AppHeader;
4
- //# sourceMappingURL=AppHeader.svelte.d.ts.map
@@ -1,4 +1,3 @@
1
1
  declare const BindingLines: import("svelte").Component<Record<string, never>, {}, "">;
2
2
  type BindingLines = ReturnType<typeof BindingLines>;
3
3
  export default BindingLines;
4
- //# sourceMappingURL=BindingLines.svelte.d.ts.map
@@ -4,4 +4,3 @@ type $$ComponentProps = {
4
4
  declare const BusPicker: import("svelte").Component<$$ComponentProps, {}, "">;
5
5
  type BusPicker = ReturnType<typeof BusPicker>;
6
6
  export default BusPicker;
7
- //# sourceMappingURL=BusPicker.svelte.d.ts.map
@@ -1,4 +1,3 @@
1
1
  declare const ControlPanel: import("svelte").Component<Record<string, never>, {}, "">;
2
2
  type ControlPanel = ReturnType<typeof ControlPanel>;
3
3
  export default ControlPanel;
4
- //# sourceMappingURL=ControlPanel.svelte.d.ts.map
@@ -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
- aria-pressed={app.demandRangeMode === 'local'}
43
- aria-label="nearby demand range"
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
- aria-pressed={app.demandRangeMode === 'full'}
51
- aria-label="full demand range"
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
- <span class="mono dim">{fmt.format(ctrl.sliderMin)} to {fmt.format(ctrl.sliderMax)} MW</span>
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
- title={sliderTip}
71
+ title={disabled ? disabledTip : sliderTip}
62
72
  >
63
73
  <input
64
74
  type="range"
65
75
  min={ctrl.sliderMin}
66
- max={ctrl.sliderMax}
67
- step="any"
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;
@@ -1,4 +1,3 @@
1
1
  declare const DemandSlider: import("svelte").Component<Record<string, never>, {}, "">;
2
2
  type DemandSlider = ReturnType<typeof DemandSlider>;
3
3
  export default DemandSlider;
4
- //# sourceMappingURL=DemandSlider.svelte.d.ts.map
@@ -16,4 +16,3 @@ declare const DisplayControls: $$__sveltets_2_IsomorphicComponent<Record<string,
16
16
  }, {}, {}, string>;
17
17
  type DisplayControls = InstanceType<typeof DisplayControls>;
18
18
  export default DisplayControls;
19
- //# sourceMappingURL=DisplayControls.svelte.d.ts.map
@@ -16,4 +16,3 @@ declare const DropZone: $$__sveltets_2_IsomorphicComponent<Record<string, never>
16
16
  }, {}, {}, string>;
17
17
  type DropZone = InstanceType<typeof DropZone>;
18
18
  export default DropZone;
19
- //# sourceMappingURL=DropZone.svelte.d.ts.map
@@ -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
- // Powerio writer tokens the committed state exports to; label carries the extension.
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: 'powerio-json', label: 'PowerIO (.json)' }
18
+ { token: 'model-json', label: 'PowerIO model (.json)' }
16
19
  ];
17
20
 
18
21
  let busy = $state(false);
@@ -1,4 +1,3 @@
1
1
  declare const LocalCaseDetails: import("svelte").Component<Record<string, never>, {}, "">;
2
2
  type LocalCaseDetails = ReturnType<typeof LocalCaseDetails>;
3
3
  export default LocalCaseDetails;
4
- //# sourceMappingURL=LocalCaseDetails.svelte.d.ts.map
@@ -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 NetworkStats: $$__sveltets_2_IsomorphicComponent<Record<string, ne
16
16
  }, {}, {}, string>;
17
17
  type NetworkStats = InstanceType<typeof NetworkStats>;
18
18
  export default NetworkStats;
19
- //# sourceMappingURL=NetworkStats.svelte.d.ts.map
@@ -16,4 +16,3 @@ declare const PlacementCue: $$__sveltets_2_IsomorphicComponent<Record<string, ne
16
16
  }, {}, {}, string>;
17
17
  type PlacementCue = InstanceType<typeof PlacementCue>;
18
18
  export default PlacementCue;
19
- //# sourceMappingURL=PlacementCue.svelte.d.ts.map
@@ -1,4 +1,3 @@
1
1
  declare const RatingSlider: import("svelte").Component<Record<string, never>, {}, "">;
2
2
  type RatingSlider = ReturnType<typeof RatingSlider>;
3
3
  export default RatingSlider;
4
- //# sourceMappingURL=RatingSlider.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
@@ -1,4 +1,3 @@
1
1
  declare const SensitivityReadout: import("svelte").Component<Record<string, never>, {}, "">;
2
2
  type SensitivityReadout = ReturnType<typeof SensitivityReadout>;
3
3
  export default SensitivityReadout;
4
- //# sourceMappingURL=SensitivityReadout.svelte.d.ts.map
@@ -16,4 +16,3 @@ declare const SizeLegend: $$__sveltets_2_IsomorphicComponent<Record<string, neve
16
16
  }, {}, {}, string>;
17
17
  type SizeLegend = InstanceType<typeof SizeLegend>;
18
18
  export default SizeLegend;
19
- //# sourceMappingURL=SizeLegend.svelte.d.ts.map
@@ -1,4 +1,3 @@
1
1
  declare const SolveCard: import("svelte").Component<Record<string, never>, {}, "">;
2
2
  type SolveCard = ReturnType<typeof SolveCard>;
3
3
  export default SolveCard;
4
- //# sourceMappingURL=SolveCard.svelte.d.ts.map
@@ -16,4 +16,3 @@ declare const TopMovers: $$__sveltets_2_IsomorphicComponent<Record<string, never
16
16
  }, {}, {}, string>;
17
17
  type TopMovers = InstanceType<typeof TopMovers>;
18
18
  export default TopMovers;
19
- //# sourceMappingURL=TopMovers.svelte.d.ts.map
@@ -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
@@ -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: a saved study package restores
276
- * (`restored`), a multiconductor package or a BMOPF/PMD distribution
277
- * document views (`viewed`), `failed` means the content looked routable but
278
- * the engine rejected it (a fail-closed message is set), and `not-package`
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 restored study package: the same shape a dropped case
307
- * takes, with the saved demand/rating deltas and formulation pre-applied. */
308
- private restoreLocalFromPackage;
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