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
8 changes: 8 additions & 0 deletions apps/docs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@ const config = {
},
],
},
experimental: {
turbo: {
resolveAlias: {
'fumadocs-ui/components/callout': 'fumadocs-ui/dist/components/callout.js',
},
},
},
webpack: (config, { isServer }) => {
// Resolve the fumadocs virtual collection import to the local .source directory
config.resolve = config.resolve || {};
config.resolve.alias = {
...(config.resolve.alias || {}),
'fumadocs-mdx:collections': path.resolve(__dirname, '.source'),
'fumadocs-ui/components/callout$': path.resolve(__dirname, '../../node_modules/fumadocs-ui/dist/components/callout.js'),
};
return config;
},
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "ObjectStack Protocol Documentation Site",
"scripts": {
"site:dev": "next dev",
"build": "next build",
"build": "NEXT_PRIVATE_BUILD_WORKER=1 next build",
"site:start": "next start",
"site:lint": "next lint"
},
Expand Down
21 changes: 10 additions & 11 deletions content/docs/guides/field-types.cn.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: 字段类型参考
description: ObjectStack 所有字段类型的完整指南,包含示例和配置选项
---

import { Callout } from 'fumadocs-ui/components/callout';

# 字段类型参考

Expand Down Expand Up @@ -66,9 +65,9 @@ email: Field.email({
})
```

<Callout type="info">
> ℹ️ **Info:**
自动验证邮箱格式:`user@domain.com`
</Callout>


---

Expand Down Expand Up @@ -107,9 +106,9 @@ api_key: Field.password({
})
```

<Callout type="warn">
> ⚠️ **Warning:**
密码字段在 UI 中自动掩码,如果 `encryption: true` 则加密存储
</Callout>


---

Expand Down Expand Up @@ -137,9 +136,9 @@ html_content: Field.html({
})
```

<Callout type="warn">
> ⚠️ **Warning:**
渲染前务必净化 HTML 内容,防止 XSS 攻击
</Callout>


---

Expand Down Expand Up @@ -370,11 +369,11 @@ account: Field.masterDetail('account', {
})
```

<Callout type="info">
> ℹ️ **Info:**
**主从关系 vs 查找:**
- **主从关系:** 紧密耦合,级联删除,子记录继承安全性
- **查找:** 松散耦合,删除时置空,独立安全性
</Callout>


---

Expand Down Expand Up @@ -451,9 +450,9 @@ days_open: Field.formula({
})
```

<Callout type="info">
> ℹ️ **Info:**
公式字段自动计算且只读。可用函数请参见 [公式函数](/docs/references/data/formulas)。
</Callout>


---

Expand Down
21 changes: 10 additions & 11 deletions content/docs/guides/field-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Field Types Reference
description: Complete guide to all ObjectStack field types with examples and configuration options
---

import { Callout } from 'fumadocs-ui/components/callout';

# Field Types Reference

Expand Down Expand Up @@ -66,9 +65,9 @@ email: Field.email({
})
```

<Callout type="info">
> ℹ️ **Info:**
Automatically validates email format: `user@domain.com`
</Callout>


---

Expand Down Expand Up @@ -107,9 +106,9 @@ api_key: Field.password({
})
```

<Callout type="warn">
> ⚠️ **Warning:**
Password fields are automatically masked in UI and encrypted if `encryption: true`
</Callout>


---

Expand Down Expand Up @@ -137,9 +136,9 @@ html_content: Field.html({
})
```

<Callout type="warn">
> ⚠️ **Warning:**
Always sanitize HTML content before rendering to prevent XSS attacks
</Callout>


---

Expand Down Expand Up @@ -370,11 +369,11 @@ account: Field.masterDetail('account', {
})
```

<Callout type="info">
> ℹ️ **Info:**
**Master-Detail vs Lookup:**
- **Master-Detail:** Tight coupling, cascade deletes, child inherits security
- **Lookup:** Loose coupling, set null on delete, independent security
</Callout>


---

Expand Down Expand Up @@ -451,9 +450,9 @@ days_open: Field.formula({
})
```

<Callout type="info">
> ℹ️ **Info:**
Formula fields are automatically calculated and readonly. See [Formula Functions](/docs/references/data/formulas) for available functions.
</Callout>


---

Expand Down
1 change: 0 additions & 1 deletion content/docs/guides/view-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: View Configuration
description: Complete guide to configuring Grid, Kanban, Calendar, Gantt views and forms in ObjectStack
---

import { Callout } from 'fumadocs-ui/components/callout';

# View Configuration Guide

Expand Down
5 changes: 2 additions & 3 deletions content/docs/guides/workflows-validation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Validation Rules & Workflows
description: Complete guide to validation rules and workflow automation in ObjectStack
---

import { Callout } from 'fumadocs-ui/components/callout';

# Validation Rules & Workflows

Expand Down Expand Up @@ -73,9 +72,9 @@ export const Opportunity = ObjectSchema.create({
});
```

<Callout type="info">
> ℹ️ **Info:**
**Important:** The `condition` is inverted logic - it defines when validation **FAILS**. If the condition evaluates to `TRUE`, the validation error is shown.
</Callout>


### Expression Examples

Expand Down
2 changes: 1 addition & 1 deletion content/docs/index.cn.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { Book, Compass, FileText, Layers } from 'lucide-react';
icon={<Compass />}
title="概念"
href="/docs/concepts/manifesto"
description="理解"意图优于实现"和"本地优先"架构的理念。"
description="理解意图优于实现」和「本地优先架构的理念。"
/>
<Card
icon={<Layers />}
Expand Down
Loading
Loading