@selvajs/ui 4.4.0 → 4.5.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.
@@ -25,7 +25,7 @@
25
25
  oncalculate?: () => void;
26
26
  values: Record<string, unknown>;
27
27
  onValueChange: (id: string, val: SupportedTypes) => void | Promise<void>;
28
- onLoadValues?: () => void | Promise<void>;
28
+ onLoadValues?: (values: Record<string, unknown>) => void | Promise<void>;
29
29
  panelActions?: ActionButton[];
30
30
  showSaveButton?: boolean;
31
31
  showLoadButton?: boolean;
@@ -99,7 +99,7 @@
99
99
 
100
100
  async function handleLoadValues(loadedValues: Record<string, unknown>) {
101
101
  Object.assign(values, loadedValues);
102
- await onLoadValues?.();
102
+ await onLoadValues?.(loadedValues);
103
103
  }
104
104
 
105
105
  let _touchStartY = 0;
@@ -13,7 +13,7 @@ interface Props {
13
13
  oncalculate?: () => void;
14
14
  values: Record<string, unknown>;
15
15
  onValueChange: (id: string, val: SupportedTypes) => void | Promise<void>;
16
- onLoadValues?: () => void | Promise<void>;
16
+ onLoadValues?: (values: Record<string, unknown>) => void | Promise<void>;
17
17
  panelActions?: ActionButton[];
18
18
  showSaveButton?: boolean;
19
19
  showLoadButton?: boolean;
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export { default as Viewer } from './components/viewer/Viewer.svelte';
8
8
  export * from './schema/defaults';
9
9
  export * from './schema/traversal';
10
10
  export * from './compute/solving.svelte';
11
+ export { createSolveSession, createRequestResponseDriver, type SolveSession, type SolveSessionArgs, type SolveDriver, type SolveReporter } from './compute/createSolveSession.svelte';
11
12
  export * from './external/storage';
12
13
  export * from './contexts/footerContext.svelte';
13
14
  export * from './contexts/clientSlotContext.svelte';
@@ -15,5 +16,5 @@ export * from './composables/useFooterItem.svelte';
15
16
  export * from './utils';
16
17
  export { randomId } from './utils/randomId';
17
18
  export type { ActionButton } from './types/actionButton';
18
- export type { SolveFn } from './types/solveFn';
19
+ export type { SolveFn, SolveResult } from './types/solveFn';
19
20
  export { DEFAULT_PRESET_LABELS, type PresetLabels } from './types/presetLabels';
package/dist/index.js CHANGED
@@ -14,6 +14,10 @@ export { default as Viewer } from './components/viewer/Viewer.svelte';
14
14
  export * from './schema/defaults';
15
15
  export * from './schema/traversal';
16
16
  export * from './compute/solving.svelte';
17
+ // Solve Session seam (transport-agnostic value/lifecycle state machine + its driver
18
+ // interface). Exported so transports outside this package — e.g. plugin-ui's WebSocket
19
+ // driver — can satisfy SolveDriver and drive a session. See CONTEXT.md.
20
+ export { createSolveSession, createRequestResponseDriver } from './compute/createSolveSession.svelte';
17
21
  // External-input transit storage (used by routes that wire pre-step producers)
18
22
  export * from './external/storage';
19
23
  // Contexts & Composables
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selvajs/ui",
3
- "version": "4.4.0",
3
+ "version": "4.5.0",
4
4
  "description": "Shared UI components and utilities for Selva applications",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -66,8 +66,8 @@
66
66
  "svelte": "5.55.5",
67
67
  "tailwind-variants": "^3.2.2",
68
68
  "vitest": "^3.2.4",
69
- "@selvajs/schemas": "4.4.0",
70
- "@selvajs/config": "0.0.0"
69
+ "@selvajs/config": "0.0.0",
70
+ "@selvajs/schemas": "4.4.0"
71
71
  },
72
72
  "scripts": {
73
73
  "dev": "vite dev",
@@ -25,7 +25,7 @@
25
25
  oncalculate?: () => void;
26
26
  values: Record<string, unknown>;
27
27
  onValueChange: (id: string, val: SupportedTypes) => void | Promise<void>;
28
- onLoadValues?: () => void | Promise<void>;
28
+ onLoadValues?: (values: Record<string, unknown>) => void | Promise<void>;
29
29
  panelActions?: ActionButton[];
30
30
  showSaveButton?: boolean;
31
31
  showLoadButton?: boolean;
@@ -99,7 +99,7 @@
99
99
 
100
100
  async function handleLoadValues(loadedValues: Record<string, unknown>) {
101
101
  Object.assign(values, loadedValues);
102
- await onLoadValues?.();
102
+ await onLoadValues?.(loadedValues);
103
103
  }
104
104
 
105
105
  let _touchStartY = 0;
package/src/lib/index.ts CHANGED
@@ -20,6 +20,18 @@ export * from './schema/defaults';
20
20
  export * from './schema/traversal';
21
21
  export * from './compute/solving.svelte';
22
22
 
23
+ // Solve Session seam (transport-agnostic value/lifecycle state machine + its driver
24
+ // interface). Exported so transports outside this package — e.g. plugin-ui's WebSocket
25
+ // driver — can satisfy SolveDriver and drive a session. See CONTEXT.md.
26
+ export {
27
+ createSolveSession,
28
+ createRequestResponseDriver,
29
+ type SolveSession,
30
+ type SolveSessionArgs,
31
+ type SolveDriver,
32
+ type SolveReporter
33
+ } from './compute/createSolveSession.svelte';
34
+
23
35
  // External-input transit storage (used by routes that wire pre-step producers)
24
36
  export * from './external/storage';
25
37
 
@@ -34,5 +46,5 @@ export { randomId } from './utils/randomId';
34
46
 
35
47
  // UI-specific runtime types (not from schema)
36
48
  export type { ActionButton } from './types/actionButton';
37
- export type { SolveFn } from './types/solveFn';
49
+ export type { SolveFn, SolveResult } from './types/solveFn';
38
50
  export { DEFAULT_PRESET_LABELS, type PresetLabels } from './types/presetLabels';