@burdenoff/microfe-coolandlovely 2026.1029.1 → 2026.1030.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSandboxAssistantTransport.d.ts","sourceRoot":"","sources":["../../src/services/createSandboxAssistantTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"createSandboxAssistantTransport.d.ts","sourceRoot":"","sources":["../../src/services/createSandboxAssistantTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,KAAK,IAAI,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAeD,wBAAgB,4BAA4B,IAAI,kBAAkB,CAOjE"}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { gatherPageContext as e } from "../utils/pageContext.js";
|
|
2
|
-
import {
|
|
2
|
+
import { dispatchAssistantQuotaExhausted as t, useSandboxAssistantTransport as n } from "@burdenoff/fe-libs/shared/assistant";
|
|
3
3
|
//#region src/services/createSandboxAssistantTransport.ts
|
|
4
|
-
function
|
|
5
|
-
|
|
4
|
+
function r() {
|
|
5
|
+
t("coolandlovely", "ai-credits");
|
|
6
|
+
}
|
|
7
|
+
function i() {
|
|
8
|
+
return n({
|
|
6
9
|
product: "coolandlovely",
|
|
7
10
|
gatherPageContext: e,
|
|
8
|
-
enableCredits: !0
|
|
11
|
+
enableCredits: !0,
|
|
12
|
+
onQuotaExhausted: r
|
|
9
13
|
});
|
|
10
14
|
}
|
|
11
15
|
//#endregion
|
|
12
|
-
export {
|
|
16
|
+
export { i as useSandboxAssistantTransport };
|
|
13
17
|
|
|
14
18
|
//# sourceMappingURL=createSandboxAssistantTransport.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSandboxAssistantTransport.js","names":[],"sources":["../../src/services/createSandboxAssistantTransport.ts"],"sourcesContent":["/**\n * coolandlovely adapter for the shared fe-libs AssistantWidget transport.\n *\n * The sandbox lifecycle + poll/stream loop now lives in\n * `@burdenoff/fe-libs/shared/assistant` (one implementation for all products);\n * this is a thin wrapper. The exported name/shape are unchanged so app-shell\n * imports don't move. The public return type is a LOCALLY-declared structural\n * mirror — never re-export fe-libs types (vite-plugin-dts path rewriting).\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"createSandboxAssistantTransport.js","names":[],"sources":["../../src/services/createSandboxAssistantTransport.ts"],"sourcesContent":["/**\n * coolandlovely adapter for the shared fe-libs AssistantWidget transport.\n *\n * The sandbox lifecycle + poll/stream loop now lives in\n * `@burdenoff/fe-libs/shared/assistant` (one implementation for all products);\n * this is a thin wrapper. The exported name/shape are unchanged so app-shell\n * imports don't move. The public return type is a LOCALLY-declared structural\n * mirror — never re-export fe-libs types (vite-plugin-dts path rewriting).\n */\n\nimport {\n dispatchAssistantQuotaExhausted,\n useSandboxAssistantTransport as useSharedTransport,\n} from '@burdenoff/fe-libs/shared/assistant';\nimport { gatherPageContext } from '@/utils/pageContext';\n\ninterface AssistantSendArgs {\n prompt: string;\n onProgress: (partialText: string) => void;\n signal: AbortSignal;\n}\n\nexport interface AssistantTransport {\n sendPrompt: (args: AssistantSendArgs) => Promise<{ text: string }>;\n prewarm?: (level?: 'probe' | 'full') => void;\n suspend?: () => void;\n}\n\n/**\n * A spent `coolandlovely.ai.credits` budget refuses the send in the shared\n * transport, and the widget shows that refusal in place of an answer\n * (BOFF-10274). This reports the wall on the product's\n * `coolandlovely:quota-exhausted` event as well, so a credits meter refetches\n * and a shell that mounts the upgrade bridge can offer the way past it.\n * Module-scoped so the transport (memoised on product/mode/user) never holds a\n * stale callback.\n */\nfunction onQuotaExhausted(): void {\n dispatchAssistantQuotaExhausted('coolandlovely', 'ai-credits');\n}\n\nexport function useSandboxAssistantTransport(): AssistantTransport {\n return useSharedTransport({\n product: 'coolandlovely',\n gatherPageContext: gatherPageContext,\n enableCredits: true,\n onQuotaExhausted,\n });\n}\n"],"mappings":";;;AAqCA,SAAS,IAAyB;AAChC,GAAgC,iBAAiB,aAAa;;AAGhE,SAAgB,IAAmD;AACjE,QAAO,EAAmB;EACxB,SAAS;EACU;EACnB,eAAe;EACf;EACD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-coolandlovely",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.1030.1",
|
|
4
4
|
"description": "Burdenoff CoolAndLovely Microfrontend",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@apollo/client": "^4.0.11",
|
|
51
|
-
"@burdenoff/fe-libs": "2026.
|
|
51
|
+
"@burdenoff/fe-libs": "2026.1030.8",
|
|
52
52
|
"@tanstack/react-query": "^5.90.16",
|
|
53
53
|
"clsx": "^2.1.1",
|
|
54
54
|
"graphql": "^16.12.0",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"access": "public"
|
|
105
105
|
},
|
|
106
106
|
"overrides": {
|
|
107
|
-
"@burdenoff/fe-libs": "2026.
|
|
107
|
+
"@burdenoff/fe-libs": "2026.1030.8",
|
|
108
108
|
"lodash": ">=4.17.21",
|
|
109
109
|
"lodash-es": ">=4.17.21",
|
|
110
110
|
"dompurify": ">=3.3.4",
|