@tellegen/svelte 0.1.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 (121) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +70 -0
  3. package/dist/Sparkline.svelte +100 -0
  4. package/dist/Sparkline.svelte.d.ts +8 -0
  5. package/dist/Sparkline.svelte.d.ts.map +1 -0
  6. package/dist/TellegenMap.svelte +1430 -0
  7. package/dist/TellegenMap.svelte.d.ts +14 -0
  8. package/dist/TellegenMap.svelte.d.ts.map +1 -0
  9. package/dist/TellegenProvider.svelte +38 -0
  10. package/dist/TellegenProvider.svelte.d.ts +9 -0
  11. package/dist/TellegenProvider.svelte.d.ts.map +1 -0
  12. package/dist/TellegenShell.svelte +126 -0
  13. package/dist/TellegenShell.svelte.d.ts +4 -0
  14. package/dist/TellegenShell.svelte.d.ts.map +1 -0
  15. package/dist/TellegenViewer.svelte +19 -0
  16. package/dist/TellegenViewer.svelte.d.ts +4 -0
  17. package/dist/TellegenViewer.svelte.d.ts.map +1 -0
  18. package/dist/api.d.ts +44 -0
  19. package/dist/api.d.ts.map +1 -0
  20. package/dist/api.js +137 -0
  21. package/dist/colors.d.ts +51 -0
  22. package/dist/colors.d.ts.map +1 -0
  23. package/dist/colors.js +140 -0
  24. package/dist/components/AppFooter.svelte +73 -0
  25. package/dist/components/AppFooter.svelte.d.ts +19 -0
  26. package/dist/components/AppFooter.svelte.d.ts.map +1 -0
  27. package/dist/components/AppHeader.svelte +405 -0
  28. package/dist/components/AppHeader.svelte.d.ts +4 -0
  29. package/dist/components/AppHeader.svelte.d.ts.map +1 -0
  30. package/dist/components/BindingLines.svelte +101 -0
  31. package/dist/components/BindingLines.svelte.d.ts +4 -0
  32. package/dist/components/BindingLines.svelte.d.ts.map +1 -0
  33. package/dist/components/BusPicker.svelte +227 -0
  34. package/dist/components/BusPicker.svelte.d.ts +4 -0
  35. package/dist/components/BusPicker.svelte.d.ts.map +1 -0
  36. package/dist/components/ControlPanel.svelte +154 -0
  37. package/dist/components/ControlPanel.svelte.d.ts +19 -0
  38. package/dist/components/ControlPanel.svelte.d.ts.map +1 -0
  39. package/dist/components/DemandSlider.svelte +271 -0
  40. package/dist/components/DemandSlider.svelte.d.ts +4 -0
  41. package/dist/components/DemandSlider.svelte.d.ts.map +1 -0
  42. package/dist/components/DisplayControls.svelte +81 -0
  43. package/dist/components/DisplayControls.svelte.d.ts +19 -0
  44. package/dist/components/DisplayControls.svelte.d.ts.map +1 -0
  45. package/dist/components/DropZone.svelte +46 -0
  46. package/dist/components/DropZone.svelte.d.ts +19 -0
  47. package/dist/components/DropZone.svelte.d.ts.map +1 -0
  48. package/dist/components/FormulationSelector.svelte +82 -0
  49. package/dist/components/FormulationSelector.svelte.d.ts +19 -0
  50. package/dist/components/FormulationSelector.svelte.d.ts.map +1 -0
  51. package/dist/components/LocalCaseDetails.svelte +253 -0
  52. package/dist/components/LocalCaseDetails.svelte.d.ts +4 -0
  53. package/dist/components/LocalCaseDetails.svelte.d.ts.map +1 -0
  54. package/dist/components/MulticonductorDetails.svelte +280 -0
  55. package/dist/components/MulticonductorDetails.svelte.d.ts +19 -0
  56. package/dist/components/MulticonductorDetails.svelte.d.ts.map +1 -0
  57. package/dist/components/NetworkStats.svelte +75 -0
  58. package/dist/components/NetworkStats.svelte.d.ts +19 -0
  59. package/dist/components/NetworkStats.svelte.d.ts.map +1 -0
  60. package/dist/components/PlacementCue.svelte +35 -0
  61. package/dist/components/PlacementCue.svelte.d.ts +19 -0
  62. package/dist/components/PlacementCue.svelte.d.ts.map +1 -0
  63. package/dist/components/RatingSlider.svelte +273 -0
  64. package/dist/components/RatingSlider.svelte.d.ts +4 -0
  65. package/dist/components/RatingSlider.svelte.d.ts.map +1 -0
  66. package/dist/components/RestoreDefaultsButton.svelte +34 -0
  67. package/dist/components/RestoreDefaultsButton.svelte.d.ts +19 -0
  68. package/dist/components/RestoreDefaultsButton.svelte.d.ts.map +1 -0
  69. package/dist/components/SensitivityReadout.svelte +126 -0
  70. package/dist/components/SensitivityReadout.svelte.d.ts +4 -0
  71. package/dist/components/SensitivityReadout.svelte.d.ts.map +1 -0
  72. package/dist/components/SizeLegend.svelte +55 -0
  73. package/dist/components/SizeLegend.svelte.d.ts +19 -0
  74. package/dist/components/SizeLegend.svelte.d.ts.map +1 -0
  75. package/dist/components/SolveCard.svelte +84 -0
  76. package/dist/components/SolveCard.svelte.d.ts +4 -0
  77. package/dist/components/SolveCard.svelte.d.ts.map +1 -0
  78. package/dist/components/TopMovers.svelte +68 -0
  79. package/dist/components/TopMovers.svelte.d.ts +19 -0
  80. package/dist/components/TopMovers.svelte.d.ts.map +1 -0
  81. package/dist/components.d.ts +19 -0
  82. package/dist/components.d.ts.map +1 -0
  83. package/dist/components.js +18 -0
  84. package/dist/context.svelte.d.ts +20 -0
  85. package/dist/context.svelte.d.ts.map +1 -0
  86. package/dist/context.svelte.js +43 -0
  87. package/dist/controller.svelte.d.ts +334 -0
  88. package/dist/controller.svelte.d.ts.map +1 -0
  89. package/dist/controller.svelte.js +2026 -0
  90. package/dist/display.d.ts +31 -0
  91. package/dist/display.d.ts.map +1 -0
  92. package/dist/display.js +63 -0
  93. package/dist/drop-classify.d.ts +48 -0
  94. package/dist/drop-classify.d.ts.map +1 -0
  95. package/dist/drop-classify.js +92 -0
  96. package/dist/format.d.ts +30 -0
  97. package/dist/format.d.ts.map +1 -0
  98. package/dist/format.js +49 -0
  99. package/dist/index.d.ts +21 -0
  100. package/dist/index.d.ts.map +1 -0
  101. package/dist/index.js +12 -0
  102. package/dist/map.d.ts +9 -0
  103. package/dist/map.d.ts.map +1 -0
  104. package/dist/map.js +4 -0
  105. package/dist/multiconductor.d.ts +63 -0
  106. package/dist/multiconductor.d.ts.map +1 -0
  107. package/dist/multiconductor.js +255 -0
  108. package/dist/state.svelte.d.ts +258 -0
  109. package/dist/state.svelte.d.ts.map +1 -0
  110. package/dist/state.svelte.js +323 -0
  111. package/dist/study-package.d.ts +9 -0
  112. package/dist/study-package.d.ts.map +1 -0
  113. package/dist/study-package.js +17 -0
  114. package/dist/styles.css +393 -0
  115. package/dist/synthetic-layout.d.ts +12 -0
  116. package/dist/synthetic-layout.d.ts.map +1 -0
  117. package/dist/synthetic-layout.js +271 -0
  118. package/dist/types.d.ts +6 -0
  119. package/dist/types.d.ts.map +1 -0
  120. package/dist/types.js +1 -0
  121. package/package.json +67 -0
@@ -0,0 +1,68 @@
1
+ <script lang="ts">
2
+ import { getController } from '../context.svelte.js';
3
+ import { signedExp } from '../format.js';
4
+
5
+ const ctrl = getController();
6
+ const unitTitle =
7
+ 'LMP is measured in $/MWh and demand is perturbed in MW, so dLMP/dd has units ($/MWh)/MW.';
8
+ </script>
9
+
10
+ <div class="movers-block">
11
+ {#if !ctrl.previewing && ctrl.topMovers.length > 0}
12
+ <table class="mono">
13
+ <caption class="mono dim" title={unitTitle}>
14
+ largest &Delta;LMP per MW demand <span class="unit">($/MWh)/MW</span>
15
+ </caption>
16
+ <tbody>
17
+ {#each ctrl.topMovers as mover (mover.bus)}
18
+ <tr>
19
+ <td>bus {mover.bus}</td>
20
+ <td class:pos={mover.value > 0} class:neg={mover.value < 0}>
21
+ {signedExp(mover.value)}
22
+ </td>
23
+ </tr>
24
+ {/each}
25
+ </tbody>
26
+ </table>
27
+ {/if}
28
+ </div>
29
+
30
+ <style>
31
+ .movers-block {
32
+ min-height: 114px;
33
+ }
34
+
35
+ table {
36
+ width: 100%;
37
+ margin-top: 12px;
38
+ border-collapse: collapse;
39
+ font-size: 12px;
40
+ }
41
+
42
+ caption {
43
+ text-align: left;
44
+ font-size: 10.5px;
45
+ margin-bottom: 4px;
46
+ }
47
+
48
+ .unit {
49
+ white-space: nowrap;
50
+ }
51
+
52
+ td {
53
+ padding: 3px 0;
54
+ border-top: 1px solid var(--line);
55
+ }
56
+
57
+ td:last-child {
58
+ text-align: right;
59
+ }
60
+
61
+ .pos {
62
+ color: var(--pos);
63
+ }
64
+
65
+ .neg {
66
+ color: var(--neg);
67
+ }
68
+ </style>
@@ -0,0 +1,19 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const TopMovers: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, string>;
17
+ type TopMovers = InstanceType<typeof TopMovers>;
18
+ export default TopMovers;
19
+ //# sourceMappingURL=TopMovers.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TopMovers.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/TopMovers.svelte.ts"],"names":[],"mappings":"AAuCA,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IACtG,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAKD,QAAA,MAAM,SAAS;;kBAA+E,CAAC;AAC7E,KAAK,SAAS,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC;AAClD,eAAe,SAAS,CAAC"}
@@ -0,0 +1,19 @@
1
+ export { default as AppFooter } from './components/AppFooter.svelte';
2
+ export { default as AppHeader } from './components/AppHeader.svelte';
3
+ export { default as BusPicker } from './components/BusPicker.svelte';
4
+ export { default as ControlPanel } from './components/ControlPanel.svelte';
5
+ export { default as DemandSlider } from './components/DemandSlider.svelte';
6
+ export { default as DisplayControls } from './components/DisplayControls.svelte';
7
+ export { default as DropZone } from './components/DropZone.svelte';
8
+ export { default as FormulationSelector } from './components/FormulationSelector.svelte';
9
+ export { default as LocalCaseDetails } from './components/LocalCaseDetails.svelte';
10
+ export { default as MulticonductorDetails } from './components/MulticonductorDetails.svelte';
11
+ export { default as NetworkStats } from './components/NetworkStats.svelte';
12
+ export { default as PlacementCue } from './components/PlacementCue.svelte';
13
+ export { default as RestoreDefaultsButton } from './components/RestoreDefaultsButton.svelte';
14
+ export { default as SensitivityReadout } from './components/SensitivityReadout.svelte';
15
+ export { default as SizeLegend } from './components/SizeLegend.svelte';
16
+ export { default as SolveCard } from './components/SolveCard.svelte';
17
+ export { default as TopMovers } from './components/TopMovers.svelte';
18
+ export { default as Sparkline } from './Sparkline.svelte';
19
+ //# sourceMappingURL=components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/lib/components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,18 @@
1
+ export { default as AppFooter } from './components/AppFooter.svelte';
2
+ export { default as AppHeader } from './components/AppHeader.svelte';
3
+ export { default as BusPicker } from './components/BusPicker.svelte';
4
+ export { default as ControlPanel } from './components/ControlPanel.svelte';
5
+ export { default as DemandSlider } from './components/DemandSlider.svelte';
6
+ export { default as DisplayControls } from './components/DisplayControls.svelte';
7
+ export { default as DropZone } from './components/DropZone.svelte';
8
+ export { default as FormulationSelector } from './components/FormulationSelector.svelte';
9
+ export { default as LocalCaseDetails } from './components/LocalCaseDetails.svelte';
10
+ export { default as MulticonductorDetails } from './components/MulticonductorDetails.svelte';
11
+ export { default as NetworkStats } from './components/NetworkStats.svelte';
12
+ export { default as PlacementCue } from './components/PlacementCue.svelte';
13
+ export { default as RestoreDefaultsButton } from './components/RestoreDefaultsButton.svelte';
14
+ export { default as SensitivityReadout } from './components/SensitivityReadout.svelte';
15
+ export { default as SizeLegend } from './components/SizeLegend.svelte';
16
+ export { default as SolveCard } from './components/SolveCard.svelte';
17
+ export { default as TopMovers } from './components/TopMovers.svelte';
18
+ export { default as Sparkline } from './Sparkline.svelte';
@@ -0,0 +1,20 @@
1
+ import type { AppState } from './state.svelte.js';
2
+ import type { Controller } from './controller.svelte.js';
3
+ export interface TellegenUiConfig {
4
+ apiBase: string;
5
+ loadDefaultCases: boolean;
6
+ docsHref: string;
7
+ orgHref: string;
8
+ orgLabel: string;
9
+ showFooter: boolean;
10
+ }
11
+ export type TellegenUiOptions = Partial<TellegenUiConfig>;
12
+ export declare const DEFAULT_TELLEGEN_UI_CONFIG: TellegenUiConfig;
13
+ export declare function resolveTellegenUiConfig(options?: TellegenUiOptions): TellegenUiConfig;
14
+ export declare const setAppState: (a: AppState) => AppState;
15
+ export declare const setController: (c: Controller) => Controller;
16
+ export declare const setUiConfig: (config: TellegenUiConfig) => TellegenUiConfig;
17
+ export declare const getAppState: () => AppState;
18
+ export declare const getController: () => Controller;
19
+ export declare const getUiConfig: () => TellegenUiConfig;
20
+ //# sourceMappingURL=context.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.svelte.d.ts","sourceRoot":"","sources":["../src/lib/context.svelte.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMzD,MAAM,WAAW,gBAAgB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,0BAA0B,EAAE,gBAOxC,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,iBAAsB,GAAG,gBAAgB,CAUzF;AAED,eAAO,MAAM,WAAW,GAAI,GAAG,QAAQ,KAAG,QAA8B,CAAC;AACzE,eAAO,MAAM,aAAa,GAAI,GAAG,UAAU,KAAG,UAAiC,CAAC;AAChF,eAAO,MAAM,WAAW,GAAI,QAAQ,gBAAgB,KAAG,gBAC5B,CAAC;AAE5B,eAAO,MAAM,WAAW,QAAO,QAK9B,CAAC;AAEF,eAAO,MAAM,aAAa,QAAO,UAKhC,CAAC;AAEF,eAAO,MAAM,WAAW,QAAO,gBAI9B,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { getContext, setContext } from 'svelte';
2
+ const APP = Symbol('tellegen.app');
3
+ const CTRL = Symbol('tellegen.controller');
4
+ const CONFIG = Symbol('tellegen.config');
5
+ export const DEFAULT_TELLEGEN_UI_CONFIG = {
6
+ apiBase: '/api',
7
+ loadDefaultCases: true,
8
+ docsHref: 'https://eigenergy.github.io/tellegen/',
9
+ orgHref: 'https://github.com/eigenergy',
10
+ orgLabel: 'eigenergy group @ michigan ece',
11
+ showFooter: true
12
+ };
13
+ export function resolveTellegenUiConfig(options = {}) {
14
+ return {
15
+ apiBase: options.apiBase ?? DEFAULT_TELLEGEN_UI_CONFIG.apiBase,
16
+ loadDefaultCases: options.loadDefaultCases ?? DEFAULT_TELLEGEN_UI_CONFIG.loadDefaultCases,
17
+ docsHref: options.docsHref ?? DEFAULT_TELLEGEN_UI_CONFIG.docsHref,
18
+ orgHref: options.orgHref ?? DEFAULT_TELLEGEN_UI_CONFIG.orgHref,
19
+ orgLabel: options.orgLabel ?? DEFAULT_TELLEGEN_UI_CONFIG.orgLabel,
20
+ showFooter: options.showFooter ?? DEFAULT_TELLEGEN_UI_CONFIG.showFooter
21
+ };
22
+ }
23
+ export const setAppState = (a) => setContext(APP, a);
24
+ export const setController = (c) => setContext(CTRL, c);
25
+ export const setUiConfig = (config) => setContext(CONFIG, config);
26
+ export const getAppState = () => {
27
+ const app = getContext(APP);
28
+ if (!app)
29
+ throw new Error('getAppState() called outside a tellegen provider');
30
+ return app;
31
+ };
32
+ export const getController = () => {
33
+ const ctrl = getContext(CTRL);
34
+ if (!ctrl)
35
+ throw new Error('getController() called outside a tellegen provider');
36
+ return ctrl;
37
+ };
38
+ export const getUiConfig = () => {
39
+ const config = getContext(CONFIG);
40
+ if (!config)
41
+ throw new Error('getUiConfig() called outside a tellegen provider');
42
+ return config;
43
+ };
@@ -0,0 +1,334 @@
1
+ import { type TellegenApiClient } from './api.js';
2
+ import type { BranchRatingDeltas, Network, NetworkBus, SensitivityColumn, Solution } from './api.js';
3
+ import { CaseState, LocalCase, MulticonductorCase, type AppState, type DemandRangeMode, type SolvableCase } from './state.svelte.js';
4
+ import { type BrowserStudy, type Formulation, type SensTarget } from '@tellegen/engine';
5
+ /** A parsed geographic sidecar awaiting application: the canonical `.geo.json`
6
+ * layer document from the engine's tolerant reader, its source file name, and
7
+ * the reader's notes on records it could not use. */
8
+ type GeoLayerFile = {
9
+ name: string;
10
+ layer: string;
11
+ warnings: string[];
12
+ };
13
+ export type { SolvableCase };
14
+ type DemandRangeAnchor = {
15
+ caseId: string;
16
+ bus: number;
17
+ delta: number;
18
+ };
19
+ export interface ControllerOptions {
20
+ api?: TellegenApiClient;
21
+ apiBase?: string;
22
+ }
23
+ export declare class Controller {
24
+ app: AppState;
25
+ api: TellegenApiClient;
26
+ abort: AbortController | null;
27
+ sensitivity429Until: number;
28
+ serverComputeOff: boolean;
29
+ caseStudies: WeakMap<SolvableCase, {
30
+ study: BrowserStudy;
31
+ networkJson: string;
32
+ formulation: Formulation;
33
+ baseSolution: Solution;
34
+ }>;
35
+ studyUnavailable: WeakMap<SolvableCase, string>;
36
+ studyBuilds: WeakMap<SolvableCase, {
37
+ networkJson: string;
38
+ formulation: Formulation;
39
+ token: object;
40
+ promise: Promise<BrowserStudy | null>;
41
+ }>;
42
+ localSeq: number;
43
+ loading: Promise<void> | null;
44
+ nearbyRangeAnchor: DemandRangeAnchor | null;
45
+ hiddenDefaults: Set<string>;
46
+ casesLoaded: boolean;
47
+ loadingBackendCase: string | null;
48
+ showFileDropUi: boolean;
49
+ previewObjective: {
50
+ caseId: string;
51
+ target: SensTarget;
52
+ objectiveDelta: number;
53
+ } | null;
54
+ ratingSlope: {
55
+ caseId: string;
56
+ branch: number;
57
+ slope: number | null;
58
+ } | null;
59
+ constructor(app: AppState, options?: ControllerOptions);
60
+ isBackendCase(c: SolvableCase): c is CaseState;
61
+ isActiveSolveCase(c: SolvableCase): boolean;
62
+ caseDeltas(c: SolvableCase): import("@tellegen/engine").DemandDeltas;
63
+ caseRatings(c: SolvableCase): BranchRatingDeltas;
64
+ /** True when the case carries any nonzero committed rating delta. Rating edits
65
+ * solve only through the browser Study; the server fallback would silently
66
+ * drop them, so callers gate on this before falling back. */
67
+ hasRatingEdits(c: SolvableCase): boolean;
68
+ /** True when two selection targets name the same bus or branch. */
69
+ sameTarget(a: SensTarget, b: SensTarget): boolean;
70
+ isPerturbed(c: SolvableCase | null): boolean;
71
+ setNearbyRangeAnchor(c: SolvableCase, bus: number, delta?: number): void;
72
+ beginBusSelection(c: SolvableCase, busId: number): {
73
+ ac: AbortController;
74
+ sensitivitySeq: number;
75
+ };
76
+ beginBranchSelection(c: SolvableCase, branchId: number): {
77
+ ac: AbortController;
78
+ sensitivitySeq: number;
79
+ };
80
+ /** The display name of a case: a backend case's `name`, a local case's `label`. */
81
+ caseName(c: SolvableCase): string;
82
+ readHiddenDefaultCases(): Set<string>;
83
+ writeHiddenDefaultCases(ids: Set<string>): void;
84
+ rememberHiddenDefaultCase(id: string): void;
85
+ localNetwork(c: LocalCase): Network | null;
86
+ maybeStartLocalSolve(id: string): void;
87
+ getStudy(c: SolvableCase, networkJson: string): Promise<BrowserStudy | null>;
88
+ browserSensitivity(c: SolvableCase, networkJson: string, target: SensTarget): Promise<SensitivityColumn | null>;
89
+ disposeStudy(c: SolvableCase): void;
90
+ acceptSensitivity(c: SolvableCase, col: SensitivityColumn | null, target: SensTarget | null, sensitivitySeq?: number): void;
91
+ finishSolve(c: SolvableCase, seq: number, target: SensTarget | null): void;
92
+ ensureNetworkJson(c: SolvableCase): Promise<string | null>;
93
+ previewDeltas(c: SolvableCase, bus: number, value: number): {
94
+ [x: string]: number;
95
+ [x: number]: number;
96
+ };
97
+ demandBounds(mode: DemandRangeMode, bus: NetworkBus | null, center: number): {
98
+ min: number;
99
+ max: number;
100
+ span: number;
101
+ };
102
+ activeSolvable: SolvableCase | null;
103
+ activeFormulation: import("@tellegen/engine").BrowserFormulation;
104
+ networkStats: {
105
+ buses: number;
106
+ branches: number;
107
+ objective: number | null;
108
+ deltaObjective: number | null;
109
+ binding: number | null;
110
+ } | null;
111
+ displayOptions: import("./display.js").DisplayOption[];
112
+ activeDisplay: {
113
+ values: {
114
+ bus: number;
115
+ value: number;
116
+ }[];
117
+ mode: import("./state.svelte.js").DisplayMode;
118
+ label: string;
119
+ unit: string;
120
+ copy: string;
121
+ gradient: string;
122
+ } | null;
123
+ displayStats: {
124
+ lo: {
125
+ value: number;
126
+ clamped: boolean;
127
+ };
128
+ hi: {
129
+ value: number;
130
+ clamped: boolean;
131
+ };
132
+ uniform: number | null;
133
+ } | null;
134
+ selectedBusData: NetworkBus | null;
135
+ selectedBranchData: import("@tellegen/engine").NetworkBranch | null;
136
+ selectionTarget: SensTarget | null;
137
+ committedDelta: number;
138
+ sliderValue: number;
139
+ nearbyRangeCenter: number;
140
+ sliderBounds: {
141
+ min: number;
142
+ max: number;
143
+ span: number;
144
+ };
145
+ sliderMin: number;
146
+ sliderMax: number;
147
+ committedRating: number;
148
+ ratingSliderValue: number;
149
+ ratingBounds: {
150
+ min: number;
151
+ max: number;
152
+ disabled: boolean;
153
+ };
154
+ selectedSensitivity: SensitivityColumn | null;
155
+ sensSummary: import("./colors.js").SensitivityDomain | null;
156
+ flatSensBackground: string;
157
+ previewMaxAbsStep: number;
158
+ previewScale: number | null;
159
+ selectedLmp: number | null;
160
+ selfSens: number;
161
+ predictedDeltaObj: number | null;
162
+ gradientScore: {
163
+ pred: number;
164
+ exact: number;
165
+ } | null;
166
+ topMovers: {
167
+ bus: number;
168
+ value: number;
169
+ }[];
170
+ showMoverSlot: boolean;
171
+ previewing: boolean;
172
+ load: () => Promise<void>;
173
+ loadBackendCase: (c: CaseState, frame?: boolean) => Promise<void>;
174
+ /** Leave the multiconductor view: a backend or local case becoming active is
175
+ * mutually exclusive with a multi case, so drop the multi's active/pending ids.
176
+ * The multi's per-bus expansion stays on the case for when it is reactivated. */
177
+ private leaveMulti;
178
+ activateCase: (id: string) => Promise<void>;
179
+ private hydrateFallback;
180
+ removeBackendCase: (c: CaseState, event?: MouseEvent) => Promise<void>;
181
+ activateLocal: (c: LocalCase) => void;
182
+ removeLocalCase: (c: LocalCase, event?: MouseEvent) => Promise<void>;
183
+ addAndActivateLocal: (c: LocalCase) => void;
184
+ placeLocalCase: (lon: number, lat: number) => Promise<void>;
185
+ /** Write the case's on-screen layout into its network payload
186
+ * (`Bus.location` with `synthetic` provenance — the engine also accepts
187
+ * `manual`, which round trips through restored packages), so saves,
188
+ * exports, and the `.geo.json` download carry it. Best effort: on an
189
+ * engine failure the view still renders, only the layout's persistence is
190
+ * lost. */
191
+ private stampLayout;
192
+ /** Download the case's coordinates as a `.geo.json` layer: canonical
193
+ * GeoJSON with provenance stamped (`synthetic`/`manual` for layouts), the
194
+ * document powerio and tellegen both read back. */
195
+ downloadGeoLayer: (c: LocalCase) => Promise<void>;
196
+ moveLocalCase: (c: LocalCase) => void;
197
+ /** Apply parsed geo layers onto a local case, in drop order (a later file
198
+ * wins on shared elements). The engine owns matching and the network becomes
199
+ * the single owner of the coordinates: matched points land in
200
+ * `Bus.location`, routes in `Branch.route`, and the refreshed
201
+ * `network_json` replaces the case payload — so a saved package or export
202
+ * carries exactly what is on screen. A live Study is synced the same way.
203
+ * Throws when a layer matches nothing. */
204
+ applyGeoLayers: (c: LocalCase, layers: GeoLayerFile[]) => Promise<void>;
205
+ /** Adopt an engine geo apply onto the case: the refreshed payload becomes
206
+ * the case's network and view, provenance flips to the geographic source,
207
+ * and the warnings panel gets the placement summary. */
208
+ private adoptGeoPayload;
209
+ /** Keep a live Study's base network in step with a geo change (locations
210
+ * are metadata the model never reads, so nothing re-solves), and re-key its
211
+ * cache entry so the next solve reuses it instead of rebuilding. */
212
+ private syncCachedStudy;
213
+ applyGeoLayersToExisting: (layers: GeoLayerFile[]) => Promise<void>;
214
+ /** Ask the map to frame the selected branch and wait for the camera to land,
215
+ * capped by FOCUS_SETTLE_CAP_MS and cut short by the selection's abort. */
216
+ private awaitFocus;
217
+ /** One selection flow for bus and branch targets on backend cases: optional
218
+ * camera focus first (so the fly-to is not janked by the solve), the browser
219
+ * Study column, then the one server reconciliation for DC OPF without rating
220
+ * edits. */
221
+ private selectTarget;
222
+ selectBus: (caseId: string, busId: number) => Promise<void>;
223
+ /** The compute-off terminal copy. Name the browser engine as the cause only
224
+ * when its failure is known permanent; otherwise the miss may have been
225
+ * transient (a wasm chunk or case JSON fetch), so say what is known and keep
226
+ * the retry meaningful. */
227
+ private computeOffNotice;
228
+ /** The one server ∂LMP/∂parameter request a selection may make: the
229
+ * reconciliation path when the browser Study produced no column for a DC OPF
230
+ * case. Never retries on its own: a second request inside the same rate limit
231
+ * window is a guaranteed rejection, and the retry button covers the user
232
+ * need. A 429 opens a cooldown for the rest of the window; the server's own
233
+ * compute-disabled 403 latches serverComputeOff for the session (matched on
234
+ * `serverMessage` so a proxy or WAF 403 cannot latch a false diagnosis). */
235
+ private fetchServerColumn;
236
+ /** Show an error with an optional one-click re-run of the failed operation. */
237
+ private fail;
238
+ /** The panel's retry button: re-run the failed operation when one is known,
239
+ * else reload the case list. An explicit retry always ends a 429 cooldown. */
240
+ retryError: () => void;
241
+ selectLocalBus: (localId: string, busId: number) => Promise<void>;
242
+ /** The terminal message when a case with committed rating edits cannot use the
243
+ * browser Study: the server fallback solves at base ratings, so there is no
244
+ * correct fallback to take. */
245
+ private ratingEditsFallbackError;
246
+ /** The terminal message when the browser produced no column and the server
247
+ * cannot reconcile (non-DC formulation, or a local case with no server). */
248
+ private failColumnUnavailable;
249
+ /** `focus` frames the selected line on the map first; the sensitivity solve
250
+ * waits for the camera to land so the fly-to stays smooth. */
251
+ selectBranch: (caseId: string, branchId: number, opts?: {
252
+ focus?: boolean;
253
+ }) => Promise<void>;
254
+ selectLocalBranch: (localId: string, branchId: number, opts?: {
255
+ focus?: boolean;
256
+ }) => Promise<void>;
257
+ clearSelection: () => void;
258
+ runSolve: (c: SolvableCase, target: SensTarget | null) => void;
259
+ serverSolve: (c: CaseState, target: SensTarget | null, seq?: number) => void;
260
+ commitDelta: (value: number) => void;
261
+ finishDemandInput: (value: number) => void;
262
+ resetCase: (c: SolvableCase) => void;
263
+ changeFormulation: (c: SolvableCase, next: Formulation) => void;
264
+ /** Parse dropped files in the browser via the powerio wasm module. Case
265
+ * files (.m, .raw, .aux) become local networks; geographic files can
266
+ * place those networks; a PowerWorld .pwd becomes a substation point
267
+ * preview. Files run serially; nothing uploads. */
268
+ ingestFiles: (files: FileList | File[]) => Promise<void>;
269
+ /** Fill a coordinate-less case's positions from a co-dropped PowerWorld
270
+ * `.pwd`: the display's substation points project to approximate
271
+ * longitude/latitude and join onto buses through the `SubNum` extras key.
272
+ * The first display that joins wins; one that matches nothing stays
273
+ * available as its own preview entry, and the case stays placeable. */
274
+ 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;
282
+ /** Parse a dropped OpenDSS `.dss` file into a multiconductor viewing case.
283
+ * Returns true when a case landed; a parse failure sets the panel error. */
284
+ private ingestDistFile;
285
+ /** Build a `MulticonductorCase` from an ingest payload and make it active.
286
+ * Geographic cases place immediately; planar/synthetic cases enter placement
287
+ * (a map click or "place on map") so the user picks their center. */
288
+ private addMultiCase;
289
+ /** Make a multiconductor case active, framing it when it is placed. */
290
+ activateMulti: (c: MulticonductorCase) => void;
291
+ /** Select a bus in a multiconductor case: its terminal stack and incident
292
+ * conductors expand. Selecting is viewing detail only — no solve. */
293
+ selectMultiBus: (caseId: string, busId: string) => void;
294
+ /** Place a multiconductor case awaiting a center: fit its provided planar
295
+ * coordinates when it carries them, else lay it out synthetically. */
296
+ placeMultiCase: (lon: number, lat: number) => void;
297
+ /** Re-enter placement for a multiconductor case, to move its layout. */
298
+ moveMultiCase: (c: MulticonductorCase) => void;
299
+ removeMultiCase: (c: MulticonductorCase, event?: MouseEvent) => Promise<void>;
300
+ /** The unified map click-to-place: a pending multiconductor case takes the
301
+ * click first, otherwise a pending local case does. */
302
+ placeCase: (lon: number, lat: number) => void;
303
+ /** Build a local case from a restored study package: the same shape a dropped case
304
+ * takes, with the saved demand/rating deltas and formulation pre-applied. */
305
+ private restoreLocalFromPackage;
306
+ /** Build (or reuse) the case's Study and commit it at the current edit state, so a
307
+ * save or export captures exactly what is on screen. Null (with an error set) when no
308
+ * network or Study is available. */
309
+ private syncedStudy;
310
+ /** Save the active study as a `.pio.json` package and download it. */
311
+ saveStudyPackage: (c: SolvableCase) => Promise<void>;
312
+ /** Export the active study's committed state to `format` and download it. Returns the
313
+ * writer's fidelity warnings so the caller can surface them. */
314
+ exportStudyAs: (c: SolvableCase, format: string) => Promise<string[]>;
315
+ /** A filesystem-safe base name for a downloaded case file. */
316
+ private caseFileStem;
317
+ setDemandRangeMode: (mode: DemandRangeMode) => void;
318
+ runPreview: (c: SolvableCase, bus: number, value: number) => void;
319
+ private enginePreviewNext;
320
+ private enginePreviewBusy;
321
+ private pumpEnginePreview;
322
+ setSliderPreview: (value: number | undefined) => void;
323
+ previewRatings(c: SolvableCase, branch: number, value: number): BranchRatingDeltas;
324
+ runRatingPreview: (c: SolvableCase, branch: number, value: number) => void;
325
+ setRatingPreview: (value: number | undefined) => void;
326
+ private ratingSlopePending;
327
+ commitRating: (value: number) => Promise<void>;
328
+ finishRatingInput: (value: number) => void;
329
+ restoreDefaultCases: () => void;
330
+ sliderCurrent: () => number;
331
+ ratingSliderCurrent: () => number;
332
+ }
333
+ export declare function createController(app: AppState, options?: ControllerOptions): Controller;
334
+ //# sourceMappingURL=controller.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"controller.svelte.d.ts","sourceRoot":"","sources":["../src/lib/controller.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAQrG,OAAO,EACN,SAAS,EACT,SAAS,EACT,kBAAkB,EAClB,KAAK,QAAQ,EACb,KAAK,eAAe,EAIpB,KAAK,YAAY,EACjB,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAiBN,KAAK,YAAY,EAEjB,KAAK,WAAW,EAGhB,KAAK,UAAU,EACf,MAAM,kBAAkB,CAAC;AAO1B;;qDAEqD;AACrD,KAAK,YAAY,GAAG;IAA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