@tbox.cn/app-template-agent 1.0.0-alpha.1 → 1.0.0-alpha.6
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/._.gitignore +0 -0
- package/._.nvmrc +0 -0
- package/._AGENTS.md +0 -0
- package/._ENV.md +0 -0
- package/._LEGAL.md +0 -0
- package/._LICENSE +0 -0
- package/._README.md +0 -0
- package/._eslint.config.mjs +0 -0
- package/._package.json +0 -0
- package/._pnpm-lock.template.yaml +0 -0
- package/._pnpm-workspace.template.yaml +0 -0
- package/._tsconfig.base.json +0 -0
- package/.gitignore +7 -2
- package/.tbox/._app.json +0 -0
- package/.tbox/._default-modules.json +0 -0
- package/.tbox/._miniapp-containers.json +0 -0
- package/.tbox/app.json +1 -1
- package/.tbox/card-render/._demo.html +0 -0
- package/.tbox/card-render/._demo.png +0 -0
- package/.tbox/card-render/._scale-demo.audit.html +0 -0
- package/.tbox/card-render/._scale-demo.html +0 -0
- package/.tbox/card-render/baseline/._demo.png +0 -0
- package/.tbox/card-render/baseline/demo.png +0 -0
- package/.tbox/card-render/demo.html +342 -0
- package/.tbox/card-render/demo.png +0 -0
- package/.tbox/card-render/scale-demo.audit.html +984 -0
- package/.tbox/card-render/scale-demo.html +939 -0
- package/.tbox/default-modules.json +1 -1
- package/.tbox/evidence/._cards.txt +0 -0
- package/.tbox/evidence/._gate.json +0 -0
- package/.tbox/evidence/._last-gate.json +0 -0
- package/.tbox/evidence/._scenarios.json +0 -0
- package/.tbox/evidence/cards.txt +1 -0
- package/.tbox/evidence/gate.json +1 -0
- package/.tbox/evidence/last-gate.json +1 -0
- package/.tbox/evidence/scenarios.json +1 -0
- package/.tbox/miniapp-containers.json +1 -1
- package/AGENTS.md +59 -13
- package/ENV.md +4 -4
- package/README.md +22 -20
- package/apps/._AGENTS.md +0 -0
- package/apps/AGENTS.md +0 -4
- package/apps/client/._STYLE_GUIDE.md +0 -0
- package/apps/client/._VISUAL_RESTORE.md +0 -0
- package/apps/client/._index.html +0 -0
- package/apps/client/._package.json +0 -0
- package/apps/client/._tsconfig.json +0 -0
- package/apps/client/._vite.config.ts +0 -0
- package/apps/client/.tbox-gen/._manifest.json +0 -0
- package/apps/client/.tbox-gen/._registry.client.ts +0 -0
- package/apps/client/.tbox-gen/._registry.server.ts +0 -0
- package/apps/client/.tbox-gen/documents/._index.html +0 -0
- package/apps/client/.tbox-gen/documents/_tbox/._card-preview.html +0 -0
- package/apps/client/.tbox-gen/documents/_tbox/card-preview.html +38 -14
- package/apps/client/.tbox-gen/documents/index.html +38 -14
- package/apps/client/.tbox-gen/entries/._card-preview.tsx +0 -0
- package/apps/client/.tbox-gen/entries/._index.tsx +0 -0
- package/apps/client/.tbox-gen/entries/card-preview.tsx +3 -15
- package/apps/client/.tbox-gen/entries/index.tsx +8 -15
- package/apps/client/.tbox-gen/registry.server.ts +4 -4
- package/apps/client/STYLE_GUIDE.md +31 -64
- package/apps/client/index.html +38 -14
- package/apps/client/package.json +3 -3
- package/apps/client/scripts/._check-evidence.mjs +0 -0
- package/apps/client/scripts/._render-card.mjs +0 -0
- package/apps/client/scripts/check-evidence.mjs +688 -0
- package/apps/client/scripts/render-card.mjs +743 -0
- package/apps/client/src/._app.config.ts +0 -0
- package/apps/client/src/._vite-env.d.ts +0 -0
- package/apps/client/src/app.config.ts +40 -0
- package/apps/client/src/cards/._AGENTS.md +0 -0
- package/apps/client/src/cards/._registry.ts +0 -0
- package/apps/client/src/cards/AGENTS.md +11 -0
- package/apps/client/src/pages/._page.tsx +0 -0
- package/apps/client/src/pages/index/._index.tsx +0 -0
- package/apps/client/src/pages/index/index.tsx +1 -1
- package/apps/client/src/pages/page.tsx +2 -2
- package/apps/client/src/store/._chat.ts +0 -0
- package/apps/client/src/store/chat.ts +7 -3
- package/apps/client/src/styles/._brand.css +0 -0
- package/apps/client/src/styles/._tailwind.css +0 -0
- package/apps/client/src/styles/brand.css +51 -0
- package/apps/client/src/styles/tailwind.css +307 -0
- package/apps/client/src/test/._setup.ts +0 -0
- package/apps/client/src/vite-env.d.ts +0 -2
- package/apps/client/vite.config.ts +5 -22
- package/apps/server/._package.json +0 -0
- package/apps/server/._tsconfig.json +0 -0
- package/apps/server/._tsup.config.ts +0 -0
- package/apps/server/._vitest.config.ts +0 -0
- package/apps/server/scripts/._probe.mjs +0 -0
- package/apps/server/scripts/._scenario-lib.mjs +0 -0
- package/apps/server/scripts/._scenario.mjs +0 -0
- package/apps/server/scripts/probe.mjs +382 -0
- package/apps/server/scripts/scenario-lib.mjs +223 -0
- package/apps/server/scripts/scenario.mjs +33 -0
- package/apps/server/src/._app.ts +0 -0
- package/apps/server/src/._dev.ts +0 -0
- package/apps/server/src/._index.ts +0 -0
- package/apps/server/src/._intent-routes.ts +0 -0
- package/apps/server/src/._pre-tools.ts +0 -0
- package/apps/server/src/app.ts +10 -3
- package/apps/server/src/cards/._AGENTS.md +0 -0
- package/apps/server/src/cards/AGENTS.md +19 -0
- package/apps/server/src/cli/._collect-registry.ts +0 -0
- package/apps/server/src/cli/._plugin-doctor.ts +0 -0
- package/apps/server/src/cli/._plugin-inspect.ts +0 -0
- package/apps/server/src/config/._integration.ts +0 -0
- package/apps/server/src/dev.ts +2 -2
- package/apps/server/src/index.ts +2 -2
- package/apps/server/src/pre-tools.ts +7 -16
- package/apps/server/src/tools/._AGENTS.md +0 -0
- package/apps/server/src/tools/AGENTS.md +20 -0
- package/apps/server/tests/._agent-prompt.test.ts +0 -0
- package/apps/server/tests/._cards-registry.test.ts +0 -0
- package/apps/server/tests/._deployment-loader.test.ts +0 -0
- package/apps/server/tests/._intent-dispatcher.test.ts +0 -0
- package/apps/server/tests/._tool-runtime.test.ts +0 -0
- package/apps/server/tests/helpers/._register.ts +0 -0
- package/apps/server/tests/tool-runtime.test.ts +0 -27
- package/config/._AGENTS.md +0 -0
- package/config/._README.md +0 -0
- package/config/._chat.json +0 -0
- package/config/._integrations.json +0 -0
- package/config/._llm_provider.json +0 -0
- package/config/._plugins.json +0 -0
- package/config/AGENTS.md +13 -0
- package/config/README.md +4 -4
- package/config/chat.json +8 -2
- package/config/integrations.json +1 -1
- package/docs/agent/._agent-prompt.md +0 -0
- package/docs/agent/._card-action.md +0 -0
- package/docs/agent/._card.md +0 -0
- package/docs/agent/._conversation.md +0 -0
- package/docs/agent/._kit.md +0 -0
- package/docs/agent/._shell.md +0 -0
- package/docs/agent/._state.md +0 -0
- package/docs/agent/._style.md +0 -0
- package/docs/agent/._tool-emits-card.md +0 -0
- package/docs/agent/._tool.md +0 -0
- package/docs/agent/._verify.md +0 -0
- package/docs/agent/agent-prompt.md +38 -0
- package/docs/agent/card-action.md +96 -0
- package/docs/agent/card.md +116 -0
- package/docs/agent/conversation.md +52 -0
- package/docs/agent/kit.md +79 -0
- package/docs/agent/shell.md +76 -0
- package/docs/agent/state.md +85 -0
- package/docs/agent/style.md +95 -0
- package/docs/agent/tool-emits-card.md +57 -0
- package/docs/agent/tool.md +69 -0
- package/docs/agent/verify.md +129 -0
- package/eslint.config.mjs +18 -0
- package/modules/provider-custom/._AGENTS.md +0 -0
- package/modules/provider-custom/._INTEGRATION.md +0 -0
- package/modules/provider-custom/._LICENSE +0 -0
- package/modules/provider-custom/._README.md +0 -0
- package/modules/provider-custom/._package.json +0 -0
- package/modules/provider-custom/._tbox.module.json +0 -0
- package/modules/provider-custom/._tsconfig.json +0 -0
- package/modules/provider-custom/._tsup.config.ts +0 -0
- package/modules/provider-custom/AGENTS.md +5 -5
- package/modules/provider-custom/INTEGRATION.md +2 -2
- package/modules/provider-custom/src/._index.ts +0 -0
- package/modules/provider-custom/src/server/._example-adapter.ts +0 -0
- package/modules/provider-custom/src/server/._index.ts +0 -0
- package/modules/provider-custom/src/server/example-adapter.ts +2 -2
- package/modules/provider-custom/src/server/index.ts +1 -1
- package/modules/provider-custom/tests/._provider-custom.test.ts +0 -0
- package/package.json +13 -5
- package/packages/agent-ui-kit/._AGENTS.md +0 -0
- package/packages/agent-ui-kit/._LICENSE +0 -0
- package/packages/agent-ui-kit/._README.md +0 -0
- package/packages/agent-ui-kit/._catalog.json +0 -0
- package/packages/agent-ui-kit/._package.json +0 -0
- package/packages/agent-ui-kit/._tsconfig.json +0 -0
- package/packages/agent-ui-kit/._vitest.config.ts +0 -0
- package/packages/agent-ui-kit/AGENTS.md +8 -0
- package/packages/agent-ui-kit/README.md +4 -4
- package/packages/agent-ui-kit/assets/._keyboard-circle.svg +0 -0
- package/packages/agent-ui-kit/assets/._more-circle.svg +0 -0
- package/packages/agent-ui-kit/assets/._new-chat.svg +0 -0
- package/packages/agent-ui-kit/assets/._quick-command-star.svg +0 -0
- package/packages/agent-ui-kit/assets/._send-gradient.svg +0 -0
- package/packages/agent-ui-kit/assets/._stop@2x.png +0 -0
- package/packages/agent-ui-kit/assets/._voice-circle.svg +0 -0
- package/packages/agent-ui-kit/catalog.json +842 -0
- package/packages/agent-ui-kit/package.json +8 -5
- package/packages/agent-ui-kit/src/._ChatPage.tsx +0 -0
- package/packages/agent-ui-kit/src/._chat-config.test.ts +0 -0
- package/packages/agent-ui-kit/src/._chat-config.ts +0 -0
- package/packages/agent-ui-kit/src/._icons.ts +0 -0
- package/packages/agent-ui-kit/src/._index.ts +0 -0
- package/packages/agent-ui-kit/src/._shell.contract.json +0 -0
- package/packages/agent-ui-kit/src/._shell.test.ts +0 -0
- package/packages/agent-ui-kit/src/._shell.ts +0 -0
- package/packages/agent-ui-kit/src/._store-context.tsx +0 -0
- package/packages/agent-ui-kit/src/._types.ts +0 -0
- package/packages/agent-ui-kit/src/._vite-env.d.ts +0 -0
- package/packages/agent-ui-kit/src/ChatPage.tsx +34 -7
- package/packages/agent-ui-kit/src/card/._define-card.ts +0 -0
- package/packages/agent-ui-kit/src/card/._primitives.test.tsx +0 -0
- package/packages/agent-ui-kit/src/card/._primitives.tsx +0 -0
- package/packages/agent-ui-kit/src/card/._use-card-actions.ts +0 -0
- package/packages/agent-ui-kit/src/card/define-card.ts +34 -0
- package/packages/agent-ui-kit/src/card/primitives.test.tsx +147 -0
- package/packages/agent-ui-kit/src/card/primitives.tsx +627 -0
- package/packages/agent-ui-kit/src/card/use-card-actions.ts +86 -0
- package/packages/agent-ui-kit/src/chat-config.test.ts +35 -71
- package/packages/agent-ui-kit/src/chat-config.ts +18 -0
- package/packages/agent-ui-kit/src/components/._CardRenderer.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ActionBar/._DebugButton.test.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ActionBar/._DebugButton.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ActionBar/._index.test.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ActionBar/._index.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ActionBar/DebugButton.tsx +3 -3
- package/packages/agent-ui-kit/src/components/ActionBar/index.tsx +13 -14
- package/packages/agent-ui-kit/src/components/ChatHeader/._index.test.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ChatHeader/._index.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ChatHeader/index.tsx +19 -17
- package/packages/agent-ui-kit/src/components/ChatInput/._index.test.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ChatInput/._index.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ChatInput/index.tsx +32 -26
- package/packages/agent-ui-kit/src/components/ChatInput/voice/._VoicePressField.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ChatInput/voice/._VoiceRecordingOverlay.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ChatInput/voice/._machine.ts +0 -0
- package/packages/agent-ui-kit/src/components/ChatInput/voice/._useVoicePress.ts +0 -0
- package/packages/agent-ui-kit/src/components/ChatInput/voice/VoicePressField.tsx +12 -3
- package/packages/agent-ui-kit/src/components/ChatInput/voice/VoiceRecordingOverlay.tsx +9 -9
- package/packages/agent-ui-kit/src/components/HistoryEntry/._index.tsx +0 -0
- package/packages/agent-ui-kit/src/components/HistoryEntry/index.tsx +3 -4
- package/packages/agent-ui-kit/src/components/MediaList/._index.tsx +0 -0
- package/packages/agent-ui-kit/src/components/MediaList/index.tsx +42 -28
- package/packages/agent-ui-kit/src/components/MessageBubble/._index.test.tsx +0 -0
- package/packages/agent-ui-kit/src/components/MessageBubble/._index.tsx +0 -0
- package/packages/agent-ui-kit/src/components/MessageBubble/index.tsx +52 -27
- package/packages/agent-ui-kit/src/components/PullDownIndicator/._index.tsx +0 -0
- package/packages/agent-ui-kit/src/components/PullDownIndicator/index.tsx +3 -4
- package/packages/agent-ui-kit/src/components/QuickCommands/._index.test.tsx +0 -0
- package/packages/agent-ui-kit/src/components/QuickCommands/._index.tsx +0 -0
- package/packages/agent-ui-kit/src/components/QuickCommands/index.tsx +6 -6
- package/packages/agent-ui-kit/src/components/ReasoningBlock/._index.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ReasoningBlock/index.tsx +14 -9
- package/packages/agent-ui-kit/src/components/ScrollToBottomButton/._index.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ScrollToBottomButton/index.tsx +2 -4
- package/packages/agent-ui-kit/src/components/ToolCallBlock/._detail.test.ts +0 -0
- package/packages/agent-ui-kit/src/components/ToolCallBlock/._detail.ts +0 -0
- package/packages/agent-ui-kit/src/components/ToolCallBlock/._index.test.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ToolCallBlock/._index.tsx +0 -0
- package/packages/agent-ui-kit/src/components/ToolCallBlock/._titles.ts +0 -0
- package/packages/agent-ui-kit/src/components/ToolCallBlock/index.tsx +54 -36
- package/packages/agent-ui-kit/src/hooks/._use-drag-gesture.test.ts +0 -0
- package/packages/agent-ui-kit/src/hooks/._use-drag-gesture.ts +0 -0
- package/packages/agent-ui-kit/src/hooks/._use-pull-down-history.ts +0 -0
- package/packages/agent-ui-kit/src/hooks/._use-pull-down-wheel-native.test.ts +0 -0
- package/packages/agent-ui-kit/src/hooks/._useMediaUpload.ts +0 -0
- package/packages/agent-ui-kit/src/hooks/._useTTSAutoPlay.ts +0 -0
- package/packages/agent-ui-kit/src/icons.ts +39 -0
- package/packages/agent-ui-kit/src/index.ts +55 -2
- package/packages/agent-ui-kit/src/shell.contract.json +59 -0
- package/packages/agent-ui-kit/src/shell.test.ts +61 -0
- package/packages/agent-ui-kit/src/shell.ts +45 -0
- package/packages/agent-ui-kit/src/test/._setup.ts +0 -0
- package/packages/agent-ui-kit/src/theme/._base.css +0 -0
- package/packages/agent-ui-kit/src/theme/._contract.json +0 -0
- package/packages/agent-ui-kit/src/theme/._motion.css +0 -0
- package/packages/agent-ui-kit/src/theme/._theme-contract.test.ts +0 -0
- package/packages/agent-ui-kit/src/theme/._theme.ts +0 -0
- package/packages/agent-ui-kit/src/theme/._tokens.css +0 -0
- package/packages/agent-ui-kit/src/theme/base.css +132 -0
- package/packages/agent-ui-kit/src/theme/contract.json +1 -1
- package/packages/agent-ui-kit/src/theme/theme-contract.test.ts +3 -3
- package/packages/agent-ui-kit/src/theme/{tokens.less → tokens.css} +14 -12
- package/packages/agent-ui-kit/src/utils/._copyText.ts +0 -0
- package/packages/agent-ui-kit/src/utils/._haptics.test.ts +0 -0
- package/packages/agent-ui-kit/src/utils/._haptics.ts +0 -0
- package/packages/agent-ui-kit/src/utils/._imagePreview.ts +0 -0
- package/packages/agent-ui-kit/src/utils/._pull-down-machine.test.ts +0 -0
- package/packages/agent-ui-kit/src/utils/._pull-down-machine.ts +0 -0
- package/packages/agent-ui-kit/src/utils/._session-error.ts +0 -0
- package/packages/agent-ui-kit/src/utils/._toast.ts +0 -0
- package/packages/agent-ui-kit/src/utils/._tool-call-display.test.ts +0 -0
- package/packages/agent-ui-kit/src/utils/._tool-call-display.ts +0 -0
- package/packages/contracts-mall/._package.json +0 -0
- package/packages/contracts-mall/._tsconfig.json +0 -0
- package/packages/contracts-mall/src/._index.ts +0 -0
- package/packages/contracts-mall/src/._runtime.ts +0 -0
- package/packages/contracts-mall/src/server/._index.ts +0 -0
- package/packages/shared/._AGENTS.md +0 -0
- package/packages/shared/._package.json +0 -0
- package/packages/shared/._tsconfig.json +0 -0
- package/packages/shared/AGENTS.md +4 -2
- package/packages/shared/package.json +7 -0
- package/packages/shared/src/._index.ts +0 -0
- package/pnpm-lock.template.yaml +679 -464
- package/pnpm-workspace.template.yaml +16 -11
- package/profiles/._mall.json +0 -0
- package/profiles/mall/._TEMPLATE.md +0 -0
- package/profiles/mall/config/._agent.jsonc +0 -0
- package/profiles/mall/config/._chat.json +0 -0
- package/profiles/mall/config/._knowledge.json +0 -0
- package/profiles/mall/config/._llm_provider.json +0 -0
- package/profiles/mall/config/._plugins.json +0 -0
- package/scenarios/._README.md +0 -0
- package/scenarios/README.md +7 -0
- package/scripts/._build.sh +0 -0
- package/scripts/._check-css-target.mjs +0 -0
- package/scripts/._check-fast.mjs +0 -0
- package/scripts/._check-workspace.mjs +0 -0
- package/scripts/._checks.json +0 -0
- package/scripts/._compat-probe.mjs +0 -0
- package/scripts/._dev-alipay.mjs +0 -0
- package/scripts/._dev.sh +0 -0
- package/scripts/._gen-tailwind-sources.mjs +0 -0
- package/scripts/._generate.mjs +0 -0
- package/scripts/._prepare.sh +0 -0
- package/scripts/._smoke.mjs +0 -0
- package/scripts/._start.sh +0 -0
- package/scripts/._stop.sh +0 -0
- package/scripts/._verify-generated.mjs +0 -0
- package/scripts/check-css-target.mjs +69 -0
- package/scripts/check-fast.mjs +113 -0
- package/scripts/check-workspace.mjs +68 -19
- package/scripts/checks.json +205 -0
- package/scripts/compat-probe.mjs +108 -0
- package/scripts/dev-alipay.mjs +1 -1
- package/scripts/gen-tailwind-sources.mjs +55 -0
- package/tsconfig.base.json +1 -0
- package/apps/client/.tbox-gen/app-kind.ts +0 -1
- package/apps/client/src/platform/AgentChatApp.tsx +0 -6
- package/apps/client/src/platform/AppShell.tsx +0 -42
- package/apps/client/src/platform/agent-runtime.ts +0 -16
- package/apps/client/src/platform/bootstrap.ts +0 -55
- package/apps/client/src/platform/card-preview-page.tsx +0 -10
- package/apps/client/src/platform/mount-page.tsx +0 -20
- package/apps/client/src/platform/state/createPersistedStore.ts +0 -19
- package/apps/server/src/tools/clock.tool.ts +0 -24
- package/apps/server/src/tools/translate.tool.ts +0 -47
- package/packages/agent-ui-kit/src/ChatPage.less +0 -62
- package/packages/agent-ui-kit/src/components/ActionBar/index.less +0 -123
- package/packages/agent-ui-kit/src/components/ChatHeader/index.less +0 -148
- package/packages/agent-ui-kit/src/components/ChatInput/index.less +0 -394
- package/packages/agent-ui-kit/src/components/HistoryEntry/index.less +0 -49
- package/packages/agent-ui-kit/src/components/MediaList/index.less +0 -241
- package/packages/agent-ui-kit/src/components/MessageBubble/index.less +0 -325
- package/packages/agent-ui-kit/src/components/PullDownIndicator/index.less +0 -32
- package/packages/agent-ui-kit/src/components/QuickCommands/index.less +0 -63
- package/packages/agent-ui-kit/src/components/ReasoningBlock/index.less +0 -90
- package/packages/agent-ui-kit/src/components/ScrollToBottomButton/index.less +0 -32
- package/packages/agent-ui-kit/src/components/ToolCallBlock/index.less +0 -312
- package/packages/agent-ui-kit/src/theme/global.less +0 -99
- /package/packages/agent-ui-kit/src/theme/{motion.less → motion.css} +0 -0
|
@@ -0,0 +1,842 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"primitives": [
|
|
4
|
+
{
|
|
5
|
+
"name": "Card",
|
|
6
|
+
"summary": "卡片容器:统一背景、圆角、内边距与阴影。 *",
|
|
7
|
+
"behavior": "卡框统一圆角与内边距;footer 固定在内容之后,不随内容滚动。",
|
|
8
|
+
"propsType": "CardProps",
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"name": "children",
|
|
12
|
+
"type": "ReactNode",
|
|
13
|
+
"optional": false
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "footer",
|
|
17
|
+
"type": "ReactNode",
|
|
18
|
+
"optional": true,
|
|
19
|
+
"doc": "卡片右下角的补充说明(可选)"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "className",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"optional": true
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "CardHeader",
|
|
30
|
+
"propsType": "CardHeaderProps",
|
|
31
|
+
"props": [
|
|
32
|
+
{
|
|
33
|
+
"name": "title",
|
|
34
|
+
"type": "ReactNode",
|
|
35
|
+
"optional": false
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "eyebrow",
|
|
39
|
+
"type": "ReactNode",
|
|
40
|
+
"optional": true,
|
|
41
|
+
"doc": "标题上方的小字(如类别、时间)"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "status",
|
|
45
|
+
"type": "ReactNode",
|
|
46
|
+
"optional": true,
|
|
47
|
+
"doc": "右侧状态位 *"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "icon",
|
|
51
|
+
"type": "ReactNode",
|
|
52
|
+
"optional": true
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "KeyValueList",
|
|
58
|
+
"summary": "属性列表:左标签右值,逐行。 *",
|
|
59
|
+
"behavior": "逐行两列;value 长文本自动换行,不截断。",
|
|
60
|
+
"propsType": "{ items: KeyValueItem[] }",
|
|
61
|
+
"props": [
|
|
62
|
+
{
|
|
63
|
+
"name": "items",
|
|
64
|
+
"type": "KeyValueItem[]",
|
|
65
|
+
"optional": false
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"itemTypes": [
|
|
69
|
+
{
|
|
70
|
+
"name": "KeyValueItem",
|
|
71
|
+
"members": [
|
|
72
|
+
{
|
|
73
|
+
"name": "label",
|
|
74
|
+
"type": "ReactNode",
|
|
75
|
+
"optional": false
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "value",
|
|
79
|
+
"type": "ReactNode",
|
|
80
|
+
"optional": false
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "Bill",
|
|
88
|
+
"summary": "明细 + 合计:金额、积分、费用清单通用。 *",
|
|
89
|
+
"behavior": "金额右对齐;muted 行弱化;total 在最后加一条分隔线。",
|
|
90
|
+
"propsType": "{ lines: BillLine[]; total?: { label: ReactNode; value: ReactNode } }",
|
|
91
|
+
"props": [
|
|
92
|
+
{
|
|
93
|
+
"name": "lines",
|
|
94
|
+
"type": "BillLine[]",
|
|
95
|
+
"optional": false
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "total",
|
|
99
|
+
"type": "{ label: ReactNode; value: ReactNode }",
|
|
100
|
+
"optional": true
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"itemTypes": [
|
|
104
|
+
{
|
|
105
|
+
"name": "BillLine",
|
|
106
|
+
"members": [
|
|
107
|
+
{
|
|
108
|
+
"name": "label",
|
|
109
|
+
"type": "ReactNode",
|
|
110
|
+
"optional": false
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "value",
|
|
114
|
+
"type": "ReactNode",
|
|
115
|
+
"optional": false
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "muted",
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"optional": true,
|
|
121
|
+
"doc": "弱化显示(折扣、说明)"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "StatusTag",
|
|
129
|
+
"summary": "状态标签。 *",
|
|
130
|
+
"behavior": "行内标签,不换行;一屏最多 3 个并排。",
|
|
131
|
+
"propsType": "{ children: ReactNode; tone?: Tone }",
|
|
132
|
+
"props": [
|
|
133
|
+
{
|
|
134
|
+
"name": "children",
|
|
135
|
+
"type": "ReactNode",
|
|
136
|
+
"optional": false
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "tone",
|
|
140
|
+
"type": "Tone",
|
|
141
|
+
"optional": true
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"name": "Notice",
|
|
147
|
+
"summary": "提示条:说明、限制、下一步指引。 *",
|
|
148
|
+
"behavior": "图标在左、文本在右;长文本换行,不截断。",
|
|
149
|
+
"propsType": "NoticeProps",
|
|
150
|
+
"props": [
|
|
151
|
+
{
|
|
152
|
+
"name": "children",
|
|
153
|
+
"type": "ReactNode",
|
|
154
|
+
"optional": false
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "tone",
|
|
158
|
+
"type": "Tone",
|
|
159
|
+
"optional": true
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "icon",
|
|
163
|
+
"type": "ReactNode",
|
|
164
|
+
"optional": true
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"name": "ActionRow",
|
|
170
|
+
"summary": "按钮行:主次两级,禁用整行。 *",
|
|
171
|
+
"behavior": "最多两个按钮并排;窄屏各占一半,不换行。",
|
|
172
|
+
"propsType": "ActionRowProps",
|
|
173
|
+
"props": [
|
|
174
|
+
{
|
|
175
|
+
"name": "primary",
|
|
176
|
+
"type": "ReactNode",
|
|
177
|
+
"optional": true,
|
|
178
|
+
"doc": "主按钮(实心)"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"name": "secondary",
|
|
182
|
+
"type": "ReactNode",
|
|
183
|
+
"optional": true,
|
|
184
|
+
"doc": "次按钮(描边)"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"name": "disabled",
|
|
188
|
+
"type": "boolean",
|
|
189
|
+
"optional": true,
|
|
190
|
+
"doc": "禁用整行(通常传 `useCardActions().disabled`)"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"name": "CardButton",
|
|
196
|
+
"propsType": "{\n children: ReactNode;\n onClick?: () => void;\n variant?: 'primary' | 'secondary' | 'link';\n disabled?: boolean;\n}",
|
|
197
|
+
"props": [
|
|
198
|
+
{
|
|
199
|
+
"name": "children",
|
|
200
|
+
"type": "ReactNode",
|
|
201
|
+
"optional": false
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"name": "onClick",
|
|
205
|
+
"type": "() => void",
|
|
206
|
+
"optional": true
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"name": "variant",
|
|
210
|
+
"type": "'primary' | 'secondary' | 'link'",
|
|
211
|
+
"optional": true
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"name": "disabled",
|
|
215
|
+
"type": "boolean",
|
|
216
|
+
"optional": true
|
|
217
|
+
}
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"name": "ConfirmSheet",
|
|
222
|
+
"summary": "确认弹层:写操作前的一次确认。",
|
|
223
|
+
"propsType": "ConfirmSheetProps",
|
|
224
|
+
"props": [
|
|
225
|
+
{
|
|
226
|
+
"name": "open",
|
|
227
|
+
"type": "boolean",
|
|
228
|
+
"optional": false
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"name": "title",
|
|
232
|
+
"type": "ReactNode",
|
|
233
|
+
"optional": false
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"name": "description",
|
|
237
|
+
"type": "ReactNode",
|
|
238
|
+
"optional": true
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"name": "confirmText",
|
|
242
|
+
"type": "string",
|
|
243
|
+
"optional": true
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "cancelText",
|
|
247
|
+
"type": "string",
|
|
248
|
+
"optional": true
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"name": "onConfirm",
|
|
252
|
+
"type": "() => void",
|
|
253
|
+
"optional": false
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"name": "onCancel",
|
|
257
|
+
"type": "() => void",
|
|
258
|
+
"optional": false
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"name": "Ticket",
|
|
264
|
+
"summary": "票券形:券、凭证、卡包条目。",
|
|
265
|
+
"propsType": "TicketProps",
|
|
266
|
+
"props": [
|
|
267
|
+
{
|
|
268
|
+
"name": "amount",
|
|
269
|
+
"type": "ReactNode",
|
|
270
|
+
"optional": false,
|
|
271
|
+
"doc": "主金额或主标题"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "condition",
|
|
275
|
+
"type": "ReactNode",
|
|
276
|
+
"optional": true,
|
|
277
|
+
"doc": "面额后的说明(如「满 100 减 20」)"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"name": "meta",
|
|
281
|
+
"type": "ReactNode",
|
|
282
|
+
"optional": true,
|
|
283
|
+
"doc": "有效期、码等补充"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"name": "status",
|
|
287
|
+
"type": "ReactNode",
|
|
288
|
+
"optional": true
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"name": "tone",
|
|
292
|
+
"type": "'primary' | 'muted'",
|
|
293
|
+
"optional": true
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"name": "Steps",
|
|
299
|
+
"summary": "步骤/路线:取车路线、办理进度。",
|
|
300
|
+
"propsType": "{ steps: StepItem[] }",
|
|
301
|
+
"props": [
|
|
302
|
+
{
|
|
303
|
+
"name": "steps",
|
|
304
|
+
"type": "StepItem[]",
|
|
305
|
+
"optional": false
|
|
306
|
+
}
|
|
307
|
+
],
|
|
308
|
+
"itemTypes": [
|
|
309
|
+
{
|
|
310
|
+
"name": "StepItem",
|
|
311
|
+
"members": [
|
|
312
|
+
{
|
|
313
|
+
"name": "title",
|
|
314
|
+
"type": "ReactNode",
|
|
315
|
+
"optional": false
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"name": "detail",
|
|
319
|
+
"type": "ReactNode",
|
|
320
|
+
"optional": true
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "MediaRow",
|
|
328
|
+
"summary": "图文条目:门店、商品、活动。",
|
|
329
|
+
"propsType": "MediaRowProps",
|
|
330
|
+
"props": [
|
|
331
|
+
{
|
|
332
|
+
"name": "title",
|
|
333
|
+
"type": "ReactNode",
|
|
334
|
+
"optional": false
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "meta",
|
|
338
|
+
"type": "ReactNode",
|
|
339
|
+
"optional": true
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"name": "tags",
|
|
343
|
+
"type": "ReactNode",
|
|
344
|
+
"optional": true
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"name": "action",
|
|
348
|
+
"type": "ReactNode",
|
|
349
|
+
"optional": true,
|
|
350
|
+
"doc": "右侧操作(按钮或链接)"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"name": "thumb",
|
|
354
|
+
"type": "ReactNode",
|
|
355
|
+
"optional": true,
|
|
356
|
+
"doc": "左侧缩略图"
|
|
357
|
+
}
|
|
358
|
+
]
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"name": "Hero",
|
|
362
|
+
"summary": "品牌色块:主数值 + 说明,用于会员、积分、钱包类卡片的头部。",
|
|
363
|
+
"propsType": "HeroProps",
|
|
364
|
+
"props": [
|
|
365
|
+
{
|
|
366
|
+
"name": "eyebrow",
|
|
367
|
+
"type": "ReactNode",
|
|
368
|
+
"optional": true,
|
|
369
|
+
"doc": "标题上方小字(品牌名、卡类别)"
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"name": "title",
|
|
373
|
+
"type": "ReactNode",
|
|
374
|
+
"optional": false
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"name": "value",
|
|
378
|
+
"type": "ReactNode",
|
|
379
|
+
"optional": true,
|
|
380
|
+
"doc": "主数值(积分、余额、金额)"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"name": "unit",
|
|
384
|
+
"type": "ReactNode",
|
|
385
|
+
"optional": true,
|
|
386
|
+
"doc": "数值后的单位"
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"name": "footnote",
|
|
390
|
+
"type": "ReactNode",
|
|
391
|
+
"optional": true,
|
|
392
|
+
"doc": "数值下方一句说明"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"name": "icon",
|
|
396
|
+
"type": "ReactNode",
|
|
397
|
+
"optional": true
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"name": "tone",
|
|
401
|
+
"type": "'primary' | 'warm' | 'jade' | 'neutral'",
|
|
402
|
+
"optional": true
|
|
403
|
+
}
|
|
404
|
+
]
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"name": "StatGrid",
|
|
408
|
+
"summary": "并列数值格(两到三格):积分/余额、车位/时长。",
|
|
409
|
+
"propsType": "{ items: StatItem[] }",
|
|
410
|
+
"props": [
|
|
411
|
+
{
|
|
412
|
+
"name": "items",
|
|
413
|
+
"type": "StatItem[]",
|
|
414
|
+
"optional": false
|
|
415
|
+
}
|
|
416
|
+
],
|
|
417
|
+
"itemTypes": [
|
|
418
|
+
{
|
|
419
|
+
"name": "StatItem",
|
|
420
|
+
"members": [
|
|
421
|
+
{
|
|
422
|
+
"name": "label",
|
|
423
|
+
"type": "ReactNode",
|
|
424
|
+
"optional": false
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "value",
|
|
428
|
+
"type": "ReactNode",
|
|
429
|
+
"optional": false
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"name": "hint",
|
|
433
|
+
"type": "ReactNode",
|
|
434
|
+
"optional": true
|
|
435
|
+
}
|
|
436
|
+
]
|
|
437
|
+
}
|
|
438
|
+
]
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"name": "EntityRow",
|
|
442
|
+
"summary": "实体行(MediaRow 的超集):商户、活动、券包条目,支持价格与展开说明。",
|
|
443
|
+
"propsType": "EntityRowProps",
|
|
444
|
+
"props": [
|
|
445
|
+
{
|
|
446
|
+
"name": "title",
|
|
447
|
+
"type": "ReactNode",
|
|
448
|
+
"optional": false
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"name": "meta",
|
|
452
|
+
"type": "ReactNode",
|
|
453
|
+
"optional": true,
|
|
454
|
+
"doc": "副标题:分类、距离、营业时间"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"name": "tags",
|
|
458
|
+
"type": "ReactNode",
|
|
459
|
+
"optional": true
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"name": "price",
|
|
463
|
+
"type": "ReactNode",
|
|
464
|
+
"optional": true,
|
|
465
|
+
"doc": "右侧价格或主数值"
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"name": "action",
|
|
469
|
+
"type": "ReactNode",
|
|
470
|
+
"optional": true,
|
|
471
|
+
"doc": "右侧操作(按钮)"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"name": "thumb",
|
|
475
|
+
"type": "ReactNode",
|
|
476
|
+
"optional": true,
|
|
477
|
+
"doc": "左侧缩略图或首字"
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"name": "description",
|
|
481
|
+
"type": "ReactNode",
|
|
482
|
+
"optional": true,
|
|
483
|
+
"doc": "展开后的说明"
|
|
484
|
+
}
|
|
485
|
+
]
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"name": "CheckRow",
|
|
489
|
+
"summary": "勾选行:用券、同意条款、选择车位。",
|
|
490
|
+
"propsType": "CheckRowProps",
|
|
491
|
+
"props": [
|
|
492
|
+
{
|
|
493
|
+
"name": "label",
|
|
494
|
+
"type": "ReactNode",
|
|
495
|
+
"optional": false
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"name": "description",
|
|
499
|
+
"type": "ReactNode",
|
|
500
|
+
"optional": true
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"name": "checked",
|
|
504
|
+
"type": "boolean",
|
|
505
|
+
"optional": false
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"name": "onChange",
|
|
509
|
+
"type": "(checked: boolean) => void",
|
|
510
|
+
"optional": true,
|
|
511
|
+
"doc": "只读时省略;给了就是可点行"
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"name": "disabled",
|
|
515
|
+
"type": "boolean",
|
|
516
|
+
"optional": true
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"name": "trailing",
|
|
520
|
+
"type": "ReactNode",
|
|
521
|
+
"optional": true
|
|
522
|
+
}
|
|
523
|
+
]
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"name": "Timeline",
|
|
527
|
+
"summary": "明细时间线:积分收支、停车计费。 *",
|
|
528
|
+
"behavior": "单列时间线;label 与 time 同行,amount 右对齐。",
|
|
529
|
+
"propsType": "{ items: TimelineItem[] }",
|
|
530
|
+
"props": [
|
|
531
|
+
{
|
|
532
|
+
"name": "items",
|
|
533
|
+
"type": "TimelineItem[]",
|
|
534
|
+
"optional": false
|
|
535
|
+
}
|
|
536
|
+
],
|
|
537
|
+
"itemTypes": [
|
|
538
|
+
{
|
|
539
|
+
"name": "TimelineItem",
|
|
540
|
+
"members": [
|
|
541
|
+
{
|
|
542
|
+
"name": "label",
|
|
543
|
+
"type": "ReactNode",
|
|
544
|
+
"optional": false
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"name": "time",
|
|
548
|
+
"type": "ReactNode",
|
|
549
|
+
"optional": true
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
"name": "amount",
|
|
553
|
+
"type": "ReactNode",
|
|
554
|
+
"optional": true,
|
|
555
|
+
"doc": "金额或积分变化(带符号)"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"name": "tone",
|
|
559
|
+
"type": "'gain' | 'spend' | 'neutral'",
|
|
560
|
+
"optional": true
|
|
561
|
+
}
|
|
562
|
+
]
|
|
563
|
+
}
|
|
564
|
+
]
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"name": "EmptyState",
|
|
568
|
+
"summary": "空态:没券、没订单、没记录时给一句解释与一个下一步。 *",
|
|
569
|
+
"behavior": "居中;action 最多一个按钮。",
|
|
570
|
+
"propsType": "{ title: ReactNode; description?: ReactNode; action?: ReactNode }",
|
|
571
|
+
"props": [
|
|
572
|
+
{
|
|
573
|
+
"name": "title",
|
|
574
|
+
"type": "ReactNode",
|
|
575
|
+
"optional": false
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"name": "description",
|
|
579
|
+
"type": "ReactNode",
|
|
580
|
+
"optional": true
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"name": "action",
|
|
584
|
+
"type": "ReactNode",
|
|
585
|
+
"optional": true
|
|
586
|
+
}
|
|
587
|
+
]
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"name": "TagList",
|
|
591
|
+
"summary": "标签组:口味、距离、适用条件。 *",
|
|
592
|
+
"behavior": "自动换行;单个 tag 不截断,超过两行折叠为一行滚动。",
|
|
593
|
+
"propsType": "{ tags: ReactNode[]; tone?: Tone }",
|
|
594
|
+
"props": [
|
|
595
|
+
{
|
|
596
|
+
"name": "tags",
|
|
597
|
+
"type": "ReactNode[]",
|
|
598
|
+
"optional": false
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"name": "tone",
|
|
602
|
+
"type": "Tone",
|
|
603
|
+
"optional": true
|
|
604
|
+
}
|
|
605
|
+
]
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"name": "ActionList",
|
|
609
|
+
"summary": "按钮组(描述对象版):把「发消息 / 确定性动作 / 确认弹层 / 禁用」收进一处。",
|
|
610
|
+
"behavior": "纵向排列,每个按钮独占一行;confirm 走 ConfirmSheet;disabled 自动接 api.disabled。",
|
|
611
|
+
"propsType": "{ actions: CardActionSpec[]; api: CardActions }",
|
|
612
|
+
"props": [
|
|
613
|
+
{
|
|
614
|
+
"name": "actions",
|
|
615
|
+
"type": "CardActionSpec[]",
|
|
616
|
+
"optional": false
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"name": "api",
|
|
620
|
+
"type": "CardActions",
|
|
621
|
+
"optional": false
|
|
622
|
+
}
|
|
623
|
+
],
|
|
624
|
+
"itemTypes": [
|
|
625
|
+
{
|
|
626
|
+
"name": "CardActionSpec",
|
|
627
|
+
"members": [
|
|
628
|
+
{
|
|
629
|
+
"name": "label",
|
|
630
|
+
"type": "string",
|
|
631
|
+
"optional": false
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"name": "send",
|
|
635
|
+
"type": "string | { text: string; displayText?: string }",
|
|
636
|
+
"optional": true,
|
|
637
|
+
"doc": "走模型:一句话(或气泡文案与透传文案分开)"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
"name": "invoke",
|
|
641
|
+
"type": "{ id: string; input?: Record<string, unknown> }",
|
|
642
|
+
"optional": true,
|
|
643
|
+
"doc": "走确定性动作:id + 入参"
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"name": "confirm",
|
|
647
|
+
"type": "{ title: string; description?: ReactNode; confirmText?: string; cancelText?: string }",
|
|
648
|
+
"optional": true,
|
|
649
|
+
"doc": "点击前确认"
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"name": "style",
|
|
653
|
+
"type": "'primary' | 'secondary'",
|
|
654
|
+
"optional": true
|
|
655
|
+
}
|
|
656
|
+
]
|
|
657
|
+
}
|
|
658
|
+
]
|
|
659
|
+
}
|
|
660
|
+
],
|
|
661
|
+
"icons": [
|
|
662
|
+
"ArrowRight",
|
|
663
|
+
"ArrowsClockwise",
|
|
664
|
+
"Calendar",
|
|
665
|
+
"CaretDown",
|
|
666
|
+
"CaretRight",
|
|
667
|
+
"Check",
|
|
668
|
+
"CheckCircle",
|
|
669
|
+
"Clock",
|
|
670
|
+
"Coins",
|
|
671
|
+
"Copy",
|
|
672
|
+
"CreditCard",
|
|
673
|
+
"CurrencyCny",
|
|
674
|
+
"Gift",
|
|
675
|
+
"Info",
|
|
676
|
+
"MapPin",
|
|
677
|
+
"MapTrifold",
|
|
678
|
+
"Plus",
|
|
679
|
+
"QrCode",
|
|
680
|
+
"Receipt",
|
|
681
|
+
"SealCheck",
|
|
682
|
+
"ShareNetwork",
|
|
683
|
+
"Sparkle",
|
|
684
|
+
"Star",
|
|
685
|
+
"Storefront",
|
|
686
|
+
"Ticket",
|
|
687
|
+
"Trash",
|
|
688
|
+
"User",
|
|
689
|
+
"UserCircle",
|
|
690
|
+
"Warning",
|
|
691
|
+
"WarningCircle",
|
|
692
|
+
"X"
|
|
693
|
+
],
|
|
694
|
+
"tokens": {
|
|
695
|
+
"platform": [
|
|
696
|
+
"--tbox-accent",
|
|
697
|
+
"--tbox-accent-light",
|
|
698
|
+
"--tbox-bg-card",
|
|
699
|
+
"--tbox-bg-page",
|
|
700
|
+
"--tbox-bg-subtle",
|
|
701
|
+
"--tbox-bg-warm",
|
|
702
|
+
"--tbox-border",
|
|
703
|
+
"--tbox-border-strong",
|
|
704
|
+
"--tbox-content-max-width",
|
|
705
|
+
"--tbox-error",
|
|
706
|
+
"--tbox-fs-body",
|
|
707
|
+
"--tbox-fs-caption",
|
|
708
|
+
"--tbox-fs-heading",
|
|
709
|
+
"--tbox-icon-color",
|
|
710
|
+
"--tbox-ink",
|
|
711
|
+
"--tbox-input-bg",
|
|
712
|
+
"--tbox-input-padding",
|
|
713
|
+
"--tbox-input-radius",
|
|
714
|
+
"--tbox-media-item-radius",
|
|
715
|
+
"--tbox-media-item-size",
|
|
716
|
+
"--tbox-motion-duration-base",
|
|
717
|
+
"--tbox-motion-duration-fast",
|
|
718
|
+
"--tbox-motion-duration-slow",
|
|
719
|
+
"--tbox-motion-easing-emphasized",
|
|
720
|
+
"--tbox-motion-easing-standard",
|
|
721
|
+
"--tbox-page-gutter",
|
|
722
|
+
"--tbox-primary",
|
|
723
|
+
"--tbox-primary-dark",
|
|
724
|
+
"--tbox-primary-light",
|
|
725
|
+
"--tbox-radius-lg",
|
|
726
|
+
"--tbox-radius-md",
|
|
727
|
+
"--tbox-radius-sm",
|
|
728
|
+
"--tbox-send-btn-size",
|
|
729
|
+
"--tbox-shadow-lg",
|
|
730
|
+
"--tbox-shadow-md",
|
|
731
|
+
"--tbox-shadow-sm",
|
|
732
|
+
"--tbox-success",
|
|
733
|
+
"--tbox-text-muted",
|
|
734
|
+
"--tbox-text-primary",
|
|
735
|
+
"--tbox-text-secondary",
|
|
736
|
+
"--tbox-transition-base",
|
|
737
|
+
"--tbox-transition-fast",
|
|
738
|
+
"--tbox-warning"
|
|
739
|
+
],
|
|
740
|
+
"domains": [
|
|
741
|
+
"--tbox-domain-member-accent",
|
|
742
|
+
"--tbox-domain-member-border",
|
|
743
|
+
"--tbox-domain-member-surface",
|
|
744
|
+
"--tbox-domain-parking-accent",
|
|
745
|
+
"--tbox-domain-parking-border",
|
|
746
|
+
"--tbox-domain-parking-surface",
|
|
747
|
+
"--tbox-domain-promotion-accent",
|
|
748
|
+
"--tbox-domain-promotion-surface",
|
|
749
|
+
"--tbox-domain-sg-accent",
|
|
750
|
+
"--tbox-domain-sg-border",
|
|
751
|
+
"--tbox-domain-sg-surface"
|
|
752
|
+
],
|
|
753
|
+
"assets": [
|
|
754
|
+
"--tbox-asset-bumpin-bg",
|
|
755
|
+
"--tbox-asset-home-poster-compact",
|
|
756
|
+
"--tbox-asset-home-poster-stage",
|
|
757
|
+
"--tbox-asset-member-login-hero",
|
|
758
|
+
"--tbox-asset-member-mascot",
|
|
759
|
+
"--tbox-asset-parking-hero",
|
|
760
|
+
"--tbox-asset-promotion-activity-header",
|
|
761
|
+
"--tbox-asset-promotion-coupon-header",
|
|
762
|
+
"--tbox-asset-sg-header"
|
|
763
|
+
]
|
|
764
|
+
},
|
|
765
|
+
"shell": {
|
|
766
|
+
"regions": [
|
|
767
|
+
{
|
|
768
|
+
"id": "brand",
|
|
769
|
+
"area": "brand",
|
|
770
|
+
"selector": ".chat-page__brand",
|
|
771
|
+
"drivenBy": [
|
|
772
|
+
"chat.json identity.name",
|
|
773
|
+
"chat.json identity.tagline",
|
|
774
|
+
"HELLO_ACK mallScope.mallName(缺省回落)"
|
|
775
|
+
],
|
|
776
|
+
"brandable": true
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"id": "welcome",
|
|
780
|
+
"area": "welcome",
|
|
781
|
+
"selector": ".chat-page__welcome",
|
|
782
|
+
"drivenBy": [
|
|
783
|
+
"chat.json welcome.title",
|
|
784
|
+
"chat.json welcome.subtitle",
|
|
785
|
+
"chat.json identity(缺省回落)"
|
|
786
|
+
],
|
|
787
|
+
"brandable": true
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"id": "messages",
|
|
791
|
+
"area": "messages",
|
|
792
|
+
"selector": ".chat-page__body",
|
|
793
|
+
"drivenBy": [
|
|
794
|
+
"chat store messages / historyMessages"
|
|
795
|
+
],
|
|
796
|
+
"brandable": false
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
"id": "history-entry",
|
|
800
|
+
"area": "history",
|
|
801
|
+
"selector": ".history-entry",
|
|
802
|
+
"drivenBy": [
|
|
803
|
+
"chat store historyHasMore / isLoadingHistory"
|
|
804
|
+
],
|
|
805
|
+
"brandable": false
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"id": "home-slot",
|
|
809
|
+
"area": "home",
|
|
810
|
+
"selector": ".chat-page__home-slot",
|
|
811
|
+
"drivenBy": [
|
|
812
|
+
"客户端槽 home"
|
|
813
|
+
],
|
|
814
|
+
"brandable": false
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
"id": "quick-commands",
|
|
818
|
+
"area": "quick-commands",
|
|
819
|
+
"selector": ".quick-commands",
|
|
820
|
+
"drivenBy": [
|
|
821
|
+
"chat.json quickCommands"
|
|
822
|
+
],
|
|
823
|
+
"brandable": true
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"id": "input",
|
|
827
|
+
"area": "input",
|
|
828
|
+
"selector": ".tbox-chat-input",
|
|
829
|
+
"drivenBy": [
|
|
830
|
+
"chat.json(enableTTS 等)",
|
|
831
|
+
"chat store runtimeStatus / isGenerating"
|
|
832
|
+
],
|
|
833
|
+
"brandable": false
|
|
834
|
+
}
|
|
835
|
+
],
|
|
836
|
+
"internal": [
|
|
837
|
+
"MessageBubble 内部结构(.msg-row / .msg-main / .msg-thinking)",
|
|
838
|
+
"ChatInput 内部结构(.tbox-media-picker、发送按钮)",
|
|
839
|
+
"卡片渲染器内部结构(.tbox-card-*)"
|
|
840
|
+
]
|
|
841
|
+
}
|
|
842
|
+
}
|