@storybook/addon-docs 9.2.0-alpha.2 → 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.
Files changed (63) hide show
  1. package/README.md +5 -3
  2. package/dist/_browser-chunks/Color-LWAWP22K.js +1566 -0
  3. package/dist/_browser-chunks/DocsRenderer-HT7GNKAR.js +9 -0
  4. package/dist/_browser-chunks/chunk-67KILNXL.js +6831 -0
  5. package/dist/_browser-chunks/chunk-74ZUTOZN.js +65 -0
  6. package/dist/_browser-chunks/chunk-MM7DTO55.js +44 -0
  7. package/dist/_browser-chunks/chunk-RX6225WF.js +46 -0
  8. package/dist/_browser-chunks/chunk-TQ5Q4DDG.js +846 -0
  9. package/dist/_browser-chunks/chunk-UZFOWTVP.js +974 -0
  10. package/dist/_node-chunks/chunk-32BBSODQ.js +231 -0
  11. package/dist/_node-chunks/chunk-SFE23BYR.js +48 -0
  12. package/dist/_node-chunks/chunk-W3NRVQR7.js +35424 -0
  13. package/dist/_node-chunks/chunk-WX5VRRPF.js +248 -0
  14. package/dist/_node-chunks/mdx-plugin-2RC5UF6O.js +1653 -0
  15. package/dist/_node-chunks/rehype-external-links-WVBYEZ7J.js +168 -0
  16. package/dist/_node-chunks/rehype-slug-JGTPG4A3.js +127 -0
  17. package/dist/angular/index.d.ts +3 -0
  18. package/dist/angular/index.js +11 -0
  19. package/dist/blocks.d.ts +86 -42
  20. package/dist/blocks.js +8123 -201
  21. package/dist/ember/index.d.ts +3 -0
  22. package/dist/ember/index.js +11 -0
  23. package/dist/index.d.ts +42 -5
  24. package/dist/index.js +17 -15
  25. package/dist/manager.js +85 -154
  26. package/dist/mdx-loader.js +38 -71
  27. package/dist/mdx-react-shim.js +2 -0
  28. package/dist/preset.js +310 -72
  29. package/dist/preview.js +8 -13
  30. package/dist/web-components/index.d.ts +2 -0
  31. package/dist/web-components/index.js +0 -0
  32. package/manager.js +1 -1
  33. package/package.json +45 -89
  34. package/preset.js +1 -1
  35. package/preview.js +1 -1
  36. package/angular/README.md +0 -256
  37. package/angular/index.d.ts +0 -1
  38. package/angular/index.js +0 -4
  39. package/common/README.md +0 -98
  40. package/dist/Color-AVL7NMMY.mjs +0 -10
  41. package/dist/DocsContainer-fccc2203.d.ts +0 -51
  42. package/dist/DocsRenderer-3PZUHFFL.mjs +0 -2
  43. package/dist/DocsRenderer-ULRJ3H2C.mjs +0 -8
  44. package/dist/blocks.mjs +0 -213
  45. package/dist/chunk-2UFMRE4V.mjs +0 -5
  46. package/dist/chunk-CEH6MNVV.mjs +0 -3
  47. package/dist/chunk-GWJYCGSQ.mjs +0 -7
  48. package/dist/chunk-QUZPS4B6.mjs +0 -3
  49. package/dist/chunk-SPFYY5GD.mjs +0 -3
  50. package/dist/index.mjs +0 -8
  51. package/dist/preview.mjs +0 -5
  52. package/dist/shims/mdx-react-shim.js +0 -12
  53. package/dist/shims/mdx-react-shim.mjs +0 -1
  54. package/ember/README.md +0 -153
  55. package/ember/index.d.ts +0 -1
  56. package/ember/index.js +0 -3
  57. package/react/README.md +0 -149
  58. package/svelte/HOC.svelte +0 -7
  59. package/vue/README.md +0 -152
  60. package/vue3/README.md +0 -152
  61. package/web-components/README.md +0 -131
  62. package/web-components/index.js +0 -1
  63. /package/dist/{shims/mdx-react-shim.d.ts → mdx-react-shim.d.ts} +0 -0
@@ -0,0 +1,248 @@
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/@ungap/structured-clone/esm/types.js
17
+ var VOID = -1;
18
+ var PRIMITIVE = 0;
19
+ var ARRAY = 1;
20
+ var OBJECT = 2;
21
+ var DATE = 3;
22
+ var REGEXP = 4;
23
+ var MAP = 5;
24
+ var SET = 6;
25
+ var ERROR = 7;
26
+ var BIGINT = 8;
27
+
28
+ // ../../node_modules/@ungap/structured-clone/esm/deserialize.js
29
+ var env = typeof self === "object" ? self : globalThis;
30
+ var deserializer = /* @__PURE__ */ __name(($, _) => {
31
+ const as = /* @__PURE__ */ __name((out, index) => {
32
+ $.set(index, out);
33
+ return out;
34
+ }, "as");
35
+ const unpair = /* @__PURE__ */ __name((index) => {
36
+ if ($.has(index))
37
+ return $.get(index);
38
+ const [type, value] = _[index];
39
+ switch (type) {
40
+ case PRIMITIVE:
41
+ case VOID:
42
+ return as(value, index);
43
+ case ARRAY: {
44
+ const arr = as([], index);
45
+ for (const index2 of value)
46
+ arr.push(unpair(index2));
47
+ return arr;
48
+ }
49
+ case OBJECT: {
50
+ const object = as({}, index);
51
+ for (const [key, index2] of value)
52
+ object[unpair(key)] = unpair(index2);
53
+ return object;
54
+ }
55
+ case DATE:
56
+ return as(new Date(value), index);
57
+ case REGEXP: {
58
+ const { source, flags } = value;
59
+ return as(new RegExp(source, flags), index);
60
+ }
61
+ case MAP: {
62
+ const map = as(/* @__PURE__ */ new Map(), index);
63
+ for (const [key, index2] of value)
64
+ map.set(unpair(key), unpair(index2));
65
+ return map;
66
+ }
67
+ case SET: {
68
+ const set = as(/* @__PURE__ */ new Set(), index);
69
+ for (const index2 of value)
70
+ set.add(unpair(index2));
71
+ return set;
72
+ }
73
+ case ERROR: {
74
+ const { name, message } = value;
75
+ return as(new env[name](message), index);
76
+ }
77
+ case BIGINT:
78
+ return as(BigInt(value), index);
79
+ case "BigInt":
80
+ return as(Object(BigInt(value)), index);
81
+ case "ArrayBuffer":
82
+ return as(new Uint8Array(value).buffer, value);
83
+ case "DataView": {
84
+ const { buffer } = new Uint8Array(value);
85
+ return as(new DataView(buffer), value);
86
+ }
87
+ }
88
+ return as(new env[type](value), index);
89
+ }, "unpair");
90
+ return unpair;
91
+ }, "deserializer");
92
+ var deserialize = /* @__PURE__ */ __name((serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0), "deserialize");
93
+
94
+ // ../../node_modules/@ungap/structured-clone/esm/serialize.js
95
+ var EMPTY = "";
96
+ var { toString } = {};
97
+ var { keys } = Object;
98
+ var typeOf = /* @__PURE__ */ __name((value) => {
99
+ const type = typeof value;
100
+ if (type !== "object" || !value)
101
+ return [PRIMITIVE, type];
102
+ const asString = toString.call(value).slice(8, -1);
103
+ switch (asString) {
104
+ case "Array":
105
+ return [ARRAY, EMPTY];
106
+ case "Object":
107
+ return [OBJECT, EMPTY];
108
+ case "Date":
109
+ return [DATE, EMPTY];
110
+ case "RegExp":
111
+ return [REGEXP, EMPTY];
112
+ case "Map":
113
+ return [MAP, EMPTY];
114
+ case "Set":
115
+ return [SET, EMPTY];
116
+ case "DataView":
117
+ return [ARRAY, asString];
118
+ }
119
+ if (asString.includes("Array"))
120
+ return [ARRAY, asString];
121
+ if (asString.includes("Error"))
122
+ return [ERROR, asString];
123
+ return [OBJECT, asString];
124
+ }, "typeOf");
125
+ var shouldSkip = /* @__PURE__ */ __name(([TYPE, type]) => TYPE === PRIMITIVE && (type === "function" || type === "symbol"), "shouldSkip");
126
+ var serializer = /* @__PURE__ */ __name((strict, json, $, _) => {
127
+ const as = /* @__PURE__ */ __name((out, value) => {
128
+ const index = _.push(out) - 1;
129
+ $.set(value, index);
130
+ return index;
131
+ }, "as");
132
+ const pair = /* @__PURE__ */ __name((value) => {
133
+ if ($.has(value))
134
+ return $.get(value);
135
+ let [TYPE, type] = typeOf(value);
136
+ switch (TYPE) {
137
+ case PRIMITIVE: {
138
+ let entry = value;
139
+ switch (type) {
140
+ case "bigint":
141
+ TYPE = BIGINT;
142
+ entry = value.toString();
143
+ break;
144
+ case "function":
145
+ case "symbol":
146
+ if (strict)
147
+ throw new TypeError("unable to serialize " + type);
148
+ entry = null;
149
+ break;
150
+ case "undefined":
151
+ return as([VOID], value);
152
+ }
153
+ return as([TYPE, entry], value);
154
+ }
155
+ case ARRAY: {
156
+ if (type) {
157
+ let spread = value;
158
+ if (type === "DataView") {
159
+ spread = new Uint8Array(value.buffer);
160
+ } else if (type === "ArrayBuffer") {
161
+ spread = new Uint8Array(value);
162
+ }
163
+ return as([type, [...spread]], value);
164
+ }
165
+ const arr = [];
166
+ const index = as([TYPE, arr], value);
167
+ for (const entry of value)
168
+ arr.push(pair(entry));
169
+ return index;
170
+ }
171
+ case OBJECT: {
172
+ if (type) {
173
+ switch (type) {
174
+ case "BigInt":
175
+ return as([type, value.toString()], value);
176
+ case "Boolean":
177
+ case "Number":
178
+ case "String":
179
+ return as([type, value.valueOf()], value);
180
+ }
181
+ }
182
+ if (json && "toJSON" in value)
183
+ return pair(value.toJSON());
184
+ const entries = [];
185
+ const index = as([TYPE, entries], value);
186
+ for (const key of keys(value)) {
187
+ if (strict || !shouldSkip(typeOf(value[key])))
188
+ entries.push([pair(key), pair(value[key])]);
189
+ }
190
+ return index;
191
+ }
192
+ case DATE:
193
+ return as([TYPE, value.toISOString()], value);
194
+ case REGEXP: {
195
+ const { source, flags } = value;
196
+ return as([TYPE, { source, flags }], value);
197
+ }
198
+ case MAP: {
199
+ const entries = [];
200
+ const index = as([TYPE, entries], value);
201
+ for (const [key, entry] of value) {
202
+ if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))
203
+ entries.push([pair(key), pair(entry)]);
204
+ }
205
+ return index;
206
+ }
207
+ case SET: {
208
+ const entries = [];
209
+ const index = as([TYPE, entries], value);
210
+ for (const entry of value) {
211
+ if (strict || !shouldSkip(typeOf(entry)))
212
+ entries.push(pair(entry));
213
+ }
214
+ return index;
215
+ }
216
+ }
217
+ const { message } = value;
218
+ return as([TYPE, { name: type, message }], value);
219
+ }, "pair");
220
+ return pair;
221
+ }, "serializer");
222
+ var serialize = /* @__PURE__ */ __name((value, { json, lossy } = {}) => {
223
+ const _ = [];
224
+ return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;
225
+ }, "serialize");
226
+
227
+ // ../../node_modules/@ungap/structured-clone/esm/index.js
228
+ var esm_default = typeof structuredClone === "function" ? (
229
+ /* c8 ignore start */
230
+ (any, options) => options && ("json" in options || "lossy" in options) ? deserialize(serialize(any, options)) : structuredClone(any)
231
+ ) : (any, options) => deserialize(serialize(any, options));
232
+
233
+ // ../../node_modules/space-separated-tokens/index.js
234
+ function parse(value) {
235
+ const input = String(value || "").trim();
236
+ return input ? input.split(/[ \t\n\r\f]+/g) : [];
237
+ }
238
+ __name(parse, "parse");
239
+ function stringify(values) {
240
+ return values.join(" ").trim();
241
+ }
242
+ __name(stringify, "stringify");
243
+
244
+ export {
245
+ esm_default,
246
+ parse,
247
+ stringify
248
+ };