hyperprop-charting-library 0.1.132 → 0.1.134
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/dist/hyperprop-charting-library.cjs +899 -578
- package/dist/hyperprop-charting-library.d.ts +66 -57
- package/dist/hyperprop-charting-library.js +1090 -772
- package/dist/index.cjs +899 -578
- package/dist/index.d.cts +66 -57
- package/dist/index.d.ts +66 -57
- package/dist/index.js +1090 -772
- package/docs/API.md +15 -0
- package/package.json +1 -1
package/docs/API.md
CHANGED
|
@@ -607,3 +607,18 @@ Script contract:
|
|
|
607
607
|
Errors never break the chart: compile or runtime errors render as an inline red message in the
|
|
608
608
|
pane. Scripts are plain JavaScript executed in the page context — treat them like any other code
|
|
609
609
|
you'd paste into your app (only run scripts you trust).
|
|
610
|
+
|
|
611
|
+
### Execution budget
|
|
612
|
+
|
|
613
|
+
Loop conditions are instrumented at compile time, and each `compute()` invocation gets a
|
|
614
|
+
1000 ms wall-clock budget. A script that exceeds it (e.g. `while (true) {}`) throws
|
|
615
|
+
`"Script exceeded the 1000ms execution budget"`, which renders as the usual inline pane error
|
|
616
|
+
instead of freezing the tab. After a budget trip the script is circuit-broken — it is not run
|
|
617
|
+
again for that compiled instance, so live ticks don't re-trigger the stall. Recompiling (editing
|
|
618
|
+
the source and calling `compileScriptIndicator` again) resets the breaker. String/template/comment
|
|
619
|
+
contents are never instrumented; `for...of` / `for...in` loops are left untouched.
|
|
620
|
+
|
|
621
|
+
`validateScriptSource(source: string): string | null` — compile-checks a script without
|
|
622
|
+
registering it, returning an error message or `null`. It runs under the same execution budget, so
|
|
623
|
+
validating a script with a top-level infinite loop returns a budget error instead of hanging the
|
|
624
|
+
caller. Use this for editor save-validation instead of running `new Function` yourself.
|