@goplasmatic/datalogic-ui 5.5.0 → 5.7.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.
- package/README.md +14 -14
- package/dist/components/logic-editor/config/operators/variable.d.ts.map +1 -1
- package/dist/datalogic_wasm-MLyJCetU.cjs +1258 -0
- package/dist/datalogic_wasm-ewgjPqIG.js +1257 -0
- package/dist/index.cjs +19 -17
- package/dist/index.js +19 -17
- package/package.json +2 -2
- package/dist/datalogic_wasm-Bckz7njC.cjs +0 -1258
- package/dist/datalogic_wasm-CPBxmvK8.js +0 -1257
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ This is the **React surface** of the
|
|
|
10
10
|
[`datalogic-rs`](https://github.com/GoPlasmatic/datalogic-rs) monorepo.
|
|
11
11
|
It consumes the WASM binding
|
|
12
12
|
([`@goplasmatic/datalogic-wasm`](https://github.com/GoPlasmatic/datalogic-rs/blob/main/bindings/wasm/README.md)) for evaluation
|
|
13
|
-
and tracing
|
|
13
|
+
and tracing. For the engine itself and the cross-runtime overview,
|
|
14
14
|
see the [repo README](https://github.com/GoPlasmatic/datalogic-rs#readme).
|
|
15
15
|
|
|
16
16
|
## Features
|
|
@@ -58,11 +58,11 @@ function App() {
|
|
|
58
58
|
|
|
59
59
|
## Usage Modes
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
Props control the editor's behavior; there is no mode enum. Each combination of props enables a different mode:
|
|
62
62
|
|
|
63
63
|
### Read-only (default)
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
Render a JSONLogic expression as a flow diagram:
|
|
66
66
|
|
|
67
67
|
```tsx
|
|
68
68
|
<DataLogicEditor value={expression} />
|
|
@@ -72,8 +72,8 @@ Simply render a JSONLogic expression as a flow diagram:
|
|
|
72
72
|
|
|
73
73
|
Provide `data` to enable the debugger toolbar (play/pause, step, jump, and a
|
|
74
74
|
step timeline). As you step, the current node shows its context and result in
|
|
75
|
-
a bubble, executed and on-path nodes
|
|
76
|
-
engine's failure breadcrumb
|
|
75
|
+
a bubble, the editor highlights executed and on-path nodes, and it marks a
|
|
76
|
+
node on the engine's failure breadcrumb with its error. Nodes do not show
|
|
77
77
|
results at rest; step through the trace to see values:
|
|
78
78
|
|
|
79
79
|
```tsx
|
|
@@ -172,7 +172,7 @@ import { OPERATORS, CATEGORY_COLORS } from '@goplasmatic/datalogic-ui';
|
|
|
172
172
|
panel configuration, and help (summary, return type, notes, and examples that
|
|
173
173
|
are checked against the engine in this package's test suite). `CATEGORY_COLORS`
|
|
174
174
|
is a per-category palette for consumer-side legends and custom renderers; the
|
|
175
|
-
shipped nodes
|
|
175
|
+
shipped nodes take their colour from the value type they produce, through the
|
|
176
176
|
`--sig-*` tokens (see Styling).
|
|
177
177
|
|
|
178
178
|
### Utilities and hooks (for advanced use)
|
|
@@ -219,7 +219,7 @@ import {
|
|
|
219
219
|
optional and omitted keys keep the engine default. Changing `config` or
|
|
220
220
|
`customOperators` rebuilds the engine, so selection and undo history reset.
|
|
221
221
|
|
|
222
|
-
`ops_budget` caps the work one evaluation may do
|
|
222
|
+
`ops_budget` caps the work one evaluation may do: one operation per node
|
|
223
223
|
the engine dispatches, one per item an iterator walks, plus what tensor
|
|
224
224
|
operators charge per element. Crossing it raises a `BudgetExceeded` error
|
|
225
225
|
carrying `budget` and `spent`, which `try` cannot catch. The
|
|
@@ -234,7 +234,7 @@ becomes a runtime evaluation error.
|
|
|
234
234
|
|
|
235
235
|
## Styling
|
|
236
236
|
|
|
237
|
-
|
|
237
|
+
You need one CSS import. React Flow's base styles are bundled into
|
|
238
238
|
`styles.css`, so there is no separate `@xyflow/react/dist/style.css` import
|
|
239
239
|
and no import-order requirement:
|
|
240
240
|
|
|
@@ -317,7 +317,7 @@ evaluations rather than fixtures:
|
|
|
317
317
|
reachable from the menus.
|
|
318
318
|
|
|
319
319
|
When you add an operator config example or a sample, give it the result the
|
|
320
|
-
engine
|
|
320
|
+
engine produces; the suites will tell you if it drifts.
|
|
321
321
|
|
|
322
322
|
## Architecture
|
|
323
323
|
|
|
@@ -352,8 +352,8 @@ The main component is `DataLogicEditor` which:
|
|
|
352
352
|
- @goplasmatic/datalogic-wasm (bundled into the library output)
|
|
353
353
|
|
|
354
354
|
The dev playground additionally uses @msgpack/msgpack and fflate for share
|
|
355
|
-
links and @fontsource for its fonts; those are devDependencies
|
|
356
|
-
|
|
355
|
+
links and @fontsource for its fonts; those are devDependencies, so consumers
|
|
356
|
+
do not install them.
|
|
357
357
|
|
|
358
358
|
## Documentation
|
|
359
359
|
|
|
@@ -361,9 +361,9 @@ For complete documentation including all props, customization options, and advan
|
|
|
361
361
|
|
|
362
362
|
## Learn more
|
|
363
363
|
|
|
364
|
-
- [Repo README](https://github.com/GoPlasmatic/datalogic-rs#readme)
|
|
365
|
-
- [WASM binding README](https://github.com/GoPlasmatic/datalogic-rs/blob/main/bindings/wasm/README.md)
|
|
366
|
-
- [Rust crate README](https://github.com/GoPlasmatic/datalogic-rs/blob/main/crates/datalogic-rs/README.md)
|
|
364
|
+
- [Repo README](https://github.com/GoPlasmatic/datalogic-rs#readme): cross-runtime overview, all binding READMEs
|
|
365
|
+
- [WASM binding README](https://github.com/GoPlasmatic/datalogic-rs/blob/main/bindings/wasm/README.md): `@goplasmatic/datalogic-wasm`, the JS/TS engine this UI consumes
|
|
366
|
+
- [Rust crate README](https://github.com/GoPlasmatic/datalogic-rs/blob/main/crates/datalogic-rs/README.md): engine design, the 5-tier API model
|
|
367
367
|
- [Full documentation](https://goplasmatic.github.io/datalogic-rs/)
|
|
368
368
|
- [Online playground](https://goplasmatic.github.io/datalogic-rs/playground/)
|
|
369
369
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable.d.ts","sourceRoot":"","sources":["../../../../../src/components/logic-editor/config/operators/variable.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"variable.d.ts","sourceRoot":"","sources":["../../../../../src/components/logic-editor/config/operators/variable.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAwZtD,CAAC"}
|