@artooi/agents-web-components 0.1.0 → 0.1.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.
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/dom/dom_driver.ts", "../src/version.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n type FlashOptions,\n focusWithFlash,\n type HighlightClickOptions,\n highlightThenClick,\n type PressOptions,\n pressThenClick,\n type SelectOptions,\n scrollIntoCenterView,\n selectOption,\n type TextLikeElement,\n type ToggleOptions,\n type TypeOptions,\n toggleControl,\n typeInto,\n} from \"./animations.js\";\nimport { setNativeChecked, setNativeValue } from \"./native_setter.js\";\nimport { dispatchInputAndChange } from \"./utils.js\";\n\n/**\n * Every flash option except `focus`, which is not on offer: a field has to hold\n * focus to be typed into.\n */\nexport interface FillFieldOptions extends TypeOptions, Omit<FlashOptions, \"focus\"> {}\n\n/**\n * Scroll to, focus (with a flash), and type `value` into a text field.\n *\n * The scroll is awaited \u2014 typing into an element still gliding past shows the\n * user nothing.\n */\nexport async function fillField(\n el: TextLikeElement,\n value: string,\n options: FillFieldOptions = {},\n): Promise<void> {\n await scrollIntoCenterView(el);\n await focusWithFlash(el, { ...options, flashMs: options.flashMs ?? 0 });\n await typeInto(el, value, options);\n}\n\n/** Scroll to, highlight, and click an element. */\nexport async function clickElement(\n el: HTMLElement,\n options: HighlightClickOptions = {},\n): Promise<void> {\n await scrollIntoCenterView(el);\n await highlightThenClick(el, options);\n}\n\n/** Scroll to a button/control and click it with a visible \"press\" animation. */\nexport async function pressButton(el: HTMLElement, options: PressOptions = {}): Promise<void> {\n await scrollIntoCenterView(el);\n await pressThenClick(el, options);\n}\n\n/** Scroll to a `<select>`, highlight it, and pick the matching option (animated). */\nexport async function selectControl(\n el: HTMLSelectElement,\n value: string,\n options: SelectOptions = {},\n): Promise<void> {\n await scrollIntoCenterView(el);\n await selectOption(el, value, options);\n}\n\n/** Scroll to a checkbox/radio, flash it, and set its checked state (animated). */\nexport async function toggleCheckbox(\n el: HTMLInputElement,\n checked: boolean,\n options: ToggleOptions = {},\n): Promise<void> {\n await scrollIntoCenterView(el);\n await toggleControl(el, checked, options);\n}\n\n/**\n * Set a `<select>` or checkbox value without animation, dispatching the `input`\n * and `change` events frameworks listen for.\n */\nexport function setControlValue(\n el: HTMLInputElement | HTMLSelectElement,\n value: string | boolean,\n): void {\n if (el instanceof HTMLInputElement && el.type === \"checkbox\") {\n setNativeChecked(el, Boolean(value));\n } else {\n setNativeValue(el, String(value));\n }\n dispatchInputAndChange(el);\n}\n", "export const VERSION: string = \"0.1.
|
|
4
|
+
"sourcesContent": ["import {\n type FlashOptions,\n focusWithFlash,\n type HighlightClickOptions,\n highlightThenClick,\n type PressOptions,\n pressThenClick,\n type SelectOptions,\n scrollIntoCenterView,\n selectOption,\n type TextLikeElement,\n type ToggleOptions,\n type TypeOptions,\n toggleControl,\n typeInto,\n} from \"./animations.js\";\nimport { setNativeChecked, setNativeValue } from \"./native_setter.js\";\nimport { dispatchInputAndChange } from \"./utils.js\";\n\n/**\n * Every flash option except `focus`, which is not on offer: a field has to hold\n * focus to be typed into.\n */\nexport interface FillFieldOptions extends TypeOptions, Omit<FlashOptions, \"focus\"> {}\n\n/**\n * Scroll to, focus (with a flash), and type `value` into a text field.\n *\n * The scroll is awaited \u2014 typing into an element still gliding past shows the\n * user nothing.\n */\nexport async function fillField(\n el: TextLikeElement,\n value: string,\n options: FillFieldOptions = {},\n): Promise<void> {\n await scrollIntoCenterView(el);\n await focusWithFlash(el, { ...options, flashMs: options.flashMs ?? 0 });\n await typeInto(el, value, options);\n}\n\n/** Scroll to, highlight, and click an element. */\nexport async function clickElement(\n el: HTMLElement,\n options: HighlightClickOptions = {},\n): Promise<void> {\n await scrollIntoCenterView(el);\n await highlightThenClick(el, options);\n}\n\n/** Scroll to a button/control and click it with a visible \"press\" animation. */\nexport async function pressButton(el: HTMLElement, options: PressOptions = {}): Promise<void> {\n await scrollIntoCenterView(el);\n await pressThenClick(el, options);\n}\n\n/** Scroll to a `<select>`, highlight it, and pick the matching option (animated). */\nexport async function selectControl(\n el: HTMLSelectElement,\n value: string,\n options: SelectOptions = {},\n): Promise<void> {\n await scrollIntoCenterView(el);\n await selectOption(el, value, options);\n}\n\n/** Scroll to a checkbox/radio, flash it, and set its checked state (animated). */\nexport async function toggleCheckbox(\n el: HTMLInputElement,\n checked: boolean,\n options: ToggleOptions = {},\n): Promise<void> {\n await scrollIntoCenterView(el);\n await toggleControl(el, checked, options);\n}\n\n/**\n * Set a `<select>` or checkbox value without animation, dispatching the `input`\n * and `change` events frameworks listen for.\n */\nexport function setControlValue(\n el: HTMLInputElement | HTMLSelectElement,\n value: string | boolean,\n): void {\n if (el instanceof HTMLInputElement && el.type === \"checkbox\") {\n setNativeChecked(el, Boolean(value));\n } else {\n setNativeValue(el, String(value));\n }\n dispatchInputAndChange(el);\n}\n", "export const VERSION: string = \"0.1.1\";\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,eAAsB,UACpB,IACA,OACA,UAA4B,CAAC,GACd;AACf,QAAM,qBAAqB,EAAE;AAC7B,QAAM,eAAe,IAAI,EAAE,GAAG,SAAS,SAAS,QAAQ,WAAW,EAAE,CAAC;AACtE,QAAM,SAAS,IAAI,OAAO,OAAO;AACnC;AAGA,eAAsB,aACpB,IACA,UAAiC,CAAC,GACnB;AACf,QAAM,qBAAqB,EAAE;AAC7B,QAAM,mBAAmB,IAAI,OAAO;AACtC;AAGA,eAAsB,YAAY,IAAiB,UAAwB,CAAC,GAAkB;AAC5F,QAAM,qBAAqB,EAAE;AAC7B,QAAM,eAAe,IAAI,OAAO;AAClC;AAGA,eAAsB,cACpB,IACA,OACA,UAAyB,CAAC,GACX;AACf,QAAM,qBAAqB,EAAE;AAC7B,QAAM,aAAa,IAAI,OAAO,OAAO;AACvC;AAGA,eAAsB,eACpB,IACA,SACA,UAAyB,CAAC,GACX;AACf,QAAM,qBAAqB,EAAE;AAC7B,QAAM,cAAc,IAAI,SAAS,OAAO;AAC1C;AAMO,SAAS,gBACd,IACA,OACM;AACN,MAAI,cAAc,oBAAoB,GAAG,SAAS,YAAY;AAC5D,qBAAiB,IAAI,QAAQ,KAAK,CAAC;AAAA,EACrC,OAAO;AACL,mBAAe,IAAI,OAAO,KAAK,CAAC;AAAA,EAClC;AACA,yBAAuB,EAAE;AAC3B;;;AC1FO,IAAM,UAAkB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artooi/agents-web-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Framework-free <ag-ui-chat> Web Component over the AG-UI protocol. Drop-in chat sidebar with a pluggable client-side tool registry, DOM driver primitives, animations, and destructive-action confirmation modal.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION: string = "0.1.
|
|
1
|
+
export const VERSION: string = "0.1.1";
|