create-sonamu 0.0.9 → 0.1.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sonamu",
3
- "version": "0.0.9",
3
+ "version": "0.1.0",
4
4
  "description": "Create a new Sonamu project",
5
5
  "keywords": [
6
6
  "sonamu",
@@ -38,7 +38,7 @@
38
38
  "knex": "^3.1.0",
39
39
  "pg": "^8.16.3",
40
40
  "radashi": "^12.2.0",
41
- "sonamu": "^0.7.49",
41
+ "sonamu": "^0.7.50",
42
42
  "zod": "^4.1.12"
43
43
  },
44
44
  "devDependencies": {
@@ -10,7 +10,7 @@
10
10
  "preview": "vite preview"
11
11
  },
12
12
  "dependencies": {
13
- "@sonamu-kit/react-components": "^0.1.7",
13
+ "@sonamu-kit/react-components": "^0.1.8",
14
14
  "@tanstack/react-query": "^5.90.12",
15
15
  "@tanstack/react-router": "1.143.11",
16
16
  "axios": "^1.13.2",
@@ -1,4 +1,3 @@
1
- import { useSonamuContext } from "@sonamu-kit/react-components";
2
1
  import {
3
2
  Button,
4
3
  Sidebar as SidebarComponent,
@@ -12,6 +11,7 @@ import {
12
11
  } from "@sonamu-kit/react-components/components";
13
12
  import { Link, useRouterState } from "@tanstack/react-router";
14
13
  import type React from "react";
14
+ import { useSonamuContext } from "@/contexts/sonamu-provider";
15
15
  import { SD } from "@/i18n/sd.generated";
16
16
  import HomeIcon from "~icons/lucide/home";
17
17
  import LogOutIcon from "~icons/lucide/log-out";
@@ -2,12 +2,20 @@ import {
2
2
  type SonamuContextValue,
3
3
  type SonamuFile,
4
4
  SonamuProvider,
5
+ useSonamuBaseContext,
5
6
  } from "@sonamu-kit/react-components";
6
7
  import type { ReactNode } from "react";
7
8
  import type { MergedDictionary } from "@/i18n/sd.generated";
8
9
  import { SD } from "@/i18n/sd.generated";
9
10
 
10
- export function createSonamuConfig(): SonamuContextValue<MergedDictionary> {
11
+ // TODO: User 엔티티 추가 후 아래 타입들을 지정하세요
12
+ // - UserSubsetSS: 세션에 저장되는 User 타입 (예: import type { UserSubsetSS } from "@/services/sonamu.generated")
13
+ // - UserLoginParams: 로그인 파라미터 타입 (예: import type { UserLoginParams } from "@/services/user/user.types")
14
+ export function useSonamuContext() {
15
+ return useSonamuBaseContext<MergedDictionary, any, any>();
16
+ }
17
+
18
+ export function createSonamuConfig(): SonamuContextValue<MergedDictionary, any, any> {
11
19
  // Auth configuration
12
20
  const auth_config = {
13
21
  user: null,
@@ -46,5 +54,9 @@ export function createSonamuConfig(): SonamuContextValue<MergedDictionary> {
46
54
 
47
55
  export function SonamuProviderWrapper({ children }: { children: ReactNode }) {
48
56
  const sonamuConfig = createSonamuConfig();
49
- return <SonamuProvider<MergedDictionary> {...sonamuConfig}>{children}</SonamuProvider>;
57
+ return (
58
+ <SonamuProvider<MergedDictionary, any, any> {...sonamuConfig}>
59
+ {children}
60
+ </SonamuProvider>
61
+ );
50
62
  }