@constructor-io/constructorio-ui-asa 1.0.0
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/README.md +253 -0
- package/dist/constructorio-ui-asa-bundled.js +33 -0
- package/lib/cjs/components/Button/Button.css +61 -0
- package/lib/cjs/components/Button/Button.js +12 -0
- package/lib/cjs/components/Chat/AiMessage.css +35 -0
- package/lib/cjs/components/Chat/AiMessage.js +34 -0
- package/lib/cjs/components/Chat/Chat.css +103 -0
- package/lib/cjs/components/Chat/Chat.js +34 -0
- package/lib/cjs/components/Chat/ChatHeader.css +41 -0
- package/lib/cjs/components/Chat/ChatHeader.js +18 -0
- package/lib/cjs/components/Chat/ChatInput.css +83 -0
- package/lib/cjs/components/Chat/ChatInput.js +30 -0
- package/lib/cjs/components/Chat/ChatMessageList.css +23 -0
- package/lib/cjs/components/Chat/ChatMessageList.js +46 -0
- package/lib/cjs/components/Chat/TypingIndicator.css +51 -0
- package/lib/cjs/components/Chat/TypingIndicator.js +14 -0
- package/lib/cjs/components/Chat/UserMessage.css +25 -0
- package/lib/cjs/components/Chat/UserMessage.js +14 -0
- package/lib/cjs/components/Chat/WelcomeScreen.css +205 -0
- package/lib/cjs/components/Chat/WelcomeScreen.js +43 -0
- package/lib/cjs/components/CioAsaProvider/CioAsaProvider.js +23 -0
- package/lib/cjs/components/ResultsBlock/ResultsBlock.css +217 -0
- package/lib/cjs/components/ResultsBlock/ResultsBlock.js +73 -0
- package/lib/cjs/components/ResultsBlock/constants.js +11 -0
- package/lib/cjs/components/ResultsBlock/renderProductCard.js +21 -0
- package/lib/cjs/components/icons/ArrowRightIcon.js +9 -0
- package/lib/cjs/components/icons/ChatBubbleDarkIcon.js +9 -0
- package/lib/cjs/components/icons/ChatBubbleLightIcon.js +9 -0
- package/lib/cjs/components/icons/SendArrowIcon.js +9 -0
- package/lib/cjs/components/icons/SendPlaneIcon.js +9 -0
- package/lib/cjs/components/icons/index.js +16 -0
- package/lib/cjs/constants.js +6 -0
- package/lib/cjs/hooks/asaStreamHandlers.js +34 -0
- package/lib/cjs/hooks/useAsaResults.js +120 -0
- package/lib/cjs/hooks/useCioAsaContext.js +15 -0
- package/lib/cjs/hooks/useCioClient.js +21 -0
- package/lib/cjs/hooks/useFocusTrap.js +38 -0
- package/lib/cjs/hooks/useMessageInput.js +22 -0
- package/lib/cjs/hooks/useRequestConfigs.js +27 -0
- package/lib/cjs/index.js +24 -0
- package/lib/cjs/styles.css +34 -0
- package/lib/cjs/types.js +6 -0
- package/lib/cjs/utils/formatters.js +11 -0
- package/lib/cjs/utils/productNormalizer.js +20 -0
- package/lib/cjs/utils/translate.js +30 -0
- package/lib/cjs/utils/typeHelpers.js +2 -0
- package/lib/cjs/utils/urlHelpers.js +102 -0
- package/lib/cjs/version.js +3 -0
- package/lib/mjs/components/Button/Button.css +61 -0
- package/lib/mjs/components/Button/Button.js +8 -0
- package/lib/mjs/components/Chat/AiMessage.css +35 -0
- package/lib/mjs/components/Chat/AiMessage.js +29 -0
- package/lib/mjs/components/Chat/Chat.css +103 -0
- package/lib/mjs/components/Chat/Chat.js +31 -0
- package/lib/mjs/components/Chat/ChatHeader.css +41 -0
- package/lib/mjs/components/Chat/ChatHeader.js +14 -0
- package/lib/mjs/components/Chat/ChatInput.css +83 -0
- package/lib/mjs/components/Chat/ChatInput.js +26 -0
- package/lib/mjs/components/Chat/ChatMessageList.css +23 -0
- package/lib/mjs/components/Chat/ChatMessageList.js +41 -0
- package/lib/mjs/components/Chat/TypingIndicator.css +51 -0
- package/lib/mjs/components/Chat/TypingIndicator.js +10 -0
- package/lib/mjs/components/Chat/UserMessage.css +25 -0
- package/lib/mjs/components/Chat/UserMessage.js +10 -0
- package/lib/mjs/components/Chat/WelcomeScreen.css +205 -0
- package/lib/mjs/components/Chat/WelcomeScreen.js +38 -0
- package/lib/mjs/components/CioAsaProvider/CioAsaProvider.js +19 -0
- package/lib/mjs/components/ResultsBlock/ResultsBlock.css +217 -0
- package/lib/mjs/components/ResultsBlock/ResultsBlock.js +76 -0
- package/lib/mjs/components/ResultsBlock/constants.js +8 -0
- package/lib/mjs/components/ResultsBlock/renderProductCard.js +17 -0
- package/lib/mjs/components/icons/ArrowRightIcon.js +5 -0
- package/lib/mjs/components/icons/ChatBubbleDarkIcon.js +5 -0
- package/lib/mjs/components/icons/ChatBubbleLightIcon.js +5 -0
- package/lib/mjs/components/icons/SendArrowIcon.js +5 -0
- package/lib/mjs/components/icons/SendPlaneIcon.js +5 -0
- package/lib/mjs/components/icons/index.js +5 -0
- package/lib/mjs/constants.js +3 -0
- package/lib/mjs/hooks/asaStreamHandlers.js +39 -0
- package/lib/mjs/hooks/useAsaResults.js +118 -0
- package/lib/mjs/hooks/useCioAsaContext.js +11 -0
- package/lib/mjs/hooks/useCioClient.js +23 -0
- package/lib/mjs/hooks/useFocusTrap.js +35 -0
- package/lib/mjs/hooks/useMessageInput.js +19 -0
- package/lib/mjs/hooks/useRequestConfigs.js +24 -0
- package/lib/mjs/index.js +11 -0
- package/lib/mjs/styles.css +34 -0
- package/lib/mjs/types.js +2 -0
- package/lib/mjs/utils/formatters.js +7 -0
- package/lib/mjs/utils/productNormalizer.js +15 -0
- package/lib/mjs/utils/translate.js +26 -0
- package/lib/mjs/utils/typeHelpers.js +1 -0
- package/lib/mjs/utils/urlHelpers.js +90 -0
- package/lib/mjs/version.js +1 -0
- package/lib/types/components/Button/Button.d.ts +12 -0
- package/lib/types/components/Chat/AiMessage.d.ts +12 -0
- package/lib/types/components/Chat/Chat.d.ts +38 -0
- package/lib/types/components/Chat/ChatHeader.d.ts +12 -0
- package/lib/types/components/Chat/ChatInput.d.ts +13 -0
- package/lib/types/components/Chat/ChatMessageList.d.ts +24 -0
- package/lib/types/components/Chat/TypingIndicator.d.ts +10 -0
- package/lib/types/components/Chat/UserMessage.d.ts +12 -0
- package/lib/types/components/Chat/WelcomeScreen.d.ts +16 -0
- package/lib/types/components/CioAsaProvider/CioAsaProvider.d.ts +3 -0
- package/lib/types/components/ResultsBlock/ResultsBlock.d.ts +32 -0
- package/lib/types/components/ResultsBlock/constants.d.ts +3 -0
- package/lib/types/components/ResultsBlock/renderProductCard.d.ts +12 -0
- package/lib/types/components/icons/ArrowRightIcon.d.ts +2 -0
- package/lib/types/components/icons/ChatBubbleDarkIcon.d.ts +2 -0
- package/lib/types/components/icons/ChatBubbleLightIcon.d.ts +2 -0
- package/lib/types/components/icons/SendArrowIcon.d.ts +2 -0
- package/lib/types/components/icons/SendPlaneIcon.d.ts +2 -0
- package/lib/types/components/icons/index.d.ts +5 -0
- package/lib/types/constants.d.ts +2 -0
- package/lib/types/hooks/asaStreamHandlers.d.ts +8 -0
- package/lib/types/hooks/useAsaResults.d.ts +2 -0
- package/lib/types/hooks/useCioAsaContext.d.ts +9 -0
- package/lib/types/hooks/useCioClient.d.ts +6 -0
- package/lib/types/hooks/useFocusTrap.d.ts +11 -0
- package/lib/types/hooks/useMessageInput.d.ts +15 -0
- package/lib/types/hooks/useRequestConfigs.d.ts +7 -0
- package/lib/types/index.d.ts +12 -0
- package/lib/types/types.d.ts +178 -0
- package/lib/types/utils/formatters.d.ts +1 -0
- package/lib/types/utils/productNormalizer.d.ts +14 -0
- package/lib/types/utils/translate.d.ts +2 -0
- package/lib/types/utils/typeHelpers.d.ts +4 -0
- package/lib/types/utils/urlHelpers.d.ts +8 -0
- package/lib/types/version.d.ts +2 -0
- package/package.json +150 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Constructor.io Corporation
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# Constructor.io AI Shopping Agent (ASA) UI Library
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@constructor-io/constructorio-ui-asa)
|
|
4
|
+
[](https://github.com/Constructor-io/constructorio-ui-asa/blob/main/LICENSE)
|
|
5
|
+
|
|
6
|
+
A UI library that provides React components to manage the fetching and rendering logic for [Constructor.io's AI Shopping Agent](https://constructor.com/solutions/ai-shopping-agent/). TypeScript support is available.
|
|
7
|
+
|
|
8
|
+
A UI Library that provides React components to manage the fetching and rendering logic for [AI Shopping Agent](https://constructor.com/solutions/ai-shopping-agent/) powered by Constructor.io. Typescript support is available.
|
|
9
|
+
|
|
10
|
+
- [Overview](#overview)
|
|
11
|
+
- [Installation](#installation)
|
|
12
|
+
- [Usage](#usage)
|
|
13
|
+
- [Customization](#customization)
|
|
14
|
+
- [Troubleshooting](#troubleshooting)
|
|
15
|
+
- [Local Development](#local-development)
|
|
16
|
+
- [Publishing New Versions](#publishing-new-versions)
|
|
17
|
+
- [Supporting Docs](#supporting-docs)
|
|
18
|
+
- [Related Libraries](#related-libraries)
|
|
19
|
+
- [License](#license)
|
|
20
|
+
|
|
21
|
+
## Overview
|
|
22
|
+
|
|
23
|
+
[Constructor.io's AI Shopping Agent](https://constructor.com/solutions/ai-shopping-agent/) is a conversational shopping experience that helps shoppers discover products through natural-language chat. This UI library simplifies the integration process by providing React components that handle the fetching and rendering logic for the AI Shopping Agent.
|
|
24
|
+
|
|
25
|
+
[Our Storybook Docs](https://constructor-io.github.io/constructorio-ui-asa/?path=/docs/general-introduction--variants) are the best place to explore the behavior and the available configuration options for this UI library.
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm i @constructor-io/constructorio-ui-asa
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Prerequisites
|
|
34
|
+
|
|
35
|
+
This library declares the following as peer dependencies, so they must be present in your project:
|
|
36
|
+
|
|
37
|
+
| Package | Version |
|
|
38
|
+
|---------|---------|
|
|
39
|
+
| `@constructor-io/constructorio-client-javascript` | `^2.88.0` |
|
|
40
|
+
| `@constructor-io/constructorio-ui-components` | `^1.6.0` |
|
|
41
|
+
| `react` | `>=16.12.0` |
|
|
42
|
+
| `react-dom` | `>=16.12.0` |
|
|
43
|
+
| `tslib` | `^2.4.0` |
|
|
44
|
+
|
|
45
|
+
On npm 7+ these are installed automatically. If your package manager doesn't install peer dependencies automatically (yarn, pnpm, npm 6 and below), install any that are missing:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm install \
|
|
49
|
+
@constructor-io/constructorio-client-javascript \
|
|
50
|
+
@constructor-io/constructorio-ui-components \
|
|
51
|
+
react react-dom tslib
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Usage
|
|
55
|
+
|
|
56
|
+
### Using the React Components
|
|
57
|
+
|
|
58
|
+
Wrap your application (or the relevant subtree) with `CioAsaProvider` to supply the Constructor client and configuration, then render the `Chat` component for a full conversational UI.
|
|
59
|
+
|
|
60
|
+
```jsx
|
|
61
|
+
import { CioAsaProvider, Chat } from '@constructor-io/constructorio-ui-asa';
|
|
62
|
+
import '@constructor-io/constructorio-ui-asa/styles.css';
|
|
63
|
+
|
|
64
|
+
function ShoppingAgent() {
|
|
65
|
+
return (
|
|
66
|
+
<CioAsaProvider apiKey='YOUR_API_KEY'>
|
|
67
|
+
<Chat
|
|
68
|
+
onClose={() => {}}
|
|
69
|
+
onProductClick={(product) => (window.location.href = product.url)}
|
|
70
|
+
currency='$'
|
|
71
|
+
initialSuggestions={['Show me summer dresses', 'Best running shoes under $100']}
|
|
72
|
+
/>
|
|
73
|
+
</CioAsaProvider>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`CioAsaProvider` accepts:
|
|
79
|
+
|
|
80
|
+
| Prop | Type | Description |
|
|
81
|
+
|------|------|-------------|
|
|
82
|
+
| `apiKey` | `string` | Your Constructor index key. Required unless you pass your own `cioClient`. |
|
|
83
|
+
| `cioClient` | `ConstructorIOClient` | A pre-configured Constructor client. Provide this instead of `apiKey` when you need to customize client options (e.g. `serviceUrl`, `segments`, `userId`). |
|
|
84
|
+
| `staticRequestConfigs` | `RequestConfigs` | Request-level config passed to the ASA agent. Defaults to `{ domain: 'chatbot' }`. |
|
|
85
|
+
| `formatters` | `Formatters` | Override built-in formatters (e.g. `formatPrice`). Merged over the defaults. |
|
|
86
|
+
| `urlHelpers` | `UrlHelpers` | Override built-in URL read/write helpers. Merged over the defaults. |
|
|
87
|
+
|
|
88
|
+
> **Where do I get `apiKey`?** This is your Constructor index key (the same key used by other Constructor client integrations), available in your Constructor dashboard. The AI Shopping Agent must be enabled for your account — contact your Constructor representative if agent requests return errors.
|
|
89
|
+
|
|
90
|
+
> **Server-side rendering.** The Constructor client is only instantiated in the browser, so `Chat` and `useAsaResults` must run client-side only. In Next.js App Router, add `'use client'` and defer rendering until mounted (or load with `next/dynamic` and `{ ssr: false }`). See the [Integration Guide](https://constructor-io.github.io/constructorio-ui-asa/?path=/docs/general-integration-guide--variants) for a full example.
|
|
91
|
+
|
|
92
|
+
### Using the Hook Directly
|
|
93
|
+
|
|
94
|
+
For custom UI implementations, use the `useAsaResults` hook. It takes no arguments — all configuration comes from the surrounding `CioAsaProvider`.
|
|
95
|
+
|
|
96
|
+
```jsx
|
|
97
|
+
import { useAsaResults } from '@constructor-io/constructorio-ui-asa';
|
|
98
|
+
|
|
99
|
+
function CustomChat() {
|
|
100
|
+
const { messages, sendMessage, isStreaming, clearHistory } = useAsaResults();
|
|
101
|
+
|
|
102
|
+
return (
|
|
103
|
+
<div>
|
|
104
|
+
{messages.map((msg) => (
|
|
105
|
+
<div key={msg.id}>
|
|
106
|
+
<strong>{msg.role}:</strong> {msg.text}
|
|
107
|
+
</div>
|
|
108
|
+
))}
|
|
109
|
+
<button onClick={() => sendMessage('Show me running shoes')} disabled={isStreaming}>
|
|
110
|
+
Send
|
|
111
|
+
</button>
|
|
112
|
+
<button onClick={clearHistory}>Reset</button>
|
|
113
|
+
</div>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The hook returns `messages` (the full conversation), `sendMessage(text)`, `isStreaming`, and `clearHistory()`. Product results arrive on assistant messages in `msg.groups` and can be rendered with the exported `ResultsBlock` component.
|
|
119
|
+
|
|
120
|
+
## Customization
|
|
121
|
+
|
|
122
|
+
### Styling
|
|
123
|
+
|
|
124
|
+
By default, importing React components from this library does not pull any CSS into your project.
|
|
125
|
+
|
|
126
|
+
If you wish to use the starter styles from this library, add an import statement similar to the example below:
|
|
127
|
+
|
|
128
|
+
```js
|
|
129
|
+
import '@constructor-io/constructorio-ui-asa/styles.css';
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
- These starter styles can be used as a foundation to build on top of, or just as a reference for you to replace completely.
|
|
133
|
+
- To opt out of all default styling, do not import the `styles.css` stylesheet.
|
|
134
|
+
- All components use BEM-style class names prefixed with `cio-asa-` for easy style overrides.
|
|
135
|
+
|
|
136
|
+
### Translations
|
|
137
|
+
|
|
138
|
+
All user-facing text can be customized via the `translations` prop for internationalization. Pass only the keys you want to override — all others fall back to English defaults.
|
|
139
|
+
|
|
140
|
+
```jsx
|
|
141
|
+
<Chat
|
|
142
|
+
translations={{
|
|
143
|
+
'CioAsa.welcome.title': 'Style Advisor',
|
|
144
|
+
'CioAsa.welcome.placeholder': 'What are you looking for?',
|
|
145
|
+
'CioAsa.results.addToCart': 'Add to bag',
|
|
146
|
+
}}
|
|
147
|
+
/>
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Component Overrides
|
|
151
|
+
|
|
152
|
+
You can override individual sub-components using the `componentOverrides` prop with render props. See our [Storybook Docs](https://constructor-io.github.io/constructorio-ui-asa/?path=/docs/general-introduction--variants) for available override slots.
|
|
153
|
+
|
|
154
|
+
```jsx
|
|
155
|
+
<Chat
|
|
156
|
+
componentOverrides={{
|
|
157
|
+
header: {
|
|
158
|
+
reactNode: ({ title, onClose }) => (
|
|
159
|
+
<div className='my-header'>
|
|
160
|
+
<h1>{title}</h1>
|
|
161
|
+
<button onClick={onClose}>Close</button>
|
|
162
|
+
</div>
|
|
163
|
+
),
|
|
164
|
+
},
|
|
165
|
+
}}
|
|
166
|
+
/>
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Troubleshooting
|
|
170
|
+
|
|
171
|
+
### Known Issues
|
|
172
|
+
|
|
173
|
+
**Older JavaScript environments**
|
|
174
|
+
|
|
175
|
+
The library provides two builds: CommonJS (cjs) and ECMAScript Modules (mjs).
|
|
176
|
+
|
|
177
|
+
The ECMAScript Modules (mjs) build targets ESNext, which might not be supported by your environment. If your environment uses an older JavaScript version like ES6 (ES2015), you may get an error such as:
|
|
178
|
+
|
|
179
|
+
`Module parse failed: Unexpected token`
|
|
180
|
+
|
|
181
|
+
To solve this you can import the CommonJS (cjs) build, which supports ES6 (ES2015) syntax:
|
|
182
|
+
|
|
183
|
+
`import { Chat } from '@constructor-io/constructorio-ui-asa/cjs'`
|
|
184
|
+
|
|
185
|
+
**ESLint**
|
|
186
|
+
|
|
187
|
+
There is a known issue with ESLint where it fails to resolve the paths exposed in the `exports` statement of NPM packages. If you receive an error like the one below, you can safely disable ESLint using `// eslint-disable-line` for that line.
|
|
188
|
+
|
|
189
|
+
`Unable to resolve path to module '@constructor-io/constructorio-ui-asa/styles.css'`
|
|
190
|
+
|
|
191
|
+
Relevant open issues: [Issue 1868](https://github.com/import-js/eslint-plugin-import/issues/1868), [Issue 1810](https://github.com/import-js/eslint-plugin-import/issues/1810)
|
|
192
|
+
|
|
193
|
+
## Local Development
|
|
194
|
+
|
|
195
|
+
### Development Scripts
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
npm ci # Install dependencies for local dev
|
|
199
|
+
npm run dev # Start a local dev server for Storybook
|
|
200
|
+
npm run lint # Run lint
|
|
201
|
+
npm run test # Run tests
|
|
202
|
+
npm run check-types # Run TypeScript type checking
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Library Maintenance
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
npm run compile # Generate lib folder for publishing to npm
|
|
209
|
+
npm run build-storybook # Generate Storybook static bundle for deploy with GitHub Pages
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Publishing New Versions
|
|
213
|
+
|
|
214
|
+
Dispatch the [Publish](https://github.com/Constructor-io/constructorio-ui-asa/actions/workflows/publish.yml) workflow in GitHub Actions. You're required to provide two arguments:
|
|
215
|
+
|
|
216
|
+
- **Version Strategy**: `major`, `minor`, or `patch`.
|
|
217
|
+
- **Title**: A title for the release.
|
|
218
|
+
|
|
219
|
+
This workflow will automatically:
|
|
220
|
+
|
|
221
|
+
1. Bump the library version using the provided strategy.
|
|
222
|
+
2. Create a new git tag.
|
|
223
|
+
3. Create a new GitHub release.
|
|
224
|
+
4. Compile the library.
|
|
225
|
+
5. Publish the new version to NPM.
|
|
226
|
+
6. Publish the bundled version to the CDN.
|
|
227
|
+
7. Deploy the Storybook docs to GitHub Pages.
|
|
228
|
+
|
|
229
|
+
#### Note: Please don't manually increase the package.json version or create new git tags.
|
|
230
|
+
|
|
231
|
+
## Supporting Docs
|
|
232
|
+
|
|
233
|
+
- [Storybook Docs](https://constructor-io.github.io/constructorio-ui-asa/?path=/docs/general-introduction--variants)
|
|
234
|
+
- [Constructor.io API Documentation](https://docs.constructor.io/)
|
|
235
|
+
|
|
236
|
+
## Related Libraries
|
|
237
|
+
|
|
238
|
+
- [@constructor-io/constructorio-client-javascript](https://github.com/Constructor-io/constructorio-client-javascript) - JavaScript client for Constructor.io API
|
|
239
|
+
- [@constructor-io/constructorio-ui-autocomplete](https://github.com/Constructor-io/constructorio-ui-autocomplete) - Autocomplete UI library
|
|
240
|
+
- [@constructor-io/constructorio-ui-plp](https://github.com/Constructor-io/constructorio-ui-plp) - Product Listing Page UI library
|
|
241
|
+
- [@constructor-io/constructorio-ui-quizzes](https://github.com/Constructor-io/constructorio-ui-quizzes) - Quizzes UI library
|
|
242
|
+
|
|
243
|
+
## Contributing
|
|
244
|
+
|
|
245
|
+
1. Fork the repo and create a new branch.
|
|
246
|
+
2. Run `npm ci` to install dependencies.
|
|
247
|
+
3. Make your changes.
|
|
248
|
+
4. Run `npm run lint` and `npm run test` to verify.
|
|
249
|
+
5. Submit a PR for review.
|
|
250
|
+
|
|
251
|
+
## License
|
|
252
|
+
|
|
253
|
+
MIT © [Constructor.io Corporation](https://constructor.io/)
|