Skip to content

Commit eede428

Browse files
authored
feat: use WithDefault for boolean props in native specs (#155)
* feat: use WithDefault for boolean props in native specs Replace JavaScript default values with React Native codegen WithDefault type to ensure proper state synchronization between JS and native layers. This prevents issues where native SDK defaults differ from JS defaults, which could cause props to not update correctly when both old and new values appear false to the native layer. Changes: - NaverMapView: 14 boolean props now use WithDefault - BaseOverlay: 3 boolean props (isHidden, isMinZoomInclusive, isMaxZoomInclusive) - MarkerOverlay: 6 collision and display boolean props - PathOverlay: 3 collision boolean props - MultiPathOverlay: 3 collision boolean props All components updated to remove JS default values and rely on native-side defaults specified in WithDefault types. * fix: make WithDefault boolean props optional in BaseOverlay specs React Native codegen requires WithDefault properties to be optional. Fixed BaseOverlay interface in all spec files to use optional syntax for isHidden, isMinZoomInclusive, and isMaxZoomInclusive properties.
1 parent 9b460f5 commit eede428

40 files changed

+1422
-345
lines changed

.claude/commands/page-refer.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Refer Page - Load Session History Context
2+
3+
Retrieve and use it as knowledge with running `cc-self-refer page {search|list|view}`
4+
5+
**Usage**: `/page-refer <keyword>`
6+
7+
## Purpose
8+
9+
This command retrieves saved session histories to restore context from previous development sessions. It enables continuity across multiple sessions and helps recover important development context and decisions.
10+
11+
### ⚠️ IMPORTANT: CLI Command Execution Required
12+
13+
**This command MUST execute the following `cc-self-refer` CLI commands.**
14+
15+
### CLI Commands Used
16+
17+
```bash
18+
npx -y cc-self-refer page search <keyword> # Search pages by keyword
19+
npx -y cc-self-refer page list # List all pages
20+
npx -y cc-self-refer page view <id> # View specific page
21+
```
22+
23+
### Command Arguments
24+
- `id`: Page ID number (for view command)
25+
- `keyword`: Search keyword or phrase (for search command)
26+
27+
### Expected Workflow
28+
1. Search for relevant session pages using `npx -y cc-self-refer page search <keyword>` (keyword is generated by claude code from user input)
29+
2. Check search results:
30+
- If search result contains sufficient session context, use that information directly
31+
- If search result only shows summary/metadata, use `npx -y cc-self-refer page view <id>` for complete session content
32+
3. **APPLY the session knowledge** to current development work:
33+
- Reference previous decisions and architectural choices
34+
- **Focus on continuing the development work based on past session context**
35+
- Integrate the session knowledge directly into current task execution
36+

.claude/commands/page-save.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Page Save - Session History Dump with Citations and Memory Management
2+
3+
This commadns run `cc-self-refer page create` commands with title
4+
5+
**Usage**: `/page-save <title>`
6+
7+
## What does this command do
8+
9+
### ⚠️ IMPORTANT: CLI Command Execution Required
10+
11+
**This command MUST execute the following `cc-self-refer` CLI commands.**
12+
13+
### CLI Command Used
14+
15+
```bash
16+
npx -y cc-self-refer page create "<title>"
17+
```
18+
19+
### Command Arguments
20+
- `title`: Page title (optional)

.claude/commands/pattern-create.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Code Pattern - Save Reusable Code Patterns
2+
3+
Extract code snippet or common pattern in project and run cc-self-refer pattern create command
4+
5+
**Usage**: `/pattern-create <pattern name> <snippet|filename with line number|description>`
6+
7+
## What does this command do
8+
9+
### ⚠️ IMPORTANT: CLI Command Execution Required
10+
11+
**This command MUST execute the following `cc-self-refer` CLI command.**
12+
13+
### CLI Command Used
14+
15+
```bash
16+
npx -y cc-self-refer pattern create "<pattern-name>" <<'EOF'
17+
<pattern-content>
18+
EOF
19+
```
20+
21+
### Command Arguments
22+
- `pattern-name`: Name of the code pattern
23+
- `pattern-content`: Complete code snippet or pattern content
24+
25+
26+
### Pattern Content Structure
27+
28+
- Patterns should be **concise usage snippets** ready to copy-paste:
29+
- Code should be **immediately usable**
30+
- Minimal explanation, maximum utility
31+
- Usage section can be one or more code snippets showing direct usage of the pattern.
32+
- Contain snippets as concise as possible, only required pieces.
33+
- If the pattern has multiple variants or usage modes, include all of them in the Usage section. Each variant should be a concise, one-line example showing different configurations or use cases.
34+
35+
````markdown
36+
# <Pattern Name>
37+
38+
## Usage
39+
40+
```[language]
41+
// Direct usage example
42+
[Actual code snippet as used in practice]
43+
```
44+
45+
````
46+
47+
Example:
48+
49+
````markdown
50+
# Zod Schema Definition
51+
52+
## Usage
53+
54+
```typescript
55+
export const userSchema = z.object({
56+
name: z.string().min(1, "Name is required"),
57+
email: z.string().email("Invalid email format"),
58+
age: z.number().min(18, "Must be 18 or older")
59+
}).strict();
60+
61+
export type User = z.infer<typeof useSchema>;
62+
```
63+
````
64+
65+
Example with multiple variants:
66+
67+
````markdown
68+
# Button Component
69+
70+
## Usage
71+
72+
### Basic Variants
73+
```jsx
74+
<Button>Default</Button>
75+
<Button variant="primary">Primary</Button>
76+
<Button variant="secondary">Secondary</Button>
77+
<Button variant="destructive">Delete</Button>
78+
```
79+
80+
### Size Variants
81+
```jsx
82+
<Button size="sm">Small</Button>
83+
<Button size="lg">Large</Button>
84+
```
85+
86+
### Combined Props
87+
```jsx
88+
<Button variant="primary" size="lg">Large Primary</Button>
89+
<Button disabled>Disabled</Button>
90+
```
91+
````
92+
93+
94+
## Usage Examples
95+
96+
### Save Pattern Examples
97+
98+
When user requests:
99+
100+
```bash
101+
/pattern-create "api-error-handler" "snippet or filename with lines"
102+
```
103+
104+
Claude will:
105+
106+
1. Generate <formatted content> with the above rules.
107+
2. Execute:
108+
```bash
109+
npx -y cc-self-refer pattern create "api-error-handler" <<'EOF'
110+
<formatted content>
111+
EOF
112+
```

.claude/commands/pattern-use.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Use Code Pattern - Apply Predefined Code Patterns
2+
3+
Retrieve and apply code patterns with `cc-self-refer pattern search` command
4+
5+
**Usage**: `/pattern-use <number|keyword>`
6+
7+
## What does this command do
8+
9+
### ⚠️ IMPORTANT: CLI Command Execution Required
10+
11+
**This command MUST execute the following `cc-self-refer` CLI commands.**
12+
13+
### CLI Commands Used
14+
15+
```bash
16+
# Search for patterns first
17+
npx -y cc-self-refer pattern search <keyword>
18+
19+
# View specific pattern
20+
npx -y cc-self-refer pattern view <id>
21+
22+
# List all patterns
23+
npx -y cc-self-refer pattern list
24+
```
25+
26+
### Command Arguments
27+
- `id_or_keyword`: Pattern ID number or search keyword
28+
29+
### Expected Workflow
30+
1. Search for relevant patterns using `npx -y cc-self-refer pattern search`
31+
2. Check search results:
32+
- If search result contains full pattern content, use that content directly
33+
- If search result only shows summary/metadata, use `npx -y cc-self-refer pattern view <number>` for complete content
34+
3. **IMPLEMENT the actual code** using the printed content:
35+
- Apply the pattern's architectural principles and design decisions
36+
- **Focus on implementing working code, not just creating examples or documentation**
37+
- **DO NOT create separate example files or usage demonstration files**
38+
- Implement the pattern directly in the appropriate location within the project structure
39+

0 commit comments

Comments
 (0)