@plures/praxis 1.1.1 → 1.1.2
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/README.md +4 -4
- package/package.json +1 -1
- package/src/core/reactive-engine.ts +8 -17
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
dotnet build
|
|
2
2
|
dotnet test
|
|
3
|
-
# Praxis 1.1.
|
|
3
|
+
# Praxis 1.1.2
|
|
4
4
|
|
|
5
5
|
**Typed, visual-first application logic for Svelte, Node, and the browser.**
|
|
6
6
|
|
|
@@ -10,11 +10,11 @@ dotnet test
|
|
|
10
10
|
[](https://nodejs.org/)
|
|
11
11
|
[](https://deno.land/)
|
|
12
12
|
|
|
13
|
-
Praxis is a schema-driven, rule-based engine with first-class Svelte 5 integration, component generation, and optional cloud sync. Version **1.1.
|
|
13
|
+
Praxis is a schema-driven, rule-based engine with first-class Svelte 5 integration, component generation, and optional cloud sync. Version **1.1.2** delivers a unified ESM/CJS build, curated subpath exports, Svelte runes support, and a slimmer, publish-ready package for npm and JSR.
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
## What’s new in 1.1.
|
|
17
|
+
## What’s new in 1.1.2
|
|
18
18
|
- **Unified builds & exports**: `./`, `./svelte`, `./schema`, `./component`, `./cloud`, `./components`, and CLI all ship with ESM, CJS, and type definitions.
|
|
19
19
|
- **Svelte 5 runes native**: Runes-friendly stores and helpers; server+client builds for integrations.
|
|
20
20
|
- **Logic engine refinements**: Typed registry, step diagnostics, and trace-friendly rule execution.
|
|
@@ -45,7 +45,7 @@ JSR (Deno):
|
|
|
45
45
|
const result = engine.step([Login.create({ username: 'alice' })]);
|
|
46
46
|
# or via import map pointing to npm:
|
|
47
47
|
# {
|
|
48
|
-
# "imports": { "@plures/praxis": "npm:@plures/praxis@^1.1.
|
|
48
|
+
# "imports": { "@plures/praxis": "npm:@plures/praxis@^1.1.2" }
|
|
49
49
|
# }
|
|
50
50
|
```
|
|
51
51
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Praxis Reactive Logic Engine
|
|
3
3
|
*
|
|
4
|
-
* A
|
|
5
|
-
*
|
|
4
|
+
* A minimal TypeScript implementation of the Praxis Logic Engine.
|
|
5
|
+
* This variant avoids Svelte-specific reactivity primitives to remain framework-agnostic.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
console.log("Reactive Engine Loaded");
|
|
9
|
-
|
|
10
8
|
export interface ReactiveEngineOptions<TContext> {
|
|
11
9
|
initialContext: TContext;
|
|
12
10
|
initialFacts?: any[];
|
|
@@ -14,18 +12,11 @@ export interface ReactiveEngineOptions<TContext> {
|
|
|
14
12
|
}
|
|
15
13
|
|
|
16
14
|
export class ReactiveLogicEngine<TContext extends object> {
|
|
17
|
-
|
|
18
|
-
// We use $state.raw for things that shouldn't be deeply reactive if needed,
|
|
19
|
-
// but for context we usually want deep reactivity.
|
|
20
|
-
state = $state<{
|
|
21
|
-
context: TContext;
|
|
22
|
-
facts: any[];
|
|
23
|
-
meta: Record<string, unknown>;
|
|
24
|
-
}>({
|
|
15
|
+
state: { context: TContext; facts: any[]; meta: Record<string, unknown> } = {
|
|
25
16
|
context: {} as TContext,
|
|
26
17
|
facts: [],
|
|
27
18
|
meta: {}
|
|
28
|
-
}
|
|
19
|
+
};
|
|
29
20
|
|
|
30
21
|
constructor(options: ReactiveEngineOptions<TContext>) {
|
|
31
22
|
this.state.context = options.initialContext;
|
|
@@ -34,15 +25,15 @@ export class ReactiveLogicEngine<TContext extends object> {
|
|
|
34
25
|
}
|
|
35
26
|
|
|
36
27
|
/**
|
|
37
|
-
* Access the
|
|
38
|
-
*
|
|
28
|
+
* Access the context directly.
|
|
29
|
+
* Framework-specific wrappers (e.g., Svelte runes) can build on top of this value.
|
|
39
30
|
*/
|
|
40
31
|
get context() {
|
|
41
32
|
return this.state.context;
|
|
42
33
|
}
|
|
43
34
|
|
|
44
35
|
/**
|
|
45
|
-
* Access the
|
|
36
|
+
* Access the facts list.
|
|
46
37
|
*/
|
|
47
38
|
get facts() {
|
|
48
39
|
return this.state.facts;
|
|
@@ -59,7 +50,7 @@ export class ReactiveLogicEngine<TContext extends object> {
|
|
|
59
50
|
}
|
|
60
51
|
|
|
61
52
|
/**
|
|
62
|
-
* Access the
|
|
53
|
+
* Access the metadata.
|
|
63
54
|
*/
|
|
64
55
|
get meta() {
|
|
65
56
|
return this.state.meta;
|