@storybook/addon-links 6.4.0-beta.2 → 6.4.0-beta.23
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/cjs/preview.js +37 -67
- package/dist/esm/preview.js +30 -60
- package/dist/modern/preview.js +28 -59
- package/dist/ts3.4/preview.d.ts +6 -5
- package/dist/ts3.9/preview.d.ts +6 -5
- package/package.json +7 -7
package/dist/cjs/preview.js
CHANGED
|
@@ -21,7 +21,11 @@ require("core-js/modules/es.function.name.js");
|
|
|
21
21
|
Object.defineProperty(exports, "__esModule", {
|
|
22
22
|
value: true
|
|
23
23
|
});
|
|
24
|
-
exports.withLinks = exports.
|
|
24
|
+
exports.withLinks = exports.linkTo = exports.hrefTo = exports.navigate = void 0;
|
|
25
|
+
|
|
26
|
+
require("core-js/modules/es.promise.js");
|
|
27
|
+
|
|
28
|
+
require("core-js/modules/es.object.to-string.js");
|
|
25
29
|
|
|
26
30
|
require("core-js/modules/es.string.search.js");
|
|
27
31
|
|
|
@@ -29,13 +33,11 @@ require("core-js/modules/es.regexp.exec.js");
|
|
|
29
33
|
|
|
30
34
|
require("core-js/modules/es.array.concat.js");
|
|
31
35
|
|
|
32
|
-
require("core-js/modules/es.
|
|
33
|
-
|
|
34
|
-
require("core-js/modules/es.array.find.js");
|
|
36
|
+
require("core-js/modules/es.string.split.js");
|
|
35
37
|
|
|
36
|
-
require("core-js/modules/es.
|
|
38
|
+
require("core-js/modules/es.object.assign.js");
|
|
37
39
|
|
|
38
|
-
require("core-js/modules/es.
|
|
40
|
+
require("core-js/modules/es.string.match.js");
|
|
39
41
|
|
|
40
42
|
var _global = _interopRequireDefault(require("global"));
|
|
41
43
|
|
|
@@ -47,8 +49,6 @@ var _coreEvents = require("@storybook/core-events");
|
|
|
47
49
|
|
|
48
50
|
var _csf = require("@storybook/csf");
|
|
49
51
|
|
|
50
|
-
var _clientLogger = require("@storybook/client-logger");
|
|
51
|
-
|
|
52
52
|
var _constants = require("./constants");
|
|
53
53
|
|
|
54
54
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -66,9 +66,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
66
66
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
67
67
|
|
|
68
68
|
var document = _global.default.document,
|
|
69
|
-
HTMLElement = _global.default.HTMLElement
|
|
70
|
-
storyStore = _global.default.__STORYBOOK_STORY_STORE__,
|
|
71
|
-
clientApi = _global.default.__STORYBOOK_CLIENT_API__;
|
|
69
|
+
HTMLElement = _global.default.HTMLElement;
|
|
72
70
|
|
|
73
71
|
var navigate = function navigate(params) {
|
|
74
72
|
return _addons.addons.getChannel().emit(_coreEvents.SELECT_STORY, params);
|
|
@@ -76,86 +74,59 @@ var navigate = function navigate(params) {
|
|
|
76
74
|
|
|
77
75
|
exports.navigate = navigate;
|
|
78
76
|
|
|
79
|
-
var
|
|
80
|
-
|
|
77
|
+
var hrefTo = function hrefTo(title, name) {
|
|
78
|
+
return new Promise(function (resolve) {
|
|
79
|
+
var location = document.location;
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
var query = _qs.default.parse(location.search, {
|
|
82
|
+
ignoreQueryPrefix: true
|
|
83
|
+
});
|
|
85
84
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
var existingId = [].concat(query.id)[0];
|
|
86
|
+
var titleToLink = title || existingId.split('--', 2)[0];
|
|
87
|
+
var id = (0, _csf.toId)(titleToLink, name);
|
|
88
|
+
var url = "".concat(location.origin + location.pathname, "?").concat(_qs.default.stringify(Object.assign({}, query, {
|
|
89
|
+
id: id
|
|
90
|
+
}), {
|
|
91
|
+
encode: false
|
|
92
|
+
}));
|
|
93
|
+
resolve(url);
|
|
94
|
+
});
|
|
91
95
|
};
|
|
92
96
|
|
|
97
|
+
exports.hrefTo = hrefTo;
|
|
98
|
+
|
|
93
99
|
var valueOrCall = function valueOrCall(args) {
|
|
94
100
|
return function (value) {
|
|
95
101
|
return typeof value === 'function' ? value.apply(void 0, _toConsumableArray(args)) : value;
|
|
96
102
|
};
|
|
97
103
|
};
|
|
98
104
|
|
|
99
|
-
var linkTo = function linkTo(
|
|
105
|
+
var linkTo = function linkTo(idOrTitle, nameInput) {
|
|
100
106
|
return function () {
|
|
101
107
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
102
108
|
args[_key] = arguments[_key];
|
|
103
109
|
}
|
|
104
110
|
|
|
105
111
|
var resolver = valueOrCall(args);
|
|
112
|
+
var title = resolver(idOrTitle);
|
|
113
|
+
var name = resolver(nameInput);
|
|
106
114
|
|
|
107
|
-
|
|
108
|
-
storyId = _storyStore$getSelect.storyId;
|
|
109
|
-
|
|
110
|
-
var current = storyStore.fromId(storyId) || {};
|
|
111
|
-
var kindVal = resolver(idOrKindInput);
|
|
112
|
-
var storyVal = resolver(storyInput);
|
|
113
|
-
var fromid = storyStore.fromId(kindVal);
|
|
114
|
-
var item = fromid || clientApi.raw().find(function (i) {
|
|
115
|
-
if (kindVal && storyVal) {
|
|
116
|
-
return i.kind === kindVal && i.story === storyVal;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (!kindVal && storyVal) {
|
|
120
|
-
return i.kind === current.kind && i.story === storyVal;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (kindVal && !storyVal) {
|
|
124
|
-
return i.kind === kindVal;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if (!kindVal && !storyVal) {
|
|
128
|
-
return i.kind === current.kind;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return false;
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
if (item) {
|
|
115
|
+
if (title !== null && title !== void 0 && title.match(/--/) && !name) {
|
|
135
116
|
navigate({
|
|
136
|
-
|
|
137
|
-
story: item.story
|
|
117
|
+
storyId: title
|
|
138
118
|
});
|
|
139
119
|
} else {
|
|
140
|
-
|
|
120
|
+
navigate({
|
|
121
|
+
kind: title,
|
|
122
|
+
story: name
|
|
123
|
+
});
|
|
141
124
|
}
|
|
142
125
|
};
|
|
143
126
|
};
|
|
144
127
|
|
|
145
128
|
exports.linkTo = linkTo;
|
|
146
129
|
|
|
147
|
-
var hrefTo = function hrefTo(kind, name) {
|
|
148
|
-
return new Promise(function (resolve) {
|
|
149
|
-
var _storyStore$getSelect2 = storyStore.getSelection(),
|
|
150
|
-
storyId = _storyStore$getSelect2.storyId;
|
|
151
|
-
|
|
152
|
-
var current = storyStore.fromId(storyId);
|
|
153
|
-
resolve(generateUrl((0, _csf.toId)(kind || current.kind, name)));
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
exports.hrefTo = hrefTo;
|
|
158
|
-
|
|
159
130
|
var linksListener = function linksListener(e) {
|
|
160
131
|
var target = e.target;
|
|
161
132
|
|
|
@@ -196,8 +167,7 @@ var off = function off() {
|
|
|
196
167
|
var withLinks = (0, _addons.makeDecorator)({
|
|
197
168
|
name: 'withLinks',
|
|
198
169
|
parameterName: _constants.PARAM_KEY,
|
|
199
|
-
wrapper: function wrapper(getStory, context
|
|
200
|
-
var parameters = _ref.parameters;
|
|
170
|
+
wrapper: function wrapper(getStory, context) {
|
|
201
171
|
on();
|
|
202
172
|
|
|
203
173
|
_addons.addons.getChannel().once(_coreEvents.STORY_CHANGED, off);
|
package/dist/esm/preview.js
CHANGED
|
@@ -10,13 +10,14 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
10
10
|
|
|
11
11
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12
12
|
|
|
13
|
+
import "core-js/modules/es.promise.js";
|
|
14
|
+
import "core-js/modules/es.object.to-string.js";
|
|
13
15
|
import "core-js/modules/es.string.search.js";
|
|
14
16
|
import "core-js/modules/es.regexp.exec.js";
|
|
15
17
|
import "core-js/modules/es.array.concat.js";
|
|
18
|
+
import "core-js/modules/es.string.split.js";
|
|
16
19
|
import "core-js/modules/es.object.assign.js";
|
|
17
|
-
import "core-js/modules/es.
|
|
18
|
-
import "core-js/modules/es.promise.js";
|
|
19
|
-
import "core-js/modules/es.object.to-string.js";
|
|
20
|
+
import "core-js/modules/es.string.match.js";
|
|
20
21
|
import "core-js/modules/es.symbol.js";
|
|
21
22
|
import "core-js/modules/es.symbol.description.js";
|
|
22
23
|
import "core-js/modules/es.symbol.iterator.js";
|
|
@@ -31,26 +32,28 @@ import qs from 'qs';
|
|
|
31
32
|
import { addons, makeDecorator } from '@storybook/addons';
|
|
32
33
|
import { STORY_CHANGED, SELECT_STORY } from '@storybook/core-events';
|
|
33
34
|
import { toId } from '@storybook/csf';
|
|
34
|
-
import { logger } from '@storybook/client-logger';
|
|
35
35
|
import { PARAM_KEY } from './constants';
|
|
36
36
|
var document = global.document,
|
|
37
|
-
HTMLElement = global.HTMLElement
|
|
38
|
-
storyStore = global.__STORYBOOK_STORY_STORE__,
|
|
39
|
-
clientApi = global.__STORYBOOK_CLIENT_API__;
|
|
37
|
+
HTMLElement = global.HTMLElement;
|
|
40
38
|
export var navigate = function navigate(params) {
|
|
41
39
|
return addons.getChannel().emit(SELECT_STORY, params);
|
|
42
40
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
export var hrefTo = function hrefTo(title, name) {
|
|
42
|
+
return new Promise(function (resolve) {
|
|
43
|
+
var location = document.location;
|
|
44
|
+
var query = qs.parse(location.search, {
|
|
45
|
+
ignoreQueryPrefix: true
|
|
46
|
+
});
|
|
47
|
+
var existingId = [].concat(query.id)[0];
|
|
48
|
+
var titleToLink = title || existingId.split('--', 2)[0];
|
|
49
|
+
var id = toId(titleToLink, name);
|
|
50
|
+
var url = "".concat(location.origin + location.pathname, "?").concat(qs.stringify(Object.assign({}, query, {
|
|
51
|
+
id: id
|
|
52
|
+
}), {
|
|
53
|
+
encode: false
|
|
54
|
+
}));
|
|
55
|
+
resolve(url);
|
|
48
56
|
});
|
|
49
|
-
return "".concat(location.origin + location.pathname, "?").concat(qs.stringify(Object.assign({}, query, {
|
|
50
|
-
id: id
|
|
51
|
-
}), {
|
|
52
|
-
encode: false
|
|
53
|
-
}));
|
|
54
57
|
};
|
|
55
58
|
|
|
56
59
|
var valueOrCall = function valueOrCall(args) {
|
|
@@ -59,60 +62,28 @@ var valueOrCall = function valueOrCall(args) {
|
|
|
59
62
|
};
|
|
60
63
|
};
|
|
61
64
|
|
|
62
|
-
export var linkTo = function linkTo(
|
|
65
|
+
export var linkTo = function linkTo(idOrTitle, nameInput) {
|
|
63
66
|
return function () {
|
|
64
67
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
65
68
|
args[_key] = arguments[_key];
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
var resolver = valueOrCall(args);
|
|
72
|
+
var title = resolver(idOrTitle);
|
|
73
|
+
var name = resolver(nameInput);
|
|
69
74
|
|
|
70
|
-
|
|
71
|
-
storyId = _storyStore$getSelect.storyId;
|
|
72
|
-
|
|
73
|
-
var current = storyStore.fromId(storyId) || {};
|
|
74
|
-
var kindVal = resolver(idOrKindInput);
|
|
75
|
-
var storyVal = resolver(storyInput);
|
|
76
|
-
var fromid = storyStore.fromId(kindVal);
|
|
77
|
-
var item = fromid || clientApi.raw().find(function (i) {
|
|
78
|
-
if (kindVal && storyVal) {
|
|
79
|
-
return i.kind === kindVal && i.story === storyVal;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (!kindVal && storyVal) {
|
|
83
|
-
return i.kind === current.kind && i.story === storyVal;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (kindVal && !storyVal) {
|
|
87
|
-
return i.kind === kindVal;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
if (!kindVal && !storyVal) {
|
|
91
|
-
return i.kind === current.kind;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return false;
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
if (item) {
|
|
75
|
+
if (title !== null && title !== void 0 && title.match(/--/) && !name) {
|
|
98
76
|
navigate({
|
|
99
|
-
|
|
100
|
-
story: item.story
|
|
77
|
+
storyId: title
|
|
101
78
|
});
|
|
102
79
|
} else {
|
|
103
|
-
|
|
80
|
+
navigate({
|
|
81
|
+
kind: title,
|
|
82
|
+
story: name
|
|
83
|
+
});
|
|
104
84
|
}
|
|
105
85
|
};
|
|
106
86
|
};
|
|
107
|
-
export var hrefTo = function hrefTo(kind, name) {
|
|
108
|
-
return new Promise(function (resolve) {
|
|
109
|
-
var _storyStore$getSelect2 = storyStore.getSelection(),
|
|
110
|
-
storyId = _storyStore$getSelect2.storyId;
|
|
111
|
-
|
|
112
|
-
var current = storyStore.fromId(storyId);
|
|
113
|
-
resolve(generateUrl(toId(kind || current.kind, name)));
|
|
114
|
-
});
|
|
115
|
-
};
|
|
116
87
|
|
|
117
88
|
var linksListener = function linksListener(e) {
|
|
118
89
|
var target = e.target;
|
|
@@ -154,8 +125,7 @@ var off = function off() {
|
|
|
154
125
|
export var withLinks = makeDecorator({
|
|
155
126
|
name: 'withLinks',
|
|
156
127
|
parameterName: PARAM_KEY,
|
|
157
|
-
wrapper: function wrapper(getStory, context
|
|
158
|
-
var parameters = _ref.parameters;
|
|
128
|
+
wrapper: function wrapper(getStory, context) {
|
|
159
129
|
on();
|
|
160
130
|
addons.getChannel().once(STORY_CHANGED, off);
|
|
161
131
|
return getStory(context);
|
package/dist/modern/preview.js
CHANGED
|
@@ -3,79 +3,50 @@ import qs from 'qs';
|
|
|
3
3
|
import { addons, makeDecorator } from '@storybook/addons';
|
|
4
4
|
import { STORY_CHANGED, SELECT_STORY } from '@storybook/core-events';
|
|
5
5
|
import { toId } from '@storybook/csf';
|
|
6
|
-
import { logger } from '@storybook/client-logger';
|
|
7
6
|
import { PARAM_KEY } from './constants';
|
|
8
7
|
const {
|
|
9
8
|
document,
|
|
10
|
-
HTMLElement
|
|
11
|
-
__STORYBOOK_STORY_STORE__: storyStore,
|
|
12
|
-
__STORYBOOK_CLIENT_API__: clientApi
|
|
9
|
+
HTMLElement
|
|
13
10
|
} = global;
|
|
14
11
|
export const navigate = params => addons.getChannel().emit(SELECT_STORY, params);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
export const hrefTo = (title, name) => {
|
|
13
|
+
return new Promise(resolve => {
|
|
14
|
+
const {
|
|
15
|
+
location
|
|
16
|
+
} = document;
|
|
17
|
+
const query = qs.parse(location.search, {
|
|
18
|
+
ignoreQueryPrefix: true
|
|
19
|
+
});
|
|
20
|
+
const existingId = [].concat(query.id)[0];
|
|
21
|
+
const titleToLink = title || existingId.split('--', 2)[0];
|
|
22
|
+
const id = toId(titleToLink, name);
|
|
23
|
+
const url = `${location.origin + location.pathname}?${qs.stringify(Object.assign({}, query, {
|
|
24
|
+
id
|
|
25
|
+
}), {
|
|
26
|
+
encode: false
|
|
27
|
+
})}`;
|
|
28
|
+
resolve(url);
|
|
22
29
|
});
|
|
23
|
-
return `${location.origin + location.pathname}?${qs.stringify(Object.assign({}, query, {
|
|
24
|
-
id
|
|
25
|
-
}), {
|
|
26
|
-
encode: false
|
|
27
|
-
})}`;
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
const valueOrCall = args => value => typeof value === 'function' ? value(...args) : value;
|
|
31
33
|
|
|
32
|
-
export const linkTo = (
|
|
34
|
+
export const linkTo = (idOrTitle, nameInput) => (...args) => {
|
|
33
35
|
const resolver = valueOrCall(args);
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
} = storyStore.getSelection();
|
|
37
|
-
const current = storyStore.fromId(storyId) || {};
|
|
38
|
-
const kindVal = resolver(idOrKindInput);
|
|
39
|
-
const storyVal = resolver(storyInput);
|
|
40
|
-
const fromid = storyStore.fromId(kindVal);
|
|
41
|
-
const item = fromid || clientApi.raw().find(i => {
|
|
42
|
-
if (kindVal && storyVal) {
|
|
43
|
-
return i.kind === kindVal && i.story === storyVal;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (!kindVal && storyVal) {
|
|
47
|
-
return i.kind === current.kind && i.story === storyVal;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (kindVal && !storyVal) {
|
|
51
|
-
return i.kind === kindVal;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (!kindVal && !storyVal) {
|
|
55
|
-
return i.kind === current.kind;
|
|
56
|
-
}
|
|
36
|
+
const title = resolver(idOrTitle);
|
|
37
|
+
const name = resolver(nameInput);
|
|
57
38
|
|
|
58
|
-
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
if (item) {
|
|
39
|
+
if (title !== null && title !== void 0 && title.match(/--/) && !name) {
|
|
62
40
|
navigate({
|
|
63
|
-
|
|
64
|
-
story: item.story
|
|
41
|
+
storyId: title
|
|
65
42
|
});
|
|
66
43
|
} else {
|
|
67
|
-
|
|
44
|
+
navigate({
|
|
45
|
+
kind: title,
|
|
46
|
+
story: name
|
|
47
|
+
});
|
|
68
48
|
}
|
|
69
49
|
};
|
|
70
|
-
export const hrefTo = (kind, name) => {
|
|
71
|
-
return new Promise(resolve => {
|
|
72
|
-
const {
|
|
73
|
-
storyId
|
|
74
|
-
} = storyStore.getSelection();
|
|
75
|
-
const current = storyStore.fromId(storyId);
|
|
76
|
-
resolve(generateUrl(toId(kind || current.kind, name)));
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
50
|
|
|
80
51
|
const linksListener = e => {
|
|
81
52
|
const {
|
|
@@ -120,9 +91,7 @@ const off = () => {
|
|
|
120
91
|
export const withLinks = makeDecorator({
|
|
121
92
|
name: 'withLinks',
|
|
122
93
|
parameterName: PARAM_KEY,
|
|
123
|
-
wrapper: (getStory, context
|
|
124
|
-
parameters
|
|
125
|
-
}) => {
|
|
94
|
+
wrapper: (getStory, context) => {
|
|
126
95
|
on();
|
|
127
96
|
addons.getChannel().once(STORY_CHANGED, off);
|
|
128
97
|
return getStory(context);
|
package/dist/ts3.4/preview.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { StoryId, StoryName, ComponentTitle } from '@storybook/csf';
|
|
1
2
|
interface ParamsId {
|
|
2
|
-
storyId:
|
|
3
|
+
storyId: StoryId;
|
|
3
4
|
}
|
|
4
5
|
interface ParamsCombo {
|
|
5
|
-
kind
|
|
6
|
-
story
|
|
6
|
+
kind?: ComponentTitle;
|
|
7
|
+
story?: StoryName;
|
|
7
8
|
}
|
|
8
9
|
export declare const navigate: (params: ParamsId | ParamsCombo) => void;
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const hrefTo: (title: ComponentTitle, name: StoryName) => Promise<string>;
|
|
11
|
+
export declare const linkTo: (idOrTitle: string, nameInput?: string | ((...args: any[]) => string)) => (...args: any[]) => void;
|
|
11
12
|
export declare const withLinks: (...args: any) => any;
|
|
12
13
|
export {};
|
package/dist/ts3.9/preview.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { StoryId, StoryName, ComponentTitle } from '@storybook/csf';
|
|
1
2
|
interface ParamsId {
|
|
2
|
-
storyId:
|
|
3
|
+
storyId: StoryId;
|
|
3
4
|
}
|
|
4
5
|
interface ParamsCombo {
|
|
5
|
-
kind
|
|
6
|
-
story
|
|
6
|
+
kind?: ComponentTitle;
|
|
7
|
+
story?: StoryName;
|
|
7
8
|
}
|
|
8
9
|
export declare const navigate: (params: ParamsId | ParamsCombo) => void;
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const hrefTo: (title: ComponentTitle, name: StoryName) => Promise<string>;
|
|
11
|
+
export declare const linkTo: (idOrTitle: string, nameInput?: string | ((...args: any[]) => string)) => (...args: any[]) => void;
|
|
11
12
|
export declare const withLinks: (...args: any) => any;
|
|
12
13
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-links",
|
|
3
|
-
"version": "6.4.0-beta.
|
|
3
|
+
"version": "6.4.0-beta.23",
|
|
4
4
|
"description": "Link stories together to build demos and prototypes with your UI components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"addon",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"prepare": "node ../../scripts/prepare.js"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@storybook/addons": "6.4.0-beta.
|
|
45
|
-
"@storybook/client-logger": "6.4.0-beta.
|
|
46
|
-
"@storybook/core-events": "6.4.0-beta.
|
|
47
|
-
"@storybook/csf": "0.0.2--canary.
|
|
48
|
-
"@storybook/router": "6.4.0-beta.
|
|
44
|
+
"@storybook/addons": "6.4.0-beta.23",
|
|
45
|
+
"@storybook/client-logger": "6.4.0-beta.23",
|
|
46
|
+
"@storybook/core-events": "6.4.0-beta.23",
|
|
47
|
+
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
|
48
|
+
"@storybook/router": "6.4.0-beta.23",
|
|
49
49
|
"@types/qs": "^6.9.5",
|
|
50
50
|
"core-js": "^3.8.2",
|
|
51
51
|
"global": "^4.4.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "34dd760d275faabff6855b84bb64bb69adc1ec1a",
|
|
76
76
|
"sbmodern": "dist/modern/index.js",
|
|
77
77
|
"storybook": {
|
|
78
78
|
"displayName": "Links",
|