@intelliweave/embedded 2.1.79 → 2.2.80
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/AGENTS.md +12 -0
- package/dist/component/component.d.ts +58 -0
- package/dist/component/component.js +777 -95
- package/dist/intelliweave-wordpress.zip +0 -0
- package/dist/node/node.d.ts +58 -0
- package/dist/node/node.js +26 -26
- package/dist/react/react.d.ts +2 -0
- package/dist/react/react.js +735 -53
- package/dist/script-tag/script-tag.js +777 -95
- package/dist/webpack/index.d.ts +58 -0
- package/dist/webpack/index.js +729 -47
- package/package.json +1 -1
package/AGENTS.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# IntelliWeave SDK
|
|
2
|
+
IntelliWeave (formerly Web Weaver) is an AI management platform and SDK that allows users to set up AI in their apps and websites. The SDK (this project) is written in
|
|
3
|
+
TypeScript and uses Web Components for the built-in UI. Users of this SDK can choose to use the built-in UI or create their own custom UI by using the `IntelliWeave` class directly.
|
|
4
|
+
|
|
5
|
+
The `WebWeaverEmbed` class is the entry point for the built-in Web Component-based UI.
|
|
6
|
+
|
|
7
|
+
## Guidelines
|
|
8
|
+
- Do not use a linter, it has not been set up yet.
|
|
9
|
+
- Run `npm test` for testing code changes. The tests only cover logic, not UI. Due to the nature of older LLMs, sometimes the tests fail when the AI decides to behave differently. If you encounter this, run the test a second time to make sure.
|
|
10
|
+
- Follow existing code styling
|
|
11
|
+
- Make sure to include comments, even if they are redundant
|
|
12
|
+
- Prefer inline code instead of small functions where possible, unless the code will be extensively reused or is complex enough to warrant abstraction
|
|
@@ -1146,6 +1146,8 @@ interface WebWeaverGPTConfig {
|
|
|
1146
1146
|
offsetX?: number;
|
|
1147
1147
|
/** Vertical offset from edge in pixels (default: 20) - only used when positioningMode is 'fixed' */
|
|
1148
1148
|
offsetY?: number;
|
|
1149
|
+
/** Custom brand name displayed in the panel header kicker (replaces "IntelliWeave"). */
|
|
1150
|
+
brandName?: string;
|
|
1149
1151
|
/** Identifier of an external app or service which manages this persona, if any. (eg. "chatterly") */
|
|
1150
1152
|
managedBy?: string;
|
|
1151
1153
|
/** Voice information */
|
|
@@ -1370,6 +1372,14 @@ declare class WebWeaverEmbed extends BaseComponent {
|
|
|
1370
1372
|
private _uiSessionStartTime?;
|
|
1371
1373
|
/** Embedded action blocks already handled for each streamed message section */
|
|
1372
1374
|
private _handledEmbeddedActionBlocks;
|
|
1375
|
+
/** If opened by mobile swipe from the collapsed tab, swipe-close should return to collapsed tab */
|
|
1376
|
+
private _returnToCollapsedOnSwipeClose;
|
|
1377
|
+
/** Suppress the next container click event (used after a swipe-close to prevent re-opening) */
|
|
1378
|
+
private _suppressNextContainerClick;
|
|
1379
|
+
/** Mobile swipe start point */
|
|
1380
|
+
private _swipeStart?;
|
|
1381
|
+
/** Previous fullscreen state for refreshing mobile scroll containment */
|
|
1382
|
+
private _previousFullscreenState;
|
|
1373
1383
|
/** Constructor */
|
|
1374
1384
|
constructor();
|
|
1375
1385
|
/** Content */
|
|
@@ -1389,10 +1399,14 @@ declare class WebWeaverEmbed extends BaseComponent {
|
|
|
1389
1399
|
private _lastPositionY?;
|
|
1390
1400
|
private _lastOffsetX?;
|
|
1391
1401
|
private _lastOffsetY?;
|
|
1402
|
+
private _lastBrandName?;
|
|
1392
1403
|
/** Apply persona-based color variants as CSS variables */
|
|
1393
1404
|
private applyPersonaColorVariants;
|
|
1394
1405
|
/** Parse a color string to RGB (supports hex and rgb/rgba) */
|
|
1395
1406
|
private parseColorToRGB;
|
|
1407
|
+
/** Compute a complementary kicker color via hue-shift (+120°) from a given background color.
|
|
1408
|
+
* Returns null if the color cannot be parsed (so the CSS default is used). */
|
|
1409
|
+
private computeKickerColor;
|
|
1396
1410
|
/** Adjust inner container spacing based on logo aspect ratio */
|
|
1397
1411
|
private adjustLogoPadding;
|
|
1398
1412
|
/** Apply UI styles from config and attributes, prioritizing attributes */
|
|
@@ -1403,6 +1417,48 @@ declare class WebWeaverEmbed extends BaseComponent {
|
|
|
1403
1417
|
onDestroy(): void;
|
|
1404
1418
|
/** Called when the container is clicked */
|
|
1405
1419
|
onContainerClick(e: Event): void;
|
|
1420
|
+
/** Open from the floating dock button */
|
|
1421
|
+
onDockOpenClick(e: Event): void;
|
|
1422
|
+
/** Collapse the floating dock into a side tab */
|
|
1423
|
+
onDockCollapseClick(e: Event): void;
|
|
1424
|
+
/** Open from the collapsed side tab — show the dock/circle view first, not the full chat */
|
|
1425
|
+
onCollapsedOpenClick(e: Event): void;
|
|
1426
|
+
/** Collapse from the panel header */
|
|
1427
|
+
onPanelCollapseClick(e: Event): void;
|
|
1428
|
+
/** Toggle fullscreen state for widget layout */
|
|
1429
|
+
onPanelFullscreenClick(e: Event): void;
|
|
1430
|
+
/** Close the panel */
|
|
1431
|
+
onPanelCloseClick(e: Event): void;
|
|
1432
|
+
/** True if the UI cannot be manually closed/collapsed */
|
|
1433
|
+
private isForcedOpen;
|
|
1434
|
+
/** Open the normal panel from the dock button */
|
|
1435
|
+
private openFromDock;
|
|
1436
|
+
/** Refresh the chat scroller after fullscreen transitions, especially for iOS momentum scroll. */
|
|
1437
|
+
private refreshContentScrollability;
|
|
1438
|
+
/** Show the dock/circle view from the collapsed tab (without opening chat) */
|
|
1439
|
+
private showDockFromCollapsed;
|
|
1440
|
+
/** Open the panel from the collapsed tab */
|
|
1441
|
+
private openFromCollapsed;
|
|
1442
|
+
/** Close the panel, returning to the side tab when opened from the tab by swipe */
|
|
1443
|
+
private closePanel;
|
|
1444
|
+
/** Collapse the whole dock into the side tab */
|
|
1445
|
+
private collapseDock;
|
|
1446
|
+
/** Track pointer start for mobile horizontal swipe gestures */
|
|
1447
|
+
onSwipePointerDown(e: PointerEvent): void;
|
|
1448
|
+
/** Reset swipe tracking */
|
|
1449
|
+
onSwipePointerCancel(): void;
|
|
1450
|
+
/** Direction that moves into the viewport from the dock side. */
|
|
1451
|
+
private inwardSwipeDirection;
|
|
1452
|
+
/** Direction that moves back out toward the dock side. */
|
|
1453
|
+
private outwardSwipeDirection;
|
|
1454
|
+
/** True when a pointer release was a horizontal swipe in the requested direction */
|
|
1455
|
+
private didSwipe;
|
|
1456
|
+
/** Open the collapsed tab on mobile inward-swipe */
|
|
1457
|
+
onCollapsedSwipePointerUp(e: PointerEvent): void;
|
|
1458
|
+
/** Open the dock on mobile inward-swipe */
|
|
1459
|
+
onDockSwipePointerUp(e: PointerEvent): void;
|
|
1460
|
+
/** Close the panel on mobile outward-swipe */
|
|
1461
|
+
onPanelSwipePointerUp(e: PointerEvent): void;
|
|
1406
1462
|
/** Called when the logo is clicked */
|
|
1407
1463
|
onLogoClick(e: Event): void;
|
|
1408
1464
|
/** Open the interaction panel */
|
|
@@ -1427,6 +1483,8 @@ declare class WebWeaverEmbed extends BaseComponent {
|
|
|
1427
1483
|
private clampNumber;
|
|
1428
1484
|
/** Keep AI-provided emoji text short enough to render safely as a visual effect. */
|
|
1429
1485
|
private normalizeEmojiActionValue;
|
|
1486
|
+
/** Keep AI-provided suggestion text short enough to render safely as a button. */
|
|
1487
|
+
private normalizeSuggestionActionValue;
|
|
1430
1488
|
/** Render a bounded burst of emoji particles in the embed overlay. */
|
|
1431
1489
|
private showEmojiBurst;
|
|
1432
1490
|
/** Updates an info block element */
|