@selvajs/ui 4.6.1 → 4.6.2-beta.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.
@@ -0,0 +1,12 @@
1
+ export { default as AppLayout } from './components/compute/AppLayout.svelte';
2
+ export { default as ComputeApp } from './components/compute/ComputeApp.svelte';
3
+ export { default as ErrorScreen } from './components/ErrorScreen.svelte';
4
+ export { createSolveSession, createRequestResponseDriver, type SolveSession, type SolveSessionArgs, type SolveDriver, type SolveReporter } from './compute/createSolveSession.svelte';
5
+ export type { ClientSlotArgs, ClientSlot } from './contexts/clientSlotContext.svelte';
6
+ export * from './external/storage';
7
+ export * from './schema/defaults';
8
+ export * from './schema/traversal';
9
+ export * from './schema/dynamic-value-list';
10
+ export type { ActionButton } from './types/actionButton';
11
+ export type { SolveFn, SolveResult } from './types/solveFn';
12
+ export { DEFAULT_PRESET_LABELS, type PresetLabels } from './types/presetLabels';
package/dist/public.js ADDED
@@ -0,0 +1,35 @@
1
+ // ============================================================================
2
+ // Published public API of @selvajs/ui
3
+ // ============================================================================
4
+ //
5
+ // This is the ONLY surface npm consumers of @selvajs/ui see (package.json maps
6
+ // the "." export's `svelte`/`types` conditions at this file's build output).
7
+ //
8
+ // Scope: the compute-app SDK — everything an external host app needs to embed a
9
+ // Grasshopper-driven app (ComputeApp), drive solves, and wire pre-step
10
+ // producers. Verified against real consumers (parafa, parapet): they import
11
+ // ComputeApp + its types, the solve seam, and external/storage. Nothing else.
12
+ //
13
+ // Deliberately NOT public: design-system primitives (Button, Card, Dialog, …),
14
+ // page-chrome layout (AppShell, SideNav, …), toast/Toaster, ThemeSwitcher,
15
+ // DataTable, contexts/composables, cn/randomId. These remain importable from
16
+ // the full barrel (./index.ts) INSIDE the monorepo via the "@selvajs/source"
17
+ // export condition, but never ship to npm. If an external consumer ever needs a
18
+ // primitive directly, promote it here explicitly rather than re-exporting the
19
+ // whole primitives barrel.
20
+ // Compute app (schema + viewer + solve controls composed into a runnable app)
21
+ export { default as AppLayout } from './components/compute/AppLayout.svelte';
22
+ export { default as ComputeApp } from './components/compute/ComputeApp.svelte';
23
+ // Full-screen states a host app renders
24
+ export { default as ErrorScreen } from './components/ErrorScreen.svelte';
25
+ // Solve Session seam (transport-agnostic value/lifecycle state machine + its
26
+ // driver interface). Exported so transports outside this package can satisfy
27
+ // SolveDriver and drive a session. See CONTEXT.md.
28
+ export { createSolveSession, createRequestResponseDriver } from './compute/createSolveSession.svelte';
29
+ // Pre-step producer transit storage (parafa wires producers via these).
30
+ export * from './external/storage';
31
+ // Schema utilities a ComputeApp host reasonably needs to read/shape values.
32
+ export * from './schema/defaults';
33
+ export * from './schema/traversal';
34
+ export * from './schema/dynamic-value-list';
35
+ export { DEFAULT_PRESET_LABELS } from './types/presetLabels';
package/package.json CHANGED
@@ -1,18 +1,22 @@
1
1
  {
2
2
  "name": "@selvajs/ui",
3
- "version": "4.6.1",
3
+ "version": "4.6.2-beta.0",
4
4
  "description": "Shared UI components and utilities for Selva applications",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "type": "module",
10
- "svelte": "./dist/index.js",
11
- "types": "./dist/index.d.ts",
10
+ "svelte": "./dist/public.js",
11
+ "types": "./dist/public.d.ts",
12
12
  "exports": {
13
13
  ".": {
14
- "types": "./dist/index.d.ts",
15
- "svelte": "./dist/index.js"
14
+ "source": {
15
+ "types": "./dist/index.d.ts",
16
+ "svelte": "./dist/index.js"
17
+ },
18
+ "types": "./dist/public.d.ts",
19
+ "svelte": "./dist/public.js"
16
20
  },
17
21
  "./external": {
18
22
  "types": "./dist/external/storage.d.ts",
@@ -33,7 +37,7 @@
33
37
  "**/*.css"
34
38
  ],
35
39
  "peerDependencies": {
36
- "@selvajs/compute": "^2.0.0",
40
+ "@selvajs/compute": "^2.1.0-beta.2",
37
41
  "@sveltejs/kit": "^2",
38
42
  "bits-ui": "^2.18.0",
39
43
  "svelte": "^5",
@@ -67,8 +71,8 @@
67
71
  "svelte": "5.55.5",
68
72
  "tailwind-variants": "^3.2.2",
69
73
  "vitest": "^3.2.4",
70
- "@selvajs/schemas": "4.5.0",
71
- "@selvajs/config": "0.0.0"
74
+ "@selvajs/config": "0.0.0",
75
+ "@selvajs/schemas": "4.5.0"
72
76
  },
73
77
  "scripts": {
74
78
  "dev": "vite dev",
@@ -0,0 +1,55 @@
1
+ // ============================================================================
2
+ // Published public API of @selvajs/ui
3
+ // ============================================================================
4
+ //
5
+ // This is the ONLY surface npm consumers of @selvajs/ui see (package.json maps
6
+ // the "." export's `svelte`/`types` conditions at this file's build output).
7
+ //
8
+ // Scope: the compute-app SDK — everything an external host app needs to embed a
9
+ // Grasshopper-driven app (ComputeApp), drive solves, and wire pre-step
10
+ // producers. Verified against real consumers (parafa, parapet): they import
11
+ // ComputeApp + its types, the solve seam, and external/storage. Nothing else.
12
+ //
13
+ // Deliberately NOT public: design-system primitives (Button, Card, Dialog, …),
14
+ // page-chrome layout (AppShell, SideNav, …), toast/Toaster, ThemeSwitcher,
15
+ // DataTable, contexts/composables, cn/randomId. These remain importable from
16
+ // the full barrel (./index.ts) INSIDE the monorepo via the "@selvajs/source"
17
+ // export condition, but never ship to npm. If an external consumer ever needs a
18
+ // primitive directly, promote it here explicitly rather than re-exporting the
19
+ // whole primitives barrel.
20
+
21
+ // Compute app (schema + viewer + solve controls composed into a runnable app)
22
+ export { default as AppLayout } from './components/compute/AppLayout.svelte';
23
+ export { default as ComputeApp } from './components/compute/ComputeApp.svelte';
24
+
25
+ // Full-screen states a host app renders
26
+ export { default as ErrorScreen } from './components/ErrorScreen.svelte';
27
+
28
+ // Solve Session seam (transport-agnostic value/lifecycle state machine + its
29
+ // driver interface). Exported so transports outside this package can satisfy
30
+ // SolveDriver and drive a session. See CONTEXT.md.
31
+ export {
32
+ createSolveSession,
33
+ createRequestResponseDriver,
34
+ type SolveSession,
35
+ type SolveSessionArgs,
36
+ type SolveDriver,
37
+ type SolveReporter
38
+ } from './compute/createSolveSession.svelte';
39
+
40
+ // Client-slot context type (host apps render their own cell for client-sourced
41
+ // inputs; parafa uses ClientSlotArgs).
42
+ export type { ClientSlotArgs, ClientSlot } from './contexts/clientSlotContext.svelte';
43
+
44
+ // Pre-step producer transit storage (parafa wires producers via these).
45
+ export * from './external/storage';
46
+
47
+ // Schema utilities a ComputeApp host reasonably needs to read/shape values.
48
+ export * from './schema/defaults';
49
+ export * from './schema/traversal';
50
+ export * from './schema/dynamic-value-list';
51
+
52
+ // UI-facing runtime types (not from schema)
53
+ export type { ActionButton } from './types/actionButton';
54
+ export type { SolveFn, SolveResult } from './types/solveFn';
55
+ export { DEFAULT_PRESET_LABELS, type PresetLabels } from './types/presetLabels';