@stacksjs/stx 0.2.154 → 0.2.156

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 (240) hide show
  1. package/dist/a11y.d.ts +87 -46
  2. package/dist/animation.d.ts +96 -42
  3. package/dist/appearance-bootstrap.d.ts +49 -15
  4. package/dist/asset-roots.d.ts +32 -0
  5. package/dist/asset-roots.js +7 -0
  6. package/dist/assets.d.ts +9 -7
  7. package/dist/async-components.d.ts +78 -56
  8. package/dist/auth.d.ts +3 -0
  9. package/dist/build-externalize.d.ts +40 -0
  10. package/dist/build-externalize.js +63 -0
  11. package/dist/build-id.d.ts +22 -22
  12. package/dist/build-message.d.ts +73 -2
  13. package/dist/build-message.js +47 -8
  14. package/dist/builtins/attrs.d.ts +14 -0
  15. package/dist/builtins/drawer.d.ts +22 -0
  16. package/dist/builtins/icon.d.ts +16 -2
  17. package/dist/builtins/index.d.ts +5 -15
  18. package/dist/builtins/modal.d.ts +24 -0
  19. package/dist/builtins/safe-image.d.ts +42 -0
  20. package/dist/builtins/stx-image.d.ts +27 -0
  21. package/dist/builtins/stx-link.d.ts +9 -0
  22. package/dist/builtins/stx-loading-indicator.d.ts +11 -0
  23. package/dist/builtins/suspense.d.ts +28 -0
  24. package/dist/builtins/toast.d.ts +17 -0
  25. package/dist/builtins/transition-group.d.ts +25 -0
  26. package/dist/caching.d.ts +12 -15
  27. package/dist/cli.js +1798 -908
  28. package/dist/client/directive.d.ts +7 -0
  29. package/dist/client/index.d.ts +0 -1
  30. package/dist/client-script-bundler.d.ts +63 -5
  31. package/dist/client-script-bundler.js +30 -2
  32. package/dist/client-script.d.ts +102 -47
  33. package/dist/client-script.js +15 -3
  34. package/dist/codemod.d.ts +56 -0
  35. package/dist/codemod.js +192 -0
  36. package/dist/color-mode-boot.d.ts +83 -65
  37. package/dist/component-client-factories.d.ts +1 -6
  38. package/dist/component-processing.d.ts +58 -49
  39. package/dist/component-processing.js +1 -1
  40. package/dist/component-registry.d.ts +94 -31
  41. package/dist/component-renderer.d.ts +18 -0
  42. package/dist/composable-loader.d.ts +24 -0
  43. package/dist/composable-loader.js +12 -9
  44. package/dist/composables/index.d.ts +7 -0
  45. package/dist/composables/index.js +1 -0
  46. package/dist/composables/use-fetch.js +30 -2
  47. package/dist/composables/use-form.d.ts +91 -0
  48. package/dist/composables/use-form.js +112 -0
  49. package/dist/composables.d.ts +64 -60
  50. package/dist/computed.d.ts +86 -92
  51. package/dist/conditionals.d.ts +24 -8
  52. package/dist/conditionals.js +16 -0
  53. package/dist/config.d.ts +34 -21
  54. package/dist/config.js +35 -14
  55. package/dist/craft.js +1476 -768
  56. package/dist/crosswind-config.d.ts +58 -0
  57. package/dist/crosswind-config.js +40 -0
  58. package/dist/csp.d.ts +107 -41
  59. package/dist/defer.d.ts +24 -0
  60. package/dist/dev-server/crosswind.d.ts +35 -26
  61. package/dist/dev-server/crosswind.js +2 -18
  62. package/dist/dev-server/serve-app.js +4 -3
  63. package/dist/dev-server/terminal-colors.d.ts +32 -32
  64. package/dist/directive-api.d.ts +86 -43
  65. package/dist/document-shell.d.ts +54 -41
  66. package/dist/dynamic-components.d.ts +9 -0
  67. package/dist/error-boundaries.d.ts +47 -41
  68. package/dist/error-handling.d.ts +1 -1
  69. package/dist/errors/codes.d.ts +51 -43
  70. package/dist/errors/formatter.d.ts +58 -38
  71. package/dist/errors/index.d.ts +5 -61
  72. package/dist/errors/logger.d.ts +114 -40
  73. package/dist/errors/sanitizer.d.ts +53 -23
  74. package/dist/errors/types.d.ts +44 -31
  75. package/dist/events.d.ts +86 -25
  76. package/dist/expressions.d.ts +50 -42
  77. package/dist/forms-validation.d.ts +138 -123
  78. package/dist/forms-validation.js +1 -90
  79. package/dist/forms.d.ts +120 -66
  80. package/dist/forms.js +31 -11
  81. package/dist/fragment-container.d.ts +57 -0
  82. package/dist/fragment-container.js +109 -0
  83. package/dist/framework-composables.d.ts +32 -0
  84. package/dist/head.d.ts +156 -114
  85. package/dist/heatmap.d.ts +152 -72
  86. package/dist/html-masking.d.ts +40 -34
  87. package/dist/hydration-runtime.d.ts +20 -24
  88. package/dist/i18n.d.ts +93 -32
  89. package/dist/image-optimization/auto-sibling.d.ts +32 -4
  90. package/dist/includes.d.ts +69 -7
  91. package/dist/index.d.ts +66 -0
  92. package/dist/index.js +23 -0
  93. package/dist/internal-markdown.d.ts +12 -8
  94. package/dist/island-chunking.d.ts +30 -13
  95. package/dist/keep-alive.d.ts +72 -52
  96. package/dist/layout-types.d.ts +45 -0
  97. package/dist/layout-types.js +56 -0
  98. package/dist/lazy-module.d.ts +10 -0
  99. package/dist/loops.d.ts +66 -0
  100. package/dist/loops.js +47 -6
  101. package/dist/markdown.d.ts +0 -1
  102. package/dist/media/image/component.d.ts +25 -9
  103. package/dist/media/image/directive.d.ts +15 -1
  104. package/dist/media/image/placeholder.d.ts +20 -9
  105. package/dist/media/image/processor/cache.d.ts +40 -18
  106. package/dist/media/image/processor/index.d.ts +1 -10
  107. package/dist/media/image/processor/optimizer.d.ts +12 -1
  108. package/dist/media/image/processor/responsive.d.ts +16 -6
  109. package/dist/media/image/srcset.d.ts +47 -50
  110. package/dist/media/shared/cache.d.ts +51 -31
  111. package/dist/media/shared/hash.d.ts +7 -0
  112. package/dist/media/types.d.ts +1235 -754
  113. package/dist/media/video/directive.d.ts +15 -1
  114. package/dist/media/video/index.d.ts +39 -17
  115. package/dist/media/video/processor/cache.d.ts +42 -19
  116. package/dist/media/video/processor/index.d.ts +1 -18
  117. package/dist/media/video/processor/streaming.d.ts +17 -10
  118. package/dist/media/video/processor/thumbnail.d.ts +21 -15
  119. package/dist/media/video/processor/transcoder.d.ts +11 -1
  120. package/dist/method-spoofing.d.ts +7 -0
  121. package/dist/middleware.d.ts +60 -0
  122. package/dist/owned-routes.d.ts +42 -0
  123. package/dist/owned-routes.js +26 -0
  124. package/dist/page-meta.d.ts +38 -0
  125. package/dist/page-meta.js +16 -0
  126. package/dist/parser/directive-parser.d.ts +57 -45
  127. package/dist/parser/expression-parser.d.ts +33 -35
  128. package/dist/parser/index.d.ts +4 -39
  129. package/dist/parser/tokenizer.d.ts +61 -49
  130. package/dist/partial-hydration.d.ts +82 -50
  131. package/dist/performance-utils.d.ts +217 -124
  132. package/dist/placeholder.d.ts +18 -9
  133. package/dist/plugin-system.d.ts +264 -115
  134. package/dist/process.d.ts +11 -6
  135. package/dist/process.js +21 -4
  136. package/dist/production-builder.js +7 -0
  137. package/dist/prop-sentinels.d.ts +11 -11
  138. package/dist/public-env.d.ts +14 -0
  139. package/dist/pwa/directives.d.ts +12 -3
  140. package/dist/pwa/inject.d.ts +10 -0
  141. package/dist/pwa/precache.d.ts +22 -16
  142. package/dist/pwa/service-worker.d.ts +12 -0
  143. package/dist/pwa.js +1318 -610
  144. package/dist/reactive-bindings.d.ts +34 -11
  145. package/dist/reactive.d.ts +58 -30
  146. package/dist/reactive.js +56 -31
  147. package/dist/render.js +1 -0
  148. package/dist/route-middleware.d.ts +2 -35
  149. package/dist/route-types.d.ts +134 -0
  150. package/dist/route-types.js +24 -0
  151. package/dist/router.d.ts +5 -7
  152. package/dist/routes.d.ts +1 -3
  153. package/dist/runtime-globals.d.ts +147 -24
  154. package/dist/runtime-globals.js +16 -1
  155. package/dist/runtime-injection.d.ts +8 -0
  156. package/dist/runtime-injection.js +33 -24
  157. package/dist/script-emit.d.ts +30 -0
  158. package/dist/script-json.d.ts +36 -0
  159. package/dist/script-json.js +6 -0
  160. package/dist/script-validation.d.ts +21 -4
  161. package/dist/seo.d.ts +118 -47
  162. package/dist/server-bindings.d.ts +21 -0
  163. package/dist/sfc-template.d.ts +8 -8
  164. package/dist/signal-processing.d.ts +35 -15
  165. package/dist/signals-api.d.ts +117 -58
  166. package/dist/signals-api.js +7 -4
  167. package/dist/signals.d.ts +24 -17
  168. package/dist/signals.js +765 -60
  169. package/dist/site-builder/build.js +8 -0
  170. package/dist/site-url.d.ts +46 -0
  171. package/dist/site-url.js +70 -0
  172. package/dist/slots.d.ts +86 -20
  173. package/dist/source-signature.d.ts +45 -0
  174. package/dist/source-signature.js +20 -0
  175. package/dist/ssg.d.ts +285 -142
  176. package/dist/ssg.js +1268 -556
  177. package/dist/state-dir.d.ts +4 -4
  178. package/dist/state-management.d.ts +0 -12
  179. package/dist/state-management.js +8 -25
  180. package/dist/store-imports.d.ts +23 -0
  181. package/dist/store-imports.js +3 -0
  182. package/dist/store-loader.d.ts +10 -0
  183. package/dist/store-loader.js +10 -9
  184. package/dist/story/analytics.d.ts +138 -60
  185. package/dist/story/bookmarks.d.ts +87 -34
  186. package/dist/story/cli.d.ts +123 -69
  187. package/dist/story/collect/scanner.d.ts +4 -0
  188. package/dist/story/collect/tree.d.ts +8 -1
  189. package/dist/story/commands/build.d.ts +11 -6
  190. package/dist/story/commands/dev.d.ts +15 -8
  191. package/dist/story/commands/preview.d.ts +13 -7
  192. package/dist/story/config-watcher.d.ts +20 -13
  193. package/dist/story/config.d.ts +11 -8
  194. package/dist/story/context.d.ts +14 -8
  195. package/dist/story/hmr.d.ts +24 -26
  196. package/dist/story/hot-swap.d.ts +34 -23
  197. package/dist/story/keyboard-shortcuts.d.ts +23 -18
  198. package/dist/story/output.d.ts +46 -44
  199. package/dist/story/performance.d.ts +107 -45
  200. package/dist/story/presets.d.ts +107 -41
  201. package/dist/story/renderer.d.ts +41 -27
  202. package/dist/story/search.d.ts +23 -12
  203. package/dist/story/server.d.ts +21 -11
  204. package/dist/story/setup.d.ts +23 -15
  205. package/dist/story/testing.d.ts +65 -40
  206. package/dist/story/types.d.ts +262 -160
  207. package/dist/streaming.d.ts +119 -57
  208. package/dist/stx-virtual-ts.d.ts +165 -0
  209. package/dist/stx-virtual-ts.js +372 -0
  210. package/dist/stx.d.ts +78 -1
  211. package/dist/style-scoping.d.ts +17 -4
  212. package/dist/suspense.d.ts +67 -52
  213. package/dist/teleport.d.ts +22 -0
  214. package/dist/template-tag-balance.d.ts +22 -6
  215. package/dist/transitions.d.ts +66 -55
  216. package/dist/typecheck.d.ts +77 -0
  217. package/dist/typecheck.js +156 -0
  218. package/dist/types/component-types.d.ts +187 -122
  219. package/dist/types/config-types.d.ts +758 -297
  220. package/dist/types/context-types.d.ts +46 -24
  221. package/dist/types/csp-types.d.ts +70 -66
  222. package/dist/types/directive-types.d.ts +211 -155
  223. package/dist/types/index.d.ts +6 -109
  224. package/dist/types/pwa-types.d.ts +273 -148
  225. package/dist/types.d.ts +0 -1
  226. package/dist/typescript-templates.d.ts +11 -0
  227. package/dist/unresolved-identifiers.d.ts +24 -22
  228. package/dist/unresolved-identifiers.js +2 -0
  229. package/dist/utils.d.ts +24 -21
  230. package/dist/validator.d.ts +28 -26
  231. package/dist/variable-extractor.d.ts +48 -13
  232. package/dist/variable-extractor.js +27 -4
  233. package/dist/view-composers.d.ts +80 -81
  234. package/dist/virtual-scrolling.d.ts +101 -81
  235. package/dist/vue-template.d.ts +23 -0
  236. package/dist/web-components/css-scoping.d.ts +21 -11
  237. package/dist/web-components.d.ts +81 -58
  238. package/dist/x-element.d.ts +0 -1
  239. package/package.json +5 -5
  240. package/stx.d.ts +78 -1
@@ -1,58 +1,83 @@
1
- import type { StoryContext } from './types';
2
- /**
3
- * Run visual regression tests
4
- */
5
- export declare function runVisualTests(ctx: StoryContext, options?: TestOptions): Promise<TestResult>;
6
- /**
7
- * Update all snapshots
8
- */
9
- export declare function updateSnapshots(ctx: StoryContext, options?: TestOptions): Promise<number>;
10
- /**
11
- * Format test results for console output
12
- */
13
- export declare function formatTestResults(result: TestResult): string;
14
1
  /**
15
- * Run accessibility tests on stories
2
+ * STX Story - Visual Regression Testing
3
+ * Snapshot-based testing for component renders
16
4
  */
17
- export declare function runA11yTests(ctx: StoryContext, _options?: TestOptions): Promise<TestResult>;
5
+ import type { StoryContext } from './types';
18
6
  /**
19
7
  * Test options
20
8
  */
21
- export declare interface TestOptions {
22
- update?: boolean
23
- filter?: string[]
24
- threshold?: number
25
- snapshotDir?: string
9
+ export interface TestOptions {
10
+ /** Update snapshots instead of comparing */
11
+ update?: boolean;
12
+ /** Only test specific components */
13
+ filter?: string[];
14
+ /** Threshold for pixel difference (0-1) */
15
+ threshold?: number;
16
+ /** Directory to store snapshots */
17
+ snapshotDir?: string;
26
18
  }
27
19
  /**
28
20
  * Test result
29
21
  */
30
- export declare interface TestResult {
31
- total: number
32
- passed: number
33
- failed: number
34
- new: number
35
- failures: TestFailure[]
36
- duration: number
22
+ export interface TestResult {
23
+ /** Total number of tests */
24
+ total: number;
25
+ /** Number of passed tests */
26
+ passed: number;
27
+ /** Number of failed tests */
28
+ failed: number;
29
+ /** Number of new snapshots */
30
+ new: number;
31
+ /** Test failures */
32
+ failures: TestFailure[];
33
+ /** Duration in milliseconds */
34
+ duration: number;
37
35
  }
38
36
  /**
39
37
  * Test failure details
40
38
  */
41
- export declare interface TestFailure {
42
- storyId: string
43
- variantId: string
44
- component: string
45
- message: string
46
- diffPath?: string
47
- difference?: number
39
+ export interface TestFailure {
40
+ /** Story ID */
41
+ storyId: string;
42
+ /** Variant ID */
43
+ variantId: string;
44
+ /** Component name */
45
+ component: string;
46
+ /** Error message */
47
+ message: string;
48
+ /** Path to diff image (if applicable) */
49
+ diffPath?: string;
50
+ /** Difference percentage */
51
+ difference?: number;
48
52
  }
49
53
  /**
50
54
  * Snapshot metadata
51
55
  */
52
- export declare interface SnapshotMeta {
53
- storyId: string
54
- variantId: string
55
- component: string
56
- timestamp: number
57
- hash: string
56
+ export interface SnapshotMeta {
57
+ /** Story ID */
58
+ storyId: string;
59
+ /** Variant ID */
60
+ variantId: string;
61
+ /** Component name */
62
+ component: string;
63
+ /** Timestamp of snapshot creation */
64
+ timestamp: number;
65
+ /** Hash of the rendered content */
66
+ hash: string;
58
67
  }
68
+ /**
69
+ * Run visual regression tests
70
+ */
71
+ export declare function runVisualTests(ctx: StoryContext, options?: TestOptions): Promise<TestResult>;
72
+ /**
73
+ * Update all snapshots
74
+ */
75
+ export declare function updateSnapshots(ctx: StoryContext, options?: TestOptions): Promise<number>;
76
+ /**
77
+ * Format test results for console output
78
+ */
79
+ export declare function formatTestResults(result: TestResult): string;
80
+ /**
81
+ * Run accessibility tests on stories
82
+ */
83
+ export declare function runA11yTests(ctx: StoryContext, _options?: TestOptions): Promise<TestResult>;
@@ -1,240 +1,342 @@
1
+ /**
2
+ * STX Story - Component showcase and testing
3
+ * Type definitions for the story feature
4
+ */
1
5
  /**
2
6
  * Tree group configuration for organizing stories
3
7
  */
4
- export declare interface TreeGroupConfig {
5
- title: string
6
- id?: string
7
- include?: (file: StoryTreeFile) => boolean
8
+ export interface TreeGroupConfig {
9
+ /** Display title for the group */
10
+ title: string;
11
+ /** Unique identifier for the group */
12
+ id?: string;
13
+ /** Function to determine if a file belongs to this group */
14
+ include?: (file: StoryTreeFile) => boolean;
8
15
  }
9
16
  /**
10
17
  * Responsive viewport preset
11
18
  */
12
- export declare interface ResponsivePreset {
13
- label: string
14
- width: number
15
- height?: number
19
+ export interface ResponsivePreset {
20
+ /** Display label */
21
+ label: string;
22
+ /** Viewport width in pixels */
23
+ width: number;
24
+ /** Viewport height in pixels (optional) */
25
+ height?: number;
16
26
  }
17
27
  /**
18
28
  * Background preset for story canvas
19
29
  */
20
- export declare interface BackgroundPreset {
21
- label: string
22
- color: string
23
- contrastColor?: string
30
+ export interface BackgroundPreset {
31
+ /** Display label */
32
+ label: string;
33
+ /** Background color (CSS value) */
34
+ color: string;
35
+ /** Contrast color for text (optional) */
36
+ contrastColor?: string;
24
37
  }
25
38
  /**
26
39
  * Story theme configuration
27
40
  */
28
- export declare interface StoryThemeConfig {
29
- title?: string
30
- logo?: {
31
- square?: string
32
- light?: string
33
- dark?: string
34
- }
35
- favicon?: string
36
- colors?: {
37
- primary?: Record<string, string>
38
- gray?: Record<string, string>
39
- }
40
- defaultColorScheme?: 'light' | 'dark' | 'auto'
41
- hideColorSchemeSwitch?: boolean
42
- darkClass?: string
41
+ export interface StoryThemeConfig {
42
+ /** Title displayed in the story UI */
43
+ title?: string;
44
+ /** Logo configuration */
45
+ logo?: {
46
+ /** Square logo (for favicon/small displays) */
47
+ square?: string;
48
+ /** Light theme logo */
49
+ light?: string;
50
+ /** Dark theme logo */
51
+ dark?: string;
52
+ };
53
+ /** Favicon path */
54
+ favicon?: string;
55
+ /** Custom colors */
56
+ colors?: {
57
+ /** Primary accent color shades */
58
+ primary?: Record<string, string>;
59
+ /** Gray color shades */
60
+ gray?: Record<string, string>;
61
+ };
62
+ /** Default color scheme */
63
+ defaultColorScheme?: 'light' | 'dark' | 'auto';
64
+ /** Hide the color scheme toggle */
65
+ hideColorSchemeSwitch?: boolean;
66
+ /** CSS class to apply for dark mode */
67
+ darkClass?: string;
43
68
  }
44
69
  /**
45
70
  * Story tree configuration
46
71
  */
47
- export declare interface StoryTreeConfig {
48
- file?: 'title' | 'path' | ((file: StoryTreeFile) => string[])
49
- order?: 'asc' | ((a: string, b: string) => number)
50
- groups?: TreeGroupConfig[]
72
+ export interface StoryTreeConfig {
73
+ /** How to generate tree paths from files */
74
+ file?: 'title' | 'path' | ((file: StoryTreeFile) => string[]);
75
+ /** Sort order for tree items */
76
+ order?: 'asc' | ((a: string, b: string) => number);
77
+ /** Group configurations */
78
+ groups?: TreeGroupConfig[];
51
79
  }
52
80
  /**
53
81
  * Story configuration (part of StxConfig)
54
82
  */
55
- export declare interface StoryConfig {
56
- enabled?: boolean
57
- outDir?: string
58
- storyMatch?: string[]
59
- storyIgnored?: string[]
60
- tree?: StoryTreeConfig
61
- theme?: StoryThemeConfig
62
- responsivePresets?: ResponsivePreset[]
63
- backgroundPresets?: BackgroundPreset[]
64
- autoApplyContrastColor?: boolean
65
- setupFile?: string
66
- port?: number
67
- autoPropsDisabled?: boolean
83
+ export interface StoryConfig {
84
+ /** Enable the story feature */
85
+ enabled?: boolean;
86
+ /** Output directory for built story site */
87
+ outDir?: string;
88
+ /** Glob patterns to match story files */
89
+ storyMatch?: string[];
90
+ /** Glob patterns to ignore */
91
+ storyIgnored?: string[];
92
+ /** Tree organization configuration */
93
+ tree?: StoryTreeConfig;
94
+ /** Theme configuration */
95
+ theme?: StoryThemeConfig;
96
+ /** Responsive viewport presets */
97
+ responsivePresets?: ResponsivePreset[];
98
+ /** Background presets */
99
+ backgroundPresets?: BackgroundPreset[];
100
+ /** Auto-apply contrast color to text */
101
+ autoApplyContrastColor?: boolean;
102
+ /** Path to setup file for global configuration */
103
+ setupFile?: string;
104
+ /** Default server port */
105
+ port?: number;
106
+ /** Disable auto-generated props controls globally */
107
+ autoPropsDisabled?: boolean;
68
108
  }
69
109
  /**
70
110
  * File information for tree configuration
71
111
  */
72
- export declare interface StoryTreeFile {
73
- title: string
74
- path: string
112
+ export interface StoryTreeFile {
113
+ /** Story title */
114
+ title: string;
115
+ /** File path */
116
+ path: string;
75
117
  }
76
118
  /**
77
119
  * Server-side story file representation
78
120
  */
79
- export declare interface ServerStoryFile {
80
- id: string
81
- path: string
82
- relativePath: string
83
- fileName: string
84
- treePath?: string[]
85
- treeFile?: StoryTreeFile
86
- story?: ServerStory
121
+ export interface ServerStoryFile {
122
+ /** Unique identifier */
123
+ id: string;
124
+ /** Absolute file path */
125
+ path: string;
126
+ /** Relative file path */
127
+ relativePath: string;
128
+ /** File name without extension */
129
+ fileName: string;
130
+ /** Generated tree path */
131
+ treePath?: string[];
132
+ /** Tree file data for config functions */
133
+ treeFile?: StoryTreeFile;
134
+ /** Parsed story data */
135
+ story?: ServerStory;
87
136
  }
137
+ /**
138
+ * Story layout configuration
139
+ */
140
+ export type StoryLayout = {
141
+ type: 'single';
142
+ iframe?: boolean;
143
+ } | {
144
+ type: 'grid';
145
+ width?: number | string;
146
+ };
88
147
  /**
89
148
  * Server-side story representation
90
149
  */
91
- export declare interface ServerStory {
92
- id: string
93
- title: string
94
- group?: string
95
- variants: ServerVariant[]
96
- layout?: StoryLayout
97
- icon?: string
98
- iconColor?: string
99
- docsOnly?: boolean
100
- autoPropsDisabled?: boolean
150
+ export interface ServerStory {
151
+ /** Unique identifier */
152
+ id: string;
153
+ /** Story title */
154
+ title: string;
155
+ /** Group this story belongs to */
156
+ group?: string;
157
+ /** Story variants */
158
+ variants: ServerVariant[];
159
+ /** Layout configuration */
160
+ layout?: StoryLayout;
161
+ /** Icon name (iconify format) */
162
+ icon?: string;
163
+ /** Icon color */
164
+ iconColor?: string;
165
+ /** Show only in docs, not in canvas */
166
+ docsOnly?: boolean;
167
+ /** Disable auto-generated props controls for this story */
168
+ autoPropsDisabled?: boolean;
101
169
  }
102
170
  /**
103
171
  * Server-side variant representation
104
172
  */
105
- export declare interface ServerVariant {
106
- id: string
107
- title: string
108
- icon?: string
109
- iconColor?: string
110
- state?: Record<string, any>
111
- source?: string
112
- responsiveDisabled?: boolean
173
+ export interface ServerVariant {
174
+ /** Unique identifier */
175
+ id: string;
176
+ /** Variant title */
177
+ title: string;
178
+ /** Icon name */
179
+ icon?: string;
180
+ /** Icon color */
181
+ iconColor?: string;
182
+ /** Initial state for controls */
183
+ state?: Record<string, any>;
184
+ /** Source code for display */
185
+ source?: string;
186
+ /** Disable responsive controls */
187
+ responsiveDisabled?: boolean;
113
188
  }
114
189
  /**
115
190
  * Tree leaf node (story)
116
191
  */
117
- export declare interface ServerTreeLeaf {
118
- title: string
119
- index: number
192
+ export interface ServerTreeLeaf {
193
+ /** Display title */
194
+ title: string;
195
+ /** Index in story files array */
196
+ index: number;
120
197
  }
121
198
  /**
122
199
  * Tree folder node
123
200
  */
124
- export declare interface ServerTreeFolder {
125
- title: string
126
- children: ServerTreeNode[]
201
+ export interface ServerTreeFolder {
202
+ /** Display title */
203
+ title: string;
204
+ /** Child nodes */
205
+ children: ServerTreeNode[];
127
206
  }
128
207
  /**
129
208
  * Tree group node
130
209
  */
131
- export declare interface ServerTreeGroup {
132
- group: true
133
- id: string
134
- title: string
135
- children: ServerTreeNode[]
210
+ export interface ServerTreeGroup {
211
+ /** Indicates this is a group */
212
+ group: true;
213
+ /** Group identifier */
214
+ id: string;
215
+ /** Display title */
216
+ title: string;
217
+ /** Child nodes */
218
+ children: ServerTreeNode[];
136
219
  }
220
+ /**
221
+ * Any tree node type
222
+ */
223
+ export type ServerTreeNode = ServerTreeGroup | ServerTreeFolder | ServerTreeLeaf;
224
+ /**
225
+ * Complete server tree
226
+ */
227
+ export type ServerTree = ServerTreeNode[];
137
228
  /**
138
229
  * Analyzed component prop for story
139
230
  */
140
- export declare interface StoryAnalyzedProp {
141
- name: string
142
- type: string
143
- required: boolean
144
- default?: any
145
- description?: string
146
- options?: any[]
231
+ export interface StoryAnalyzedProp {
232
+ /** Prop name */
233
+ name: string;
234
+ /** Inferred or declared type */
235
+ type: string;
236
+ /** Whether the prop is required */
237
+ required: boolean;
238
+ /** Default value if any */
239
+ default?: any;
240
+ /** Description from JSDoc */
241
+ description?: string;
242
+ /** Options for enum/select types */
243
+ options?: any[];
147
244
  }
148
245
  /**
149
246
  * Analyzed component slot
150
247
  */
151
- export declare interface AnalyzedSlot {
152
- name: string
153
- description?: string
248
+ export interface AnalyzedSlot {
249
+ /** Slot name ('default' for main slot) */
250
+ name: string;
251
+ /** Description from comments */
252
+ description?: string;
154
253
  }
155
254
  /**
156
255
  * Directive usage in a component
157
256
  */
158
- export declare interface DirectiveUsage {
159
- name: string
160
- count: number
257
+ export interface DirectiveUsage {
258
+ /** Directive name (e.g., 'if', 'foreach', 'component') */
259
+ name: string;
260
+ /** Number of times used */
261
+ count: number;
161
262
  }
162
263
  /**
163
264
  * Analyzed component metadata
164
265
  */
165
- export declare interface AnalyzedComponent {
166
- name: string
167
- path: string
168
- description?: string
169
- props: StoryAnalyzedProp[]
170
- slots: AnalyzedSlot[]
171
- dependencies: string[]
172
- cssClasses: string[]
173
- directives?: DirectiveUsage[]
174
- category?: string
175
- tags?: string[]
266
+ export interface AnalyzedComponent {
267
+ /** Component name */
268
+ name: string;
269
+ /** File path */
270
+ path: string;
271
+ /** Component description */
272
+ description?: string;
273
+ /** Analyzed props */
274
+ props: StoryAnalyzedProp[];
275
+ /** Analyzed slots */
276
+ slots: AnalyzedSlot[];
277
+ /** Component dependencies (other components used) */
278
+ dependencies: string[];
279
+ /** CSS classes used (for Crosswind) */
280
+ cssClasses: string[];
281
+ /** Directives used in the component */
282
+ directives?: DirectiveUsage[];
283
+ /** Category/group */
284
+ category?: string;
285
+ /** Tags for filtering */
286
+ tags?: string[];
176
287
  }
288
+ /**
289
+ * Control type for prop editing
290
+ */
291
+ export type ControlType = 'text' | 'number' | 'boolean' | 'select' | 'radio' | 'color' | 'date' | 'json' | 'textarea' | 'slider' | 'buttongroup';
177
292
  /**
178
293
  * Control configuration
179
294
  */
180
- export declare interface ControlConfig {
181
- type: ControlType
182
- title?: string
183
- options?: { value: any, label: string }[] | string[] | Record<string, string>
184
- min?: number
185
- max?: number
186
- step?: number
295
+ export interface ControlConfig {
296
+ /** Control type */
297
+ type: ControlType;
298
+ /** Display title */
299
+ title?: string;
300
+ /** Options for select/radio */
301
+ options?: {
302
+ value: any;
303
+ label: string;
304
+ }[] | string[] | Record<string, string>;
305
+ /** Min value for number/slider */
306
+ min?: number;
307
+ /** Max value for number/slider */
308
+ max?: number;
309
+ /** Step for number/slider */
310
+ step?: number;
187
311
  }
188
312
  /**
189
313
  * Story context for server operations
190
314
  */
191
- export declare interface StoryContext {
192
- root: string
193
- config: ResolvedStoryConfig
194
- storyFiles: ServerStoryFile[]
195
- tree?: ServerTree
196
- mode: 'dev' | 'build'
315
+ export interface StoryContext {
316
+ /** Root directory */
317
+ root: string;
318
+ /** Resolved configuration */
319
+ config: ResolvedStoryConfig;
320
+ /** Discovered story files */
321
+ storyFiles: ServerStoryFile[];
322
+ /** Built tree structure */
323
+ tree?: ServerTree;
324
+ /** Mode (dev or build) */
325
+ mode: 'dev' | 'build';
197
326
  }
198
327
  /**
199
328
  * Resolved story configuration with all defaults applied
200
329
  */
201
- export declare interface ResolvedStoryConfig {
202
- enabled: boolean
203
- outDir: string
204
- storyMatch: string[]
205
- storyIgnored: string[]
206
- tree: Required<StoryTreeConfig>
207
- theme: StoryThemeConfig
208
- responsivePresets: ResponsivePreset[]
209
- backgroundPresets: BackgroundPreset[]
210
- autoApplyContrastColor: boolean
211
- setupFile?: string
212
- port: number
330
+ export interface ResolvedStoryConfig {
331
+ enabled: boolean;
332
+ outDir: string;
333
+ storyMatch: string[];
334
+ storyIgnored: string[];
335
+ tree: Required<StoryTreeConfig>;
336
+ theme: StoryThemeConfig;
337
+ responsivePresets: ResponsivePreset[];
338
+ backgroundPresets: BackgroundPreset[];
339
+ autoApplyContrastColor: boolean;
340
+ setupFile?: string;
341
+ port: number;
213
342
  }
214
- /**
215
- * Story layout configuration
216
- */
217
- export type StoryLayout = | { type: 'single', iframe?: boolean }
218
- | { type: 'grid', width?: number | string }
219
- /**
220
- * Any tree node type
221
- */
222
- export type ServerTreeNode = ServerTreeGroup | ServerTreeFolder | ServerTreeLeaf;
223
- /**
224
- * Complete server tree
225
- */
226
- export type ServerTree = ServerTreeNode[];
227
- /**
228
- * Control type for prop editing
229
- */
230
- export type ControlType = | 'text'
231
- | 'number'
232
- | 'boolean'
233
- | 'select'
234
- | 'radio'
235
- | 'color'
236
- | 'date'
237
- | 'json'
238
- | 'textarea'
239
- | 'slider'
240
- | 'buttongroup';