@storybook/ember 10.1.0-alpha.9 → 10.1.0-beta.1
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/node/index.js
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3voce0i8tld from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3voce0i8tld from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3voce0i8tld from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3voce0i8tld.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3voce0i8tld.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3voce0i8tld.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "../_node-chunks/chunk-NGAIVAR5.js";
|
|
15
12
|
|
|
16
13
|
// src/node/index.ts
|
|
17
14
|
function defineMain(config) {
|
|
18
15
|
return config;
|
|
19
16
|
}
|
|
20
|
-
__name(defineMain, "defineMain");
|
|
21
17
|
export {
|
|
22
18
|
defineMain
|
|
23
19
|
};
|
package/dist/preset.js
CHANGED
|
@@ -1,28 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3voce0i8tld from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3voce0i8tld from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3voce0i8tld from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3voce0i8tld.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3voce0i8tld.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3voce0i8tld.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "./_node-chunks/chunk-NGAIVAR5.js";
|
|
15
12
|
|
|
16
13
|
// src/preset.ts
|
|
17
14
|
import { getProjectRoot, resolvePathInStorybookCache } from "storybook/internal/common";
|
|
18
15
|
import { getVirtualModules } from "@storybook/builder-webpack5";
|
|
19
16
|
var addons = [
|
|
20
17
|
import.meta.resolve("@storybook/ember/server/framework-preset-babel-ember")
|
|
21
|
-
]
|
|
22
|
-
|
|
23
|
-
const { virtualModules } = await getVirtualModules(options);
|
|
24
|
-
const babelOptions = await options.presets.apply("babel", {}, options);
|
|
25
|
-
const typescriptOptions = await options.presets.apply("typescript", {}, options);
|
|
18
|
+
], webpackFinal = async (baseConfig, options) => {
|
|
19
|
+
let { virtualModules } = await getVirtualModules(options), babelOptions = await options.presets.apply("babel", {}, options), typescriptOptions = await options.presets.apply("typescript", {}, options);
|
|
26
20
|
return {
|
|
27
21
|
...baseConfig,
|
|
28
22
|
module: {
|
|
@@ -46,17 +40,16 @@ var webpackFinal = /* @__PURE__ */ __name(async (baseConfig, options) => {
|
|
|
46
40
|
]
|
|
47
41
|
}
|
|
48
42
|
};
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
const framework = await options.presets.apply("framework");
|
|
43
|
+
}, core = async (config, options) => {
|
|
44
|
+
let framework = await options.presets.apply("framework");
|
|
52
45
|
return {
|
|
53
46
|
...config,
|
|
54
47
|
builder: {
|
|
55
48
|
name: import.meta.resolve("@storybook/builder-webpack5"),
|
|
56
|
-
options: typeof framework
|
|
49
|
+
options: typeof framework == "string" ? {} : framework.options.builder || {}
|
|
57
50
|
}
|
|
58
51
|
};
|
|
59
|
-
}
|
|
52
|
+
};
|
|
60
53
|
export {
|
|
61
54
|
addons,
|
|
62
55
|
core,
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_3voce0i8tld from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_3voce0i8tld from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_3voce0i8tld from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_3voce0i8tld.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_3voce0i8tld.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_3voce0i8tld.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "../_node-chunks/chunk-NGAIVAR5.js";
|
|
15
12
|
|
|
16
13
|
// src/server/framework-preset-babel-ember.ts
|
|
17
14
|
import { precompile } from "ember-source/dist/ember-template-compiler.js";
|
|
@@ -20,38 +17,25 @@ import { precompile } from "ember-source/dist/ember-template-compiler.js";
|
|
|
20
17
|
import { dirname, join } from "node:path";
|
|
21
18
|
import { getProjectRoot } from "storybook/internal/common";
|
|
22
19
|
import * as pkg from "empathic/package";
|
|
23
|
-
var findDistFile =
|
|
24
|
-
|
|
25
|
-
if (!nearestPackageJson)
|
|
20
|
+
var findDistFile = (cwd, relativePath) => {
|
|
21
|
+
let nearestPackageJson = pkg.up({ cwd, last: getProjectRoot() });
|
|
22
|
+
if (!nearestPackageJson)
|
|
26
23
|
throw new Error(`Could not find package.json in: ${cwd}`);
|
|
27
|
-
|
|
28
|
-
const packageDir = dirname(nearestPackageJson);
|
|
24
|
+
let packageDir = dirname(nearestPackageJson);
|
|
29
25
|
return join(packageDir, "dist", relativePath);
|
|
30
|
-
}
|
|
26
|
+
};
|
|
31
27
|
|
|
32
28
|
// src/server/framework-preset-babel-ember.ts
|
|
33
29
|
var emberOptions;
|
|
34
30
|
function precompileWithPlugins(string, options) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
precompileOptions.plugins = { ast: emberOptions.polyfills };
|
|
38
|
-
}
|
|
39
|
-
return precompile(string, precompileOptions);
|
|
31
|
+
let precompileOptions = options;
|
|
32
|
+
return emberOptions && emberOptions.polyfills && (precompileOptions.plugins = { ast: emberOptions.polyfills }), precompile(string, precompileOptions);
|
|
40
33
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
emberOptions = e.preset.emberOptions;
|
|
47
|
-
if (options.presetsList) {
|
|
48
|
-
delete options.presetsList[index].preset.emberOptions;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
const babelConfigPlugins = config?.plugins || [];
|
|
54
|
-
const extraPlugins = [
|
|
34
|
+
var babel = (config, options) => {
|
|
35
|
+
options && options.presetsList && options.presetsList.forEach((e, index) => {
|
|
36
|
+
e.preset && e.preset.emberOptions && (emberOptions = e.preset.emberOptions, options.presetsList && delete options.presetsList[index].preset.emberOptions);
|
|
37
|
+
});
|
|
38
|
+
let babelConfigPlugins = config?.plugins || [], extraPlugins = [
|
|
55
39
|
[
|
|
56
40
|
import.meta.resolve("babel-plugin-htmlbars-inline-precompile"),
|
|
57
41
|
{
|
|
@@ -69,10 +53,7 @@ var babel = /* @__PURE__ */ __name((config, options) => {
|
|
|
69
53
|
...config,
|
|
70
54
|
plugins: [...babelConfigPlugins, ...extraPlugins]
|
|
71
55
|
};
|
|
72
|
-
}, "
|
|
73
|
-
var previewAnnotations = /* @__PURE__ */ __name((entry = []) => {
|
|
74
|
-
return [...entry, findDistFile(__dirname, "client/preview/config")];
|
|
75
|
-
}, "previewAnnotations");
|
|
56
|
+
}, previewAnnotations = (entry = []) => [...entry, findDistFile(__dirname, "client/preview/config")];
|
|
76
57
|
export {
|
|
77
58
|
babel,
|
|
78
59
|
previewAnnotations
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/ember",
|
|
3
|
-
"version": "10.1.0-
|
|
3
|
+
"version": "10.1.0-beta.1",
|
|
4
4
|
"description": "Storybook for Ember: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"prep": "jiti ../../../scripts/build/build-package.ts"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@storybook/builder-webpack5": "10.1.0-
|
|
53
|
+
"@storybook/builder-webpack5": "10.1.0-beta.1",
|
|
54
54
|
"@storybook/global": "^5.0.0",
|
|
55
55
|
"babel-loader": "9.1.3",
|
|
56
56
|
"empathic": "2.0.0"
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"ember-source": "~3.28.1 || >=4.0.0",
|
|
67
67
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
68
68
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
69
|
-
"storybook": "^10.1.0-
|
|
69
|
+
"storybook": "^10.1.0-beta.1"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "a8e7fd8a655c69780bc20b9749d2699e45beae1l"
|
|
75
75
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_7hpoo69419a from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_7hpoo69419a from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_7hpoo69419a from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_7hpoo69419a.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_7hpoo69419a.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_7hpoo69419a.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
var __defProp = Object.defineProperty;
|
|
13
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
__name
|
|
17
|
-
};
|