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.
- package/LICENSE +21 -0
- package/dist/cjs/ai12z-chat_3.cjs.entry.js +395 -0
- package/dist/cjs/ai12z-chat_3.cjs.entry.js.map +1 -0
- package/dist/cjs/ai12z-spinner.cjs.entry.js +22 -0
- package/dist/cjs/ai12z-spinner.cjs.entry.js.map +1 -0
- package/dist/cjs/index-6be98462.js +1967 -0
- package/dist/cjs/index-6be98462.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/library.cjs.js +25 -0
- package/dist/cjs/library.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +15 -0
- package/dist/collection/components/ai12z-cta/ai12z-cta.css +1 -0
- package/dist/collection/components/ai12z-cta/ai12z-cta.js +340 -0
- package/dist/collection/components/ai12z-cta/ai12z-cta.js.map +1 -0
- package/dist/collection/components/ai12z-cta/components/Chat.js +112 -0
- package/dist/collection/components/ai12z-cta/components/Chat.js.map +1 -0
- package/dist/collection/components/ai12z-cta/components/Form.js +32 -0
- package/dist/collection/components/ai12z-cta/components/Form.js.map +1 -0
- package/dist/collection/components/ai12z-cta/components/SearchResult.js +8 -0
- package/dist/collection/components/ai12z-cta/components/SearchResult.js.map +1 -0
- package/dist/collection/components/ai12z-cta/components/ai12z-chat.css +1 -0
- package/dist/collection/components/input/Input.js +130 -0
- package/dist/collection/components/input/Input.js.map +1 -0
- package/dist/collection/components/input/input.css +1 -0
- package/dist/collection/components/spinner/Spinner.js +44 -0
- package/dist/collection/components/spinner/Spinner.js.map +1 -0
- package/dist/collection/components/spinner/spinner.css +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/utils/utils.js +86 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/collection/utils/utils.spec.js +16 -0
- package/dist/collection/utils/utils.spec.js.map +1 -0
- package/dist/esm/ai12z-chat_3.entry.js +389 -0
- package/dist/esm/ai12z-chat_3.entry.js.map +1 -0
- package/dist/esm/ai12z-spinner.entry.js +18 -0
- package/dist/esm/ai12z-spinner.entry.js.map +1 -0
- package/dist/esm/index-4dc12b55.js +1938 -0
- package/dist/esm/index-4dc12b55.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/library.js +20 -0
- package/dist/esm/library.js.map +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/library/index.esm.js +2 -0
- package/dist/library/index.esm.js.map +1 -0
- package/dist/library/library.esm.js +2 -0
- package/dist/library/library.esm.js.map +1 -0
- package/dist/library/p-65468fcf.entry.js +2 -0
- package/dist/library/p-65468fcf.entry.js.map +1 -0
- package/dist/library/p-b31186dc.js +3 -0
- package/dist/library/p-b31186dc.js.map +1 -0
- package/dist/library/p-f08d8e98.entry.js +2 -0
- package/dist/library/p-f08d8e98.entry.js.map +1 -0
- package/dist/types/components/ai12z-cta/ai12z-cta.d.ts +32 -0
- package/dist/types/components/ai12z-cta/components/Chat.d.ts +14 -0
- package/dist/types/components/ai12z-cta/components/Form.d.ts +1 -0
- package/dist/types/components/ai12z-cta/components/SearchResult.d.ts +1 -0
- package/dist/types/components/input/Input.d.ts +16 -0
- package/dist/types/components/spinner/Spinner.d.ts +4 -0
- package/dist/types/components.d.ts +130 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1681 -0
- package/dist/types/utils/utils.d.ts +5 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +42 -0
- 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,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;
|
package/loader/index.js
ADDED
|
@@ -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
|