@storybook/addon-docs 9.2.0-alpha.3 → 10.0.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/README.md +5 -3
- package/dist/_browser-chunks/Color-LWAWP22K.js +1566 -0
- package/dist/_browser-chunks/DocsRenderer-HT7GNKAR.js +9 -0
- package/dist/_browser-chunks/chunk-67KILNXL.js +6831 -0
- package/dist/_browser-chunks/chunk-74ZUTOZN.js +65 -0
- package/dist/_browser-chunks/chunk-MM7DTO55.js +44 -0
- package/dist/_browser-chunks/chunk-RX6225WF.js +46 -0
- package/dist/_browser-chunks/chunk-TQ5Q4DDG.js +846 -0
- package/dist/_browser-chunks/chunk-UZFOWTVP.js +974 -0
- package/dist/_node-chunks/chunk-32BBSODQ.js +231 -0
- package/dist/_node-chunks/chunk-SFE23BYR.js +48 -0
- package/dist/_node-chunks/chunk-W3NRVQR7.js +35424 -0
- package/dist/_node-chunks/chunk-WX5VRRPF.js +248 -0
- package/dist/_node-chunks/mdx-plugin-2RC5UF6O.js +1653 -0
- package/dist/_node-chunks/rehype-external-links-WVBYEZ7J.js +168 -0
- package/dist/_node-chunks/rehype-slug-JGTPG4A3.js +127 -0
- package/dist/angular/index.d.ts +3 -0
- package/dist/angular/index.js +11 -0
- package/dist/blocks.d.ts +86 -42
- package/dist/blocks.js +8123 -201
- package/dist/ember/index.d.ts +3 -0
- package/dist/ember/index.js +11 -0
- package/dist/index.d.ts +42 -5
- package/dist/index.js +17 -15
- package/dist/manager.js +85 -154
- package/dist/mdx-loader.js +38 -71
- package/dist/mdx-react-shim.js +2 -0
- package/dist/preset.js +310 -72
- package/dist/preview.js +8 -13
- package/dist/web-components/index.d.ts +2 -0
- package/dist/web-components/index.js +0 -0
- package/manager.js +1 -1
- package/package.json +45 -89
- package/preset.js +1 -1
- package/preview.js +1 -1
- package/angular/README.md +0 -256
- package/angular/index.d.ts +0 -1
- package/angular/index.js +0 -4
- package/common/README.md +0 -98
- package/dist/Color-AVL7NMMY.mjs +0 -10
- package/dist/DocsContainer-fccc2203.d.ts +0 -51
- package/dist/DocsRenderer-3PZUHFFL.mjs +0 -2
- package/dist/DocsRenderer-ULRJ3H2C.mjs +0 -8
- package/dist/blocks.mjs +0 -213
- package/dist/chunk-2UFMRE4V.mjs +0 -5
- package/dist/chunk-CEH6MNVV.mjs +0 -3
- package/dist/chunk-GWJYCGSQ.mjs +0 -7
- package/dist/chunk-QUZPS4B6.mjs +0 -3
- package/dist/chunk-SPFYY5GD.mjs +0 -3
- package/dist/index.mjs +0 -8
- package/dist/preview.mjs +0 -5
- package/dist/shims/mdx-react-shim.js +0 -12
- package/dist/shims/mdx-react-shim.mjs +0 -1
- package/ember/README.md +0 -153
- package/ember/index.d.ts +0 -1
- package/ember/index.js +0 -3
- package/react/README.md +0 -149
- package/svelte/HOC.svelte +0 -7
- package/vue/README.md +0 -152
- package/vue3/README.md +0 -152
- package/web-components/README.md +0 -131
- package/web-components/index.js +0 -1
- /package/dist/{shims/mdx-react-shim.d.ts → mdx-react-shim.d.ts} +0 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_a0763eddh0i from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_a0763eddh0i from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_a0763eddh0i from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_a0763eddh0i.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_a0763eddh0i.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_a0763eddh0i.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-SFE23BYR.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
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_a0763eddh0i from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_a0763eddh0i from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_a0763eddh0i from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_a0763eddh0i.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_a0763eddh0i.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_a0763eddh0i.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
var __create = Object.create;
|
|
13
|
+
var __defProp = Object.defineProperty;
|
|
14
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
16
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
17
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
18
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
19
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
20
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
21
|
+
};
|
|
22
|
+
var __export = (target, all) => {
|
|
23
|
+
for (var name in all)
|
|
24
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
25
|
+
};
|
|
26
|
+
var __copyProps = (to, from, except, desc) => {
|
|
27
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
28
|
+
for (let key of __getOwnPropNames(from))
|
|
29
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
30
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
31
|
+
}
|
|
32
|
+
return to;
|
|
33
|
+
};
|
|
34
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
35
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
36
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
37
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
38
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
39
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
40
|
+
mod
|
|
41
|
+
));
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
__name,
|
|
45
|
+
__commonJS,
|
|
46
|
+
__export,
|
|
47
|
+
__toESM
|
|
48
|
+
};
|