@burdenoff/microfe-bigconsole 2026.1008.12 → 2026.1008.13
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/bigconsole/assistant/assistantProduct.d.ts.map +1 -1
- package/dist/bigconsole/assistant/assistantProduct.js.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +505 -504
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +8 -8
- package/dist/bigconsole/pages/InsightsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +373 -359
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserBuilderPage.js +5 -5
- package/dist/bigconsole/utils/insightsDraft.d.ts +30 -0
- package/dist/bigconsole/utils/insightsDraft.d.ts.map +1 -0
- package/dist/bigconsole/utils/insightsDraft.js +10 -0
- package/dist/bigconsole/utils/insightsDraft.js.map +1 -0
- package/dist/bigconsole/utils/widgetFormDirty.d.ts +17 -0
- package/dist/bigconsole/utils/widgetFormDirty.d.ts.map +1 -0
- package/dist/bigconsole/utils/widgetFormDirty.js +15 -0
- package/dist/bigconsole/utils/widgetFormDirty.js.map +1 -0
- package/dist/translations/en.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insightsDraft.js","names":[],"sources":["../../../src/bigconsole/utils/insightsDraft.ts"],"sourcesContent":["/**\n * Does the Insights page hold a description the person has typed and not submitted?\n * (BOFF-8060, N3/N4 leave guard.)\n *\n * The page has two draft textareas: the \"Describe your dashboard\" prompt and the refine\n * modal's \"What should change?\". Both are cleared by the page itself when their\n * submission is accepted (and when the refine modal is reopened), so the last submitted\n * value is always the empty string and \"unsubmitted\" reads as \"non-empty\". Pure\n * functions, no React, so the rule is testable without a DOM.\n *\n * - Whitespace-only text is clean: the page will not submit it, and nothing is lost.\n * - Text being submitted right now is clean: it already left the page (the mutation\n * keeps running after the person navigates). If the submission fails the page keeps\n * the text and clears the in-flight flag, so the draft reads dirty again.\n * - The refine text only counts while the refine modal is open.\n */\n\nexport interface InsightsDraftState {\n /** The \"Describe your dashboard\" textarea. */\n readonly promptText: string;\n /** A generation request for `promptText` is in flight. */\n readonly isGenerating: boolean;\n /** The refine modal is open. */\n readonly refineOpen: boolean;\n /** The refine modal's \"What should change?\" textarea. */\n readonly refineText: string;\n /** A refine request for the open generation is in flight. */\n readonly refineBusy: boolean;\n}\n\nconst hasText = (text: string): boolean => text.trim() !== '';\n\nexport function isInsightsDraftDirty(state: InsightsDraftState): boolean {\n const promptUnsubmitted = hasText(state.promptText) && !state.isGenerating;\n const refineUnsubmitted = state.refineOpen && hasText(state.refineText) && !state.refineBusy;\n return promptUnsubmitted || refineUnsubmitted;\n}\n"],"mappings":";AA8BA,IAAM,KAAW,MAA0B,EAAK,MAAM,KAAK;AAE3D,SAAgB,EAAqB,GAAoC;CACvE,IAAM,IAAoB,EAAQ,EAAM,WAAW,IAAI,CAAC,EAAM,cACxD,IAAoB,EAAM,cAAc,EAAQ,EAAM,WAAW,IAAI,CAAC,EAAM;AAClF,QAAO,KAAqB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** True when `form` differs by value from `baseline`. Either side missing is clean. */
|
|
2
|
+
export declare function isWidgetFormEdited<T>(form: T | null | undefined, baseline: T | null | undefined): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Adds an inferred DataSink binding to a form that is bound to `parserId` and has none.
|
|
5
|
+
*
|
|
6
|
+
* The widget inspector infers an absent `dataSinkId` from the parser's input sink key once the
|
|
7
|
+
* parser resolves (AI-created widgets bind a parser without duplicating its input sink id). That
|
|
8
|
+
* is the panel filling in what the widget already means, not an edit by the person. It is
|
|
9
|
+
* applied to the form AND to the baseline with this one function, so the value compare of
|
|
10
|
+
* `isWidgetFormEdited` reads clean. Returns the same object when nothing applies, so a state
|
|
11
|
+
* updater using it does not trigger a re-render.
|
|
12
|
+
*/
|
|
13
|
+
export declare function withInferredDataSink<T extends {
|
|
14
|
+
parserId?: string | null;
|
|
15
|
+
dataSinkId?: string | null;
|
|
16
|
+
}>(form: T | null | undefined, parserId: string, dataSinkId: string): T | null;
|
|
17
|
+
//# sourceMappingURL=widgetFormDirty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetFormDirty.d.ts","sourceRoot":"","sources":["../../../src/bigconsole/utils/widgetFormDirty.ts"],"names":[],"mappings":"AAsBA,uFAAuF;AACvF,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAKzG;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS;IAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EACrG,IAAI,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC1B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,CAAC,GAAG,IAAI,CAIV"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isDirty as e } from "./formDirty.js";
|
|
2
|
+
//#region src/bigconsole/utils/widgetFormDirty.ts
|
|
3
|
+
function t(t, n) {
|
|
4
|
+
return t == null || n == null ? !1 : e(t, n);
|
|
5
|
+
}
|
|
6
|
+
function n(e, t, n) {
|
|
7
|
+
return e == null ? null : e.parserId !== t || e.dataSinkId ? e : {
|
|
8
|
+
...e,
|
|
9
|
+
dataSinkId: n
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as isWidgetFormEdited, n as withInferredDataSink };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=widgetFormDirty.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetFormDirty.js","names":[],"sources":["../../../src/bigconsole/utils/widgetFormDirty.ts"],"sourcesContent":["/**\n * Widget inspector edit signal for the assistant's leave guard (BOFF-8060, N3/N4).\n *\n * The properties panel keeps a sticky boolean (`hasUnsavedChanges`) that every edit\n * handler sets and only a save, a discard or a widget switch clears. It drives the\n * panel's own prompts (the \"unsaved\" pill, the Save buttons, the re-seed bail-out)\n * and stays as it is. It is the wrong signal for the leave guard: typing a title and\n * then typing the original title back leaves it set, so the assistant would refuse a\n * navigation over a form that equals what is saved.\n *\n * The leave guard therefore asks a different question, by value: does the form the\n * person is editing differ from the baseline of the widget as it was opened (or as it\n * was last saved or discarded)? Pure functions, no React, so it is testable without a\n * DOM. Comparison is the stable JSON of `formDirty.isDirty` (sorted keys, `undefined`\n * dropped), so key order, object identity and an `undefined` that reads as missing\n * never count as an edit.\n *\n * A missing form (nothing selected) or a missing baseline (the seed has not landed)\n * is CLEAN: there is nothing the person could lose.\n */\nimport { isDirty } from './formDirty';\n\n/** True when `form` differs by value from `baseline`. Either side missing is clean. */\nexport function isWidgetFormEdited<T>(form: T | null | undefined, baseline: T | null | undefined): boolean {\n if (form === null || form === undefined || baseline === null || baseline === undefined) {\n return false;\n }\n return isDirty(form, baseline);\n}\n\n/**\n * Adds an inferred DataSink binding to a form that is bound to `parserId` and has none.\n *\n * The widget inspector infers an absent `dataSinkId` from the parser's input sink key once the\n * parser resolves (AI-created widgets bind a parser without duplicating its input sink id). That\n * is the panel filling in what the widget already means, not an edit by the person. It is\n * applied to the form AND to the baseline with this one function, so the value compare of\n * `isWidgetFormEdited` reads clean. Returns the same object when nothing applies, so a state\n * updater using it does not trigger a re-render.\n */\nexport function withInferredDataSink<T extends { parserId?: string | null; dataSinkId?: string | null }>(\n form: T | null | undefined,\n parserId: string,\n dataSinkId: string\n): T | null {\n if (form === null || form === undefined) return null;\n if (form.parserId !== parserId || form.dataSinkId) return form;\n return { ...form, dataSinkId };\n}\n"],"mappings":";;AAuBA,SAAgB,EAAsB,GAA4B,GAAyC;AAIzG,QAHI,KAAS,QAA8B,KAAa,OAC/C,KAEF,EAAQ,GAAM,EAAS;;AAahC,SAAgB,EACd,GACA,GACA,GACU;AAGV,QAFI,KAAS,OAAmC,OAC5C,EAAK,aAAa,KAAY,EAAK,aAAmB,IACnD;EAAE,GAAG;EAAM;EAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/translations/en.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/translations/en.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAgwEjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|