@storybook/addon-docs 10.1.0-alpha.1 → 10.1.0-alpha.11

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.
Files changed (34) hide show
  1. package/dist/_browser-chunks/Color-S5NAVK5F.js +1096 -0
  2. package/dist/_browser-chunks/{DocsRenderer-HT7GNKAR.js → DocsRenderer-GHJI37HO.js} +2 -2
  3. package/dist/_browser-chunks/{chunk-MM7DTO55.js → chunk-A242L54C.js} +10 -16
  4. package/dist/_browser-chunks/chunk-CYSK6WYR.js +7 -0
  5. package/dist/_browser-chunks/chunk-DDRHE7EB.js +949 -0
  6. package/dist/_browser-chunks/{chunk-74ZUTOZN.js → chunk-OATZR77O.js} +9 -22
  7. package/dist/_browser-chunks/chunk-UUESKCKV.js +31 -0
  8. package/dist/_node-chunks/chunk-CRYBIEDD.js +168 -0
  9. package/dist/_node-chunks/{chunk-ZUONB4NC.js → chunk-ETYU6ZWB.js} +13 -19
  10. package/dist/_node-chunks/chunk-PF5AWRIF.js +22630 -0
  11. package/dist/_node-chunks/chunk-ZRMSQWBE.js +196 -0
  12. package/dist/_node-chunks/mdx-plugin-655B5P4B.js +1032 -0
  13. package/dist/_node-chunks/rehype-external-links-V53KQFON.js +121 -0
  14. package/dist/_node-chunks/{rehype-slug-BU5JP743.js → rehype-slug-GNVPIIPH.js} +24 -58
  15. package/dist/angular/index.js +3 -5
  16. package/dist/blocks.d.ts +5 -2
  17. package/dist/blocks.js +4660 -6643
  18. package/dist/ember/index.js +3 -5
  19. package/dist/index.d.ts +8 -1
  20. package/dist/index.js +4 -6
  21. package/dist/manager.js +11 -22
  22. package/dist/mdx-loader.js +13 -19
  23. package/dist/preset.js +161 -454
  24. package/dist/preview.js +2 -2
  25. package/package.json +6 -6
  26. package/dist/_browser-chunks/Color-64QXVMR3.js +0 -1675
  27. package/dist/_browser-chunks/chunk-DMNQCVA2.js +0 -12
  28. package/dist/_browser-chunks/chunk-UZFOWTVP.js +0 -974
  29. package/dist/_browser-chunks/chunk-YDZYZRYC.js +0 -39
  30. package/dist/_node-chunks/chunk-AV2VT7UZ.js +0 -231
  31. package/dist/_node-chunks/chunk-SD2N3D7I.js +0 -36332
  32. package/dist/_node-chunks/chunk-Z4H2MKFK.js +0 -248
  33. package/dist/_node-chunks/mdx-plugin-2AVHNGP4.js +0 -1654
  34. package/dist/_node-chunks/rehype-external-links-4APV7Y23.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_8xvp5b3rljg from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_8xvp5b3rljg from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_8xvp5b3rljg from "node:module";
4
-
5
- var __filename = CJS_COMPAT_NODE_URL_8xvp5b3rljg.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_8xvp5b3rljg.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_8xvp5b3rljg.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-ZUONB4NC.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
- };