ai12z 0.0.1-alpha.8

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.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/ai12z-chat_3.cjs.entry.js +395 -0
  3. package/dist/cjs/ai12z-chat_3.cjs.entry.js.map +1 -0
  4. package/dist/cjs/ai12z-spinner.cjs.entry.js +22 -0
  5. package/dist/cjs/ai12z-spinner.cjs.entry.js.map +1 -0
  6. package/dist/cjs/index-6be98462.js +1967 -0
  7. package/dist/cjs/index-6be98462.js.map +1 -0
  8. package/dist/cjs/index.cjs.js +4 -0
  9. package/dist/cjs/index.cjs.js.map +1 -0
  10. package/dist/cjs/library.cjs.js +25 -0
  11. package/dist/cjs/library.cjs.js.map +1 -0
  12. package/dist/cjs/loader.cjs.js +15 -0
  13. package/dist/cjs/loader.cjs.js.map +1 -0
  14. package/dist/collection/collection-manifest.json +15 -0
  15. package/dist/collection/components/ai12z-cta/ai12z-cta.css +1 -0
  16. package/dist/collection/components/ai12z-cta/ai12z-cta.js +340 -0
  17. package/dist/collection/components/ai12z-cta/ai12z-cta.js.map +1 -0
  18. package/dist/collection/components/ai12z-cta/components/Chat.js +112 -0
  19. package/dist/collection/components/ai12z-cta/components/Chat.js.map +1 -0
  20. package/dist/collection/components/ai12z-cta/components/Form.js +32 -0
  21. package/dist/collection/components/ai12z-cta/components/Form.js.map +1 -0
  22. package/dist/collection/components/ai12z-cta/components/SearchResult.js +8 -0
  23. package/dist/collection/components/ai12z-cta/components/SearchResult.js.map +1 -0
  24. package/dist/collection/components/ai12z-cta/components/ai12z-chat.css +1 -0
  25. package/dist/collection/components/input/Input.js +130 -0
  26. package/dist/collection/components/input/Input.js.map +1 -0
  27. package/dist/collection/components/input/input.css +1 -0
  28. package/dist/collection/components/spinner/Spinner.js +44 -0
  29. package/dist/collection/components/spinner/Spinner.js.map +1 -0
  30. package/dist/collection/components/spinner/spinner.css +1 -0
  31. package/dist/collection/index.js +2 -0
  32. package/dist/collection/index.js.map +1 -0
  33. package/dist/collection/utils/utils.js +86 -0
  34. package/dist/collection/utils/utils.js.map +1 -0
  35. package/dist/collection/utils/utils.spec.js +16 -0
  36. package/dist/collection/utils/utils.spec.js.map +1 -0
  37. package/dist/esm/ai12z-chat_3.entry.js +389 -0
  38. package/dist/esm/ai12z-chat_3.entry.js.map +1 -0
  39. package/dist/esm/ai12z-spinner.entry.js +18 -0
  40. package/dist/esm/ai12z-spinner.entry.js.map +1 -0
  41. package/dist/esm/index-4dc12b55.js +1938 -0
  42. package/dist/esm/index-4dc12b55.js.map +1 -0
  43. package/dist/esm/index.js +3 -0
  44. package/dist/esm/index.js.map +1 -0
  45. package/dist/esm/library.js +20 -0
  46. package/dist/esm/library.js.map +1 -0
  47. package/dist/esm/loader.js +11 -0
  48. package/dist/esm/loader.js.map +1 -0
  49. package/dist/esm/polyfills/core-js.js +11 -0
  50. package/dist/esm/polyfills/dom.js +79 -0
  51. package/dist/esm/polyfills/es5-html-element.js +1 -0
  52. package/dist/esm/polyfills/index.js +34 -0
  53. package/dist/esm/polyfills/system.js +6 -0
  54. package/dist/index.cjs.js +1 -0
  55. package/dist/index.js +1 -0
  56. package/dist/library/index.esm.js +2 -0
  57. package/dist/library/index.esm.js.map +1 -0
  58. package/dist/library/library.esm.js +2 -0
  59. package/dist/library/library.esm.js.map +1 -0
  60. package/dist/library/p-65468fcf.entry.js +2 -0
  61. package/dist/library/p-65468fcf.entry.js.map +1 -0
  62. package/dist/library/p-b31186dc.js +3 -0
  63. package/dist/library/p-b31186dc.js.map +1 -0
  64. package/dist/library/p-f08d8e98.entry.js +2 -0
  65. package/dist/library/p-f08d8e98.entry.js.map +1 -0
  66. package/dist/types/components/ai12z-cta/ai12z-cta.d.ts +32 -0
  67. package/dist/types/components/ai12z-cta/components/Chat.d.ts +14 -0
  68. package/dist/types/components/ai12z-cta/components/Form.d.ts +1 -0
  69. package/dist/types/components/ai12z-cta/components/SearchResult.d.ts +1 -0
  70. package/dist/types/components/input/Input.d.ts +16 -0
  71. package/dist/types/components/spinner/Spinner.d.ts +4 -0
  72. package/dist/types/components.d.ts +130 -0
  73. package/dist/types/index.d.ts +1 -0
  74. package/dist/types/stencil-public-runtime.d.ts +1681 -0
  75. package/dist/types/utils/utils.d.ts +5 -0
  76. package/loader/cdn.js +3 -0
  77. package/loader/index.cjs.js +3 -0
  78. package/loader/index.d.ts +21 -0
  79. package/loader/index.es2017.js +3 -0
  80. package/loader/index.js +4 -0
  81. package/loader/package.json +11 -0
  82. package/package.json +42 -0
  83. package/readme.md +30 -0
@@ -0,0 +1,5 @@
1
+ export declare function format(first: string, middle: string, last: string): string;
2
+ export declare function search(apiKey: string, env: string, terms: string): Promise<any>;
3
+ export declare function askAI(apiKey: string, env: string, question: string, conversationId: string): Promise<any>;
4
+ export declare function sendFeedback(apiKey: string, env: string, insightId: string, feedback: 1 | -1): Promise<any>;
5
+ export declare function debounce(func: any, timeout?: number): (...args: any[]) => void;
package/loader/cdn.js ADDED
@@ -0,0 +1,3 @@
1
+
2
+ module.exports = require('../dist/cjs/loader.cjs.js');
3
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -0,0 +1,3 @@
1
+
2
+ module.exports = require('../dist/cjs/loader.cjs.js');
3
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -0,0 +1,21 @@
1
+ export * from '../dist/types/components';
2
+ export interface CustomElementsDefineOptions {
3
+ exclude?: string[];
4
+ resourcesUrl?: string;
5
+ syncQueue?: boolean;
6
+ jmp?: (c: Function) => any;
7
+ raf?: (c: FrameRequestCallback) => number;
8
+ ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
9
+ rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
10
+ }
11
+ export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
12
+ export declare function applyPolyfills(): Promise<void>;
13
+
14
+ /**
15
+ * Used to specify a nonce value that corresponds with an application's CSP.
16
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
17
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
18
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
19
+ * will result in the same behavior.
20
+ */
21
+ export declare function setNonce(nonce: string): void;
@@ -0,0 +1,3 @@
1
+
2
+ export * from '../dist/esm/polyfills/index.js';
3
+ export * from '../dist/esm/loader.js';
@@ -0,0 +1,4 @@
1
+
2
+ (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
3
+ export * from '../dist/esm/polyfills/index.js';
4
+ export * from '../dist/esm/loader.js';
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "library-loader",
3
+ "private": true,
4
+ "typings": "./index.d.ts",
5
+ "module": "./index.js",
6
+ "main": "./index.cjs.js",
7
+ "jsnext:main": "./index.es2017.js",
8
+ "es2015": "./index.es2017.js",
9
+ "es2017": "./index.es2017.js",
10
+ "unpkg": "./cdn.js"
11
+ }
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "ai12z",
3
+ "version": "0.0.1-alpha.8",
4
+ "description": "ai12z Web Components",
5
+ "private": false,
6
+ "main": "dist/index.cjs.js",
7
+ "module": "dist/index.js",
8
+ "es2015": "dist/esm/index.js",
9
+ "es2017": "dist/esm/index.js",
10
+ "types": "dist/types/index.d.ts",
11
+ "collection": "dist/collection/collection-manifest.json",
12
+ "collection:main": "dist/collection/index.js",
13
+ "unpkg": "dist/stencil-library/stencil-library.esm.js",
14
+ "files": [
15
+ "dist/",
16
+ "loader/"
17
+ ],
18
+ "scripts": {
19
+ "build": "stencil build",
20
+ "start": "stencil build --dev --watch --serve",
21
+ "test": "stencil test --spec --e2e",
22
+ "test.watch": "stencil test --spec --e2e --watchAll",
23
+ "generate": "stencil generate"
24
+ },
25
+ "dependencies": {
26
+ "@stencil/core": "^4.7.0"
27
+ },
28
+ "devDependencies": {
29
+ "@stencil/angular-output-target": "^0.8.3",
30
+ "@stencil/react-output-target": "^0.5.3",
31
+ "@types/jest": "^29.5.6",
32
+ "@types/node": "^16.18.11",
33
+ "jest": "^29.7.0",
34
+ "jest-cli": "^29.7.0",
35
+ "puppeteer": "^21.7.0",
36
+ "stencil-tailwind-plugin": "^1.8.0",
37
+ "tailwindcss": "^3.4.1",
38
+ "typescript": "^5.3.3"
39
+ },
40
+ "license": "ISC",
41
+ "gitHead": "3fe6497bfca107b5ff23cb81ce1874b24343998f"
42
+ }
package/readme.md ADDED
@@ -0,0 +1,30 @@
1
+ # ai12z Web Components
2
+
3
+ `@ai12z/core` is a library of web components to integrate ai12z platform to you website / web app.
4
+
5
+ # Setup
6
+
7
+ To install from npm:
8
+
9
+ ```
10
+ npm install @ai12z/core@latest --save
11
+ ```
12
+
13
+ ## Getting Started
14
+
15
+ ### Script tag
16
+
17
+ - Put a script tag similar to this `<script type='module' src='https://unpkg.com/@ai12z@0.0.1/dist/@ai12z/esm/index.js'></script>` in the head of your index.html
18
+ - Then you can use the element anywhere in your template, JSX, html etc
19
+
20
+ ### Node Modules
21
+
22
+ - Run `npm install my-component --save`
23
+ - Put a script tag similar to this `<script type='module' src='node_modules/my-component/dist/@ai12z/esm/index.js'></script>` in the head of your index.html
24
+ - Then you can use the element anywhere in your template, JSX, html etc
25
+
26
+ ### In a stencil-starter app
27
+
28
+ - Run `npm install @ai12z/core@latest --save`
29
+ - Add an import to the npm packages `import ;`
30
+ - Then you can use the element anywhere in your template, JSX, html etc