storybook 9.1.0-alpha.3 → 9.1.0-alpha.4
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/actions/index.cjs +16 -16
- package/dist/actions/index.d.ts +1 -38
- package/dist/actions/index.js +12 -12
- package/dist/actions/preview.cjs +25 -25
- package/dist/actions/preview.d.ts +37 -547
- package/dist/actions/preview.js +18 -18
- package/dist/backgrounds/index.cjs +12 -144
- package/dist/backgrounds/index.d.ts +1 -591
- package/dist/backgrounds/index.js +0 -130
- package/dist/backgrounds/preview.cjs +63 -63
- package/dist/backgrounds/preview.d.ts +40 -542
- package/dist/backgrounds/preview.js +47 -47
- package/dist/bin/index.cjs +50 -50
- package/dist/bin/index.js +50 -50
- package/dist/cli/bin/index.cjs +1 -1
- package/dist/cli/bin/index.js +1 -1
- package/dist/common/index.cjs +732 -731
- package/dist/common/index.d.ts +2 -2
- package/dist/common/index.js +81 -79
- package/dist/component-testing/preview.cjs +12 -12
- package/dist/component-testing/preview.d.ts +2 -2
- package/dist/component-testing/preview.js +7 -7
- package/dist/controls/index.cjs +16 -16
- package/dist/controls/index.d.ts +1 -36
- package/dist/controls/preview.cjs +17 -17
- package/dist/controls/preview.d.ts +34 -546
- package/dist/controls/preview.js +3 -3
- package/dist/csf/index.cjs +1210 -95
- package/dist/csf/index.d.ts +59 -18
- package/dist/csf/index.js +1214 -90
- package/dist/csf-tools/index.cjs +2 -1
- package/dist/csf-tools/index.js +2 -2
- package/dist/highlight/index.cjs +15 -15
- package/dist/highlight/index.d.ts +1 -12
- package/dist/highlight/index.js +4 -4
- package/dist/highlight/preview.cjs +63 -63
- package/dist/highlight/preview.d.ts +11 -546
- package/dist/highlight/preview.js +11 -10
- package/dist/manager/globals-runtime.js +29776 -29777
- package/dist/manager-api/index.cjs +1 -1
- package/dist/manager-api/index.js +1 -1
- package/dist/measure/index.cjs +12 -472
- package/dist/measure/index.d.ts +1 -566
- package/dist/measure/index.js +0 -464
- package/dist/measure/preview.cjs +104 -104
- package/dist/measure/preview.d.ts +11 -546
- package/dist/measure/preview.js +105 -105
- package/dist/outline/index.cjs +12 -524
- package/dist/outline/index.d.ts +1 -566
- package/dist/outline/index.js +0 -500
- package/dist/outline/preview.cjs +32 -32
- package/dist/outline/preview.d.ts +11 -546
- package/dist/outline/preview.js +27 -27
- package/dist/preview/runtime.js +8259 -8266
- package/dist/preview-api/index.cjs +1228 -1261
- package/dist/preview-api/index.d.ts +6 -8
- package/dist/preview-api/index.js +927 -963
- package/dist/telemetry/index.cjs +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/test/preview.cjs +42 -42
- package/dist/test/preview.d.ts +12 -550
- package/dist/test/preview.js +36 -36
- package/dist/types/index.d.ts +5 -3
- package/dist/viewport/index.cjs +17 -24
- package/dist/viewport/index.d.ts +9 -532
- package/dist/viewport/index.js +9 -16
- package/dist/viewport/preview.cjs +22 -22
- package/dist/viewport/preview.d.ts +45 -552
- package/dist/viewport/preview.js +8 -8
- package/package.json +1 -1
package/dist/common/index.d.ts
CHANGED
|
@@ -940,8 +940,8 @@ declare const posix: (localPath: string, seperator?: string) => string;
|
|
|
940
940
|
|
|
941
941
|
declare const getAddonNames: (mainConfig: StorybookConfig) => string[];
|
|
942
942
|
|
|
943
|
-
declare function syncStorybookAddons(mainConfig: StorybookConfig, previewConfigPath: string): Promise<void>;
|
|
944
|
-
declare function getSyncedStorybookAddons(mainConfig: StorybookConfig, previewConfig: ConfigFile): Promise<ConfigFile>;
|
|
943
|
+
declare function syncStorybookAddons(mainConfig: StorybookConfig, previewConfigPath: string, configDir: string): Promise<void>;
|
|
944
|
+
declare function getSyncedStorybookAddons(mainConfig: StorybookConfig, previewConfig: ConfigFile, configDir: string): Promise<ConfigFile>;
|
|
945
945
|
|
|
946
946
|
/**
|
|
947
947
|
* Helper function to scan for files matching a glob pattern and transform them
|
package/dist/common/index.js
CHANGED
|
@@ -2027,7 +2027,7 @@ var ma = m((aW, Ur) => {
|
|
|
2027
2027
|
});
|
|
2028
2028
|
|
|
2029
2029
|
// ../node_modules/merge-stream/index.js
|
|
2030
|
-
var QQ = m((
|
|
2030
|
+
var QQ = m((L4, BQ) => {
|
|
2031
2031
|
"use strict";
|
|
2032
2032
|
var { PassThrough: PR } = v("stream");
|
|
2033
2033
|
BQ.exports = function() {
|
|
@@ -18599,56 +18599,56 @@ var gK = Ee(() => {
|
|
|
18599
18599
|
|
|
18600
18600
|
// src/common/versions.ts
|
|
18601
18601
|
var gt = {
|
|
18602
|
-
"@storybook/addon-a11y": "9.1.0-alpha.
|
|
18603
|
-
"@storybook/addon-actions": "9.1.0-alpha.
|
|
18604
|
-
"@storybook/addon-backgrounds": "9.1.0-alpha.
|
|
18605
|
-
"@storybook/addon-controls": "9.1.0-alpha.
|
|
18606
|
-
"@storybook/addon-docs": "9.1.0-alpha.
|
|
18607
|
-
"@storybook/addon-jest": "9.1.0-alpha.
|
|
18608
|
-
"@storybook/addon-links": "9.1.0-alpha.
|
|
18609
|
-
"@storybook/addon-measure": "9.1.0-alpha.
|
|
18610
|
-
"@storybook/addon-onboarding": "9.1.0-alpha.
|
|
18611
|
-
"@storybook/addon-outline": "9.1.0-alpha.
|
|
18612
|
-
"storybook-addon-pseudo-states": "9.1.0-alpha.
|
|
18613
|
-
"@storybook/addon-themes": "9.1.0-alpha.
|
|
18614
|
-
"@storybook/addon-toolbars": "9.1.0-alpha.
|
|
18615
|
-
"@storybook/addon-viewport": "9.1.0-alpha.
|
|
18616
|
-
"@storybook/addon-vitest": "9.1.0-alpha.
|
|
18617
|
-
"@storybook/builder-vite": "9.1.0-alpha.
|
|
18618
|
-
"@storybook/builder-webpack5": "9.1.0-alpha.
|
|
18619
|
-
storybook: "9.1.0-alpha.
|
|
18620
|
-
"@storybook/angular": "9.1.0-alpha.
|
|
18621
|
-
"@storybook/ember": "9.1.0-alpha.
|
|
18622
|
-
"@storybook/html-vite": "9.1.0-alpha.
|
|
18623
|
-
"@storybook/nextjs": "9.1.0-alpha.
|
|
18624
|
-
"@storybook/nextjs-vite": "9.1.0-alpha.
|
|
18625
|
-
"@storybook/preact-vite": "9.1.0-alpha.
|
|
18626
|
-
"@storybook/react-native-web-vite": "9.1.0-alpha.
|
|
18627
|
-
"@storybook/react-vite": "9.1.0-alpha.
|
|
18628
|
-
"@storybook/react-webpack5": "9.1.0-alpha.
|
|
18629
|
-
"@storybook/server-webpack5": "9.1.0-alpha.
|
|
18630
|
-
"@storybook/svelte-vite": "9.1.0-alpha.
|
|
18631
|
-
"@storybook/sveltekit": "9.1.0-alpha.
|
|
18632
|
-
"@storybook/vue3-vite": "9.1.0-alpha.
|
|
18633
|
-
"@storybook/web-components-vite": "9.1.0-alpha.
|
|
18634
|
-
sb: "9.1.0-alpha.
|
|
18635
|
-
"@storybook/cli": "9.1.0-alpha.
|
|
18636
|
-
"@storybook/codemod": "9.1.0-alpha.
|
|
18637
|
-
"@storybook/core-webpack": "9.1.0-alpha.
|
|
18638
|
-
"create-storybook": "9.1.0-alpha.
|
|
18639
|
-
"@storybook/csf-plugin": "9.1.0-alpha.
|
|
18640
|
-
"eslint-plugin-storybook": "9.1.0-alpha.
|
|
18641
|
-
"@storybook/react-dom-shim": "9.1.0-alpha.
|
|
18642
|
-
"@storybook/preset-create-react-app": "9.1.0-alpha.
|
|
18643
|
-
"@storybook/preset-react-webpack": "9.1.0-alpha.
|
|
18644
|
-
"@storybook/preset-server-webpack": "9.1.0-alpha.
|
|
18645
|
-
"@storybook/html": "9.1.0-alpha.
|
|
18646
|
-
"@storybook/preact": "9.1.0-alpha.
|
|
18647
|
-
"@storybook/react": "9.1.0-alpha.
|
|
18648
|
-
"@storybook/server": "9.1.0-alpha.
|
|
18649
|
-
"@storybook/svelte": "9.1.0-alpha.
|
|
18650
|
-
"@storybook/vue3": "9.1.0-alpha.
|
|
18651
|
-
"@storybook/web-components": "9.1.0-alpha.
|
|
18602
|
+
"@storybook/addon-a11y": "9.1.0-alpha.4",
|
|
18603
|
+
"@storybook/addon-actions": "9.1.0-alpha.4",
|
|
18604
|
+
"@storybook/addon-backgrounds": "9.1.0-alpha.4",
|
|
18605
|
+
"@storybook/addon-controls": "9.1.0-alpha.4",
|
|
18606
|
+
"@storybook/addon-docs": "9.1.0-alpha.4",
|
|
18607
|
+
"@storybook/addon-jest": "9.1.0-alpha.4",
|
|
18608
|
+
"@storybook/addon-links": "9.1.0-alpha.4",
|
|
18609
|
+
"@storybook/addon-measure": "9.1.0-alpha.4",
|
|
18610
|
+
"@storybook/addon-onboarding": "9.1.0-alpha.4",
|
|
18611
|
+
"@storybook/addon-outline": "9.1.0-alpha.4",
|
|
18612
|
+
"storybook-addon-pseudo-states": "9.1.0-alpha.4",
|
|
18613
|
+
"@storybook/addon-themes": "9.1.0-alpha.4",
|
|
18614
|
+
"@storybook/addon-toolbars": "9.1.0-alpha.4",
|
|
18615
|
+
"@storybook/addon-viewport": "9.1.0-alpha.4",
|
|
18616
|
+
"@storybook/addon-vitest": "9.1.0-alpha.4",
|
|
18617
|
+
"@storybook/builder-vite": "9.1.0-alpha.4",
|
|
18618
|
+
"@storybook/builder-webpack5": "9.1.0-alpha.4",
|
|
18619
|
+
storybook: "9.1.0-alpha.4",
|
|
18620
|
+
"@storybook/angular": "9.1.0-alpha.4",
|
|
18621
|
+
"@storybook/ember": "9.1.0-alpha.4",
|
|
18622
|
+
"@storybook/html-vite": "9.1.0-alpha.4",
|
|
18623
|
+
"@storybook/nextjs": "9.1.0-alpha.4",
|
|
18624
|
+
"@storybook/nextjs-vite": "9.1.0-alpha.4",
|
|
18625
|
+
"@storybook/preact-vite": "9.1.0-alpha.4",
|
|
18626
|
+
"@storybook/react-native-web-vite": "9.1.0-alpha.4",
|
|
18627
|
+
"@storybook/react-vite": "9.1.0-alpha.4",
|
|
18628
|
+
"@storybook/react-webpack5": "9.1.0-alpha.4",
|
|
18629
|
+
"@storybook/server-webpack5": "9.1.0-alpha.4",
|
|
18630
|
+
"@storybook/svelte-vite": "9.1.0-alpha.4",
|
|
18631
|
+
"@storybook/sveltekit": "9.1.0-alpha.4",
|
|
18632
|
+
"@storybook/vue3-vite": "9.1.0-alpha.4",
|
|
18633
|
+
"@storybook/web-components-vite": "9.1.0-alpha.4",
|
|
18634
|
+
sb: "9.1.0-alpha.4",
|
|
18635
|
+
"@storybook/cli": "9.1.0-alpha.4",
|
|
18636
|
+
"@storybook/codemod": "9.1.0-alpha.4",
|
|
18637
|
+
"@storybook/core-webpack": "9.1.0-alpha.4",
|
|
18638
|
+
"create-storybook": "9.1.0-alpha.4",
|
|
18639
|
+
"@storybook/csf-plugin": "9.1.0-alpha.4",
|
|
18640
|
+
"eslint-plugin-storybook": "9.1.0-alpha.4",
|
|
18641
|
+
"@storybook/react-dom-shim": "9.1.0-alpha.4",
|
|
18642
|
+
"@storybook/preset-create-react-app": "9.1.0-alpha.4",
|
|
18643
|
+
"@storybook/preset-react-webpack": "9.1.0-alpha.4",
|
|
18644
|
+
"@storybook/preset-server-webpack": "9.1.0-alpha.4",
|
|
18645
|
+
"@storybook/html": "9.1.0-alpha.4",
|
|
18646
|
+
"@storybook/preact": "9.1.0-alpha.4",
|
|
18647
|
+
"@storybook/react": "9.1.0-alpha.4",
|
|
18648
|
+
"@storybook/server": "9.1.0-alpha.4",
|
|
18649
|
+
"@storybook/svelte": "9.1.0-alpha.4",
|
|
18650
|
+
"@storybook/vue3": "9.1.0-alpha.4",
|
|
18651
|
+
"@storybook/web-components": "9.1.0-alpha.4"
|
|
18652
18652
|
};
|
|
18653
18653
|
|
|
18654
18654
|
// src/common/presets.ts
|
|
@@ -25927,7 +25927,7 @@ function xQ(t) {
|
|
|
25927
25927
|
}, A;
|
|
25928
25928
|
}
|
|
25929
25929
|
s(xQ, "create$");
|
|
25930
|
-
var
|
|
25930
|
+
var E3 = xQ();
|
|
25931
25931
|
function YQ(t, A) {
|
|
25932
25932
|
let [e, ...r] = ja(t);
|
|
25933
25933
|
return vQ(e, r, A);
|
|
@@ -27627,53 +27627,55 @@ function Tx(t) {
|
|
|
27627
27627
|
).join("").replace(/^./, (e) => e.toLowerCase());
|
|
27628
27628
|
}
|
|
27629
27629
|
s(Tx, "getAnnotationsName");
|
|
27630
|
-
async function Bd(t) {
|
|
27630
|
+
async function Bd(t, A) {
|
|
27631
|
+
let e = {
|
|
27632
|
+
// core addons will have a function as default export in index entrypoint
|
|
27633
|
+
importPath: t,
|
|
27634
|
+
importName: Tx(t),
|
|
27635
|
+
isCoreAddon: Au(t)
|
|
27636
|
+
};
|
|
27637
|
+
e.isCoreAddon || (e.importPath = `${t}/preview`);
|
|
27631
27638
|
try {
|
|
27632
|
-
|
|
27633
|
-
// core addons will have a function as default export in index entrypoint
|
|
27634
|
-
importPath: t,
|
|
27635
|
-
importName: Tx(t),
|
|
27636
|
-
isCoreAddon: Au(t)
|
|
27637
|
-
};
|
|
27638
|
-
return t === "@storybook/addon-essentials" || (A.isCoreAddon || (A.importPath = `${t}/preview`), v.resolve(Ox.join(t, "preview"))), A;
|
|
27639
|
+
v.resolve(Ox.join(t, "preview"), { paths: [A] });
|
|
27639
27640
|
} catch {
|
|
27641
|
+
return null;
|
|
27640
27642
|
}
|
|
27641
|
-
return
|
|
27643
|
+
return e;
|
|
27642
27644
|
}
|
|
27643
27645
|
s(Bd, "getAddonAnnotations");
|
|
27644
27646
|
|
|
27645
27647
|
// src/common/utils/sync-main-preview-addons.ts
|
|
27646
27648
|
var zx = console;
|
|
27647
|
-
async function xZ(t, A) {
|
|
27648
|
-
let
|
|
27649
|
-
await qx(
|
|
27649
|
+
async function xZ(t, A, e) {
|
|
27650
|
+
let r = await jx(A), i = await Wx(t, r, e);
|
|
27651
|
+
await qx(i);
|
|
27650
27652
|
}
|
|
27651
27653
|
s(xZ, "syncStorybookAddons");
|
|
27652
|
-
async function Wx(t, A) {
|
|
27654
|
+
async function Wx(t, A, e) {
|
|
27653
27655
|
if (!Hx(A))
|
|
27654
27656
|
return A;
|
|
27655
|
-
let
|
|
27656
|
-
if (!
|
|
27657
|
+
let i = ud(t);
|
|
27658
|
+
if (!i)
|
|
27657
27659
|
return A;
|
|
27658
|
-
let
|
|
27659
|
-
for (let
|
|
27660
|
-
let
|
|
27661
|
-
if (
|
|
27660
|
+
let n = [], o = A.getFieldNode(["addons"]);
|
|
27661
|
+
for (let g of i) {
|
|
27662
|
+
let C = await Bd(g, e);
|
|
27663
|
+
if (C) {
|
|
27662
27664
|
if (A._ast.program.body.find(
|
|
27663
|
-
(
|
|
27665
|
+
(E) => zr.isImportDeclaration(E) && E.source.value === C.importPath
|
|
27664
27666
|
))
|
|
27665
27667
|
continue;
|
|
27666
|
-
(!
|
|
27667
|
-
(
|
|
27668
|
-
)) && (
|
|
27668
|
+
(!o || zr.isArrayExpression(o) && !o.elements.some(
|
|
27669
|
+
(E) => zr.isIdentifier(E) && E.name === C.importName
|
|
27670
|
+
)) && (n.push(g), C.isCoreAddon ? (A.setImport(C.importName, C.importPath), A.appendNodeToArray(
|
|
27669
27671
|
["addons"],
|
|
27670
|
-
zr.callExpression(zr.identifier(
|
|
27671
|
-
)) : (A.setImport({ namespace:
|
|
27672
|
+
zr.callExpression(zr.identifier(C.importName), [])
|
|
27673
|
+
)) : (A.setImport({ namespace: C.importName }, C.importPath), A.appendNodeToArray(["addons"], zr.identifier(C.importName))));
|
|
27672
27674
|
}
|
|
27673
27675
|
}
|
|
27674
|
-
return
|
|
27676
|
+
return n.length > 0 && zx.info(
|
|
27675
27677
|
`Synchronizing addons from main config in ${GC.default.cyan(A.fileName)}:
|
|
27676
|
-
${
|
|
27678
|
+
${n.map(GC.default.magenta).join(", ")}`
|
|
27677
27679
|
), A;
|
|
27678
27680
|
}
|
|
27679
27681
|
s(Wx, "getSyncedStorybookAddons");
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
2
|
+
var r = Object.defineProperty;
|
|
3
3
|
var s = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var y = Object.getOwnPropertyNames;
|
|
5
5
|
var m = Object.prototype.hasOwnProperty;
|
|
6
|
-
var p = (e, t) =>
|
|
6
|
+
var p = (e, t) => r(e, "name", { value: t, configurable: !0 });
|
|
7
7
|
var c = (e, t) => {
|
|
8
8
|
for (var o in t)
|
|
9
|
-
|
|
9
|
+
r(e, o, { get: t[o], enumerable: !0 });
|
|
10
10
|
}, u = (e, t, o, a) => {
|
|
11
11
|
if (t && typeof t == "object" || typeof t == "function")
|
|
12
|
-
for (let
|
|
13
|
-
!m.call(e,
|
|
12
|
+
for (let n of y(t))
|
|
13
|
+
!m.call(e, n) && n !== o && r(e, n, { get: () => t[n], enumerable: !(a = s(t, n)) || a.enumerable });
|
|
14
14
|
return e;
|
|
15
15
|
};
|
|
16
|
-
var f = (e) => u(
|
|
16
|
+
var f = (e) => u(r({}, "__esModule", { value: !0 }), e);
|
|
17
17
|
|
|
18
18
|
// src/component-testing/preview.ts
|
|
19
|
-
var
|
|
20
|
-
c(
|
|
19
|
+
var d = {};
|
|
20
|
+
c(d, {
|
|
21
21
|
default: () => b
|
|
22
22
|
});
|
|
23
|
-
module.exports = f(
|
|
24
|
-
var i = require("storybook/internal/
|
|
25
|
-
var { step: S } = (0,
|
|
23
|
+
module.exports = f(d);
|
|
24
|
+
var i = require("storybook/internal/csf"), l = require("storybook/internal/instrumenter");
|
|
25
|
+
var { step: S } = (0, l.instrument)(
|
|
26
26
|
{
|
|
27
27
|
// It seems like the label is unused, but the instrumenter has access to it
|
|
28
28
|
// The context will be bounded later in StoryRender, so that the user can write just:
|
|
@@ -32,7 +32,7 @@ var { step: S } = (0, i.instrument)(
|
|
|
32
32
|
step: /* @__PURE__ */ p(async (e, t, o) => t(o), "step")
|
|
33
33
|
},
|
|
34
34
|
{ intercept: !0 }
|
|
35
|
-
), b = /* @__PURE__ */ p(() => (0,
|
|
35
|
+
), b = /* @__PURE__ */ p(() => (0, i.definePreviewAddon)({
|
|
36
36
|
parameters: {
|
|
37
37
|
throwPlayFunctionExceptions: !1
|
|
38
38
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as storybook_internal_csf from 'storybook/internal/csf';
|
|
2
2
|
|
|
3
|
-
declare const _default: () =>
|
|
3
|
+
declare const _default: () => storybook_internal_csf.PreviewAddon<storybook_internal_csf.AddonTypes>;
|
|
4
4
|
|
|
5
5
|
export { _default as default };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var e = (o, t) =>
|
|
1
|
+
var r = Object.defineProperty;
|
|
2
|
+
var e = (o, t) => r(o, "name", { value: t, configurable: !0 });
|
|
3
3
|
|
|
4
4
|
// src/component-testing/preview.ts
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
var { step: i } =
|
|
5
|
+
import { definePreviewAddon as p } from "storybook/internal/csf";
|
|
6
|
+
import { instrument as a } from "storybook/internal/instrumenter";
|
|
7
|
+
var { step: i } = a(
|
|
8
8
|
{
|
|
9
9
|
// It seems like the label is unused, but the instrumenter has access to it
|
|
10
10
|
// The context will be bounded later in StoryRender, so that the user can write just:
|
|
11
11
|
// await step("label", (context) => {
|
|
12
12
|
// // labeled step
|
|
13
13
|
// });
|
|
14
|
-
step: /* @__PURE__ */ e(async (o, t,
|
|
14
|
+
step: /* @__PURE__ */ e(async (o, t, n) => t(n), "step")
|
|
15
15
|
},
|
|
16
16
|
{ intercept: !0 }
|
|
17
|
-
), m = /* @__PURE__ */ e(() =>
|
|
17
|
+
), m = /* @__PURE__ */ e(() => p({
|
|
18
18
|
parameters: {
|
|
19
19
|
throwPlayFunctionExceptions: !1
|
|
20
20
|
},
|
package/dist/controls/index.cjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
for (var
|
|
8
|
-
|
|
9
|
-
}, A = (t, o,
|
|
2
|
+
var c = Object.defineProperty;
|
|
3
|
+
var a = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var e = Object.getOwnPropertyNames;
|
|
5
|
+
var p = Object.prototype.hasOwnProperty;
|
|
6
|
+
var x = (t, o) => {
|
|
7
|
+
for (var n in o)
|
|
8
|
+
c(t, n, { get: o[n], enumerable: !0 });
|
|
9
|
+
}, A = (t, o, n, r) => {
|
|
10
10
|
if (o && typeof o == "object" || typeof o == "function")
|
|
11
|
-
for (let
|
|
12
|
-
!
|
|
11
|
+
for (let s of e(o))
|
|
12
|
+
!p.call(t, s) && s !== n && c(t, s, { get: () => o[s], enumerable: !(r = a(o, s)) || r.enumerable });
|
|
13
13
|
return t;
|
|
14
14
|
};
|
|
15
|
-
var D = (t) => A(
|
|
15
|
+
var D = (t) => A(c({}, "__esModule", { value: !0 }), t);
|
|
16
16
|
|
|
17
17
|
// src/controls/index.ts
|
|
18
|
-
var
|
|
19
|
-
|
|
18
|
+
var _ = {};
|
|
19
|
+
x(_, {
|
|
20
20
|
ADDON_ID: () => d,
|
|
21
|
-
PARAM_KEY: () =>
|
|
21
|
+
PARAM_KEY: () => l
|
|
22
22
|
});
|
|
23
|
-
module.exports = D(
|
|
23
|
+
module.exports = D(_);
|
|
24
24
|
|
|
25
25
|
// src/controls/constants.ts
|
|
26
|
-
var d = "addon-controls",
|
|
26
|
+
var d = "addon-controls", l = "controls";
|
package/dist/controls/index.d.ts
CHANGED
|
@@ -1,39 +1,4 @@
|
|
|
1
1
|
declare const ADDON_ID: "addon-controls";
|
|
2
2
|
declare const PARAM_KEY: "controls";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Controls configuration
|
|
7
|
-
*
|
|
8
|
-
* @see https://storybook.js.org/docs/essentials/controls#parameters-1
|
|
9
|
-
*/
|
|
10
|
-
controls: {
|
|
11
|
-
/** Remove the addon panel and disable the addon's behavior */
|
|
12
|
-
disable?: boolean;
|
|
13
|
-
/** Disable the ability to create or edit stories from the Controls panel */
|
|
14
|
-
disableSaveFromUI?: boolean;
|
|
15
|
-
/** Exclude specific properties from the Controls panel */
|
|
16
|
-
exclude?: string[] | RegExp;
|
|
17
|
-
/**
|
|
18
|
-
* Show the full documentation for each property in the Controls addon panel, including the
|
|
19
|
-
* description and default value.
|
|
20
|
-
*/
|
|
21
|
-
expanded?: boolean;
|
|
22
|
-
/** Exclude only specific properties in the Controls panel */
|
|
23
|
-
include?: string[] | RegExp;
|
|
24
|
-
/**
|
|
25
|
-
* Preset color swatches for the color picker control
|
|
26
|
-
*
|
|
27
|
-
* @example PresetColors: [{ color: '#ff4785', title: 'Coral' }, 'rgba(0, 159, 183, 1)',
|
|
28
|
-
* '#fe4a49']
|
|
29
|
-
*/
|
|
30
|
-
presetColors?: Array<string | {
|
|
31
|
-
color: string;
|
|
32
|
-
title?: string;
|
|
33
|
-
}>;
|
|
34
|
-
/** Controls sorting order */
|
|
35
|
-
sort?: 'none' | 'alpha' | 'requiredFirst';
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export { ADDON_ID, type ControlsParameters, PARAM_KEY };
|
|
4
|
+
export { ADDON_ID, PARAM_KEY };
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
for (var
|
|
8
|
-
o
|
|
9
|
-
},
|
|
2
|
+
var p = Object.defineProperty;
|
|
3
|
+
var f = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var i = Object.getOwnPropertyNames;
|
|
5
|
+
var m = Object.prototype.hasOwnProperty;
|
|
6
|
+
var n = (o, e) => {
|
|
7
|
+
for (var t in e)
|
|
8
|
+
p(o, t, { get: e[t], enumerable: !0 });
|
|
9
|
+
}, y = (o, e, t, s) => {
|
|
10
10
|
if (e && typeof e == "object" || typeof e == "function")
|
|
11
|
-
for (let
|
|
12
|
-
!
|
|
13
|
-
return
|
|
11
|
+
for (let r of i(e))
|
|
12
|
+
!m.call(o, r) && r !== t && p(o, r, { get: () => e[r], enumerable: !(s = f(e, r)) || s.enumerable });
|
|
13
|
+
return o;
|
|
14
14
|
};
|
|
15
|
-
var
|
|
15
|
+
var l = (o) => y(p({}, "__esModule", { value: !0 }), o);
|
|
16
16
|
|
|
17
17
|
// src/controls/preview.ts
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
default: () =>
|
|
18
|
+
var T = {};
|
|
19
|
+
n(T, {
|
|
20
|
+
default: () => C
|
|
21
21
|
});
|
|
22
|
-
module.exports =
|
|
23
|
-
var d = require("storybook/
|
|
22
|
+
module.exports = l(T);
|
|
23
|
+
var d = require("storybook/internal/csf"), C = (0, d.definePreviewAddon)({
|
|
24
24
|
// Controls addon doesn't need any preview-side configuration
|
|
25
25
|
// It operates entirely through the manager UI
|
|
26
26
|
});
|