dsh-image-gen 0.6.7 → 0.6.8

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.
Files changed (40) hide show
  1. package/README.en.md +387 -375
  2. package/README.md +387 -375
  3. package/README.zh-CN.md +3 -3
  4. package/docs/assets/readme/chat-generate.webp +0 -0
  5. package/docs/assets/readme/other-features.webp +0 -0
  6. package/lib/client.js +146 -37
  7. package/lib/client.js.map +1 -1
  8. package/lib/index.js +200 -37
  9. package/lib/types/client/conversation-image-revisions.d.ts +2 -2
  10. package/lib/types/client/gallery-view.d.ts +4 -0
  11. package/lib/types/client/multi-model-compare.d.ts +3 -3
  12. package/lib/types/client/provider-pill.d.ts +1 -1
  13. package/lib/types/client/studio-chat-panel.d.ts +23 -0
  14. package/lib/types/client/studio-view.d.ts +4 -0
  15. package/lib/types/client/tl/diagram-landing.d.ts +75 -0
  16. package/lib/types/client/tl/diagram-layout.d.ts +76 -0
  17. package/lib/types/client/tl/diagram-measure.d.ts +40 -0
  18. package/lib/types/diagram.d.ts +42 -0
  19. package/lib/types/shared.d.ts +16 -4
  20. package/lib/types/studio-chat.d.ts +48 -0
  21. package/lib/types/studio.d.ts +3 -2
  22. package/lib/types/subscription/manager.d.ts +15 -0
  23. package/lib/types/subscription/vendors/antigravity.d.ts +10 -1
  24. package/lib/types/subscription/vendors/codex.d.ts +2 -0
  25. package/lib/types/subscription/vendors/grok.d.ts +2 -0
  26. package/lib/types/subscription.d.ts +7 -5
  27. package/package.json +10 -8
  28. package/skills/install-dsh-image-gen/SKILL.md +22 -22
  29. package/lib/types/client/inspiration-api.d.ts +0 -10
  30. package/lib/types/client/inspiration-detail.d.ts +0 -14
  31. package/lib/types/client/tldraw/generated/tldraw-assets.d.ts +0 -12
  32. package/lib/types/client/tldraw/generated/tldraw-css.d.ts +0 -1
  33. package/lib/types/client/tldraw/tldraw-style.d.ts +0 -1
  34. package/lib/types/client/tldraw/tldraw-workspace.d.ts +0 -1
  35. package/lib/types/inspiration/cache.d.ts +0 -20
  36. package/lib/types/inspiration/downloader.d.ts +0 -27
  37. package/lib/types/inspiration/routes.d.ts +0 -13
  38. package/lib/types/inspiration/sources.d.ts +0 -33
  39. package/lib/types/inspiration/types.d.ts +0 -65
  40. package/lib/types/inspiration/updater.d.ts +0 -7
@@ -1,33 +0,0 @@
1
- import type { PromptCase, PromptSource } from './types.js';
2
- /**
3
- * Find the path to the inspiration snapshots folder.
4
- * Supports both development (src/) and built distribution (root / lib).
5
- */
6
- export declare function getSnapshotsDir(): string;
7
- /**
8
- * Load built-in prompt sources from packaged JSON snapshots.
9
- */
10
- export declare function loadBuiltinSources(): PromptSource[];
11
- /**
12
- * Clear cached sources to allow reloading upon update.
13
- */
14
- export declare function invalidateSourcesCache(): void;
15
- /**
16
- * Get a specific prompt source by ID.
17
- */
18
- export declare function getPromptSource(sourceId: string): PromptSource | undefined;
19
- /**
20
- * Find a specific case within a source.
21
- */
22
- export declare function getPromptCase(sourceId: string, caseId: string): {
23
- source: PromptSource;
24
- promptCase: PromptCase;
25
- } | undefined;
26
- /**
27
- * Resolve candidate URLs for downloading an inspiration case's image.
28
- * Uses a prioritized multi-tier fallback:
29
- * 1. Fast, reliable global CDN (fastly.jsdelivr.net) - free, doesn't load author's server
30
- * 2. Canghe.ai official website static origin (fast in mainland China)
31
- * 3. GitHub raw official fallback
32
- */
33
- export declare function resolveCaseImageCandidateUrls(source: PromptSource, promptCase: PromptCase): string[];
@@ -1,65 +0,0 @@
1
- /**
2
- * Type definitions and contracts for the Prompt Library / Inspiration system.
3
- */
4
- export interface PromptCase {
5
- /** Unique case ID within the source (e.g. "544" or "case-544") */
6
- id: string;
7
- /** Human-readable title */
8
- title: string;
9
- /** The full prompt text to be reused */
10
- prompt: string;
11
- /** Image identifier or path (e.g. "/images/case544.jpg" or "case544.jpg") */
12
- image?: string | undefined;
13
- /** Primary category (e.g. "UI & Interfaces", "Products & E-commerce") */
14
- category?: string | undefined;
15
- /** Visual styles (e.g. ["UI", "Poster", "Realistic"]) */
16
- styles?: string[] | undefined;
17
- /** Application scenarios (e.g. ["Tech", "Commerce"]) */
18
- scenes?: string[] | undefined;
19
- /** Original creator or source platform display name */
20
- sourceLabel?: string | undefined;
21
- /** Link to original social post or source article */
22
- sourceUrl?: string | undefined;
23
- /** Original author name if known */
24
- author?: string | undefined;
25
- /** Author homepage or profile */
26
- authorUrl?: string | undefined;
27
- /** License name if explicitly declared */
28
- license?: string | undefined;
29
- /** License URL if explicitly declared */
30
- licenseUrl?: string | undefined;
31
- /** Recommended model hint if available */
32
- modelHint?: string | undefined;
33
- /** Whether the case is marked as featured / staff pick */
34
- featured?: boolean | undefined;
35
- /** Direct link back to upstream repository documentation */
36
- githubUrl?: string | undefined;
37
- }
38
- export interface PromptSource {
39
- id: string;
40
- name: string;
41
- homepage?: string | undefined;
42
- version: string;
43
- schemaVersion: number;
44
- /** Domain whitelist allowed for fetching images for this source */
45
- allowedDomains: string[];
46
- /** Array of prompt cases */
47
- cases: PromptCase[];
48
- /** Available categories extracted from cases */
49
- categories?: string[] | undefined;
50
- /** Available styles extracted from cases */
51
- styles?: string[] | undefined;
52
- /** Available scenes extracted from cases */
53
- scenes?: string[] | undefined;
54
- }
55
- export interface InspirationManifest {
56
- schemaVersion: number;
57
- sourceVersion: string;
58
- updatedAt: string;
59
- sha256: string;
60
- totalCases: number;
61
- }
62
- export interface InspirationCasesResponse {
63
- sources: PromptSource[];
64
- activeSourceId: string;
65
- }
@@ -1,7 +0,0 @@
1
- export interface UpdateCheckResult {
2
- updated: boolean;
3
- currentCount: number;
4
- newCount?: number;
5
- message: string;
6
- }
7
- export declare function checkAndApplyInspirationUpdate(): Promise<UpdateCheckResult>;