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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ mason-lock.json
# Local Netlify folder
.netlify

# Docusaurus build artifacts
website/

# Cursor Files
.cursor/

# FVM Version Cache
.fvm/
.fvm/
2 changes: 1 addition & 1 deletion docs/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,4 @@ stac deploy
| --------------- | ------------------------------ |
| `-v, --verbose` | Show additional command output |
| `--version` | Print tool version |
| `--help` | Print usage information |
| `--help` | Print usage information |
470 changes: 332 additions & 138 deletions docs/docs.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ Built by developers, for developers. Stac is open source and community-driven.

---

Ready to build your first server-driven UI app? [Get started now →](/quickstart)
Ready to build your first server-driven UI app? [Get started now →](/quickstart)
21 changes: 21 additions & 0 deletions docs/ko/actions/delay_action.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: "Delay 액션"
description: "지정된 시간만큼 대기하는 액션"
---

`StacDelayAction`은 주어진 시간 동안 아무 동작도 하지 않고 대기할 때 사용합니다.

## 속성

| 속성 | 타입 | 설명 |
|------|------|------|
| milliseconds | `int` | 대기할 시간(밀리초) |

## 예제

```json
{
"actionType": "delay",
"milliseconds": 1000
}
```
54 changes: 54 additions & 0 deletions docs/ko/actions/dialog.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: "Dialog 액션"
description: "다이얼로그를 JSON으로 호출하는 방법"
---

`StacDialogAction`은 Stac 앱에서 다이얼로그를 띄우는 액션입니다.

## 속성

| 속성 | 타입 | 설명 |
|------|------|------|
| widget | `Map<String, dynamic>?` | 다이얼로그 안에 표시할 위젯 |
| request | `StacNetworkRequest?` | 다이얼로그를 띄우기 전 수행할 네트워크 요청 |
| assetPath | `String?` | 다이얼로그 콘텐츠가 정의된 에셋 경로 |
| barrierDismissible | `bool` | 배리어를 탭해 닫을 수 있는지(기본값 `true`) |
| barrierColor | `String?` | 배리어 색상 |
| barrierLabel | `String?` | 접근성용 라벨 |
| useSafeArea | `bool` | SafeArea를 적용할지(기본값 `true`) |
| traversalEdgeBehavior | `TraversalEdgeBehavior?` | 포커스 이동 방식 |

## 예제

### 위젯 JSON으로 다이얼로그 표시

```json
{
"actionType": "showDialog",
"widget": {
"type": "text",
"data": "Hello, World!"
}
}
```

### 네트워크 요청 결과를 활용해 표시

```json
{
"actionType": "showDialog",
"request": {
"url": "https://example.com/api",
"method": "get"
}
}
```

### 에셋 JSON 사용

```json
{
"actionType": "showDialog",
"assetPath": "assets/dialog.json"
}
```
35 changes: 35 additions & 0 deletions docs/ko/actions/form_validate.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: "Form Validate 액션"
description: "폼 유효성 검사를 수행하는 액션"
---

`StacFormValidateAction`은 폼이 유효한지 검사하고 결과에 따라 다른 액션을 실행합니다.

## 속성

| 속성 | 타입 | 설명 |
|------|------|------|
| isValid | `Map<String, dynamic>` | 폼이 유효할 때 실행할 액션 |
| isNotValid | `Map<String, dynamic>` | 폼이 유효하지 않을 때 실행할 액션 |

## 예제

```json
{
"actionType": "validateForm",
"isValid": {
"actionType": "showDialog",
"widget": {
"type": "text",
"data": "Form is valid!"
}
},
"isNotValid": {
"actionType": "showDialog",
"widget": {
"type": "text",
"data": "Form is not valid!"
}
}
}
```
21 changes: 21 additions & 0 deletions docs/ko/actions/get_form_value.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: "Get Form Value 액션"
description: "폼 필드 값을 가져오는 액션"
---

`StacGetFormValueAction`은 특정 폼 필드의 값을 읽어 다른 액션에서 사용할 때 활용합니다.

## 속성

| 속성 | 타입 | 설명 |
|------|------|------|
| id | `String` | 값을 조회할 폼 필드의 ID |

## 예제

```json
{
"actionType": "getFormValue",
"id": "username"
}
```
80 changes: 80 additions & 0 deletions docs/ko/actions/modal_bottom_sheet.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: "Modal Bottom Sheet 액션"
description: "모달 바텀시트를 띄우는 액션"
---

`StacModalBottomSheetAction`은 Flutter의 `showModalBottomSheet`를 JSON으로 제어할 수 있게 해 줍니다.

## 속성

| 속성 | 타입 | 설명 |
|------|------|------|
| widget | `Map<String, dynamic>?` | 바텀시트 내부에 표시할 위젯 |
| request | `StacNetworkRequest?` | 바텀시트를 띄우기 전 실행할 네트워크 요청 |
| assetPath | `String?` | 에셋에 있는 JSON 경로 |
| backgroundColor | `String?` | 배경색 |
| barrierLabel | `String?` | 배리어의 접근성 라벨 |
| elevation | `double?` | 바텀시트 고도 |
| shape | `StacBorder?` | 모서리 모양 |
| constraints | `StacBoxConstraints?` | 크기 제약 |
| barrierColor | `String?` | 배리어 색상 |
| isScrollControlled | `bool` | 전체 높이를 사용할지 여부(기본값 `false`) |
| useRootNavigator | `bool` | 루트 내비게이터 사용 여부(기본값 `false`) |
| isDismissible | `bool` | 외부 탭으로 닫히도록 할지(기본값 `true`) |
| enableDrag | `bool` | 드래그로 닫기 가능 여부(기본값 `true`) |
| showDragHandle | `bool?` | 드래그 핸들을 표시할지 |
| useSafeArea | `bool` | SafeArea 적용 여부(기본값 `false`) |

## 예제

```json
{
"actionType": "showModalBottomSheet",
"widget": {
"type": "container",
"height": 200,
"color": "amber",
"child": {
"type": "center",
"child": {
"type": "column",
"mainAxisAlignment": "center",
"mainAxisSize": "min",
"children": [
{
"type": "text",
"data": "Modal BottomSheet"
},
{
"type": "elevatedButton",
"child": {
"type": "text",
"data": "Close BottomSheet"
},
"onPressed": {
"actionType": "pop"
}
}
]
}
}
}
}
```

```json
{
"actionType": "showModalBottomSheet",
"assetPath": "assets/widgets/modal_bottom_sheet.json"
}
```

```json
{
"actionType": "showModalBottomSheet",
"request": {
"url": "https://example.com/api",
"method": "get"
}
}
```
79 changes: 79 additions & 0 deletions docs/ko/actions/multi_action.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
title: "Multi Action"
description: "여러 액션을 순차/병렬로 실행"
---

`StacMultiAction`은 여러 액션을 한 번에 정의하고 순차(`sync: true`) 또는 병렬(`sync: false`)로 실행할 수 있게 해 줍니다.

## 속성

| 속성 | 타입 | 설명 |
|------|------|------|
| actions | `List<Map<String, dynamic>?>?` | 실행할 액션 목록 |
| sync | `bool` | `true`면 순차 실행, `false`면 병렬 실행(기본값 `false`) |

## 예제

```json
{
"actionType": "multiAction",
"sync": true,
"actions": [
{
"actionType": "showSnackBar",
"content": {
"type": "text",
"data": "Executing request..."
},
"action": {
"label": "Done",
"textColor": "#73C2FB",
"onPressed": {}
},
"behavior": "floating"
},
{
"actionType": "networkRequest",
"url": "https://example.com/api",
"method": "get",
"queryParameters": {
"page": 1
},
"headers": {
"Authorization": "Bearer token"
},
"contentType": "application/json",
"body": {
"data": "example"
},
"results": [
{
"statusCode": 200,
"action": {
"actionType": "none"
}
},
{
"statusCode": 404,
"action": {
"actionType": "none"
}
}
]
},
{
"actionType": "showSnackBar",
"content": {
"type": "text",
"data": "Request executed"
},
"action": {
"label": "Done",
"textColor": "#73C2FB",
"onPressed": {}
},
"behavior": "floating"
}
]
}
```
Loading