Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
180 changes: 119 additions & 61 deletions bun.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/.vitepress/locales/en/nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { filterNavItems } from '../../region-utils'
export const nav = (): DefaultTheme.NavItem[] => {
return filterNavItems([
{ component: 'FeaturesMenu' } as DefaultTheme.NavItem,
{ text: 'Pricing', link: '/pricing', activeMatch: '^(/en)?/pricing' },
{ text: 'Skill', link: '/skill', activeMatch: '^(/en)?/skill' },
{ text: 'CLI', link: '/docs/cli', activeMatch: '^(/en)?/docs/cli' },
{ text: 'MCP', link: '/docs/mcp', activeMatch: '^(/en)?/docs/mcp' },
{ text: 'Docs', link: '/docs', activeMatch: '^(/en)?/docs(?!/cli)(?!/api)(?!/mcp)' },
{ text: 'API Reference', link: '/docs/api', activeMatch: '^(/en)?/docs/api' },
{ text: 'SDK', link: '/sdk', activeMatch: '^(/en)?/sdk' },
])
}
2 changes: 1 addition & 1 deletion docs/.vitepress/locales/zh-CN/nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { filterNavItems } from '../../region-utils'
export const nav = (lang: string): DefaultTheme.NavItem[] => {
return filterNavItems([
{ component: 'FeaturesMenu' } as DefaultTheme.NavItem,
{ text: '定价', link: `/${lang}/pricing`, activeMatch: `^/${lang}/pricing` },
{ text: 'Skill', link: `/${lang}/skill`, activeMatch: `^/${lang}/skill` },
{ text: 'CLI', link: `/${lang}/docs/cli`, activeMatch: `^/${lang}/docs/cli` },
{ text: 'MCP', link: `/${lang}/docs/mcp`, activeMatch: `^/${lang}/docs/mcp` },
{ text: '文档', link: `/${lang}/docs`, activeMatch: `^/${lang}/docs(?!/cli)(?!/api)(?!/mcp)` },
{ text: 'API 参考', link: `/${lang}/docs/api`, activeMatch: `^/${lang}/docs/api` },
{ text: 'SDK', link: `/${lang}/sdk`, activeMatch: `^/${lang}/sdk` },
])
}
2 changes: 1 addition & 1 deletion docs/.vitepress/locales/zh-HK/nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { filterNavItems } from '../../region-utils'
export const nav = (lang: string): DefaultTheme.NavItem[] => {
return filterNavItems([
{ component: 'FeaturesMenu' } as DefaultTheme.NavItem,
{ text: '定價', link: `/${lang}/pricing`, activeMatch: `^/${lang}/pricing` },
{ text: 'Skill', link: `/${lang}/skill`, activeMatch: `^/${lang}/skill` },
{ text: 'CLI', link: `/${lang}/docs/cli`, activeMatch: `^/${lang}/docs/cli` },
{ text: 'MCP', link: `/${lang}/docs/mcp`, activeMatch: `^/${lang}/docs/mcp` },
{ text: '文檔', link: `/${lang}/docs`, activeMatch: `^/${lang}/docs(?!/cli)(?!/api)(?!/mcp)` },
{ text: 'API 參考', link: `/${lang}/docs/api`, activeMatch: `^/${lang}/docs/api` },
{ text: 'SDK', link: `/${lang}/sdk`, activeMatch: `^/${lang}/sdk` },
])
}
4 changes: 2 additions & 2 deletions docs/.vitepress/theme/components/FeaturesMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const i18n: Record<string, FeatureItem[]> = {
icon: icons.consensus,
},
{ title: '公司新闻', desc: '实时财经资讯与市场动态', link: '/docs/cli/content/news', icon: icons.news },
{ title: '监管文件', desc: '年报、季报及监管申报文件', link: '/docs/cli/content/filing', icon: icons.filing },
{ title: '年报公告', desc: '年报、季报及监管申报文件', link: '/docs/cli/content/filing', icon: icons.filing },
{
title: '机构持仓',
desc: '基金持仓明细与仓位变动数据',
Expand Down Expand Up @@ -133,7 +133,7 @@ const i18n: Record<string, FeatureItem[]> = {
icon: icons.consensus,
},
{ title: '公司新聞', desc: '實時財經資訊與市場動態', link: '/docs/cli/content/news', icon: icons.news },
{ title: '監管文件', desc: '年報、季報及監管申報文件', link: '/docs/cli/content/filing', icon: icons.filing },
{ title: '年報財報', desc: '年報、季報及監管申報文件', link: '/docs/cli/content/filing', icon: icons.filing },
{
title: '機構持倉',
desc: '基金持倉明細與倉位變動數據',
Expand Down
572 changes: 572 additions & 0 deletions docs/.vitepress/theme/components/Pricing.vue

Large diffs are not rendered by default.

15 changes: 8 additions & 7 deletions docs/.vitepress/theme/components/QuotePermission.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<div class="qp-alert" :data-level="effectiveLevel">
<div
class="qp-alert"
:data-level="effectiveLevel"
:style="{ '--lc-border': levelColor.border, '--lc-bg': levelColor.bg }">
<!-- Header: icon + label + market tag + badge (right) -->
<div class="qp-header">
<span class="qp-icon" v-html="shieldCheckIcon" />
Expand Down Expand Up @@ -34,6 +37,7 @@ import {
QUOTE_LINK_TEXT,
QUOTE_SEPARATE_NOTE,
QUOTE_MARKET_LABELS,
LEVEL_COLORS,
type QuoteLevel,
type QuoteLocale,
} from './QuotePermissionData'
Expand All @@ -54,6 +58,7 @@ const cmdEntry = computed(() => (props.command ? QUOTE_COMMANDS[props.command] :

const effectiveLevel = computed<QuoteLevel>(() => cmdEntry.value?.level ?? props.level ?? 'basic')
const effectiveMarket = computed(() => props.market ?? cmdEntry.value?.market)
const levelColor = computed(() => LEVEL_COLORS[effectiveLevel.value])

const shieldCheckIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 13c0 5-3.5 7.5-7.76 8.95a1 1 0 0 1-.48 0C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"/><path d="m9 12 2 2 4-4"/></svg>`

Expand All @@ -75,15 +80,15 @@ const marketLabel = computed(() =>

<style scoped>
.qp-alert {
border: 1px solid;
border: 1px solid var(--lc-border);
background: var(--lc-bg);
border-radius: 0.5rem;
padding: 0.875rem 1rem;
margin: 1rem 0;
}

/* ── level colors ── */
.qp-alert[data-level='basic'] {
@apply border-green-500/30 bg-green-500/5;
}
.qp-alert[data-level='basic'] .qp-icon,
.qp-alert[data-level='basic'] .qp-label {
Expand All @@ -108,7 +113,6 @@ const marketLabel = computed(() =>
}

.qp-alert[data-level='lv1'] {
@apply border-blue-500/30 bg-blue-500/5;
}
.qp-alert[data-level='lv1'] .qp-icon,
.qp-alert[data-level='lv1'] .qp-label {
Expand All @@ -133,7 +137,6 @@ const marketLabel = computed(() =>
}

.qp-alert[data-level='lv2'] {
@apply border-orange-500/30 bg-orange-500/5;
}
.qp-alert[data-level='lv2'] .qp-icon,
.qp-alert[data-level='lv2'] .qp-label {
Expand All @@ -158,7 +161,6 @@ const marketLabel = computed(() =>
}

.qp-alert[data-level='overnight'] {
@apply border-yellow-500/30 bg-yellow-500/5;
}
.qp-alert[data-level='overnight'] .qp-icon,
.qp-alert[data-level='overnight'] .qp-label {
Expand All @@ -183,7 +185,6 @@ const marketLabel = computed(() =>
}

.qp-alert[data-level='opra'] {
@apply border-purple-500/30 bg-purple-500/5;
}
.qp-alert[data-level='opra'] .qp-icon,
.qp-alert[data-level='opra'] .qp-label {
Expand Down
10 changes: 10 additions & 0 deletions docs/.vitepress/theme/components/QuotePermissionData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ export const QUOTE_DESCRIPTIONS: Record<QuoteLevel, L10n> = Object.fromEntries(
Object.entries(levels).map(([k, v]: [string, any]) => [k, v.description])
) as Record<QuoteLevel, L10n>

// Tailwind color tokens shared across QuotePermission and Pricing components
// basic=green, lv1=blue, lv2=orange, opra=purple
export const LEVEL_COLORS: Record<QuoteLevel | 'opra', { hex: string; text: string; bg: string; border: string }> = {
basic: { hex: '#22c55e', text: '#16a34a', bg: 'rgba(34,197,94,0.07)', border: 'rgba(34,197,94,0.3)' }, // green-500 / green-600
lv1: { hex: '#3b82f6', text: '#2563eb', bg: 'rgba(59,130,246,0.07)', border: 'rgba(59,130,246,0.3)' }, // blue-500 / blue-600
lv2: { hex: '#f97316', text: '#ea580c', bg: 'rgba(249,115,22,0.07)', border: 'rgba(249,115,22,0.3)' }, // orange-500 / orange-600
overnight:{ hex: '#eab308', text: '#ca8a04', bg: 'rgba(234,179,8,0.07)', border: 'rgba(234,179,8,0.3)' }, // yellow-500 / yellow-600
opra: { hex: '#a855f7', text: '#9333ea', bg: 'rgba(168,85,247,0.07)', border: 'rgba(168,85,247,0.3)' }, // purple-500 / purple-600
}

export const QUOTE_LINK_TEXT: Record<QuoteLevel, L10n> = Object.fromEntries(
Object.entries(levels).map(([k, v]: [string, any]) => [k, v.link_text])
) as Record<QuoteLevel, L10n>
1 change: 1 addition & 0 deletions docs/.vitepress/theme/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export { default as HomePage } from './HomePage/index.vue'
export { default as NewHomePage } from './NewHomePage/index.vue'
export { default as McpTools } from './McpTools.vue'
export { default as QuantChart } from './QuantChart.vue'
export { default as Pricing } from './Pricing.vue'
export { default as QuotePermission } from './QuotePermission.vue'
7 changes: 6 additions & 1 deletion docs/.vitepress/theme/layouts/LayoutInner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ provide('hero-image-slot-exists', heroImageSlotExists)

<VPContent v-if="!showTryIt && !isApiReference">
<template #page-top><slot name="page-top" /></template>
<template #page-bottom><slot name="page-bottom" /></template>
<template #page-bottom>
<slot name="page-bottom" />
<div class="max-w-[1200px] mx-auto px-8">
<Footer />
</div>
</template>

<template #not-found><slot name="not-found" /></template>
<template #home-hero-before><slot name="home-hero-before" /></template>
Expand Down
8 changes: 8 additions & 0 deletions docs/en/pricing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: 'Market Data Pricing'
id: pricing
layout: page
sidebar: false
---

<Pricing />
8 changes: 8 additions & 0 deletions docs/zh-CN/pricing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: '行情权限定价'
id: pricing
layout: page
sidebar: false
---

<Pricing />
8 changes: 8 additions & 0 deletions docs/zh-HK/pricing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: '行情權限定價'
id: pricing
layout: page
sidebar: false
---

<Pricing />
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"js-yaml": "^4.1.1",
"markdown-it": "^14.1.1",
"motion-v": "^2.2.0",
"qrcode": "^1.5.4",
"reka-ui": "^2.9.6",
"shiki": "^3.6.0",
"tailwindcss": "^4.2.2",
Expand All @@ -50,6 +51,7 @@
"@types/bun": "latest",
"@types/fs-extra": "^11.0.4",
"@types/js-yaml": "^4.0.9",
"@types/qrcode": "^1.5.6",
"@unocss/extractor-mdc": "^66.1.2",
"@unocss/transformer-variant-group": "^66.1.2",
"cross-env": "^7.0.3",
Expand Down
Loading