@storybook/addon-docs 10.1.0-alpha.8 → 10.1.0-beta.0
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/_browser-chunks/Color-S5NAVK5F.js +1096 -0
- package/dist/_browser-chunks/{DocsRenderer-HT7GNKAR.js → DocsRenderer-GHJI37HO.js} +2 -2
- package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
- package/dist/_browser-chunks/chunk-CYSK6WYR.js +7 -0
- package/dist/_browser-chunks/chunk-DDRHE7EB.js +949 -0
- package/dist/_browser-chunks/{chunk-74ZUTOZN.js → chunk-OATZR77O.js} +9 -22
- package/dist/_browser-chunks/chunk-UUESKCKV.js +31 -0
- package/dist/_node-chunks/{chunk-QSBD55JK.js → chunk-OGE4GWLB.js} +13 -19
- package/dist/_node-chunks/chunk-PRNIBEEO.js +196 -0
- package/dist/_node-chunks/chunk-SEBYU7IP.js +168 -0
- package/dist/_node-chunks/chunk-SZXCUVK4.js +22630 -0
- package/dist/_node-chunks/mdx-plugin-NLBBLG32.js +1032 -0
- package/dist/_node-chunks/rehype-external-links-V2D4HT5U.js +121 -0
- package/dist/_node-chunks/{rehype-slug-X6WEPBMC.js → rehype-slug-U5W6TP4H.js} +24 -58
- package/dist/angular/index.js +3 -5
- package/dist/blocks.d.ts +5 -2
- package/dist/blocks.js +4658 -6651
- package/dist/ember/index.js +3 -5
- package/dist/index.js +4 -6
- package/dist/manager.js +11 -22
- package/dist/mdx-loader.js +13 -19
- package/dist/preset.js +160 -453
- package/dist/preview.js +2 -2
- package/package.json +6 -6
- package/dist/_browser-chunks/Color-64QXVMR3.js +0 -1675
- package/dist/_browser-chunks/chunk-DMNQCVA2.js +0 -12
- package/dist/_browser-chunks/chunk-UZFOWTVP.js +0 -974
- package/dist/_browser-chunks/chunk-YDZYZRYC.js +0 -39
- package/dist/_node-chunks/chunk-D63L7OCA.js +0 -231
- package/dist/_node-chunks/chunk-DB6BS7Z4.js +0 -36332
- package/dist/_node-chunks/chunk-Z5MUJETX.js +0 -248
- package/dist/_node-chunks/mdx-plugin-KCQDNOVO.js +0 -1654
- package/dist/_node-chunks/rehype-external-links-LSUHFLUY.js +0 -168
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__export,
|
|
3
|
-
__name
|
|
4
|
-
} from "./chunk-MM7DTO55.js";
|
|
5
|
-
|
|
6
|
-
// src/preview.ts
|
|
7
|
-
var preview_exports = {};
|
|
8
|
-
__export(preview_exports, {
|
|
9
|
-
parameters: () => parameters
|
|
10
|
-
});
|
|
11
|
-
var excludeTags = Object.entries(globalThis.TAGS_OPTIONS ?? {}).reduce(
|
|
12
|
-
(acc, entry) => {
|
|
13
|
-
const [tag, option] = entry;
|
|
14
|
-
if (option.excludeFromDocsStories) {
|
|
15
|
-
acc[tag] = true;
|
|
16
|
-
}
|
|
17
|
-
return acc;
|
|
18
|
-
},
|
|
19
|
-
{}
|
|
20
|
-
);
|
|
21
|
-
var parameters = {
|
|
22
|
-
docs: {
|
|
23
|
-
renderer: /* @__PURE__ */ __name(async () => {
|
|
24
|
-
const { DocsRenderer } = await import("./DocsRenderer-HT7GNKAR.js");
|
|
25
|
-
return new DocsRenderer();
|
|
26
|
-
}, "renderer"),
|
|
27
|
-
stories: {
|
|
28
|
-
filter: /* @__PURE__ */ __name((story) => {
|
|
29
|
-
const tags = story.tags || [];
|
|
30
|
-
return tags.filter((tag) => excludeTags[tag]).length === 0 && !story.parameters.docs?.disable;
|
|
31
|
-
}, "filter")
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export {
|
|
37
|
-
parameters,
|
|
38
|
-
preview_exports
|
|
39
|
-
};
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_ggcqbc9ld7l from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_ggcqbc9ld7l from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_ggcqbc9ld7l from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_ggcqbc9ld7l.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_ggcqbc9ld7l.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_ggcqbc9ld7l.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "./chunk-QSBD55JK.js";
|
|
15
|
-
|
|
16
|
-
// ../../node_modules/unist-util-is/lib/index.js
|
|
17
|
-
var convert = (
|
|
18
|
-
// Note: overloads in JSDoc can’t yet use different `@template`s.
|
|
19
|
-
/**
|
|
20
|
-
* @type {(
|
|
21
|
-
* (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
|
|
22
|
-
* (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
|
|
23
|
-
* (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
|
|
24
|
-
* ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
|
|
25
|
-
* ((test?: Test) => Check)
|
|
26
|
-
* )}
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* @param {Test} [test]
|
|
30
|
-
* @returns {Check}
|
|
31
|
-
*/
|
|
32
|
-
/* @__PURE__ */ __name(function(test) {
|
|
33
|
-
if (test === null || test === void 0) {
|
|
34
|
-
return ok;
|
|
35
|
-
}
|
|
36
|
-
if (typeof test === "function") {
|
|
37
|
-
return castFactory(test);
|
|
38
|
-
}
|
|
39
|
-
if (typeof test === "object") {
|
|
40
|
-
return Array.isArray(test) ? anyFactory(test) : propsFactory(test);
|
|
41
|
-
}
|
|
42
|
-
if (typeof test === "string") {
|
|
43
|
-
return typeFactory(test);
|
|
44
|
-
}
|
|
45
|
-
throw new Error("Expected function, string, or object as test");
|
|
46
|
-
}, "convert")
|
|
47
|
-
);
|
|
48
|
-
function anyFactory(tests) {
|
|
49
|
-
const checks = [];
|
|
50
|
-
let index = -1;
|
|
51
|
-
while (++index < tests.length) {
|
|
52
|
-
checks[index] = convert(tests[index]);
|
|
53
|
-
}
|
|
54
|
-
return castFactory(any);
|
|
55
|
-
function any(...parameters) {
|
|
56
|
-
let index2 = -1;
|
|
57
|
-
while (++index2 < checks.length) {
|
|
58
|
-
if (checks[index2].apply(this, parameters)) return true;
|
|
59
|
-
}
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
__name(any, "any");
|
|
63
|
-
}
|
|
64
|
-
__name(anyFactory, "anyFactory");
|
|
65
|
-
function propsFactory(check) {
|
|
66
|
-
const checkAsRecord = (
|
|
67
|
-
/** @type {Record<string, unknown>} */
|
|
68
|
-
check
|
|
69
|
-
);
|
|
70
|
-
return castFactory(all);
|
|
71
|
-
function all(node) {
|
|
72
|
-
const nodeAsRecord = (
|
|
73
|
-
/** @type {Record<string, unknown>} */
|
|
74
|
-
/** @type {unknown} */
|
|
75
|
-
node
|
|
76
|
-
);
|
|
77
|
-
let key;
|
|
78
|
-
for (key in check) {
|
|
79
|
-
if (nodeAsRecord[key] !== checkAsRecord[key]) return false;
|
|
80
|
-
}
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
__name(all, "all");
|
|
84
|
-
}
|
|
85
|
-
__name(propsFactory, "propsFactory");
|
|
86
|
-
function typeFactory(check) {
|
|
87
|
-
return castFactory(type);
|
|
88
|
-
function type(node) {
|
|
89
|
-
return node && node.type === check;
|
|
90
|
-
}
|
|
91
|
-
__name(type, "type");
|
|
92
|
-
}
|
|
93
|
-
__name(typeFactory, "typeFactory");
|
|
94
|
-
function castFactory(testFunction) {
|
|
95
|
-
return check;
|
|
96
|
-
function check(value, index, parent) {
|
|
97
|
-
return Boolean(
|
|
98
|
-
looksLikeANode(value) && testFunction.call(
|
|
99
|
-
this,
|
|
100
|
-
value,
|
|
101
|
-
typeof index === "number" ? index : void 0,
|
|
102
|
-
parent || void 0
|
|
103
|
-
)
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
__name(check, "check");
|
|
107
|
-
}
|
|
108
|
-
__name(castFactory, "castFactory");
|
|
109
|
-
function ok() {
|
|
110
|
-
return true;
|
|
111
|
-
}
|
|
112
|
-
__name(ok, "ok");
|
|
113
|
-
function looksLikeANode(value) {
|
|
114
|
-
return value !== null && typeof value === "object" && "type" in value;
|
|
115
|
-
}
|
|
116
|
-
__name(looksLikeANode, "looksLikeANode");
|
|
117
|
-
|
|
118
|
-
// ../../node_modules/unist-util-visit-parents/lib/color.node.js
|
|
119
|
-
function color(d) {
|
|
120
|
-
return "\x1B[33m" + d + "\x1B[39m";
|
|
121
|
-
}
|
|
122
|
-
__name(color, "color");
|
|
123
|
-
|
|
124
|
-
// ../../node_modules/unist-util-visit-parents/lib/index.js
|
|
125
|
-
var empty = [];
|
|
126
|
-
var CONTINUE = true;
|
|
127
|
-
var EXIT = false;
|
|
128
|
-
var SKIP = "skip";
|
|
129
|
-
function visitParents(tree, test, visitor, reverse) {
|
|
130
|
-
let check;
|
|
131
|
-
if (typeof test === "function" && typeof visitor !== "function") {
|
|
132
|
-
reverse = visitor;
|
|
133
|
-
visitor = test;
|
|
134
|
-
} else {
|
|
135
|
-
check = test;
|
|
136
|
-
}
|
|
137
|
-
const is2 = convert(check);
|
|
138
|
-
const step = reverse ? -1 : 1;
|
|
139
|
-
factory(tree, void 0, [])();
|
|
140
|
-
function factory(node, index, parents) {
|
|
141
|
-
const value = (
|
|
142
|
-
/** @type {Record<string, unknown>} */
|
|
143
|
-
node && typeof node === "object" ? node : {}
|
|
144
|
-
);
|
|
145
|
-
if (typeof value.type === "string") {
|
|
146
|
-
const name = (
|
|
147
|
-
// `hast`
|
|
148
|
-
typeof value.tagName === "string" ? value.tagName : (
|
|
149
|
-
// `xast`
|
|
150
|
-
typeof value.name === "string" ? value.name : void 0
|
|
151
|
-
)
|
|
152
|
-
);
|
|
153
|
-
Object.defineProperty(visit2, "name", {
|
|
154
|
-
value: "node (" + color(node.type + (name ? "<" + name + ">" : "")) + ")"
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
return visit2;
|
|
158
|
-
function visit2() {
|
|
159
|
-
let result = empty;
|
|
160
|
-
let subresult;
|
|
161
|
-
let offset;
|
|
162
|
-
let grandparents;
|
|
163
|
-
if (!test || is2(node, index, parents[parents.length - 1] || void 0)) {
|
|
164
|
-
result = toResult(visitor(node, parents));
|
|
165
|
-
if (result[0] === EXIT) {
|
|
166
|
-
return result;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
if ("children" in node && node.children) {
|
|
170
|
-
const nodeAsParent = (
|
|
171
|
-
/** @type {UnistParent} */
|
|
172
|
-
node
|
|
173
|
-
);
|
|
174
|
-
if (nodeAsParent.children && result[0] !== SKIP) {
|
|
175
|
-
offset = (reverse ? nodeAsParent.children.length : -1) + step;
|
|
176
|
-
grandparents = parents.concat(nodeAsParent);
|
|
177
|
-
while (offset > -1 && offset < nodeAsParent.children.length) {
|
|
178
|
-
const child = nodeAsParent.children[offset];
|
|
179
|
-
subresult = factory(child, offset, grandparents)();
|
|
180
|
-
if (subresult[0] === EXIT) {
|
|
181
|
-
return subresult;
|
|
182
|
-
}
|
|
183
|
-
offset = typeof subresult[1] === "number" ? subresult[1] : offset + step;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
return result;
|
|
188
|
-
}
|
|
189
|
-
__name(visit2, "visit");
|
|
190
|
-
}
|
|
191
|
-
__name(factory, "factory");
|
|
192
|
-
}
|
|
193
|
-
__name(visitParents, "visitParents");
|
|
194
|
-
function toResult(value) {
|
|
195
|
-
if (Array.isArray(value)) {
|
|
196
|
-
return value;
|
|
197
|
-
}
|
|
198
|
-
if (typeof value === "number") {
|
|
199
|
-
return [CONTINUE, value];
|
|
200
|
-
}
|
|
201
|
-
return value === null || value === void 0 ? empty : [value];
|
|
202
|
-
}
|
|
203
|
-
__name(toResult, "toResult");
|
|
204
|
-
|
|
205
|
-
// ../../node_modules/unist-util-visit/lib/index.js
|
|
206
|
-
function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
|
|
207
|
-
let reverse;
|
|
208
|
-
let test;
|
|
209
|
-
let visitor;
|
|
210
|
-
if (typeof testOrVisitor === "function" && typeof visitorOrReverse !== "function") {
|
|
211
|
-
test = void 0;
|
|
212
|
-
visitor = testOrVisitor;
|
|
213
|
-
reverse = visitorOrReverse;
|
|
214
|
-
} else {
|
|
215
|
-
test = testOrVisitor;
|
|
216
|
-
visitor = visitorOrReverse;
|
|
217
|
-
reverse = maybeReverse;
|
|
218
|
-
}
|
|
219
|
-
visitParents(tree, test, overload, reverse);
|
|
220
|
-
function overload(node, parents) {
|
|
221
|
-
const parent = parents[parents.length - 1];
|
|
222
|
-
const index = parent ? parent.children.indexOf(node) : void 0;
|
|
223
|
-
return visitor(node, index, parent);
|
|
224
|
-
}
|
|
225
|
-
__name(overload, "overload");
|
|
226
|
-
}
|
|
227
|
-
__name(visit, "visit");
|
|
228
|
-
|
|
229
|
-
export {
|
|
230
|
-
visit
|
|
231
|
-
};
|