@storybook/ember 8.3.0-alpha.0 → 8.3.0-alpha.10
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/dist/client/preview/render.js +2 -1
- package/dist/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/dist/preset.js +3 -3
- package/dist/preset.mjs +2 -2
- package/dist/server/framework-preset-ember-docs.js +2 -1
- package/dist/types.d.ts +3 -5
- package/dist/util.js +3 -6
- package/dist/util.mjs +3 -3
- package/package.json +5 -5
- package/template/cli/Button.stories.js +4 -2
|
@@ -18,8 +18,9 @@ let lastPromise = app.boot();
|
|
|
18
18
|
let hasRendered = false;
|
|
19
19
|
let isRendering = false;
|
|
20
20
|
function render(options, el) {
|
|
21
|
-
if (isRendering)
|
|
21
|
+
if (isRendering) {
|
|
22
22
|
return;
|
|
23
|
+
}
|
|
23
24
|
isRendering = true;
|
|
24
25
|
const { template, context = {}, element } = options;
|
|
25
26
|
if (hasRendered) {
|
package/dist/index.js
CHANGED
|
@@ -17,5 +17,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
__exportStar(require("./types"), exports);
|
|
19
19
|
// optimization: stop HMR propagation in webpack
|
|
20
|
-
|
|
20
|
+
// optimization: stop HMR propagation in webpack
|
|
21
|
+
if (typeof module !== 'undefined') {
|
|
21
22
|
module?.hot?.decline();
|
|
23
|
+
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="webpack-env" />
|
|
2
2
|
export * from './types';
|
|
3
3
|
// optimization: stop HMR propagation in webpack
|
|
4
|
-
|
|
4
|
+
// optimization: stop HMR propagation in webpack
|
|
5
|
+
if (typeof module !== 'undefined') {
|
|
5
6
|
module?.hot?.decline();
|
|
7
|
+
}
|
package/dist/preset.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.core = exports.webpackFinal = exports.addons = void 0;
|
|
4
|
-
const
|
|
5
|
-
const builder_webpack5_1 = require("@storybook/builder-webpack5");
|
|
4
|
+
const node_path_1 = require("node:path");
|
|
6
5
|
const common_1 = require("storybook/internal/common");
|
|
7
|
-
const
|
|
6
|
+
const builder_webpack5_1 = require("@storybook/builder-webpack5");
|
|
7
|
+
const getAbsolutePath = (input) => (0, node_path_1.dirname)(require.resolve((0, node_path_1.join)(input, 'package.json')));
|
|
8
8
|
exports.addons = [
|
|
9
9
|
require.resolve('./server/framework-preset-babel-ember'),
|
|
10
10
|
require.resolve('./server/framework-preset-ember-docs'),
|
package/dist/preset.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { dirname, join } from 'path';
|
|
2
|
-
import { getVirtualModules } from '@storybook/builder-webpack5';
|
|
1
|
+
import { dirname, join } from 'node:path';
|
|
3
2
|
import { getProjectRoot, resolvePathInStorybookCache } from 'storybook/internal/common';
|
|
3
|
+
import { getVirtualModules } from '@storybook/builder-webpack5';
|
|
4
4
|
const getAbsolutePath = (input) => dirname(require.resolve(join(input, 'package.json')));
|
|
5
5
|
export const addons = [
|
|
6
6
|
require.resolve('./server/framework-preset-babel-ember'),
|
|
@@ -4,8 +4,9 @@ exports.previewAnnotations = void 0;
|
|
|
4
4
|
const docs_tools_1 = require("storybook/internal/docs-tools");
|
|
5
5
|
const util_1 = require("../util");
|
|
6
6
|
const previewAnnotations = (entry = [], options) => {
|
|
7
|
-
if (!(0, docs_tools_1.hasDocsOrControls)(options))
|
|
7
|
+
if (!(0, docs_tools_1.hasDocsOrControls)(options)) {
|
|
8
8
|
return entry;
|
|
9
|
+
}
|
|
9
10
|
return [...entry, (0, util_1.findDistFile)(__dirname, 'client/preview/docs/config')];
|
|
10
11
|
};
|
|
11
12
|
exports.previewAnnotations = previewAnnotations;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { StorybookConfig as StorybookConfigBase, TypescriptOptions as TypescriptOptionsReact } from '@storybook/core-webpack';
|
|
2
|
-
import type { StorybookConfigWebpack, BuilderOptions, TypescriptOptions as TypescriptOptionsBuilder } from '@storybook/builder-webpack5';
|
|
3
1
|
import type { CompatibleString } from 'storybook/internal/types';
|
|
2
|
+
import type { BuilderOptions, StorybookConfigWebpack, TypescriptOptions as TypescriptOptionsBuilder } from '@storybook/builder-webpack5';
|
|
3
|
+
import type { StorybookConfig as StorybookConfigBase, TypescriptOptions as TypescriptOptionsReact } from '@storybook/core-webpack';
|
|
4
4
|
type FrameworkName = CompatibleString<'@storybook/ember-webpack5'>;
|
|
5
5
|
type BuilderName = CompatibleString<'@storybook/builder-webpack5'>;
|
|
6
6
|
export type FrameworkOptions = {
|
|
@@ -19,9 +19,7 @@ type StorybookConfigFramework = {
|
|
|
19
19
|
};
|
|
20
20
|
typescript?: Partial<TypescriptOptionsBuilder & TypescriptOptionsReact> & StorybookConfigBase['typescript'];
|
|
21
21
|
};
|
|
22
|
-
/**
|
|
23
|
-
* The interface for Storybook configuration in `main.ts` files.
|
|
24
|
-
*/
|
|
22
|
+
/** The interface for Storybook configuration in `main.ts` files. */
|
|
25
23
|
export type StorybookConfig = Omit<StorybookConfigBase, keyof StorybookConfigWebpack | keyof StorybookConfigFramework> & StorybookConfigWebpack & StorybookConfigFramework;
|
|
26
24
|
declare global {
|
|
27
25
|
var __EMBER_GENERATED_DOC_JSON__: any;
|
package/dist/util.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.findDistFile = void 0;
|
|
7
|
-
const
|
|
4
|
+
const node_path_1 = require("node:path");
|
|
8
5
|
const find_up_1 = require("find-up");
|
|
9
6
|
const findDistFile = (cwd, relativePath) => {
|
|
10
7
|
const nearestPackageJson = (0, find_up_1.sync)('package.json', { cwd });
|
|
11
8
|
if (!nearestPackageJson) {
|
|
12
9
|
throw new Error(`Could not find package.json in: ${cwd}`);
|
|
13
10
|
}
|
|
14
|
-
const packageDir =
|
|
15
|
-
return
|
|
11
|
+
const packageDir = (0, node_path_1.dirname)(nearestPackageJson);
|
|
12
|
+
return (0, node_path_1.join)(packageDir, 'dist', relativePath);
|
|
16
13
|
};
|
|
17
14
|
exports.findDistFile = findDistFile;
|
package/dist/util.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { dirname, join } from 'node:path';
|
|
2
2
|
import { sync as findUpSync } from 'find-up';
|
|
3
3
|
export const findDistFile = (cwd, relativePath) => {
|
|
4
4
|
const nearestPackageJson = findUpSync('package.json', { cwd });
|
|
5
5
|
if (!nearestPackageJson) {
|
|
6
6
|
throw new Error(`Could not find package.json in: ${cwd}`);
|
|
7
7
|
}
|
|
8
|
-
const packageDir =
|
|
9
|
-
return
|
|
8
|
+
const packageDir = dirname(nearestPackageJson);
|
|
9
|
+
return join(packageDir, 'dist', relativePath);
|
|
10
10
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/ember",
|
|
3
|
-
"version": "8.3.0-alpha.
|
|
3
|
+
"version": "8.3.0-alpha.10",
|
|
4
4
|
"description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.",
|
|
5
5
|
"homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/ember",
|
|
6
6
|
"bugs": {
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"!src/**/*"
|
|
29
29
|
],
|
|
30
30
|
"scripts": {
|
|
31
|
-
"check": "
|
|
32
|
-
"prep": "
|
|
31
|
+
"check": "jiti ../../../scripts/prepare/check.ts",
|
|
32
|
+
"prep": "jiti ../../../scripts/prepare/tsc.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@storybook/builder-webpack5": "8.3.0-alpha.
|
|
35
|
+
"@storybook/builder-webpack5": "8.3.0-alpha.10",
|
|
36
36
|
"@storybook/global": "^5.0.0",
|
|
37
37
|
"babel-loader": "9.1.3",
|
|
38
38
|
"find-up": "^5.0.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"ember-source": "~3.28.1 || ^4.0.0",
|
|
51
51
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
52
52
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
53
|
-
"storybook": "^8.3.0-alpha.
|
|
53
|
+
"storybook": "^8.3.0-alpha.10"
|
|
54
54
|
},
|
|
55
55
|
"engines": {
|
|
56
56
|
"node": ">=18.0.0"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fn } from '@storybook/test';
|
|
2
|
+
|
|
2
3
|
import { action } from '@storybook/addon-actions';
|
|
3
4
|
import { linkTo } from '@storybook/addon-links';
|
|
4
|
-
|
|
5
|
+
|
|
6
|
+
import { hbs } from 'ember-cli-htmlbars';
|
|
5
7
|
|
|
6
8
|
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories
|
|
7
9
|
export default {
|