@gendive/slide 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/README.md +55 -0
- package/dist/App.d.ts +2 -0
- package/dist/__vite-browser-external-BcPniuRQ.cjs +2 -0
- package/dist/__vite-browser-external-BcPniuRQ.cjs.map +1 -0
- package/dist/__vite-browser-external-DYxpcVy9.js +5 -0
- package/dist/__vite-browser-external-DYxpcVy9.js.map +1 -0
- package/dist/ai/components/AiEditChat.d.ts +9 -0
- package/dist/ai/components/AiImageModal.d.ts +11 -0
- package/dist/ai/components/AiPanel.d.ts +10 -0
- package/dist/ai/components/AiSlideModal.d.ts +11 -0
- package/dist/ai/components/AiTextModal.d.ts +11 -0
- package/dist/ai/components/ParsedSlideEditor.d.ts +15 -0
- package/dist/ai/hooks/useAiGeneration.d.ts +26 -0
- package/dist/ai/index.d.ts +14 -0
- package/dist/ai/services/aiApiClient.d.ts +30 -0
- package/dist/ai/services/providers/devdiveProvider.d.ts +52 -0
- package/dist/ai/services/providers/glmProvider.d.ts +26 -0
- package/dist/ai/services/providers/index.d.ts +6 -0
- package/dist/ai/services/slideDataParser.d.ts +29 -0
- package/dist/ai/stores/aiStore.d.ts +36 -0
- package/dist/ai/types/index.d.ts +154 -0
- package/dist/components/AiChatBar.d.ts +5 -0
- package/dist/components/Editor.d.ts +5 -0
- package/dist/components/FloatingToolbar.d.ts +5 -0
- package/dist/components/Header.d.ts +5 -0
- package/dist/components/ImageNode.d.ts +15 -0
- package/dist/components/PropertiesPanel.d.ts +5 -0
- package/dist/components/ShapeNode.d.ts +25 -0
- package/dist/components/SlideCanvas.d.ts +4 -0
- package/dist/components/SlideNavigation.d.ts +5 -0
- package/dist/components/SlideThumbnails.d.ts +5 -0
- package/dist/components/TemplateGallery.d.ts +11 -0
- package/dist/components/TextNode.d.ts +14 -0
- package/dist/data/templates.d.ts +9 -0
- package/dist/devdive-slide.cjs.js +469 -0
- package/dist/devdive-slide.cjs.js.map +1 -0
- package/dist/devdive-slide.es.js +32580 -0
- package/dist/devdive-slide.es.js.map +1 -0
- package/dist/hooks/useAutoSave.d.ts +28 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts +4 -0
- package/dist/index.d.ts +19 -0
- package/dist/lib/pptxGenerator.d.ts +5 -0
- package/dist/lib/storage/adapters/hybridAdapter.d.ts +19 -0
- package/dist/lib/storage/adapters/index.d.ts +7 -0
- package/dist/lib/storage/adapters/indexedDBAdapter.d.ts +17 -0
- package/dist/lib/storage/adapters/serverAdapter.d.ts +6 -0
- package/dist/lib/storage/index.d.ts +7 -0
- package/dist/lib/storage/storageService.d.ts +52 -0
- package/dist/lib/storage/types.d.ts +41 -0
- package/dist/main.d.ts +0 -0
- package/dist/slide.css +1 -0
- package/dist/stores/editorStore.d.ts +26 -0
- package/dist/theme/index.d.ts +154 -0
- package/dist/types/index.d.ts +202 -0
- package/dist/utils/id.d.ts +5 -0
- package/dist/utils/markdown.d.ts +29 -0
- package/dist/utils/snap.d.ts +20 -0
- package/package.json +78 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Slide } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* @description 자동 저장 훅 옵션
|
|
4
|
+
*/
|
|
5
|
+
export interface UseAutoSaveOptions {
|
|
6
|
+
/** 저장 간격 (ms) - 기본 3초 */
|
|
7
|
+
debounceMs?: number;
|
|
8
|
+
/** 자동 저장 활성화 */
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
/** 저장 성공 콜백 */
|
|
11
|
+
onSaveSuccess?: () => void;
|
|
12
|
+
/** 저장 실패 콜백 */
|
|
13
|
+
onSaveError?: (error: Error) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @description 자동 저장 훅
|
|
17
|
+
* @Todo vibecode - 디바운스 적용 자동 저장
|
|
18
|
+
*/
|
|
19
|
+
export declare const useAutoSave: (presentationId: string, title: string, slides: Slide[], options?: UseAutoSaveOptions) => {
|
|
20
|
+
/** 저장 중 여부 */
|
|
21
|
+
isSaving: boolean;
|
|
22
|
+
/** 마지막 저장 시간 */
|
|
23
|
+
lastSaved: Date | null;
|
|
24
|
+
/** 저장되지 않은 변경 여부 */
|
|
25
|
+
hasUnsavedChanges: boolean;
|
|
26
|
+
/** 즉시 저장 */
|
|
27
|
+
saveNow: () => Promise<void>;
|
|
28
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { devdiveTheme, themeVars } from './theme';
|
|
2
|
+
export { Editor } from './components/Editor';
|
|
3
|
+
export { SlideCanvas } from './components/SlideCanvas';
|
|
4
|
+
export { FloatingToolbar } from './components/FloatingToolbar';
|
|
5
|
+
export { PropertiesPanel } from './components/PropertiesPanel';
|
|
6
|
+
export { SlideThumbnails } from './components/SlideThumbnails';
|
|
7
|
+
export { SlideNavigation } from './components/SlideNavigation';
|
|
8
|
+
export { Header } from './components/Header';
|
|
9
|
+
export { TemplateGallery } from './components/TemplateGallery';
|
|
10
|
+
export { TextNode } from './components/TextNode';
|
|
11
|
+
export { ShapeNode } from './components/ShapeNode';
|
|
12
|
+
export { ImageNode } from './components/ImageNode';
|
|
13
|
+
export { useEditorStore } from './stores/editorStore';
|
|
14
|
+
export { generateId } from './utils/id';
|
|
15
|
+
export { calculateSnap } from './utils/snap';
|
|
16
|
+
export { generatePptx } from './lib/pptxGenerator';
|
|
17
|
+
export { LAYOUT_TEMPLATES, getLayoutTemplate } from './data/templates';
|
|
18
|
+
export type { Slide, SlideElement, BaseElement, TextElement, ShapeElement, ImageElement, ShapeType, TextStyleType, FontFamily, EditorMode, SnapSettings, LayoutType, ThemeType, ThemeColors, LayoutTemplate, EditorState, EditorActions, HistoryState, } from './types';
|
|
19
|
+
export { TEXT_STYLE_PRESETS, THEME_PRESETS } from './types';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StorageAdapter } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* @description 하이브리드 어댑터 설정
|
|
4
|
+
*/
|
|
5
|
+
export interface HybridAdapterConfig {
|
|
6
|
+
/** 로컬 어댑터 (필수) */
|
|
7
|
+
local: StorageAdapter;
|
|
8
|
+
/** 서버 어댑터 (선택) */
|
|
9
|
+
server?: StorageAdapter;
|
|
10
|
+
/** 서버 동기화 활성화 */
|
|
11
|
+
syncToServer?: boolean;
|
|
12
|
+
/** 동기화 실패 시 콜백 */
|
|
13
|
+
onSyncError?: (error: Error) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @description 하이브리드 저장소 어댑터
|
|
17
|
+
* @Todo vibecode - 로컬 우선 + 서버 동기화
|
|
18
|
+
*/
|
|
19
|
+
export declare const createHybridAdapter: (config: HybridAdapterConfig) => StorageAdapter;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Storage Adapters export
|
|
3
|
+
* @Todo vibecode - 어댑터 패턴으로 로컬/서버 저장소 추상화
|
|
4
|
+
*/
|
|
5
|
+
export { indexedDBAdapter, db } from './indexedDBAdapter';
|
|
6
|
+
export { createServerAdapter } from './serverAdapter';
|
|
7
|
+
export { createHybridAdapter, type HybridAdapterConfig } from './hybridAdapter';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as Dexie, EntityTable } from 'dexie';
|
|
2
|
+
import { StorageAdapter, SavedPresentation } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* @description Dexie DB 인스턴스
|
|
5
|
+
* @Todo vibecode - IndexedDB 래퍼
|
|
6
|
+
*/
|
|
7
|
+
declare class DevDiveSlideDB extends Dexie {
|
|
8
|
+
presentations: EntityTable<SavedPresentation, 'id'>;
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
11
|
+
declare const db: DevDiveSlideDB;
|
|
12
|
+
/**
|
|
13
|
+
* @description IndexedDB 저장소 어댑터
|
|
14
|
+
* @Todo vibecode - 로컬 저장용
|
|
15
|
+
*/
|
|
16
|
+
export declare const indexedDBAdapter: StorageAdapter;
|
|
17
|
+
export { db };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Storage 모듈 export
|
|
3
|
+
* @Todo vibecode - IndexedDB + 서버 저장 지원
|
|
4
|
+
*/
|
|
5
|
+
export type { SavedPresentation, StorageAdapter, ServerStorageConfig } from './types';
|
|
6
|
+
export { indexedDBAdapter, db, createServerAdapter, createHybridAdapter, type HybridAdapterConfig, } from './adapters';
|
|
7
|
+
export { storageService, initStorage, getStorage, type StorageInitConfig, } from './storageService';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Slide } from '../../types';
|
|
2
|
+
import { StorageAdapter, SavedPresentation, ServerStorageConfig } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* @description 저장소 초기화 설정
|
|
5
|
+
*/
|
|
6
|
+
export interface StorageInitConfig {
|
|
7
|
+
/** 저장 모드 */
|
|
8
|
+
mode: 'local' | 'server' | 'hybrid';
|
|
9
|
+
/** 서버 설정 (server/hybrid 모드 시 필수) */
|
|
10
|
+
serverConfig?: ServerStorageConfig;
|
|
11
|
+
/** 동기화 에러 핸들러 */
|
|
12
|
+
onSyncError?: (error: Error) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @description 저장소 초기화
|
|
16
|
+
* @Todo vibecode - 라이브러리 사용자가 호출
|
|
17
|
+
*/
|
|
18
|
+
export declare const initStorage: (config: StorageInitConfig) => void;
|
|
19
|
+
/**
|
|
20
|
+
* @description 현재 저장소 어댑터 반환
|
|
21
|
+
*/
|
|
22
|
+
export declare const getStorage: () => StorageAdapter;
|
|
23
|
+
/**
|
|
24
|
+
* @description 프레젠테이션 저장 서비스
|
|
25
|
+
* @Todo vibecode - 편의 메서드들
|
|
26
|
+
*/
|
|
27
|
+
export declare const storageService: {
|
|
28
|
+
/**
|
|
29
|
+
* @description 프레젠테이션 저장
|
|
30
|
+
*/
|
|
31
|
+
save(id: string, title: string, slides: Slide[], thumbnail?: string): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* @description 프레젠테이션 불러오기
|
|
34
|
+
*/
|
|
35
|
+
load(id: string): Promise<SavedPresentation | undefined>;
|
|
36
|
+
/**
|
|
37
|
+
* @description 최근 프레젠테이션 목록
|
|
38
|
+
*/
|
|
39
|
+
getRecent(limit?: number): Promise<SavedPresentation[]>;
|
|
40
|
+
/**
|
|
41
|
+
* @description 프레젠테이션 삭제
|
|
42
|
+
*/
|
|
43
|
+
delete(id: string): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* @description 전체 삭제 (로컬만)
|
|
46
|
+
*/
|
|
47
|
+
clearAll(): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* @description ID 생성
|
|
50
|
+
*/
|
|
51
|
+
generateId(): string;
|
|
52
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Slide } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* @description 저장된 프레젠테이션 데이터
|
|
4
|
+
* @Todo vibecode - 공통 인터페이스
|
|
5
|
+
*/
|
|
6
|
+
export interface SavedPresentation {
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
slides: Slide[];
|
|
10
|
+
thumbnail?: string;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @description 저장소 어댑터 인터페이스
|
|
16
|
+
* @Todo vibecode - 로컬/서버 저장소 추상화
|
|
17
|
+
*/
|
|
18
|
+
export interface StorageAdapter {
|
|
19
|
+
/** 저장 (upsert) */
|
|
20
|
+
save(id: string, title: string, slides: Slide[], thumbnail?: string): Promise<void>;
|
|
21
|
+
/** 불러오기 */
|
|
22
|
+
load(id: string): Promise<SavedPresentation | undefined>;
|
|
23
|
+
/** 최근 목록 */
|
|
24
|
+
getRecent(limit?: number): Promise<SavedPresentation[]>;
|
|
25
|
+
/** 삭제 */
|
|
26
|
+
delete(id: string): Promise<void>;
|
|
27
|
+
/** 전체 삭제 (선택적) */
|
|
28
|
+
clearAll?(): Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @description 서버 저장소 설정
|
|
32
|
+
* @Todo vibecode - 라이브러리 사용자가 제공
|
|
33
|
+
*/
|
|
34
|
+
export interface ServerStorageConfig {
|
|
35
|
+
/** API 기본 URL */
|
|
36
|
+
baseUrl: string;
|
|
37
|
+
/** 인증 헤더 (Bearer token 등) */
|
|
38
|
+
getAuthHeaders?: () => Promise<Record<string, string>> | Record<string, string>;
|
|
39
|
+
/** 커스텀 fetch 함수 (인터셉터 등) */
|
|
40
|
+
customFetch?: typeof fetch;
|
|
41
|
+
}
|
package/dist/main.d.ts
ADDED
|
File without changes
|