@seaverse/payment-sdk 0.5.0 → 0.6.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/README.md CHANGED
@@ -152,6 +152,61 @@ interface CheckoutClientConfig {
152
152
  | `development` | `https://aiart-openresty.dev.seaart.dev` |
153
153
  | `production` | `https://www.seaart.ai` |
154
154
 
155
+ ## Styling and CSS
156
+
157
+ ### Style Isolation
158
+
159
+ The SDK uses the bundled `@seaart/payment-component` Web Component for the payment UI. The component's styles (30KB) are optimized for minimal global impact:
160
+
161
+ **✅ Well-isolated styles:**
162
+ - 218 component-scoped selectors using Vue's `[data-v-*]` attributes
163
+ - All component-specific styles are scoped to avoid conflicts
164
+ - Major global resets (`*{...}`, `html,body{...}`) have been removed
165
+
166
+ **⚠️ Remaining global styles (low risk):**
167
+
168
+ The following global styles are included and may affect your application:
169
+
170
+ ```css
171
+ /* App root container (may conflict if you use #app as root element ID) */
172
+ #app {
173
+ width: 100%;
174
+ height: 100%;
175
+ background: transparent;
176
+ }
177
+
178
+ /* Custom scrollbar styling (WebKit browsers only) */
179
+ ::-webkit-scrollbar { width: 6px; height: 6px }
180
+ ::-webkit-scrollbar-track { background: transparent }
181
+ ::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 3px }
182
+
183
+ /* Text selection color */
184
+ ::selection {
185
+ background: #6366f1;
186
+ color: #fff;
187
+ }
188
+ ```
189
+
190
+ **Risk assessment:**
191
+ - `#app` selector: **Medium risk** - Only conflicts if your root element uses `id="app"`
192
+ - Scrollbar styles: **Low risk** - Only affects scrollbar appearance in WebKit browsers
193
+ - Selection color: **Low risk** - Only changes text selection highlight color
194
+
195
+ **Recommendations:**
196
+ 1. ✅ Avoid using `id="app"` for your application's root element
197
+ 2. ✅ If you encounter conflicts, please report them as an issue
198
+ 3. ✅ Future SDK versions may provide additional isolation options if needed
199
+
200
+ ### CSS Import
201
+
202
+ Always import the SDK styles in your application:
203
+
204
+ ```typescript
205
+ import '@seaverse/payment-sdk/style.css';
206
+ ```
207
+
208
+ **Note:** The Web Component is already bundled into the SDK, so you do **not** need to install `@seaart/payment-component` separately.
209
+
155
210
  ## Usage with Frameworks
156
211
 
157
212
  ### Vue 3