@blocklet/payment-react 1.19.23 → 1.20.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.
Files changed (43) hide show
  1. package/.aigne/doc-smith/config.yaml +114 -0
  2. package/.aigne/doc-smith/output/structure-plan.json +361 -0
  3. package/.aigne/doc-smith/preferences.yml +55 -0
  4. package/.aigne/doc-smith/upload-cache.yaml +264 -0
  5. package/README.md +2 -3
  6. package/docs/_sidebar.md +33 -0
  7. package/docs/components-business-auto-topup.md +238 -0
  8. package/docs/components-business-overdue-invoice-payment.md +231 -0
  9. package/docs/components-business-resume-subscription.md +177 -0
  10. package/docs/components-business.md +45 -0
  11. package/docs/components-checkout-checkout-donate.md +199 -0
  12. package/docs/components-checkout-checkout-form.md +185 -0
  13. package/docs/components-checkout-checkout-table.md +228 -0
  14. package/docs/components-checkout.md +131 -0
  15. package/docs/components-history-credit-grants-list.md +98 -0
  16. package/docs/components-history-credit-transactions-list.md +116 -0
  17. package/docs/components-history-invoice-list.md +104 -0
  18. package/docs/components-history-payment-list.md +65 -0
  19. package/docs/components-history.md +92 -0
  20. package/docs/components-ui-form-elements-address-form.md +150 -0
  21. package/docs/components-ui-form-elements-country-select.md +105 -0
  22. package/docs/components-ui-form-elements-currency-selector.md +124 -0
  23. package/docs/components-ui-form-elements-phone-input.md +160 -0
  24. package/docs/components-ui-form-elements.md +125 -0
  25. package/docs/components-ui-payment-summary.md +157 -0
  26. package/docs/components-ui-pricing-table.md +227 -0
  27. package/docs/components-ui.md +44 -0
  28. package/docs/components.md +95 -0
  29. package/docs/getting-started.md +111 -0
  30. package/docs/guides-theming.md +175 -0
  31. package/docs/guides-utilities.md +235 -0
  32. package/docs/guides.md +95 -0
  33. package/docs/hooks-use-mobile.md +70 -0
  34. package/docs/hooks-use-subscription.md +129 -0
  35. package/docs/hooks.md +84 -0
  36. package/docs/overview.md +87 -0
  37. package/docs/providers-donate-provider.md +175 -0
  38. package/docs/providers-payment-provider.md +245 -0
  39. package/docs/providers.md +101 -0
  40. package/es/payment/form/index.js +15 -1
  41. package/lib/payment/form/index.js +14 -1
  42. package/package.json +5 -5
  43. package/src/payment/form/index.tsx +16 -1
@@ -0,0 +1,114 @@
1
+ # Project information for documentation publishing
2
+ projectName: "Payment Kit React Components"
3
+ projectDesc: "A React component library for building payment flows, subscriptions, and donation systems in blocklets, seamlessly integrated with Payment Kit."
4
+ projectLogo:
5
+
6
+ # =============================================================================
7
+ # Documentation Configuration
8
+ # =============================================================================
9
+
10
+ # Purpose: What's the main outcome you want readers to achieve?
11
+ # Available options (uncomment and modify as needed):
12
+ # getStarted - Get started quickly: Help new users go from zero to working in <30 minutes
13
+ # completeTasks - Complete specific tasks: Guide users through common workflows and use cases
14
+ # findAnswers - Find answers fast: Provide searchable reference for all features and APIs
15
+ # understandSystem - Understand the system: Explain how it works, why design decisions were made
16
+ # solveProblems - Solve problems: Help users troubleshoot and fix issues
17
+ # mixedPurpose - Mix of above: Comprehensive documentation covering multiple needs
18
+ documentPurpose:
19
+ - getStarted
20
+ - completeTasks
21
+
22
+ # Target Audience: Who will be reading this most often?
23
+ # Available options (uncomment and modify as needed):
24
+ # endUsers - End users (non-technical): People who use the product but don't code
25
+ # developers - Developers integrating: Engineers adding this to their projects
26
+ # devops - DevOps/Infrastructure: Teams deploying, monitoring, maintaining systems
27
+ # decisionMakers - Technical decision makers: Architects, leads evaluating or planning implementation
28
+ # supportTeams - Support teams: People helping others use the product
29
+ # mixedTechnical - Mixed technical audience: Developers, DevOps, and technical users
30
+ targetAudienceTypes:
31
+ - developers
32
+
33
+ # Reader Knowledge Level: What do readers typically know when they arrive?
34
+ # Available options (uncomment and modify as needed):
35
+ # completeBeginners - Complete beginners: New to this domain/technology entirely
36
+ # domainFamiliar - Domain-familiar, tool-new: Know the problem space, new to this specific solution
37
+ # experiencedUsers - Experienced users: Regular users needing reference/advanced topics
38
+ # emergencyTroubleshooting - Emergency/troubleshooting: Something's broken, need to fix it quickly
39
+ # exploringEvaluating - Exploring/evaluating: Trying to understand if this fits their needs
40
+ readerKnowledgeLevel: completeBeginners
41
+
42
+ # Documentation Depth: How comprehensive should the documentation be?
43
+ # Available options (uncomment and modify as needed):
44
+ # essentialOnly - Essential only: Cover the 80% use cases, keep it concise
45
+ # balancedCoverage - Balanced coverage: Good depth with practical examples [RECOMMENDED]
46
+ # comprehensive - Comprehensive: Cover all features, edge cases, and advanced scenarios
47
+ # aiDecide - Let AI decide: Analyze code complexity and suggest appropriate depth
48
+ documentationDepth: balancedCoverage
49
+
50
+ # Custom Rules: Define specific documentation generation rules and requirements
51
+ rules: |
52
+ The generated documentation should focus on React component usage, not RFC-style specifications.
53
+
54
+ ## Documentation Scope
55
+ - **Focus on Key Components Only** - Document only the most important and frequently used components
56
+ - Prioritize core payment flow components over utility components
57
+
58
+ ## Component Documentation Requirements
59
+ For each React component, document:
60
+ 1. **Input Parameters (Props)** - All props with types, descriptions, and required/optional status
61
+ 2. **Usage Scenarios** - Different ways to pass parameters for various use cases and their effects
62
+ 3. **Implementation-Based Logic** - Strictly follow the actual component implementation to avoid hallucinations
63
+ 4. **Integration Examples** - Complete working examples showing proper component integration
64
+
65
+ ## Provider Integration
66
+ - **PaymentProvider and DonateProvider**: Document how to use these providers and integrate with components
67
+ - **Context Requirements**: Explain which components need to be wrapped by which providers
68
+ - **Example**: If user needs CheckoutForm, document that it must be wrapped with PaymentProvider
69
+ - Show complete integration patterns with provider setup
70
+
71
+ ## Key Components to Prioritize
72
+ - **Core Payment**: Payment, CheckoutForm, CheckoutDonate, CheckoutTable
73
+ - **Payment Integration**: StripeForm, PaymentSummary
74
+ - **Essential Forms**: AddressForm, CurrencySelector, PhoneInput, CountrySelect
75
+ - **Critical UI**: PricingTable
76
+ - **History Components**: CustomerInvoiceList, CustomerPaymentList, CreditGrantsList, CreditTransactionsList
77
+ - **Business Components**: OverdueInvoicePayment, ResumeSubscription
78
+ - **Utility Components**: SafeGuard
79
+ - **Provider Components**: PaymentProvider, DonateProvider
80
+ - **Price/Amount Utilities**: Key formatting functions from util.ts
81
+ - **Status/Display Utilities**: Status and display formatting functions from util.ts
82
+
83
+ ## Documentation Structure
84
+ - Component overview and purpose
85
+ - Props interface with detailed explanations
86
+ - Usage scenarios with different prop combinations
87
+ - Integration examples with providers
88
+ - Best practices and common patterns
89
+
90
+ ## Content Rules
91
+ - Use async/await for asynchronous examples
92
+ - Show complete, runnable code examples
93
+ - Include TypeScript prop interfaces
94
+ - Document provider requirements clearly
95
+ - Base all descriptions on actual component implementation
96
+
97
+ The documentation process can use tests for examples, but do not generate docs for test files themselves.
98
+ # Target Audience: Describe your specific target audience and their characteristics
99
+ targetAudience: |
100
+ Frontend developers integrating payment functionality into React applications.
101
+ Expected to have React/TypeScript experience and basic understanding of payment workflows.
102
+
103
+ locale: en
104
+ # translateLanguages: # List of languages to translate the documentation to
105
+ # - zh # Example: Chinese translation
106
+ # - en # Example: English translation
107
+ docsDir: ./docs # Directory to save generated documentation
108
+ sourcesPath: # Source code paths to analyze
109
+ - ./src
110
+ - ./README.md
111
+ lastGitHead: b00994d8ace7e6031e09282eab73a4e7509468dc
112
+ # appUrl: "https://www.staging.arcblock.io/"
113
+ appUrl: "https://www.arcblock.io"
114
+ boardId: "payment-kit-react"
@@ -0,0 +1,361 @@
1
+ [
2
+ {
3
+ "title": "Overview",
4
+ "description": "An overview of the @blocklet/payment-react library, its key features, and how it helps in building payment flows.",
5
+ "path": "/overview",
6
+ "parentId": null,
7
+ "sourceIds": [
8
+ "README.md",
9
+ "src/index.ts"
10
+ ]
11
+ },
12
+ {
13
+ "title": "Getting Started",
14
+ "description": "A step-by-step guide to installing the library and building a minimal, functional payment form.",
15
+ "path": "/getting-started",
16
+ "parentId": null,
17
+ "sourceIds": [
18
+ "README.md",
19
+ "src/contexts/payment.tsx",
20
+ "src/checkout/form.tsx",
21
+ "src/theme/index.tsx"
22
+ ]
23
+ },
24
+ {
25
+ "title": "Providers",
26
+ "description": "Documentation for the context providers that are essential for wrapping your application and enabling payment functionalities.",
27
+ "path": "/providers",
28
+ "parentId": null,
29
+ "sourceIds": [
30
+ "src/contexts/payment.tsx",
31
+ "src/contexts/donate.tsx",
32
+ "README.md"
33
+ ]
34
+ },
35
+ {
36
+ "title": "PaymentProvider",
37
+ "description": "Detailed documentation for the `PaymentProvider` component, which is required to use most of the library's features.",
38
+ "path": "/providers/payment-provider",
39
+ "parentId": "/providers",
40
+ "sourceIds": [
41
+ "src/contexts/payment.tsx",
42
+ "README.md"
43
+ ]
44
+ },
45
+ {
46
+ "title": "DonateProvider",
47
+ "description": "Learn how to use the `DonateProvider` to manage state and settings for donation-related components.",
48
+ "path": "/providers/donate-provider",
49
+ "parentId": "/providers",
50
+ "sourceIds": [
51
+ "src/contexts/donate.tsx",
52
+ "README.md"
53
+ ]
54
+ },
55
+ {
56
+ "title": "Components",
57
+ "description": "Explore the core components for building different types of payment and checkout experiences.",
58
+ "path": "/components",
59
+ "parentId": null,
60
+ "sourceIds": [
61
+ "src/index.ts",
62
+ "README.md"
63
+ ]
64
+ },
65
+ {
66
+ "title": "Checkout Components",
67
+ "description": "High-level components that serve as entry points for various checkout flows like standard payments, pricing tables, and donations.",
68
+ "path": "/components/checkout",
69
+ "parentId": "/components",
70
+ "sourceIds": [
71
+ "src/checkout/form.tsx",
72
+ "src/checkout/table.tsx",
73
+ "src/checkout/donate.tsx"
74
+ ]
75
+ },
76
+ {
77
+ "title": "CheckoutForm",
78
+ "description": "The primary component for handling payment links and checkout sessions, supporting various modes like inline, standalone, and popup.",
79
+ "path": "/components/checkout/checkout-form",
80
+ "parentId": "/components/checkout",
81
+ "sourceIds": [
82
+ "src/checkout/form.tsx",
83
+ "src/payment/index.tsx",
84
+ "src/types/index.ts",
85
+ "src/payment/donation-form.tsx"
86
+ ]
87
+ },
88
+ {
89
+ "title": "CheckoutTable",
90
+ "description": "A component that renders a complete pricing table and handles the checkout flow when a user selects a plan.",
91
+ "path": "/components/checkout/checkout-table",
92
+ "parentId": "/components/checkout",
93
+ "sourceIds": [
94
+ "src/checkout/table.tsx",
95
+ "src/components/pricing-table.tsx"
96
+ ]
97
+ },
98
+ {
99
+ "title": "CheckoutDonate",
100
+ "description": "Implement donation functionality with this flexible component, supporting various display modes and customization options.",
101
+ "path": "/components/checkout/checkout-donate",
102
+ "parentId": "/components/checkout",
103
+ "sourceIds": [
104
+ "src/checkout/donate.tsx",
105
+ "src/contexts/donate.tsx",
106
+ "README.md"
107
+ ]
108
+ },
109
+ {
110
+ "title": "UI Components",
111
+ "description": "Components designed to build specific parts of the payment UI, offering granular control over the user experience.",
112
+ "path": "/components/ui",
113
+ "parentId": "/components",
114
+ "sourceIds": [
115
+ "src/components/pricing-table.tsx",
116
+ "src/payment/summary.tsx",
117
+ "src/payment/form/address.tsx",
118
+ "src/payment/form/phone.tsx",
119
+ "src/components/country-select.tsx",
120
+ "src/payment/form/currency.tsx"
121
+ ]
122
+ },
123
+ {
124
+ "title": "PricingTable",
125
+ "description": "Display subscription plans and pricing options in a structured table, allowing users to select and proceed to checkout.",
126
+ "path": "/components/ui/pricing-table",
127
+ "parentId": "/components/ui",
128
+ "sourceIds": [
129
+ "src/components/pricing-table.tsx",
130
+ "src/contexts/payment.tsx"
131
+ ]
132
+ },
133
+ {
134
+ "title": "PaymentSummary",
135
+ "description": "Show a detailed summary of the order, including line items, totals, and trial information within the checkout flow.",
136
+ "path": "/components/ui/payment-summary",
137
+ "parentId": "/components/ui",
138
+ "sourceIds": [
139
+ "src/payment/summary.tsx",
140
+ "src/payment/product-item.tsx",
141
+ "src/payment/amount.tsx"
142
+ ]
143
+ },
144
+ {
145
+ "title": "Form Elements",
146
+ "description": "A collection of granular input components for building custom payment and contact information forms.",
147
+ "path": "/components/ui/form-elements",
148
+ "parentId": "/components/ui",
149
+ "sourceIds": [
150
+ "src/payment/form/address.tsx",
151
+ "src/payment/form/phone.tsx",
152
+ "src/components/country-select.tsx",
153
+ "src/payment/form/currency.tsx",
154
+ "src/components/input.tsx",
155
+ "src/components/label.tsx"
156
+ ]
157
+ },
158
+ {
159
+ "title": "AddressForm",
160
+ "description": "A pre-built form for collecting billing address details, with validation based on the selected country.",
161
+ "path": "/components/ui/form-elements/address-form",
162
+ "parentId": "/components/ui/form-elements",
163
+ "sourceIds": [
164
+ "src/payment/form/address.tsx",
165
+ "src/components/country-select.tsx",
166
+ "src/libs/validator.ts"
167
+ ]
168
+ },
169
+ {
170
+ "title": "PhoneInput",
171
+ "description": "An international phone number input with country code selection and validation.",
172
+ "path": "/components/ui/form-elements/phone-input",
173
+ "parentId": "/components/ui/form-elements",
174
+ "sourceIds": [
175
+ "src/payment/form/phone.tsx",
176
+ "src/libs/phone-validator.ts",
177
+ "src/components/country-select.tsx"
178
+ ]
179
+ },
180
+ {
181
+ "title": "CountrySelect",
182
+ "description": "A dropdown component for selecting a country, complete with country flags and search functionality.",
183
+ "path": "/components/ui/form-elements/country-select",
184
+ "parentId": "/components/ui/form-elements",
185
+ "sourceIds": [
186
+ "src/components/country-select.tsx"
187
+ ]
188
+ },
189
+ {
190
+ "title": "CurrencySelector",
191
+ "description": "A component that allows users to select their preferred payment currency from a list of available options.",
192
+ "path": "/components/ui/form-elements/currency-selector",
193
+ "parentId": "/components/ui/form-elements",
194
+ "sourceIds": [
195
+ "src/payment/form/currency.tsx"
196
+ ]
197
+ },
198
+ {
199
+ "title": "Business Logic Components",
200
+ "description": "Specialized components that encapsulate complex business logic for subscription and invoice management.",
201
+ "path": "/components/business",
202
+ "parentId": "/components",
203
+ "sourceIds": [
204
+ "src/components/over-due-invoice-payment.tsx",
205
+ "src/components/resume-subscription.tsx",
206
+ "src/components/auto-topup/index.tsx",
207
+ "src/components/auto-topup/modal.tsx"
208
+ ]
209
+ },
210
+ {
211
+ "title": "OverdueInvoicePayment",
212
+ "description": "A component to handle the payment of overdue invoices for a specific customer or subscription.",
213
+ "path": "/components/business/overdue-invoice-payment",
214
+ "parentId": "/components/business",
215
+ "sourceIds": [
216
+ "src/components/over-due-invoice-payment.tsx",
217
+ "README.md"
218
+ ]
219
+ },
220
+ {
221
+ "title": "ResumeSubscription",
222
+ "description": "A component that allows users to resume a canceled subscription, including handling re-staking if required.",
223
+ "path": "/components/business/resume-subscription",
224
+ "parentId": "/components/business",
225
+ "sourceIds": [
226
+ "src/components/resume-subscription.tsx",
227
+ "README.md"
228
+ ]
229
+ },
230
+ {
231
+ "title": "Auto-Topup Components",
232
+ "description": "Components for managing and configuring the automatic credit top-up functionality, including a display card and a configuration modal.",
233
+ "path": "/components/business/auto-topup",
234
+ "parentId": "/components/business",
235
+ "sourceIds": [
236
+ "README.md",
237
+ "src/components/auto-topup/index.tsx",
238
+ "src/components/auto-topup/modal.tsx",
239
+ "src/components/auto-topup/product-card.tsx"
240
+ ]
241
+ },
242
+ {
243
+ "title": "History Components",
244
+ "description": "Components dedicated to displaying historical data such as invoices, payments, and credit grants.",
245
+ "path": "/components/history",
246
+ "parentId": "/components",
247
+ "sourceIds": [
248
+ "src/history/invoice/list.tsx",
249
+ "src/history/payment/list.tsx",
250
+ "src/history/credit/grants-list.tsx",
251
+ "src/history/credit/transactions-list.tsx"
252
+ ]
253
+ },
254
+ {
255
+ "title": "CustomerInvoiceList",
256
+ "description": "Render a list of a customer's invoices with details on status, amount, and creation date.",
257
+ "path": "/components/history/invoice-list",
258
+ "parentId": "/components/history",
259
+ "sourceIds": [
260
+ "src/history/invoice/list.tsx",
261
+ "README.md"
262
+ ]
263
+ },
264
+ {
265
+ "title": "CustomerPaymentList",
266
+ "description": "Display a customer's payment history, including transaction details and status.",
267
+ "path": "/components/history/payment-list",
268
+ "parentId": "/components/history",
269
+ "sourceIds": [
270
+ "src/history/payment/list.tsx",
271
+ "README.md"
272
+ ]
273
+ },
274
+ {
275
+ "title": "CreditGrantsList",
276
+ "description": "Show a list of credit grants for a customer, including status, remaining amount, and effective dates.",
277
+ "path": "/components/history/credit-grants-list",
278
+ "parentId": "/components/history",
279
+ "sourceIds": [
280
+ "src/history/credit/grants-list.tsx"
281
+ ]
282
+ },
283
+ {
284
+ "title": "CreditTransactionsList",
285
+ "description": "List all credit transactions, providing a detailed log of credit usage and adjustments.",
286
+ "path": "/components/history/credit-transactions-list",
287
+ "parentId": "/components/history",
288
+ "sourceIds": [
289
+ "src/history/credit/transactions-list.tsx"
290
+ ]
291
+ },
292
+ {
293
+ "title": "Guides",
294
+ "description": "Guides for advanced topics like theming, using utility functions, and other non-component features.",
295
+ "path": "/guides",
296
+ "parentId": null,
297
+ "sourceIds": [
298
+ "src/theme/index.tsx",
299
+ "src/libs/util.ts",
300
+ "README.md"
301
+ ]
302
+ },
303
+ {
304
+ "title": "Theming",
305
+ "description": "Learn how to customize the appearance of payment components using the built-in theme provider and Material-UI theme options.",
306
+ "path": "/guides/theming",
307
+ "parentId": "/guides",
308
+ "sourceIds": [
309
+ "src/theme/index.tsx",
310
+ "src/theme/index.css",
311
+ "src/theme/typography.ts",
312
+ "src/theme/types.ts",
313
+ "README.md"
314
+ ]
315
+ },
316
+ {
317
+ "title": "Utilities",
318
+ "description": "A reference for utility functions provided by the library, including cached requests, and date formatting.",
319
+ "path": "/guides/utilities",
320
+ "parentId": "/guides",
321
+ "sourceIds": [
322
+ "README.md",
323
+ "src/libs/cached-request.ts",
324
+ "src/libs/dayjs.ts",
325
+ "src/libs/util.ts",
326
+ "src/libs/validator.ts",
327
+ "src/locales/index.tsx"
328
+ ]
329
+ },
330
+ {
331
+ "title": "Hooks",
332
+ "description": "Documentation for the custom React hooks provided by the library for handling specific functionalities.",
333
+ "path": "/hooks",
334
+ "parentId": null,
335
+ "sourceIds": [
336
+ "src/hooks/subscription.ts",
337
+ "src/hooks/mobile.ts",
338
+ "README.md"
339
+ ]
340
+ },
341
+ {
342
+ "title": "useSubscription",
343
+ "description": "A hook for subscribing to real-time events from the payment service, such as 'invoice.paid'.",
344
+ "path": "/hooks/use-subscription",
345
+ "parentId": "/hooks",
346
+ "sourceIds": [
347
+ "src/hooks/subscription.ts",
348
+ "README.md"
349
+ ]
350
+ },
351
+ {
352
+ "title": "useMobile",
353
+ "description": "A utility hook for detecting if the application is being viewed on a mobile device to enable responsive layouts.",
354
+ "path": "/hooks/use-mobile",
355
+ "parentId": "/hooks",
356
+ "sourceIds": [
357
+ "src/hooks/mobile.ts",
358
+ "README.md"
359
+ ]
360
+ }
361
+ ]
@@ -0,0 +1,55 @@
1
+ rules:
2
+ - id: pref_b8a4986e9903fe0f
3
+ active: true
4
+ scope: document
5
+ rule: 在所有示例中统一`PaymentProvider`的用法,仅展示通过本地`useSessionContext`获取`session`和`connectApi`,并将`useSessionContext`的完整实现细节和声明方式集中定义在`payment-provider.md`文档中。
6
+ feedback: 所有的示例里对于PaymentProvider的用法应该统一,比如具体的使用都指向payment-context的文档, 然后示例里只写明 const {session,
7
+ connectApi}=useSessionontext; useSessionContext 说明是指向自己的本地的session文件;
8
+ 至于怎么声明自己的session文件可以写在payment-provider.md文档里:import { createAuthServiceSessionContext } from
9
+ '@arcblock/did-connect-react/lib/Session';import { useContext } from 'react';const { SessionProvider,
10
+ SessionContext, SessionConsumer, withSession } = createAuthServiceSessionContext();function useSessionContext()
11
+ { const info = useContext(SessionContext); return info;}export { SessionProvider, SessionContext,
12
+ SessionConsumer, useSessionContext, withSession };
13
+ createdAt: 2025-09-01T02:32:25.705Z
14
+ - id: pref_bf09eebe4c624ab4
15
+ active: true
16
+ scope: document
17
+ rule: 所有代码示例必须保证语法正确和格式无误,确保可以直接复制粘贴运行。
18
+ feedback: 更新示例中PaymentProvider的用法, 注意示例代码的括号,严格保证示例代码copy出来没有格式错误
19
+ createdAt: 2025-09-01T02:17:20.214Z
20
+ - id: pref_805a9242c91fabc6
21
+ active: true
22
+ scope: document
23
+ rule: 在代码示例中,应通过调用 `useSessionContext()` 来获取 `session` 和 `connectApi`,而不是直接 mock 数据。
24
+ feedback: "我们不应该这么来mock数据,而是告知从 {session, connectApi} = useSessionContext() "
25
+ createdAt: 2025-09-01T02:05:58.458Z
26
+ - id: pref_3b490ffac11fd859
27
+ active: true
28
+ scope: document
29
+ rule: 在编写组件示例时,必须严格按照组件本身的属性来实现,确保示例中不使用任何无效的参数。
30
+ feedback: PaymentProvider并没有serviceHost参数,请你在写示例时严格按照组件本身的属性来实现
31
+ createdAt: 2025-09-01T01:52:43.445Z
32
+ - id: pref_5301bb9b58ee36b9
33
+ active: true
34
+ scope: document
35
+ rule: 仅在总览卡片预览中使用 xcard 组件,不要将其用于包含代码示例的内容。
36
+ feedback: 有代码示例的内容不需要改成xcard组件,展示效果不好,xcards只用于总览的卡片预览
37
+ createdAt: 2025-09-01T01:36:10.289Z
38
+ - id: pref_d325528c96a4b7e4
39
+ active: true
40
+ scope: document
41
+ rule: 在组件文档中,确保示例代码包含所有必要的 props 以便运行,并引导用户优先使用集成了子功能的高阶组件。
42
+ feedback: 1. 示例里 PaymentProvider需要session和connect; 2.鼓励用户直接使用AutoTopup组件,内部集成了Modal
43
+ createdAt: 2025-08-28T16:01:26.410Z
44
+ - id: pref_cbe76a82181fabc8
45
+ active: true
46
+ scope: structure
47
+ rule: 将功能紧密相关的组件合并到同一个文档中,而不是为每个组件创建单独的文档。
48
+ feedback: 我只需要AutoTopUp和AutoTopupModal的组件,并且把这两个放在一个文档里,不需要细分文档
49
+ createdAt: 2025-08-28T15:32:51.303Z
50
+ - id: pref_090f6698b82b9d18
51
+ active: true
52
+ scope: structure
53
+ rule: 当新增组件时,必须同步为其生成对应的使用文档。
54
+ feedback: 我们新增了AutoTopup和AutoTopupModal组件,我们需要把这两个组件的使用也更新生成对应的文档
55
+ createdAt: 2025-08-28T15:19:56.790Z