@burdenoff/microfe-bigconsole 2026.1104.3 → 2026.1104.4

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,43 @@
1
+ /**
2
+ * Parser wizard test gate (BOFF-10084).
3
+ *
4
+ * "Parsers you can test before you trust": the Expression & Test step must not
5
+ * be left, and the parser not created, until the CURRENT expression has passed
6
+ * a test. A test belongs to the exact (type, expression) pair it ran on, so
7
+ * editing the expression or switching JQ ↔ JSONata after a pass needs a new
8
+ * run; a failed run clears the pass.
9
+ *
10
+ * Users who may not run tests (no `bigconsole-parser:test`) cannot satisfy the
11
+ * gate, so for them it degrades to a warning instead of a dead end.
12
+ */
13
+ /** Identity of what a test ran on: the parser type and the trimmed expression. */
14
+ export declare function parserTestSignature(type: string, expression: string): string;
15
+ /** Whether the last passing test was of exactly this type + expression. */
16
+ export declare function isExpressionTested(passedSignature: string | null, type: string, expression: string): boolean;
17
+ export type ExpressionGateState = 'empty' | 'untested' | 'tested' | 'untestable';
18
+ /**
19
+ * Where the expression step stands:
20
+ * - `empty`: nothing to test yet (blocks Next).
21
+ * - `untested`: needs a passing run of the current expression (blocks Next).
22
+ * - `tested`: the current expression passed (Next allowed).
23
+ * - `untestable`: the user cannot run tests, so Next is allowed with a warning.
24
+ */
25
+ export declare function expressionGateState(input: {
26
+ type: string;
27
+ expression: string;
28
+ passedSignature: string | null;
29
+ canTest: boolean;
30
+ }): ExpressionGateState;
31
+ /** Whether the gate lets the user move past the expression step / create. */
32
+ export declare function expressionGateAllows(state: ExpressionGateState): boolean;
33
+ /**
34
+ * Whether a key press on the read-only (Reference mode) input is an attempt to
35
+ * edit it — printable characters, deletion, Enter. Navigation, selection and
36
+ * shortcuts such as Ctrl/Cmd+C stay silent.
37
+ */
38
+ export declare function isEditAttemptKey(event: {
39
+ key: string;
40
+ ctrlKey?: boolean;
41
+ metaKey?: boolean;
42
+ altKey?: boolean;
43
+ }): boolean;
@@ -0,0 +1,18 @@
1
+ //#region src/bigconsole/utils/parserTestGate.ts
2
+ function e(e, t) {
3
+ return `${e}\u0000${t.trim()}`;
4
+ }
5
+ function t(t, n, r) {
6
+ return t !== null && r.trim().length > 0 && t === e(n, r);
7
+ }
8
+ function n(e) {
9
+ return e.expression.trim() ? t(e.passedSignature, e.type, e.expression) ? "tested" : e.canTest ? "untested" : "untestable" : "empty";
10
+ }
11
+ function r(e) {
12
+ return e === "tested" || e === "untestable";
13
+ }
14
+ function i(e) {
15
+ return e.ctrlKey || e.metaKey || e.altKey ? !1 : e.key === "Backspace" || e.key === "Delete" || e.key === "Enter" || e.key.length === 1;
16
+ }
17
+ //#endregion
18
+ export { r as expressionGateAllows, n as expressionGateState, i as isEditAttemptKey, t as isExpressionTested, e as parserTestSignature };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-bigconsole",
3
- "version": "2026.1104.3",
3
+ "version": "2026.1104.4",
4
4
  "description": "BigConsole - AI-powered analytics and dashboard platform",
5
5
  "type": "module",
6
6
  "files": [