@plures/praxis 1.1.0 → 1.1.1
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/LICENSE +21 -21
- package/core/codegen/ts-generator.ts +15 -15
- package/dist/node/cli/index.cjs +3 -2282
- package/dist/node/cli/index.js +1 -1
- package/dist/node/{verify-YBZ7W24H.js → verify-QRYKRIDU.js} +3 -2282
- package/docs/REACTIVE_REDESIGN.md +132 -132
- package/docs/SVELTE_INTEGRATION_STRATEGY.md +68 -68
- package/package.json +132 -132
- package/src/components/TerminalNode.svelte +457 -457
- package/src/core/reactive-engine.svelte.ts +65 -65
- package/src/core/reactive-engine.ts +67 -67
- package/src/core/schema/loader.common.ts +150 -150
- package/src/examples/advanced-todo/App.svelte +506 -506
- package/src/index.browser.ts +204 -204
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
# Praxis Reactive Redesign (Svelte 5 Native)
|
|
2
|
-
|
|
3
|
-
## 1. Vision
|
|
4
|
-
|
|
5
|
-
Praxis will evolve from a "step-based" logic engine to a **natively reactive** framework built on Svelte 5 Runes. This means the core `LogicEngine` will be a Svelte class, and state changes will propagate automatically through the dependency graph.
|
|
6
|
-
|
|
7
|
-
## 2. Core Architecture
|
|
8
|
-
|
|
9
|
-
### 2.1. The Reactive Engine (`LogicEngine.svelte.ts`)
|
|
10
|
-
|
|
11
|
-
The engine will no longer be a plain TS class. It will use `$state` to hold the application context and facts.
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
// praxis/src/core/engine.svelte.ts
|
|
15
|
-
import { type Class } from 'type-fest';
|
|
16
|
-
|
|
17
|
-
export class LogicEngine<TContext extends object> {
|
|
18
|
-
// The single source of truth, reactive by default
|
|
19
|
-
state = $state<{
|
|
20
|
-
context: TContext;
|
|
21
|
-
facts: PraxisFact[];
|
|
22
|
-
meta: Record<string, unknown>;
|
|
23
|
-
}>({
|
|
24
|
-
context: {} as TContext,
|
|
25
|
-
facts: [],
|
|
26
|
-
meta: {}
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
constructor(initialContext: TContext) {
|
|
30
|
-
this.state.context = initialContext;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Expose the raw reactive state for binding/derivation
|
|
34
|
-
get context() {
|
|
35
|
-
return this.state.context;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
get facts() {
|
|
39
|
-
return this.state.facts;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### 2.2. Rules as Mutators
|
|
45
|
-
|
|
46
|
-
In the previous version, rules returned new facts. In the reactive version, rules are **mutators** that directly modify the reactive state. This allows Svelte's fine-grained reactivity to trigger only the necessary updates.
|
|
47
|
-
|
|
48
|
-
```typescript
|
|
49
|
-
// praxis/src/core/types.ts
|
|
50
|
-
export type ReactiveRule<TContext> = (
|
|
51
|
-
state: { context: TContext; facts: PraxisFact[] },
|
|
52
|
-
event: PraxisEvent
|
|
53
|
-
) => void;
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### 2.3. Derivations (Computed State)
|
|
57
|
-
|
|
58
|
-
Instead of recomputing state in every "step", we encourage using `$derived` for values that depend on the core state.
|
|
59
|
-
|
|
60
|
-
```typescript
|
|
61
|
-
// Example usage in an app
|
|
62
|
-
class AppState {
|
|
63
|
-
// Core state
|
|
64
|
-
connections = $state<Connection[]>([]);
|
|
65
|
-
activeId = $state<string | null>(null);
|
|
66
|
-
|
|
67
|
-
// Derived state (automatically updates)
|
|
68
|
-
activeConnection = $derived(
|
|
69
|
-
this.connections.find(c => c.id === this.activeId)
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### 2.4. Actors as Effects
|
|
75
|
-
|
|
76
|
-
Actors are simply `$effect` blocks that watch the state.
|
|
77
|
-
|
|
78
|
-
```typescript
|
|
79
|
-
// praxis/src/core/actor.ts
|
|
80
|
-
export function createActor<TContext>(
|
|
81
|
-
engine: LogicEngine<TContext>,
|
|
82
|
-
fn: (context: TContext) => void
|
|
83
|
-
) {
|
|
84
|
-
$effect(() => {
|
|
85
|
-
fn(engine.context);
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## 3. Migration Plan
|
|
91
|
-
|
|
92
|
-
### Phase 1: Core Update
|
|
93
|
-
1. **Rename** `engine.ts` to `engine.svelte.ts`.
|
|
94
|
-
2. **Update** `LogicEngine` to use `$state`.
|
|
95
|
-
3. **Update** `PraxisRegistry` to support reactive rules.
|
|
96
|
-
4. **Add** `svelte` as a direct dependency (or ensure peer dependency is strictly enforced).
|
|
97
|
-
|
|
98
|
-
### Phase 2: Bridge Update
|
|
99
|
-
1. Create a `ReactiveBridge` that uses `$effect.root` to subscribe to state changes and send messages to the WebView.
|
|
100
|
-
2. This replaces the manual `getSerializableContext` calls.
|
|
101
|
-
|
|
102
|
-
### Phase 3: Tooling
|
|
103
|
-
1. Update the CLI to generate `.svelte.ts` files for schemas.
|
|
104
|
-
|
|
105
|
-
## 4. Example Usage
|
|
106
|
-
|
|
107
|
-
```typescript
|
|
108
|
-
// defining the engine
|
|
109
|
-
const engine = new LogicEngine({ count: 0 });
|
|
110
|
-
|
|
111
|
-
// defining a rule
|
|
112
|
-
const incrementRule: ReactiveRule<any> = (state, event) => {
|
|
113
|
-
if (event.type === 'INCREMENT') {
|
|
114
|
-
state.context.count++;
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
// processing an event
|
|
119
|
-
engine.apply(incrementRule, { type: 'INCREMENT' });
|
|
120
|
-
|
|
121
|
-
// reacting (Actor)
|
|
122
|
-
$effect(() => {
|
|
123
|
-
console.log("Count is now:", engine.context.count);
|
|
124
|
-
});
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## 5. Benefits
|
|
128
|
-
|
|
129
|
-
1. **Simplicity**: No more complex "step" logic or diffing. Svelte handles the dependency tracking.
|
|
130
|
-
2. **Performance**: Fine-grained updates. Only the parts of the UI/logic that depend on changed data will re-run.
|
|
131
|
-
3. **Isomorphism**: The same logic code runs in the Extension Host (Node) and the WebView (Browser).
|
|
132
|
-
|
|
1
|
+
# Praxis Reactive Redesign (Svelte 5 Native)
|
|
2
|
+
|
|
3
|
+
## 1. Vision
|
|
4
|
+
|
|
5
|
+
Praxis will evolve from a "step-based" logic engine to a **natively reactive** framework built on Svelte 5 Runes. This means the core `LogicEngine` will be a Svelte class, and state changes will propagate automatically through the dependency graph.
|
|
6
|
+
|
|
7
|
+
## 2. Core Architecture
|
|
8
|
+
|
|
9
|
+
### 2.1. The Reactive Engine (`LogicEngine.svelte.ts`)
|
|
10
|
+
|
|
11
|
+
The engine will no longer be a plain TS class. It will use `$state` to hold the application context and facts.
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
// praxis/src/core/engine.svelte.ts
|
|
15
|
+
import { type Class } from 'type-fest';
|
|
16
|
+
|
|
17
|
+
export class LogicEngine<TContext extends object> {
|
|
18
|
+
// The single source of truth, reactive by default
|
|
19
|
+
state = $state<{
|
|
20
|
+
context: TContext;
|
|
21
|
+
facts: PraxisFact[];
|
|
22
|
+
meta: Record<string, unknown>;
|
|
23
|
+
}>({
|
|
24
|
+
context: {} as TContext,
|
|
25
|
+
facts: [],
|
|
26
|
+
meta: {}
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
constructor(initialContext: TContext) {
|
|
30
|
+
this.state.context = initialContext;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Expose the raw reactive state for binding/derivation
|
|
34
|
+
get context() {
|
|
35
|
+
return this.state.context;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
get facts() {
|
|
39
|
+
return this.state.facts;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2.2. Rules as Mutators
|
|
45
|
+
|
|
46
|
+
In the previous version, rules returned new facts. In the reactive version, rules are **mutators** that directly modify the reactive state. This allows Svelte's fine-grained reactivity to trigger only the necessary updates.
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
// praxis/src/core/types.ts
|
|
50
|
+
export type ReactiveRule<TContext> = (
|
|
51
|
+
state: { context: TContext; facts: PraxisFact[] },
|
|
52
|
+
event: PraxisEvent
|
|
53
|
+
) => void;
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 2.3. Derivations (Computed State)
|
|
57
|
+
|
|
58
|
+
Instead of recomputing state in every "step", we encourage using `$derived` for values that depend on the core state.
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
// Example usage in an app
|
|
62
|
+
class AppState {
|
|
63
|
+
// Core state
|
|
64
|
+
connections = $state<Connection[]>([]);
|
|
65
|
+
activeId = $state<string | null>(null);
|
|
66
|
+
|
|
67
|
+
// Derived state (automatically updates)
|
|
68
|
+
activeConnection = $derived(
|
|
69
|
+
this.connections.find(c => c.id === this.activeId)
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 2.4. Actors as Effects
|
|
75
|
+
|
|
76
|
+
Actors are simply `$effect` blocks that watch the state.
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
// praxis/src/core/actor.ts
|
|
80
|
+
export function createActor<TContext>(
|
|
81
|
+
engine: LogicEngine<TContext>,
|
|
82
|
+
fn: (context: TContext) => void
|
|
83
|
+
) {
|
|
84
|
+
$effect(() => {
|
|
85
|
+
fn(engine.context);
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## 3. Migration Plan
|
|
91
|
+
|
|
92
|
+
### Phase 1: Core Update
|
|
93
|
+
1. **Rename** `engine.ts` to `engine.svelte.ts`.
|
|
94
|
+
2. **Update** `LogicEngine` to use `$state`.
|
|
95
|
+
3. **Update** `PraxisRegistry` to support reactive rules.
|
|
96
|
+
4. **Add** `svelte` as a direct dependency (or ensure peer dependency is strictly enforced).
|
|
97
|
+
|
|
98
|
+
### Phase 2: Bridge Update
|
|
99
|
+
1. Create a `ReactiveBridge` that uses `$effect.root` to subscribe to state changes and send messages to the WebView.
|
|
100
|
+
2. This replaces the manual `getSerializableContext` calls.
|
|
101
|
+
|
|
102
|
+
### Phase 3: Tooling
|
|
103
|
+
1. Update the CLI to generate `.svelte.ts` files for schemas.
|
|
104
|
+
|
|
105
|
+
## 4. Example Usage
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
// defining the engine
|
|
109
|
+
const engine = new LogicEngine({ count: 0 });
|
|
110
|
+
|
|
111
|
+
// defining a rule
|
|
112
|
+
const incrementRule: ReactiveRule<any> = (state, event) => {
|
|
113
|
+
if (event.type === 'INCREMENT') {
|
|
114
|
+
state.context.count++;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
// processing an event
|
|
119
|
+
engine.apply(incrementRule, { type: 'INCREMENT' });
|
|
120
|
+
|
|
121
|
+
// reacting (Actor)
|
|
122
|
+
$effect(() => {
|
|
123
|
+
console.log("Count is now:", engine.context.count);
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## 5. Benefits
|
|
128
|
+
|
|
129
|
+
1. **Simplicity**: No more complex "step" logic or diffing. Svelte handles the dependency tracking.
|
|
130
|
+
2. **Performance**: Fine-grained updates. Only the parts of the UI/logic that depend on changed data will re-run.
|
|
131
|
+
3. **Isomorphism**: The same logic code runs in the Extension Host (Node) and the WebView (Browser).
|
|
132
|
+
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
# Svelte Integration Strategy for Praxis
|
|
2
|
-
|
|
3
|
-
## Current State
|
|
4
|
-
|
|
5
|
-
Praxis uses **Svelte 5 Runes** (`$state`, `$derived`, `$effect`) as its core reactivity engine. This provides excellent performance and developer experience but introduces a build-time dependency on the Svelte compiler.
|
|
6
|
-
|
|
7
|
-
## The Problem
|
|
8
|
-
|
|
9
|
-
Consumers of `@plures/praxis` in non-browser environments (Node.js, Electron Main, VS Code Extension Host) currently face a hurdle:
|
|
10
|
-
|
|
11
|
-
1. They import `ReactiveLogicEngine`.
|
|
12
|
-
2. This imports code containing `$state`.
|
|
13
|
-
3. **Runtime Error**: `$state is not defined`.
|
|
14
|
-
|
|
15
|
-
To fix this, the **consumer** currently has to configure their bundler (esbuild, webpack, vite) to compile the *library's* code (or their own usage of it) using `esbuild-svelte`. This leaks implementation details and increases friction.
|
|
16
|
-
|
|
17
|
-
## Strategy: Invisible Integration
|
|
18
|
-
|
|
19
|
-
We want users to `import { engine } from '@plures/praxis'` and have it "just work" anywhere, without knowing it uses Svelte under the hood.
|
|
20
|
-
|
|
21
|
-
### 1. Dual Distribution Builds (Recommended)
|
|
22
|
-
|
|
23
|
-
The `@plures/praxis` package should ship pre-compiled artifacts for different environments.
|
|
24
|
-
|
|
25
|
-
**`package.json` exports:**
|
|
26
|
-
|
|
27
|
-
```json
|
|
28
|
-
{
|
|
29
|
-
"exports": {
|
|
30
|
-
".": {
|
|
31
|
-
"node": "./dist/node/index.js", // Compiled with generate: 'server'
|
|
32
|
-
"browser": "./dist/browser/index.js", // Compiled with generate: 'client' (or raw?)
|
|
33
|
-
"default": "./dist/node/index.js"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
**Build Pipeline Changes:**
|
|
40
|
-
* Run `tsup` or `esbuild` twice during the library build process.
|
|
41
|
-
* **Build 1 (Node)**: Use `esbuild-svelte` with `generate: 'server'`. This bakes the reactivity into standard JS getters/setters/signals that Node can execute.
|
|
42
|
-
* **Build 2 (Browser)**: Use `esbuild-svelte` with `generate: 'client'` (or leave as raw `.svelte.ts` if we expect the user to bundle it, but pre-compiled is safer).
|
|
43
|
-
|
|
44
|
-
**Result**:
|
|
45
|
-
The consumer installs `@plures/praxis`.
|
|
46
|
-
* **In VS Code**: Node resolves `dist/node/index.js`. The code is standard JS. No `esbuild-svelte` needed in the consumer's build config (unless they write *their own* `.svelte.ts` files).
|
|
47
|
-
* **In Webview**: Bundler resolves `dist/browser/index.js`.
|
|
48
|
-
|
|
49
|
-
### 2. The "Core" vs "Reactive" Split
|
|
50
|
-
|
|
51
|
-
If we want to support users who strictly cannot have Svelte code (even compiled), we could separate the packages:
|
|
52
|
-
|
|
53
|
-
* `@plures/praxis-core`: Pure TS, no reactivity. Just the logic engine, types, and rule processing. State is a plain object.
|
|
54
|
-
* `@plures/praxis`: Re-exports core + the Svelte reactive engine.
|
|
55
|
-
|
|
56
|
-
### 3. Seamless Developer Experience (DX)
|
|
57
|
-
|
|
58
|
-
To make the integration invisible:
|
|
59
|
-
|
|
60
|
-
1. **Pre-compile everything**: Never force the user to compile `node_modules`.
|
|
61
|
-
2. **Type Definitions**: Ensure `.d.ts` files hide the Svelte implementation details (e.g., `state` property should just look like `TContext`, not a Svelte proxy type).
|
|
62
|
-
3. **Templates**: If the user *does* want to write reactive logic (e.g., `myRules.svelte.ts`), provide templates (`praxis init`) that set up the build tools automatically.
|
|
63
|
-
|
|
64
|
-
## Action Plan
|
|
65
|
-
|
|
66
|
-
1. **Update Praxis Build**: Modify `praxis/package.json` and build scripts to output a Node-compatible build.
|
|
67
|
-
2. **Verify**: Create a test consumer (simple Node script) that imports the library and runs without any build step.
|
|
68
|
-
3. **Document**: Update the main README to explain that Praxis works in Node.js out of the box.
|
|
1
|
+
# Svelte Integration Strategy for Praxis
|
|
2
|
+
|
|
3
|
+
## Current State
|
|
4
|
+
|
|
5
|
+
Praxis uses **Svelte 5 Runes** (`$state`, `$derived`, `$effect`) as its core reactivity engine. This provides excellent performance and developer experience but introduces a build-time dependency on the Svelte compiler.
|
|
6
|
+
|
|
7
|
+
## The Problem
|
|
8
|
+
|
|
9
|
+
Consumers of `@plures/praxis` in non-browser environments (Node.js, Electron Main, VS Code Extension Host) currently face a hurdle:
|
|
10
|
+
|
|
11
|
+
1. They import `ReactiveLogicEngine`.
|
|
12
|
+
2. This imports code containing `$state`.
|
|
13
|
+
3. **Runtime Error**: `$state is not defined`.
|
|
14
|
+
|
|
15
|
+
To fix this, the **consumer** currently has to configure their bundler (esbuild, webpack, vite) to compile the *library's* code (or their own usage of it) using `esbuild-svelte`. This leaks implementation details and increases friction.
|
|
16
|
+
|
|
17
|
+
## Strategy: Invisible Integration
|
|
18
|
+
|
|
19
|
+
We want users to `import { engine } from '@plures/praxis'` and have it "just work" anywhere, without knowing it uses Svelte under the hood.
|
|
20
|
+
|
|
21
|
+
### 1. Dual Distribution Builds (Recommended)
|
|
22
|
+
|
|
23
|
+
The `@plures/praxis` package should ship pre-compiled artifacts for different environments.
|
|
24
|
+
|
|
25
|
+
**`package.json` exports:**
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"node": "./dist/node/index.js", // Compiled with generate: 'server'
|
|
32
|
+
"browser": "./dist/browser/index.js", // Compiled with generate: 'client' (or raw?)
|
|
33
|
+
"default": "./dist/node/index.js"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Build Pipeline Changes:**
|
|
40
|
+
* Run `tsup` or `esbuild` twice during the library build process.
|
|
41
|
+
* **Build 1 (Node)**: Use `esbuild-svelte` with `generate: 'server'`. This bakes the reactivity into standard JS getters/setters/signals that Node can execute.
|
|
42
|
+
* **Build 2 (Browser)**: Use `esbuild-svelte` with `generate: 'client'` (or leave as raw `.svelte.ts` if we expect the user to bundle it, but pre-compiled is safer).
|
|
43
|
+
|
|
44
|
+
**Result**:
|
|
45
|
+
The consumer installs `@plures/praxis`.
|
|
46
|
+
* **In VS Code**: Node resolves `dist/node/index.js`. The code is standard JS. No `esbuild-svelte` needed in the consumer's build config (unless they write *their own* `.svelte.ts` files).
|
|
47
|
+
* **In Webview**: Bundler resolves `dist/browser/index.js`.
|
|
48
|
+
|
|
49
|
+
### 2. The "Core" vs "Reactive" Split
|
|
50
|
+
|
|
51
|
+
If we want to support users who strictly cannot have Svelte code (even compiled), we could separate the packages:
|
|
52
|
+
|
|
53
|
+
* `@plures/praxis-core`: Pure TS, no reactivity. Just the logic engine, types, and rule processing. State is a plain object.
|
|
54
|
+
* `@plures/praxis`: Re-exports core + the Svelte reactive engine.
|
|
55
|
+
|
|
56
|
+
### 3. Seamless Developer Experience (DX)
|
|
57
|
+
|
|
58
|
+
To make the integration invisible:
|
|
59
|
+
|
|
60
|
+
1. **Pre-compile everything**: Never force the user to compile `node_modules`.
|
|
61
|
+
2. **Type Definitions**: Ensure `.d.ts` files hide the Svelte implementation details (e.g., `state` property should just look like `TContext`, not a Svelte proxy type).
|
|
62
|
+
3. **Templates**: If the user *does* want to write reactive logic (e.g., `myRules.svelte.ts`), provide templates (`praxis init`) that set up the build tools automatically.
|
|
63
|
+
|
|
64
|
+
## Action Plan
|
|
65
|
+
|
|
66
|
+
1. **Update Praxis Build**: Modify `praxis/package.json` and build scripts to output a Node-compatible build.
|
|
67
|
+
2. **Verify**: Create a test consumer (simple Node script) that imports the library and runs without any build step.
|
|
68
|
+
3. **Document**: Update the main README to explain that Praxis works in Node.js out of the box.
|
package/package.json
CHANGED
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@plures/praxis",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "The Full Plures Application Framework - declarative schemas, logic engine, component generation, and local-first data",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/node/index.js",
|
|
7
|
-
"types": "./dist/node/index.d.ts",
|
|
8
|
-
"bin": {
|
|
9
|
-
"praxis": "./dist/node/cli/index.js"
|
|
10
|
-
},
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"node": {
|
|
14
|
-
"types": "./dist/node/index.d.ts",
|
|
15
|
-
"import": "./dist/node/index.js",
|
|
16
|
-
"require": "./dist/node/index.cjs"
|
|
17
|
-
},
|
|
18
|
-
"browser": {
|
|
19
|
-
"types": "./dist/browser/index.d.ts",
|
|
20
|
-
"import": "./dist/browser/index.js"
|
|
21
|
-
},
|
|
22
|
-
"default": "./dist/node/index.js"
|
|
23
|
-
},
|
|
24
|
-
"./svelte": {
|
|
25
|
-
"node": {
|
|
26
|
-
"types": "./dist/node/integrations/svelte.d.ts",
|
|
27
|
-
"import": "./dist/node/integrations/svelte.js",
|
|
28
|
-
"require": "./dist/node/integrations/svelte.cjs"
|
|
29
|
-
},
|
|
30
|
-
"browser": {
|
|
31
|
-
"types": "./dist/browser/integrations/svelte.d.ts",
|
|
32
|
-
"import": "./dist/browser/integrations/svelte.js"
|
|
33
|
-
},
|
|
34
|
-
"default": "./dist/node/integrations/svelte.js"
|
|
35
|
-
},
|
|
36
|
-
"./schema": {
|
|
37
|
-
"types": "./dist/node/schema.d.ts",
|
|
38
|
-
"import": "./dist/node/schema.js",
|
|
39
|
-
"require": "./dist/node/schema.cjs",
|
|
40
|
-
"default": "./dist/node/schema.js"
|
|
41
|
-
},
|
|
42
|
-
"./component": {
|
|
43
|
-
"types": "./dist/node/component.d.ts",
|
|
44
|
-
"import": "./dist/node/component.js",
|
|
45
|
-
"require": "./dist/node/component.cjs",
|
|
46
|
-
"default": "./dist/node/component.js"
|
|
47
|
-
},
|
|
48
|
-
"./cloud": {
|
|
49
|
-
"types": "./dist/node/cloud/index.d.ts",
|
|
50
|
-
"import": "./dist/node/cloud/index.js",
|
|
51
|
-
"require": "./dist/node/cloud/index.cjs",
|
|
52
|
-
"default": "./dist/node/cloud/index.js"
|
|
53
|
-
},
|
|
54
|
-
"./components": {
|
|
55
|
-
"types": "./dist/node/components/index.d.ts",
|
|
56
|
-
"svelte": "./src/components/TerminalNode.svelte",
|
|
57
|
-
"import": "./dist/node/components/index.js",
|
|
58
|
-
"require": "./dist/node/components/index.cjs",
|
|
59
|
-
"default": "./dist/node/components/index.js"
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"files": [
|
|
63
|
-
"dist",
|
|
64
|
-
"src",
|
|
65
|
-
"core",
|
|
66
|
-
"cli",
|
|
67
|
-
"templates",
|
|
68
|
-
"docs",
|
|
69
|
-
"README.md",
|
|
70
|
-
"FRAMEWORK.md",
|
|
71
|
-
"src/components",
|
|
72
|
-
"LICENSE"
|
|
73
|
-
],
|
|
74
|
-
"scripts": {
|
|
75
|
-
"build": "tsup",
|
|
76
|
-
"test": "vitest run",
|
|
77
|
-
"test:watch": "vitest",
|
|
78
|
-
"test:ui": "vitest --ui",
|
|
79
|
-
"typecheck": "tsc --noEmit",
|
|
80
|
-
"cli": "node ./dist/src/cli/index.js"
|
|
81
|
-
},
|
|
82
|
-
"keywords": [
|
|
83
|
-
"praxis",
|
|
84
|
-
"framework",
|
|
85
|
-
"plures",
|
|
86
|
-
"logic",
|
|
87
|
-
"schema",
|
|
88
|
-
"component-generation",
|
|
89
|
-
"local-first",
|
|
90
|
-
"functional",
|
|
91
|
-
"typescript",
|
|
92
|
-
"state-management",
|
|
93
|
-
"facts",
|
|
94
|
-
"rules",
|
|
95
|
-
"constraints",
|
|
96
|
-
"orchestration",
|
|
97
|
-
"canvas",
|
|
98
|
-
"visual-development"
|
|
99
|
-
],
|
|
100
|
-
"author": "Plures",
|
|
101
|
-
"license": "MIT",
|
|
102
|
-
"devDependencies": {
|
|
103
|
-
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
104
|
-
"@types/js-yaml": "^4.0.9",
|
|
105
|
-
"@types/node": "^25.0.1",
|
|
106
|
-
"@types/ws": "^8.18.1",
|
|
107
|
-
"@vitest/ui": "^4.0.15",
|
|
108
|
-
"esbuild-svelte": "^0.9.4",
|
|
109
|
-
"svelte": "^5.46.0",
|
|
110
|
-
"svelte-preprocess": "^6.0.3",
|
|
111
|
-
"tsup": "^8.5.1",
|
|
112
|
-
"tsx": "^4.21.0",
|
|
113
|
-
"typescript": "^5.9.3",
|
|
114
|
-
"vite": "^7.2.7",
|
|
115
|
-
"vitest": "^4.0.15"
|
|
116
|
-
},
|
|
117
|
-
"dependencies": {
|
|
118
|
-
"commander": "^14.0.2",
|
|
119
|
-
"js-yaml": "^4.1.1"
|
|
120
|
-
},
|
|
121
|
-
"peerDependencies": {
|
|
122
|
-
"svelte": "^5.46.0"
|
|
123
|
-
},
|
|
124
|
-
"peerDependenciesMeta": {
|
|
125
|
-
"svelte": {
|
|
126
|
-
"optional": true
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"publishConfig": {
|
|
130
|
-
"access": "public"
|
|
131
|
-
}
|
|
132
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@plures/praxis",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "The Full Plures Application Framework - declarative schemas, logic engine, component generation, and local-first data",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/node/index.js",
|
|
7
|
+
"types": "./dist/node/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"praxis": "./dist/node/cli/index.js"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"node": {
|
|
14
|
+
"types": "./dist/node/index.d.ts",
|
|
15
|
+
"import": "./dist/node/index.js",
|
|
16
|
+
"require": "./dist/node/index.cjs"
|
|
17
|
+
},
|
|
18
|
+
"browser": {
|
|
19
|
+
"types": "./dist/browser/index.d.ts",
|
|
20
|
+
"import": "./dist/browser/index.js"
|
|
21
|
+
},
|
|
22
|
+
"default": "./dist/node/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./svelte": {
|
|
25
|
+
"node": {
|
|
26
|
+
"types": "./dist/node/integrations/svelte.d.ts",
|
|
27
|
+
"import": "./dist/node/integrations/svelte.js",
|
|
28
|
+
"require": "./dist/node/integrations/svelte.cjs"
|
|
29
|
+
},
|
|
30
|
+
"browser": {
|
|
31
|
+
"types": "./dist/browser/integrations/svelte.d.ts",
|
|
32
|
+
"import": "./dist/browser/integrations/svelte.js"
|
|
33
|
+
},
|
|
34
|
+
"default": "./dist/node/integrations/svelte.js"
|
|
35
|
+
},
|
|
36
|
+
"./schema": {
|
|
37
|
+
"types": "./dist/node/schema.d.ts",
|
|
38
|
+
"import": "./dist/node/schema.js",
|
|
39
|
+
"require": "./dist/node/schema.cjs",
|
|
40
|
+
"default": "./dist/node/schema.js"
|
|
41
|
+
},
|
|
42
|
+
"./component": {
|
|
43
|
+
"types": "./dist/node/component.d.ts",
|
|
44
|
+
"import": "./dist/node/component.js",
|
|
45
|
+
"require": "./dist/node/component.cjs",
|
|
46
|
+
"default": "./dist/node/component.js"
|
|
47
|
+
},
|
|
48
|
+
"./cloud": {
|
|
49
|
+
"types": "./dist/node/cloud/index.d.ts",
|
|
50
|
+
"import": "./dist/node/cloud/index.js",
|
|
51
|
+
"require": "./dist/node/cloud/index.cjs",
|
|
52
|
+
"default": "./dist/node/cloud/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./components": {
|
|
55
|
+
"types": "./dist/node/components/index.d.ts",
|
|
56
|
+
"svelte": "./src/components/TerminalNode.svelte",
|
|
57
|
+
"import": "./dist/node/components/index.js",
|
|
58
|
+
"require": "./dist/node/components/index.cjs",
|
|
59
|
+
"default": "./dist/node/components/index.js"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"files": [
|
|
63
|
+
"dist",
|
|
64
|
+
"src",
|
|
65
|
+
"core",
|
|
66
|
+
"cli",
|
|
67
|
+
"templates",
|
|
68
|
+
"docs",
|
|
69
|
+
"README.md",
|
|
70
|
+
"FRAMEWORK.md",
|
|
71
|
+
"src/components",
|
|
72
|
+
"LICENSE"
|
|
73
|
+
],
|
|
74
|
+
"scripts": {
|
|
75
|
+
"build": "tsup",
|
|
76
|
+
"test": "vitest run",
|
|
77
|
+
"test:watch": "vitest",
|
|
78
|
+
"test:ui": "vitest --ui",
|
|
79
|
+
"typecheck": "tsc --noEmit",
|
|
80
|
+
"cli": "node ./dist/src/cli/index.js"
|
|
81
|
+
},
|
|
82
|
+
"keywords": [
|
|
83
|
+
"praxis",
|
|
84
|
+
"framework",
|
|
85
|
+
"plures",
|
|
86
|
+
"logic",
|
|
87
|
+
"schema",
|
|
88
|
+
"component-generation",
|
|
89
|
+
"local-first",
|
|
90
|
+
"functional",
|
|
91
|
+
"typescript",
|
|
92
|
+
"state-management",
|
|
93
|
+
"facts",
|
|
94
|
+
"rules",
|
|
95
|
+
"constraints",
|
|
96
|
+
"orchestration",
|
|
97
|
+
"canvas",
|
|
98
|
+
"visual-development"
|
|
99
|
+
],
|
|
100
|
+
"author": "Plures",
|
|
101
|
+
"license": "MIT",
|
|
102
|
+
"devDependencies": {
|
|
103
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
104
|
+
"@types/js-yaml": "^4.0.9",
|
|
105
|
+
"@types/node": "^25.0.1",
|
|
106
|
+
"@types/ws": "^8.18.1",
|
|
107
|
+
"@vitest/ui": "^4.0.15",
|
|
108
|
+
"esbuild-svelte": "^0.9.4",
|
|
109
|
+
"svelte": "^5.46.0",
|
|
110
|
+
"svelte-preprocess": "^6.0.3",
|
|
111
|
+
"tsup": "^8.5.1",
|
|
112
|
+
"tsx": "^4.21.0",
|
|
113
|
+
"typescript": "^5.9.3",
|
|
114
|
+
"vite": "^7.2.7",
|
|
115
|
+
"vitest": "^4.0.15"
|
|
116
|
+
},
|
|
117
|
+
"dependencies": {
|
|
118
|
+
"commander": "^14.0.2",
|
|
119
|
+
"js-yaml": "^4.1.1"
|
|
120
|
+
},
|
|
121
|
+
"peerDependencies": {
|
|
122
|
+
"svelte": "^5.46.0"
|
|
123
|
+
},
|
|
124
|
+
"peerDependenciesMeta": {
|
|
125
|
+
"svelte": {
|
|
126
|
+
"optional": true
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"publishConfig": {
|
|
130
|
+
"access": "public"
|
|
131
|
+
}
|
|
132
|
+
}
|