storybook 10.0.0-beta.1 → 10.0.0-beta.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/assets/server/openBrowser.applescript +94 -0
- package/dist/_browser-chunks/Color-KPLIACXP.js +1569 -0
- package/dist/_browser-chunks/{WithTooltip-ERFLZL6W.js → WithTooltip-SK46ZJ2J.js} +1 -1
- package/dist/_browser-chunks/{chunk-YY5GICNT.js → chunk-6E2SHJSL.js} +175 -32
- package/dist/_browser-chunks/{chunk-EOILZP2R.js → chunk-BOOOPFZF.js} +7 -2
- package/dist/_browser-chunks/{chunk-YWDKX534.js → chunk-FA42P6MO.js} +49 -4
- package/dist/_browser-chunks/chunk-G33S6YM3.js +521 -0
- package/dist/_browser-chunks/{chunk-MZNYTCNT.js → chunk-HMIIJ6UD.js} +6 -6
- package/dist/_browser-chunks/{chunk-4QPX7WIQ.js → chunk-JJZMHC3A.js} +57 -166
- package/dist/_browser-chunks/{chunk-MD2FTHCZ.js → chunk-JVSKG4YS.js} +3 -16
- package/dist/_browser-chunks/{chunk-E7VLET3C.js → chunk-KSCAWCCE.js} +3947 -4291
- package/dist/_browser-chunks/{chunk-PYK5ZTFK.js → chunk-PS3AOQI4.js} +48 -25
- package/dist/_browser-chunks/chunk-QK3L5AXO.js +372 -0
- package/dist/_browser-chunks/chunk-SHR3NNR3.js +5810 -0
- package/dist/_browser-chunks/{chunk-O5R5CGFA.js → chunk-TMDZCWME.js} +1 -2
- package/dist/_browser-chunks/chunk-VUAFL5XK.js +20 -0
- package/dist/_browser-chunks/{chunk-T7RCAJIX.js → chunk-Y3M7TW6K.js} +43 -47
- package/dist/_browser-chunks/{syntaxhighlighter-YYAA4CS4.js → syntaxhighlighter-R46XOLMC.js} +1 -1
- package/dist/_node-chunks/{builder-manager-EXW4ETLN.js → builder-manager-SJGIDEN6.js} +45 -155
- package/dist/_node-chunks/camelcase-VZHWABQV.js +18 -0
- package/dist/_node-chunks/{chunk-F5J33SXQ.js → chunk-6CZW7AGN.js} +7 -7
- package/dist/_node-chunks/{chunk-2G5THETV.js → chunk-6XT5OLNL.js} +12 -12
- package/dist/_node-chunks/{chunk-U45F2NP6.js → chunk-AHRH5RPR.js} +7 -7
- package/dist/_node-chunks/{chunk-ICPKUV5G.js → chunk-AOH6ABSV.js} +7 -7
- package/dist/_node-chunks/chunk-C5V22GP7.js +79 -0
- package/dist/_node-chunks/{chunk-5V6QH7WC.js → chunk-FIROF4DV.js} +7 -7
- package/dist/_node-chunks/{chunk-WDKWVNL2.js → chunk-GUJVZUYI.js} +7 -7
- package/dist/_node-chunks/chunk-IHPLRRAR.js +4741 -0
- package/dist/_node-chunks/{chunk-PMEEE3UE.js → chunk-JMXKCRWR.js} +30 -21
- package/dist/_node-chunks/{chunk-5ZX5SJOP.js → chunk-JUMUXWEV.js} +162 -103
- package/dist/_node-chunks/{chunk-CM3UGTR5.js → chunk-KGX33KXX.js} +7 -7
- package/dist/_node-chunks/{chunk-6CCUFDHU.js → chunk-KLVABNEU.js} +7 -7
- package/dist/_node-chunks/{chunk-EO4S3VXL.js → chunk-OL6DY6BT.js} +653 -775
- package/dist/_node-chunks/{chunk-GVCXNIAA.js → chunk-ONJV3K2L.js} +399 -116
- package/dist/_node-chunks/{chunk-3ZKQWDCG.js → chunk-PTHTD4RO.js} +223 -243
- package/dist/_node-chunks/{chunk-VNLBDN2Z.js → chunk-QQ3Z5KGJ.js} +6 -6
- package/dist/_node-chunks/{chunk-2QZOLZDJ.js → chunk-QRTDDTZJ.js} +9 -9
- package/dist/_node-chunks/chunk-R54K4KSM.js +1540 -0
- package/dist/_node-chunks/{chunk-24TGL6EX.js → chunk-S2LZC6JK.js} +8 -8
- package/dist/_node-chunks/chunk-SFJFSPRT.js +62 -0
- package/dist/_node-chunks/{chunk-SUMFFLGF.js → chunk-SSN5PKIY.js} +6 -6
- package/dist/_node-chunks/{chunk-QC5FE2D7.js → chunk-SXR2DITB.js} +7 -7
- package/dist/_node-chunks/{chunk-FZP2YGG3.js → chunk-TH5QVQRL.js} +7 -7
- package/dist/_node-chunks/chunk-U34NWAU2.js +18 -0
- package/dist/_node-chunks/{chunk-XTSBFCVE.js → chunk-UV3CZ3KS.js} +7 -7
- package/dist/_node-chunks/{chunk-PL2PKDRO.js → chunk-UVUGJDAI.js} +60 -102
- package/dist/_node-chunks/{chunk-EDBXIJN5.js → chunk-VOUNSD2E.js} +7 -7
- package/dist/_node-chunks/{chunk-WP7DV5JT.js → chunk-WFCPBKQJ.js} +583 -180
- package/dist/_node-chunks/{chunk-4WNZYNQY.js → chunk-XHF3WWNP.js} +623 -750
- package/dist/_node-chunks/{chunk-3SGKBLOL.js → chunk-XU45KXNQ.js} +8 -8
- package/dist/_node-chunks/{camelcase-VZZFWA2L.js → chunk-YHO6XR7U.js} +9 -8
- package/dist/_node-chunks/{dist-VZL6D6Y3.js → dist-IIC5PBL7.js} +9 -9
- package/dist/_node-chunks/{globby-GZXJJ4W6.js → globby-CJACC3HJ.js} +17 -13
- package/dist/_node-chunks/{lib-PHT5GCV2.js → lib-ZY4TKSOR.js} +40 -16
- package/dist/_node-chunks/{mdx-N42X6CFJ-EPDIV4A2.js → mdx-N42X6CFJ-3XNW3DFO.js} +8 -8
- package/dist/_node-chunks/{p-limit-AJIFSZTI.js → p-limit-R2OFT5HE.js} +76 -10
- package/dist/_node-chunks/{plugin-3VI56CEF.js → plugin-5XD5R2KD.js} +10 -10
- package/dist/_node-chunks/{plugin-AV4OEKYM.js → plugin-WAWVQMVR.js} +10 -10
- package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-E7J5FKLA.js → webpack-inject-mocker-runtime-plugin-SCRGJLIS.js} +1307 -847
- package/dist/_node-chunks/{webpack-mock-plugin-VTYGW7HO.js → webpack-mock-plugin-3VAXEGG2.js} +9 -9
- package/dist/babel/index.d.ts +1 -1
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +638 -187
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +8 -8
- package/dist/cli/index.d.ts +62 -75
- package/dist/cli/index.js +66 -55
- package/dist/common/index.d.ts +3 -1
- package/dist/common/index.js +22 -22
- package/dist/components/index.d.ts +228 -1
- package/dist/components/index.js +74 -5738
- package/dist/core-events/index.d.ts +18 -2
- package/dist/core-events/index.js +7 -1
- package/dist/core-server/index.d.ts +515 -14
- package/dist/core-server/index.js +4647 -4182
- package/dist/core-server/presets/common-manager.js +1570 -1272
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +691 -38
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
- package/dist/csf/index.d.ts +9 -4
- package/dist/csf/index.js +50 -15
- package/dist/csf-tools/index.d.ts +47 -6
- package/dist/csf-tools/index.js +9 -9
- package/dist/docs-tools/index.js +4 -4
- package/dist/instrumenter/index.js +1 -1
- package/dist/manager/globals-runtime.js +9230 -18109
- package/dist/manager/globals.d.ts +0 -4
- package/dist/manager/globals.js +1 -6
- package/dist/manager/runtime.js +13398 -11573
- package/dist/manager-api/index.d.ts +513 -5
- package/dist/manager-api/index.js +364 -90
- package/dist/manager-errors.d.ts +501 -0
- package/dist/node-logger/index.d.ts +1 -1
- package/dist/node-logger/index.js +1136 -662
- package/dist/preview/globals.js +1 -1
- package/dist/preview/runtime.js +12103 -21579
- package/dist/preview-api/index.d.ts +3 -3
- package/dist/preview-api/index.js +10 -10
- package/dist/preview-errors.d.ts +501 -0
- package/dist/router/index.d.ts +668 -10
- package/dist/router/index.js +2 -2
- package/dist/server-errors.d.ts +501 -0
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +23 -25
- package/dist/test/index.js +1874 -4024
- package/dist/theming/index.d.ts +2 -2
- package/dist/theming/index.js +6 -6
- package/dist/types/index.d.ts +553 -16
- package/dist/viewport/index.d.ts +36 -4
- package/dist/viewport/index.js +1 -1
- package/package.json +9 -46
- package/dist/_browser-chunks/Color-SFYJJKWL.js +0 -605
- package/dist/_browser-chunks/chunk-DHO2SA6L.js +0 -12
- package/dist/_browser-chunks/chunk-WPHPDNUA.js +0 -974
- package/dist/_node-chunks/chunk-32JYCD74.js +0 -80
- package/dist/_node-chunks/chunk-GE6I3YYG.js +0 -62
- package/dist/_node-chunks/chunk-KXCNXWXI.js +0 -18
- package/dist/_node-chunks/chunk-LAUOYAOX.js +0 -87
- package/dist/_node-chunks/chunk-QJTT4OC2.js +0 -266
- package/dist/_node-chunks/chunk-V2ZF4DUD.js +0 -2377
- package/dist/_node-chunks/chunk-ZMV3WY6R.js +0 -9845
- package/dist/_node-chunks/default-browser-id-JNATP42X.js +0 -1719
package/dist/cli/index.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kzg6jc8bd2 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kzg6jc8bd2 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kzg6jc8bd2 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kzg6jc8bd2.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kzg6jc8bd2.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kzg6jc8bd2.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
boxen
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-XHF3WWNP.js";
|
|
15
|
+
import "../_node-chunks/chunk-YHO6XR7U.js";
|
|
15
16
|
import {
|
|
16
17
|
Settings,
|
|
17
18
|
_clearGlobalSettings,
|
|
18
19
|
globalSettings
|
|
19
|
-
} from "../_node-chunks/chunk-
|
|
20
|
+
} from "../_node-chunks/chunk-PTHTD4RO.js";
|
|
20
21
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} from "../_node-chunks/chunk-
|
|
24
|
-
import "../_node-chunks/chunk-LAUOYAOX.js";
|
|
22
|
+
any,
|
|
23
|
+
up2 as up
|
|
24
|
+
} from "../_node-chunks/chunk-C5V22GP7.js";
|
|
25
25
|
import {
|
|
26
26
|
invariant
|
|
27
|
-
} from "../_node-chunks/chunk-
|
|
27
|
+
} from "../_node-chunks/chunk-KGX33KXX.js";
|
|
28
28
|
import {
|
|
29
29
|
resolvePackageDir
|
|
30
|
-
} from "../_node-chunks/chunk-
|
|
31
|
-
import "../_node-chunks/chunk-
|
|
30
|
+
} from "../_node-chunks/chunk-R54K4KSM.js";
|
|
31
|
+
import "../_node-chunks/chunk-AOH6ABSV.js";
|
|
32
32
|
import {
|
|
33
33
|
require_prompts
|
|
34
|
-
} from "../_node-chunks/chunk-
|
|
34
|
+
} from "../_node-chunks/chunk-UV3CZ3KS.js";
|
|
35
35
|
import {
|
|
36
36
|
require_dist
|
|
37
|
-
} from "../_node-chunks/chunk-
|
|
37
|
+
} from "../_node-chunks/chunk-GUJVZUYI.js";
|
|
38
38
|
import {
|
|
39
39
|
babelParse,
|
|
40
40
|
recast,
|
|
41
41
|
traverse,
|
|
42
42
|
types
|
|
43
|
-
} from "../_node-chunks/chunk-
|
|
44
|
-
import "../_node-chunks/chunk-
|
|
45
|
-
import "../_node-chunks/chunk-
|
|
43
|
+
} from "../_node-chunks/chunk-WFCPBKQJ.js";
|
|
44
|
+
import "../_node-chunks/chunk-JUMUXWEV.js";
|
|
45
|
+
import "../_node-chunks/chunk-VOUNSD2E.js";
|
|
46
46
|
import {
|
|
47
47
|
require_picocolors
|
|
48
|
-
} from "../_node-chunks/chunk-
|
|
48
|
+
} from "../_node-chunks/chunk-FIROF4DV.js";
|
|
49
49
|
import {
|
|
50
50
|
__commonJS,
|
|
51
51
|
__name,
|
|
52
52
|
__require,
|
|
53
53
|
__toESM
|
|
54
|
-
} from "../_node-chunks/chunk-
|
|
54
|
+
} from "../_node-chunks/chunk-SSN5PKIY.js";
|
|
55
55
|
|
|
56
56
|
// ../node_modules/wrappy/wrappy.js
|
|
57
57
|
var require_wrappy = __commonJS({
|
|
@@ -137,6 +137,7 @@ var require_end_of_stream = __commonJS({
|
|
|
137
137
|
var once = require_once();
|
|
138
138
|
var noop = /* @__PURE__ */ __name(function() {
|
|
139
139
|
}, "noop");
|
|
140
|
+
var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process);
|
|
140
141
|
var isRequest = /* @__PURE__ */ __name(function(stream) {
|
|
141
142
|
return stream.setHeader && typeof stream.abort === "function";
|
|
142
143
|
}, "isRequest");
|
|
@@ -170,7 +171,7 @@ var require_end_of_stream = __commonJS({
|
|
|
170
171
|
callback.call(stream, err);
|
|
171
172
|
}, "onerror");
|
|
172
173
|
var onclose = /* @__PURE__ */ __name(function() {
|
|
173
|
-
|
|
174
|
+
qnt(onclosenexttick);
|
|
174
175
|
}, "onclose");
|
|
175
176
|
var onclosenexttick = /* @__PURE__ */ __name(function() {
|
|
176
177
|
if (cancelled) return;
|
|
@@ -225,7 +226,7 @@ var require_pump = __commonJS({
|
|
|
225
226
|
}
|
|
226
227
|
var noop = /* @__PURE__ */ __name(function() {
|
|
227
228
|
}, "noop");
|
|
228
|
-
var ancient = /^v?\.0/.test(process.version);
|
|
229
|
+
var ancient = typeof process === "undefined" ? false : /^v?\.0/.test(process.version);
|
|
229
230
|
var isFn = /* @__PURE__ */ __name(function(fn) {
|
|
230
231
|
return typeof fn === "function";
|
|
231
232
|
}, "isFn");
|
|
@@ -4644,7 +4645,7 @@ var require_tar_fs = __commonJS({
|
|
|
4644
4645
|
if (win32) return next();
|
|
4645
4646
|
xfs.unlink(name, function() {
|
|
4646
4647
|
var dst = path.resolve(path.dirname(name), header.linkname);
|
|
4647
|
-
if (!dst
|
|
4648
|
+
if (!inCwd(dst, cwd)) return next(new Error(name + " is not a valid symlink"));
|
|
4648
4649
|
xfs.symlink(header.linkname, name, stat);
|
|
4649
4650
|
});
|
|
4650
4651
|
}, "onsymlink");
|
|
@@ -4652,12 +4653,15 @@ var require_tar_fs = __commonJS({
|
|
|
4652
4653
|
if (win32) return next();
|
|
4653
4654
|
xfs.unlink(name, function() {
|
|
4654
4655
|
var srcpath = path.join(cwd, path.join("/", header.linkname));
|
|
4655
|
-
xfs.
|
|
4656
|
-
if (err
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4656
|
+
xfs.realpath(srcpath, function(err, dst) {
|
|
4657
|
+
if (err || !inCwd(dst, cwd)) return next(new Error(name + " is not a valid hardlink"));
|
|
4658
|
+
xfs.link(dst, name, function(err2) {
|
|
4659
|
+
if (err2 && err2.code === "EPERM" && opts.hardlinkAsFilesFallback) {
|
|
4660
|
+
stream = xfs.createReadStream(srcpath);
|
|
4661
|
+
return onfile();
|
|
4662
|
+
}
|
|
4663
|
+
stat(err2);
|
|
4664
|
+
});
|
|
4661
4665
|
});
|
|
4662
4666
|
});
|
|
4663
4667
|
}, "onlink");
|
|
@@ -4728,6 +4732,11 @@ var require_tar_fs = __commonJS({
|
|
|
4728
4732
|
});
|
|
4729
4733
|
}
|
|
4730
4734
|
__name(mkdirfix, "mkdirfix");
|
|
4735
|
+
function inCwd(dst, cwd) {
|
|
4736
|
+
cwd = path.resolve(cwd);
|
|
4737
|
+
return cwd === dst || dst.startsWith(cwd + path.sep);
|
|
4738
|
+
}
|
|
4739
|
+
__name(inCwd, "inCwd");
|
|
4731
4740
|
}
|
|
4732
4741
|
});
|
|
4733
4742
|
|
|
@@ -27462,7 +27471,7 @@ import { coerce, satisfies } from "semver";
|
|
|
27462
27471
|
var singleComment = Symbol("singleComment");
|
|
27463
27472
|
var multiComment = Symbol("multiComment");
|
|
27464
27473
|
var stripWithoutWhitespace = /* @__PURE__ */ __name(() => "", "stripWithoutWhitespace");
|
|
27465
|
-
var stripWithWhitespace = /* @__PURE__ */ __name((string, start, end) => string.slice(start, end).replace(
|
|
27474
|
+
var stripWithWhitespace = /* @__PURE__ */ __name((string, start, end) => string.slice(start, end).replace(/[^ \t\r\n]/g, " "), "stripWithWhitespace");
|
|
27466
27475
|
var isEscaped = /* @__PURE__ */ __name((jsonString, quotePosition) => {
|
|
27467
27476
|
let index = quotePosition - 1;
|
|
27468
27477
|
let backslashCount = 0;
|
|
@@ -27543,7 +27552,8 @@ function stripJsonComments(jsonString, { whitespace = true, trailingCommas = fal
|
|
|
27543
27552
|
}
|
|
27544
27553
|
}
|
|
27545
27554
|
}
|
|
27546
|
-
|
|
27555
|
+
const remaining = isInsideComment === singleComment ? strip(jsonString, offset) : jsonString.slice(offset);
|
|
27556
|
+
return result + buffer + remaining;
|
|
27547
27557
|
}
|
|
27548
27558
|
__name(stripJsonComments, "stripJsonComments");
|
|
27549
27559
|
|
|
@@ -28010,7 +28020,7 @@ async function adjustTemplate(templatePath, templateData) {
|
|
|
28010
28020
|
}
|
|
28011
28021
|
__name(adjustTemplate, "adjustTemplate");
|
|
28012
28022
|
async function isNxProject() {
|
|
28013
|
-
return
|
|
28023
|
+
return up("nx.json", { last: getProjectRoot() });
|
|
28014
28024
|
}
|
|
28015
28025
|
__name(isNxProject, "isNxProject");
|
|
28016
28026
|
function coerceSemver(version) {
|
|
@@ -28084,8 +28094,8 @@ function detectFrameworkPreset(packageJson = {}) {
|
|
|
28084
28094
|
}
|
|
28085
28095
|
__name(detectFrameworkPreset, "detectFrameworkPreset");
|
|
28086
28096
|
async function detectBuilder(packageManager, projectType) {
|
|
28087
|
-
const viteConfig =
|
|
28088
|
-
const webpackConfig =
|
|
28097
|
+
const viteConfig = any(viteConfigFiles, { last: getProjectRoot2() });
|
|
28098
|
+
const webpackConfig = any(webpackConfigFiles, { last: getProjectRoot2() });
|
|
28089
28099
|
const dependencies = packageManager.getAllDependencies();
|
|
28090
28100
|
if (viteConfig || dependencies.vite && dependencies.webpack === void 0) {
|
|
28091
28101
|
commandLog("Detected Vite project. Setting builder to Vite")();
|
|
@@ -28133,7 +28143,7 @@ function isStorybookInstantiated(configDir = resolve2(process.cwd(), ".storybook
|
|
|
28133
28143
|
}
|
|
28134
28144
|
__name(isStorybookInstantiated, "isStorybookInstantiated");
|
|
28135
28145
|
async function detectPnp() {
|
|
28136
|
-
return !!
|
|
28146
|
+
return !!any([".pnp.js", ".pnp.cjs"]);
|
|
28137
28147
|
}
|
|
28138
28148
|
__name(detectPnp, "detectPnp");
|
|
28139
28149
|
async function detectLanguage(packageManager) {
|
|
@@ -28324,6 +28334,10 @@ import { logger as logger4, prompt } from "storybook/internal/node-logger";
|
|
|
28324
28334
|
var INDENT_REGEX = /^(?:( )+|\t+)/;
|
|
28325
28335
|
var INDENT_TYPE_SPACE = "space";
|
|
28326
28336
|
var INDENT_TYPE_TAB = "tab";
|
|
28337
|
+
function shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, value) {
|
|
28338
|
+
return ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && value === 1;
|
|
28339
|
+
}
|
|
28340
|
+
__name(shouldIgnoreSingleSpace, "shouldIgnoreSingleSpace");
|
|
28327
28341
|
function makeIndentsMap(string, ignoreSingleSpaces) {
|
|
28328
28342
|
const indents = /* @__PURE__ */ new Map();
|
|
28329
28343
|
let previousSize = 0;
|
|
@@ -28333,39 +28347,36 @@ function makeIndentsMap(string, ignoreSingleSpaces) {
|
|
|
28333
28347
|
if (!line) {
|
|
28334
28348
|
continue;
|
|
28335
28349
|
}
|
|
28336
|
-
let indent;
|
|
28337
|
-
let indentType;
|
|
28338
|
-
let use;
|
|
28339
|
-
let weight;
|
|
28340
|
-
let entry;
|
|
28341
28350
|
const matches = line.match(INDENT_REGEX);
|
|
28342
28351
|
if (matches === null) {
|
|
28343
28352
|
previousSize = 0;
|
|
28344
28353
|
previousIndentType = "";
|
|
28345
28354
|
} else {
|
|
28346
|
-
indent = matches[0].length;
|
|
28347
|
-
indentType = matches[1] ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB;
|
|
28348
|
-
if (ignoreSingleSpaces
|
|
28355
|
+
const indent = matches[0].length;
|
|
28356
|
+
const indentType = matches[1] ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB;
|
|
28357
|
+
if (shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, indent)) {
|
|
28349
28358
|
continue;
|
|
28350
28359
|
}
|
|
28351
28360
|
if (indentType !== previousIndentType) {
|
|
28352
28361
|
previousSize = 0;
|
|
28353
28362
|
}
|
|
28354
28363
|
previousIndentType = indentType;
|
|
28355
|
-
use = 1;
|
|
28356
|
-
weight = 0;
|
|
28364
|
+
let use = 1;
|
|
28365
|
+
let weight = 0;
|
|
28357
28366
|
const indentDifference = indent - previousSize;
|
|
28358
28367
|
previousSize = indent;
|
|
28359
28368
|
if (indentDifference === 0) {
|
|
28360
28369
|
use = 0;
|
|
28361
28370
|
weight = 1;
|
|
28362
28371
|
} else {
|
|
28363
|
-
const absoluteIndentDifference = indentDifference
|
|
28372
|
+
const absoluteIndentDifference = Math.abs(indentDifference);
|
|
28373
|
+
if (shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, absoluteIndentDifference)) {
|
|
28374
|
+
continue;
|
|
28375
|
+
}
|
|
28364
28376
|
key = encodeIndentsKey(indentType, absoluteIndentDifference);
|
|
28365
28377
|
}
|
|
28366
|
-
entry = indents.get(key);
|
|
28367
|
-
|
|
28368
|
-
indents.set(key, entry);
|
|
28378
|
+
const entry = indents.get(key);
|
|
28379
|
+
indents.set(key, entry === void 0 ? [1, 0] : [entry[0] + use, entry[1] + weight]);
|
|
28369
28380
|
}
|
|
28370
28381
|
}
|
|
28371
28382
|
return indents;
|
|
@@ -28431,11 +28442,11 @@ var import_picocolors2 = __toESM(require_picocolors(), 1);
|
|
|
28431
28442
|
var import_ts_dedent2 = __toESM(require_dist(), 1);
|
|
28432
28443
|
var SUPPORTED_ESLINT_EXTENSIONS = ["ts", "mts", "cts", "mjs", "js", "cjs", "json"];
|
|
28433
28444
|
var UNSUPPORTED_ESLINT_EXTENSIONS = ["yaml", "yml"];
|
|
28434
|
-
var findEslintFile = /* @__PURE__ */ __name(
|
|
28445
|
+
var findEslintFile = /* @__PURE__ */ __name((instanceDir) => {
|
|
28435
28446
|
const filePrefixes = ["eslint.config", ".eslintrc"];
|
|
28436
28447
|
for (const prefix of filePrefixes) {
|
|
28437
28448
|
for (const ext of UNSUPPORTED_ESLINT_EXTENSIONS) {
|
|
28438
|
-
const file =
|
|
28449
|
+
const file = up(`${prefix}.${ext}`, { cwd: instanceDir, last: getProjectRoot3() });
|
|
28439
28450
|
if (file) {
|
|
28440
28451
|
throw new Error(`Unsupported ESLint config extension: .${ext}`);
|
|
28441
28452
|
}
|
|
@@ -28443,7 +28454,7 @@ var findEslintFile = /* @__PURE__ */ __name(async (instanceDir) => {
|
|
|
28443
28454
|
}
|
|
28444
28455
|
for (const prefix of filePrefixes) {
|
|
28445
28456
|
for (const ext of SUPPORTED_ESLINT_EXTENSIONS) {
|
|
28446
|
-
const file =
|
|
28457
|
+
const file = up(`${prefix}.${ext}`, { cwd: instanceDir, last: getProjectRoot3() });
|
|
28447
28458
|
if (file) {
|
|
28448
28459
|
return file;
|
|
28449
28460
|
}
|
|
@@ -28525,7 +28536,7 @@ async function extractEslintInfo(packageManager) {
|
|
|
28525
28536
|
const { packageJson } = packageManager.primaryPackageJson;
|
|
28526
28537
|
let eslintConfigFile = void 0;
|
|
28527
28538
|
try {
|
|
28528
|
-
eslintConfigFile =
|
|
28539
|
+
eslintConfigFile = findEslintFile(packageManager.instanceDir);
|
|
28529
28540
|
} catch (err) {
|
|
28530
28541
|
if (err instanceof Error && err.message.includes("Unsupported ESLint")) {
|
|
28531
28542
|
unsupportedExtension = String(err);
|
package/dist/common/index.d.ts
CHANGED
|
@@ -1140,6 +1140,8 @@ declare const normalizeStories: (entries: StoriesEntry[], options: NormalizeOpti
|
|
|
1140
1140
|
|
|
1141
1141
|
declare const getProjectRoot: () => string;
|
|
1142
1142
|
declare const invalidateProjectRootCache: () => void;
|
|
1143
|
+
/** Finds files in the directory tree up to the project root */
|
|
1144
|
+
declare const findFilesUp: (matchers: string[], baseDir?: string) => string[];
|
|
1143
1145
|
declare const nodePathsToArray: (nodePath: string) => string[];
|
|
1144
1146
|
/** Ensures that a path starts with `./` or `../`, or is entirely `.` or `..` */
|
|
1145
1147
|
declare function normalizeStoryPath(filename: string): string;
|
|
@@ -1301,4 +1303,4 @@ declare const safeResolveModule: ({ specifier, parent, extensions, }: {
|
|
|
1301
1303
|
extensions?: string[];
|
|
1302
1304
|
}) => string | undefined;
|
|
1303
1305
|
|
|
1304
|
-
export { COMMON_ENV_VARS, DEFAULT_FILES_PATTERN, type FileOptions, FileSystemCache, HandledError, type InstallationMetadata, JsPackageManager, JsPackageManagerFactory, type PackageJsonInfo, type PackageJsonWithDepsAndDevDeps, type PackageJsonWithMaybeDeps, type PackageManagerName, type PackageMetadata, type RemoveAddonOptions, builderPackages, cache, checkAddonOrder, codeLog, commandLog, commonGlobOptions, createFileSystemCache, createLogStream, extractProperFrameworkName, extractProperRendererNameFromFramework, filterPresetsConfig, findConfigFile, formatFileContent, frameworkPackages, frameworkToRenderer, getAddonNames, getAutoRefs, getBuilderOptions, getChars, getCoercedStorybookVersion, getConfigInfo, getDirectoryFromWorkingDir, getEnvConfig, getFrameworkName, getInterpretedFile, getPackageDetails, getPresets, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStoryId, getStoryTitle, getStorybookConfiguration, getStorybookInfo, getSyncedStorybookAddons, globToRegexp, importMetaResolve, importModule, interpolate, invalidateProjectRootCache, isCI, isCorePackage, isPreservingSymlinks, isSatelliteAddon, loadAllPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, optionalEnvToBoolean, paddedLog, parseList, posix, readTemplate, removeAddon, rendererPackages, resolveAddonName, resolvePackageDir, resolvePathInStorybookCache, safeResolveModule, satisfies, scanAndTransformFiles, serverRequire, stringifyEnvs, stringifyProcessEnvs, supportedExtensions, syncStorybookAddons, temporaryDirectory, temporaryFile, transformImportFiles, validateConfigurationFiles, validateFrameworkName, _default as versions };
|
|
1306
|
+
export { COMMON_ENV_VARS, DEFAULT_FILES_PATTERN, type FileOptions, FileSystemCache, HandledError, type InstallationMetadata, JsPackageManager, JsPackageManagerFactory, type PackageJsonInfo, type PackageJsonWithDepsAndDevDeps, type PackageJsonWithMaybeDeps, type PackageManagerName, type PackageMetadata, type RemoveAddonOptions, builderPackages, cache, checkAddonOrder, codeLog, commandLog, commonGlobOptions, createFileSystemCache, createLogStream, extractProperFrameworkName, extractProperRendererNameFromFramework, filterPresetsConfig, findConfigFile, findFilesUp, formatFileContent, frameworkPackages, frameworkToRenderer, getAddonNames, getAutoRefs, getBuilderOptions, getChars, getCoercedStorybookVersion, getConfigInfo, getDirectoryFromWorkingDir, getEnvConfig, getFrameworkName, getInterpretedFile, getPackageDetails, getPresets, getPreviewBodyTemplate, getPreviewHeadTemplate, getProjectRoot, getRefs, getRendererName, getStoryId, getStoryTitle, getStorybookConfiguration, getStorybookInfo, getSyncedStorybookAddons, globToRegexp, importMetaResolve, importModule, interpolate, invalidateProjectRootCache, isCI, isCorePackage, isPreservingSymlinks, isSatelliteAddon, loadAllPresets, loadEnvs, loadMainConfig, loadManagerOrAddonsFile, loadPreset, loadPreviewOrConfigFile, logConfig, nodePathsToArray, normalizeStories, normalizeStoriesEntry, normalizeStoryPath, optionalEnvToBoolean, paddedLog, parseList, posix, readTemplate, removeAddon, rendererPackages, resolveAddonName, resolvePackageDir, resolvePathInStorybookCache, safeResolveModule, satisfies, scanAndTransformFiles, serverRequire, stringifyEnvs, stringifyProcessEnvs, supportedExtensions, syncStorybookAddons, temporaryDirectory, temporaryFile, transformImportFiles, validateConfigurationFiles, validateFrameworkName, _default as versions };
|
package/dist/common/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kzg6jc8bd2 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kzg6jc8bd2 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kzg6jc8bd2 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kzg6jc8bd2.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kzg6jc8bd2.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kzg6jc8bd2.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -83,13 +83,13 @@ import {
|
|
|
83
83
|
transformImportFiles,
|
|
84
84
|
validateConfigurationFiles,
|
|
85
85
|
validateFrameworkName
|
|
86
|
-
} from "../_node-chunks/chunk-
|
|
87
|
-
import "../_node-chunks/chunk-
|
|
88
|
-
import "../_node-chunks/chunk-ZMV3WY6R.js";
|
|
86
|
+
} from "../_node-chunks/chunk-OL6DY6BT.js";
|
|
87
|
+
import "../_node-chunks/chunk-TH5QVQRL.js";
|
|
89
88
|
import {
|
|
90
89
|
versions_default
|
|
91
|
-
} from "../_node-chunks/chunk-
|
|
90
|
+
} from "../_node-chunks/chunk-SFJFSPRT.js";
|
|
92
91
|
import {
|
|
92
|
+
findFilesUp,
|
|
93
93
|
getProjectRoot,
|
|
94
94
|
invalidateProjectRootCache,
|
|
95
95
|
isCI,
|
|
@@ -99,23 +99,22 @@ import {
|
|
|
99
99
|
optionalEnvToBoolean,
|
|
100
100
|
stringifyEnvs,
|
|
101
101
|
stringifyProcessEnvs
|
|
102
|
-
} from "../_node-chunks/chunk-
|
|
103
|
-
import "../_node-chunks/chunk-
|
|
104
|
-
import "../_node-chunks/chunk-
|
|
105
|
-
import "../_node-chunks/chunk-CM3UGTR5.js";
|
|
102
|
+
} from "../_node-chunks/chunk-IHPLRRAR.js";
|
|
103
|
+
import "../_node-chunks/chunk-C5V22GP7.js";
|
|
104
|
+
import "../_node-chunks/chunk-KGX33KXX.js";
|
|
106
105
|
import {
|
|
107
106
|
importMetaResolve,
|
|
108
107
|
importModule,
|
|
109
108
|
resolvePackageDir,
|
|
110
109
|
safeResolveModule
|
|
111
|
-
} from "../_node-chunks/chunk-
|
|
112
|
-
import "../_node-chunks/chunk-
|
|
113
|
-
import "../_node-chunks/chunk-
|
|
114
|
-
import "../_node-chunks/chunk-
|
|
115
|
-
import "../_node-chunks/chunk-
|
|
116
|
-
import "../_node-chunks/chunk-
|
|
117
|
-
import "../_node-chunks/chunk-
|
|
118
|
-
import "../_node-chunks/chunk-
|
|
110
|
+
} from "../_node-chunks/chunk-R54K4KSM.js";
|
|
111
|
+
import "../_node-chunks/chunk-AOH6ABSV.js";
|
|
112
|
+
import "../_node-chunks/chunk-UV3CZ3KS.js";
|
|
113
|
+
import "../_node-chunks/chunk-S2LZC6JK.js";
|
|
114
|
+
import "../_node-chunks/chunk-KLVABNEU.js";
|
|
115
|
+
import "../_node-chunks/chunk-GUJVZUYI.js";
|
|
116
|
+
import "../_node-chunks/chunk-FIROF4DV.js";
|
|
117
|
+
import "../_node-chunks/chunk-SSN5PKIY.js";
|
|
119
118
|
export {
|
|
120
119
|
COMMON_ENV_VARS,
|
|
121
120
|
DEFAULT_FILES_PATTERN,
|
|
@@ -135,6 +134,7 @@ export {
|
|
|
135
134
|
extractProperRendererNameFromFramework,
|
|
136
135
|
filterPresetsConfig,
|
|
137
136
|
findConfigFile,
|
|
137
|
+
findFilesUp,
|
|
138
138
|
formatFileContent,
|
|
139
139
|
frameworkPackages,
|
|
140
140
|
frameworkToRenderer,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ComponentProps, AnchorHTMLAttributes, MouseEvent, ReactNode, ReactElement, ButtonHTMLAttributes, SyntheticEvent, Component, RefObject, FC, PropsWithChildren, DetailedHTMLProps, RefAttributes, ElementType } from 'react';
|
|
3
|
-
import { Config, PopperOptions } from 'react-popper-tooltip';
|
|
4
3
|
import { Addon_RenderOptions } from 'storybook/internal/types';
|
|
5
4
|
import { FunctionInterpolation } from 'storybook/theming';
|
|
6
5
|
|
|
@@ -720,6 +719,234 @@ declare const Form: StyledComponent<{
|
|
|
720
719
|
Radio: (props: React.InputHTMLAttributes<HTMLInputElement>) => React$1.JSX.Element;
|
|
721
720
|
};
|
|
722
721
|
|
|
722
|
+
declare const top: "top";
|
|
723
|
+
declare const bottom: "bottom";
|
|
724
|
+
declare const right: "right";
|
|
725
|
+
declare const left: "left";
|
|
726
|
+
declare type BasePlacement = typeof top | typeof bottom | typeof right | typeof left;
|
|
727
|
+
declare type VariationPlacement = "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end";
|
|
728
|
+
declare type AutoPlacement = "auto" | "auto-start" | "auto-end";
|
|
729
|
+
declare type Placement = AutoPlacement | BasePlacement | VariationPlacement;
|
|
730
|
+
declare const beforeRead: "beforeRead";
|
|
731
|
+
declare const read: "read";
|
|
732
|
+
declare const afterRead: "afterRead";
|
|
733
|
+
declare const beforeMain: "beforeMain";
|
|
734
|
+
declare const main: "main";
|
|
735
|
+
declare const afterMain: "afterMain";
|
|
736
|
+
declare const beforeWrite: "beforeWrite";
|
|
737
|
+
declare const write: "write";
|
|
738
|
+
declare const afterWrite: "afterWrite";
|
|
739
|
+
declare type ModifierPhases = typeof beforeRead | typeof read | typeof afterRead | typeof beforeMain | typeof main | typeof afterMain | typeof beforeWrite | typeof write | typeof afterWrite;
|
|
740
|
+
|
|
741
|
+
declare type Obj = {
|
|
742
|
+
[key: string]: any;
|
|
743
|
+
};
|
|
744
|
+
declare type VisualViewport = EventTarget & {
|
|
745
|
+
width: number;
|
|
746
|
+
height: number;
|
|
747
|
+
offsetLeft: number;
|
|
748
|
+
offsetTop: number;
|
|
749
|
+
scale: number;
|
|
750
|
+
};
|
|
751
|
+
declare type Window = {
|
|
752
|
+
innerHeight: number;
|
|
753
|
+
offsetHeight: number;
|
|
754
|
+
innerWidth: number;
|
|
755
|
+
offsetWidth: number;
|
|
756
|
+
pageXOffset: number;
|
|
757
|
+
pageYOffset: number;
|
|
758
|
+
getComputedStyle: typeof getComputedStyle;
|
|
759
|
+
addEventListener(type: any, listener: any, optionsOrUseCapture?: any): void;
|
|
760
|
+
removeEventListener(type: any, listener: any, optionsOrUseCapture?: any): void;
|
|
761
|
+
Element: Element;
|
|
762
|
+
HTMLElement: HTMLElement;
|
|
763
|
+
Node: Node;
|
|
764
|
+
toString(): "[object Window]";
|
|
765
|
+
devicePixelRatio: number;
|
|
766
|
+
visualViewport?: VisualViewport;
|
|
767
|
+
ShadowRoot: ShadowRoot;
|
|
768
|
+
};
|
|
769
|
+
declare type Rect = {
|
|
770
|
+
width: number;
|
|
771
|
+
height: number;
|
|
772
|
+
x: number;
|
|
773
|
+
y: number;
|
|
774
|
+
};
|
|
775
|
+
declare type Offsets = {
|
|
776
|
+
y: number;
|
|
777
|
+
x: number;
|
|
778
|
+
};
|
|
779
|
+
declare type PositioningStrategy = "absolute" | "fixed";
|
|
780
|
+
declare type StateRects = {
|
|
781
|
+
reference: Rect;
|
|
782
|
+
popper: Rect;
|
|
783
|
+
};
|
|
784
|
+
declare type OffsetData = {
|
|
785
|
+
[key in Placement]?: Offsets;
|
|
786
|
+
};
|
|
787
|
+
declare type State = {
|
|
788
|
+
elements: {
|
|
789
|
+
reference: Element | VirtualElement;
|
|
790
|
+
popper: HTMLElement;
|
|
791
|
+
arrow?: HTMLElement;
|
|
792
|
+
};
|
|
793
|
+
options: OptionsGeneric<any>;
|
|
794
|
+
placement: Placement;
|
|
795
|
+
strategy: PositioningStrategy;
|
|
796
|
+
orderedModifiers: Array<Modifier<any, any>>;
|
|
797
|
+
rects: StateRects;
|
|
798
|
+
scrollParents: {
|
|
799
|
+
reference: Array<Element | Window | VisualViewport>;
|
|
800
|
+
popper: Array<Element | Window | VisualViewport>;
|
|
801
|
+
};
|
|
802
|
+
styles: {
|
|
803
|
+
[key: string]: Partial<CSSStyleDeclaration>;
|
|
804
|
+
};
|
|
805
|
+
attributes: {
|
|
806
|
+
[key: string]: {
|
|
807
|
+
[key: string]: string | boolean;
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
modifiersData: {
|
|
811
|
+
arrow?: {
|
|
812
|
+
x?: number;
|
|
813
|
+
y?: number;
|
|
814
|
+
centerOffset: number;
|
|
815
|
+
};
|
|
816
|
+
hide?: {
|
|
817
|
+
isReferenceHidden: boolean;
|
|
818
|
+
hasPopperEscaped: boolean;
|
|
819
|
+
referenceClippingOffsets: SideObject;
|
|
820
|
+
popperEscapeOffsets: SideObject;
|
|
821
|
+
};
|
|
822
|
+
offset?: OffsetData;
|
|
823
|
+
preventOverflow?: Offsets;
|
|
824
|
+
popperOffsets?: Offsets;
|
|
825
|
+
[key: string]: any;
|
|
826
|
+
};
|
|
827
|
+
reset: boolean;
|
|
828
|
+
};
|
|
829
|
+
declare type SetAction<S> = S | ((prev: S) => S);
|
|
830
|
+
declare type Instance = {
|
|
831
|
+
state: State;
|
|
832
|
+
destroy: () => void;
|
|
833
|
+
forceUpdate: () => void;
|
|
834
|
+
update: () => Promise<Partial<State>>;
|
|
835
|
+
setOptions: (setOptionsAction: SetAction<Partial<OptionsGeneric<any>>>) => Promise<Partial<State>>;
|
|
836
|
+
};
|
|
837
|
+
declare type ModifierArguments<Options extends Obj> = {
|
|
838
|
+
state: State;
|
|
839
|
+
instance: Instance;
|
|
840
|
+
options: Partial<Options>;
|
|
841
|
+
name: string;
|
|
842
|
+
};
|
|
843
|
+
declare type Modifier<Name, Options extends Obj> = {
|
|
844
|
+
name: Name;
|
|
845
|
+
enabled: boolean;
|
|
846
|
+
phase: ModifierPhases;
|
|
847
|
+
requires?: Array<string>;
|
|
848
|
+
requiresIfExists?: Array<string>;
|
|
849
|
+
fn: (arg0: ModifierArguments<Options>) => State | void;
|
|
850
|
+
effect?: (arg0: ModifierArguments<Options>) => (() => void) | void;
|
|
851
|
+
options?: Partial<Options>;
|
|
852
|
+
data?: Obj;
|
|
853
|
+
};
|
|
854
|
+
declare type Options = {
|
|
855
|
+
placement: Placement;
|
|
856
|
+
modifiers: Array<Partial<Modifier<any, any>>>;
|
|
857
|
+
strategy: PositioningStrategy;
|
|
858
|
+
onFirstUpdate?: (arg0: Partial<State>) => void;
|
|
859
|
+
};
|
|
860
|
+
declare type OptionsGeneric<TModifier> = {
|
|
861
|
+
placement: Placement;
|
|
862
|
+
modifiers: Array<TModifier>;
|
|
863
|
+
strategy: PositioningStrategy;
|
|
864
|
+
onFirstUpdate?: (arg0: Partial<State>) => void;
|
|
865
|
+
};
|
|
866
|
+
declare type SideObject = {
|
|
867
|
+
top: number;
|
|
868
|
+
left: number;
|
|
869
|
+
right: number;
|
|
870
|
+
bottom: number;
|
|
871
|
+
};
|
|
872
|
+
declare type VirtualElement = {
|
|
873
|
+
getBoundingClientRect: () => ClientRect | DOMRect;
|
|
874
|
+
contextElement?: Element;
|
|
875
|
+
};
|
|
876
|
+
|
|
877
|
+
declare const createPopper: <TModifier extends Partial<Modifier<any, any>>>(reference: Element | VirtualElement, popper: HTMLElement, options?: Partial<OptionsGeneric<TModifier>>) => Instance;
|
|
878
|
+
|
|
879
|
+
declare type TriggerType = 'click' | 'double-click' | 'right-click' | 'hover' | 'focus';
|
|
880
|
+
declare type Config = {
|
|
881
|
+
/**
|
|
882
|
+
* Whether to close the tooltip when its trigger is out of boundary
|
|
883
|
+
* @default false
|
|
884
|
+
*/
|
|
885
|
+
closeOnTriggerHidden?: boolean;
|
|
886
|
+
/**
|
|
887
|
+
* Event or events that trigger the tooltip
|
|
888
|
+
* @default hover
|
|
889
|
+
*/
|
|
890
|
+
trigger?: TriggerType | TriggerType[] | null;
|
|
891
|
+
/**
|
|
892
|
+
* Delay in hiding the tooltip (ms)
|
|
893
|
+
* @default 0
|
|
894
|
+
*/
|
|
895
|
+
delayHide?: number;
|
|
896
|
+
/**
|
|
897
|
+
* Delay in showing the tooltip (ms)
|
|
898
|
+
* @default 0
|
|
899
|
+
*/
|
|
900
|
+
delayShow?: number;
|
|
901
|
+
/**
|
|
902
|
+
* Whether to make the tooltip spawn at cursor position
|
|
903
|
+
* @default false
|
|
904
|
+
*/
|
|
905
|
+
followCursor?: boolean;
|
|
906
|
+
/**
|
|
907
|
+
* Options to MutationObserver, used internally for updating
|
|
908
|
+
* tooltip position based on its DOM changes
|
|
909
|
+
* @default { attributes: true, childList: true, subtree: true }
|
|
910
|
+
*/
|
|
911
|
+
mutationObserverOptions?: MutationObserverInit | null;
|
|
912
|
+
/**
|
|
913
|
+
* Whether tooltip is shown by default
|
|
914
|
+
* @default false
|
|
915
|
+
*/
|
|
916
|
+
defaultVisible?: boolean;
|
|
917
|
+
/**
|
|
918
|
+
* Used to create controlled tooltip
|
|
919
|
+
*/
|
|
920
|
+
visible?: boolean;
|
|
921
|
+
/**
|
|
922
|
+
* Called when the visibility of the tooltip changes
|
|
923
|
+
*/
|
|
924
|
+
onVisibleChange?: (state: boolean) => void;
|
|
925
|
+
/**
|
|
926
|
+
* If `true`, a click outside the trigger element closes the tooltip
|
|
927
|
+
* @default true
|
|
928
|
+
*/
|
|
929
|
+
closeOnOutsideClick?: boolean;
|
|
930
|
+
/**
|
|
931
|
+
* If `true`, hovering the tooltip will keep it open. Normally tooltip closes when the mouse cursor moves out of
|
|
932
|
+
* the trigger element. If it moves to the tooltip element, the tooltip stays open.
|
|
933
|
+
* @default false
|
|
934
|
+
*/
|
|
935
|
+
interactive?: boolean;
|
|
936
|
+
/**
|
|
937
|
+
* Alias for popper.js placement, see https://popper.js.org/docs/v2/constructors/#placement
|
|
938
|
+
*/
|
|
939
|
+
placement?: Placement;
|
|
940
|
+
/**
|
|
941
|
+
* Shorthand for popper.js offset modifier, see https://popper.js.org/docs/v2/modifiers/offset/
|
|
942
|
+
* @default [0, 6]
|
|
943
|
+
*/
|
|
944
|
+
offset?: [number, number];
|
|
945
|
+
};
|
|
946
|
+
declare type PopperOptions = Partial<Options> & {
|
|
947
|
+
createPopper?: typeof createPopper;
|
|
948
|
+
};
|
|
949
|
+
|
|
723
950
|
declare const TargetContainer: StyledComponent<{
|
|
724
951
|
theme?: Theme;
|
|
725
952
|
as?: React__default.ElementType;
|