storybook-onbook-plugin 0.1.0 → 0.2.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.
Files changed (95) hide show
  1. package/README.md +20 -0
  2. package/dist/cli/generate-screenshots.d.ts +3 -0
  3. package/dist/cli/generate-screenshots.d.ts.map +1 -0
  4. package/dist/cli/generate-screenshots.js +169 -0
  5. package/dist/handlers/handleStoryFileChange/handleStoryFileChange.d.ts.map +1 -0
  6. package/dist/{onlook-plugin/handlers → handlers}/handleStoryFileChange/handleStoryFileChange.js +3 -3
  7. package/dist/handlers/handleStoryFileChange/index.d.ts +2 -0
  8. package/dist/handlers/handleStoryFileChange/index.d.ts.map +1 -0
  9. package/dist/handlers/handleStoryFileChange/index.js +1 -0
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/screenshot-service/constants.d.ts.map +1 -0
  14. package/dist/screenshot-service/index.d.ts +5 -0
  15. package/dist/screenshot-service/index.d.ts.map +1 -0
  16. package/dist/screenshot-service/index.js +5 -0
  17. package/dist/screenshot-service/screenshot-service.d.ts.map +1 -0
  18. package/dist/{onlook-plugin/screenshot-service → screenshot-service}/screenshot-service.js +4 -4
  19. package/dist/screenshot-service/types.d.ts.map +1 -0
  20. package/dist/screenshot-service/utils/browser/browser.d.ts.map +1 -0
  21. package/dist/screenshot-service/utils/browser/index.d.ts +2 -0
  22. package/dist/screenshot-service/utils/browser/index.d.ts.map +1 -0
  23. package/dist/screenshot-service/utils/browser/index.js +1 -0
  24. package/dist/screenshot-service/utils/screenshot/index.d.ts +2 -0
  25. package/dist/screenshot-service/utils/screenshot/index.d.ts.map +1 -0
  26. package/dist/{onlook-plugin/screenshot-service → screenshot-service}/utils/screenshot/index.js +1 -1
  27. package/dist/{onlook-plugin/screenshot-service → screenshot-service}/utils/screenshot/screenshot.d.ts +1 -1
  28. package/dist/screenshot-service/utils/screenshot/screenshot.d.ts.map +1 -0
  29. package/dist/{onlook-plugin/screenshot-service → screenshot-service}/utils/screenshot/screenshot.js +3 -3
  30. package/dist/storybook-onlook-plugin.d.ts.map +1 -0
  31. package/dist/{onlook-plugin/storybook-onlook-plugin.js → storybook-onlook-plugin.js} +5 -8
  32. package/dist/utils/fileSystem/fileSystem.d.ts.map +1 -0
  33. package/dist/{onlook-plugin/utils → utils}/fileSystem/fileSystem.js +1 -1
  34. package/dist/{onlook-plugin/utils → utils}/fileSystem/index.d.ts +1 -1
  35. package/dist/utils/fileSystem/index.d.ts.map +1 -0
  36. package/dist/{onlook-plugin/utils → utils}/fileSystem/index.js +1 -1
  37. package/dist/utils/findGitRoot/findGitRoot.d.ts.map +1 -0
  38. package/dist/utils/findGitRoot/index.d.ts +2 -0
  39. package/dist/utils/findGitRoot/index.d.ts.map +1 -0
  40. package/dist/utils/findGitRoot/index.js +1 -0
  41. package/dist/utils/manifest/index.d.ts +2 -0
  42. package/dist/utils/manifest/index.d.ts.map +1 -0
  43. package/dist/{onlook-plugin/utils → utils}/manifest/index.js +1 -1
  44. package/dist/{onlook-plugin/utils → utils}/manifest/manifest.d.ts +1 -1
  45. package/dist/utils/manifest/manifest.d.ts.map +1 -0
  46. package/dist/{onlook-plugin/utils → utils}/manifest/manifest.js +2 -2
  47. package/package.json +12 -1
  48. package/dist/component-loc/component-loc.d.ts +0 -7
  49. package/dist/component-loc/component-loc.d.ts.map +0 -1
  50. package/dist/component-loc/component-loc.js +0 -58
  51. package/dist/component-loc/index.d.ts +0 -2
  52. package/dist/component-loc/index.d.ts.map +0 -1
  53. package/dist/component-loc/index.js +0 -1
  54. package/dist/onlook-plugin/handlers/handleStoryFileChange/handleStoryFileChange.d.ts.map +0 -1
  55. package/dist/onlook-plugin/handlers/handleStoryFileChange/index.d.ts +0 -2
  56. package/dist/onlook-plugin/handlers/handleStoryFileChange/index.d.ts.map +0 -1
  57. package/dist/onlook-plugin/handlers/handleStoryFileChange/index.js +0 -1
  58. package/dist/onlook-plugin/index.d.ts +0 -2
  59. package/dist/onlook-plugin/index.d.ts.map +0 -1
  60. package/dist/onlook-plugin/index.js +0 -1
  61. package/dist/onlook-plugin/screenshot-service/constants.d.ts.map +0 -1
  62. package/dist/onlook-plugin/screenshot-service/index.d.ts +0 -5
  63. package/dist/onlook-plugin/screenshot-service/index.d.ts.map +0 -1
  64. package/dist/onlook-plugin/screenshot-service/index.js +0 -5
  65. package/dist/onlook-plugin/screenshot-service/screenshot-service.d.ts.map +0 -1
  66. package/dist/onlook-plugin/screenshot-service/types.d.ts.map +0 -1
  67. package/dist/onlook-plugin/screenshot-service/utils/browser/browser.d.ts.map +0 -1
  68. package/dist/onlook-plugin/screenshot-service/utils/browser/index.d.ts +0 -2
  69. package/dist/onlook-plugin/screenshot-service/utils/browser/index.d.ts.map +0 -1
  70. package/dist/onlook-plugin/screenshot-service/utils/browser/index.js +0 -1
  71. package/dist/onlook-plugin/screenshot-service/utils/screenshot/index.d.ts +0 -2
  72. package/dist/onlook-plugin/screenshot-service/utils/screenshot/index.d.ts.map +0 -1
  73. package/dist/onlook-plugin/screenshot-service/utils/screenshot/screenshot.d.ts.map +0 -1
  74. package/dist/onlook-plugin/storybook-onlook-plugin.d.ts.map +0 -1
  75. package/dist/onlook-plugin/utils/fileSystem/fileSystem.d.ts.map +0 -1
  76. package/dist/onlook-plugin/utils/fileSystem/index.d.ts.map +0 -1
  77. package/dist/onlook-plugin/utils/findGitRoot/findGitRoot.d.ts.map +0 -1
  78. package/dist/onlook-plugin/utils/findGitRoot/index.d.ts +0 -2
  79. package/dist/onlook-plugin/utils/findGitRoot/index.d.ts.map +0 -1
  80. package/dist/onlook-plugin/utils/findGitRoot/index.js +0 -1
  81. package/dist/onlook-plugin/utils/manifest/index.d.ts +0 -2
  82. package/dist/onlook-plugin/utils/manifest/index.d.ts.map +0 -1
  83. package/dist/onlook-plugin/utils/manifest/manifest.d.ts.map +0 -1
  84. /package/dist/{onlook-plugin/handlers → handlers}/handleStoryFileChange/handleStoryFileChange.d.ts +0 -0
  85. /package/dist/{onlook-plugin/screenshot-service → screenshot-service}/constants.d.ts +0 -0
  86. /package/dist/{onlook-plugin/screenshot-service → screenshot-service}/constants.js +0 -0
  87. /package/dist/{onlook-plugin/screenshot-service → screenshot-service}/screenshot-service.d.ts +0 -0
  88. /package/dist/{onlook-plugin/screenshot-service → screenshot-service}/types.d.ts +0 -0
  89. /package/dist/{onlook-plugin/screenshot-service → screenshot-service}/types.js +0 -0
  90. /package/dist/{onlook-plugin/screenshot-service → screenshot-service}/utils/browser/browser.d.ts +0 -0
  91. /package/dist/{onlook-plugin/screenshot-service → screenshot-service}/utils/browser/browser.js +0 -0
  92. /package/dist/{onlook-plugin/storybook-onlook-plugin.d.ts → storybook-onlook-plugin.d.ts} +0 -0
  93. /package/dist/{onlook-plugin/utils → utils}/fileSystem/fileSystem.d.ts +0 -0
  94. /package/dist/{onlook-plugin/utils → utils}/findGitRoot/findGitRoot.d.ts +0 -0
  95. /package/dist/{onlook-plugin/utils → utils}/findGitRoot/findGitRoot.js +0 -0
package/README.md CHANGED
@@ -55,6 +55,26 @@ storybookOnlookPlugin({
55
55
  });
56
56
  ```
57
57
 
58
+ ## CLI
59
+
60
+ Generate screenshots for all stories:
61
+
62
+ ```bash
63
+ # With Storybook already running
64
+ npx generate-screenshots
65
+
66
+ # Start Storybook automatically
67
+ npx generate-screenshots --start
68
+
69
+ # Custom Storybook URL
70
+ npx generate-screenshots --url http://localhost:9009
71
+
72
+ # Custom start command
73
+ npx generate-screenshots --start --cmd "bun run storybook"
74
+ ```
75
+
76
+ Screenshots are saved to `.storybook-cache/screenshots/`.
77
+
58
78
  ## CI/Chromatic
59
79
 
60
80
  The plugin auto-disables when `CHROMATIC` or `CI` environment variables are set.
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=generate-screenshots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-screenshots.d.ts","sourceRoot":"","sources":["../../src/cli/generate-screenshots.ts"],"names":[],"mappings":""}
@@ -0,0 +1,169 @@
1
+ #!/usr/bin/env node
2
+ import { spawn } from 'node:child_process';
3
+ import { generateAllScreenshots } from '../screenshot-service/index.js';
4
+ import { getBrowser } from '../screenshot-service/utils/browser/index.js';
5
+ function parseArgs() {
6
+ const args = process.argv.slice(2);
7
+ const options = {
8
+ url: 'http://localhost:6006',
9
+ startStorybook: false,
10
+ storybookCmd: 'npm run storybook',
11
+ };
12
+ for (let i = 0; i < args.length; i++) {
13
+ const arg = args[i];
14
+ const nextArg = args[i + 1];
15
+ if (arg === '--url' && nextArg) {
16
+ options.url = nextArg;
17
+ i++;
18
+ }
19
+ else if (arg === '--start') {
20
+ options.startStorybook = true;
21
+ }
22
+ else if (arg === '--cmd' && nextArg) {
23
+ options.storybookCmd = nextArg;
24
+ i++;
25
+ }
26
+ else if (arg === '--help' || arg === '-h') {
27
+ console.log(`
28
+ Usage: generate-screenshots [options]
29
+
30
+ Options:
31
+ --url <url> Storybook URL (default: http://localhost:6006)
32
+ --start Start Storybook before generating screenshots
33
+ --cmd <command> Command to start Storybook (default: npm run storybook)
34
+ --help, -h Show this help message
35
+
36
+ Examples:
37
+ # With Storybook already running
38
+ generate-screenshots
39
+
40
+ # Start Storybook automatically
41
+ generate-screenshots --start
42
+
43
+ # Custom URL
44
+ generate-screenshots --url http://localhost:9009
45
+
46
+ # Custom start command
47
+ generate-screenshots --start --cmd "bun run storybook"
48
+ `);
49
+ process.exit(0);
50
+ }
51
+ }
52
+ return options;
53
+ }
54
+ async function fetchStoryIndex(url) {
55
+ const indexUrl = `${url}/index.json`;
56
+ try {
57
+ const response = await fetch(indexUrl);
58
+ if (!response.ok) {
59
+ throw new Error(`Failed to fetch story index: ${response.statusText}`);
60
+ }
61
+ const data = (await response.json());
62
+ return Object.values(data.entries);
63
+ }
64
+ catch (error) {
65
+ console.error('Error fetching story index:', error);
66
+ console.error(`Make sure Storybook is running at ${url}`);
67
+ process.exit(1);
68
+ }
69
+ }
70
+ async function startStorybook(cmd) {
71
+ console.log(`🚀 Starting Storybook with: ${cmd}`);
72
+ const [command, ...args] = cmd.split(' ');
73
+ if (!command) {
74
+ throw new Error('Invalid storybook command');
75
+ }
76
+ const storybookProcess = spawn(command, [...args, '--', '--no-open'], {
77
+ cwd: process.cwd(),
78
+ stdio: 'pipe',
79
+ shell: true,
80
+ });
81
+ return new Promise((resolve, reject) => {
82
+ let started = false;
83
+ const timeout = setTimeout(() => {
84
+ if (!started) {
85
+ storybookProcess.kill();
86
+ reject(new Error('Storybook failed to start within 60 seconds'));
87
+ }
88
+ }, 60000);
89
+ storybookProcess.stdout?.on('data', (data) => {
90
+ const output = data.toString();
91
+ console.log(output);
92
+ if (output.includes('Local:') || output.includes('localhost:')) {
93
+ if (!started) {
94
+ started = true;
95
+ clearTimeout(timeout);
96
+ console.log('✅ Storybook is ready!');
97
+ resolve(storybookProcess);
98
+ }
99
+ }
100
+ });
101
+ storybookProcess.stderr?.on('data', (data) => {
102
+ console.error(data.toString());
103
+ });
104
+ storybookProcess.on('error', (error) => {
105
+ clearTimeout(timeout);
106
+ reject(error);
107
+ });
108
+ });
109
+ }
110
+ async function warmupStorybook(url, firstStoryId) {
111
+ console.log('🔥 Warming up Storybook...');
112
+ const browser = await getBrowser();
113
+ const context = await browser.newContext();
114
+ const page = await context.newPage();
115
+ try {
116
+ const warmupUrl = `${url}/iframe.html?id=${firstStoryId}&viewMode=story`;
117
+ await page.goto(warmupUrl, { timeout: 15000 });
118
+ await page.waitForLoadState('networkidle');
119
+ console.log('✅ Storybook warmed up');
120
+ }
121
+ catch (error) {
122
+ console.log('⚠️ Warmup had issues, proceeding anyway:', error);
123
+ }
124
+ finally {
125
+ await context.close();
126
+ }
127
+ }
128
+ async function main() {
129
+ const options = parseArgs();
130
+ console.log('📸 Generating Storybook screenshots...');
131
+ let storybookProcess = null;
132
+ try {
133
+ if (options.startStorybook) {
134
+ storybookProcess = await startStorybook(options.storybookCmd);
135
+ }
136
+ console.log(`Using Storybook URL: ${options.url}`);
137
+ // Fetch all stories
138
+ const stories = await fetchStoryIndex(options.url);
139
+ console.log(`Found ${stories.length} stories`);
140
+ const firstStory = stories[0];
141
+ if (!firstStory) {
142
+ throw new Error('No stories found');
143
+ }
144
+ // Warm up Storybook
145
+ await warmupStorybook(options.url, firstStory.id);
146
+ // Generate screenshots
147
+ await generateAllScreenshots(stories.map((story) => ({
148
+ id: story.id,
149
+ importPath: story.importPath,
150
+ })), options.url);
151
+ console.log('✅ Screenshot generation complete!');
152
+ }
153
+ catch (error) {
154
+ console.error('❌ Error during screenshot generation:', error);
155
+ throw error;
156
+ }
157
+ finally {
158
+ if (storybookProcess) {
159
+ console.log('🛑 Stopping Storybook...');
160
+ storybookProcess.kill();
161
+ }
162
+ }
163
+ }
164
+ main()
165
+ .then(() => process.exit(0))
166
+ .catch((error) => {
167
+ console.error('Fatal error:', error);
168
+ process.exit(1);
169
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handleStoryFileChange.d.ts","sourceRoot":"","sources":["../../../src/handlers/handleStoryFileChange/handleStoryFileChange.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AA4FvC,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,UAAU,2CAiClE"}
@@ -1,7 +1,7 @@
1
1
  import path from 'node:path';
2
- import { generateScreenshot } from '../../screenshot-service/index';
3
- import { computeFileHash } from '../../utils/fileSystem/index';
4
- import { updateManifest } from '../../utils/manifest/index';
2
+ import { generateScreenshot } from '../../screenshot-service/index.js';
3
+ import { computeFileHash } from '../../utils/fileSystem/index.js';
4
+ import { updateManifest } from '../../utils/manifest/index.js';
5
5
  // Cache for Storybook's index.json
6
6
  let cachedIndex = null;
7
7
  let indexFetchPromise = null;
@@ -0,0 +1,2 @@
1
+ export { handleStoryFileChange } from './handleStoryFileChange.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/handlers/handleStoryFileChange/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1 @@
1
+ export { handleStoryFileChange } from './handleStoryFileChange.js';
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { storybookOnlookPlugin, type OnlookPluginOptions } from './onlook-plugin/index';
1
+ export { type OnlookPluginOptions, storybookOnlookPlugin, } from './storybook-onlook-plugin.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EACxB,qBAAqB,GACtB,MAAM,8BAA8B,CAAC"}
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { storybookOnlookPlugin } from './onlook-plugin/index';
1
+ export { storybookOnlookPlugin, } from './storybook-onlook-plugin.js';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/screenshot-service/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,QAA+C,CAAC;AACtE,eAAO,MAAM,eAAe,QAAsC,CAAC;AACnE,eAAO,MAAM,aAAa,QAAwC,CAAC;AAInE,eAAO,MAAM,cAAc,OAAO,CAAC;AACnC,eAAO,MAAM,eAAe,OAAO,CAAC;AAGpC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,oBAAoB,MAAM,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { generateAllScreenshots } from './screenshot-service.js';
2
+ export type { Manifest, ScreenshotMetadata } from './types.js';
3
+ export { closeBrowser } from './utils/browser/index.js';
4
+ export { generateScreenshot, getScreenshotPath, screenshotExists, } from './utils/screenshot/index.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/screenshot-service/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,5 @@
1
+ // Main API
2
+ export { generateAllScreenshots } from './screenshot-service.js';
3
+ // Re-export screenshot utilities
4
+ export { closeBrowser } from './utils/browser/index.js';
5
+ export { generateScreenshot, getScreenshotPath, screenshotExists, } from './utils/screenshot/index.js';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screenshot-service.d.ts","sourceRoot":"","sources":["../../src/screenshot-service/screenshot-service.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,EAClD,YAAY,GAAE,MAAgC,GAC7C,OAAO,CAAC,IAAI,CAAC,CAsCf"}
@@ -1,7 +1,7 @@
1
- import { computeFileHash } from '../utils/fileSystem/index';
2
- import { updateManifest } from '../utils/manifest/index';
3
- import { closeBrowser } from './utils/browser/index';
4
- import { generateScreenshot } from './utils/screenshot/index';
1
+ import { computeFileHash } from '../utils/fileSystem/index.js';
2
+ import { updateManifest } from '../utils/manifest/index.js';
3
+ import { closeBrowser } from './utils/browser/index.js';
4
+ import { generateScreenshot } from './utils/screenshot/index.js';
5
5
  /**
6
6
  * Generate screenshots for all stories (parallelized for speed)
7
7
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/screenshot-service/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE;QACX,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CAC7C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../../src/screenshot-service/utils/browser/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAY,MAAM,YAAY,CAAC;AAIpD;;GAEG;AACH,wBAAsB,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,CAOnD;AAED;;GAEG;AACH,wBAAsB,YAAY,kBAUjC"}
@@ -0,0 +1,2 @@
1
+ export { closeBrowser, getBrowser } from './browser.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screenshot-service/utils/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ export { closeBrowser, getBrowser } from './browser.js';
@@ -0,0 +1,2 @@
1
+ export { captureScreenshotBuffer, generateScreenshot, getScreenshotPath, screenshotExists, } from './screenshot.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/screenshot-service/utils/screenshot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- export { captureScreenshotBuffer, generateScreenshot, getScreenshotPath, screenshotExists, } from './screenshot';
1
+ export { captureScreenshotBuffer, generateScreenshot, getScreenshotPath, screenshotExists, } from './screenshot.js';
@@ -1,4 +1,4 @@
1
- import type { BoundingBox } from '../../types';
1
+ import type { BoundingBox } from '../../types.js';
2
2
  export interface ScreenshotResult {
3
3
  buffer: Buffer;
4
4
  boundingBox: BoundingBox | null;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../../../src/screenshot-service/utils/screenshot/screenshot.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;CACjC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAGlF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAGlF;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,OAAO,GAAG,MAAM,EACvB,KAAK,GAAE,MAAuB,EAC9B,MAAM,GAAE,MAAwB,EAChC,YAAY,GAAE,MAAgC,GAC7C,OAAO,CAAC,gBAAgB,CAAC,CAiG3B;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,OAAO,GAAG,MAAM,EACvB,YAAY,GAAE,MAAgC,GAC7C,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAwB1C"}
@@ -1,8 +1,8 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
- import { ensureCacheDirectories } from '../../../utils/fileSystem/index';
4
- import { MIN_COMPONENT_HEIGHT, MIN_COMPONENT_WIDTH, SCREENSHOTS_DIR, VIEWPORT_HEIGHT, VIEWPORT_WIDTH, } from '../../constants';
5
- import { getBrowser } from '../browser/index';
3
+ import { ensureCacheDirectories } from '../../../utils/fileSystem/index.js';
4
+ import { MIN_COMPONENT_HEIGHT, MIN_COMPONENT_WIDTH, SCREENSHOTS_DIR, VIEWPORT_HEIGHT, VIEWPORT_WIDTH, } from '../../constants.js';
5
+ import { getBrowser } from '../browser/index.js';
6
6
  /**
7
7
  * Get screenshot file path
8
8
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storybook-onlook-plugin.d.ts","sourceRoot":"","sources":["../src/storybook-onlook-plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAU,YAAY,EAAiB,MAAM,MAAM,CAAC;AAoBhE,MAAM,MAAM,mBAAmB,GAAG;IAChC,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;AAqHF,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,mBAAwB,GAAG,YAAY,EAAE,CAwCvF"}
@@ -1,10 +1,10 @@
1
1
  import fs from 'node:fs';
2
2
  import path, { dirname, join, relative } from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
- import { componentLocPlugin } from '../component-loc/index';
5
- import { handleStoryFileChange } from './handlers/handleStoryFileChange/index';
6
- import { captureScreenshotBuffer } from './screenshot-service/utils/screenshot/index';
7
- import { findGitRoot } from './utils/findGitRoot/index';
4
+ import { componentLocPlugin } from './component-loc/index.js';
5
+ import { handleStoryFileChange } from './handlers/handleStoryFileChange/index.js';
6
+ import { captureScreenshotBuffer } from './screenshot-service/utils/screenshot/index.js';
7
+ import { findGitRoot } from './utils/findGitRoot/index.js';
8
8
  // Calculate storybook location relative to git root
9
9
  const __dirname = dirname(fileURLToPath(import.meta.url));
10
10
  const storybookDir = join(__dirname, '..');
@@ -114,10 +114,7 @@ export function storybookOnlookPlugin(options = {}) {
114
114
  return [];
115
115
  }
116
116
  const port = options.port ?? 6006;
117
- const allowedOrigins = [
118
- ...DEFAULT_ALLOWED_ORIGINS,
119
- ...(options.allowedOrigins ?? []),
120
- ];
117
+ const allowedOrigins = [...DEFAULT_ALLOWED_ORIGINS, ...(options.allowedOrigins ?? [])];
121
118
  const mainPlugin = {
122
119
  name: 'storybook-onlook-plugin',
123
120
  config() {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileSystem.d.ts","sourceRoot":"","sources":["../../../src/utils/fileSystem/fileSystem.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,sBAAsB,SAOrC;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMxD"}
@@ -1,6 +1,6 @@
1
1
  import crypto from 'node:crypto';
2
2
  import fs from 'node:fs';
3
- import { CACHE_DIR, SCREENSHOTS_DIR } from '../../screenshot-service/constants';
3
+ import { CACHE_DIR, SCREENSHOTS_DIR } from '../../screenshot-service/constants.js';
4
4
  /**
5
5
  * Ensure cache directories exist
6
6
  */
@@ -1,2 +1,2 @@
1
- export { computeFileHash, ensureCacheDirectories } from './fileSystem';
1
+ export { computeFileHash, ensureCacheDirectories } from './fileSystem.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/fileSystem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- export { computeFileHash, ensureCacheDirectories } from './fileSystem';
1
+ export { computeFileHash, ensureCacheDirectories } from './fileSystem.js';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"findGitRoot.d.ts","sourceRoot":"","sources":["../../../src/utils/findGitRoot/findGitRoot.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAW5D"}
@@ -0,0 +1,2 @@
1
+ export { findGitRoot } from './findGitRoot.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/findGitRoot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1 @@
1
+ export { findGitRoot } from './findGitRoot.js';
@@ -0,0 +1,2 @@
1
+ export { getManifestEntry, loadManifest, saveManifest, updateManifest, } from './manifest.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,cAAc,GACf,MAAM,eAAe,CAAC"}
@@ -1 +1 @@
1
- export { getManifestEntry, loadManifest, saveManifest, updateManifest } from './manifest';
1
+ export { getManifestEntry, loadManifest, saveManifest, updateManifest, } from './manifest.js';
@@ -1,4 +1,4 @@
1
- import type { Manifest, ScreenshotMetadata } from '../../screenshot-service/types';
1
+ import type { Manifest, ScreenshotMetadata } from '../../screenshot-service/types.js';
2
2
  /**
3
3
  * Load manifest from disk
4
4
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/utils/manifest/manifest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAGtF;;GAEG;AACH,wBAAgB,YAAY,IAAI,QAAQ,CAMvC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,QAAQ,QAG9C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAG3E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,QAgBvD"}
@@ -1,6 +1,6 @@
1
1
  import fs from 'node:fs';
2
- import { MANIFEST_PATH } from '../../screenshot-service/constants';
3
- import { ensureCacheDirectories } from '../fileSystem/index';
2
+ import { MANIFEST_PATH } from '../../screenshot-service/constants.js';
3
+ import { ensureCacheDirectories } from '../fileSystem/index.js';
4
4
  /**
5
5
  * Load manifest from disk
6
6
  */
package/package.json CHANGED
@@ -1,11 +1,22 @@
1
1
  {
2
2
  "name": "storybook-onbook-plugin",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
+ "bin": {
6
+ "generate-screenshots": "./dist/cli/generate-screenshots.js"
7
+ },
5
8
  "exports": {
6
9
  ".": {
7
10
  "types": "./dist/index.d.ts",
8
11
  "import": "./dist/index.js"
12
+ },
13
+ "./screenshot-service": {
14
+ "types": "./dist/screenshot-service/index.d.ts",
15
+ "import": "./dist/screenshot-service/index.js"
16
+ },
17
+ "./screenshot-service/browser": {
18
+ "types": "./dist/screenshot-service/utils/browser/index.d.ts",
19
+ "import": "./dist/screenshot-service/utils/browser/index.js"
9
20
  }
10
21
  },
11
22
  "files": [
@@ -1,7 +0,0 @@
1
- import type { Plugin } from 'vite';
2
- type ComponentLocPluginOptions = {
3
- include?: RegExp;
4
- };
5
- export declare function componentLocPlugin(options?: ComponentLocPluginOptions): Plugin;
6
- export default componentLocPlugin;
7
- //# sourceMappingURL=component-loc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component-loc.d.ts","sourceRoot":"","sources":["../../src/component-loc/component-loc.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,KAAK,yBAAyB,GAAG;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,yBAA8B,GAAG,MAAM,CAgFlF;AAED,eAAe,kBAAkB,CAAC"}
@@ -1,58 +0,0 @@
1
- import path from 'node:path';
2
- import generateModule from '@babel/generator';
3
- import { parse } from '@babel/parser';
4
- import traverseModule from '@babel/traverse';
5
- import * as t from '@babel/types';
6
- export function componentLocPlugin(options = {}) {
7
- const include = options.include ?? /\.(jsx|tsx)$/;
8
- // @babel/traverse and @babel/generator are CommonJS modules with default exports.
9
- // When imported in an ESM context, the default export may be on `.default` or directly on the module.
10
- // This workaround handles both cases to ensure compatibility across different bundler configurations.
11
- const traverse = traverseModule.default ??
12
- traverseModule;
13
- const generate = generateModule.default ??
14
- generateModule;
15
- let root;
16
- return {
17
- name: 'onbook-component-loc',
18
- enforce: 'pre',
19
- apply: 'serve',
20
- configResolved(config) {
21
- root = config.root;
22
- },
23
- transform(code, id) {
24
- const filepath = id.split('?', 1)[0];
25
- if (!filepath || filepath.includes('node_modules'))
26
- return null;
27
- if (!include.test(filepath))
28
- return null;
29
- const ast = parse(code, {
30
- sourceType: 'module',
31
- plugins: ['jsx', 'typescript'],
32
- sourceFilename: filepath,
33
- });
34
- let mutated = false;
35
- // Get relative path from project root
36
- const relativePath = path.relative(root, filepath);
37
- traverse(ast, {
38
- JSXElement(nodePath) {
39
- const opening = nodePath.node.openingElement;
40
- const element = nodePath.node;
41
- if (!opening.loc || !element.loc)
42
- return;
43
- const alreadyTagged = opening.attributes.some((attribute) => t.isJSXAttribute(attribute) &&
44
- attribute.name.name === 'data-component-file');
45
- if (alreadyTagged)
46
- return;
47
- opening.attributes.push(t.jsxAttribute(t.jsxIdentifier('data-component-file'), t.stringLiteral(relativePath)), t.jsxAttribute(t.jsxIdentifier('data-component-start'), t.stringLiteral(`${element.loc.start.line}:${element.loc.start.column}`)), t.jsxAttribute(t.jsxIdentifier('data-component-end'), t.stringLiteral(`${element.loc.end.line}:${element.loc.end.column}`)));
48
- mutated = true;
49
- },
50
- });
51
- if (!mutated)
52
- return null;
53
- const output = generate(ast, { retainLines: true, sourceMaps: true, sourceFileName: id }, code);
54
- return { code: output.code, map: output.map };
55
- },
56
- };
57
- }
58
- export default componentLocPlugin;
@@ -1,2 +0,0 @@
1
- export { componentLocPlugin } from './component-loc';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/component-loc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1 +0,0 @@
1
- export { componentLocPlugin } from './component-loc';
@@ -1 +0,0 @@
1
- {"version":3,"file":"handleStoryFileChange.d.ts","sourceRoot":"","sources":["../../../../src/onlook-plugin/handlers/handleStoryFileChange/handleStoryFileChange.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AA4FvC,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,UAAU,2CAiClE"}
@@ -1,2 +0,0 @@
1
- export { handleStoryFileChange } from './handleStoryFileChange';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/onlook-plugin/handlers/handleStoryFileChange/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1 +0,0 @@
1
- export { handleStoryFileChange } from './handleStoryFileChange';
@@ -1,2 +0,0 @@
1
- export { storybookOnlookPlugin, type OnlookPluginOptions } from './storybook-onlook-plugin';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/onlook-plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,KAAK,mBAAmB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1 +0,0 @@
1
- export { storybookOnlookPlugin } from './storybook-onlook-plugin';
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/onlook-plugin/screenshot-service/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,QAA+C,CAAC;AACtE,eAAO,MAAM,eAAe,QAAsC,CAAC;AACnE,eAAO,MAAM,aAAa,QAAwC,CAAC;AAInE,eAAO,MAAM,cAAc,OAAO,CAAC;AACnC,eAAO,MAAM,eAAe,OAAO,CAAC;AAGpC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,oBAAoB,MAAM,CAAC"}
@@ -1,5 +0,0 @@
1
- export { generateAllScreenshots } from './screenshot-service';
2
- export type { Manifest, ScreenshotMetadata } from './types';
3
- export { closeBrowser } from './utils/browser/index';
4
- export { generateScreenshot, getScreenshotPath, screenshotExists, } from './utils/screenshot/index';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/onlook-plugin/screenshot-service/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC"}
@@ -1,5 +0,0 @@
1
- // Main API
2
- export { generateAllScreenshots } from './screenshot-service';
3
- // Re-export screenshot utilities
4
- export { closeBrowser } from './utils/browser/index';
5
- export { generateScreenshot, getScreenshotPath, screenshotExists, } from './utils/screenshot/index';
@@ -1 +0,0 @@
1
- {"version":3,"file":"screenshot-service.d.ts","sourceRoot":"","sources":["../../../src/onlook-plugin/screenshot-service/screenshot-service.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,EAClD,YAAY,GAAE,MAAgC,GAC7C,OAAO,CAAC,IAAI,CAAC,CAsCf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/onlook-plugin/screenshot-service/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE;QACX,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CAC7C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../../../src/onlook-plugin/screenshot-service/utils/browser/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAY,MAAM,YAAY,CAAC;AAIpD;;GAEG;AACH,wBAAsB,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC,CAOnD;AAED;;GAEG;AACH,wBAAsB,YAAY,kBAUjC"}
@@ -1,2 +0,0 @@
1
- export { closeBrowser, getBrowser } from './browser';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/onlook-plugin/screenshot-service/utils/browser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
@@ -1 +0,0 @@
1
- export { closeBrowser, getBrowser } from './browser';
@@ -1,2 +0,0 @@
1
- export { captureScreenshotBuffer, generateScreenshot, getScreenshotPath, screenshotExists, } from './screenshot';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/onlook-plugin/screenshot-service/utils/screenshot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../../../../src/onlook-plugin/screenshot-service/utils/screenshot/screenshot.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;CACjC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAGlF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAGlF;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,OAAO,GAAG,MAAM,EACvB,KAAK,GAAE,MAAuB,EAC9B,MAAM,GAAE,MAAwB,EAChC,YAAY,GAAE,MAAgC,GAC7C,OAAO,CAAC,gBAAgB,CAAC,CAiG3B;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,OAAO,GAAG,MAAM,EACvB,YAAY,GAAE,MAAgC,GAC7C,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAwB1C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"storybook-onlook-plugin.d.ts","sourceRoot":"","sources":["../../src/onlook-plugin/storybook-onlook-plugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAU,YAAY,EAAiB,MAAM,MAAM,CAAC;AAoBhE,MAAM,MAAM,mBAAmB,GAAG;IAChC,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;AAqHF,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,mBAAwB,GAAG,YAAY,EAAE,CA2CvF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"fileSystem.d.ts","sourceRoot":"","sources":["../../../../src/onlook-plugin/utils/fileSystem/fileSystem.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,wBAAgB,sBAAsB,SAOrC;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMxD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/onlook-plugin/utils/fileSystem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"findGitRoot.d.ts","sourceRoot":"","sources":["../../../../src/onlook-plugin/utils/findGitRoot/findGitRoot.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAW5D"}
@@ -1,2 +0,0 @@
1
- export { findGitRoot } from './findGitRoot';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/onlook-plugin/utils/findGitRoot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -1 +0,0 @@
1
- export { findGitRoot } from './findGitRoot';
@@ -1,2 +0,0 @@
1
- export { getManifestEntry, loadManifest, saveManifest, updateManifest } from './manifest';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/onlook-plugin/utils/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/onlook-plugin/utils/manifest/manifest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAGnF;;GAEG;AACH,wBAAgB,YAAY,IAAI,QAAQ,CAMvC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,QAAQ,QAG9C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAG3E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,QAgBvD"}