@mgamadeus/ddd-agents 0.5.16 → 0.5.17

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,15 @@
1
+ /** The upload side of the `XMLHttpRequest` stand-in (`xhr.upload`) and the events both sides dispatch. */
2
+ export type XhrEventName = "loadstart" | "progress" | "load" | "error" | "abort" | "timeout" | "loadend" | "readystatechange";
3
+ export type XhrEventHandler = ((this: unknown, event: Event) => unknown) | null;
4
+ export declare const createProgressEvent: (type: string, loaded: number, total: number) => Event;
5
+ /** The event target of `xhr.upload`: listeners and `on…` handlers for the upload's progress. */
6
+ export declare class InterceptedXMLHttpRequestUpload extends EventTarget {
7
+ onloadstart: XhrEventHandler;
8
+ onprogress: XhrEventHandler;
9
+ onload: XhrEventHandler;
10
+ onerror: XhrEventHandler;
11
+ onabort: XhrEventHandler;
12
+ ontimeout: XhrEventHandler;
13
+ onloadend: XhrEventHandler;
14
+ emit(type: XhrEventName, loaded?: number, total?: number): void;
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mgamadeus/ddd-agents",
3
- "version": "0.5.16",
3
+ "version": "0.5.17",
4
4
  "description": "The web frontend of the ddd-agents module: the agent chat, the widget renderer and the composed-view kit.",
5
5
  "keywords": [
6
6
  "ddd",
@@ -168,7 +168,6 @@
168
168
  "peerDependencies": {
169
169
  "@types/google.maps": "^3.55.0",
170
170
  "apexcharts": "^3.41.0",
171
- "axios": "^0.28.0",
172
171
  "dompurify": "^3.4.0",
173
172
  "highlight.js": "^11.12.0",
174
173
  "katex": "^0.19.0",
@@ -183,11 +182,6 @@
183
182
  "unified": "^11.0.5",
184
183
  "unist-util-visit": "^5.0.0"
185
184
  },
186
- "peerDependenciesMeta": {
187
- "axios": {
188
- "optional": true
189
- }
190
- },
191
185
  "devDependencies": {
192
186
  "@reduxjs/toolkit": "1.9.7",
193
187
  "@testing-library/dom": "10.4.0",
@@ -198,7 +192,6 @@
198
192
  "@types/react": "19.2.0",
199
193
  "@types/react-dom": "19.2.0",
200
194
  "apexcharts": "^3.41.0",
201
- "axios": "^0.28.0",
202
195
  "dompurify": "^3.4.0",
203
196
  "highlight.js": "^11.12.0",
204
197
  "jsdom": "29.1.1",
@@ -1,25 +0,0 @@
1
- "use client";
2
- import { V as getSandboxLegacyAliases } from "./link-navigation-CNX8Am2L.js";
3
- const WIDGET_IMAGE_READINESS_GLOBAL_NAME = "__AGENTS_WIDGET_IMAGE_V1__";
4
- const readWidgetImageReadinessGlobalNames = () => [
5
- WIDGET_IMAGE_READINESS_GLOBAL_NAME,
6
- ...(getSandboxLegacyAliases().imageReadinessGlobalNames ?? []).filter(
7
- (aliasName) => aliasName !== WIDGET_IMAGE_READINESS_GLOBAL_NAME
8
- )
9
- ];
10
- const publishWidgetImageReadiness = (readiness) => {
11
- const windowSignals = window;
12
- for (const globalName of readWidgetImageReadinessGlobalNames()) windowSignals[globalName] = readiness;
13
- };
14
- const readWidgetImageReadiness = () => {
15
- const windowSignals = window;
16
- const publishedSignals = readWidgetImageReadinessGlobalNames().map((globalName) => windowSignals[globalName]).filter((signal) => signal !== void 0 && signal !== null);
17
- return publishedSignals.find((signal) => signal.state === "failed") ?? publishedSignals[0];
18
- };
19
- export {
20
- WIDGET_IMAGE_READINESS_GLOBAL_NAME as W,
21
- readWidgetImageReadinessGlobalNames as a,
22
- publishWidgetImageReadiness as p,
23
- readWidgetImageReadiness as r
24
- };
25
- //# sourceMappingURL=widget-image-readiness-signal-C58JkCQA.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"widget-image-readiness-signal-C58JkCQA.js","sources":["../../src/image-render/widget-image-readiness-signal.ts"],"sourcesContent":["import { getSandboxLegacyAliases } from \"../provider/environment\";\nimport type { WidgetImageReadiness } from \"./widget-image-render.types\";\n\n/** The `window` property the image capture waits on. */\nexport const WIDGET_IMAGE_READINESS_GLOBAL_NAME = \"__AGENTS_WIDGET_IMAGE_V1__\";\n\ntype WindowSignals = Record<string, WidgetImageReadiness | undefined>;\n\n/**\n * Every name the image readiness signal is published under: the package's own, then each name the app declares\n * (`AgentsEnvironment.sandboxLegacyAliases.imageReadinessGlobalNames`) — read at each publish, so an app may declare\n * them after a readiness was created.\n */\nexport const readWidgetImageReadinessGlobalNames = (): string[] => [\n WIDGET_IMAGE_READINESS_GLOBAL_NAME,\n ...(getSandboxLegacyAliases().imageReadinessGlobalNames ?? []).filter(\n (aliasName) => aliasName !== WIDGET_IMAGE_READINESS_GLOBAL_NAME,\n ),\n];\n\n/** Publishes (or with `undefined` clears) the image readiness signal under every name. */\nexport const publishWidgetImageReadiness = (readiness: WidgetImageReadiness | undefined): void => {\n const windowSignals = window as unknown as WindowSignals;\n for (const globalName of readWidgetImageReadinessGlobalNames()) windowSignals[globalName] = readiness;\n};\n\n/**\n * The published image readiness signal. A `failed` value under ANY name wins — the app's own capture code may have\n * written it under a name it declared — otherwise the value under the package's name, otherwise the first value found.\n */\nexport const readWidgetImageReadiness = (): WidgetImageReadiness | undefined => {\n const windowSignals = window as unknown as WindowSignals;\n const publishedSignals = readWidgetImageReadinessGlobalNames()\n .map((globalName) => windowSignals[globalName])\n .filter((signal): signal is WidgetImageReadiness => signal !== undefined && signal !== null);\n return publishedSignals.find((signal) => signal.state === \"failed\") ?? publishedSignals[0];\n};\n"],"names":[],"mappings":";;AAIO,MAAM,qCAAqC;AAS3C,MAAM,sCAAsC,MAAgB;AAAA,EACjE;AAAA,EACA,IAAI,wBAAA,EAA0B,6BAA6B,CAAA,GAAI;AAAA,IAC7D,CAAC,cAAc,cAAc;AAAA,EAAA;AAEjC;AAGO,MAAM,8BAA8B,CAAC,cAAsD;AAChG,QAAM,gBAAgB;AACtB,aAAW,cAAc,oCAAA,EAAuC,eAAc,UAAU,IAAI;AAC9F;AAMO,MAAM,2BAA2B,MAAwC;AAC9E,QAAM,gBAAgB;AACtB,QAAM,mBAAmB,oCAAA,EACtB,IAAI,CAAC,eAAe,cAAc,UAAU,CAAC,EAC7C,OAAO,CAAC,WAA2C,WAAW,UAAa,WAAW,IAAI;AAC7F,SAAO,iBAAiB,KAAK,CAAC,WAAW,OAAO,UAAU,QAAQ,KAAK,iBAAiB,CAAC;AAC3F;"}