1 line
7.7 KiB
JSON
1 line
7.7 KiB
JSON
![]() |
{"ast":null,"code":"import { createBrowserChannel } from 'storybook/internal/channels';\nimport { STORY_HOT_UPDATED } from 'storybook/internal/core-events';\nimport { isPreview } from 'storybook/internal/csf';\nimport { global } from '@storybook/global';\nimport { PreviewWeb, addons, composeConfigs } from 'storybook/preview-api';\nimport { importFn } from './storybook-stories.js';\nconst getProjectAnnotations = () => {\n const previewAnnotations = [require('/home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/implem/node_modules/@storybook/angular/dist/client/config.mjs'), require('/home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/implem/node_modules/@storybook/angular/dist/client/docs/config.mjs'), require('/home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/implem/node_modules/@storybook/addon-docs/dist/preview.mjs'), require('/home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/implem/.storybook/preview.ts')];\n // the last one in this array is the user preview\n const userPreview = previewAnnotations[previewAnnotations.length - 1]?.default;\n if (isPreview(userPreview)) {\n return userPreview.composed;\n }\n return composeConfigs(previewAnnotations);\n};\nconst channel = createBrowserChannel({\n page: 'preview'\n});\naddons.setChannel(channel);\nif (global.CONFIG_TYPE === 'DEVELOPMENT') {\n window.__STORYBOOK_SERVER_CHANNEL__ = channel;\n}\nconst preview = new PreviewWeb(importFn, getProjectAnnotations);\nwindow.__STORYBOOK_PREVIEW__ = preview;\nwindow.__STORYBOOK_STORY_STORE__ = preview.storyStore;\nwindow.__STORYBOOK_ADDONS_CHANNEL__ = channel;\nif (import.meta.webpackHot) {\n import.meta.webpackHot.addStatusHandler(status => {\n if (status === 'idle') {\n preview.channel.emit(STORY_HOT_UPDATED);\n }\n });\n import.meta.webpackHot.accept('./storybook-stories.js', () => {\n // importFn has changed so we need to patch the new one in\n preview.onStoriesChanged({\n importFn\n });\n });\n import.meta.webpackHot.accept(['/home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/implem/node_modules/@storybook/angular/dist/client/config.mjs', '/home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/implem/node_modules/@storybook/angular/dist/client/docs/config.mjs', '/home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/implem/node_modules/@storybook/addon-docs/dist/preview.mjs', '/home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/implem/.storybook/preview.ts'], () => {\n // getProjectAnnotations has changed so we need to patch the new one in\n preview.onGetProjectAnnotationsChanged({\n getProjectAnnotations\n });\n });\n}","map":{"version":3,"names":["createBrowserChannel","STORY_HOT_UPDATED","isPreview","global","PreviewWeb","addons","composeConfigs","importFn","getProjectAnnotations","previewAnnotations","require","userPreview","length","default","composed","channel","page","setChannel","CONFIG_TYPE","window","__STORYBOOK_SERVER_CHANNEL__","preview","__STORYBOOK_PREVIEW__","__STORYBOOK_STORY_STORE__","storyStore","__STORYBOOK_ADDONS_CHANNEL__","import","meta","webpackHot","addStatusHandler","status","emit","accept","onStoriesChanged","onGetProjectAnnotationsChanged"],"sources":["/home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/implem/storybook-config-entry.js"],"sourcesContent":["import { createBrowserChannel } from 'storybook/internal/channels';\nimport { STORY_HOT_UPDATED } from 'storybook/internal/core-events';\nimport { isPreview } from 'storybook/internal/csf';\n\nimport { global } from '@storybook/global';\n\nimport { PreviewWeb, addons, composeConfigs } from 'storybook/preview-api';\nimport { importFn } from './storybook-stories.js';\n\nconst getProjectAnnotations = () => {\n const previewAnnotations = [require('/home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/implem/node_modules/@storybook/angul
|