@kapaai/support-form-deflector 0.9.0 → 0.9.2

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":"state.d.ts","sourceRoot":"","sources":["../../src/state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,gBAAgB,GAChB,OAAO,GACP,eAAe,GACf,WAAW,GACX,SAAS,CAAC;AACd,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,cAAc,CAAC;IACtB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AAQF,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,SAAS,GAAG,gBAAgB,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;IACvE,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AA6DF,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CA6dA,CAAC;AAEF,eAAO,MAAM,YAAY;WA1eZ,WAAW;cACR,MAAM,QAAQ,CAAC,YAAY,CAAC;CA+e3C,CAAC"}
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,gBAAgB,GAChB,OAAO,GACP,eAAe,GACf,WAAW,GACX,SAAS,CAAC;AACd,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,cAAc,CAAC;IACtB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AAQF,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,SAAS,GAAG,gBAAgB,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;IACvE,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AA6DF,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAqdA,CAAC;AAEF,eAAO,MAAM,YAAY;WAleZ,WAAW;cACR,MAAM,QAAQ,CAAC,YAAY,CAAC;CAue3C,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { useConfig } from "../config";
2
+ /**
3
+ * Extracts the value from the given element.
4
+ * If the element is an input or textarea, it extracts the value.
5
+ * If the element is a div, it extracts the innerHTML.
6
+ * @param el The element to extract the value from.
7
+ * @returns The extracted value.
8
+ */
9
+ export default function extractValue(el: HTMLInputElement | HTMLTextAreaElement | HTMLDivElement, config: ReturnType<typeof useConfig>["config"], logger: ReturnType<typeof useConfig>["logger"]): string;
10
+ //# sourceMappingURL=extract-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-value.d.ts","sourceRoot":"","sources":["../../../src/utils/extract-value.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,EAAE,EAAE,gBAAgB,GAAG,mBAAmB,GAAG,cAAc,EAC3D,MAAM,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,QAAQ,CAAC,EAC9C,MAAM,EAAE,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,QAAQ,CAAC,UAa/C"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=extract-value.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-value.test.d.ts","sourceRoot":"","sources":["../../../src/utils/extract-value.test.tsx"],"names":[],"mappings":""}
@@ -1,9 +1,11 @@
1
1
  /**
2
- * Selects a DOM element based on a querySelector string that supports shadow DOM traversal.
3
- * The querySelector can include a double arrow (">>") syntax to specify shadow DOM boundaries,
4
- * allowing selection of elements within nested shadow roots.
2
+ * Selects a DOM element based on a querySelector string that supports shadow DOM and iframe traversal.
3
+ * The querySelector supports the following splitters:
4
+ * - "sr>>" or ">>" (legacy): Shadow DOM traversal
5
+ * - "ifr>>": Iframe traversal
6
+ * Combinations of these splitters are allowed, e.g., `iframe ifr>> .tag sr>> #tinymce`.
5
7
  *
6
- * @param querySelector - The selector string, supporting ">>" for shadow DOM traversal.
8
+ * @param querySelector - The selector string, supporting "sr>>", "ifr>>", and ">>" for traversal.
7
9
  * @returns The selected DOM element of type T, or null if no matching element is found.
8
10
  */
9
11
  export declare function selectElement<T extends Element>(querySelector: string): T | null;
@@ -1 +1 @@
1
- {"version":3,"file":"select-element.d.ts","sourceRoot":"","sources":["../../../src/utils/select-element.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,OAAO,EAC7C,aAAa,EAAE,MAAM,GACpB,CAAC,GAAG,IAAI,CAWV"}
1
+ {"version":3,"file":"select-element.d.ts","sourceRoot":"","sources":["../../../src/utils/select-element.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,OAAO,EAC7C,aAAa,EAAE,MAAM,GACpB,CAAC,GAAG,IAAI,CAmCV"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=select-element.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-element.test.d.ts","sourceRoot":"","sources":["../../../src/utils/select-element.test.tsx"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kapaai/support-form-deflector",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/esm/index.d.ts",